cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
bhoevding
Contributor
Contributor
1,872 Views
Registered: ‎05-02-2019

Custom RootFS on Zynq UltraScale+ (ZU3EG)

Jump to solution

Hello Everyone,

at the moment I am trying to boot a custom RootFS (Ubuntu or Debian) on the Avnet Starter Kit UltraZed EG. I have built a basic block design in Vivado and imported the bitstream into PetaLinux. With the Ref. Manual (UG1144) I have been able to create a project and generate all necesseary files for booting.

Currently I am working with the Vivado WebPACK 2018.3, SDK 2018.3 & PetaLinux 2018.3 Toolchain.

After Power on, the boot process gets stuck with the following line (last line in attachment):

 

Waiting for root device /dev/mmcblk1p2...

I have also worked through the following Post: Not-able-to-mount-root-fs-during-SD-boot-in-Ultrazed-MPSoC but none of the presented ideas and solutions worked out for my case. 

Additionaly I have formated the µSD into two partions using fdisk. The first partition contains the image.ub, Image, system.dtb and BOOT.bin. The second partition contains an extracted RootFS (bin, boot, dev, ...).

Also within PetaLinux I have set the Configuration to:

$ petalinux-config 

--Subsystem AUTO Hardware Settings 
--> Advance bootable images storage Settings 

---> boot image settings 
----> primary SD card

---> u-boot env partition 
----> primary flash

---> kernel image 
----> primary sd

---> jffs2 
----> primary flash

---> dtb image settings 
----> primary sd

--Image Packaging Configuration

--> Root filesystem type 
----> SD card

I have also tried to change the boot args for U-boot with a uEnv.txt but the boot process still get stuck.

Please write a comment if you have an idea what the issue could be, or if you need more information regarding my setup. I have spend quite some time with this problem and really hope that someone can help me out with their expertise.

regards,

Bjørn

 

0 Kudos
1 Solution

Accepted Solutions
bhoevding
Contributor
Contributor
1,847 Views
Registered: ‎05-02-2019

Hello @aravindb,

first of all thanks for your fast response.

I have tried the steps which were listed in your link: petalinx-sd-mmcblk0p2-rootfs, but still had no success booting a different RootFS on the UltraZed. The boot log, following the recommendations in the link can be seen in the attached file "boot_issue.log". Unfortunately the Kernel couldnt start anymore. Furthermore I could find one more problem during the boot Sequence beeing the eMMC device, which is always selected regardless of the u-boot commands used in the link above.

emmc_Bootdevice.png

 

 

 

 

 

 

 

 

 

 

 

Due to that I configured U-boot with the following commands which successfully change the device for booting:

ZynqMP> env default -f -a

ZynqMP> env set sd_dev 1'

ZynqMP> env save

Additionally I have been trying other configurations within PetaLinux, but the most persistent issue is the following:

Unable to mount root fs on unkown-block(179,34)

