summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--polux/Makefile22
-rwxr-xr-xpolux/linux-2.6.10/scripts/cpincludes8
2 files changed, 23 insertions, 7 deletions
diff --git a/polux/Makefile b/polux/Makefile
index 76a37ecbcf..a705291fbb 100644
--- a/polux/Makefile
+++ b/polux/Makefile
@@ -436,13 +436,14 @@ slave_spc200e_defconfig:
slave_spc200c_defconfig slave_spc200e_defconfig ppc_spc200c_defconfig ppc_spc200e_defconfig
VERSION_TAG:=$(shell git status > /dev/null; git describe --dirty --always)
-BUNDLE_DIR:=../SPiDBundle-$(VERSION_TAG)
+BUNDLE_TOP_DIR:=../SPiDBundle-$(VERSION_TAG)
+BUNDLE_DIR:=$(BUNDLE_TOP_DIR)/bundle
bundle:
#to be as clean as possible
make mrproper
#create bundle directory
- rm -rf $(BUNDLE_DIR)
+ rm -rf $(BUNDLE_TOP_DIR)
mkdir -p $(BUNDLE_DIR)
git archive --format=tar HEAD | (cd $(BUNDLE_DIR) && tar x)
#suppress unused directories
@@ -457,7 +458,7 @@ bundle:
cp $(BASE_DIR)/common/include/spid_img_desc.h $(BUNDLE_DIR)/include/spid_img_desc.h
rm -f $(BUNDLE_DIR)/linux-2.6.10/scripts/mksimage
cp -r $(BASE_DIR)/common/tools/mksimage $(BUNDLE_DIR)/linux-2.6.10/scripts
- $(BUNDLE_DIR)/linux-2.6.10/scripts/cpincludes $(BUNDLE_DIR)/linux-2.6.10
+ $(BUNDLE_DIR)/linux-2.6.10/scripts/cpincludes $(BUNDLE_DIR)/linux-2.6.10 $(BASE_DIR)/common
rm -f $(BUNDLE_DIR)/linux-2.6.10/scripts/cpincludes
#prepare genNVRAM part
(cd $(BASE_DIR) && git archive --format=tar --prefix genNVRAM/ HEAD:$(GENNVRAM_DIR_FROM_BASE)) | tar -x -C $(BUNDLE_DIR)/tools
@@ -466,7 +467,7 @@ bundle:
#prepare u-boot part
(cd $(BASE_DIR) && git archive --format=tar --prefix u-boot-1.1.6/ HEAD:$(UBOOT_DIR_FROM_BASE)) | tar -x -C $(BUNDLE_DIR)
sed -i -e 's/\(EXTRAVERSION *= *\)\(.*\)/\1-$(VERSION_TAG)/' $(BUNDLE_DIR)/u-boot-1.1.6/Makefile
- $(MAKE) -C $(BUNDLE_DIR)/u-boot-1.1.6 cpincludes
+ $(MAKE) -C $(BUNDLE_DIR)/u-boot-1.1.6 COMMON_INC="$(BASE_DIR)/common/include" cpincludes
rm -f $(BUNDLE_DIR)/u-boot-1.1.6/cpincludes.mk
cd $(BUNDLE_DIR)/u-boot-1.1.6 && rm -rf board/arizona cpu/spc300-fcm3 include/asm-arm/arch-spc300-fcm3
#generate plc binaries
@@ -494,8 +495,17 @@ bundle:
#final clean
find $(BUNDLE_DIR) -name .gitignore -exec rm -f \{\} \;
#create the bundle archive
- tar -cf $(BUNDLE_DIR).tar $(BUNDLE_DIR)
- bzip2 $(BUNDLE_DIR).tar
+ tar -cf $(BUNDLE_TOP_DIR).tar $(BUNDLE_DIR)
+ #generate images
+ cd $(BUNDLE_DIR) && make allimages
+ #include images in the archive
+ for img in $(BUNDLE_DIR)/images/bootpImage-*; do \
+ mv $$img `echo "$$img" | sed -e "s/-[0-9]\{8\}-[0-9]\{4\}/-$(VERSION_TAG)/"`; \
+ done
+ mv $(BUNDLE_DIR)/images $(BUNDLE_TOP_DIR)/binaries
+ tar -rf $(BUNDLE_TOP_DIR).tar $(BUNDLE_TOP_DIR)/binaries
+ #compress the archive
+ bzip2 $(BUNDLE_TOP_DIR).tar
allimages:
make mrproper
diff --git a/polux/linux-2.6.10/scripts/cpincludes b/polux/linux-2.6.10/scripts/cpincludes
index 7896969502..f946958f64 100755
--- a/polux/linux-2.6.10/scripts/cpincludes
+++ b/polux/linux-2.6.10/scripts/cpincludes
@@ -3,9 +3,15 @@
# Usage
# $1 - Kernel src directory
+# $2 - common directory (optional)
LINUX_INC=$1/include/asm-arm/arch-mse500
-COMMON_INC=$1/../../common/include
+if [ "$2" != "" ]
+then
+ COMMON_INC=$2/include
+else
+ COMMON_INC=$1/../../common/include
+fi
COMMON_INC_ASM=$COMMON_INC/asm/arch
MKSIMAGE=$1/scripts/mksimage