[Top] [All Lists]

Re: [PATCH] MIPS: add U-boot uImage build target to arch Makefile

To: wu zhangjin <>
Subject: Re: [PATCH] MIPS: add U-boot uImage build target to arch Makefile
From: Sergey Kvachonok <>
Date: Mon, 17 Jan 2011 20:23:53 +0200
Cc: Xiangfu Liu <>,,
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=5qQmBUpE0VoAqQ9U9o4mSN5up5UhUEswYlKbo3lb3yo=; b=MEHH5QkeeF2ZRdyF2MIAw2S6rYRXXtavUzNKxoNl1PN26+nh8wp4ZveKforoFBSCUN tagGpMlOvc3jEBvvNtvc1enG6h+44Z7Vnne5blKmDYivv5vB+iznGtiDa3a8Dk7xFDFk sztrMVB/EhzgFtoirAruGK9IjtC20xvARZ+ZA=
Domainkey-signature: a=rsa-sha1; c=nofws;; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=mKe8MbsRitaKk5b1b5r+Q+U/VexDIrLALse18Sq2wcqzJTkzIw6dQXwvPXLixr47lP mo0CYlIoXJRNpbXuyCDG8MUn3NoY6x2oerWntYtKXo5geiGQ4WU8MUP/UjlTUISEfarl 2iwdbsLXoBYw32WwsQPL/D3zyYeQuj7GBP2Bk=
In-reply-to: <>
Original-recipient: rfc822;
References: <> <>
On Mon, Jan 17, 2011 at 6:34 PM, wu zhangjin <> wrote:

> Just a friendly reminder: no need to add the algo options in Kconfig
> for we already have them in init/Kconfig, you can search LZMA, BZIP2
> ... there.

No, I don't have these since my platform (jz4740) does not define
SYS_SUPPORTS_ZBOOT. I don't know whether SFX-style compressed kernels
work on it, probably nobody tried.
U-boot uses it's own decompressor, so it's completely independent of
zboot framework (piggy.o building, in-kernel algos). That's why I'm
reluctant to merge vmlinuz and uImage build stages: these do
completely different things. U-boot may support compression algos not
included in the kernel and vice versa. Or some evil perverted person
might want to build (un)compressed u-boot image from vmlinuz kernel,
and it will probably work. ;)

Should I create SYS_SUPPORTS_UBOOT then?
Like this:


+        bool
+        select HAVE_KERNEL_GZIP
+        select HAVE_KERNEL_BZIP2
+        select HAVE_KERNEL_LZMA
+        select HAVE_KERNEL_LZO




+# 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/$@

Of course install and clean targets will be added as well.
This will prevent vmlinuz from building and build uImage with chosen
compression algo instead.

I intend to keep u-boot/Makefile separate still. Of course it creates
some code duplication, but I believe proper functional decoupling is
more important in this case.
u-boot/Makefile is (almost) architecture independent and can be easily
adopted by other arch if such need arises.

Comments and suggestions welcome.


<Prev in Thread] Current Thread [Next in Thread>