6 This is the buildroot board support for the Arrow SoCkit Evaluation Board.
8 A good source of information is :
9 http://www.rocketboards.org/foswiki/Documentation/ArrowSoCKitEvaluationBoard
17 In summary, the bootloader has multiple stages, an hardcoded boot routine is
18 loaded from an on-chip ROM.
20 - That first stage is scanning the SD card's partition table to find
21 partition having the 0xA2 type.
22 - This partition is expected to contain a boot image on its first 60 Kb,
23 because u-boot is bigger, we must fill it with a preloader (u-boot-spl)
24 which will load the u-boot image.
25 - Then the u-boot image will load the Linux kernel.
27 A good source of information for the boot process is :
28 http://xillybus.com/tutorials/u-boot-image-altera-soc
31 The SPL generated by the u-boot from Rocketboards doesn't seems to work,
32 therefore we provide a patch for {uboot-PKG}/board/altera/socfpga_cyclone5/*
33 based on the files generated with the Altera example design.
35 For more information about this files please look at :
36 http://www.rocketboards.org/foswiki/Documentation/PreloaderUbootCustomization#Common_Source_Code
44 The altera_sockit_defconfig configuration is a minimal configuration with
45 all that is required to bring the SoCkit :
47 $ make altera_sockit_defconfig
52 Note: you will need to have access to the network, since Buildroot will
53 download the packages' sources.
60 After building, you should obtain this tree:
64 ├── rootfs.ext3 -> rootfs.ext2
66 ├── socfpga_cyclone5_sockit.dtb
77 The u-boot-spl.bin must be signed using the Altera's tool "mkpimage".
78 This tool comes as a part of the Altera development environnment (SoC EDS).
79 A fork of this tool have been done by Maxime Hadjinlian and can be found here :
80 https://github.com/maximeh/mkpimage
82 Remember that without signing the u-boot-spl.bin, the board will not boot !!!
84 $ mkpimage u-boot-spl.bin -o u-boot-spl-signed.bin
89 A good source of information for the partitioning process is :
90 http://www.rocketboards.org/foswiki/view/Projects/SoCKitLinaroLinuxDesktop#Partition_the_SD_Card
92 Create the SDcard partition table
93 ----------------------------------
95 Determine the device associated to the SD card :
97 $ cat /proc/partitions
99 let's assume it is /dev/mmcblk0 :
101 $ sudo fdisk /dev/mmcblk0
103 Delete all previous partitions with 'd' then create the new partition table,
104 using these options, pressing enter after each one:
106 * n p 1 9000000 +20480K t 1 b
107 * n p 2 4096 +4496384K t 83
108 * n p 3 2048 +1024K t 3 a2
110 Using the 'p' option, the SD card's partition must look like this :
112 Device Boot Start End Blocks Id System
113 /dev/mmcblk0p1 9000000 9041919 20960 b W95 FAT32
114 /dev/mmcblk0p2 4096 8996863 4496384 83 Linux
115 /dev/mmcblk0p3 2048 4095 1024 a2 Unknown
117 Then write the partition table using 'w' and exit.
119 Make partition one a DOS partition :
121 $ sudo mkdosfs /dev/mmcblk0p1
123 Install the binaries to the SDcard
124 ----------------------------------
126 Remember your binaries are located in output/images/, go inside that directory :
130 The partition with type a2 is the partition scan by the first bootloader stage
131 in the SoCkit ROM to find the next bootloader stage so we must write the signed
132 preloader and the u-boot binaries in that partition :
134 $ sudo dd if=u-boot-spl-signed.bin of=/dev/mmcblk0p3 bs=64k seek=0
135 $ sudo dd if=u-boot.img of=/dev/mmcblk0p3 bs=64k seek=4
137 Copy the Linux kernel and its Device tree :
139 $ sudo mkdir /mnt/sdcard
140 $ sudo mount /dev/mmcblk0p1 /mnt/sdcard
141 $ sudo cp socfpga.dtb uImage /mnt/sdcard
142 $ sudo umount /mnt/sdcard
146 $ sudo dd if=rootfs.ext2 of=/dev/mmcblk0p2 bs=64k
154 Eject your SDcard, insert it in your SoCkit, and power it up.
156 if you want a serial console, you can plug a micro B USB cable on the USB-UART
157 port, the serial port config to used is 57600/8-N-1.