Hi, Xiangfu
On Mon, Jan 17, 2011 at 5:07 PM, Xiangfu Liu <xiangfu@sharism.cc> wrote:
> Requires mkimage tool from u-boot-tools.
This patch is cool, seems more and more MIPS boards are using the
popular U-boot ;-)
> Uses gzip compression by default.
Perhaps add more compression algos support and make them configurable
will be better. lzma/xz has higher compression rate, lzo has faster
decompression speed. and bzip2 is between lzo and gzip.
Regards,
Wu Zhangjin
>
> Signed-off-by: Xiangfu Liu <xiangfu@sharism.cc>
> Acked-by: Sergey Kvachonok <ravenexp@gmail.com>
> ---
> arch/mips/Makefile | 6 ++++++
> arch/mips/boot/u-boot/.gitignore | 2 ++
> arch/mips/boot/u-boot/Makefile | 15 +++++++++++++++
> 3 files changed, 23 insertions(+), 0 deletions(-)
> create mode 100644 arch/mips/boot/u-boot/.gitignore
> create mode 100644 arch/mips/boot/u-boot/Makefile
>
> diff --git a/arch/mips/Makefile b/arch/mips/Makefile
> index 7c1102e..8d1f9fc 100644
> --- a/arch/mips/Makefile
> +++ b/arch/mips/Makefile
> @@ -280,6 +280,11 @@ vmlinuz vmlinuz.bin vmlinuz.ecoff vmlinuz.srec:
> $(vmlinux-32) FORCE
> $(Q)$(MAKE) $(build)=arch/mips/boot/compressed \
> VMLINUX_LOAD_ADDRESS=$(load-y) 32bit-bfd=$(32bit-bfd) $@
>
> +# u-boot
> +uImage: vmlinux.bin FORCE
> + $(Q)$(MAKE) $(build)=arch/mips/boot/u-boot \
> + VMLINUX=$(vmlinux-32) VMLINUXBIN=arch/mips/boot/vmlinux.bin \
> + VMLINUX_LOAD_ADDRESS=$(load-y) arch/mips/boot/u-boot/$@
>
> CLEAN_FILES += vmlinux.32 vmlinux.64
>
> @@ -313,6 +318,7 @@ define archhelp
> echo ' vmlinuz.ecoff - ECOFF zboot image'
> echo ' vmlinuz.bin - Raw binary zboot image'
> echo ' vmlinuz.srec - SREC zboot image'
> + echo ' uImage - U-boot image (gzip)'
> echo
> echo ' These will be default as apropriate for a configured platform.'
> endef
> diff --git a/arch/mips/boot/u-boot/.gitignore
> b/arch/mips/boot/u-boot/.gitignore
> new file mode 100644
> index 0000000..1080c94
> --- /dev/null
> +++ b/arch/mips/boot/u-boot/.gitignore
> @@ -0,0 +1,2 @@
> +vmlinux.bin.gz
> +uImage
> diff --git a/arch/mips/boot/u-boot/Makefile b/arch/mips/boot/u-boot/Makefile
> new file mode 100644
> index 0000000..318dc50
> --- /dev/null
> +++ b/arch/mips/boot/u-boot/Makefile
> @@ -0,0 +1,15 @@
> +targets += vmlinux.bin.gz
> +quiet_cmd_gzip = GZIP $@
> +cmd_gzip = gzip -c9 $(VMLINUXBIN) $(obj)/vmlinux.bin.gz
> +$(obj)/vmlinux.bin.gz: $(obj)/../vmlinux.bin FORCE
> + $(call if_changed,gzip)
> +
> +MKIMAGE = mkimage
> +
> +targets += uImage
> +quiet_cmd_uImage = MKIMAGE $@
> +cmd_uImage = $(MKIMAGE) -A mips -O linux -T kernel -C gzip -a
> $(VMLINUX_LOAD_ADDRESS) \
> +-e 0x$(shell $(NM) $(VMLINUX) | grep ' kernel_entry' | cut -f1 -d ' ') \
> +-n MIPS -d $(obj)/vmlinux.bin.gz $(obj)/uImage
> +$(obj)/uImage: $(obj)/vmlinux.bin.gz FORCE
> + $(call if_changed,uImage)
> --
> 1.7.0.4
>
>
>
|