Showing with 826 additions and 15,522 deletions.
  1. +1 −0 .gitignore
  2. +16 −43 .gitlab-ci.yml
  3. +11 −1 CHANGELOG.md
  4. +1 −1 Makefile
  5. +34 −15 Makefile.inc
  6. +7 −2 configs/pcengines_apu2.config
  7. +8 −3 configs/pcengines_apu3.config
  8. +8 −3 configs/pcengines_apu4.config
  9. +8 −3 configs/pcengines_apu5.config
  10. +57 −0 payloads/external/Memtest86Plus/Makefile.inc
  11. +2 −2 payloads/external/iPXE/Kconfig
  12. +136 −0 payloads/external/iPXE/general.h
  13. +17 −0 payloads/external/iPXE/menu.ipxe
  14. +29 −0 src/Kconfig
  15. +4 −4 src/arch/x86/Makefile.inc
  16. +4 −0 src/cpu/amd/pi/00730F01/Makefile.inc
  17. +57 −0 src/cpu/amd/pi/00730F01/update_microcode.c
  18. +3 −0 src/cpu/amd/pi/Makefile.inc
  19. +146 −0 src/cpu/amd/pi/microcode_fam16h.c
  20. +0 −6 src/mainboard/pcengines/Kconfig
  21. +17 −2 src/mainboard/pcengines/apu2/Kconfig
  22. +32 −22 src/mainboard/pcengines/apu2/Makefile.inc
  23. +16 −22 src/mainboard/pcengines/apu2/apu2.h
  24. +4 −4 src/mainboard/pcengines/apu2/board_info.txt
  25. BIN src/mainboard/pcengines/apu2/bootorder
  26. +1 −2 src/mainboard/pcengines/apu2/bootorder_def
  27. +27 −124 src/mainboard/pcengines/apu2/mainboard.c
  28. +20 −6 src/mainboard/pcengines/apu2/romstage.c
  29. +157 −0 src/mainboard/pcengines/apu2/s1_button.c
  30. +2 −20 src/mainboard/pcengines/{apu5/bios_knobs.h → apu2/s1_button.h}
  31. 0 src/mainboard/pcengines/apu2/{ → variants/apu2}/devicetree.cb
  32. 0 src/mainboard/pcengines/{ → apu2/variants}/apu3/devicetree.cb
  33. 0 src/mainboard/pcengines/{ → apu2/variants}/apu4/devicetree.cb
  34. 0 src/mainboard/pcengines/{ → apu2/variants}/apu5/devicetree.cb
  35. +0 −168 src/mainboard/pcengines/apu3/BiosCallOuts.c
  36. +0 −264 src/mainboard/pcengines/apu3/HYNIX-2G-1333.spd.hex
  37. +0 −261 src/mainboard/pcengines/apu3/HYNIX-4G-1333-ECC.spd.hex
  38. +0 −262 src/mainboard/pcengines/apu3/HYNIX-4G-1333-NOECC.spd.hex
  39. +0 −139 src/mainboard/pcengines/apu3/Kconfig
  40. +0 −128 src/mainboard/pcengines/apu3/Makefile.inc
  41. +0 −72 src/mainboard/pcengines/apu3/OptionsIds.h
  42. +0 −126 src/mainboard/pcengines/apu3/PlatformGnbPcie.c
  43. +0 −31 src/mainboard/pcengines/apu3/PlatformGnbPcieComplex.h
  44. +0 −84 src/mainboard/pcengines/apu3/acpi/gpe.asl
  45. +0 −1 src/mainboard/pcengines/apu3/acpi/ide.asl
  46. +0 −41 src/mainboard/pcengines/apu3/acpi/mainboard.asl
  47. +0 −475 src/mainboard/pcengines/apu3/acpi/pci_int.asl
  48. +0 −217 src/mainboard/pcengines/apu3/acpi/routing.asl
  49. +0 −1 src/mainboard/pcengines/apu3/acpi/sata.asl
  50. +0 −27 src/mainboard/pcengines/apu3/acpi/si.asl
  51. +0 −97 src/mainboard/pcengines/apu3/acpi/sleep.asl
  52. +0 −31 src/mainboard/pcengines/apu3/acpi/superio.asl
  53. +0 −1 src/mainboard/pcengines/apu3/acpi/thermal.asl
  54. +0 −41 src/mainboard/pcengines/apu3/acpi/usb_oc.asl
  55. +0 −289 src/mainboard/pcengines/apu3/acpi_tables.c
  56. +0 −760 src/mainboard/pcengines/apu3/agesawrapper.c
  57. +0 −62 src/mainboard/pcengines/apu3/agesawrapper.h
  58. +0 −60 src/mainboard/pcengines/apu3/apu2.h
  59. +0 −194 src/mainboard/pcengines/apu3/bios_knobs.c
  60. +0 −38 src/mainboard/pcengines/apu3/bios_knobs.h
  61. +0 −6 src/mainboard/pcengines/apu3/board_info.txt
  62. BIN src/mainboard/pcengines/apu3/boot-menu-key
  63. +0 −1 src/mainboard/pcengines/apu3/boot-menu-message
  64. BIN src/mainboard/pcengines/apu3/boot-menu-wait
  65. BIN src/mainboard/pcengines/apu3/bootorder
  66. +0 −18 src/mainboard/pcengines/apu3/bootorder_def
  67. +0 −10 src/mainboard/pcengines/apu3/bootorder_map
  68. +0 −13 src/mainboard/pcengines/apu3/cmos.default
  69. +0 −129 src/mainboard/pcengines/apu3/cmos.layout
  70. +0 −94 src/mainboard/pcengines/apu3/dsdt.asl
  71. +0 −108 src/mainboard/pcengines/apu3/irq_tables.c
  72. +0 −351 src/mainboard/pcengines/apu3/mainboard.c
  73. +0 −202 src/mainboard/pcengines/apu3/mptable.c
  74. +0 −266 src/mainboard/pcengines/apu3/romstage.c
  75. BIN src/mainboard/pcengines/apu3/sercon-port
  76. +0 −168 src/mainboard/pcengines/apu4/BiosCallOuts.c
  77. +0 −264 src/mainboard/pcengines/apu4/HYNIX-2G-1333.spd.hex
  78. +0 −261 src/mainboard/pcengines/apu4/HYNIX-4G-1333-ECC.spd.hex
  79. +0 −262 src/mainboard/pcengines/apu4/HYNIX-4G-1333-NOECC.spd.hex
  80. +0 −139 src/mainboard/pcengines/apu4/Kconfig
  81. +0 −128 src/mainboard/pcengines/apu4/Makefile.inc
  82. +0 −72 src/mainboard/pcengines/apu4/OptionsIds.h
  83. +0 −126 src/mainboard/pcengines/apu4/PlatformGnbPcie.c
  84. +0 −31 src/mainboard/pcengines/apu4/PlatformGnbPcieComplex.h
  85. +0 −84 src/mainboard/pcengines/apu4/acpi/gpe.asl
  86. +0 −1 src/mainboard/pcengines/apu4/acpi/ide.asl
  87. +0 −41 src/mainboard/pcengines/apu4/acpi/mainboard.asl
  88. +0 −475 src/mainboard/pcengines/apu4/acpi/pci_int.asl
  89. +0 −217 src/mainboard/pcengines/apu4/acpi/routing.asl
  90. +0 −1 src/mainboard/pcengines/apu4/acpi/sata.asl
  91. +0 −27 src/mainboard/pcengines/apu4/acpi/si.asl
  92. +0 −97 src/mainboard/pcengines/apu4/acpi/sleep.asl
  93. +0 −31 src/mainboard/pcengines/apu4/acpi/superio.asl
  94. +0 −1 src/mainboard/pcengines/apu4/acpi/thermal.asl
  95. +0 −41 src/mainboard/pcengines/apu4/acpi/usb_oc.asl
  96. +0 −289 src/mainboard/pcengines/apu4/acpi_tables.c
  97. +0 −760 src/mainboard/pcengines/apu4/agesawrapper.c
  98. +0 −62 src/mainboard/pcengines/apu4/agesawrapper.h
  99. +0 −59 src/mainboard/pcengines/apu4/apu2.h
  100. +0 −194 src/mainboard/pcengines/apu4/bios_knobs.c
  101. +0 −38 src/mainboard/pcengines/apu4/bios_knobs.h
  102. +0 −6 src/mainboard/pcengines/apu4/board_info.txt
  103. BIN src/mainboard/pcengines/apu4/boot-menu-key
  104. +0 −1 src/mainboard/pcengines/apu4/boot-menu-message
  105. BIN src/mainboard/pcengines/apu4/boot-menu-wait
  106. BIN src/mainboard/pcengines/apu4/bootorder
  107. +0 −18 src/mainboard/pcengines/apu4/bootorder_def
  108. +0 −10 src/mainboard/pcengines/apu4/bootorder_map
  109. +0 −13 src/mainboard/pcengines/apu4/cmos.default
  110. +0 −129 src/mainboard/pcengines/apu4/cmos.layout
  111. +0 −94 src/mainboard/pcengines/apu4/dsdt.asl
  112. +0 −108 src/mainboard/pcengines/apu4/irq_tables.c
  113. +0 −341 src/mainboard/pcengines/apu4/mainboard.c
  114. +0 −202 src/mainboard/pcengines/apu4/mptable.c
  115. +0 −204 src/mainboard/pcengines/apu4/rel_notes.txt
  116. +0 −266 src/mainboard/pcengines/apu4/romstage.c
  117. BIN src/mainboard/pcengines/apu4/sercon-port
  118. +0 −168 src/mainboard/pcengines/apu5/BiosCallOuts.c
  119. +0 −264 src/mainboard/pcengines/apu5/HYNIX-2G-1333.spd.hex
  120. +0 −261 src/mainboard/pcengines/apu5/HYNIX-4G-1333-ECC.spd.hex
  121. +0 −262 src/mainboard/pcengines/apu5/HYNIX-4G-1333-NOECC.spd.hex
  122. +0 −139 src/mainboard/pcengines/apu5/Kconfig
  123. +0 −128 src/mainboard/pcengines/apu5/Makefile.inc
  124. +0 −72 src/mainboard/pcengines/apu5/OptionsIds.h
  125. +0 −126 src/mainboard/pcengines/apu5/PlatformGnbPcie.c
  126. +0 −31 src/mainboard/pcengines/apu5/PlatformGnbPcieComplex.h
  127. +0 −84 src/mainboard/pcengines/apu5/acpi/gpe.asl
  128. +0 −1 src/mainboard/pcengines/apu5/acpi/ide.asl
  129. +0 −41 src/mainboard/pcengines/apu5/acpi/mainboard.asl
  130. +0 −475 src/mainboard/pcengines/apu5/acpi/pci_int.asl
  131. +0 −217 src/mainboard/pcengines/apu5/acpi/routing.asl
  132. +0 −1 src/mainboard/pcengines/apu5/acpi/sata.asl
  133. +0 −27 src/mainboard/pcengines/apu5/acpi/si.asl
  134. +0 −97 src/mainboard/pcengines/apu5/acpi/sleep.asl
  135. +0 −31 src/mainboard/pcengines/apu5/acpi/superio.asl
  136. +0 −1 src/mainboard/pcengines/apu5/acpi/thermal.asl
  137. +0 −41 src/mainboard/pcengines/apu5/acpi/usb_oc.asl
  138. +0 −289 src/mainboard/pcengines/apu5/acpi_tables.c
  139. +0 −760 src/mainboard/pcengines/apu5/agesawrapper.c
  140. +0 −62 src/mainboard/pcengines/apu5/agesawrapper.h
  141. +0 −60 src/mainboard/pcengines/apu5/apu5.h
  142. +0 −194 src/mainboard/pcengines/apu5/bios_knobs.c
  143. +0 −6 src/mainboard/pcengines/apu5/board_info.txt
  144. BIN src/mainboard/pcengines/apu5/boot-menu-key
  145. +0 −1 src/mainboard/pcengines/apu5/boot-menu-message
  146. BIN src/mainboard/pcengines/apu5/boot-menu-wait
  147. BIN src/mainboard/pcengines/apu5/bootorder
  148. +0 −18 src/mainboard/pcengines/apu5/bootorder_def
  149. +0 −10 src/mainboard/pcengines/apu5/bootorder_map
  150. +0 −13 src/mainboard/pcengines/apu5/cmos.default
  151. +0 −129 src/mainboard/pcengines/apu5/cmos.layout
  152. +0 −94 src/mainboard/pcengines/apu5/dsdt.asl
  153. +0 −108 src/mainboard/pcengines/apu5/irq_tables.c
  154. +0 −228 src/mainboard/pcengines/apu5/mainboard.c
  155. +0 −202 src/mainboard/pcengines/apu5/mptable.c
  156. +0 −266 src/mainboard/pcengines/apu5/romstage.c
  157. BIN src/mainboard/pcengines/apu5/sercon-port
  158. +1 −1 util/crossgcc/buildgcc
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -9,6 +9,7 @@ payloads/external/GRUB2/grub2/
payloads/external/SeaBIOS/seabios/
payloads/external/sortbootorder/sortbootorder/
payloads/external/iPXE/ipxe
payloads/external/Memtest86Plus/memtest86plus
payloads/libpayload/install/
util/crossgcc/acpica-unix-*/
util/crossgcc/binutils-*/
Expand Down
59 changes: 16 additions & 43 deletions .gitlab-ci.yml
@@ -1,14 +1,13 @@
image: registry.gitlab.com/pcengines/apu2-documentation:latest
image: pcengines/pce-fw-builder-legacy:latest