[12:28:14:540] [    4.044830] VFS: Cannot open root device "mmcblk1p2" or unknown-block(179,34): error -30
[12:28:14:540] [    4.052850] Please append a correct "root=" boot option; here are the available partitions:
[12:28:14:540] [    4.061183] 0100           65536 ram0 
[12:28:14:540] [    4.061186]  (driver?)
[12:28:14:563] [    4.067253] 0101           65536 ram1 
[12:28:14:563] [    4.067255]  (driver?)
[12:28:14:563] [    4.073322] 0102           65536 ram2 
[12:28:14:563] [    4.073324]  (driver?)
[12:28:14:563] [    4.079403] 0103           65536 ram3 
[12:28:14:563] [    4.079405]  (driver?)
[12:28:14:563] [    4.085479] 0104           65536 ram4 
[12:28:14:585] [    4.085480]  (driver?)
[12:28:14:585] [    4.091555] 0105           65536 ram5 
[12:28:14:585] [    4.091556]  (driver?)
[12:28:14:585] [    4.097631] 0106           65536 ram6 
[12:28:14:585] [    4.097633]  (driver?)
[12:28:14:585] [    4.103702] 0107           65536 ram7 
[12:28:14:585] [    4.103704]  (driver?)
[12:28:14:585] [    4.109783] 0108           65536 ram8 
[12:28:14:607] [    4.109785]  (driver?)
[12:28:14:607] [    4.115854] 0109           65536 ram9 
[12:28:14:607] [    4.115856]  (driver?)
[12:28:14:607] [    4.121937] 010a           65536 ram10 
[12:28:14:607] [    4.121938]  (driver?)
[12:28:14:607] [    4.128093] 010b           65536 ram11 
[12:28:14:607] [    4.128095]  (driver?)
[12:28:14:629] [    4.134261] 010c           65536 ram12 
[12:28:14:629] [    4.134262]  (driver?)
[12:28:14:629] [    4.140419] 010d           65536 ram13 
[12:28:14:629] [    4.140420]  (driver?)
[12:28:14:629] [    4.146587] 010e           65536 ram14 
[12:28:14:629] [    4.146588]  (driver?)
[12:28:14:629] [    4.152745] 010f           65536 ram15 
[12:28:14:652] [    4.152746]  (driver?)
[12:28:14:652] [    4.158915] 1f00           19840 mtdblock0 
[12:28:14:652] [    4.158917]  (driver?)
[12:28:14:652] [    4.165422] 1f01             256 mtdblock1 
[12:28:14:652] [    4.165424]  (driver?)
[12:28:14:652] [    4.171928] 1f02           23552 mtdblock2 
[12:28:14:652] [    4.171929]  (driver?)
[12:28:14:674] [    4.178443] b300         7438336 mmcblk0 
[12:28:14:674] [    4.178445]  driver: mmcblk
[12:28:14:674] [    4.185209]   b301          250040 mmcblk0p1 00000000-01
[12:28:14:674] [    4.185211] 
[12:28:14:674] [    4.191978] b318            4096 mmcblk0rpmb 
[12:28:14:674] [    4.191980]  (driver?)
[12:28:14:674] [    4.198667] b310           16384 mmcblk0boot1 
[12:28:14:696] [    4.198669]  (driver?)
[12:28:14:696] [    4.205438] b308           16384 mmcblk0boot0 
[12:28:14:696] [    4.205439]  (driver?)
[12:28:14:696] [    4.212203] b320         7761920 mmcblk1 
[12:28:14:696] [    4.212205]  driver: mmcblk
[12:28:14:696] [    4.218979]   b321          102400 mmcblk1p1 caa86b4e-01
[12:28:14:718] [    4.218980] 
[12:28:14:718] [    4.225749]   b322         7658496 mmcblk1p2 caa86b4e-02
[12:28:14:718] [    4.225750] 
[12:28:14:718] [    4.232514] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(179,34)
[12:28:14:718] [    4.241027] CPU: 1 PID: 1 Comm: swapper/0 Tainted: G        W       4.14.0-xilinx-v2018.2 #1
[12:28:14:740] [    4.249442] Hardware name: xlnx,zynqmp (DT)
[12:28:14:740] [    4.253606] Call trace:
[12:28:14:740] [    4.256045] [<ffffff8008088bd0>] dump_backtrace+0x0/0x368
[12:28:14:740] [    4.261422] [<ffffff8008088f4c>] show_stack+0x14/0x20
[12:28:14:740] [    4.266457] [<ffffff8008a11f78>] dump_stack+0x9c/0xbc
[12:28:14:763] [    4.271491] [<ffffff800809bdc0>] panic+0x11c/0x274
[12:28:14:763] [    4.276265] [<ffffff8008d510a8>] mount_block_root+0x1a8/0x27c
[12:28:14:763] [    4.281993] [<ffffff8008d513b4>] mount_root+0x11c/0x134
[12:28:14:763] [    4.287200] [<ffffff8008d5152c>] prepare_namespace+0x160/0x1a8
[12:28:14:785] [    4.293016] [<ffffff8008d50cc8>] kernel_init_freeable+0x1b8/0x1d8
[12:28:14:785] [    4.299093] [<ffffff8008a242e0>] kernel_init+0x10/0x100
[12:28:14:785] [    4.304300] [<ffffff8008084a08>] ret_from_fork+0x10/0x18
[12:28:14:785] [    4.309595] SMP: stopping secondary CPUs
[12:28:14:806] [    4.313500] Kernel Offset: disabled
[12:28:14:806] [    4.316970] CPU features: 0x002004
[12:28:14:806] [    4.320355] Memory Limit: none
[12:28:14:806] [    4.323397] ---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(179,34)

