[coreboot] buildrom bug
Jordan Crouse
jordan.crouse at amd.com
Fri Apr 25 19:50:22 CEST 2008
On 25/04/08 11:45 -0600, Myles Watson wrote:
> > Here's the updated patch. It needs to be preceded by
> > svn mv packages/utils packages/nrv2b
>
> Sorry. Here's the new patch.
So here is the million dollar question. If all the .mk
files are packages/<package>/<package>.mk, is there anything
stopping us from constructing PAYLOAD_AND_DEP_MK like so:
PAYLOAD_AND_DEP_MK = $(patsubst %,$(PACKAGE_DIR)/packages/%/%.mk,
$(DEPENDS-y) $(PAYLOAD-y) $(HOSTTOOLS-y))
That will have the side effect of including the kernel packages, but
we could filter those out. I'm keen on the psuedo-automagic way that
buildrom just works when you add a new package.
Jordan
> Index: config/payloads/etherboot.conf
> ===================================================================
> --- config/payloads/etherboot.conf (revision 167)
> +++ config/payloads/etherboot.conf (working copy)
> @@ -8,3 +8,4 @@
> PAYLOAD_COMPRESSED=$(OUTPUT_DIR)/etherboot-payload.elf.lzma
>
> PAYLOAD-y=etherboot
> +PAYLOAD_AND_DEP_MK=$(PACKAGE_DIR)/etherboot/etherboot.mk
> Index: config/payloads/ofw.conf
> ===================================================================
> --- config/payloads/ofw.conf (revision 167)
> +++ config/payloads/ofw.conf (working copy)
> @@ -12,3 +12,4 @@
>
> PAYLOAD-y=ofw
> #HOSTTOOLS-y=crc32sum
> +PAYLOAD_AND_DEP_MK=$(PACKAGE_DIR)/ofw/ofw.mk
> Index: config/payloads/lab.conf
> ===================================================================
> --- config/payloads/lab.conf (revision 167)
> +++ config/payloads/lab.conf (working copy)
> @@ -33,3 +33,19 @@
> PAYLOAD=lab
>
> HOSTTOOLS-y = mkelfimage unifdef
> +PAYLOAD_AND_DEP_MK=$(PACKAGE_DIR)/mkelfimage/mkelfimage.mk
> +PAYLOAD_AND_DEP_MK+=$(PACKAGE_DIR)/uclibc/uclibc.mk
> +PAYLOAD_AND_DEP_MK+=$(PACKAGE_DIR)/unifdef/unifdef.mk
> +
> +ifeq ($(CONFIG_KBL),y)
> + PAYLOAD_AND_DEP_MK+=$(PACKAGE_DIR)/kexec-boot-loader/kexec-boot-loader.mk
> +endif
> +ifeq ($(CONFIG_BUSYBOX),y)
> + PAYLOAD_AND_DEP_MK+=$(PACKAGE_DIR)/busybox/busybox.mk
> +endif
> +ifeq ($(CONFIG_BOOTMENU),y)
> + PAYLOAD_AND_DEP_MK+=$(PACKAGE_DIR)/bootmenu/bootmenu.mk
> +endif
> +ifeq ($(CONFIG_OLPCFLASH),y)
> + PAYLOAD_AND_DEP_MK+=$(PACKAGE_DIR)/olpcflash/olpcflash.mk
> +endif
> Index: config/payloads/memtest.conf
> ===================================================================
> --- config/payloads/memtest.conf (revision 167)
> +++ config/payloads/memtest.conf (working copy)
> @@ -1,4 +1,4 @@
> -# Configuration file for the etherboot payload
> +# Configuration file for the memtest payload
>
> # Common configuration options
>
> @@ -8,3 +8,5 @@
> PAYLOAD_COMPRESSED=$(OUTPUT_DIR)/memtest-payload.elf.lzma
>
> PAYLOAD-y=memtest
> +
> +PAYLOAD_AND_DEP_MK=$(PACKAGE_DIR)/memtest/memtest.mk
> Index: config/payloads/tint.conf
> ===================================================================
> --- config/payloads/tint.conf (revision 167)
> +++ config/payloads/tint.conf (working copy)
> @@ -10,5 +10,7 @@
> PAYLOAD-y=tint
> PAYLOAD=tint
>
> +PAYLOAD_AND_DEP_MK=$(PACKAGE_DIR)/libpayload/libpayload.mk $(PACKAGE_DIR)/tint/tint.mk
> +
> # Add libpayload as a dependency
> DEPENDS-y=libpayload
> Index: config/payloads/kernel.conf
> ===================================================================
> --- config/payloads/kernel.conf (revision 167)
> +++ config/payloads/kernel.conf (working copy)
> @@ -19,3 +19,4 @@
> PAYLOAD=kernel
>
> HOSTTOOLS-y = mkelfimage
> +PAYLOAD_AND_DEP_MK=$(PACKAGE_DIR)/mkelfimage/mkelfimage.mk
> Index: config/payloads/grub2.conf
> ===================================================================
> --- config/payloads/grub2.conf (revision 167)
> +++ config/payloads/grub2.conf (working copy)
> @@ -9,3 +9,5 @@
>
> PAYLOAD-y=grub2
> PAYLOAD=grub2
> +
> +PAYLOAD_AND_DEP_MK=$(PACKAGE_DIR)/grub2/grub2.mk
> Index: config/payloads/coreinfo.conf
> ===================================================================
> --- config/payloads/coreinfo.conf (revision 167)
> +++ config/payloads/coreinfo.conf (working copy)
> @@ -11,4 +11,5 @@
> PAYLOAD=coreinfo
>
> # Add libpayload as a dependency
> +PAYLOAD_AND_DEP_MK=$(PACKAGE_DIR)/coreinfo/coreinfo.mk $(PACKAGE_DIR)/libpayload/libpayload.mk
> DEPENDS-y=libpayload
> Index: config/payloads/filo.conf
> ===================================================================
> --- config/payloads/filo.conf (revision 167)
> +++ config/payloads/filo.conf (working copy)
> @@ -8,6 +8,7 @@
> PAYLOAD_COMPRESSED=$(OUTPUT_DIR)/filo-payload.elf.lzma
>
> PAYLOAD-y=filo
> +PAYLOAD_AND_DEP_MK=$(PACKAGE_DIR)/filo/filo.mk
>
> PAYLOAD=filo
>
> Index: Makefile
> ===================================================================
> --- Makefile (revision 167)
> +++ Makefile (working copy)
> @@ -115,9 +115,14 @@
> # The following code gets all the make targets, but filters out the kernel
> # targets which are implicitly set by the platform configuration
>
> -MKTARGETS:= $(shell ls $(PACKAGE_DIR)/*/*.mk)
> +ifneq ($(PAYLOAD_AND_DEP_MK),)
> +include $(PAYLOAD_AND_DEP_MK)
> +endif
>
> -include $(filter-out $(PACKAGE_DIR)/kernel/% $(PACKAGE_DIR)/coreboot-v2/% $(PACKAGE_DIR)/coreboot-v3/%,$(MKTARGETS))
> +include $(PACKAGE_DIR)/nrv2b/nrv2b.mk
> +include $(PACKAGE_DIR)/lzma/lzma.mk
> +include $(PACKAGE_DIR)/geodevsa/geodevsa.mk
> +include $(PACKAGE_DIR)/roms/roms.mk
>
> include $(KERNEL_MK)
>
--
Jordan Crouse
Systems Software Development Engineer
Advanced Micro Devices, Inc.
More information about the coreboot
mailing list