services:
- docker:dind

variables:
RELEASE_DIR: ${CI_PROJECT_DIR}/apu2_fw_rel
RELEASE_DIR: ${CI_PROJECT_DIR}

stages:
- check_dependencies
- build_crosscompiler
- build_rom
- test_rom
- sign_rom
Expand All @@ -17,53 +16,30 @@ stages:
check_dependencies:
stage: check_dependencies
script:
- git ls-remote https://github.com/pcengines/release_manifests.git | grep ${CI_COMMIT_REF_NAME}
only:
- tags

build_crosscompiler:
stage: build_crosscompiler
tags:
- docker
script:
- test -e ${CI_PROJECT_DIR}/apu2_fw_rel/apu2/coreboot/util/crossgcc/xgcc || { make crossgcc-i386 CPUS=$(nproc) && mkdir -p ${CI_PROJECT_DIR}/apu2_fw_rel/apu2/coreboot/util/crossgcc/ && mv -f ${CI_PROJECT_DIR}/util/crossgcc/xgcc ${CI_PROJECT_DIR}/apu2_fw_rel/apu2/coreboot/util/crossgcc/ ; }
cache:
key: apu
paths:
- ${CI_PROJECT_DIR}/apu2_fw_rel/apu2/coreboot/util/crossgcc/xgcc
- git ls-remote https://github.com/pcengines/coreboot.git | grep ${CI_COMMIT_REF_NAME}
only:
- tags
- web
- tags