The problem here lies within the dtb. Thanks to this post UltraZed_SD_Boot I was able to solve my problem using PetaLinux V2018.2 . Chances are good that this will also work with 2018.3 .

The partitions seem to be fine like this as well.

Partition listPartition list

- /dev/sdb
-- sdb1: boot (100 MB)
   > BOOT.bin
   > image.ub
-- sdb2 - root (7.7 GB)
   > bin/
   > boot/
   > ...

Thanks @aravindb  for adding your thoughts

Regards,

Bjørn

View solution in original post

0 Kudos
2 Replies
aravindb
Moderator
Moderator
1,863 Views
Registered: ‎02-07-2018

HI @bhoevding 

Looks it is waiting on mmcblk1p2 due to wrong bootargs i hope. You should provide the mmcblk0p2 instead  mmcblk1p2.

Could you please follow the steps mentioned in this link for picking the rootfs from sdcard 2nd partition.

https://forums.xilinx.com/t5/Embedded-Linux/petalinx-sd-mmcblk0p2-rootfs/m-p/963968#M33097

 

Thanks & ergards

Aravind

----------------------------------------------------------------------------------------------
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
bhoevding
Contributor
Contributor
1,848 Views
Registered: ‎05-02-2019

Hello @aravindb,

first of all thanks for your fast response.

I have tried the steps which were listed in your link: petalinx-sd-mmcblk0p2-rootfs, but still had no success booting a different RootFS on the UltraZed. The boot log, following the recommendations in the link can be seen in the attached file "boot_issue.log". Unfortunately the Kernel couldnt start anymore. Furthermore I could find one more problem during the boot Sequence beeing the eMMC device, which is always selected regardless of the u-boot commands used in the link above.

emmc_Bootdevice.png

 

 

 

 

 

 

 

 

 

 

 

Due to that I configured U-boot with the following commands which successfully change the device for booting:

ZynqMP> env default -f -a

ZynqMP> env set sd_dev 1'

ZynqMP> env save

Additionally I have been trying other configurations within PetaLinux, but the most persistent issue is the following:

Unable to mount root fs on unkown-block(179,34)

