All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] MIPS: add U-boot uImage build target to arch Makefile
@ 2011-01-17  9:07 Xiangfu Liu
  2011-01-17 14:16 ` wu zhangjin
  2011-01-17 16:34 ` wu zhangjin
  0 siblings, 2 replies; 7+ messages in thread
From: Xiangfu Liu @ 2011-01-17  9:07 UTC (permalink / raw)
  To: linux-mips; +Cc: ravenexp, lars, Xiangfu Liu

Requires mkimage tool from u-boot-tools.
Uses gzip compression by default.

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

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH] MIPS: add U-boot uImage build target to arch Makefile
  2011-01-17  9:07 [PATCH] MIPS: add U-boot uImage build target to arch Makefile Xiangfu Liu
@ 2011-01-17 14:16 ` wu zhangjin
  2011-01-17 14:43   ` Sergey Kvachonok
  2011-01-17 16:34 ` wu zhangjin
  1 sibling, 1 reply; 7+ messages in thread
From: wu zhangjin @ 2011-01-17 14:16 UTC (permalink / raw)
  To: Xiangfu Liu; +Cc: linux-mips, ravenexp, lars

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
>
>
>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] MIPS: add U-boot uImage build target to arch Makefile
  2011-01-17 14:16 ` wu zhangjin
@ 2011-01-17 14:43   ` Sergey Kvachonok
  2011-01-17 15:57     ` wu zhangjin
  0 siblings, 1 reply; 7+ messages in thread
From: Sergey Kvachonok @ 2011-01-17 14:43 UTC (permalink / raw)
  To: wu zhangjin; +Cc: Xiangfu Liu, linux-mips, lars

On 1/17/11, wu zhangjin <wuzhangjin@gmail.com> wrote:
> 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

Ok, I'll try to make compression algo into Kconfig option then.
And maybe unify with existing avr32 u-boot target, e.g. make use of
scripts/mkuboot.sh.
Will resubmit directly to this list when (if) it's done.

Regards,
Sergey

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] MIPS: add U-boot uImage build target to arch Makefile
  2011-01-17 14:43   ` Sergey Kvachonok
@ 2011-01-17 15:57     ` wu zhangjin
  0 siblings, 0 replies; 7+ messages in thread
From: wu zhangjin @ 2011-01-17 15:57 UTC (permalink / raw)
  To: Sergey Kvachonok; +Cc: Xiangfu Liu, linux-mips, lars

Hi, Sergey

On Mon, Jan 17, 2011 at 10:43 PM, Sergey Kvachonok <ravenexp@gmail.com> wrote:
[...]
>>
>> 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.
>>
>
> Ok, I'll try to make compression algo into Kconfig option then.

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.

With "make menuconfig", you can find them like this:

$ make menuconfig

General setup  --->
Kernel compression mode (LZMA)  --->

and then, like the Makefile of vmlinuz under
arch/mips/boot/compressed/, you can simply use the following method to
choose the compression tools:

tool_$(CONFIG_KERNEL_GZIP)    = gzip
tool_$(CONFIG_KERNEL_BZIP2)   = bzip2
tool_$(CONFIG_KERNEL_LZMA)    = lzma
tool_$(CONFIG_KERNEL_LZO)     = lzo

But to avoid adding this again, we can simply share this for uImage
and move the content from arch/mips/boot/u-boot/Makefile to
arch/mips/boot/compressed/Makefile for vmlinuz also need to compress
the vmlinux.bin, so, they can share the same vmlinux.bin.z.

and to add the uImage target, we can simply add it in
arch/mips/Makefile like this:

 # boot/compressed
-vmlinuz vmlinuz.bin vmlinuz.ecoff vmlinuz.srec: $(vmlinux-32) FORCE
+vmlinuz vmlinuz.bin vmlinuz.ecoff vmlinuz.srec uImage: $(vmlinux-32) FORCE
        $(Q)$(MAKE) $(build)=arch/mips/boot/compressed \
           VMLINUX_LOAD_ADDRESS=$(load-y) 32bit-bfd=$(32bit-bfd) $@

But we may need to check if this is compatible for the uImage target
in your old patch.

> And maybe unify with existing avr32 u-boot target, e.g. make use of
> scripts/mkuboot.sh.

Yeah, scripts/mkuboot.sh have checked the existence of the 'mkimage'
tool, so, it should be better.

