DART-SD410 Ubuntu Download Packages: Difference between revisions
(21 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{{PageHeader|Download packages and | {{PageHeader|Download packages and build.}} __toc__ | ||
= Create directory tree = | = Create directory tree = | ||
Create the following directory tree: | Create the following directory tree: | ||
Line 10: | Line 9: | ||
= Download files from FTP site = | = Download files from FTP site = | ||
Download the whole Ubuntu folder | Download the whole Ubuntu folder located in /dart-sd410/Software/ on Variscite FTP | ||
/dart-sd410/Software | This will create the following directory tree | ||
<pre> | |||
sd410 | |||
└── ubuntu | |||
├── kernel | |||
└── ramdisk | |||
</pre> | |||
{{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 | = Download kernel source = | ||
Download the | 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 = | |||
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 == | |||
Build kernel source using supplied script file: | |||
<pre> | |||
$ ./makebootimg.sh | |||
</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 == | |||
Export Envornment variables for compiler and architecture | |||
<pre> | |||
$ export CROSS_COMPILE=aarch64-linux-gnu- | |||
$ export ARCH=arm64 | |||
</pre> | |||
The gcc-aarch64-linux-gnu package usually intalled by default. If it is not installed run | |||
<pre> | |||
$ sudo apt-get install gcc-aarch64-linux-gnu | |||
</pre> | |||
Select the needed defconfig file for kernel: | |||
<pre> | |||
$ make O=build-${ARCH} defconfig | |||
</pre> | |||
Build the kernel and modules | |||
<pre> | |||
$ make O=build-${ARCH} -j10 | |||
$ make O=build-${ARCH} INSTALL_MOD_PATH=build-${ARCH}-modules modules_install | |||
</pre> | |||
== Manual boot image creation == | |||
You will need a default ramdisk for boot image creation.<br> | |||
It is located in the ramdisk directory of the downloaded folder.<br> | |||
Compress all the dtb files and the kernel image file into one dt.img file by: | |||
<pre> | |||
$ ~/bin/skales/dtbTool -o dt.img -s 2048 kernel/build-${ARCH}/arch/arm64/boot/dts/qcom/ | |||
</pre> | |||
Export the command line for linux kernel by: | |||
<pre> | |||
$ export cmdline="root=/dev/mmcblk0p10 rw rootwait console=ttyMSM0,115200n8" | |||
</pre> | |||
Create the boot image by: | |||
<pre> | |||
$ ~/bin/skales/mkbootimg --kernel kernel/build-${ARCH}/arch/arm64/boot/Image \ | |||
--ramdisk ramdisk/initrd.img-4.2.4-linaro-lt-qcom \ | |||
--output boot-sd410.img \ | |||
--dt dt.img \ | |||
--pagesize 2048 \ | |||
--base 0x80000000 \ | |||
--cmdline "$cmdline" | |||
</pre> | |||
The file named boot-sd410.img is created. It should be burned into the board using fastboot. | |||
Remove unneeded dt.img file: | |||
<pre> | |||
$ rm dt.img | |||
</pre> | |||
= 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: | |||
<pre> | |||
$ sudo fastboot flash boot boot-sd410.img | |||
$ sudo fastboot reboot | |||
</pre> | |||
The board will update the system and reboot with the updated kernel |
Latest revision as of 12:07, 14 August 2016
Create directory tree
Create the following directory tree:
$ mkdir ~/sd410 $ cd ~/sd410
Download files from FTP site
Download the whole Ubuntu folder located in /dart-sd410/Software/ on Variscite FTP This will create the following directory tree
sd410 └── ubuntu ├── kernel └── ramdisk
Please refer to support@variscite.com for obtaining FTP credentials.
Download kernel source
Download kernel source from git repository
$ git clone https://github.com/varigit/DART-SD410-kernel.git kernel $ git checkout -b release/qcomlt-4.2
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
Build kernel source using supplied script file:
$ ./makebootimg.sh
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
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 O=build-${ARCH} defconfig
Build the kernel and modules
$ make O=build-${ARCH} -j10 $ make O=build-${ARCH} INSTALL_MOD_PATH=build-${ARCH}-modules modules_install
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/build-${ARCH}/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/build-${ARCH}/arch/arm64/boot/Image \ --ramdisk ramdisk/initrd.img-4.2.4-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