summaryrefslogtreecommitdiffstats
path: root/spec/build/bsps/powerpc/motorola_powerpc/qemufakerom.yml
blob: 3a64a7fefca25e7203773b2fe0e4ef53b2c23a7c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
build-type: script
copyrights:
- Copyright (C) 2020 embedded brains GmbH & Co. KG
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