IMX 8M Quad Eval board Jailhouse Demo instructions

cancel
Showing results for 
Search instead for 
Did you mean: 

IMX 8M Quad Eval board Jailhouse Demo instructions

Jump to solution
243 Views
flobro
Contributor III

Are there better instructions for the Jailhouse Linux demo to allow the configuration of Ethernet and/or serial port console (then the IMXVIRTUG document)? 

I see a second Ethernet created after launching jailhouse, as well as some output on the second serial port (ttymxc2? I think coming over the second USB-serial port) but I cannot communicate with the "inmate" Linux instance.

 

Thanks for any information

Labels (2)
Tags (3)
0 Kudos
1 Solution
220 Views
flobro
Contributor III

Never surrender... (I don't know how the IMXVIRTUG instructions ever worked, none of the demos work correctly following them for me)

This information is specifically for the i.MX8 M Quad EVK board.

I reformatted the eMMC with one main partition, and put the same root file system that is on the SD card (use "uuu" via serial loader, it is much easier).

 

Then the following:

In u-boot:

run jh_mmcboot

Then on the main console:

modprobe jailhouse
jailhouse enable /usr/share/jailhouse/cells/imx8mq.cell

export PATH=$PATH:/usr/share/jailhouse/tools
jailhouse cell linux /usr/share/jailhouse/cells/imx8mq-linux-demo.cell /run/media/mmcblk1p1/Image -d /run/media/mmcblk1p1/imx8mq-evk-inmate.dtb -c "clk_ignore_unused console=ttymxc1,115200 earlycon=ec_imx6q,0x30860000,115200 root=/dev/mmcblk2p1 rootwait rw"

 

Then magically the second serial port on the usb to serial cable showed the console of the inmate demo. Also if finally found the root filesystem that I specified in the last command line "mmcblk2p1" and loaded the system. Also the Ethernet was initialized with 169.254.144.37 for the inmate, and the "root" cell had an address of 169.254.43.74 (and they can communicate via ssh).

 

So the questions I have :

  1. When you boot uboot with jh_mmcboot, mmcblk0 is not visible to the system, but is on a normal boot? (I assume a device tree loaded - it would be great with people with knowledge could show how this is done.
  2. When booting jailhouse, the Emmc is not visible as a device, but the inmate sees it as /dev/mmcblk2 and not /dev/mmcblk0. Why is that (again - I assume the device trees loading, but I don't see the setting that controls this.

I am thrilled that it works, but I definitely need to understand the device trees better to mange customization of the jailhouse system.

 

 

View solution in original post

0 Kudos
2 Replies
168 Views
flobro
Contributor III

Just to clarify, the canned jailhouse demo (and when you build it via yocto) for the i.MX 8 quad EVK, you must boot the from the SD card, and launch the "inmate" pointing to a rootfs on the eMMC that you already have set up, or it will not work. The jailhouse root also has no access to the eMMC beforehand, so you have to set it up with a regular boot (don't run the "run jh_mmcboot" from uboot - just let it boot normally, or run "boot"). Or use uuu to load the eMMC like you were going to boot from the eMMC normally after that.

The default configs will have to be changed in the cell sources if you want to run the "root" cell from the eMMC and the "inmate from the SD card (changes in the kernel device trees imx8mq-evk-inmate.dts, imx8mq-exk-root.dts, and the imx8mq-linux-demo.c and imx8mq.c  in the jailhouse project configs). If you build from yocto, everything you need is in there -

tmp/work/imx8mqevk-poky-linux/jailhouse/0.2-r0/git/configs/arm64 for jailhouse sources,
tmp/work/imx8mqevk-poky-linux/linux-imx/5.15.32+gitAUTOINC+fa6c316859-r0/git/arch/arm64/boot/dts/freescale for the kernel device trees.

(based on i.MX Linux Yocto Project BSP 5.15.X_1.0.0 Release)

 

If anyone can add to this - or more importantly correct this information, please do. I am just getting into this and want to help and learn.

0 Kudos
221 Views
flobro
Contributor III

Never surrender... (I don't know how the IMXVIRTUG instructions ever worked, none of the demos work correctly following them for me)

This information is specifically for the i.MX8 M Quad EVK board.

I reformatted the eMMC with one main partition, and put the same root file system that is on the SD card (use "uuu" via serial loader, it is much easier).

 

Then the following:

In u-boot:

run jh_mmcboot

Then on the main console:

modprobe jailhouse
jailhouse enable /usr/share/jailhouse/cells/imx8mq.cell

export PATH=$PATH:/usr/share/jailhouse/tools
jailhouse cell linux /usr/share/jailhouse/cells/imx8mq-linux-demo.cell /run/media/mmcblk1p1/Image -d /run/media/mmcblk1p1/imx8mq-evk-inmate.dtb -c "clk_ignore_unused console=ttymxc1,115200 earlycon=ec_imx6q,0x30860000,115200 root=/dev/mmcblk2p1 rootwait rw"

 

Then magically the second serial port on the usb to serial cable showed the console of the inmate demo. Also if finally found the root filesystem that I specified in the last command line "mmcblk2p1" and loaded the system. Also the Ethernet was initialized with 169.254.144.37 for the inmate, and the "root" cell had an address of 169.254.43.74 (and they can communicate via ssh).

 

So the questions I have :

  1. When you boot uboot with jh_mmcboot, mmcblk0 is not visible to the system, but is on a normal boot? (I assume a device tree loaded - it would be great with people with knowledge could show how this is done.
  2. When booting jailhouse, the Emmc is not visible as a device, but the inmate sees it as /dev/mmcblk2 and not /dev/mmcblk0. Why is that (again - I assume the device trees loading, but I don't see the setting that controls this.

I am thrilled that it works, but I definitely need to understand the device trees better to mange customization of the jailhouse system.

 

 

0 Kudos