.build_rom_apu: &build_rom_apu
variables:
PLATFORM: apux
MANIFEST_FALLBACK_BRANCH: coreboot-xxxx
stage: build_rom
tags:
- docker
dependencies:
- build_crosscompiler
script:
- mkdir -p apu2_fw_rel && cd apu2_fw_rel
- if [ -n "$CI_COMMIT_TAG" ]; then REPO_REVISION="refs/tags/$CI_COMMIT_REF_NAME"; else REPO_REVISION="$CI_COMMIT_REF_NAME"; fi
- git ls-remote https://github.com/pcengines/coreboot.git | grep ${REPO_REVISION} || REPO_REVISION="$MANIFEST_FALLBACK_BRANCH"
- repo init -u https://github.com/pcengines/release_manifests.git -b ${REPO_REVISION}
- repo sync --force-sync
- cp ${CI_PROJECT_DIR}/configs/pcengines_${PLATFORM}.config ${CI_PROJECT_DIR}/apu2_fw_rel/apu2/coreboot/.config
- ${RELEASE_DIR}/apu2/apu2-documentation/scripts/build_release_img.sh build
cache:
policy: pull
key: apu
paths:
- ${RELEASE_DIR}/apu2/coreboot/util/crossgcc/xgcc
- git clone https://github.com/pcengines/pce-fw-builder.git /home/coreboot/pce-fw-builder
- cd /home/coreboot/pce-fw-builder
- git checkout `git describe --tags --abbrev=0`
- ./build.sh release-CI "${CI_COMMIT_REF_NAME}" "${PLATFORM}"
- cp -v /home/coreboot/release/${PLATFORM}_* ${RELEASE_DIR}
- ls -al ${RELEASE_DIR}
artifacts:
name: ${PLATFORM}
paths:
- ${RELEASE_DIR}/${PLATFORM}_*
only:
- tags
- web
- tags
- web

