[Android-virt] [PATCH] boot-wrapper: tidy the Makefile to help with packaging.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 27 March 2012 01:39, Michael Hope <michael.hope at linaro.org> wrote:
> (I wasn't sure where to send this or if just to push. ?Thoughts?)

I've been using android-virt as a vaguely plausible place to
send boot-wrapper patches, on the basis that that gives an
opportunity for public review and the volume isn't so high that
it annoys anybody [I hope!]. (cc'd)

> Add and modify Makefile rules so that it can be used in a Debian
> package. ?Add an explicit 'distclean' target. ?Add a 'semi' target
> that only builds the semihosting binary. ?Add stub commands to 'all'
> and 'semi' so the call doesn't fall through to the default kernel
> rule. ?Update 'clean' to also clean the semihosting files.
>
> Signed-off-by: Michael Hope <michael.hope at linaro.org>
> ---
> ?Makefile | ? 13 +++++++++++--
> ?1 files changed, 11 insertions(+), 2 deletions(-)
>
> diff --git a/Makefile b/Makefile
> index ebcbce5..584b404 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -28,10 +28,18 @@ LD ? ? ? ? ?= $(CROSS_COMPILE)ld
> ?# These are needed by the underlying kernel make
> ?export CROSS_COMPILE ARCH
>
> +# Build all wrappers
> ?all: $(IMAGE) $(SEMIIMG)
> + ? ? ? true

This shouldn't be necessary.

> -clean:
> - ? ? ? rm -f $(IMAGE) boot.o model.lds monitor.o uImage
> +# Build just the semihosting wrapper
> +semi: $(SEMIIMG)
> + ? ? ? true

...and nor should this 'true' -- if you add 'semi' to the
.PHONY target list at the bottom of the makefile it ought to
suppress the default goes-through-to-kernel-makefile rule.

> +clean distclean:
> + ? ? ? rm -f $(IMAGE) $(SEMIIMG) \
> + ? ? ? boot.o model.lds monitor.o uImage \
> + ? ? ? bootsemi.o monitor.o modelsemi.lds

You have monitor.o twice in this list.

'distclean' should be in the .PHONY list too.

> ?$(KERNEL): $(KERNEL_SRC)/arch/arm/boot/uImage
> ? ? ? ?cp $< $@
> @@ -62,6 +70,7 @@ $(KERNEL_SRC)/arch/arm/boot/uImage: force
>
> ?# Pass any target we don't know about through to the kernel makefile.
> ?# This is a convenience rule so we can say 'make menuconfig' etc here.
> +# Note that any rules in this file must have a command.

...or be listed as .PHONY.

> ?%: force
> ? ? ? ?$(MAKE) -C $(KERNEL_SRC) $@

-- PMM



[Index of Archives]     [Linux KVM]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux