mirror of
https://github.com/linuxboot/heads.git
synced 2024-12-20 21:43:11 +00:00
1459e701e3
Allow sub-modules like u-root to opt out of the Heads runtime, while retaining the musl-libc built tools.
34 lines
641 B
Plaintext
34 lines
641 B
Plaintext
#
|
|
# u-root go runtime
|
|
#
|
|
# This is not a normal Heads module, since it builds all of its
|
|
# own dependencies.
|
|
#
|
|
|
|
u-root_url := github.com/u-root/u-root
|
|
u-root_output := $(build)/$(BOARD)/u-root.cpio
|
|
|
|
export GOPATH=$(build)/go
|
|
|
|
$(GOPATH):
|
|
$(call do,GO GET,$(u-root_url),\
|
|
go get $(u-root_url) \
|
|
)
|
|
|
|
$(u-root_output): $(GOPATH)
|
|
$(call do,U-ROOT,$@,\
|
|
$(GOPATH)/bin/u-root \
|
|
-build=bb \
|
|
-format=cpio \
|
|
-o $@ \
|
|
)
|
|
|
|
# Override the initrd inputs and add in the kernel modules
|
|
initrd-$(CONFIG_UROOT) += $(u-root_output)
|
|
|
|
|
|
# If we are building for u-root, disable the default CONFIG_HEADS
|
|
ifeq "$(CONFIG_UROOT)" "y"
|
|
CONFIG_HEADS=n
|
|
endif
|