Project

General

Profile

Booting board with Non-Removable SD card

Added by Brian Wentworth about 8 years ago

How would I go about writing a custom SoC HPS image that I have created to use on the dev board (containing the linux kernel, preloader, U-Boot, rootfs etc..) to the SD/MMC memory which would be blank with no files and SD card is NON-REMOVABLE/fixed , so it cannot be removed to write any files directly from the computer?

Essentially, I want to bring up the entire FPGA design and Linux operating system without removing the SD card, with the SD card being initially blank.

What would be the best approach to accomplish this task?

I have the Critical Link MitySOM-5cse-l2-3y8 dev board.

Thanks,

Brian


Replies (5)

RE: Booting board with Non-Removable SD card - Added by Daniel Vincelette about 8 years ago

Hello Brian,

This is a good question and a normal question for customers that would like to put eMMC on their baseboard.

The recommended way to do this would be to store the preloader and U-Boot in the QSPI NOR flash that is on the SOM. All the other components (FPGA, kernel, rootfs, DTB) can be stored on the MMC device. The reason why the preloader and U-Boot would go into NOR flash is because Altera has a command line utility called quartus_hps, which allows for loading an image into the QSPI flash over JTAG. Another option would be to program the QSPI NOR in another baseboard that boots from a valid SD card and have that program the NOR flash.

Once the QSPI NOR is programmed and you can get to U-Boot, programming the eMMC from U-Boot would be fairly straight forward. At the U-Boot level you would have access to network or the console port to get the second image with the FPGA/DTB/kernel/rootfs and copy those into the eMMC.

Here are some notes:
  • BSEL (boot select pin) must be set to boot from QSPI
  • The preloader must be built to boot U-Boot from QSPI not MMC
  • The MitySOM-5CSE-L2-3Y8 has 16MB of QSPI NOR, which is way more than needed for the preloader and U-Boot but not really enough to store all the other components
  • Using quartus_hps and JTAG is fairly slow at programming U-Boot/preloader, this usually takes ~6 minutes

Here are some references:
Utilizing QSPI NOR Memory
Building u-Boot and Preloader
First (CS0) Bootable NOR Flash Memory Map

I hope this post is helpful and let me know if there is anything I can clarify better.

Dan

RE: Booting board with Non-Removable SD card - Added by Brian Wentworth about 8 years ago

Hi Dan,

Thanks for the direction on this. I cant seem to get the Kernel to boot. I have successfully loaded pre-loader and u-boot over QSPI via making the boot_image.bin. I can TFTP the Kernel and .dtb to the board. But the Kernel hangs after ""Starting Kernel... Uncompressing Linux... done, booting the kernel.""

--NFS is enabled in Kernel build

The boot environment is modified as follows to utilize TFTP and NFS.

nfsboot=setenv bootargs console=ttyS0,115200 root=/dev/nfs nfsroot=192.168.7.22:/export/users ip=192.168.7.1:192.1 68.7.22:192.168.255.255:255.255.0.0:socfpga:eth0:off;bootm 0x7fc0 - 0x00000100
nfsdir=/export/users
nfsip=192.168.7.22
nfsipopt=192.168.7.1:192.168.7.22:192.168.255.255:255.255.0.0:socfpga:eth0:off
nfsroot=/dev/nfs

I feel like this is a simple configuration issue. I just haven't been able to isolate the problem.

Any help would be much appreciated.

The boot terminal output is attached to this post.

Thanks,

Brian

RE: Booting board with Non-Removable SD card - Added by Daniel Vincelette about 8 years ago

Hi Brian,

I've seen this behavior happen if the FPGA isn't programmed and the DTS is trying to use soft IP cores in the FPGA. If you are still using the dtb we provide for the dev kit, we use soft GPIO cores in the FPGA and the kernel will try to talk to them during boot up, which if the FPGA isn't configured it will hang the processor.

Dan

RE: Booting board with Non-Removable SD card - Added by Brian Wentworth about 8 years ago

Dan,

Thanks so much!! Removed my soft IP from the .dts and generated new .dtb to transfer via TFTP with the Kernel. Ran nfsboot and Linux booted as expected. From there, I was successful in transferring the custom files from the NFS to the eMMC with the dd command from the linux terminal in putty. Restarted the board with boot select pins to boot from eMMC and my custom configuration (per-loader, u-boot, Kernel, dtb, rbf, etc.. boots properly..

Thanks again for the support!

Brian

RE: Booting board with Non-Removable SD card - Added by Daniel Vincelette about 8 years ago

You're welcome! Glad to hear you got it up and running!

Dan

    (1-5/5)
    Go to top
    Add picture from clipboard (Maximum size: 1 GB)