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