DART-SD410 Debian 4.9.39 Download Packages: Difference between revisions

From Variscite Wiki
(Created page with "{{PageHeader|Download packages and build.}} __toc__ {{note| NOTE:<br> The dtb file selection was changed in this new version, it now requires a new version of skales tool (do...")
 
Line 22: Line 22:
</pre>
</pre>


= Download files from FTP site =
= Download Linaro folder from FTP site =
Download the whole Debian/Linaro-17.061 folder located in /dart-sd410/Software/Debian on Variscite FTP into ~/sd410/Debian/Linaro-4.9.39 directory
Download the whole Debian/Linaro-17.061 folder located in /dart-sd410/Software/Debian on Variscite FTP into ~/sd410/Debian/Linaro-4.9.39 directory
The following files will be downloaded.
The following files will be downloaded.
Line 59: Line 59:
{{note| NOTE:<br>
{{note| NOTE:<br>
Please refer to support@variscite.com for obtaining FTP credentials.|info}}
Please refer to support@variscite.com for obtaining FTP credentials.|info}}
= Download GCC from FTP site =
Download GCC compiler archive from /Software/Debian directory into ~/sd410/Debian directory of your PC.<br>Extract the GCC compiler by:
<pre>
$ tar -xvf gcc-linaro-6.3.1-2017.02-x86_64_aarch64-linux-gnu.tar.xz
</pre>


= Boot Image Build =
= Boot Image Build =

Revision as of 17:39, 10 January 2018

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:

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

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.061 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.

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

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/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

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 installed 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 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

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

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