Personal tools

DART-SD410 Debian 4.9.39 Download Packages

From Variscite Wiki

Jump to: navigation, search

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.

1 Create directory tree

Create the following directory tree:

$ mkdir ~/sd410
$ cd ~/sd410
$ mkdir Debian
$ cd Debian
$ mkdir Linaro-4.9.39
$ cd Linaro-4.9.39

2 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

3 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 support@variscite.com for obtaining FTP credentials.

4 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:

$ tar -xvf gcc-linaro-6.3.1-2017.02-x86_64_aarch64-linux-gnu.tar.xz

5 Boot Image Build

Variscite suggests using the downloaded script for building the boot images. If something goes wrong then try the manual build.

5.1 Automatic creation of the boot image first time

Build kernel source using supplied script file:

$ ./makebootimg.sh full

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:

$ ./makebootimg.sh

5.2 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:

$ make defconfig distro.config var-sd410.config

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

5.3 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:

$ ./skales/dtbTool -o dt.img -s 2048 kernel/arch/arm64/boot/dts/qcom/

Export the command line for linux kernel by:

$ export cmdline="root=/dev/mmcblk0p10 rw rootwait console=ttyMSM0,115200n8 consoleblank=0"

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:

$ rm dt.img

6 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:

$ sudo fastboot flash boot boot-sd410.img
$ sudo fastboot reboot

The board will update the system and reboot with the updated kernel