> Will resubmit directly to this list when (if) it's done.

Welcome and thanks very much for your effort.

Regards,
Wu Zhangjin

>
> Regards,
> Sergey
>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] MIPS: add U-boot uImage build target to arch Makefile
  2011-01-17  9:07 [PATCH] MIPS: add U-boot uImage build target to arch Makefile Xiangfu Liu
  2011-01-17 14:16 ` wu zhangjin
@ 2011-01-17 16:34 ` wu zhangjin
  2011-01-17 18:23   ` Sergey Kvachonok
  1 sibling, 1 reply; 7+ messages in thread
From: wu zhangjin @ 2011-01-17 16:34 UTC (permalink / raw)
  To: Xiangfu Liu; +Cc: linux-mips, ravenexp, lars

More comments below:

On Mon, Jan 17, 2011 at 5:07 PM, Xiangfu Liu <xiangfu@sharism.cc> wrote:
[...]
>
> +# 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/$@
>

As the comments in my previous reply, we may be possible to add the
uImage target to the line for vmlinuz, then, only one line need to be
changed.

>  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)'

If more compression algos added, then, above "(gzip)" can be removed.
and seems we forgot adding uImage to the "install:" and "archclean:"
target ;-)

arch/mips/Makefile:

install:
        here....

archclean:
        and here ....

If we move arch/mips/boot/u-boot/Makefile to
arch/mips/boot/compressed/Makefile, then, we can simply and uImage to
the last line of that Makefile:

clean-files := .... uImage

>        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

If we move the uImage target to arch/mips/boot/compressed/Makefile,
the uImage ignore can be added to arch/mips/boot/.gitignore

> 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)

If we share the vmlinux.bin.z with vmlinuz, then, the above can be removed.

> +
> +MKIMAGE = mkimage

As your previous reply, the above line can be replaced with
$(srctree)/scripts/mkuboot.sh

> +
> +targets += uImage
> +quiet_cmd_uImage = MKIMAGE $@
> +cmd_uImage = $(MKIMAGE) -A mips -O linux -T kernel -C gzip -a $(VMLINUX_LOAD_ADDRESS) \

We can align it with quiet_cmd_uImage above ;-)

quiet_cmd_uImage =  ...
         cmd_uImage = ...

And we can substitute "$(tool_y)" for the 'hardcoded' gzip above.

> +-e 0x$(shell $(NM) $(VMLINUX) | grep ' kernel_entry' | cut -f1 -d ' ') \

Seems this duplicates the KERNEL_ENTRY calculation of kernel_entry
address, perhaps we can make a common one and share them, here is a
minimal change of the old Makefile:

-KBUILD_AFLAGS := $(LINUXINCLUDE) $(KBUILD_AFLAGS) \
-       -DKERNEL_ENTRY=0x$(shell $(NM) $(objtree)/$(KBUILD_IMAGE)
2>/dev/null | grep " kernel_entry" | cut -f1 -d \ )
+KERNEL_ENTRY=0x$(shell $(NM) $(objtree)/$(KBUILD_IMAGE) 2>/dev/null |
grep " kernel_entry" | cut -f1 -d ' ')
+
+KBUILD_AFLAGS := $(LINUXINCLUDE) $(KBUILD_AFLAGS)
-DKERNEL_ENTRY=$(KERNEL_ENTRY)

Then, we can use $(KERNEL_ENTRY) directly.

> +-n MIPS -d $(obj)/vmlinux.bin.gz $(obj)/uImage

Here, $(obj)/vmlinux.bin.z can be replaced with $(obj)/vmlinux.bin.z,
or we can simply use $< to simplify it.

> +$(obj)/uImage: $(obj)/vmlinux.bin.gz FORCE

$(obj)/vmlinux.bin.gz -> $(obj)/vmlinux.bin.z, and perhaps we can use
uImage instead of $(obj)/uImage too ;-)

> +       $(call if_changed,uImage)

Regards,
Wu Zhangjin

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] MIPS: add U-boot uImage build target to arch Makefile
  2011-01-17 16:34 ` wu zhangjin
@ 2011-01-17 18:23   ` Sergey Kvachonok
  2011-01-18  3:21     ` wu zhangjin
  0 siblings, 1 reply; 7+ messages in thread
From: Sergey Kvachonok @ 2011-01-17 18:23 UTC (permalink / raw)
  To: wu zhangjin; +Cc: Xiangfu Liu, linux-mips, lars

