Re: 2.6.9-rc4-mm1: initramfs build fix [u]

From: Sam Ravnborg
Date: Sun Oct 17 2004 - 14:37:44 EST


Hi Martin.

Can you submit a new version based on Linus' tree with the following modifications:
1) Propoer changelog
2) Document use of .shipped somewhere

And the following small comments.


> # or set INITRAMFS_LIST to another filename.
> -INITRAMFS_LIST ?= $(obj)/initramfs_list
> +INITRAMFS_LIST := $(obj)/initramfs_list

Kbuild style is to reser all-uppercase to external visible variables.

> # initramfs_data.o contains the initramfs_data.cpio.gz image.
> # The image is included using .incbin, a dependency which is not
> @@ -23,6 +23,23 @@ $(obj)/initramfs_data.o: $(obj)/initramf
> # Commented out for now
> # initramfs-y := $(obj)/root/hello
>
> +quiet_cmd_gen_list = GEN_INITRAMFS_LIST $@
Please aling output properly with rest of kbuild output.
> +quiet_cmd_gen_list = GEN $@
Should be enough - the filename give some context as well

> + cmd_gen_list = $(shell \
> + if test -f "$(CONFIG_INITRAMFS_SOURCE)"; then \
> + if [ "$(CONFIG_INITRAMFS_SOURCE)" != $@ ]; then \
> + echo 'cp -f "$(CONFIG_INITRAMFS_SOURCE)" $@'; \
> + else \
> + echo 'cp -f "$(srctree)/$(INITRAMFS_LIST).shipped" $@'; \
Test for .shipped to be present first?


> + fi; \
> + elif test -d "$(CONFIG_INITRAMFS_SOURCE)"; then \
> + echo 'scripts/gen_initramfs_list.sh "$(CONFIG_INITRAMFS_SOURCE)" > $@'; \
> + else \
> + echo 'cp -f "$(srctree)/$(INITRAMFS_LIST).shipped" $@'; \
Same here.

> + fi)
> +
> +$(INITRAMFS_LIST): FORCE
> + $(call cmd,gen_list)

How do you secure that the list gets updated when some of the above logic changes?
Likewise avoid the list to be generated unles required.

Sam
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/