.test_rom: &test_rom
variables:
Expand All @@ -75,7 +51,6 @@ build_crosscompiler:
- ls -la ${RELEASE_DIR}/${PLATFORM}_*.rom
only:
- tags
- web

.sign_rom: &sign_rom
variables:
Expand All @@ -100,17 +75,18 @@ build_crosscompiler:
tags:
- docker
script:
- ls -al ${RELEASE_DIR}
- echo "curl -u ${UPLOADER_USERNAME}:${UPLOADER_PASSWORD} -X MKCOL ${UPLOADER_URL}/${PLATFORM}/; curl -u ${UPLOADER_USERNAME}:${UPLOADER_PASSWORD} -X MKCOL ${UPLOADER_URL}/${PLATFORM}/releases/"
- curl -u ${UPLOADER_USERNAME}:${UPLOADER_PASSWORD} -X MKCOL "${UPLOADER_URL}/${PLATFORM}/"; curl -u ${UPLOADER_USERNAME}:${UPLOADER_PASSWORD} -X MKCOL "${UPLOADER_URL}/${PLATFORM}/releases/"
- echo "for file in ${RELEASE_DIR}/${PLATFORM}_*.tar.gz; do curl --fail -u ${UPLOADER_USERNAME}:${UPLOADER_PASSWORD} -T ${file} ${UPLOADER_URL}/${PLATFORM}/releases/; done"
- for file in ${RELEASE_DIR}/${PLATFORM}_*.tar.gz; do curl --fail -u ${UPLOADER_USERNAME}:${UPLOADER_PASSWORD} -T ${file} "${UPLOADER_URL}/${PLATFORM}/releases/"; done
only:
- tags


