Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Question about Booting ZCU012 using XZD
#1
Hi,

I am in Section 4.2 (Booting the ZCU012), step 1, sub-step c.  This particular step is to convert/copy dom0,img to SD card via "dd" command.  The whole SD card becomes dom0 file system.  When ZCU102 boots up, it uses SD card as the file system.

We would like to install dom0 in RAM disk instead of SD card.  Any suggestion to achieve that ?

Thanks,

Ching-Ho Cheng
Reply
#2
Hello Ching-Ho,

Just to clarify, we do intentionally make the dom0 FS large as we typically store the image files for the domU (guest) file systems inside the dom0 FS as that's the easiest way for most people to access them.

That being said, booting from a RAM disk based dom0 is possible.  You can create your own RAM FS, or you can configure peta-linux to generate an initramfs for you by executing:
Code:
petalinux-config
Then under "Image Packaging Configuration ---> Root filesystem type" select "INITRAMFS".  You will also need to make sure that you RAM FS image includes the correct version of the Xen tools,  the XZD user manual contains an example of how to compile the tools.

Once you have a RAM FS image, you will also need to configure your dom0 Linux kernel to support booting from a RAM FS.  To do this, execute: 

Code:
petalinux-config -c kernel
Inside the kernel config, under "General Setup", enable the "Initial RAM filesystem and RAM disk (initramfs/initrd) support" option.  Then set the path under the "Initramfs source file(s)" option that appears to the initramfs image generated by petalinux or the one you created yourself.

Next you will need to modify the "dom0 bootargs" line inside the device tree blob to point the dom0 kernel at the RAM FS.  That can be done by using the the dtc command in Linux to convert the existing .dtb file into a .dts, making the necessary changes, and then converting it back  to a .dtb file.  There's an example of modifying a .dtb file in the XZD User Manual in the device pass-through section.

Keep in mind that because you're dom0 FS is now in RAM, you'll obviously want to keep it relatively small, so I'd recommend moving your domU FS image files to an SD card. Those can be either raw image files like demonstrated in the XZD user manual, or you could also use LVM volumes.  Keep in mind that if you want to use LVM volumes, your dom0 FS will need the necessary tools/apps installed to interact with them.

Finally you will also have to update you domU .cfg files to point to the FS image files on the SD card.


You may have to fill in some details in the above info, but this process should get you started in the right direction.

Thanks,

Josh
Reply
#3
Josh,

Thank you for the response.  We will look into that.

However, we were following the boot of Dom0 using ZCU102 eval board and encountered File system not found problem.  We followed the instruction in Section 4.2 and created Dom0 file system in 8G SD card via step 1, sub-step C.

We could see the file system in SD card after it was created.  After executed the .tcl script file using xsdb, we stopped U-Boot and entered serverip, gatewayip, netmask and ipaddr.  Then we ran "run xen".

Error occurred when it tried to mount the file system:

[    3.399469] Waiting 1 sec before mounting root device...
[    3.593100] mmc0: error -110 whilst initialising SD card
[    4.406465] VFS: Cannot open root device "mmcblk0p1" or unknown-block(0,0): error -6
[    4.408642] Please append a correct "root=" boot option; here are the available partitions:

In U-Boot, we could see the SD card:

ZynqMP> mmcinfo
mmcinfo
Device: zynq_sdhci
Manufacturer ID: 3
OEM: 5344
Name: SS08G 
Tran Speed: 50000000
Rd Block Len: 512
SD version 3.0
High Capacity: Yes
Capacity: 7.4 GiB
Bus Width: 4-bit
Erase Group Size: 512 Bytes
ZynqMP> 

Did we miss anything in Section 4.2 ?

Any help is appreciated.

Thanks,

Ching-Ho Cheng
Reply
#4
Ching-Ho,

What version of ZCU102 do you have?

-Jarvis
Reply
#5
(03-01-2016, 05:41 PM)jarvis_roach Wrote: Ching-Ho,

What version of ZCU102 do you have?

-Jarvis
Jarvis,

We were using Rev C.1 eval board.  We have another eval board to try.  That one is Rev B.4.  We will try the Rev B.4 board and let you know the outcome....

Update: we tried Rev B.4 eval board, same error about the initialization of SD card slot;  hence not able to mount root fs.


Thanks,

Ching-Ho
Reply
#6
Ching-Ho,

