cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Visitor
Visitor
278 Views
Registered: ‎08-18-2019

How to override dependency on uramdisk.image.gz in ZynQ and use infact the ext3 partition on Sd card to mount root file system?

Jump to solution

Here is my uboot startup logs and you can see that it looks for uramdisk.image.gz .
However, I don't want it to use uramdisk.image.gz, in fact it should mount root file system partition in sd card with ext3/4 format.
I am using uboot-SPL. What changes I need to do in uEnv.txt so that it doesn't use ramdisk and it uses rootfilesystem of sd card.

U-Boot 2019.01 (Feb 20 2020 - 02:24:41 +0000)

CPU: Zynq 7z010
Silicon: v3.1
Model: Zynq MicroZED Board
DRAM: ECC disabled 1 GiB
MMC: sdhci@e0100000: 0
Loading Environment from SPI Flash... SF: Detected s25fl128s_64k with page size 256 Bytes, erase size 64 KiB, total 16 MiB
OK
In: serial@e0001000
Out: serial@e0001000
Err: serial@e0001000
Net: ZYNQ GEM: e000b000, phyaddr 0, interface rgmii-id
eth0: ethernet@e000b000
Hit any key to stop autoboot: 0
Copying Linux from SD to RAM...
Device: sdhci@e0100000
Manufacturer ID: 41
OEM: 3432
Name: SD4GB-
Bus Speed: 50000000
Mode : SD High Speed (50MHz)
Rd Block Len: 512
SD version 3.0
High Capacity: Yes
Capacity: 3.6 GiB
Bus Width: 4-bit
Erase Group Size: 512 Bytes
Loading bitstream from SD/MMC/eMMC to RAM..
Device: sdhci@e0100000
Manufacturer ID: 41
OEM: 3432
Name: SD4GB
Bus Speed: 50000000
Mode : SD High Speed (50MHz)
Rd Block Len: 512
SD version 3.0
High Capacity: Yes
Capacity: 3.6 GiB
Bus Width: 4-bit
Erase Group Size: 512 Bytes
** Unable to read file uramdisk.image.gz **


Zynq> printenv
baudrate=115200
bitstream_image=system.bit.bin
bitstream_size=0x3DBAFC
bootargs=earlyprintk console=ttyPS0,115200 root=/dev/mmcblk1p2 rw rootwait devtmpfs.mount=1
bootcmd=run $modeboot
bootdelay=3
devicetree_image=devicetree.dtb
devicetree_size=0x20000
ethact=Gem.e000b000
ethaddr=00:0a:35:00:01:22
fdt_high=0x20000000
fdtcontroladdr=3eb2de28
filesize=0x246085
initrd_high=0x20000000
ipaddr=11.11.11.103
jtagboot=echo TFTPing Linux to RAM... && tftp 0x3000000 ${kernel_image} && tftp 0x2A00000 ${devicetree_image} && tftp 0x2000000 ${ramdisk_image} && bootm 0x3000000 0x2000000 0x2A00000
kernel_image=uImage
kernel_size=0x500000
loadbit_addr=0x100000
mmc_loadbit_fat=echo Loading bitstream from SD/MMC/eMMC to RAM.. && mmcinfo && fatload mmc 0 ${loadbit_addr} ${bitstream_image} && fpga load 0 ${loadbit_addr} ${filesize}
modeboot=sdboot
nandboot=echo Copying Linux from NAND flash to RAM... && nand read 0x3000000 0x100000 ${kernel_size} && nand read 0x2A00000 0x600000 ${devicetree_size} && echo Copying ramdisk... && nand read 0x2000000 0x620000 ${ramdisk_size} && bootm 0x3000000 0x2000000 0x2A00000
nfsdir=/home/s/zynq
norboot=echo Copying Linux from NOR flash to RAM... && cp 0xE2100000 0x3000000 ${kernel_size} && cp 0xE2600000 0x2A00000 ${devicetree_size} && echo Copying ramdisk... && cp 0xE2620000 0x2000000 ${ramdisk_size} && bootm 0x3000000 0x2000000 0x2A00000
othbootargs=init=/bin/bash
qspiboot=echo Copying Linux from QSPI flash to RAM... && sf probe 0 0 0 && sf read ${loadbit_addr} 0xC00000 ${bitstream_size} && mw 0xF8007080 0x30800100 0x4 && fpga load 0 ${loadbit_addr} ${bitstream_size} && sf read 0x3000000 0x100000 ${kernel_size} && sf read 0x2A00000 0x600000 ${devicetree_size} && echo Copying ramdisk... && sf read 0x2000000 0x620000 ${ramdisk_size} && bootm 0x3000000 0x2000000 0x2A00000
ramdisk_image=uramdisk.image.gz
ramdisk_size=0x5E0000
sdboot=echo Copying Linux from SD to RAM... && mmcinfo && run mmc_loadbit_fat && fatload mmc 0 0x3000000 ${kernel_image} && fatload mmc 0 0x2A00000 ${devicetree_image} && fatload mmc 0 0x2000000 ${ramdisk_image} && bootm 0x3000000 0x2000000 0x2A00000
serverip=11.11.11.3
silent=n
stderr=serial@e0001000
stdin=serial@e0001000
stdout=serial@e0001000

0 Kudos
1 Solution

Accepted Solutions
Highlighted
Xilinx Employee
Xilinx Employee
217 Views
Registered: ‎09-14-2018

回复: How to override dependency on uramdisk.image.gz in ZynQ and use infact the ext3 partition on Sd card to mount root file system?