build:apu2:
<<: *build_rom_apu
variables:
PLATFORM: apu2
MANIFEST_FALLBACK_BRANCH: coreboot-4.0.x

.test:apu2:
<<: *test_rom
Expand All @@ -132,7 +108,6 @@ build:apu3:
<<: *build_rom_apu
variables:
PLATFORM: apu3
MANIFEST_FALLBACK_BRANCH: coreboot-4.0.x

.test:apu3:
<<: *test_rom
Expand All @@ -154,7 +129,6 @@ build:apu4:
<<: *build_rom_apu
variables:
PLATFORM: apu4
MANIFEST_FALLBACK_BRANCH: coreboot-4.0.x

.test:apu4:
<<: *test_rom
Expand All @@ -176,7 +150,6 @@ build:apu5:
<<: *build_rom_apu
variables:
PLATFORM: apu5
MANIFEST_FALLBACK_BRANCH: coreboot-4.0.x

.test:apu5:
<<: *test_rom
Expand Down
12 changes: 11 additions & 1 deletion CHANGELOG.md
Expand Up @@ -8,6 +8,15 @@ Releases 4.5.x and 4.6.x are based on mainline support submitted in

## [Unreleased]

## [v4.0.17] - 2018-05-11
### Added
- Infrastructure to include microcode update
- Support for new building system pce-fw-builder

### Fixed
- Memtest86+ is now a part of coreboot build system and does not have to be
built externally

## [v4.0.16] - 2018-04-06
### Added
- APU4 target
Expand Down Expand Up @@ -157,7 +166,8 @@ Releases 4.5.x and 4.6.x are based on mainline support submitted in
- forced to use SD in 2.0 mode
- git repository in `Makefile`

[Unreleased]: https://github.com/pcengines/coreboot/compare/v4.0.16...coreboot-4.0.x
[Unreleased]: https://github.com/pcengines/coreboot/compare/v4.0.17...coreboot-4.0.x
[v4.0.17]: https://github.com/pcengines/coreboot/compare/v4.0.16...v4.0.17
[v4.0.16]: https://github.com/pcengines/coreboot/compare/v4.0.15...v4.0.16
[v4.0.15]: https://github.com/pcengines/coreboot/compare/v4.0.14...v4.0.15
[v4.0.14]: https://github.com/pcengines/coreboot/compare/v4.0.13...v4.0.14
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Expand Up @@ -281,6 +281,6 @@ clean-cscope:

distclean: clean
rm -f .config .config.old ..config.tmp .kconfig.d .tmpconfig* .ccwrap .xcompile
rm -rf payloads/external/SeaBIOS/seabios payloads/external/iPXE/ipxe payloads/external/sortbootorder/sortbootorder
rm -rf payloads/external/SeaBIOS/seabios payloads/external/iPXE/ipxe payloads/external/sortbootorder/sortbootorder payloads/external/Memtest86plus/memtest86plus

.PHONY: $(PHONY) clean clean-for-update clean-cscope cscope distclean doxygen doxy doxygen_simple
49 changes: 34 additions & 15 deletions Makefile.inc
Expand Up @@ -41,7 +41,11 @@ endif
#######################################################################
# Basic component discovery
MAINBOARDDIR=$(call strip_quotes,$(CONFIG_MAINBOARD_DIR))
VARIANT_DIR:=$(call strip_quotes,$(CONFIG_VARIANT_DIR))
CONFIG_DEVICETREE:=$(call strip_quotes,$(CONFIG_DEVICETREE))
export MAINBOARDDIR
export VARIANT_DIR


