Download packages and build.¶
NOTE:
The dtb file selection was changed in this new version, it now requires a new version of skales tool (downloaded from ftp site) and a new version of boot loader files.
In order to get it running please update the whole system by running flashall script.
Create directory tree¶
Create the following directory tree:
Download kernel source¶
Download kernel source from git repository
$ git clone https://github.com/varigit/DART-SD410-kernel.git kernel
$ cd kernel
$ git checkout -b kernel-17.06.1 remotes/origin/release/kernel-17.06.1
Download Linaro folder from FTP site¶
Download the whole Debian/Linaro-17.06.1 folder located in /dart-sd410/Software/Debian on Variscite FTP into ~/sd410/Debian/Linaro-4.9.39 directory The following files will be downloaded.
sd410
└── Debian
└── Linaro-4.9.39
├── kernel
│ └── build.sh
├── ramdisk
│ └── initrd.img-4.9.39-linaro-lt-qcom
├── RescueImages
│ ├── boot-sd410-HDMI.img
│ ├── boot-sd410-LVDS.img
│ ├── boot-sd410.img
│ ├── dart-sd410_8016.bin
│ ├── emmc_appsboot.mbn
│ ├── flashall.bat
│ ├── gpt_both0.bin
│ ├── hyp.mbn
│ ├── LICENSE
│ ├── linaro-stretch-alip-qcom-snapdragon-arm64-20170802-260.img
│ ├── linaro-stretch-developer-qcom-snapdragon-arm64-20170802-260.img
│ ├── linux-headers-4.9.39-linaro-lt-qcom_4.9.39-linaro-lt-qcom-260_arm64.deb
│ ├── linux-libc-dev_4.9.39-linaro-lt-qcom-260_arm64.deb
│ ├── NON-HLOS.bin
│ ├── rpm.mbn
│ ├── sbl1.mbn
│ └── tz.mbn
├── skales
└── makebootimg.sh
The file build.sh will be placed in the git kernel directory
NOTE:
Please refer to [email protected] for obtaining FTP credentials.
Download GCC from FTP site¶
Download GCC compiler archive from /Software/Debian directory into ~/sd410/Debian directory of your PC.
Extract the GCC compiler by:
Boot Image Build¶
Variscite suggests using the downloaded script for building the boot images. If something goes wrong then try the manual build.
Automatic creation of the boot image first time¶
Build kernel source using supplied script file:
The kernel sources will be built and the output boot image file will be created in the ~/sd410/Debial/Linaro-4.9.39/ directory
If the kernel configuration was not changed the next builds can be speed up by using the command:
Manual kernel build¶
Export Envornment variables for compiler and architecture
$ export CROSS_COMPILE=~/sd410/debian/gcc-linaro-6.3.1-2017.02-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-
$ export ARCH=arm64
Select the needed defconfig file for kernel:
Build the kernel and modules
$ make KERNELRELEASE=4.9.39-linaro-lt-qcom Image dtbs -j8
$ make KERNELRELEASE=4.9.39-linaro-lt-qcom modules -j8
$ make KERNELRELEASE=4.9.39-linaro-lt-qcom INSTALL_MOD_PATH=build-${ARCH}-modules modules_install -j8
Manual boot image creation¶
You will need a default ramdisk for boot image creation.
It is located in the ramdisk directory of the downloaded folder.
Compress all the dtb files and the kernel image file into one dt.img file by:
Export the command line for linux kernel by:
Create the boot image by:
$ ./skales/mkbootimg --kernel kernel/arch/arm64/boot/Image \
--ramdisk ramdisk/initrd.img-4.9.39-linaro-lt-qcom \
--output boot-sd410.img \
--dt dt.img \
--pagesize 2048 \
--base 0x80000000 \
--cmdline "$cmdline"
The file named boot-sd410.img is created. It should be burned into the board using fastboot. Remove unneeded dt.img file:
Flash new image to the board¶
Cycle power of the VAR-SD410CustomBoard with Back button pressed. it will enter fastboot. run the following commend to update the boot image:
The board will update the system and reboot with the updated kernel