summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordraskovic2009-05-06 14:23:56 +0000
committerdraskovic2009-05-06 14:23:56 +0000
commitbc09d0baeaa38604b4dd23e4150b0e87f664ea14 (patch)
tree4c542ca350c843a378c6b2cd1bbc77b4e75007c1
parentae68332e8b6be871c9b6a51389469962fd1e8d46 (diff)
[CLEO][U-BOOT]Enable hImage (zImage + SPiDCOM header)
git-svn-id: svn+ssh://pessac/svn/cesar/trunk@4599 017c9cb6-072f-447c-8318-d5b54f68fe89
-rw-r--r--cleopatre/buildroot/target/device/Spidcom/arizona/Makefile.in3
-rw-r--r--cleopatre/linux-2.6.25.10-spc300/arch/arm/Makefile3
-rw-r--r--cleopatre/linux-2.6.25.10-spc300/arch/arm/boot/Makefile24
3 files changed, 27 insertions, 3 deletions
diff --git a/cleopatre/buildroot/target/device/Spidcom/arizona/Makefile.in b/cleopatre/buildroot/target/device/Spidcom/arizona/Makefile.in
index ad9c1124c2..f739a7aa75 100644
--- a/cleopatre/buildroot/target/device/Spidcom/arizona/Makefile.in
+++ b/cleopatre/buildroot/target/device/Spidcom/arizona/Makefile.in
@@ -10,7 +10,8 @@ ifeq ($(strip $(BR2_PACKAGE_LINUX)),y)
TARGETS+=linux26
#include target/device/Spidcom/arizona/linux.mk
LINUX26_KCONFIG=$(BOARD_PATH)/linux26.config
-LINUX26_FORMAT=uImage
+#LINUX26_FORMAT=uImage
+LINUX26_FORMAT=hImage
endif
diff --git a/cleopatre/linux-2.6.25.10-spc300/arch/arm/Makefile b/cleopatre/linux-2.6.25.10-spc300/arch/arm/Makefile
index 1e3453ac1f..c603228ade 100644
--- a/cleopatre/linux-2.6.25.10-spc300/arch/arm/Makefile
+++ b/cleopatre/linux-2.6.25.10-spc300/arch/arm/Makefile
@@ -230,7 +230,7 @@ maketools: include/linux/version.h include/asm-arm/.arch FORCE
# Convert bzImage to zImage
bzImage: zImage
-zImage Image xipImage bootpImage uImage: vmlinux
+zImage Image xipImage bootpImage uImage hImage: vmlinux
$(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $(boot)/$@
zinstall install: vmlinux
@@ -253,6 +253,7 @@ define archhelp
echo ' Image - Uncompressed kernel image (arch/$(ARCH)/boot/Image)'
echo '* xipImage - XIP kernel image, if configured (arch/$(ARCH)/boot/xipImage)'
echo ' uImage - U-Boot wrapped zImage'
+ echo ' hImage - SPiDCOM wrapped zImage'
echo ' bootpImage - Combined zImage and initial RAM disk'
echo ' (supply initrd image via make variable INITRD=<path>)'
echo ' install - Install uncompressed kernel'
diff --git a/cleopatre/linux-2.6.25.10-spc300/arch/arm/boot/Makefile b/cleopatre/linux-2.6.25.10-spc300/arch/arm/boot/Makefile
index 128308ac9f..6c31691b2f 100644
--- a/cleopatre/linux-2.6.25.10-spc300/arch/arm/boot/Makefile
+++ b/cleopatre/linux-2.6.25.10-spc300/arch/arm/boot/Makefile
@@ -11,6 +11,11 @@
# Copyright (C) 1995-2002 Russell King
#
+TOPDIR = .
+IMAGE_DIR = ./arch/arm/boot/
+BOARD_TYPE = arizona
+MKIMAGEDESC=$(TOPDIR)/tools/mkimagedesc/mkimagedesc
+
MKIMAGE := $(srctree)/scripts/mkuboot.sh
ifneq ($(MACHINE),)
@@ -27,7 +32,7 @@ INITRD_PHYS := $(initrd_phys-y)
export ZRELADDR INITRD_PHYS PARAMS_PHYS
-targets := Image zImage xipImage bootpImage uImage
+targets := Image zImage xipImage bootpImage uImage hImage
ifeq ($(CONFIG_XIP_KERNEL),y)
@@ -68,6 +73,23 @@ $(obj)/uImage: $(obj)/zImage FORCE
$(call if_changed,uimage)
@echo ' Image $@ is ready'
+$(obj)/hImage: $(obj)/zImage FORCE
+ # Prepend image desc to zImage
+ @ksize=$(shell du -sb $< | awk '{ print $$1 }'); \
+ kmd5=$(shell md5sum $< | awk '{ print $$1 }'); \
+ kver=$(shell date +%F); \
+ kldaddr=$(ZRELADDR); \
+ $(MKIMAGEDESC) --desc "SPC300 image" \
+ --ver "$$kver" \
+ --size "$$ksize" \
+ --md5 "$$kmd5" \
+ --ldaddr "$$kldaddr" \
+ --platform $(BOARD_TYPE) > $@;
+ @cat $< >> $@;
+ @rm -f $(IMAGE_DIR)/image.bin;
+ @ln -s $@ $(IMAGE_DIR)/image.bin;
+ @echo ' Image $@ is ready'
+
$(obj)/bootp/bootp: $(obj)/zImage initrd FORCE
$(Q)$(MAKE) $(build)=$(obj)/bootp $@
@: