BOOT_TARGET pImage & uImage ???
Hi,
is the there any particular reason why the BOOT_TARGETS "pImage" and "uImage" for the famous boot loader PPCBoot and its successor U-Boot are still not supported. Neither by linux_2_4_devel. Nor by the vanilla.
Thanks,
Steven
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
Quoted 5 lines · Steven Scholz
is the there any particular reason why the
BOOT_TARGETS"pImage" and "uImage" for
the famous boot loader PPCBoot and its successor U-Boot are still not supported.
Neither bylinux_2_4_devel. Nor by the vanilla.
For a third time:
http://www.geocrawler.com/archives/3/8358/2002/11/0/10241415/
It's not too late for 2.4.23, yet...
--
Tom Rini
http://gate.crashing.org/~trini/
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
Quoted 10 lines · Tom Rini
Quoted 5 lines · Steven Scholz
is the there any particular reason why the
BOOT_TARGETS"pImage" and "uImage" for
the famous boot loader PPCBoot and its successor U-Boot are still not supported.
Neither bylinux_2_4_devel. Nor by the vanilla.
Quoted 2 lines
For a third time:
http://www.geocrawler.com/archives/3/8358/2002/11/0/10241415/
I have to admit that I don't understand what you're describing there. I am afraid nobody else did. Otherwise someone would realized it by now...
Sorry though.
Steven
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Here is the patch I have been using myself. I am embarrassed to say that I was the 2nd person to ask and I forgot to post the patch for inclusion. I don;t have a version for 2.5/6 but this works for 2.4 (based on 2.4.22-pre10). Tom, I am not sure this is exactly what yoou wanted when we initially talked about it so let me know if you would like a better method.
Thanks
Brian
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
iD8DBQE/abidmxLCz0u+Ko8RApSeAJ9FwwirTLp5lYIeoVwOs3olE11CDACeM7Zs oiWo6RqxHhkLubrg8YbELqI=
=s7cT
-----END PGP SIGNATURE-----
# This is a BitKeeper generated patch for the following project:
# Project Name: Linux 2.4 for PowerPC development tree
# This patch format is intended for GNU patch command version 2.5 or higher. # This patch includes the following deltas:
# ChangeSet 1.1350 -> 1.1351
# arch/ppc/Makefile 1.57 -> 1.58
# arch/ppc/boot/images/Makefile 1.6 -> 1.7
# arch/ppc/boot/Makefile 1.49 -> 1.50
# (new) -> 1.1 scripts/mkuboot.sh
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 03/08/07 [email protected] 1.1351
# U
# --------------------------------------------
#
arch/ppc/Makefile +1 -1
@@ -98,7 +98,7 @@ checks: @$(MAKE) -C arch/$(ARCH)/kernel checks -BOOT_TARGETS = zImage zImage.initrd znetboot znetboot.initrd +BOOT_TARGETS = zImage zImage.initrd znetboot znetboot.initrd uImage # All the instructions talk about "make bzImage". bzImage: zImage
arch/ppc/boot/Makefile +11 -5
@@ -17,7 +17,7 @@ AFLAGS += -D__BOOTER__ OBJCOPY_ARGS = -O elf32-powerpc -MKIMAGE := ./utils/mkimage.wrapper +MKIMAGE := $(TOPDIR)/scripts/mkuboot.sh lib/zlib.a: lib/zlib.c $(MAKE) -C lib
@@ -67,12 +67,18 @@ gzip $(GZIP_FLAGS) images/vmapus endif +mkuboot: $(MKIMAGE) + cp $< $@ + chmod 755 $@ + + # Make an image for PPCBoot -pImage: images/vmlinux.gz - $(MKIMAGE) -A ppc -O linux -T kernel -C gzip -a 00000000 -e 00000000 \ +uImage: images/vmlinux.gz mkuboot + ./mkuboot -A ppc -O linux -T kernel -C gzip -a 00000000 -e 00000000 \ -n 'Linux-$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)' \ - -d $< images/vmlinux.PPCBoot - ln -sf vmlinux.PPCBoot images/pImage + -d $< images/vmlinux.UBoot + ln -sf vmlinux.UBoot images/uImage + rm -f ./mkuboot # These are subdirs with files not normally rm'ed. -- Tom clean:
arch/ppc/boot/images/Makefile +1 -1
@@ -9,4 +9,4 @@ gzip -vf9 vmlinux clean: - rm -f sImage vmapus vmlinux* miboot* zImage* zvmlinux* + rm -f sImage vmapus vmlinux* miboot* zImage* zvmlinux* uImage
diff -Nru a/arch/ppc/boot/simple/Makefile b/arch/ppc/boot/simple/Makefile
scripts/mkuboot.sh new file +16 -0
@@ -0,0 +1,16 @@ +#!/bin/bash + +# +# Build U-Boot image when `mkimage' tool is available. +# + +MKIMAGE=$(type -path mkimage) + +if [ -z "${MKIMAGE}" ]; then + # Doesn't exist + echo '"mkimage" command not found - U-Boot images will not be built' >&2 + exit 0; +fi + +# Call "mkimage" to create U-Boot image +${MKIMAGE} "$@"
Quoted 5 lines · Brian Waite
Here is the patch I have been using myself. I am embarrassed to say that I was the 2nd person to ask and I forgot to post the patch for inclusion. I don;t have a version for 2.5/6 but this works for 2.4 (based on 2.4.22-pre10). Tom, I am not sure this is exactly what yoou wanted when we initially talked about it so let me know if you would like a better method.
That looks alright. I've got one comment:
[snip]
Quoted 13 lines
diff -Nru a/arch/ppc/boot/Makefile b/arch/ppc/boot/Makefile
arch/ppc/boot/Makefile +1
-1@@ -17,7 +17,7 @@ AFLAGS += -D__BOOTER__ OBJCOPY_ARGS = -O elf32-powerpc -MKIMAGE := ./utils/mkimage.wrapper +MKIMAGE := $(TOPDIR)/scripts/mkuboot.sh lib/zlib.a: lib/zlib.c $(MAKE) -C lib
arch/ppc/boot/Makefile line 72
Quoted 6 lines
arch/ppc/boot/Makefile +3
-0@@ -67,12 +67,18 @@ gzip $(GZIP_FLAGS) images/vmapus endif +mkuboot: $(MKIMAGE) + cp $< $@ + chmod 755 $@
Add this to the clean target, and then don't rm it at the end of 'uImage' so that we only 'build' this once.
--
Tom Rini
http://gate.crashing.org/~trini/
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
Quoted 12 lines · Steven Scholz
Quoted 10 lines · Tom Rini
Quoted 5 lines · Steven Scholz
is the there any particular reason why the
BOOT_TARGETS"pImage" and "uImage" for
the famous boot loader PPCBoot and its successor U-Boot are still not supported.
Neither bylinux_2_4_devel. Nor by the vanilla.
Quoted 5 lines
Quoted 2 lines
For a third time:
http://www.geocrawler.com/archives/3/8358/2002/11/0/10241415/I have to admit that I don't understand what you're describing there. I am afraid nobody else did. Otherwise someone would realized it by now...
If I'm making requests and rambling at the same time, can people please speek up sooner? I won't mind, really.
What I want is three things:
1) The 'mkimage' target must be done in such a fashion that it will never run into a 'cannot execute' problem. My suggestion is to have the Makefile do a:
@chmod +x mkimage.sh
Or so. In 2.5/2.6, the build system will handle this for you, automagically, on .sh files I believe. For 2.4, you must handle this explicitly.
2) Do we really need 'pImage' and 'uImage' or can we just have 'uImage' ?
3) I really (really!) want a patch for 2.4 and 2.5/2.6 at the same time.
--
Tom Rini
http://gate.crashing.org/~trini/
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
Quoted 10 lines
What I want is three things:
1) The 'mkimage' target must be done in such a fashion that it will never run into a 'cannot execute' problem. My suggestion is to have theMakefiledo a:
@chmod +xmkimage.sh
Or so. In 2.5/2.6, the build system will handle this for you, automagically, on .sh files I believe. For 2.4, you must handle this explicitly.
Altough messy, I make this happen in the patch I supply. I can change it to do the straight chmod in the scrip[ts directory if that is cleaner.
Quoted 2 lines
2) Do we really need 'pImage' and 'uImage' or can we just have 'uImage' ?
I think uImage is enough. Wolfgang strongly discourages any use of PPCBoot these days and it just seems silly.
Quoted 1 line
3) I really (really!) want a patch for 2.4 and 2.5/2.6 at the same time.
This was one of the reasons for not supplying the patch previously. I will try to pull together a 2.5/2.6 patch but I have not worked under 2.5/2.6 at all. When I initially did the 2.4 patch I pulled the 2.5 tree but I didn't have time to understand the layout. Also, unless someone has a board that will boot a uImage target I can only supply an untested patch. I'll take some time and see if I can pull something I am comfortable with in the next few days. Is there anyone who could help with testing?
Thanks
Brian
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
Quoted 9 lines · Brian Waite
Quoted 8 lines
What I want is three things:
1) The 'mkimage' target must be done in such a fashion that it will never run into a 'cannot execute' problem. My suggestion is to have theMakefiledo a:
@chmod +xmkimage.sh
Or so. In 2.5/2.6, the build system will handle this for you, automagically, on .sh files I believe. For 2.4, you must handle this explicitly.
Quoted 3 lines
Altough messy, I make this happen in the patch I supply. I can change it to do the straight chmod in the scrip[ts directory if that is cleaner.
I think what your patch does is the 2.6 logic, so that's probably best.
Quoted 5 lines
Quoted 2 lines
2) Do we really need 'pImage' and 'uImage' or can we just have 'uImage' ?
I think uImage is enough. Wolfgang strongly discourages any use of PPCBoot these days and it just seems silly.
That what I figured at this point.
Quoted 11 lines
Quoted 2 lines
3) I really (really!) want a patch for 2.4 and 2.5/2.6 at the same time.
This was one of the reasons for not supplying the patch previously. I will try to pull together a 2.5/2.6 patch but I have not worked under 2.5/2.6 at all. When I initially did the 2.4 patch I pulled the 2.5 tree but I didn't have time to understand the layout. Also, unless someone has a board that will boot a uImage target I can only supply an untested patch. I'll take some time and see if I can pull something I am comfortable with in the next few days. Is there anyone who could help with testing?
'Untested' is fine here, since all you have to do to test is have the 'uImage' target work. A minimal config based on arch/ppc/defconfig should suffice for this.
--
Tom Rini
http://gate.crashing.org/~trini/
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
Quoted 3 lines · In message <[email protected]> you wrote:
I think uImage is enough. Wolfgang strongly discourages any use of PPCBoot these days and it just seems silly.
uImage should do.
Ummm... actually I only discourage the use of PPCBoot for development of _new_ projects. Just using it on existing systems is perfectly fine (I have some around and see no reason to update).
Best regards,
Wolfgang Denk
--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Email: [email protected] Never ascribe to malice that which can adequately be explained by stupidity.
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
Quoted 9 lines
What I want is three things:
1) The 'mkimage' target must be done in such a fashion that it will never run into a 'cannot execute' problem. My suggestion is to have theMakefiledo a:
@chmod +xmkimage.sh
Or so. In 2.5/2.6, the build system will handle this for you, automagically, on .sh files I believe. For 2.4, you must handle this explicitly.
In 2.6 you need to locate the script in scripts/ and add it to the makefile to make this happen. Do not do that.
Best way IMO is to use:
$(CONFIG_SHELL) mkimage.sh
This works in both 2.4 and 2.6.
Quoted 1 line
2) Do we really need 'pImage' and 'uImage' or can we just have 'uImage'
Please kill pImage. PPCBOOT is dead, we shall focus on "Das U-boot".
Sam
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
Quoted 11 lines · Sam Ravnborg
Quoted 8 lines
What I want is three things:
1) The 'mkimage' target must be done in such a fashion that it will never run into a 'cannot execute' problem. My suggestion is to have theMakefiledo a:
@chmod +xmkimage.sh
Or so. In 2.5/2.6, the build system will handle this for you, automagically, on .sh files I believe. For 2.4, you must handle this explicitly.In 2.6 you need to locate the script in
scripts/and add it to the makefile to make this happen. Do not do that.
There's an arguement for putting this in scripts/, and that is that U-BOOT is not a PPC-specific bootrom anymore, as it looks like you well know. :)
Quoted 2 lines
Best way IMO is to use:
$(CONFIG_SHELL)mkimage.sh
Brain, how about this for your patch for 2.4 at least (if we can't convince Sam to put mkimage.sh into scripts/) :)
--
Tom Rini
http://gate.crashing.org/~trini/
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
Quoted 7 lines · Tom Rini
Quoted 3 lines
In 2.6 you need to locate the script in
scripts/and add it to the makefile to make this happen. Do not do that.There's an arguement for putting this in
scripts/, and that is that U-BOOT is not a PPC-specific bootrom anymore, as it looks like you well know. :)
You got me wrong (read: I did not express it clear).
What I do not wani't is to use scripts/Makefile to set the exucutable bit. I'm perfectly fine with having the script in scripts/.
Actually thats the only suitable place, since it will be used by ARM as well (I assume).
Sam
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
Quoted 3 lines · In message <[email protected]> you wrote:
Actually thats the only suitable place, since it will be used by ARM as well (I assume).
Correct. And by MIPS. And some x86, too.
Best regards,
Wolfgang Denk
--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Email: [email protected] Harrison's Postulate:
For every action, there is an equal and opposite criticism.
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/