diff options
author | Florian Fainelli <florian@openwrt.org> | 2012-11-16 16:32:55 +0000 |
---|---|---|
committer | Florian Fainelli <florian@openwrt.org> | 2012-11-16 16:32:55 +0000 |
commit | f42b6353a9620e5970202b4dc00869baeaa6c394 (patch) | |
tree | 2e0e2146effb547c681faed71e1cd042af250d90 /target/linux/leon/patches-2.6.36/002-sparc_uimage_target.patch | |
parent | 402b3d79fd509ae32bde32910c3df9202c306383 (diff) | |
download | upstream-f42b6353a9620e5970202b4dc00869baeaa6c394.tar.gz upstream-f42b6353a9620e5970202b4dc00869baeaa6c394.tar.bz2 upstream-f42b6353a9620e5970202b4dc00869baeaa6c394.zip |
[leon] move patches to patches-2.6.36
Signed-off-by: Florian Fainelli <florian@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@34220 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/leon/patches-2.6.36/002-sparc_uimage_target.patch')
-rw-r--r-- | target/linux/leon/patches-2.6.36/002-sparc_uimage_target.patch | 79 |
1 files changed, 79 insertions, 0 deletions
diff --git a/target/linux/leon/patches-2.6.36/002-sparc_uimage_target.patch b/target/linux/leon/patches-2.6.36/002-sparc_uimage_target.patch new file mode 100644 index 0000000000..6e25ff27d7 --- /dev/null +++ b/target/linux/leon/patches-2.6.36/002-sparc_uimage_target.patch @@ -0,0 +1,79 @@ +From 234ef25344b567b3b8dad62c0863ebe16377528f Mon Sep 17 00:00:00 2001 +From: Daniel Hellstrom <daniel@gaisler.com> +Date: Tue, 14 Sep 2010 11:26:55 +0200 +Subject: [PATCH] SPARC: added U-Boot build target: uImage + +--- + arch/sparc/Makefile | 3 ++- + arch/sparc/boot/Makefile | 35 +++++++++++++++++++++++++++++++++++ + 2 files changed, 37 insertions(+), 1 deletions(-) + +--- a/arch/sparc/Makefile ++++ b/arch/sparc/Makefile +@@ -88,7 +88,7 @@ boot := arch/sparc/boot + # Default target + all: zImage + +-image zImage tftpboot.img vmlinux.aout: vmlinux ++image zImage uImage tftpboot.img vmlinux.aout: vmlinux + $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@ + + archclean: +@@ -102,6 +102,7 @@ ifeq ($(ARCH),sparc) + define archhelp + echo '* image - kernel image ($(boot)/image)' + echo '* zImage - stripped kernel image ($(boot)/zImage)' ++ echo ' uImage - U-Boot SPARC32/LEON Image' + echo ' tftpboot.img - image prepared for tftp' + endef + else +--- a/arch/sparc/boot/Makefile ++++ b/arch/sparc/boot/Makefile +@@ -5,6 +5,7 @@ + + ROOT_IMG := /usr/src/root.img + ELFTOAOUT := elftoaout ++MKIMAGE := $(srctree)/scripts/mkuboot.sh + + hostprogs-y := piggyback_32 piggyback_64 btfixupprep + targets := tftpboot.img btfix.o btfix.S image zImage vmlinux.aout +@@ -90,5 +91,39 @@ $(obj)/tftpboot.img: $(obj)/image $(obj) + $(obj)/vmlinux.aout: vmlinux FORCE + $(call if_changed,elftoaout) + @echo ' kernel: $@ is ready' ++else ++ ++# The following lines make a readable image for U-Boot. ++# uImage - Binary file read by U-boot ++# uImage.o - object file of uImage for loading with a ++# flash programmer understanding ELF. ++ ++OBJCOPYFLAGS_image.bin := -S -O binary -R .note -R .comment ++$(obj)/image.bin: $(obj)/image FORCE ++ $(call if_changed,objcopy) ++ ++$(obj)/image.gz: $(obj)/image.bin ++ $(call if_changed,gzip) ++ ++# Start of Main memory ++ifndef UIMAGE_LOADADDR ++UIMAGE_LOADADDR=0x40004000 + endif + ++# The first sector after the U-Boot image (256k) ++ifndef UIMAGE_FLASHADDR ++UIMAGE_FLASHADDR=0x00040000 ++endif ++ ++quiet_cmd_uimage = UIMAGE $@ ++ cmd_uimage = $(CONFIG_SHELL) $(MKIMAGE) -A sparc -O linux -T kernel \ ++ -C gzip -a $(UIMAGE_LOADADDR) -e 0xf0004000 -n 'Linux-$(KERNELRELEASE)' \ ++ -d $< $@ ++ ++targets += uImage ++$(obj)/uImage: $(obj)/image.gz ++ $(call if_changed,uimage) ++ $(LD) -Tdata $(UIMAGE_FLASHADDR) -r -b binary arch/sparc/boot/uImage -o arch/sparc/boot/uImage.o ++ @echo ' Image $@ is ready' ++ ++endif |