|
@@ -15,8 +15,8 @@ https://www.altera.com/products/boards_and_kits/dev-kits/altera/kit-cyclone-v-so
|
|
|
How it works
|
|
|
============
|
|
|
|
|
|
-Boot process :
|
|
|
---------------
|
|
|
+Boot process:
|
|
|
+-------------
|
|
|
|
|
|
In summary, the bootloader has multiple stages, an hardcoded boot routine is
|
|
|
loaded from an on-chip ROM.
|
|
@@ -28,15 +28,15 @@ loaded from an on-chip ROM.
|
|
|
which will load the u-boot image.
|
|
|
- Then the u-boot image will load the Linux kernel.
|
|
|
|
|
|
-A good source of information for the boot process is :
|
|
|
+A good source of information for the boot process is:
|
|
|
http://xillybus.com/tutorials/u-boot-image-altera-soc
|
|
|
|
|
|
-Note for the SPL :
|
|
|
+Note for the SPL:
|
|
|
The SPL generated by the u-boot from Rocketboards doesn't seems to work,
|
|
|
therefore we provide a patch for {uboot-PKG}/board/altera/socfpga_cyclone5/*
|
|
|
based on the files generated with the Altera example design.
|
|
|
|
|
|
-For more information about this files please look at :
|
|
|
+For more information about this files please look at:
|
|
|
http://www.rocketboards.org/foswiki/Documentation/PreloaderUbootCustomization#Common_Source_Code
|
|
|
|
|
|
How to build it
|
|
@@ -46,11 +46,11 @@ Configure Buildroot
|
|
|
-------------------
|
|
|
|
|
|
The altera_sockit_defconfig configuration is a minimal configuration with
|
|
|
-all that is required to bring the SoCkit :
|
|
|
+all that is required to bring the SoCkit:
|
|
|
|
|
|
$ make altera_sockit_defconfig
|
|
|
|
|
|
-and for the SoC Development Board :
|
|
|
+and for the SoC Development Board:
|
|
|
|
|
|
$ make altera_sockdk_defconfig
|
|
|
|
|
@@ -84,7 +84,7 @@ Signing the Preloader
|
|
|
*** BEWARE ****
|
|
|
The u-boot-spl.bin must be signed using the Altera's tool "mkpimage".
|
|
|
This tool comes as a part of the Altera development environnment (SoC EDS).
|
|
|
-A fork of this tool have been done by Maxime Hadjinlian and can be found here :
|
|
|
+A fork of this tool have been done by Maxime Hadjinlian and can be found here:
|
|
|
https://github.com/maximeh/mkpimage
|
|
|
|
|
|
Remember that without signing the u-boot-spl.bin, the board will not boot !!!
|
|
@@ -94,17 +94,17 @@ Remember that without signing the u-boot-spl.bin, the board will not boot !!!
|
|
|
Prepare your SDcard
|
|
|
===================
|
|
|
|
|
|
-A good source of information for the partitioning process is :
|
|
|
+A good source of information for the partitioning process is:
|
|
|
http://www.rocketboards.org/foswiki/view/Projects/SoCKitLinaroLinuxDesktop#Partition_the_SD_Card
|
|
|
|
|
|
Create the SDcard partition table
|
|
|
----------------------------------
|
|
|
|
|
|
-Determine the device associated to the SD card :
|
|
|
+Determine the device associated to the SD card:
|
|
|
|
|
|
$ cat /proc/partitions
|
|
|
|
|
|
-let's assume it is /dev/mmcblk0 :
|
|
|
+let's assume it is /dev/mmcblk0:
|
|
|
|
|
|
$ sudo fdisk /dev/mmcblk0
|
|
|
|
|
@@ -115,7 +115,7 @@ using these options, pressing enter after each one:
|
|
|
* n p 2 4096 +4496384K t 83
|
|
|
* n p 3 2048 +1024K t 3 a2
|
|
|
|
|
|
-Using the 'p' option, the SD card's partition must look like this :
|
|
|
+Using the 'p' option, the SD card's partition must look like this:
|
|
|
|
|
|
Device Boot Start End Blocks Id System
|
|
|
/dev/mmcblk0p1 9000000 9041919 20960 b W95 FAT32
|
|
@@ -124,32 +124,32 @@ Device Boot Start End Blocks Id System
|
|
|
|
|
|
Then write the partition table using 'w' and exit.
|
|
|
|
|
|
-Make partition one a DOS partition :
|
|
|
+Make partition one a DOS partition:
|
|
|
|
|
|
$ sudo mkdosfs /dev/mmcblk0p1
|
|
|
|
|
|
Install the binaries to the SDcard
|
|
|
----------------------------------
|
|
|
|
|
|
-Remember your binaries are located in output/images/, go inside that directory :
|
|
|
+Remember your binaries are located in output/images/, go inside that directory:
|
|
|
|
|
|
$ cd output/images
|
|
|
|
|
|
The partition with type a2 is the partition scan by the first bootloader stage
|
|
|
in the SoCkit ROM to find the next bootloader stage so we must write the signed
|
|
|
-preloader and the u-boot binaries in that partition :
|
|
|
+preloader and the u-boot binaries in that partition:
|
|
|
|
|
|
$ sudo dd if=u-boot-spl-signed.bin of=/dev/mmcblk0p3 bs=64k seek=0
|
|
|
$ sudo dd if=u-boot.img of=/dev/mmcblk0p3 bs=64k seek=4
|
|
|
|
|
|
-Copy the Linux kernel and its Device tree :
|
|
|
+Copy the Linux kernel and its Device tree:
|
|
|
|
|
|
$ sudo mkdir /mnt/sdcard
|
|
|
$ sudo mount /dev/mmcblk0p1 /mnt/sdcard
|
|
|
$ sudo cp socfpga.dtb uImage /mnt/sdcard
|
|
|
$ sudo umount /mnt/sdcard
|
|
|
|
|
|
-Copy the rootfs :
|
|
|
+Copy the rootfs:
|
|
|
|
|
|
$ sudo dd if=rootfs.ext2 of=/dev/mmcblk0p2 bs=64k
|
|
|
$ sudo sync
|