The Android Source Tree of our Khadas VIMs are hosted on Github. There are many different repositories.
Walk through the steps below to download the Source Code.
Steps
Firstly, install git-lfs tool for downloading Android 11.0 64bit SDK
1 | $ sudo apt install git-lfs |
Or source code installation
1 | $ mkdir git_lfs |
- Create an empty directory to hold your working files:
1 | $ mkdir -p WORKING_DIRECTORY |
- Run
repo init
to download the manifest repository first:
1 | $ repo init -u https://github.com/khadas/android_manifest.git -b khadas-vim4-r-64bit |
- Run
repo sync
to pull down the Android Source Tree:
1 | $ repo sync -j4 |
The initial sync operation may take an hour or more to complete.
TipYou might need to run above command repeatly if it fails halfway. Or you can try with this script instead:
1
2
3
4
5
6
repo sync -j4
while [ $? = 1 ]; do
echo "Sync failed, repeat again:"
repo sync -j4
doneIf needed, press Ctrl-\ to quit.
- Begin a new branch for development:
1 | $ repo start <BRANCH_NAME> --all |
- Based on different unbutu versions, the following operations may be required to pull large files(Otherwise, the corresponding file is small and incorrect).
You need to go to the following three directories and use the ‘git lfs pull’ command to pull large files, otherwise an error will be reported during compilation:1
2
3vendor/amlogic/common
device/khadas/kvim4-kernel
device/khadas1
2
3
4
5
6
7
8
9
10
11
12
13
14xxx@server:/users/vim4$ cd vendor/amlogic/common
xxx@server:/users/vim4/vendor/amlogic/common$ git lfs pull
Git LFS: (6 of 6 files) 239.31 MB / 239.31 MB
xxx@server:/users/vim4/vendor/amlogic/common$ cd -
/users/vim4
xxx@server:/users/vim4$ cd device/khadas/
xxx@server:/users/vim4/device/khadas$
xxx@server:/users/vim4/device/khadas$ git lfs pull
Git LFS: (2 of 2 files) 231.89 MB / 231.89 MB
xxx@server:/users/vim4/device/khadas$ cd kvim4-kernel/
xxx@server:/users/vim4/device/khadas/kvim4-kernel$
xxx@server:/users/vim4/device/khadas/kvim4-kernel$ git lfs pull
Git LFS: (4 of 4 files) 451.79 MB / 451.79 MB
xxx@server:/users/vim4/device/khadas/kvim4-kernel$Further Reading