On Mon, Jan 17, 2011 at 6:34 PM, wu zhangjin <wuzhangjin@gmail.com> 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:

arch/mips/Kconfig:

+config SYS_SUPPORTS_UBOOT
+        bool
+        select HAVE_KERNEL_GZIP
+        select HAVE_KERNEL_BZIP2
+        select HAVE_KERNEL_LZMA
+        select HAVE_KERNEL_LZO

arch/mips/Makefile:

+all-$(CONFIG_SYS_SUPPORTS_UBOOT)+= uImage

...

+# 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.

Regards,
Sergey

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] MIPS: add U-boot uImage build target to arch Makefile
  2011-01-17 18:23   ` Sergey Kvachonok
@ 2011-01-18  3:21     ` wu zhangjin
  0 siblings, 0 replies; 7+ messages in thread
From: wu zhangjin @ 2011-01-18  3:21 UTC (permalink / raw)
  To: Sergey Kvachonok; +Cc: Xiangfu Liu, linux-mips, lars

On Tue, Jan 18, 2011 at 2:23 AM, Sergey Kvachonok <ravenexp@gmail.com> wrote:
> On Mon, Jan 17, 2011 at 6:34 PM, wu zhangjin <wuzhangjin@gmail.com> 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.

Perhaps you can get a try, as I know uImage does have some problem on
U-boot for U-boot allocates fixed-size memory for the decompressed
kernel image, then, the max size of the vmlinux.bin is limited to the
max size(seems it is only 8M by default), but it may be still safe for
perhaps nobody will get such a big kernel image.

SFX-style doesn't have the above problem for it considers this problem
before linking, but it requires the bootloader to parse the ELF header
to get the right entry point. A known problem of the current vmlinuz
support is some bootloader may don't parse the right entry point from
the ELF header but just load them to a fixed address: the $(load-y)
value defined in arch/mips/Makefile or arch/mips/*/Platform, this will
be fixed asap and the solution is already in my mind.

> U-boot uses it's own decompressor,

Yeah, your new config SYS_SUPPORTS_UBOOT does solve this problem.

> 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. ;)

Adding uImage target to arch/mips/boot/compressed/Makefile doesn't
need the building of vmlinuz, it depends on If you have selected
SYS_SUPPORTS_ZBOOT for your board, just as your reply shows below,
your board can still only select SYS_SUPPORTS_UBOOT without building
the vmlinuz ;-)

>
> Should I create SYS_SUPPORTS_UBOOT then?
> Like this:
>
> arch/mips/Kconfig:
>
> +config SYS_SUPPORTS_UBOOT
> +        bool
> +        select HAVE_KERNEL_GZIP
> +        select HAVE_KERNEL_BZIP2
> +        select HAVE_KERNEL_LZMA
> +        select HAVE_KERNEL_LZO

Yep, this does solve the problem "U-boot uses it's own decompressor,"

>
> arch/mips/Makefile:
>
> +all-$(CONFIG_SYS_SUPPORTS_UBOOT)+= uImage
>

That's it ;-)

> ...
>
> +# 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.

If CONFIG_SYS_SUPPORTS_ZBOOT is false, vmlinuz will not be compiled
either for we have this line:

all-$(CONFIG_SYS_SUPPORTS_ZBOOT)+= vmlinuz

>
> 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.

Ok, no problem, but why not share the same source code If we can do it
easily and with smaller patch ;-)

> u-boot/Makefile is (almost) architecture independent and can be easily
> adopted by other arch if such need arises.

Yeah, then, the boards can select them like ZBOOT does.

config BOARD_NAME
          ....
          select SYS_SUPPORTS_UBOOT

Then, the other boards will still be independent.

Regards,
Wu Zhangjin

>
> Comments and suggestions welcome.
>
> Regards,
> Sergey
>

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2011-01-18  3:21 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-17  9:07 [PATCH] MIPS: add U-boot uImage build target to arch Makefile Xiangfu Liu
2011-01-17 14:16 ` wu zhangjin
2011-01-17 14:43   ` Sergey Kvachonok
2011-01-17 15:57     ` wu zhangjin
2011-01-17 16:34 ` wu zhangjin
2011-01-17 18:23   ` Sergey Kvachonok
2011-01-18  3:21     ` wu zhangjin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.