aboutsummaryrefslogtreecommitdiff
path: root/projects
diff options
context:
space:
mode:
Diffstat (limited to 'projects')
-rwxr-xr-xprojects/coreboot/coreboot15
-rwxr-xr-xprojects/coreboot/coreboot-helper4
2 files changed, 16 insertions, 3 deletions
diff --git a/projects/coreboot/coreboot b/projects/coreboot/coreboot
index a8e13d8f..48da5939 100755
--- a/projects/coreboot/coreboot
+++ b/projects/coreboot/coreboot
@@ -66,7 +66,7 @@ build() {
local sources_path=$(project_sources_path "$project" "$repository" "$board" "$@")
local build_path=$(project_build_path "$project" "$board" "$@")
- local config_path=$(coreboot_config_path "$board" "$@")
+ local base_config_path=$(coreboot_config_path "$board" "$@")
local variant_config_path="$(coreboot_variant_config_path "$board" "$@")"
local arch=$(coreboot_arch "$board" "$@")
@@ -75,8 +75,17 @@ build() {
local crossgcc_bin_path="$crossgcc_build_path/bin/"
local vboot_sources_path=$(project_sources_path "vboot" "vboot" "devices")
+ local -i base_config_line_count="$(wc -l < "$base_config_path")"
+ local -a base_config_overrides
local -a board_variant_config
+ # To only get overrides, trim out base config since
+ # we cannot skip it in project_file_contents_herit()
+ mapfile -t base_config_overrides \
+ < <(tail -n +$(($base_config_line_count+1)) \
+ < <(coreboot_config "$board" "$@") \
+ 2>/dev/null)
+
mapfile -t board_variant_config < "$variant_config_path"
if git_project_check "$repository"
@@ -90,8 +99,8 @@ build() {
mkdir -p "$build_path"
- make -C "$sources_path" obj="$build_path" DOTCONFIG="$build_path/.config" XGCCPATH="$crossgcc_bin_path" BUILD_TIMELESS=1 KERNELVERSION="$VERSION" KBUILD_DEFCONFIG="$config_path" "${board_variant_config[@]}" "defconfig"
- make -C "$sources_path" obj="$build_path" DOTCONFIG="$build_path/.config" XGCCPATH="$crossgcc_bin_path" BUILD_TIMELESS=1 KERNELVERSION="$VERSION" VBOOT_SOURCE="$vboot_sources_path" "${board_variant_config[@]}" -j$TASKS
+ make -C "$sources_path" obj="$build_path" DOTCONFIG="$build_path/.config" XGCCPATH="$crossgcc_bin_path" BUILD_TIMELESS=1 KERNELVERSION="$VERSION" KBUILD_DEFCONFIG="$base_config_path" "${board_variant_config[@]}" "${base_config_overrides[@]}" "defconfig"
+ make -C "$sources_path" obj="$build_path" DOTCONFIG="$build_path/.config" XGCCPATH="$crossgcc_bin_path" BUILD_TIMELESS=1 KERNELVERSION="$VERSION" VBOOT_SOURCE="$vboot_sources_path" "${board_variant_config[@]}" "${base_config_overrides[@]}" -j$TASKS
rm -f "$sources_path/.xcompile"
}
diff --git a/projects/coreboot/coreboot-helper b/projects/coreboot/coreboot-helper
index ad696a16..d32ccb67 100755
--- a/projects/coreboot/coreboot-helper
+++ b/projects/coreboot/coreboot-helper
@@ -25,6 +25,10 @@ coreboot_arch() {
project_file_contents "$project" "$CONFIGS" "$ARCH" "$@"
}
+coreboot_config() {
+ project_file_contents_herit "$project" "$CONFIGS" "$CONFIG" "$@"
+}
+
coreboot_config_path() {
project_file_path "$project" "$CONFIGS" "$CONFIG" "$@"
}