DART-SD410 Debian 4.4.9 Download Packages: Difference between revisions

From Variscite Wiki
(Created page with "{{PageHeader|Download packages and build.}} __toc__ = Create directory tree = Create the following directory tree: <pre> $ mkdir ~/sd410 $ cd ~/sd410 </pre> = Download files...")
 
 
(13 intermediate revisions by the same user not shown)
Line 6: Line 6:
$ mkdir ~/sd410
$ mkdir ~/sd410
$ cd ~/sd410
$ cd ~/sd410
$ mkdir Debian
$ cd Debian
$ mkdir Linaro-4.4.9
$ cd Linaro-4.4.9
</pre>
= Download kernel source =
Download kernel source from git repository
<pre>
$ git clone https://github.com/varigit/DART-SD410-kernel.git kernel
$ cd kernel
$ git checkout -b kernel-16.06 remotes/origin/release/kernel-16.06
</pre>
</pre>


= Download files from FTP site =
= Download files from FTP site =
Download the whole Ubuntu folder located in /dart-sd410/Software/ on Variscite FTP
Download the whole Debian/Linaro-4.4.9 folder located in /dart-sd410/Software/ on Variscite FTP into ~/sd410 directory
This will create the following directory tree
The following files will be downloaded.
<pre>
<pre>
sd410
sd410
└── Debian
└── Debian
     └── Linaro-4.4.9(16.06)
     └── Linaro-4.4.9
         ├── kernel
         ├── kernel
         │  └── build.sh
         │  └── build.sh
Line 37: Line 49:


</pre>
</pre>
The file build.sh will be placed in the git kernel directory
{{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 kernel source =
Download kernel source from git repository
<pre>
$ git clone https://github.com/varigit/DART-SD410-kernel.git kernel
$ git checkout -b release/qcomlt-4.2
</pre>


= Boot Image Build =
= Boot Image Build =
Variscite suggests using the downloaded script for building the boot images.
Variscite suggests using the downloaded script for building the boot images.
If something goes wrong then try the manual build.
If something goes wrong then try the manual build.
== Automatic creation of the boot image ==
== Automatic creation of the boot image first time ==
Build kernel source using supplied script file:
Build kernel source using supplied script file:
<pre>
<pre>
$ ./makebootimg.sh  
$ ./makebootimg.sh full
</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
 
If the kernel configuration was not changed the next builds can be speed up by using the command:
<pre>
$ ./makebootimg.sh
</pre>
</pre>
The kernel sources will be built and the output boot image file will be created in the ~/sd410/ubuntu/Linaro4.2/ directory


== Manual kernel build ==
== Manual kernel build ==
Line 69: Line 81:
Select the needed defconfig file for kernel:
Select the needed defconfig file for kernel:
<pre>
<pre>
$ make O=build-${ARCH} defconfig
$ make defconfig distro.config
</pre>
</pre>
Build the kernel and modules
Build the kernel and modules
<pre>
<pre>
$ make O=build-${ARCH} -j10
$ make modules  KERNELRELEASE=4.4.9-linaro-lt-qcom -j8
$ make O=build-${ARCH} INSTALL_MOD_PATH=build-${ARCH}-modules modules_install
$ make INSTALL_MOD_PATH=build-${ARCH}-modules modules_install KERNELRELEASE=4.4.9-linaro-lt-qcom -j8
</pre>
</pre>
== Manual boot image creation ==
== Manual boot image creation ==
You will need a default ramdisk for boot image creation.<br>
You will need a default ramdisk for boot image creation.<br>
Line 82: Line 95:
Compress all the dtb files and the kernel image file into one dt.img file by:
Compress all the dtb files and the kernel image file into one dt.img file by:
<pre>
<pre>
$ ~/bin/skales/dtbTool -o dt.img -s 2048 kernel/build-${ARCH}/arch/arm64/boot/dts/qcom/
$ ~/bin/skales/dtbTool -o dt.img -s 2048 kernel/arch/arm64/boot/dts/qcom/
</pre>
</pre>
Export the command line for linux kernel by:
Export the command line for linux kernel by:
Line 90: Line 103:
Create the boot image by:
Create the boot image by:
<pre>
<pre>
$ ~/bin/skales/mkbootimg --kernel kernel/build-${ARCH}/arch/arm64/boot/Image \
$ ~/bin/skales/mkbootimg --kernel kernel/arch/arm64/boot/Image \
           --ramdisk ramdisk/initrd.img-4.2.4-linaro-lt-qcom \
           --ramdisk ramdisk/initrd.img-4.4.9-linaro-lt-qcom \
           --output boot-sd410.img \
           --output boot-sd410.img \
           --dt dt.img \
           --dt dt.img \

Latest revision as of 09:11, 29 November 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
$ cd Linaro-4.4.9

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-16.06 remotes/origin/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
        ├── 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