diff options
| author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-11-07 13:31:53 +0000 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-11-07 13:31:53 +0000 |
| commit | 8c22ff0d8b70d9b12f0487ef696a7e915b9e3173 (patch) | |
| tree | efdc32587159d0050a69009bdf2330a531727d95 /meta/recipes-extended/baremetal-example/baremetal-helloworld_git.bb | |
| parent | d412d2747595c1cc4a5e3ca975e3adc31b2f7891 (diff) | |
| download | poky-8c22ff0d8b70d9b12f0487ef696a7e915b9e3173.tar.gz | |
The poky repository master branch is no longer being updated.
You can either:
a) switch to individual clones of bitbake, openembedded-core, meta-yocto and yocto-docs
b) use the new bitbake-setup
You can find information about either approach in our documentation:
https://docs.yoctoproject.org/
Note that "poky" the distro setting is still available in meta-yocto as
before and we continue to use and maintain that.
Long live Poky!
Some further information on the background of this change can be found
in: https://lists.openembedded.org/g/openembedded-architecture/message/2179
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-extended/baremetal-example/baremetal-helloworld_git.bb')
| -rw-r--r-- | meta/recipes-extended/baremetal-example/baremetal-helloworld_git.bb | 69 |
1 files changed, 0 insertions, 69 deletions
diff --git a/meta/recipes-extended/baremetal-example/baremetal-helloworld_git.bb b/meta/recipes-extended/baremetal-example/baremetal-helloworld_git.bb deleted file mode 100644 index 4307716069..0000000000 --- a/meta/recipes-extended/baremetal-example/baremetal-helloworld_git.bb +++ /dev/null | |||
| @@ -1,69 +0,0 @@ | |||
| 1 | SUMMARY = "Baremetal examples to work with the several QEMU architectures supported on OpenEmbedded" | ||
| 2 | HOMEPAGE = "https://github.com/aehs29/baremetal-helloqemu" | ||
| 3 | DESCRIPTION = "These are introductory examples to showcase the use of QEMU to run baremetal applications." | ||
| 4 | LICENSE = "MIT" | ||
| 5 | LIC_FILES_CHKSUM = "file://LICENSE;md5=39346640a23c701e4f459e05f56f4449" | ||
| 6 | |||
| 7 | SRCREV = "db2bf750eaef7fc0832e13ada8291343bbcc3afe" | ||
| 8 | PV = "0.1+git" | ||
| 9 | |||
| 10 | SRC_URI = "git://github.com/ahcbb6/baremetal-helloqemu.git;protocol=https;branch=master" | ||
| 11 | UPSTREAM_CHECK_COMMITS = "1" | ||
| 12 | |||
| 13 | # The following variables should be set to accomodate each application | ||
| 14 | BAREMETAL_BINNAME ?= "hello_baremetal_${MACHINE}" | ||
| 15 | IMAGE_LINK_NAME ?= "baremetal-helloworld-image-${MACHINE}" | ||
| 16 | IMAGE_NAME_SUFFIX ?= "" | ||
| 17 | |||
| 18 | # Baremetal-Image creates the proper wiring, assumes the output is provided in | ||
| 19 | # binary and ELF format, installed on ${base_libdir}/firmware/ , we want a | ||
| 20 | # package to be created since we might have some way of updating the baremetal | ||
| 21 | # firmware from Linux | ||
| 22 | inherit baremetal-image | ||
| 23 | |||
| 24 | # startup code for x86 uses NASM syntax | ||
| 25 | DEPENDS:qemux86:append = " nasm-native" | ||
| 26 | |||
| 27 | # These parameters are app specific for this example | ||
| 28 | # This will be translated automatically to the architecture and | ||
| 29 | # machine that QEMU uses on OE, e.g. -machine virt -cpu cortex-a57 | ||
| 30 | # but the examples can also be run on other architectures/machines | ||
| 31 | # such as vexpress-a15 by overriding the setting on the machine.conf | ||
| 32 | COMPATIBLE_MACHINE = "qemuarmv5|qemuarm|qemuarm64|qemuriscv64|qemuriscv32|qemux86|qemux86-64" | ||
| 33 | |||
| 34 | BAREMETAL_QEMUARCH ?= "" | ||
| 35 | BAREMETAL_QEMUARCH:qemuarmv5 = "versatile" | ||
| 36 | BAREMETAL_QEMUARCH:qemuarm = "arm" | ||
| 37 | BAREMETAL_QEMUARCH:qemuarm64 = "aarch64" | ||
| 38 | BAREMETAL_QEMUARCH:qemuriscv64 = "riscv64" | ||
| 39 | BAREMETAL_QEMUARCH:qemuriscv32 = "riscv32" | ||
| 40 | BAREMETAL_QEMUARCH:qemux86 = "x86" | ||
| 41 | BAREMETAL_QEMUARCH:qemux86-64 = "x86-64" | ||
| 42 | |||
| 43 | EXTRA_OEMAKE:append = " QEMUARCH=${BAREMETAL_QEMUARCH} V=1" | ||
| 44 | |||
| 45 | # qemux86-64 uses a different Makefile | ||
| 46 | do_compile:prepend:qemux86-64(){ | ||
| 47 | cd x86-64 | ||
| 48 | } | ||
| 49 | |||
| 50 | # Install binaries on the proper location for baremetal-image to fetch and deploy | ||
| 51 | do_install(){ | ||
| 52 | install -d ${D}/${base_libdir}/firmware | ||
| 53 | install -m 755 ${B}/build/hello_baremetal_${BAREMETAL_QEMUARCH}.bin ${D}/${base_libdir}/firmware/${BAREMETAL_BINNAME}.bin | ||
| 54 | install -m 755 ${B}/build/hello_baremetal_${BAREMETAL_QEMUARCH}.elf ${D}/${base_libdir}/firmware/${BAREMETAL_BINNAME}.elf | ||
| 55 | } | ||
| 56 | |||
| 57 | FILES:${PN} += " \ | ||
| 58 | ${base_libdir}/firmware/${BAREMETAL_BINNAME}.bin \ | ||
| 59 | ${base_libdir}/firmware/${BAREMETAL_BINNAME}.elf \ | ||
| 60 | " | ||
| 61 | |||
| 62 | # qemux86-64 boots from iso rather than -kernel, create image to boot from | ||
| 63 | do_image:append:qemux86-64(){ | ||
| 64 | dd if=/dev/zero of=${B}/build/img.iso bs=1M count=10 status=none | ||
| 65 | dd if=${B}/build/stage1.bin of=${B}/build/img.iso bs=512 count=1 conv=notrunc | ||
| 66 | dd if=${B}/build/stage2.bin of=${B}/build/img.iso bs=512 seek=1 count=64 conv=notrunc | ||
| 67 | dd if=${B}/build/hello_baremetal_x86-64.bin of=${B}/build/img.iso bs=512 seek=65 conv=notrunc | ||
| 68 | install ${B}/build/img.iso ${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.iso | ||
| 69 | } | ||
