Forum Discussion
Hi,
Please follow the below link to build the bootloader for Cyclone V.
1.Get hwlibs, install toolchain
cd $TOP_FOLDER
git clone https://github.com/altera-opensource/intel-socfpga-hwlib
cd intel-socfpga-hwlib/tools
./install_linaro.sh
./generate_doxygen.sh
export PATH=`pwd`/gcc/bin:$PATH
2.Build uboot from above shared link for Sd card.
3.Build Application
cd $TOP_FOLDER
cd intel-socfpga-hwlib/examples/CVAV/Altera-SoCFPGA-HardwareLib-Timer-CV-GNU/
# build once to bring hwlibs code
make SEMIHOSTED=0 MEMORY=ddr
# cleanmak
make clean
# change hwlibs link address to match what U-Boot wants
sed -i 's/0x00100040/0x01000040/g' hwlib/src/linkerscripts/cvav-ddr.ld
# move stack out of the way just in case
sed -i 's/0x80000/0x00200000/g' hwlib/src/linkerscripts/cvav-ddr.ld
# build again with the new address
make SEMIHOSTED=0 MEMORY=ddr
# create binary file
arm-eabi-objcopy -O binary application.elf application.bin
# create img file
$TOP_FOLDER/cv_soc_devkit_ghrd/software/bootloader/u-boot-socfpga/tools/
mkimage -A arm -T standalone -C none -a 0x01000040 -e 0x01000040 -n "bare-metal image" -d application.bin application.img
4.Build Image
cd $TOP_FOLDER
cat cv_soc_devkit_ghrd/software/bootloader/u-boot-socfpga/spl/u-boot-splx4.sfp \
intel-socfpga-hwlib/examples/CVAV/Altera-SoCFPGA-HardwareLib-Timer-CV-GNU/application.img \
> final-image.bin
5.create Sd card image
cd $TOP_FOLDER/sd_card
cp ../cv_soc_devkit_ghrd/software/bootloader/u-boot-socfpga/final-image.bin .
cd $TOP_FOLDER/sd_card
sudo python3 ./make_sdimage_p3.py -f \
-P final-image.bin,num=3,format=raw,size=10M,type=A2 -s 80M -n sdimage.img
6.Creating SD Card on Windows-
https://www.rocketboards.org/foswiki/Documentation/CycloneVSoCGSRD#Creating_SD_Card
Let me know if you have any other query on this.
Regards
Tiwari
- CAlex2 years ago
Contributor
Hi
"
# change hwlibs link address to match what U-Boot wants
sed -i 's/0x00100040/0x01000040/g' hwlib/src/linkerscripts/cvav-ddr.ld
# move stack out of the way just in case
sed -i 's/0x80000/0x00200000/g' hwlib/src/linkerscripts/cvav-ddr.ld
# build again with the new address
make SEMIHOSTED=0 MEMORY=ddr
"
Is that the code that let the SPL start from vfat?
Could you please explain the use of those four addresses?
I guess 0x00100040 is the -a and 0x01000040(is that related to the spl?) is the -e address for mkimage?
What is the function of 0x80000 and 0x00200000? And how you get these addresses?
Sorry for the dumn questions, and sorry for the thread confusion.
This thread is not related to the other for I tried this in different ways.
Thank you for your reply.
Reguards.