Jump to solution

@jshreyas 

You can try with these commands under uboot to see if it boots successfully, 

fatload mmc 0 0x3000000 uImage
fatload mmc 0 0x2A00000 devicetree.dtb
bootm 0x3000000 - 0x2A00000

----------------------------------------------------------------------------------------------
Kindly note- Please mark the Answer as "Accept as solution" if information provided is helpful.

Give Kudos to a post which you think is helpful and reply oriented.
----------------------------------------------------------------------------------------------

 

View solution in original post

7 Replies
Highlighted
Xilinx Employee
Xilinx Employee
248 Views
Registered: ‎09-14-2018

回复: How to override dependency on uramdisk.image.gz in ZynQ and use infact the ext3 partition on Sd card to mount root file system?

Jump to solution

Hi @jshreyas 

 

Firstly are you using petalinux? If so maybe you want to refer to "UG1144/Boot a PetaLinux Image on Hardware with SD Card" for booting with filesystem on EXT4 of a SD card.

Secondly, the error is from the randisk_iamge loading process. You should probably overwrite your boot command with uenvcmd in uEnv.txt

"sdboot=echo Copying Linux from SD to RAM... && mmcinfo && run mmc_loadbit_fat && fatload mmc 0 0x3000000 ${kernel_image} && fatload mmc 0 0x2A00000 ${devicetree_image} && fatload mmc 0 0x2000000 ${ramdisk_image} && bootm 0x3000000 0x2000000 0x2A00000"

 

----------------------------------------------------------------------------------------------
Kindly note- Please mark the Answer as "Accept as solution" if information provided is helpful.

Give Kudos to a post which you think is helpful and reply oriented.
----------------------------------------------------------------------------------------------

 

0 Kudos
Visitor
Visitor
231 Views
Registered: ‎08-18-2019

回复: How to override dependency on uramdisk.image.gz in ZynQ and use infact the ext3 partition on Sd card to mount root file system?

Jump to solution

Thanks and what I should change it to ?

sdboot = ?

0 Kudos
Highlighted
Xilinx Employee
Xilinx Employee
218 Views
Registered: ‎09-14-2018

回复: How to override dependency on uramdisk.image.gz in ZynQ and use infact the ext3 partition on Sd card to mount root file system?

Jump to solution

@jshreyas 

You can try with these commands under uboot to see if it boots successfully, 

fatload mmc 0 0x3000000 uImage
fatload mmc 0 0x2A00000 devicetree.dtb
bootm 0x3000000 - 0x2A00000

----------------------------------------------------------------------------------------------
Kindly note- Please mark the Answer as "Accept as solution" if information provided is helpful.

Give Kudos to a post which you think is helpful and reply oriented.
----------------------------------------------------------------------------------------------

 

View solution in original post

Highlighted
Visitor
Visitor
160 Views
Registered: ‎08-18-2019

回复: How to override dependency on uramdisk.image.gz in ZynQ and use infact the ext3 partition on Sd card to mount root file system?

Jump to solution

Thanks that was pretty helpful, I have moved quite a bit now but still unable to mount the rootfile system. How do I determine what mmcblk0, it should use to mount root file system and what am I missing?

mmc part shows me - 

 

Zynq> mmc part

Partition Map for MMC device 0  --   Partition Type: DOS

Part    Start Sector    Num Sectors     UUID            Type
  1     2048            1433600         f2ccc02a-01     0b Boot
  2     1435648         6133760         f2ccc02a-02     83

 

 

usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
fpga_manager fpga0: Xilinx Zynq FPGA Manager registered
NET: Registered protocol family 10
Segment Routing with IPv6
sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
NET: Registered protocol family 17
can: controller area network core (rev 20170425 abi 9)
NET: Registered protocol family 29
can: raw protocol (rev 20170425)
can: broadcast manager protocol (rev 20170425 t)
can: netlink gateway (rev 20170425) max_hops=1
Registering SWP/SWPB emulation handler
of-fpga-region fpga-full: FPGA Region probed
hctosys: unable to open rtc device (rtc0)
of_cfs_init
of_cfs_init: OK
ALSA device list:
No soundcards found.
Waiting for root device /dev/mmcblk1p2...
mmc0: new high speed SDHC card at address 0003
mmcblk0: mmc0:0003 SD4GB 3.61 GiB
mmcblk0: p1 p2
0 Kudos
Highlighted
Xilinx Employee
Xilinx Employee
147 Views
Registered: ‎09-14-2018

回复: How to override dependency on uramdisk.image.gz in ZynQ and use infact the ext3 partition on Sd card to mount root file system?

Jump to solution

@jshreyas 

Hi,

Seems you have "root=/dev/mmcblk1p2" in your bootargs,

You should change your bootargs to match your setup. I think it should be mmcblk0p2 per your descrition?

0 Kudos
Highlighted
Visitor
Visitor
146 Views
Registered: ‎08-18-2019

回复: How to override dependency on uramdisk.image.gz in ZynQ and use infact the ext3 partition on Sd card to mount root file system?

Jump to solution

It worked after changing.

set bootargs earlyprintk console=ttyPS0,115200 root=/dev/mmcblk0p2 rw rootwait devtmpfs.mount=1

0 Kudos
Highlighted
Visitor
Visitor
143 Views
Registered: ‎08-18-2019

回复: How to override dependency on uramdisk.image.gz in ZynQ and use infact the ext3 partition on Sd card to mount root file system?

Jump to solution
Thanks a lot, that was very helpful.
0 Kudos