aboutsummaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
authorAndy Green <andy@openmoko.com>2008-11-19 17:11:23 +0000
committerAndy Green <andy@openmoko.com>2008-11-19 17:11:23 +0000
commit503c4704a6a68edc2d841905299a17278a43973b (patch)
tree884cde6aaa20e87c4d3ce05f4a535d164e78837c /build
parent4fc826402f239210e6ff40d49843d6ed58d86e36 (diff)
build-introduce-device-specific-named-kernel-binary.patch
This patch changes the ./build script to generate a uImage.bin file with the build device appended, eg, uImage-GTA02.bin. The reason for this change is that it is possible to generate rootfs images now that can target multiple (and probably increasing numbers of) devices with the one image. Therefore qi or other bootloader running on the device is going to have to pick out the right kernel from the rootfs filesystem for the device it finds it is running on from a set provided down /boot by the rootfs generator. /lib/modules for the kernels doesn't get in the way of each other because the version-specific path is also extended to have the device name as part of it. 2.6.28-GTA02_stable-tracking_c77dda03a7c11666-mokodev For legacy U-Boot support on GTA01 or GTA02, a symlink to uImage-GTA01.bin or uImage-GTA02.bin will be needed. The dfu utility script is updated to take an argument, eg, GTA02 Signed-off-by: Andy Green <andy@openmoko.com>
Diffstat (limited to 'build')
-rwxr-xr-xbuild45
1 files changed, 32 insertions, 13 deletions
diff --git a/build b/build
index ee8d4679d46..24a1c5dfb53 100755
--- a/build
+++ b/build
@@ -4,35 +4,54 @@
export CROSS_COMPILE=../../cross/bin/arm-angstrom-linux-gnueabi-
make ARCH=arm silentoldconfig
-VERSION=
-if [ -d .git ] ; then
- HEAD=`git show --pretty=oneline | head -n1 | cut -d' ' -f1 | cut -b1-16`
- BRANCH=`git branch | grep ^\* | cut -d' ' -f2`
- VERSION=-$BRANCH\_$HEAD
+
+PRODUCT=
+
+if [ ! -z "`grep CONFIG_MACH_NEO1973_GTA01=y .config`" ] ; then
+ START=30008000
+ PRODUCT=GTA01
+fi
+
+if [ ! -z "`grep CONFIG_MACH_NEO1973_GTA02=y .config`" ] ; then
+ START=30008000
+ PRODUCT=GTA02
fi
-if [ ! -z "`grep CONFIG_ARCH_S3C64XX=y .config`" ] ; then
- START=50008000
- PRODUCT=GTA03
+if [ ! -z "`grep CONFIG_MACH_OPENMOKO_GTA03=y .config`" ] ; then
+ START=50008000
+ PRODUCT=GTA03
fi
-if [ ! -z "`grep CONFIG_ARCH_S3C2410=y .config`" ] ; then
+if [ ! -z "`grep CONFIG_MACH_M800=y .config`" ] ; then
START=30008000
- PRODUCT=FR
+ PRODUCT=M800
fi
+if [ -z "$PRODUCT" ] ; then
+ echo "Unable to figure out what we are building from the config"
+ exit 1
+fi
+
+VERSION=
+if [ -d .git ] ; then
+ HEAD=`git show --pretty=oneline | head -n1 | cut -d' ' -f1 | cut -b1-16`
+ BRANCH=`git branch | grep ^\* | cut -d' ' -f2`
+ VERSION=-$PRODUCT\_$BRANCH\_$HEAD
+fi
+
+
echo $MKIMAGECMD
if make -j5 ARCH=arm CONFIG_DEBUG_SECTION_MISMATCH=y EXTRAVERSION=$VERSION; then
${CROSS_COMPILE}objcopy -O binary -R .note -R .comment -S arch/arm/boot/compressed/vmlinux linux.bin
- mkimage -A arm -O linux -T kernel -C none -a $START -e $START -n "OM $PRODUCT $BRANCH""_$HEAD" -d linux.bin uImage.bin
+ mkimage -A arm -O linux -T kernel -C none -a $START -e $START -n "OM $PRODUCT $BRANCH""_$HEAD" -d linux.bin uImage-$PRODUCT.bin
# we can see if it is an "moredrivers" build by looking for USB Eth gadget
# if it is then keep a stamped copy of last build
if [ ! -z "`grep CONFIG_USB_USBNET=y .config`" ] ; then
- rm -f uImage-moredrivers*
- cp uImage.bin uImage-moredrivers$VERSION.bin
+ rm -f uImage-moredrivers*-$PRODUCT.bin
+ cp uImage-$PRODUCT.bin uImage-moredrivers$VERSION-$PRODUCT.bin
fi
exit 0
else