Sorry, you need to enable JavaScript to visit this website.

How to copy BOOT.BIN and image.ub over to a SD card?

Zedboard forums is currently read-only while it under goes maintenance.

Solved
3 posts / 0 new
scy86dev
Junior(1)
How to copy BOOT.BIN and image.ub over to a SD card?

I thought this process would be simple so perhaps I'm making a small mistake. It seems that I'm copying these files over to the SD card incorrectly because it's not booting on the MicroZed.
Here's my exact process I've gone through.
Step 1)
I plug my micro sd card into my computer. It comes up as sda.
Step 2)
I'm not sure what's on this card but it is brand new. Regardless I want to start fresh so I startup fdisk
<sudo fdisk /dev/sda
Step 3)
Using fdisk I remove the existing partition (there's only one) by using fdisk's option (d). then I create a new partition with option (n). Finally I enable the bootflag with option (a).
Step 4)
Now I format the partition as fat32
<sudo mkfs -t vfat -F 32 /dev/sda1>
Step 5)
Now I copy the BOOT.BIN and image.ub over to the sd card on this partition by using the dd command like so...

<sudo dd if=/home/scy86dev/petalinux_prjxs/mz7010_fmccc_2018_2/images/linux/BOOT.BIN of=/dev/sda1>

<sudo dd if=/home/scy86dev/petalinux_prjxs/mz7010_fmccc_2018_2/images/linux/image.ub of=/dev/sda1>
Step 6)
Finally i insert the sd card into the microzed. I power on the device and the red and green leds light up but the blue led doesn't. I started up minicom just to be sure and it's not showing anything either.
I am 100% sure the USB/UART driver is installed, minicom is setup correctly, and my jumpers are set correctly on the board. I know this because I can pop in another sd card that has WindRivers Linux on it and it boots just fine. By booting "just fine" I mean the blue led comes on and minicom shows the boot process with a login prompt.
EDIT:
I just currently tried using the <cp ...> command instead of the <dd ...> command. This didn't help any and the same result occurs being it's not booting and the red and green lights are on.
So what am i doing wrong?

JFoster
Moderator(76)
Hi,

Hi,

That is the process for a standard image, create the boot.bin, copy and paste the image to an empty FAT/FAT32 formatted SD Card. Properly eject the device.

Please check the following.

1. If you are using a SD Card not provided with the MicroZed please make sure it meets all requirements which can be found here http://zedboard.org/content/sd-card-advice-zynq-7000-soc-products-0

2. Are you in SD Card boot mode?

3. Can you program the PL over JTAG(Blue LED comes on)

4. What OS are you using?

5. is your MicroZed a 7010 or 7020?

6. What image are you trying to run on it? One we provide or a custom one?

-Josh

scy86dev
Junior(1)
Thanks Josh ~ I think I got

Thanks Josh ~ I think I got it working now finally. I had to do some searching on the Petalinux wiki site. Apparently this sd card needs to be formatted to W95 FAT32 which i guess is different than straight Fat32? I followed the instructions listed below
https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/18841655/Prepare+Boot+Medium
The above instructions were pretty raw in the fact it went above and beyond in configuring the SD card using fdisk's expert mode. However, after I followed the instructions it booted on the first try. There were a few things I was doing wrong such as not formatting to W95 FAT and not mounting and unmounting the sd card appropriately. I also created a second partition in ext4 which is currently  not used. I guess it's Xilinx intention that the ext4 partition "sda2" will be used to expand the rootfs. However, because i've configured it for the QSPI flash the rootfs is expanded there instead. The only partition I'm using is the first one "sda1" which I formatted to W95 FAT and placed the BOOT.BIN and image.ub file in. I also used the <cp ..> command instead of the <dd ...> command when copying the files over to the sd card. I guess the <dd ...> is a byte for byte copy which isn't what I want to do???

For completeness the answers to your questions are...

1) Yes it meets the requirements
2) Yes, as I pointed out in step 3
3) I shouldn't need to utilize JTAG for this and my question was how to boot petalinux on a sd card. However, I went ahead and created a bare metal application just to validate your request and yes I can program over JTAG. It's important to note again as I did in my post that I can successfully boot WindRiver's Linux that came on a sd card when I ordered the board (which toggled the blue led to on). This led me to the question of whether I was formatting the card correctly which led to the creation of this post.
4) Linux, I thought that was obvious from the commands I was using in step 2 through 5. Sorry about that, I'll be sure to list my specs next time.
5) 7010
6) I used the BSP you guys provided which was loaded into Vivado when I created my hardware platform. After I exported my sdk and bitstream I used the petalinux tools to create a custom image.

I believe this post can be closed now. Thanks again!