I used this document to create the image for my hypervisor : Xen on ARM and 
Yocto - Xen (xenproject.org) ( 
https://wiki.xenproject.org/wiki/Xen_on_ARM_and_Yocto ).

The steps I followed are listed below:

1) Boot the machine with stable version of Ubuntu 22.04.4 LTS.

2) Update and upgrade using the commands “ sudo apt-get update && sudo apt-get 
upgrade”.

3) Use the following commands to clone the important repositories: “git clone 
-b dunfell http://git.yoctoproject.org/poky”

4) Go the poky directory using command: “cd poky” 5) Use “git clone -b dunfell 
http://git.openembedded.org/meta-openembedded” 6) Use “git clone -b dunfell 
http://git.yoctoproject.org/meta-virtualization” 7) Use “git clone -b dunfell 
https://github.com/agherzan/meta-raspberrypi.git”

8) Initialize your shell to be ready to build using the command: “source 
./oe-init-build-env”

9) Edit conf/bblayers.conf, to add the source code layers needed:

/home/intel/poky/meta \

/home/intel/poky/meta-poky \

/home/intel/poky/meta-yocto-bsp \

/home/intel/poky/meta-openembedded/meta-oe \

/home/intel/poky/meta-openembedded/meta-filesystems \

/home/intel/poky/meta-openembedded/meta-python \

/home/intel/poky/meta-openembedded/meta-networking \

/home/intel/poky/meta-virtualization \

/home/intel/poky/meta-raspberrypi \

10) The conf/local.conf file contains instructions for the variables that it 
sets. You should review and make sure to set:

DL_DIR -- set this to a local download directory for retrieved tarballs or 
other source code files

SSTATE_DIR -- set to a local directory for build cache files to speed up 
subsequent builds

PACKAGE_CLASSES -- package_rpm can be a good choice for package format

TMPDIR –The default is a tmp directory under TOPDIR.

EXTRA_IMAGE_FEATURES – to enable the debugging tweaks.

USER_CLASSES -- additional class to use when building images which enables 
extra features.

SSTATE_MIRRORS –This will mean the build uses the network to check for 
artefacts at the start of builds, which does slow it down equally, it will also 
speed up the builds by not having to build things if they are present in the 
cache.

Uncomment all these.

11) Then add the following to the same file, or make sure that the values here 
match if the variables are already present in the file:

MACHINE = "raspberrypi4-64"

DISTRO = "poky"

IMAGE_FSTYPES += "cpio.gz"

QEMU_TARGETS = "i386 x86_64 aarch64arm"

DISTRO_FEATURES += " virtualization xen"

BUILD_REPRODUCIBLE_BINARIES = "1"

12) Run “bitbake xen-image-minimal” for building the image.

13) It might show some error in binutil.bb file. Use the following commands to 
clean and rebuild the binutils.bb file:

bitbake –c clean binutils

bitbake binutils

14) Run “bitbake xen-image-minimal” command again and the image is built, and 
you can flash it on raspberry pi-4.

After executing these steps, I got the image. The problem I am facing is in 
creating the boot and root partitions.

This is the document I am following to flash the created image: Xen on 
Raspberry Pi 4 adventures - Xen Project . ( 
https://xenproject.org/2020/09/29/xen-on-raspberry-pi-4-adventures/ )
Once I have the image, I Downloaded the JeOS image, then opened it and saved 
u-boot.bin . Then, I Placed u-boot.bin in the first SD card partition together 
with config.txt . The document says that I will get a UBoot prompt that allows 
you to load Xen, the Linux kernel for Dom0, the Dom0 rootfs, and the device 
tree from a TFTP server over the network but I am not getting the UBoot prompt. 
*I haven't automated the loading steps.*

*This is the UBoot terminal I obtained after inserting my SD Card in the rpi4 
and booting the system.*

I also tried doing these things:

1. The 'rootfs' and 'bootfs' folders were merged into a single main folder and 
compressed into a zip file. Several methods were attempted to convert this zip 
file into an .iso file, including using online converters, command line tools, 
the 'any2iso' tool, and the Brasero tool. However, after converting and 
flashing the .iso file onto a Raspberry Pi, no partitions were detected.

2. In response to the lack of detected partitions, manual attempts were made to 
create two partitions for Root and Boot using the command line and GParted 
tool. However, an issue arose when trying to load the 'rootfs' and 'bootfs' 
files into their respective partitions.

I am a newbie, and I really don't understand the file name systems and things 
like dom0/dom1. I am trying from last 2 to 3 weeks to flash the image but 
failing at it. Can someone please guide me what should I do once I have 
obtained the image through bitbaking?

Regards,
Shivansh
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#8694): 
https://lists.yoctoproject.org/g/meta-virtualization/message/8694
Mute This Topic: https://lists.yoctoproject.org/mt/105706125/21656
Mute 
#meta-virtualization:https://lists.yoctoproject.org/g/meta-virtualization/mutehashtag/meta-virtualization
Mute 
#yocto:https://lists.yoctoproject.org/g/meta-virtualization/mutehashtag/yocto
Group Owner: meta-virtualization+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/meta-virtualization/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to