mirror of
https://github.com/linuxboot/heads.git
synced 2024-12-18 20:47:55 +00:00
Support generation of bundled kernel
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
This commit is contained in:
parent
9339394b69
commit
97dc552d28
10
Makefile
10
Makefile
@ -123,6 +123,10 @@ BOARD_LOG := $(shell \
|
||||
echo "$(DATE) $(GIT_HASH) $(GIT_STATUS)" > "$(HASHES)" ; \
|
||||
)
|
||||
|
||||
ifeq "y" "$(CONFIG_LINUX_BUNDLED)"
|
||||
# Create empty initrd for initial kernel "without" initrd.
|
||||
$(shell cpio -o < /dev/null > $(build)/$(BOARD)/initrd.cpio)
|
||||
endif
|
||||
|
||||
# If V is set in the environment, do not redirect the tee
|
||||
# command to /dev/null.
|
||||
@ -568,6 +572,12 @@ $(build)/$(initrd_dir)/initrd.cpio.xz: $(initrd-y)
|
||||
fi
|
||||
@sha256sum "$(@:$(pwd)/%=%)" | tee -a "$(HASHES)"
|
||||
|
||||
#
|
||||
# At the moment PowerPC can only load initrd bundled with the kernel.
|
||||
#
|
||||
bundle-$(CONFIG_LINUX_BUNDLED) += $(build)/$(BOARD)/$(LINUX_IMAGE_FILE).bundled
|
||||
all: $(bundle-y)
|
||||
|
||||
#
|
||||
# The heads.cpio is built from the initrd directory in the
|
||||
# Heads tree.
|
||||
|
@ -172,6 +172,15 @@ $(build)/$(BOARD)/bzImage: $(build)/$(linux_dir)/.build
|
||||
@touch $@ # force a timestamp update
|
||||
@sha256sum "$@" | tee -a "$(HASHES)"
|
||||
|
||||
# Build kernel second time, now that initrd is built.
|
||||
$(build)/$(BOARD)/$(LINUX_IMAGE_FILE).bundled: \
|
||||
$(build)/$(initrd_dir)/initrd.cpio.xz \
|
||||
$(build)/$(BOARD)/$(LINUX_IMAGE_FILE)
|
||||
xz --decompress --stdout --force "$<" > $(build)/$(initrd_dir)/initrd.cpio
|
||||
$(MAKE) -C "$(build)/$(linux_dir)" $(linux_target)
|
||||
$(call do-copy,$(build)/$(linux_dir)/$(linux_output),$@)
|
||||
@touch $@ # force a timestamp update
|
||||
@sha256sum "$@" | tee -a "$(HASHES)"
|
||||
|
||||
# menuconfig target allows us to easily reconfigure this Linux kernel
|
||||
# Afterwars make linux.saveconfig to generate a minimal config from it
|
||||
|
Loading…
Reference in New Issue
Block a user