mirror of
https://github.com/linuxboot/heads.git
synced 2024-12-18 20:47:55 +00:00
x230 build works on the NERF tree (#305)
Fix FAST=1 builds to actually be fast.
This commit is contained in:
parent
9c92a1ff4d
commit
47a94da5ed
28
Makefile
28
Makefile
@ -100,7 +100,7 @@ CROSS_TOOLS := \
|
|||||||
|
|
||||||
|
|
||||||
ifeq "$(CONFIG_COREBOOT)" "y"
|
ifeq "$(CONFIG_COREBOOT)" "y"
|
||||||
all: $(BOARD).rom
|
all: $(build)/$(BOARD)/coreboot.rom
|
||||||
else ifeq "$(CONFIG_LINUXBOOT)" "y"
|
else ifeq "$(CONFIG_LINUXBOOT)" "y"
|
||||||
all: $(build)/$(BOARD)/linuxboot.rom
|
all: $(build)/$(BOARD)/linuxboot.rom
|
||||||
else
|
else
|
||||||
@ -416,33 +416,13 @@ $(build)/$(BOARD)/tools.cpio: \
|
|||||||
@$(RM) -rf "$(initrd_dir)"
|
@$(RM) -rf "$(initrd_dir)"
|
||||||
|
|
||||||
|
|
||||||
#
|
|
||||||
# Compress the initrd into a xz file that can be included by coreboot.
|
|
||||||
# The extra options are necessary to let the Linux kernel decompress it
|
|
||||||
# and the extra padding is to ensure that it can be concatenated to
|
|
||||||
# other cpio files.
|
|
||||||
#
|
|
||||||
coreboot.intermediate: $(build)/$(BOARD)/initrd.cpio.xz
|
|
||||||
coreboot.intermediate: $(build)/$(BOARD)/bzImage
|
|
||||||
#$(build)/$(coreboot_dir)/initrd-$(BOARD).cpio.xz: initrd-$(BOARD).cpio.xz
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Each board output has its own fixup required to turn the coreboot.rom
|
|
||||||
# into a flashable image.
|
|
||||||
|
|
||||||
# This produces a ROM image suitable for writing into the top chip;
|
|
||||||
x230.flash.rom: $(build)/$(coreboot_dir)/x230.flash/coreboot.rom
|
|
||||||
"$(build)/$(coreboot_dir)/$(BOARD)/cbfstool" "$<" print
|
|
||||||
$(call do,EXTRACT,$@,dd if="$<" of="$@" bs=1M skip=8)
|
|
||||||
@-$(RM) $<
|
|
||||||
@sha256sum "$@"
|
|
||||||
|
|
||||||
# This produces a ROM image that is written with the flashrom program
|
# This produces a ROM image that is written with the flashrom program
|
||||||
%.rom: $(build)/$(coreboot_dir)/%/coreboot.rom
|
$(build)/$(BOARD)/coreboot.rom: $(build)/$(coreboot_dir)/$(BOARD)/coreboot.rom
|
||||||
"$(build)/$(coreboot_dir)/$(BOARD)/cbfstool" "$<" print
|
"$(build)/$(coreboot_dir)/$(BOARD)/cbfstool" "$<" print
|
||||||
$(call do,EXTRACT,$@,mv "$<" "$@")
|
$(call do,EXTRACT,$@,mv "$<" "$@")
|
||||||
@sha256sum "$@"
|
@sha256sum "$(@:$(pwd)/%=%)"
|
||||||
|
|
||||||
|
|
||||||
module_dirs := \
|
module_dirs := \
|
||||||
$(busybox_dir) \
|
$(busybox_dir) \
|
||||||
|
@ -2,6 +2,8 @@
|
|||||||
BOARD=x230
|
BOARD=x230
|
||||||
|
|
||||||
CONFIG_COREBOOT=y
|
CONFIG_COREBOOT=y
|
||||||
|
CONFIG_COREBOOT_CONFIG:=config/coreboot-x230.config
|
||||||
|
|
||||||
CONFIG_CRYPTSETUP=y
|
CONFIG_CRYPTSETUP=y
|
||||||
CONFIG_FLASHROM=y
|
CONFIG_FLASHROM=y
|
||||||
CONFIG_GPG=y
|
CONFIG_GPG=y
|
||||||
|
@ -601,11 +601,11 @@ CONFIG_GENERATE_SMBIOS_TABLES=y
|
|||||||
# CONFIG_PAYLOAD_UBOOT is not set
|
# CONFIG_PAYLOAD_UBOOT is not set
|
||||||
CONFIG_PAYLOAD_LINUX=y
|
CONFIG_PAYLOAD_LINUX=y
|
||||||
# CONFIG_PAYLOAD_TIANOCORE is not set
|
# CONFIG_PAYLOAD_TIANOCORE is not set
|
||||||
CONFIG_PAYLOAD_FILE="./bzImage"
|
CONFIG_PAYLOAD_FILE="../../build/x230-generic/bzImage"
|
||||||
CONFIG_PAYLOAD_OPTIONS=""
|
CONFIG_PAYLOAD_OPTIONS=""
|
||||||
# CONFIG_PXE is not set
|
# CONFIG_PXE is not set
|
||||||
CONFIG_LINUX_COMMAND_LINE="quiet"
|
CONFIG_LINUX_COMMAND_LINE="quiet"
|
||||||
CONFIG_LINUX_INITRD="./initrd.cpio.xz"
|
CONFIG_LINUX_INITRD="../../build/x230-generic/initrd.cpio.xz"
|
||||||
# CONFIG_PAYLOAD_IS_FLAT_BINARY is not set
|
# CONFIG_PAYLOAD_IS_FLAT_BINARY is not set
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -8,10 +8,9 @@ coreboot_tar := coreboot-$(coreboot_version).tar.xz
|
|||||||
coreboot_url := https://www.coreboot.org/releases/$(coreboot_tar)
|
coreboot_url := https://www.coreboot.org/releases/$(coreboot_tar)
|
||||||
coreboot_hash := ecfc57f3e16543fe38f83171eaa3a7933098387d0cf597933b7e89a0c95ef531
|
coreboot_hash := ecfc57f3e16543fe38f83171eaa3a7933098387d0cf597933b7e89a0c95ef531
|
||||||
|
|
||||||
|
|
||||||
# Coreboot builds are specialized on a per-target basis.
|
# Coreboot builds are specialized on a per-target basis.
|
||||||
# The builds are done in a per-target subdirectory
|
# The builds are done in a per-target subdirectory
|
||||||
#coreboot_config := coreboot-$(TARGET).config
|
CONFIG_COREBOOT_CONFIG ?= config/coreboot-$(BOARD).config
|
||||||
|
|
||||||
EXTRA_FLAGS := -fdebug-prefix-map=$(pwd)=heads -gno-record-gcc-switches
|
EXTRA_FLAGS := -fdebug-prefix-map=$(pwd)=heads -gno-record-gcc-switches
|
||||||
|
|
||||||
@ -19,14 +18,14 @@ coreboot_configure := \
|
|||||||
$(MAKE) \
|
$(MAKE) \
|
||||||
oldconfig \
|
oldconfig \
|
||||||
obj=./$(BOARD) \
|
obj=./$(BOARD) \
|
||||||
DOTCONFIG=../../config/coreboot-$(BOARD).config \
|
DOTCONFIG=../../$(CONFIG_COREBOOT_CONFIG) \
|
||||||
BUILD_TIMELESS=1 \
|
BUILD_TIMELESS=1 \
|
||||||
CFLAGS_x86_32="$(EXTRA_FLAGS)" \
|
CFLAGS_x86_32="$(EXTRA_FLAGS)" \
|
||||||
CFLAGS_x86_64="$(EXTRA_FLAGS)" \
|
CFLAGS_x86_64="$(EXTRA_FLAGS)" \
|
||||||
|
|
||||||
coreboot_target := \
|
coreboot_target := \
|
||||||
obj=./$(BOARD) \
|
obj=./$(BOARD) \
|
||||||
DOTCONFIG=../../config/coreboot-$(BOARD).config \
|
DOTCONFIG=../../$(CONFIG_COREBOOT_CONFIG) \
|
||||||
BUILD_TIMELESS=1 \
|
BUILD_TIMELESS=1 \
|
||||||
CFLAGS_x86_32="$(EXTRA_FLAGS)" \
|
CFLAGS_x86_32="$(EXTRA_FLAGS)" \
|
||||||
CFLAGS_x86_64="$(EXTRA_FLAGS)" \
|
CFLAGS_x86_64="$(EXTRA_FLAGS)" \
|
||||||
@ -34,7 +33,6 @@ coreboot_target := \
|
|||||||
|
|
||||||
coreboot_output := $(BOARD)/coreboot.rom
|
coreboot_output := $(BOARD)/coreboot.rom
|
||||||
|
|
||||||
|
|
||||||
# hack to force a build dependency on the cross compiler
|
# hack to force a build dependency on the cross compiler
|
||||||
$(build)/$(coreboot_dir)/.configured: $(build)/$(coreboot_dir)/util/crossgcc/xgcc/bin/i386-elf-gcc
|
$(build)/$(coreboot_dir)/.configured: $(build)/$(coreboot_dir)/util/crossgcc/xgcc/bin/i386-elf-gcc
|
||||||
$(build)/$(coreboot_dir)/util/crossgcc/xgcc/bin/i386-elf-gcc: $(build)/$(coreboot_dir)/.canary
|
$(build)/$(coreboot_dir)/util/crossgcc/xgcc/bin/i386-elf-gcc: $(build)/$(coreboot_dir)/.canary
|
||||||
@ -45,12 +43,20 @@ $(build)/$(coreboot_dir)/util/crossgcc/xgcc/bin/i386-elf-gcc: $(build)/$(coreboo
|
|||||||
|
|
||||||
# The coreboot-blobs must be unpacked before we can build coreboot
|
# The coreboot-blobs must be unpacked before we can build coreboot
|
||||||
# if we are using a tar file; git checkout will clone the submodule.
|
# if we are using a tar file; git checkout will clone the submodule.
|
||||||
|
# The Linux kernel and Heads initrd must be built before linuxboot
|
||||||
|
# unless the user has specified "FAST=1" on the make command line,
|
||||||
|
# which will assume that the kernel and initrd are fresh
|
||||||
|
ifneq "$(FAST)" "1"
|
||||||
coreboot_depends := linux initrd
|
coreboot_depends := linux initrd
|
||||||
|
coreboot.intermediate: $(build)/$(BOARD)/bzImage
|
||||||
|
coreboot.intermediate: $(build)/$(BOARD)/initrd.cpio.xz
|
||||||
|
endif
|
||||||
|
|
||||||
ifneq "$(coreboot_version)" "git"
|
|
||||||
|
|
||||||
# if we are not building from a git checkout,
|
# if we are not building from a git checkout,
|
||||||
# we must also download the coreboot-blobs tree
|
# we must also download the coreboot-blobs tree
|
||||||
|
ifneq "$(coreboot_version)" "git"
|
||||||
|
|
||||||
coreboot_depends += coreboot-blobs
|
coreboot_depends += coreboot-blobs
|
||||||
modules-y += coreboot-blobs
|
modules-y += coreboot-blobs
|
||||||
|
|
||||||
|
@ -53,11 +53,6 @@ $(build)/$(BOARD)/linuxboot.rom: $(linuxboot_output)
|
|||||||
# which will assume that the kernel and initrd are fresh
|
# which will assume that the kernel and initrd are fresh
|
||||||
ifneq "$(FAST)" "1"
|
ifneq "$(FAST)" "1"
|
||||||
linuxboot_depends := linux initrd
|
linuxboot_depends := linux initrd
|
||||||
|
linuxboot.intermediate: $(build)/$(BOARD)/bzImage
|
||||||
|
linuxboot.intermediate: $(build)/$(BOARD)/initrd.cpio.xz
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# The bzImage and initrd must be built, but the dependency
|
|
||||||
# might not be there if FAST is defined.
|
|
||||||
linuxboot.intermediate: \
|
|
||||||
$(build)/$(BOARD)/bzImage \
|
|
||||||
$(build)/$(BOARD)/initrd.cpio.xz \
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user