Skip to contentSkip to conversation

[How to boot on targetboard by creating an image that can boot ram to disk in a YOCTO]

How to boot on targetboard by creating an image that can boot ram to disk in a YOCTO 김도연 1 participant 2 messages Dec 13, 2024 2 messages not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

김도연

author
#1 lore raw

Hello, This is Annie in Republic of Korea.

I would like to boot ramdisk from the Yocto project.

local.conf is as follows.

Content of local.conf
----------------------------------------------------------------------
CONF_VERSION = "2"
MACHINE = "intel-corei7-64"
INITRAMFS_IMAGE = "core-image-minimal-initramfs"
INITRAMFS_IMAGE_BUNDLE = "1"
PREFERRED_PROVIDER_virtual/kernel = "linux-yocto"
PREFERRED_VERSION_linux-yocto ="5.15%"
PREFERRED_PROVIDER_virtual/kernel-rt = ""
DISTRO_FEATURES:append = "pam smbfs systemd udev"
CORE_IMAGE_EXTRA_INSTALL = "systemd ldd"
DISTRO_FEATURES_BACKFIILL_CONSIDERED += "sysvinit"
VIRTUAL-RUNTIME_init_manager = "systemd"
VIRTUAL-RUNTIME_initscripts = "systemd-compat-units"
IMAGE_INSTALL:append = " ncurses bash strace bison bc grub grub-efi ipmitool cifs-utils pciutils gnu-config glibc binutils packagegroup-core-buildessential openssh-sftp-server packagegroup-core-ssh-openssh gtk+ cmake xz python3 vim git flex sudo elfutils usbutils util-linux linpack libgpiod libgpiod-tools netplan ufw glibc-utils iperf3 udev-extraconf systemd kernel-devsrc kmod kernel-dev kernel-modules memtester i2c-tools ethtool etc-ipmi-driver" CORE_IMAGE_EXTRA_INSTALL += "dhcpcd dnsmasq"
MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += "kernel-modules"
IMAGE_FSTYPES = "iso cpio.gz"
DISTRO_VERSION = "2.0.1"
----------------------------------------------------------------------

1. First, I ran bitbake and copied the bzImage-initramfs and core-image-minimal-initrmafs.cpio.gz files to the target board.

Also, I tried both bitbake core-image-minimal and bitbake core-image-minimal-initrmafs.

2. Secound, The target board created a /boot/loader/entires/linux.conf file to use systemd-boot and wrote it as follows.

Content /boot/loader/entires/linux.conf
----------------------------------------------------------------------
title linux with initramfs

linux /bzImage

initrd /core-image-minimal-initramfs.cpio.gz

options =/dev/ram0 rw

----------------------------------------------------------------------

3. Thrid, I ran reboot.

In the boot message,
waiting for removable media... 29 28 27 ...

After counting the numbers

cannot find rootfs.img file in /run/media/boot-nvme0n1p1 /run/media/boot-nvme0n1p2 /run/media/boot-nvme0n1p3 ,dropping to a shell

An error has occurred like this.

Is there a way to solve it?

Thank you.

Best regards,

A message that is not in the archive (sent off-list or not yet received): [email protected]

author
#3 lore raw

Hello, This is Annie in Republic of Korea.

I would like to boot ramdisk from the Yocto project.

local.conf is as follows.

Content of local.conf
----------------------------------------------------------------------
CONF_VERSION = "2"
MACHINE = "intel-corei7-64"
INITRAMFS_IMAGE = "core-image-minimal-initramfs"
INITRAMFS_IMAGE_BUNDLE = "1"
PREFERRED_PROVIDER_virtual/kernel = "linux-yocto"
PREFERRED_VERSION_linux-yocto ="5.15%"
PREFERRED_PROVIDER_virtual/kernel-rt = ""
DISTRO_FEATURES:append = "pam smbfs systemd udev"
CORE_IMAGE_EXTRA_INSTALL = "systemd ldd"
DISTRO_FEATURES_BACKFIILL_CONSIDERED += "sysvinit"
VIRTUAL-RUNTIME_init_manager = "systemd"
VIRTUAL-RUNTIME_initscripts = "systemd-compat-units"
IMAGE_INSTALL:append = " ncurses bash strace bison bc grub grub-efi ipmitool cifs-utils pciutils gnu-config glibc binutils packagegroup-core-buildessential openssh-sftp-server packagegroup-core-ssh-openssh gtk+ cmake xz python3 vim git flex sudo elfutils usbutils util-linux linpack libgpiod libgpiod-tools netplan ufw glibc-utils iperf3 udev-extraconf systemd kernel-devsrc kmod kernel-dev kernel-modules memtester i2c-tools ethtool etc-ipmi-driver" CORE_IMAGE_EXTRA_INSTALL += "dhcpcd dnsmasq"
MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += "kernel-modules"
IMAGE_FSTYPES = "iso cpio.gz"
DISTRO_VERSION = "2.0.1"
----------------------------------------------------------------------

1. First, I ran bitbake and copied the bzImage-initramfs and core-image-minimal-initrmafs.cpio.gz files to the target board.

Also, I tried both bitbake core-image-minimal and bitbake core-image-minimal-initrmafs.

2. Secound, The target board created a /boot/loader/entires/linux.conf file to use systemd-boot and wrote it as follows.

Content /boot/loader/entires/linux.conf
----------------------------------------------------------------------
title linux with initramfs

linux /bzImage

initrd /core-image-minimal-initramfs.cpio.gz

options =/dev/ram0 rw

----------------------------------------------------------------------

3. Thrid, I ran reboot.

In the boot message,
waiting for removable media... 29 28 27 ...

After counting the numbers

cannot find rootfs.img file in /run/media/boot-nvme0n1p1 /run/media/boot-nvme0n1p2 /run/media/boot-nvme0n1p3 ,dropping to a shell

An error has occurred like this.

Is there a way to solve it?

Thank you.

Best regards,