## Final build results, which CBFSTOOL uses to create the final
## rom image file, are placed under $(objcbfs).
Expand Down Expand Up @@ -366,13 +370,16 @@ subdirs-y += util/nvidia
#######################################################################
# needed objects that every mainboard uses
# Creation of these is architecture and mainboard independent
$(obj)/mainboard/$(MAINBOARDDIR)/static.c: $(src)/mainboard/$(MAINBOARDDIR)/devicetree.cb $(objutil)/sconfig/sconfig
DEVICETREE_FILE := $(src)/mainboard/$(MAINBOARDDIR)/$(CONFIG_DEVICETREE)
DEVICETREE_STATIC_C := $(obj)/mainboard/$(MAINBOARDDIR)/static.c

$(DEVICETREE_STATIC_C): $(DEVICETREE_FILE) $(objutil)/sconfig/sconfig
@printf " SCONFIG $(subst $(src)/,,$(<))\n"
mkdir -p $(obj)/mainboard/$(MAINBOARDDIR)
$(objutil)/sconfig/sconfig $(MAINBOARDDIR) $(obj)/mainboard/$(MAINBOARDDIR)
mkdir -p $(dir $(DEVICETREE_STATIC_C))
$(objutil)/sconfig/sconfig $(MAINBOARDDIR)/variants/$(CONFIG_VARIANT_DIR) $(obj)/mainboard/$(MAINBOARDDIR)

ramstage-y+=$(obj)/mainboard/$(MAINBOARDDIR)/static.c
romstage-y+=$(obj)/mainboard/$(MAINBOARDDIR)/static.c
ramstage-y+=$(DEVICETREE_STATIC_C)
romstage-y+=$(DEVICETREE_STATIC_C)

$(objutil)/%.o: $(objutil)/%.c
@printf " HOSTCC $(subst $(objutil)/,,$(@))\n"
Expand Down Expand Up @@ -525,15 +532,22 @@ endif
ifeq ($(CONFIG_PAYLOAD_SEABIOS),y)
COREBOOT_ROM_DEPENDENCIES+=seabios
endif
ifeq ($(CONFIG_SORTBOOTORDER),y)
COREBOOT_ROM_DEPENDENCIES+=sortbootorder
endif
ifeq ($(CONFIG_MEMTEST),y)
COREBOOT_ROM_DEPENDENCIES+=memtest
endif
ifeq ($(CONFIG_BUILD_IPXE),y)
COREBOOT_ROM_DEPENDENCIES+=ipxe
endif
ifeq ($(CONFIG_PAYLOAD_FILO),y)
COREBOOT_ROM_DEPENDENCIES+=filo
endif
ifeq ($(CONFIG_PAYLOAD_GRUB2),y)
COREBOOT_ROM_DEPENDENCIES+=grub2
endif
ifeq ($(CONFIG_SORTBOOTORDER),y)
COREBOOT_ROM_DEPENDENCIES+=sortbootorder
endif


extract_nth=$(patsubst -%-,%,$(word $(1), $(subst |,- -,-$(2)-)))

Expand All @@ -549,16 +563,16 @@ prebuild-files = \
$(if $(call extract_nth,6,$(file)),$(CBFSTOOL) $@.tmp locate -f $(call extract_nth,1,$(file)) -n $(call extract_nth,2,$(file)) -a $(call extract_nth,6,$(file))|xargs -i \
$(cbfs-add-cmd) -b {} &&,\
$(cbfs-add-cmd) $(if $(call extract_nth,5,$(file)),-b $(call extract_nth,5,$(file))) &&))
prebuilt-files = $(foreach file,$(cbfs-files), $(call extract_nth,1,$(file)))
prebuilt-files = $(foreach file,$(cbfs-files), $(call extract_nth,1,$(file)))

prebuild-fixed = \
$(foreach file,$(cbfs-fixed), \
$(CBFSTOOL) $@.tmp \
add$(if $(filter stage,$(call extract_nth,3,$(file))),-stage)$(if $(filter payload,$(call extract_nth,3,$(file))),-payload) \
-f $(call extract_nth,1,$(file)) \
-n $(call extract_nth,2,$(file)) $(if $(filter-out stage,$(call extract_nth,3,$(file))),-t $(call extract_nth,3,$(file))) \
$(if $(call extract_nth,5,$(file)),-b $(call extract_nth,5,$(file))) &&)
prebuilt-fixed = $(foreach file,$(cbfs-fixed), $(call extract_nth,1,$(file)))
$(if $(call extract_nth,5,$(file)),-b $(call extract_nth,5,$(file))) &&)
prebuilt-fixed = $(foreach file,$(cbfs-fixed), $(call extract_nth,1,$(file)))


