UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Observer scy86dev
Observer
1,102 Views
Registered: ‎11-01-2018

How do I prepare my SD card now?

Jump to solution

I have created a basic hardware platform in Vivado and exported the sdk and bitstream file. These files reside in my vivado projects folder as such...

/home/scy86dev/vivado_prjxs/MicroZed_Basic_System/MicroZed_Basic_System.sdk/System.wrapper.hdf
/home/scy86dev/vivado_prjxs/MicroZed_Basic_System/MicroZed_Basic_System.runs/impl_1/System_wrapper.bit

I have then ran the following petalinux tools...

petalinux-create -t project -s ~/Downloads/_PETALINUX_BACKUPS/mz7010_fmccc_2018_2.bsp
cd mz7010_fmccc_2018_2/
petalinux-config --get-hw-description=/home/scy86dev/vivado_prjxs/MicroZed_Basic_System/MicroZed_Basic_System.sdk
petalinux-config -c rootfs
petalinux-config -c kernel
petalinux-build

At this moment I'm confused on how to proceed. Would someone help me out by clearing up the following questions.

1) What do I do next now to get petalinux on a sdcard to boot?

2) Do I have to use vivado's XSDK tool? Can I instead use a script or command on the command line?

 

0 Kudos
1 Solution

Accepted Solutions
Voyager
Voyager
1,017 Views
Registered: ‎01-28-2008

Re: How do I prepare my SD card now?

Jump to solution

@scy86dev

  Yes, you should be mounting the /dev/sda1 partition before you copy the files; I missed that detail. To mount, use the

$ sudo mount -t vfat /dev/sda1 /mnt/sdcard

  Make sure to create the /mnt/sdcard directory first with the proper permissions (i.e. chmod 777 /mnt/sdcard). Then you'd copy the files to the  /mnt/sdcard directory, and unmount before removing the SD card.

Thanks,

-Pat

 

https://tuxengineering.com
0 Kudos
5 Replies
Moderator
Moderator
1,072 Views
Registered: ‎12-04-2016

Re: How do I prepare my SD card now?

Jump to solution

Hi 

Run this command to generate BOOT.bin

petalinux-package --boot --fsbl images/linux/zynq_fsbl.elf  --fpga images/linux/System_wrapper.bit --u-boot

The FIT image file image.ub resides in images/linux

Copy the BOOT.bin & image.ub to SD card and boot 

 

 

0 Kudos
Observer scy86dev
Observer
1,046 Views
Registered: ‎11-01-2018

Re: How do I prepare my SD card now?

Jump to solution

I appreciate the reply but that's not the answer I was looking for so perhaps I wasn't as specific as I should of been.

Something is not working out for me when I copy these two files over to the SD card. The microzed board never boots. I have another SD card with the WindRiver linux image and it boots fine. Therefore, I know my jumper cables are correct.

Here is the process I'm going through from partitioning/formatting to copying the files over.

Step 1)
I plug my micro sd card into my computer. It comes up as sda

Step 2)
I start up fdisk

sudo fdisk /dev/sda

Step 3)
Using fdisk I remove the one and only partition there currently is by selecting 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 commands as such...

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

Step 6)
Now 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 also startup minicom just to be sure and there is no output shown there either.

I know for a fact that my jumpers are correct because I can boot WindRivers linux on a sd card just fine. Therefore, it's something I'm doing wrong with copying these files over.

0 Kudos
Voyager
Voyager
1,038 Views
Registered: ‎01-28-2008

Re: How do I prepare my SD card now?

Jump to solution

@scy86dev

  Have you tried a simple copy (i.e. cp) command to move those files into the SD card? The dd command will make an image of the .bin onto the card, likely overwriting the entire partition.

  In other words:

$ cp /home/scy86dev/petalinux_prjxs/mz7010_fmccc_2018_2/images/linux/BOOT.BIN /dev/sda1
$ cp /home/scy86dev/petalinux_prjxs/mz7010_fmccc_2018_2/images/linux/image.ub /dev/sda1

Thanks,

-Pat

 

https://tuxengineering.com
0 Kudos
Observer scy86dev
Observer
1,026 Views
Registered: ‎11-01-2018

Re: How do I prepare my SD card now?

Jump to solution

Yes, I just tried this and got the same result being it's not booting. For completeness I tried the following commands...

1) Plugged in the sd card

2) Ran fdisk <sudo fdisk /dev/sda>

3) Using fdisk I deleted the current partition, created a new one, and then enabled the bootable flag.

4) reformatted as fat 32 <sudo mkfs -t vfat -F 32 /dev/sda1>

5) copied files over to it as you suggested using the <cp source destination> command

6) Plugged the sd card into microzed

This resulted in the same red and green led being on and nothing booted. Should I be using the mount and umount commands during any of this because I'm not.

0 Kudos
Voyager
Voyager
1,018 Views
Registered: ‎01-28-2008

Re: How do I prepare my SD card now?

Jump to solution

@scy86dev

  Yes, you should be mounting the /dev/sda1 partition before you copy the files; I missed that detail. To mount, use the

$ sudo mount -t vfat /dev/sda1 /mnt/sdcard

  Make sure to create the /mnt/sdcard directory first with the proper permissions (i.e. chmod 777 /mnt/sdcard). Then you'd copy the files to the  /mnt/sdcard directory, and unmount before removing the SD card.

Thanks,

-Pat

 

https://tuxengineering.com
0 Kudos