poky/meta-skeleton
Alejandro Hernandez Samaniego 1149b4fbb6 baremetal-helloworld: Enable x86 and x86-64 ports
- The qemux86 port for helloworld-baremetal builds in the standard way, however,
  it uses NASM syntax for the startup code, hence we include a dependency to
  nasm-native, QEMU forces us to use an ELF file rather than a bin file to boot
  from this architecture using the -kernel parameter.

- QEMU refuses to boot using the -kernel parameter for files containing an ELF64
  header [1], instead, it requires a multiboot2 compatible image.

  We could create an image that contains a multiboot2 header by piggybacking
  into grub2-native, specifically grub-mkrescue, but it requires some extra
  runtime dependencies (xorriso which is currently part of meta-oe), and assumes
  a grub installation exists on the host.

  Due to host contamination and dependency complications, we dont rely on grub2,
  but rather do this process manually instead, the x86-64 port contains a stage1
  bootloader, stage2 bootloader and a 64 bit baremetal app (multiboot2
  compatible), booting into real (16 bit), protected (32 bit) and long (64 bit)
  modes, eventually running the helloworld-baremetal app. This is the reason why
  we need the code changes to use a separate Makefile, and create an image
  specifically for qemux86-64.

$ runqemu nographic
Booting from ROM..
Hello OpenEmbedded on x86!

$ runqemu nographic
Starting Stage 1 Bootloader
Loading Stage 2 Bootloader
Stage 2 Loaded.
Jumping to Stage2 Bootloader
In Stage 2
Done

Hello OpenEmbedded on x86-64!

[1] https://gitlab.com/qemu-project/qemu/-/blob/v7.2.0/hw/i386/multiboot.c#L199

(From OE-Core rev: 1dffd81b2991f90ab95cb36d8ff7626efd21434f)

Signed-off-by: Alejandro Enedino Hernandez Samaniego <alejandro@enedino.org>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-01-12 23:08:58 +00:00
..
conf layer.conf: Update to use mickledore as the layer series name 2023-01-03 15:47:29 +00:00
recipes-baremetal/baremetal-examples baremetal-helloworld: Enable x86 and x86-64 ports 2023-01-12 23:08:58 +00:00
recipes-core/busybox meta-skeleton: fix warnings for append operators combined with += 2021-11-25 21:55:10 +00:00
recipes-kernel meta-skeleton/hello-mod: Switch to SPDX-License-Identifier 2022-08-12 11:46:26 +01:00
recipes-multilib/images core-image-multilib-example: base on weston, and not sato 2021-04-27 15:11:47 +01:00
recipes-skeleton useradd-example: do not use unsupported clear text password 2022-09-29 21:15:50 +01:00
README.skeleton meta-skeleton: update to satisfy yocto-check-layer tests 2021-06-27 08:38:34 +01:00

meta-skeleton
=============

The meta-skeleton layer contains example recipes and configuration files.