$(obj)/coreboot.pre1: $(objcbfs)/bootblock.bin $$(prebuilt-files) $$(prebuilt-fixed) $(CBFSTOOL) $$(cpu_ucode_cbfs_file)
Expand Down Expand Up @@ -629,12 +643,17 @@ endif
ifeq ($(CONFIG_HAVE_REFCODE_BLOB),y)
$(CBFSTOOL) $@.tmp add-stage -f $(REFCODE_BLOB) -n $(CONFIG_CBFS_PREFIX)/refcode -c $(CBFS_COMPRESS_FLAG)
endif
ifeq ($(CONFIG_PXE_ROM),y)
$(CBFSTOOL) $@.tmp add -f $(CONFIG_PXE_ROM_FILE) -n pci$(CONFIG_PXE_ROM_ID).rom -t raw
endif
ifeq ($(CONFIG_SORTBOOTORDER),y)
$(CBFSTOOL) $@.tmp add-payload -f payloads/external/sortbootorder/sortbootorder/sortbootorder.elf -n img/setup -c $(CBFS_PAYLOAD_COMPRESS_FLAG)
$(CBFSTOOL) $@.tmp add-payload -f payloads/external/sortbootorder/sortbootorder/sortbootorder.elf -n img/setup
endif
ifeq ($(CONFIG_MEMTEST),y)
$(CBFSTOOL) $@.tmp add-payload -f payloads/external/Memtest86Plus/memtest86plus/memtest -n img/memtest
endif

ifeq ($(CONFIG_PXE_ROM)$(CONFIG_BUILD_IPXE),y)
$(CBFSTOOL) $@.tmp add -f $(PXE_ROM_FILE) -n genroms/pxe.rom -t raw
endif

ifeq ($(CONFIG_CPU_INTEL_FIRMWARE_INTERFACE_TABLE),y)
ifeq ($(CONFIG_CPU_MICROCODE_ADDED_DURING_BUILD),y)
@printf " UPDATE-FIT \n"
Expand Down
9 changes: 7 additions & 2 deletions configs/pcengines_apu2.config
Expand Up @@ -34,6 +34,8 @@ CONFIG_BOARD_PCENGINES_APU2=y
# CONFIG_BOARD_PCENGINES_APU4 is not set
# CONFIG_BOARD_PCENGINES_APU5 is not set
CONFIG_BOARD_SPECIFIC_OPTIONS=y
CONFIG_VARIANT_DIR="apu2"
CONFIG_DEVICETREE="variants/$(CONFIG_VARIANT_DIR)/devicetree.cb"
CONFIG_MAINBOARD_DIR="pcengines/apu2"
CONFIG_MAINBOARD_PART_NUMBER="apu2"
# CONFIG_SVI2_SLOW_SPEED is not set
Expand Down Expand Up @@ -428,8 +430,11 @@ CONFIG_BUILD_IPXE=y
CONFIG_IPXE_MASTER=y
# CONFIG_PXE_SERIAL_CONSOLE is not set
CONFIG_PXE_ROM_ID="8086,157b"
CONFIG_PXE_CUSTOM_GENERAL_H="../../../../apu2-documentation/ipxe/general.h"
CONFIG_PXE_CUSTOM_BOOTMENU_FILE="../../../../apu2-documentation/ipxe/menu.ipxe"
CONFIG_PXE_CUSTOM_GENERAL_H="general.h"
CONFIG_PXE_CUSTOM_BOOTMENU_FILE="menu.ipxe"
CONFIG_MEMTEST=y
CONFIG_MEMTEST_STABLE=y
# CONFIG_MEMTEST_MASTER is not set