[12:28:14:540] [    4.044830] VFS: Cannot open root device "mmcblk1p2" or unknown-block(179,34): error -30
[12:28:14:540] [    4.052850] Please append a correct "root=" boot option; here are the available partitions:
[12:28:14:540] [    4.061183] 0100           65536 ram0 
[12:28:14:540] [    4.061186]  (driver?)
[12:28:14:563] [    4.067253] 0101           65536 ram1 
[12:28:14:563] [    4.067255]  (driver?)
[12:28:14:563] [    4.073322] 0102           65536 ram2 
[12:28:14:563] [    4.073324]  (driver?)
[12:28:14:563] [    4.079403] 0103           65536 ram3 
[12:28:14:563] [    4.079405]  (driver?)
[12:28:14:563] [    4.085479] 0104           65536 ram4 
[12:28:14:585] [    4.085480]  (driver?)
[12:28:14:585] [    4.091555] 0105           65536 ram5 
[12:28:14:585] [    4.091556]  (driver?)
[12:28:14:585] [    4.097631] 0106           65536 ram6 
[12:28:14:585] [    4.097633]  (driver?)
[12:28:14:585] [    4.103702] 0107           65536 ram7 
[12:28:14:585] [    4.103704]  (driver?)
[12:28:14:585] [    4.109783] 0108           65536 ram8 
[12:28:14:607] [    4.109785]  (driver?)
[12:28:14:607] [    4.115854] 0109           65536 ram9 
[12:28:14:607] [    4.115856]  (driver?)
[12:28:14:607] [    4.121937] 010a           65536 ram10 
[12:28:14:607] [    4.121938]  (driver?)
[12:28:14:607] [    4.128093] 010b           65536 ram11 
[12:28:14:607] [    4.128095]  (driver?)
[12:28:14:629] [    4.134261] 010c           65536 ram12 
[12:28:14:629] [    4.134262]  (driver?)
[12:28:14:629] [    4.140419] 010d           65536 ram13 
[12:28:14:629] [    4.140420]  (driver?)
[12:28:14:629] [    4.146587] 010e           65536 ram14 
[12:28:14:629] [    4.146588]  (driver?)
[12:28:14:629] [    4.152745] 010f           65536 ram15 
[12:28:14:652] [    4.152746]  (driver?)
[12:28:14:652] [    4.158915] 1f00           19840 mtdblock0 
[12:28:14:652] [    4.158917]  (driver?)
[12:28:14:652] [    4.165422] 1f01             256 mtdblock1 
[12:28:14:652] [    4.165424]  (driver?)
[12:28:14:652] [    4.171928] 1f02           23552 mtdblock2 
[12:28:14:652] [    4.171929]  (driver?)
[12:28:14:674] [    4.178443] b300         7438336 mmcblk0 
[12:28:14:674] [    4.178445]  driver: mmcblk
[12:28:14:674] [    4.185209]   b301          250040 mmcblk0p1 00000000-01
[12:28:14:674] [    4.185211] 
[12:28:14:674] [    4.191978] b318            4096 mmcblk0rpmb 
[12:28:14:674] [    4.191980]  (driver?)
[12:28:14:674] [    4.198667] b310           16384 mmcblk0boot1 
[12:28:14:696] [    4.198669]  (driver?)
[12:28:14:696] [    4.205438] b308           16384 mmcblk0boot0 
[12:28:14:696] [    4.205439]  (driver?)
[12:28:14:696] [    4.212203] b320         7761920 mmcblk1 
[12:28:14:696] [    4.212205]  driver: mmcblk
[12:28:14:696] [    4.218979]   b321          102400 mmcblk1p1 caa86b4e-01
[12:28:14:718] [    4.218980] 
[12:28:14:718] [    4.225749]   b322         7658496 mmcblk1p2 caa86b4e-02
[12:28:14:718] [    4.225750] 
[12:28:14:718] [    4.232514] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(179,34)
[12:28:14:718] [    4.241027] CPU: 1 PID: 1 Comm: swapper/0 Tainted: G        W       4.14.0-xilinx-v2018.2 #1
[12:28:14:740] [    4.249442] Hardware name: xlnx,zynqmp (DT)
[12:28:14:740] [    4.253606] Call trace:
[12:28:14:740] [    4.256045] [<ffffff8008088bd0>] dump_backtrace+0x0/0x368
[12:28:14:740] [    4.261422] [<ffffff8008088f4c>] show_stack+0x14/0x20
[12:28:14:740] [    4.266457] [<ffffff8008a11f78>] dump_stack+0x9c/0xbc
[12:28:14:763] [    4.271491] [<ffffff800809bdc0>] panic+0x11c/0x274
[12:28:14:763] [    4.276265] [<ffffff8008d510a8>] mount_block_root+0x1a8/0x27c
[12:28:14:763] [    4.281993] [<ffffff8008d513b4>] mount_root+0x11c/0x134
[12:28:14:763] [    4.287200] [<ffffff8008d5152c>] prepare_namespace+0x160/0x1a8
[12:28:14:785] [    4.293016] [<ffffff8008d50cc8>] kernel_init_freeable+0x1b8/0x1d8
[12:28:14:785] [    4.299093] [<ffffff8008a242e0>] kernel_init+0x10/0x100
[12:28:14:785] [    4.304300] [<ffffff8008084a08>] ret_from_fork+0x10/0x18
[12:28:14:785] [    4.309595] SMP: stopping secondary CPUs
[12:28:14:806] [    4.313500] Kernel Offset: disabled
[12:28:14:806] [    4.316970] CPU features: 0x002004
[12:28:14:806] [    4.320355] Memory Limit: none
[12:28:14:806] [    4.323397] ---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(179,34)

The problem here lies within the dtb. Thanks to this post UltraZed_SD_Boot I was able to solve my problem using PetaLinux V2018.2 . Chances are good that this will also work with 2018.3 .

The partitions seem to be fine like this as well.

Partition listPartition list

- /dev/sdb
-- sdb1: boot (100 MB)
   > BOOT.bin
   > image.ub
-- sdb2 - root (7.7 GB)
   > bin/
   > boot/
   > ...

Thanks @aravindb  for adding your thoughts

Regards,

Bjørn

View solution in original post

0 Kudos