diff options
Diffstat (limited to '')
-rw-r--r-- | spec/build/bsps/powerpc/motorola_powerpc/qemufakerom.yml | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/spec/build/bsps/powerpc/motorola_powerpc/qemufakerom.yml b/spec/build/bsps/powerpc/motorola_powerpc/qemufakerom.yml new file mode 100644 index 0000000000..09e7f318c5 --- /dev/null +++ b/spec/build/bsps/powerpc/motorola_powerpc/qemufakerom.yml @@ -0,0 +1,38 @@ +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause +build-type: script +copyrights: +- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de) +do-build: | + def cc(self, bld, bic, flags, source): + root, ext = os.path.splitext(source) + target = root + ".o" + bld( + features="asm c", + includes=bic.includes, + rule="${CC} ${CPPFLAGS} " + flags + " ${DEFINES_ST:DEFINES} ${CPPPATH_ST:INCPATHS} -c ${SRC} -o ${TGT}", + source=source, + target=target, + ) + return target + fakerom_o = cc(self, bld, bic, "-DASM", "bsps/powerpc/motorola_powerpc/bootloader/qemu_fakerom.S") + fakeres_o = cc(self, bld, bic, "", "bsps/powerpc/motorola_powerpc/bootloader/qemu_fakeres.c") + rule = "${LD} -o ${TGT} ${SRC} -nostdlib -Ttext 0xfff00000 --section-start=.romentry=0xfffffffc" + elf = "qemu_fakerom.elf" + bld( + rule=rule, + source=[fakerom_o, fakeres_o], + target=elf, + ) + bin = "qemu_fakerom.bin" + bld( + rule=rule + " --oformat binary", + source=[fakerom_o, fakeres_o], + target=bin, + ) + bld.install_files("${BSP_LIBDIR}", [fakerom_o, elf, bin]) +do-configure: null +enabled-by: true +links: [] +prepare-build: null +prepare-configure: null +type: build |