This documentation has the objective to teach how to create and configure an Git repository to work with the NL668 SDK.
The module and SDK that we will use is NL668-LA-30. the OpenSDK version is 19096.1000.15.02.80.01 and certainly can be applied on other firmware versions. If you want to apply on other modules (like FG Series) this documentation will not solve it all, but can be used as a reference for you to customize your git files and use it for the right module.
For this quickstart we will use GitHub to host our repository and can be easy replaced by any other git platform, like gitlab or bitbucket.
2. Requirements- NL668-LA Module
- OpenSDK files
- Git
- Fastboot and ADB
Obs: If you are starting to use OpenSDK, please take a look on this quickstart:
https://www.hackster.io/victorffs/nl668-la-openlinux-quickstart-c40508
3. Creating GitHub repositoryOpen your GitHub account, on left panel click on New to create a new repository:
Select No Template, fill the text boxes with a Repository Name and Description, select Private and don't select any initialize option. Then click Create repository:
Save the generated link for your repository. You will use it on next steps:
Extract the SDK.7z file to any folder:
Enter the extracted folder and create a .gitignore file as below:
# Ignore bootloader and kernel outputs
fibo_bootloader/build-mdm9607/*
fibo_kernel/build/*
# Ignore target files
target/*
# Add exception to delete folder (needs to add .gitkeep file before)
!target/.gitkeep
# Output files from fibo_sdk
fibo_sdk/fibo_app/logmanager/out
fibo_sdk/fibo_app/*/Object/*
fibo_sdk/fibo_app/*/*/Object/*
fibo_sdk/example/*/Object/*
fibo_sdk/example/*/*/Object/*
# Binary generated at fibo_sdk
fibo_rootfs/usr/bin/*_test
fibo_sdk/bin/*_test
fibo_sdk/bin/disable_report
fibo_sdk/bin/mdt_client_test_self
fibo_sdk/bin/sdk_client_test_self
The SDK use some folders inside rootfs and usrfs to create the system folders structure. Some of this important folders will be empty in your computer, but unfortunately is not possible to push an empty folder to Git. So, we will create .gitkeep files inside all this folders to allow the push.
Run this command on your SDK folder to add .gitkeep files in all empty folders:
find . -type d -empty -not -path "./.git/*" -exec touch {}/.gitkeep \;
Use the following commands to init your repository, to add all files and the rest of process to commit until push.
Dont forget to replace the add origin link by the right link from your github repository!
echo "# nl668-la-30" >> README.md
git init
git add .
git commit -m "first commit"
git branch -M main
git remote add origin https://github.com/victorffs/nl668-la-30.git # Your link
git push -u origin main
There is a lot of files, so get a coffee to wait the add and push process.
Now, take a look in your github repository page. All necessary files should already be there:
Let's confirm if all the required files has been pushed cloning this repo from zero.
Exit your current sdk folder, open the terminal and use git clone to create a new replica of your repository.
git clone https://github.com/your_repository.git
Now open your cloned repository folder and try to make the sdk with the following commands:
cd nl668-la-30/
source fibo_crosstools/fibo-crosstools-env-init
make
To keep our repository optimized and organized, we don't want to send output binary files. So use git status after compilation to check if the .gitignore has really ignored the ouputs:
git status
Now, flash your module to check if the device is working with new firmware.
adb shell sys_reboot bootloader
fastboot devices
fastboot flash aboot target/appsboot.mbn
fastboot flash boot target/mdm9607-boot.img
fastboot flash system target/mdm9607-sysfs.ubi
fastboot reboot
Now check it with adb:
adb devices
adb shell
Congratulations! You have made your Git repository integration with Fibocom's OpenSDK.
Comments
Please log in or sign up to comment.