#
# Debugging
Expand Down
11 changes: 8 additions & 3 deletions configs/pcengines_apu3.config
Expand Up @@ -34,7 +34,9 @@ CONFIG_BOARD_PCENGINES_APU3=y
# CONFIG_BOARD_PCENGINES_APU4 is not set
# CONFIG_BOARD_PCENGINES_APU5 is not set
CONFIG_BOARD_SPECIFIC_OPTIONS=y
CONFIG_MAINBOARD_DIR="pcengines/apu3"
CONFIG_VARIANT_DIR="apu3"
CONFIG_DEVICETREE="variants/$(CONFIG_VARIANT_DIR)/devicetree.cb"
CONFIG_MAINBOARD_DIR="pcengines/apu2"
CONFIG_MAINBOARD_PART_NUMBER="apu3"
# CONFIG_SVI2_SLOW_SPEED is not set
CONFIG_SVI_WAIT_COMP_DIS=y
Expand Down Expand Up @@ -428,8 +430,11 @@ CONFIG_BUILD_IPXE=y
CONFIG_IPXE_MASTER=y
# CONFIG_PXE_SERIAL_CONSOLE is not set
CONFIG_PXE_ROM_ID="8086,1539"
CONFIG_PXE_CUSTOM_GENERAL_H="../../../../apu2-documentation/ipxe/general.h"
CONFIG_PXE_CUSTOM_BOOTMENU_FILE="../../../../apu2-documentation/ipxe/menu.ipxe"
CONFIG_PXE_CUSTOM_GENERAL_H="general.h"
CONFIG_PXE_CUSTOM_BOOTMENU_FILE="menu.ipxe"
CONFIG_MEMTEST=y
CONFIG_MEMTEST_STABLE=y
# CONFIG_MEMTEST_MASTER is not set

#
# Debugging
Expand Down
11 changes: 8 additions & 3 deletions configs/pcengines_apu4.config
Expand Up @@ -34,7 +34,9 @@ CONFIG_VENDOR_PCENGINES=y
CONFIG_BOARD_PCENGINES_APU4=y
# CONFIG_BOARD_PCENGINES_APU5 is not set
CONFIG_BOARD_SPECIFIC_OPTIONS=y
CONFIG_MAINBOARD_DIR="pcengines/apu4"
CONFIG_VARIANT_DIR="apu4"
CONFIG_DEVICETREE="variants/$(CONFIG_VARIANT_DIR)/devicetree.cb"
CONFIG_MAINBOARD_DIR="pcengines/apu2"
CONFIG_MAINBOARD_PART_NUMBER="apu4"
# CONFIG_SVI2_SLOW_SPEED is not set
CONFIG_SVI_WAIT_COMP_DIS=y
Expand Down Expand Up @@ -428,8 +430,11 @@ CONFIG_BUILD_IPXE=y
CONFIG_IPXE_MASTER=y
# CONFIG_PXE_SERIAL_CONSOLE is not set
CONFIG_PXE_ROM_ID="8086,1539"
CONFIG_PXE_CUSTOM_GENERAL_H="../../../../apu2-documentation/ipxe/general.h"
CONFIG_PXE_CUSTOM_BOOTMENU_FILE="../../../../apu2-documentation/ipxe/menu.ipxe"
CONFIG_PXE_CUSTOM_GENERAL_H="general.h"
CONFIG_PXE_CUSTOM_BOOTMENU_FILE="menu.ipxe"
CONFIG_MEMTEST=y
CONFIG_MEMTEST_STABLE=y
# CONFIG_MEMTEST_MASTER is not set

#
# Debugging
Expand Down
11 changes: 8 additions & 3 deletions configs/pcengines_apu5.config
Expand Up @@ -34,7 +34,9 @@ CONFIG_VENDOR_PCENGINES=y
# CONFIG_BOARD_PCENGINES_APU4 is not set
CONFIG_BOARD_PCENGINES_APU5=y
CONFIG_BOARD_SPECIFIC_OPTIONS=y
CONFIG_MAINBOARD_DIR="pcengines/apu5"
CONFIG_VARIANT_DIR="apu5"
CONFIG_DEVICETREE="variants/$(CONFIG_VARIANT_DIR)/devicetree.cb"
CONFIG_MAINBOARD_DIR="pcengines/apu2"
CONFIG_MAINBOARD_PART_NUMBER="apu5"
# CONFIG_SVI2_SLOW_SPEED is not set
CONFIG_SVI_WAIT_COMP_DIS=y
Expand Down Expand Up @@ -428,8 +430,11 @@ CONFIG_BUILD_IPXE=y
CONFIG_IPXE_MASTER=y
# CONFIG_PXE_SERIAL_CONSOLE is not set
CONFIG_PXE_ROM_ID="8086,1539"
CONFIG_PXE_CUSTOM_GENERAL_H="../../../../apu2-documentation/ipxe/general.h"
CONFIG_PXE_CUSTOM_BOOTMENU_FILE="../../../../apu2-documentation/ipxe/menu.ipxe"
CONFIG_PXE_CUSTOM_GENERAL_H="general.h"
CONFIG_PXE_CUSTOM_BOOTMENU_FILE="menu.ipxe"
CONFIG_MEMTEST=y
CONFIG_MEMTEST_STABLE=y
# CONFIG_MEMTEST_MASTER is not set

#
# Debugging
Expand Down