meta-virtualization.lists.yoctoproject.org archive mirror
 help / color / mirror / Atom feed
From: "Shivansh" <srr775038@tatatechnologies.com>
To: meta-virtualization@lists.yoctoproject.org
Subject: I am trying to build the xen hypervisor on raspberry pi4. The image is created but fails to flash on the rpi4. Kindly help me out. #meta-virtualization #yocto
Date: Wed, 24 Apr 2024 00:07:39 -0700	[thread overview]
Message-ID: <Prnc.1713942459026427900.Jl9N@lists.yoctoproject.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 4763 bytes --]

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

[-- Attachment #2: Type: text/html, Size: 54398 bytes --]

                 reply	other threads:[~2024-04-24  7:07 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Prnc.1713942459026427900.Jl9N@lists.yoctoproject.org \
    --to=srr775038@tatatechnologies.com \
    --cc=meta-virtualization@lists.yoctoproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).