sahandKashani / SoC-FPGA-Design-Guide

Tutorial for using the DE1-SoC/DE0-Nano-SoC boards for bare-metal and linux programming
The Unlicense
64 stars 17 forks source link

creating target sdcard artifacts #3

Closed nuraalkhateeb closed 8 years ago

nuraalkhateeb commented 8 years ago

Hi Sahand,

If you don't mind explaining how the command

cp DE1_SoC_demo/sw/hps/preloader/preloader-mkimage.bin DE1_SoC_demo/sdcard/a2/preloader-mkimage.bin

is being copied to the sdcard. I'm currently unable to access the sdcard.

I know there is a script to automate all of these steps but I've made several changes and that's why I need to run each command separately.

Any help would be greatly appreciated. Thank you, ~Nora

sahandKashani commented 8 years ago

Hi,

I am not writing to the sdcard with the command you are showing. If you look at the project folder structure in chapter 8.5, you will see that sdcard/a2 and sdcard/fat32 are just a standard directories.

During the whole tutorial, I write all final binaries to this folder, and it is only at the very end (in chapter 13.5) that everything is actually written to the sdcard.

You can also see this in the script provided with the project.

compile_quartus_project
compile_preloader
compile_uboot
compile_linux
create_rootfs

if [ ! -b "${sdcard_dev}" ]; then
    usage
    echoerr "Error: could not find block device at \"${sdcard_dev}\""
    exit 1
fi

partition_sdcard
write_sdcard # <--

Note that the script is not hard-coded. It works with any hardware setup assuming you have everything set up in Quartus correctly, and that you only have 1 top-level Qsys design.

nuraalkhateeb commented 8 years ago

Thanks for clarifying, I hadn't realized that before. I'll continue following through the tutorial and hopefully, won't have any more issues.