2020-11-25 13:43:07 +00:00
|
|
|
ifeq "$(CONFIG_COREBOOT)" "y"
|
|
|
|
|
2021-07-20 20:48:08 +00:00
|
|
|
CONFIG_COREBOOT_ROM ?= coreboot.rom
|
|
|
|
CONFIG_COREBOOT_BOOTBLOCK ?=
|
|
|
|
|
2021-07-18 17:34:20 +00:00
|
|
|
ifeq "$(CONFIG_TARGET_ARCH)" "x86"
|
|
|
|
COREBOOT_TARGET := i386
|
|
|
|
LINUX_IMAGE_FILE := bzImage
|
2023-08-10 18:01:02 +00:00
|
|
|
COREBOOT_TARGET_CROSS :=
|
2021-07-18 17:34:20 +00:00
|
|
|
else ifeq "$(CONFIG_TARGET_ARCH)" "ppc64"
|
|
|
|
COREBOOT_TARGET := ppc64
|
|
|
|
LINUX_IMAGE_FILE := zImage
|
2023-08-10 18:01:02 +00:00
|
|
|
# skiboot payload needs this to find the cross compiler, it can't find
|
|
|
|
# it from XGCCPATH. This uses the Heads toolchain for skiboot
|
|
|
|
COREBOOT_TARGET_CROSS := CROSS=$(CROSS)
|
2021-07-18 17:34:20 +00:00
|
|
|
else
|
|
|
|
$(error "$(CONFIG_TARGET_ARCH) target isn't supported by this module")
|
|
|
|
endif
|
|
|
|
|
2023-08-10 20:48:05 +00:00
|
|
|
# Each coreboot version is defined as a separate module, but only the needed
|
|
|
|
# modules become dependencies of the current board. One coreboot version is
|
|
|
|
# selected for the toolchain build and firmware build. These can be the same
|
|
|
|
# (when using a coreboot release) or different (when using a fork that reuses a
|
|
|
|
# release's toolchain).
|
|
|
|
|
|
|
|
# Define a coreboot module. Parameters:
|
|
|
|
# $1 - module version
|
|
|
|
# $2 - toolchain coreboot version - if nonempty, uses the toolchain from this
|
|
|
|
# version (use for forks to avoid building extra copies of the same
|
|
|
|
# toolchain)
|
|
|
|
#
|
|
|
|
# For a coreboot release:
|
|
|
|
# - the version is the coreboot release version
|
|
|
|
# - set coreboot-<version>_hash to the tarball hash
|
|
|
|
# - set coreboot-blobs-<version>_hash to the blobs tarball hash
|
|
|
|
#
|
|
|
|
# For a git fork:
|
|
|
|
# - the version is the name of the fork (just controls the build directory used)
|
|
|
|
# - set coreboot-<version>_repo to the git repo address
|
|
|
|
# - set coreboot-<version>_commit_hash to the git commit
|
|
|
|
define coreboot_module =
|
|
|
|
coreboot-$(1)_version := $(1)
|
|
|
|
coreboot-$(1)_module_file := coreboot
|
|
|
|
coreboot-$(1)_base_dir := coreboot-$(1)
|
|
|
|
coreboot-$(1)_dir := coreboot-$(1)/$(BOARD)
|
|
|
|
coreboot-$(1)_toolchain := $(2)
|
|
|
|
# These are ignored if this version is a git fork
|
|
|
|
coreboot-$(1)_tar := coreboot-$(1).tar.xz
|
|
|
|
coreboot-$(1)_url := https://www.coreboot.org/releases/coreboot-$(1).tar.xz
|
|
|
|
# These are only used for releases, git forks don't use upstream blobs
|
|
|
|
coreboot-blobs-$(1)_version := $(1)
|
|
|
|
coreboot-blobs-$(1)_module_file := coreboot
|
|
|
|
coreboot-blobs-$(1)_dir := coreboot-$(1)/3rdparty
|
|
|
|
coreboot-blobs-$(1)_tar := coreboot-blobs-$(1).tar.xz
|
|
|
|
coreboot-blobs-$(1)_url := https://www.coreboot.org/releases/coreboot-blobs-$(1).tar.xz
|
|
|
|
coreboot-blobs-$(1)_tar_opt := --strip 2
|
|
|
|
endef
|
|
|
|
|
|
|
|
# coreboot releases
|
|
|
|
|
|
|
|
coreboot-4.11_hash := 97fd859b4c39a25534fe33c30eb86e54a233952e08a024c55858d11598a8ad87
|
|
|
|
coreboot-blobs-4.11_hash := aa7855c5bd385b3360dadc043ea6bc93f564e6e4840d9b3ee5b9e696bbd055db
|
|
|
|
$(eval $(call coreboot_module,4.11,))
|
|
|
|
|
|
|
|
coreboot-4.19_hash := 65ccb2f46535b996e0066a1b76f81c8cf1ff3e27df84b3f97d8ad7b3e7cf0a43
|
|
|
|
coreboot-blobs-4.19_hash := 30214caed07b25f11e47bec022ff6234841376e36689eb674de2330a3e980cbc
|
|
|
|
$(eval $(call coreboot_module,4.19,))
|
|
|
|
|
|
|
|
coreboot-4.20.1_hash := b41539a8c2eab2fec752157eb4acbd0e2a637a7203530c12e66b43a5c3c3a931
|
|
|
|
coreboot-blobs-4.20.1_hash := 30f9d8618e78d483d0903976982485e70825ca3469efd17902c9246aaefd7c4a
|
|
|
|
$(eval $(call coreboot_module,4.20.1,))
|
|
|
|
|
|
|
|
# coreboot git forks
|
|
|
|
|
|
|
|
coreboot-talos_2_repo := https://github.com/Dasharo/coreboot
|
|
|
|
coreboot-talos_2_commit_hash := c8aed443c631042ad2b0326c35cd0b774752b924
|
|
|
|
$(eval $(call coreboot_module,talos_2,4.20.1))
|
|
|
|
|
|
|
|
coreboot-purism_repo := https://source.puri.sm/firmware/coreboot.git
|
|
|
|
coreboot-purism_commit_hash := a899f08d2789db1dd9b02cff34179c4d38e6d0e3
|
|
|
|
$(eval $(call coreboot_module,purism,4.20.1))
|
|
|
|
|
|
|
|
# Check that the board configured the coreboot version correctly
|
|
|
|
ifeq "$(CONFIG_COREBOOT_VERSION)" ""
|
2020-08-20 19:15:46 +00:00
|
|
|
$(error "$(BOARD): does not specify coreboot version under CONFIG_COREBOOT_VERSION")
|
2023-08-10 20:48:05 +00:00
|
|
|
else ifeq "$(coreboot-$(CONFIG_COREBOOT_VERSION)_dir)" ""
|
|
|
|
$(error "$(BOARD): coreboot version $(CONFIG_COREBOOT_VERSION) not known"
|
2020-07-10 13:44:01 +00:00
|
|
|
endif
|
|
|
|
|
2023-08-10 20:48:05 +00:00
|
|
|
coreboot_module := coreboot-$(CONFIG_COREBOOT_VERSION)
|
|
|
|
modules-y += $(coreboot_module)
|
|
|
|
# Don't make everyone type $($(coreboot_module)_dir)
|
|
|
|
coreboot_dir := $($(coreboot_module)_dir)
|
|
|
|
coreboot_base_dir := $($(coreboot_module)_base_dir)
|
2023-08-10 17:35:04 +00:00
|
|
|
|
2023-08-10 20:48:05 +00:00
|
|
|
$(coreboot_module)_depends := $(if $(CONFIG_PURISM_BLOBS), purism-blobs)
|
|
|
|
$(coreboot_module)_depends := $(if $(CONFIG_NITROKEY_BLOBS), nitrokey-blobs)
|
2016-08-19 15:31:07 +00:00
|
|
|
|
2020-01-08 16:08:15 +00:00
|
|
|
# coreboot builds are specialized on a per-target basis.
|
2016-11-23 17:11:08 +00:00
|
|
|
# The builds are done in a per-target subdirectory
|
2018-02-05 16:56:15 +00:00
|
|
|
CONFIG_COREBOOT_CONFIG ?= config/coreboot-$(BOARD).config
|
2016-11-23 17:11:08 +00:00
|
|
|
|
2018-05-03 20:47:09 +00:00
|
|
|
# Ensure that touching the config file will force a rebuild
|
|
|
|
$(build)/$(coreboot_dir)/.configured: $(CONFIG_COREBOOT_CONFIG)
|
|
|
|
|
2023-08-10 17:35:04 +00:00
|
|
|
EXTRA_FLAGS ?= -fdebug-prefix-map=$(pwd)=heads -gno-record-gcc-switches -Wno-error=packed-not-aligned -Wno-address-of-packed-member
|
2017-01-29 01:21:47 +00:00
|
|
|
|
2023-08-10 20:48:05 +00:00
|
|
|
$(coreboot_module)_configure := \
|
2018-08-13 14:26:08 +00:00
|
|
|
mkdir -p "$(build)/$(coreboot_dir)" \
|
2022-08-16 16:39:33 +00:00
|
|
|
&& $(call install_config,$(pwd)/$(CONFIG_COREBOOT_CONFIG),$(build)/$(coreboot_dir)/.config) \
|
2023-06-21 18:19:41 +00:00
|
|
|
&& echo 'CONFIG_LOCALVERSION="$(BRAND_NAME)-$(HEADS_GIT_VERSION)"' >> $(build)/$(coreboot_dir)/.config \
|
2020-10-21 15:04:27 +00:00
|
|
|
&& echo 'CONFIG_MAINBOARD_SMBIOS_PRODUCT_NAME="$(BOARD)"' >> $(build)/$(coreboot_dir)/.config \
|
2018-08-13 14:26:08 +00:00
|
|
|
&& $(MAKE) olddefconfig \
|
|
|
|
-C "$(build)/$(coreboot_base_dir)" \
|
|
|
|
obj="$(build)/$(coreboot_dir)" \
|
2018-10-27 21:03:45 +00:00
|
|
|
DOTCONFIG="$(build)/$(coreboot_dir)/.config" \
|
2017-02-01 18:39:56 +00:00
|
|
|
BUILD_TIMELESS=1 \
|
2017-01-29 01:21:47 +00:00
|
|
|
CFLAGS_x86_32="$(EXTRA_FLAGS)" \
|
|
|
|
CFLAGS_x86_64="$(EXTRA_FLAGS)" \
|
2016-11-23 17:11:08 +00:00
|
|
|
|
2023-08-10 20:48:05 +00:00
|
|
|
$(coreboot_module)_target := \
|
2018-08-13 14:26:08 +00:00
|
|
|
-C "$(build)/$(coreboot_base_dir)" \
|
|
|
|
obj="$(build)/$(coreboot_dir)" \
|
2018-10-27 21:03:45 +00:00
|
|
|
DOTCONFIG="$(build)/$(coreboot_dir)/.config" \
|
2023-04-21 20:54:48 +00:00
|
|
|
xcompile="$(build)/$(coreboot_base_dir)/.xcompile" \
|
2023-08-10 18:01:02 +00:00
|
|
|
$(COREBOOT_TARGET_CROSS) \
|
2017-02-01 18:39:56 +00:00
|
|
|
BUILD_TIMELESS=1 \
|
2017-01-29 01:21:47 +00:00
|
|
|
CFLAGS_x86_32="$(EXTRA_FLAGS)" \
|
|
|
|
CFLAGS_x86_64="$(EXTRA_FLAGS)" \
|
2017-03-21 18:29:07 +00:00
|
|
|
$(MAKE_JOBS)
|
2016-11-23 17:11:08 +00:00
|
|
|
|
2023-08-10 20:48:05 +00:00
|
|
|
$(coreboot_module)_output := $(CONFIG_COREBOOT_ROM)
|
|
|
|
$(coreboot_module)_output += $(CONFIG_COREBOOT_BOOTBLOCK)
|
|
|
|
$(coreboot_module)_depend += linux initrd $(musl_dep)
|
2018-09-18 19:59:48 +00:00
|
|
|
|
modules/coreboot: Do not rebuild coreboot buildstack when built
.xcompile was not found because it was quoted and shouldn't in coreboot module's makefile
Prior:
stat("\"/home/user/heads/build/x86/coreboot-4.13/.xcompile\"", 0x7ffe56e6cfd0) = -1 ENOENT (No such file or directory)
pipe([3, 4]) = 0
fcntl(4, F_GETFD) = 0
fcntl(4, F_SETFD, FD_CLOEXEC) = 0
fcntl(3, F_GETFD) = 0
fcntl(3, F_SETFD, FD_CLOEXEC) = 0
prlimit64(0, RLIMIT_NOFILE, NULL, {rlim_cur=1024, rlim_max=1024*1024}) = 0
prlimit64(0, RLIMIT_NOFILE, NULL, {rlim_cur=1024, rlim_max=1024*1024}) = 0
stat("/usr/bin/env", {st_mode=S_IFREG|0755, st_size=48480, ...}) = 0
geteuid() = 1000
getegid() = 1000
getuid() = 1000
getgid() = 1000
access("/usr/bin/env", X_OK) = 0
mmap(NULL, 36864, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_STACK, -1, 0) = 0x7ce2be6fd000
rt_sigprocmask(SIG_BLOCK, ~[], [CHLD], 8) = 0
clone(child_stack=0x7ce2be705ff0, flags=CLONE_VM|CLONE_VFORK|SIGCHLD) = 305342
munmap(0x7ce2be6fd000, 36864) = 0
rt_sigprocmask(SIG_SETMASK, [CHLD], NULL, 8) = 0
close(4) = 0
read(3, "2\n", 200) = 2
read(3, "", 198) = 0
close(3) = 0
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 305342
fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(0x88, 0), ...}) = 0
write(1, "make -C \"/home/user/heads/build/"..., 74make -C "/home/user/heads/build/x86/coreboot-4.13" CPUS=2 "crossgcc-i386"
) = 74
rt_sigprocmask(SIG_BLOCK, [HUP INT QUIT TERM XCPU XFSZ], NULL, 8) = 0
stat("/usr/bin/env", {st_mode=S_IFREG|0755, st_size=48480, ...}) = 0
geteuid() = 1000
getegid() = 1000
getuid() = 1000
getgid() = 1000
access("/usr/bin/env", X_OK) = 0
mmap(NULL, 36864, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_STACK, -1, 0) = 0x7ce2be6fd000
rt_sigprocmask(SIG_BLOCK, ~[], [HUP INT QUIT TERM CHLD XCPU XFSZ], 8) = 0
clone(child_stack=0x7ce2be705ff0, flags=CLONE_VM|CLONE_VFORK|SIGCHLD) = 305343
munmap(0x7ce2be6fd000, 36864) = 0
rt_sigprocmask(SIG_SETMASK, [HUP INT QUIT TERM CHLD XCPU XFSZ], NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [HUP INT QUIT TERM XCPU XFSZ], NULL, 8) = 0
wait4(-1, make[1]: Entering directory '/home/user/heads/build/x86/coreboot-4.13'
Welcome to the coreboot cross toolchain builder v ()
Building toolchain using 2 thread(s).
Target architecture is i386-elf
Found compatible Ada compiler, enabling Ada support by default.
Downloading and verifying tarballs ...
* gmp-6.2.0.tar.xz (cached)... hash verified (052a5411dc74054240eec58132d2cf41211d0ff6)
* mpfr-4.1.0.tar.xz (cached)... hash verified (159c3a58705662bfde4dc93f2617f3660855ead6)
* mpc-1.2.0.tar.gz (cached)... hash verified (0abdc94acab0c9bfdaa391347cdfd7bbdb1cf017)
* binutils-2.35.tar.xz (cached)... hash verified (6bdd090ce268b6d6c3442516021c4e4b5019e303)
* gcc-8.3.0.tar.xz (cached)... hash verified (c27f4499dd263fe4fb01bcc5565917f3698583b2)
Downloaded tarballs ... ok
Unpacking and patching ...
* gmp-6.2.0.tar.xz
o gmp-6.2.0_generic-build.patch
* mpfr-4.1.0.tar.xz
^C0x7ffe56e6ef40, 0, NULL) = ? ERESTARTSYS (To be restarted if SA_RESTART is set)
strace: Process 305153 detached
After:
stat("/home/user/heads/build/x86/coreboot-4.13/.xcompile", 0x7ffd0303c7f0) = -1 ENOENT (No such file or directory)
pipe([3, 4]) = 0
fcntl(4, F_GETFD) = 0
fcntl(4, F_SETFD, FD_CLOEXEC) = 0
fcntl(3, F_GETFD) = 0
fcntl(3, F_SETFD, FD_CLOEXEC) = 0
prlimit64(0, RLIMIT_NOFILE, NULL, {rlim_cur=1024, rlim_max=1024*1024}) = 0
prlimit64(0, RLIMIT_NOFILE, NULL, {rlim_cur=1024, rlim_max=1024*1024}) = 0
stat("/usr/bin/env", {st_mode=S_IFREG|0755, st_size=48480, ...}) = 0
geteuid() = 1000
getegid() = 1000
getuid() = 1000
getgid() = 1000
access("/usr/bin/env", X_OK) = 0
mmap(NULL, 36864, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_STACK, -1, 0) = 0x740f6e370000
rt_sigprocmask(SIG_BLOCK, ~[], [CHLD], 8) = 0
clone(child_stack=0x740f6e378ff0, flags=CLONE_VM|CLONE_VFORK|SIGCHLD) = 306024
munmap(0x740f6e370000, 36864) = 0
rt_sigprocmask(SIG_SETMASK, [CHLD], NULL, 8) = 0
close(4) = 0
read(3, "2\n", 200) = 2
read(3, "", 198) = 0
close(3) = 0
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 306024
fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(0x88, 0), ...}) = 0
write(1, "make -C \"/home/user/heads/build/"..., 74make -C "/home/user/heads/build/x86/coreboot-4.13" CPUS=2 "crossgcc-i386"
) = 74
rt_sigprocmask(SIG_BLOCK, [HUP INT QUIT TERM XCPU XFSZ], NULL, 8) = 0
stat("/usr/bin/env", {st_mode=S_IFREG|0755, st_size=48480, ...}) = 0
geteuid() = 1000
getegid() = 1000
getuid() = 1000
getgid() = 1000
access("/usr/bin/env", X_OK) = 0
mmap(NULL, 36864, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_STACK, -1, 0) = 0x740f6e370000
rt_sigprocmask(SIG_BLOCK, ~[], [HUP INT QUIT TERM CHLD XCPU XFSZ], 8) = 0
clone(child_stack=0x740f6e378ff0, flags=CLONE_VM|CLONE_VFORK|SIGCHLD) = 306025
munmap(0x740f6e370000, 36864) = 0
rt_sigprocmask(SIG_SETMASK, [HUP INT QUIT TERM CHLD XCPU XFSZ], NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [HUP INT QUIT TERM XCPU XFSZ], NULL, 8) = 0
wait4(-1, make[1]: Entering directory '/home/user/heads/build/x86/coreboot-4.13'
Welcome to the coreboot cross toolchain builder v ()
Building toolchain using 2 thread(s).
Target architecture is i386-elf
Found compatible Ada compiler, enabling Ada support by default.
Downloading and verifying tarballs ...
* gmp-6.2.0.tar.xz (cached)... hash verified (052a5411dc74054240eec58132d2cf41211d0ff6)
* mpfr-4.1.0.tar.xz (cached)... hash verified (159c3a58705662bfde4dc93f2617f3660855ead6)
* mpc-1.2.0.tar.gz (cached)... hash verified (0abdc94acab0c9bfdaa391347cdfd7bbdb1cf017)
* binutils-2.35.tar.xz (cached)... hash verified (6bdd090ce268b6d6c3442516021c4e4b5019e303)
* gcc-8.3.0.tar.xz (cached)... hash verified (c27f4499dd263fe4fb01bcc5565917f3698583b2)
Downloaded tarballs ... ok
Unpacking and patching ...
* mpfr-4.1.0.tar.xz
* mpc-1.2.0.tar.gz
* binutils-2.35.tar.xz
^C0x7ffd0303e760, 0, NULL) = ? ERESTARTSYS (To be restarted if SA_RESTART is set)
strace: Process 305835 detached
So coreboot buildstack is built once per version and then reused on next board builds.
Saves precious CI and local builds when developing with qemu/kvm.
2023-03-07 20:38:44 +00:00
|
|
|
COREBOOT_TOOLCHAIN=$(build)/$(coreboot_base_dir)/.xcompile
|
2020-12-22 21:25:09 +00:00
|
|
|
$(COREBOOT_TOOLCHAIN): $(build)/$(coreboot_base_dir)/.canary
|
2021-07-18 17:34:20 +00:00
|
|
|
$(MAKE) -C "$(build)/$(coreboot_base_dir)" CPUS=$(CPUS) "crossgcc-$(COREBOOT_TARGET)"
|
2020-12-22 21:25:09 +00:00
|
|
|
|
2022-01-28 23:12:58 +00:00
|
|
|
$(build)/$(coreboot_dir)/.configured: $(COREBOOT_TOOLCHAIN)
|
2018-05-02 15:38:39 +00:00
|
|
|
|
|
|
|
# Force a rebuild if the inputs have changed
|
|
|
|
$(build)/$(coreboot_dir)/.build: \
|
2021-07-18 17:34:20 +00:00
|
|
|
$(build)/$(BOARD)/$(LINUX_IMAGE_FILE) \
|
2018-05-02 15:38:39 +00:00
|
|
|
$(build)/$(BOARD)/initrd.cpio.xz \
|
|
|
|
|
2018-05-02 18:53:54 +00:00
|
|
|
# This produces a ROM image that is written with the flashrom program
|
2020-10-21 15:04:27 +00:00
|
|
|
ifneq ($(CONFIG_COREBOOT),)
|
2021-07-20 20:48:08 +00:00
|
|
|
|
2020-10-21 15:04:27 +00:00
|
|
|
$(build)/$(BOARD)/$(CB_OUTPUT_FILE): $(build)/$(coreboot_dir)/.build
|
2021-07-20 20:48:08 +00:00
|
|
|
# Use coreboot.rom, because custom output files might not be processed by cbfstool
|
2018-05-02 18:53:54 +00:00
|
|
|
"$(build)/$(coreboot_dir)/cbfstool" "$(dir $<)coreboot.rom" print
|
2021-07-20 20:48:08 +00:00
|
|
|
$(call do-copy,$(dir $<)$(CONFIG_COREBOOT_ROM),$@)
|
|
|
|
@touch $@ # update the time stamp
|
|
|
|
|
|
|
|
ifneq ($(CONFIG_COREBOOT_BOOTBLOCK),)
|
|
|
|
$(build)/$(BOARD)/$(CB_BOOTBLOCK_FILE): $(build)/$(coreboot_dir)/.build
|
|
|
|
$(call do-copy,$(dir $<)$(CONFIG_COREBOOT_BOOTBLOCK),$@)
|
2018-05-02 18:53:54 +00:00
|
|
|
@touch $@ # update the time stamp
|
2020-10-21 15:04:27 +00:00
|
|
|
endif
|
2016-08-14 20:03:11 +00:00
|
|
|
|
2021-07-20 20:48:08 +00:00
|
|
|
endif
|
|
|
|
|
2018-02-13 18:20:04 +00:00
|
|
|
#
|
|
|
|
# Helpful target for reconfiguring the coreboot target
|
|
|
|
#
|
2023-04-19 14:04:53 +00:00
|
|
|
coreboot.save_in_defconfig_format_in_place:
|
|
|
|
mkdir -p "$(build)/$(coreboot_dir)" && \
|
|
|
|
cp "$(pwd)/$(CONFIG_COREBOOT_CONFIG)" "$(build)/$(coreboot_dir)/.config" && \
|
2018-02-13 18:20:04 +00:00
|
|
|
$(MAKE) \
|
2018-05-02 15:38:39 +00:00
|
|
|
-C "$(build)/$(coreboot_base_dir)" \
|
2018-08-13 14:26:08 +00:00
|
|
|
DOTCONFIG="$(build)/$(coreboot_dir)/.config" \
|
2023-04-19 14:04:53 +00:00
|
|
|
olddefconfig && \
|
2018-08-13 14:26:08 +00:00
|
|
|
$(MAKE) \
|
|
|
|
-C "$(build)/$(coreboot_base_dir)" \
|
2023-04-19 14:04:53 +00:00
|
|
|
DOTCONFIG="$(build)/$(coreboot_dir)/.config" \
|
|
|
|
savedefconfig && \
|
|
|
|
mv "$(build)/$(coreboot_base_dir)/defconfig" "$(pwd)/$(CONFIG_COREBOOT_CONFIG)"
|
|
|
|
|
|
|
|
coreboot.save_in_oldconfig_format_in_place:
|
|
|
|
mkdir -p "$(build)/$(coreboot_dir)" && \
|
|
|
|
cp "$(pwd)/$(CONFIG_COREBOOT_CONFIG)" "$(build)/$(coreboot_dir)/.config" && \
|
2023-04-19 14:04:53 +00:00
|
|
|
$(MAKE) \
|
|
|
|
-C "$(build)/$(coreboot_base_dir)" \
|
2023-04-19 14:04:53 +00:00
|
|
|
DOTCONFIG="$(build)/$(coreboot_dir)/.config" \
|
|
|
|
olddefconfig \
|
|
|
|
&& mv "$(build)/$(coreboot_dir)/.config" "$(pwd)/$(CONFIG_COREBOOT_CONFIG)"
|
2023-04-19 14:04:53 +00:00
|
|
|
|
2023-04-19 14:04:53 +00:00
|
|
|
coreboot.modify_defconfig_in_place:
|
|
|
|
mkdir -p "$(build)/$(coreboot_dir)" && \
|
|
|
|
cp "$(pwd)/$(CONFIG_COREBOOT_CONFIG)" "$(build)/$(coreboot_dir)/.config" && \
|
2023-04-19 14:04:53 +00:00
|
|
|
$(MAKE) \
|
|
|
|
-C "$(build)/$(coreboot_base_dir)" \
|
2023-04-19 14:04:53 +00:00
|
|
|
DOTCONFIG="$(build)/$(coreboot_dir)/.config" \
|
2023-04-19 14:04:53 +00:00
|
|
|
menuconfig \
|
|
|
|
&& $(MAKE) \
|
|
|
|
-C "$(build)/$(coreboot_base_dir)" \
|
2023-04-19 14:04:53 +00:00
|
|
|
DOTCONFIG="$(build)/$(coreboot_dir)/.config" \
|
2023-04-19 14:04:53 +00:00
|
|
|
DEFCONFIG="$(pwd)/$(CONFIG_COREBOOT_CONFIG)" \
|
2023-04-19 14:04:53 +00:00
|
|
|
savedefconfig
|
2023-04-19 14:04:53 +00:00
|
|
|
|
|
|
|
coreboot.modify_and_save_oldconfig_in_place:
|
2023-04-19 14:04:53 +00:00
|
|
|
mkdir -p "$(build)/$(coreboot_dir)" && \
|
2023-04-19 14:04:53 +00:00
|
|
|
$(MAKE) menuconfig \
|
|
|
|
-C "$(build)/$(coreboot_base_dir)" \
|
|
|
|
obj="$(build)/$(coreboot_dir)" \
|
|
|
|
DOTCONFIG="$(pwd)/$(CONFIG_COREBOOT_CONFIG)"
|
2017-02-01 16:50:52 +00:00
|
|
|
|
|
|
|
# if we are not building from a git checkout,
|
|
|
|
# we must also download the coreboot-blobs tree
|
2023-08-10 20:48:05 +00:00
|
|
|
ifeq "$($(coreboot_module)_repo)" ""
|
2018-02-05 16:56:15 +00:00
|
|
|
|
2023-08-10 20:48:05 +00:00
|
|
|
coreboot-blobs_module := coreboot-blobs-$(CONFIG_COREBOOT_VERSION)
|
2017-02-01 16:50:52 +00:00
|
|
|
|
2023-08-10 20:48:05 +00:00
|
|
|
$(coreboot_module)_depends += $(coreboot-blobs_module)
|
|
|
|
modules-y += $(coreboot-blobs_module)
|
2017-02-01 16:50:52 +00:00
|
|
|
|
2016-08-14 20:03:11 +00:00
|
|
|
## there is nothing to build for the blobs, this should be
|
|
|
|
## made easier to make happen
|
2023-08-10 20:48:05 +00:00
|
|
|
$(coreboot-blobs_module)_output := .built
|
|
|
|
$(coreboot-blobs_module)_configure := echo -e 'all:\n\ttouch .built' > Makefile
|
2016-08-14 20:03:11 +00:00
|
|
|
|
2017-02-01 16:50:52 +00:00
|
|
|
endif
|
2020-11-25 13:43:07 +00:00
|
|
|
endif
|