DART-SD410 Debian 4.4.9 Download Packages: Difference between revisions

From Variscite Wiki
Line 62: Line 62:
</pre>
</pre>
The kernel sources will be built and the output boot image file will be created in the ~/sd410/Debial/Linaro4.4.9(16.02)/ directory
The kernel sources will be built and the output boot image file will be created in the ~/sd410/Debial/Linaro4.4.9(16.02)/ directory
If the kernel configuration was not changed the next builds can be speed up by using the command:
<pre>
$ ./makebootimg.sh
</pre>


== Manual kernel build ==
== Manual kernel build ==

Revision as of 12:22, 14 August 2016

Download packages and build.

Create directory tree

Create the following directory tree:

$ mkdir ~/sd410
$ cd ~/sd410
$ mkdir Debian
$ cd Debian
$ mkdir Linaro-4.4.9(16.06)
$ cd Linaro-4.4.9(16.06)

Download kernel source

Download kernel source from git repository

$ git clone https://github.com/varigit/DART-SD410-kernel.git kernel
$ git checkout -b kernel-16.06 release/kernel-16.06

Download files from FTP site

Download the whole Debian/Linaro-4.4.9 folder located in /dart-sd410/Software/ on Variscite FTP into ~/sd410 directory The following files will be downloaded.

sd410
└── Debian
    └── Linaro-4.4.9(16.06)
        ├── kernel
        │   └── build.sh
        ├── ramdisk
        │   └── initrd.img-4.4.9-linaro-lt-qcom
        ├── RescueImages
        │   ├── sec.dat
        │   ├── flashall
        │   ├── boot-sd410.img
        │   ├── VAR-DT410_rootfs_alip_30Jun2016-68.img
        │   ├── VAR-DT410_rootfs_developer_30Jun2016-68.img
        │   ├── emmc_appsboot.mbn
        │   ├── hyp.mbn
        │   ├── rpm.mbn
        │   ├── sbl1.mbn
        │   ├── tz.mbn
        │   ├── license.txt
        │   ├── gpt_both0.bin
        │   ├── NON-HLOS.bin
        │   └── flashall.bat
        └── 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.

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:

$ ./makebootimg.sh full

The kernel sources will be built and the output boot image file will be created in the ~/sd410/Debial/Linaro4.4.9(16.02)/ directory

If the kernel configuration was not changed the next builds can be speed up by using the command:

$ ./makebootimg.sh

Manual kernel build

Export Envornment variables for compiler and architecture

$ export CROSS_COMPILE=aarch64-linux-gnu-
$ export ARCH=arm64

The gcc-aarch64-linux-gnu package usually intalled by default. If it is not installed run

$ sudo apt-get install gcc-aarch64-linux-gnu

Select the needed defconfig file for kernel:

$ make defconfig distro.config

Build the kernel and modules

$ make modules  KERNELRELEASE=4.4.9-linaro-lt-qcom -j8
$ make INSTALL_MOD_PATH=build-${ARCH}-modules modules_install KERNELRELEASE=4.4.9-linaro-lt-qcom -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:

$ ~/bin/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"

Create the boot image by:

$ ~/bin/skales/mkbootimg --kernel kernel/arch/arm64/boot/Image \
          --ramdisk ramdisk/initrd.img-4.4.9-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

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