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
Solved! Go to Solution.
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 :
I am thrilled that it works, but I definitely need to understand the device trees better to mange customization of the jailhouse system.
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.
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 :
I am thrilled that it works, but I definitely need to understand the device trees better to mange customization of the jailhouse system.