If you place your SD Card into your host machine, can you mount it and see a filesystem?

If not, the SD card may have not been unmounted correctly.

Thanks,
Robbie VanVossen
Reply
#7
(03-01-2016, 08:19 PM)Robert.VanVossen Wrote: Ching-Ho,

If you place your SD Card into your host machine, can you mount it and see a filesystem?

If not, the SD card may have not been unmounted correctly.

Thanks,
Robbie VanVossen

Robbie,

When we put the micro-SD card into USB adapter and then inserted USB adapter into host system (running Ubuntu 14.04 LTS), file system in micro-SD card could be seen.

We have a couple screenshots of the SD card properties for your investigation.

Thanks,

Ching-Ho


Attached Files Thumbnail(s)
       
Reply
#8
(03-01-2016, 06:55 PM)lcc014 Wrote:
(03-01-2016, 05:41 PM)jarvis_roach Wrote: Ching-Ho,

What version of ZCU102 do you have?

-Jarvis
Jarvis,

We were using Rev C.1 eval board.  We have another eval board to try.  That one is Rev B.4.  We will try the Rev B.4 board and let you know the outcome....

Update: we tried Rev B.4 eval board, same error about the initialization of SD card slot;  hence not able to mount root fs.


Thanks,

Ching-Ho

Ching-Ho,

We have a Rev A board, so that is a potential source of concern. We're still investigating.

Regards,


-Jarvis

(03-01-2016, 08:54 PM)lcc014 Wrote:
(03-01-2016, 08:19 PM)Robert.VanVossen Wrote: Ching-Ho,

If you place your SD Card into your host machine, can you mount it and see a filesystem?

If not, the SD card may have not been unmounted correctly.

Thanks,
Robbie VanVossen

Robbie,

When we put the micro-SD card into USB adapter and then inserted USB adapter into host system (running Ubuntu 14.04 LTS), file system in micro-SD card could be seen.

We have a couple screenshots of the SD card properties for your investigation.

Thanks,

Ching-Ho
Ching-Ho,

Can you confirm you copied the correct .dtb file to your /tftpboot/ directory? Does `cat /tftpboot/xen.dtb | grep rootdelay` return anything?

-Jarvis
Reply
#9
(03-02-2016, 03:17 PM)jarvis_roach Wrote:
(03-01-2016, 06:55 PM)lcc014 Wrote:
(03-01-2016, 05:41 PM)jarvis_roach Wrote: Ching-Ho,

What version of ZCU102 do you have?

-Jarvis
Jarvis,

We were using Rev C.1 eval board.  We have another eval board to try.  That one is Rev B.4.  We will try the Rev B.4 board and let you know the outcome....

Update: we tried Rev B.4 eval board, same error about the initialization of SD card slot;  hence not able to mount root fs.


Thanks,

Ching-Ho

Ching-Ho,

We have a Rev A board, so that is a potential source of concern. We're still investigating.

Regards,


-Jarvis

(03-01-2016, 08:54 PM)lcc014 Wrote:
(03-01-2016, 08:19 PM)Robert.VanVossen Wrote: Ching-Ho,

If you place your SD Card into your host machine, can you mount it and see a filesystem?

If not, the SD card may have not been unmounted correctly.

Thanks,
Robbie VanVossen

Robbie,

When we put the micro-SD card into USB adapter and then inserted USB adapter into host system (running Ubuntu 14.04 LTS), file system in micro-SD card could be seen.

We have a couple screenshots of the SD card properties for your investigation.

Thanks,

Ching-Ho
Ching-Ho,

Can you confirm you copied the correct .dtb file to your /tftpboot/ directory? Does `cat /tftpboot/xen.dtb | grep rootdelay` return anything?

-Jarvis
Jarvis,

We confirmed that .dtb file xen.dtb, xen-qemu.dtb and xen-zcu102.dtb were in /tftpboot directory.  The command did not return anything.

Thanks,

Ching-Ho
Reply
#10
Ching-Ho,

That might be your problem. Be sure to copy the xen-zcu102.dtb as the xen.dtb in your /tftpboot/ directory.

4.2.2:
$ cp $RELEASE_DIR/dist/images/linux/xen-zcu102.dtb /tftpboot/xen.dtb

`cat /tftpboot/xen.dtb | grep rootdelay` should return `Binary file (standard input) matches`.

-Jarvis
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)