Hi,
After a few tries I got the Angstrom build-flow working and was able to (re-)create the sd card image for the Altera Arria V SoC DevKit Board.
There where some changes to the commands given in the current 15.0.1 GSRD Linux Guide and some changes to the make_sdimage.py python script:
Branch/Tag/Environment
CentOS 6.5
angstrom-socfpga
branch: origin/angstrom-v2014.12-socfpga_gsrd15.0.1
tag: ACDS15.0.1_REL_GSRD_UPDATE1_PR)
cd ~
git clone https://github.com/altera-opensource/angstrom-socfpga
cd angstrom-socfpga/
git checkout -b origin/angstrom-v2014.12-socfpga_gsrd15.0.1 ACDS15.0.1_REL_GSRD_UPDATE1_PR
sed -i 's@meta-openembedded,git://github.com/openembedded/meta-oe.git,dizzy,HEAD@meta-openembedded,git://git.openembedded.org/meta-openembedded.git,dizzy,HEAD@' ./sources/layers.txt
sed -i 's@openembedded-core,git://github.com/openembedded/oe-core.git,dizzy,HEAD@openembedded-core,git://git.openembedded.org/openembedded-core.git,dizzy,HEAD@' ./sources/layers.txt
sed -i '/.*kde4.*/d' ./sources/layers.txt
sed -i '/.*gumstix.*/d' ./sources/layers.txt
sed -i '/.*kde4.*/d' ./conf/bblayers.conf
sed -i '/.*gumstix.*/d' ./conf/bblayers.conf
grep -rl "/usr/bin/env python2.7" | xargs sed -i 's@/usr/bin/env python2.7@/usr/bin/env python@'
MACHINE=arria5 ./oebb.sh config arria5
source ./environment-angstrom-v2014.12
export BB_ENV_EXTRAWHITE="$BB_ENV_EXTRAWHITE KERNEL_TAG UBOOT_TAG UBOOT_PROT UBOOT_REPO"
export KERNEL_TAG=refs/tags/ACDS15.0.1_REL_GSRD_UPDATE1_PR
export UBOOT_TAG=refs/tags/ACDS15.0.1_REL_GSRD_UPDATE1_PR
export UBOOT_REPO=git://github.com/altera-opensource/u-boot-socfpga
export UBOOT_PROT=http
export set PATH=~/Python-2.7.8:~/git-1.7.8:~/tar-1.28/src:$PATH
MACHINE=arria5 bitbake virtual/kernel gsrd-console-image virtual/bootloader
Changes:
openembedded related sed’s -> get the sources from the new openembedded git
kde/gumstix sed’s -> bugfix
python 2.7 grep -> some scripts in the build-flow call python2.7 directly, which will not be found and will cause an error during the bitbake build, this line will fix this
Preloader BSP generation:
enable SDRAM scrubbing: spl.boot -> activate SDRAM_SCRUBBING checkbox
Devicetree generator:
sopc2dts --input soc_system.sopcinfo
–output socfpga.dtb
–type dtb
–board soc_system_board_info.xml
–board hps_common_board_info.xml
–bridge-removal all
–clocks
Get all necessary files for the sd card image
Execute the mkimage python script:
./make_sdimage.py
-f
-P preloader-mkpimage.bin,u-boot-arria5.img,num=3,format=raw,size=10M,type=A2
-P rootfs/*,num=2,format=ext3,size=1500M
-P zImage,u-boot.scr,soc_system.rbf,socfpga.dtb,num=1,format=vfat,size=500M
-s 2G
-n sd_card_image_arria5.bin
make_sdimage.py errors/modifications
1:
‘module’ has no function ‘check_output’
–> check that the PATH includes the link to the python 2.7.8 executable
This is necessary as the check_output function (for module subprocess) is available from 2.7 onwards (2.6.6 = standard install from centos 6.5 does not include this function!)
–> The export-line from above exports the ~/Python path --> the make_sdimage.py is executed as root (keep this in mind)
2:
…could not stat device losetup: …
–> The create_loopback function returns the complete command-line feedback from the losetup function
The losetup function might issue a warning which is then part of this returned value
–> the returned value has to be parsed for the /dev/loopX (loopback device) and ONLY this should be part
of the create_loopback – device variable!
e.g: add the following in line 323:
device = str.rstrip(device)
match_device = re.search(r"/dev/loop[01234567]$",str.rstrip(device))
if match_device:
device = match_device.group(0)
else:
print "Error: No loopback device has been found! (check with losetup -a)"
sys.exit(-1)
3:
error: could not reload the partition table from image
–> the partprobe command issued at the end of the create_partition_function will be executed
for all partitions
–> this can return errors for other partitions and end the script execution, therefor modify the partprobe execution in the script:
pp = subprocess.Popen(["partprobe", loopback])
–> This will only execute partprobe for the loopback device
4:
create_partition_table:
Befor the for loop that sets the fdisk commands for the partitions is executed,
fdisk has to be configured to use sectors instead of cylinders:
#set fdisk to use sectors instead of cylinders as unit
cmd = """\
u
"""