summaryrefslogtreecommitdiff
path: root/packages/images
diff options
context:
space:
mode:
authorRolf Leggewie <oe-devel@rolf.leggewie.biz>2007-03-15 22:56:30 +0000
committerRolf Leggewie <oe-devel@rolf.leggewie.biz>2007-03-15 22:56:30 +0000
commit21757a5bad963331dcc33cc7ff109476269c03e7 (patch)
tree317f27080d4d4886cd397a5fd1d5f9785a70f60d /packages/images
parent8775c527e9c94cfa9c79781eb9112192b6f91fb7 (diff)
parentc83221df5af4799ba3529c470fcda84c76c0b8f7 (diff)
merge of 'a96c9acac99b5599d2b0fb0a518603646414d166'
and 'e8fe2283e0bda61a19e3e7f4cf561a638aa1b1fd'
Diffstat (limited to 'packages/images')
-rw-r--r--packages/images/foonas-image.bb42
-rw-r--r--packages/images/openmoko-devel-image.bb1
2 files changed, 40 insertions, 3 deletions
diff --git a/packages/images/foonas-image.bb b/packages/images/foonas-image.bb
index 8d3541c114..23059d9bca 100644
--- a/packages/images/foonas-image.bb
+++ b/packages/images/foonas-image.bb
@@ -3,7 +3,9 @@ LICENSE = "GPL"
PR = "r0"
DEPENDS = "${MACHINE_TASK_PROVIDER}"
-EXTRA_IMAGECMD_jffs2 = "--big-endian --eraseblock=${ERASEBLOCK_SIZE} -D ${SLUGOS_DEVICE_TABLE}"
+EXTRA_IMAGECMD_turbostation = "--big-endian"
+EXTRA_IMAGECMD_n2100 = "--little-endian"
+EXTRA_IMAGECMD_jffs2 += " --eraseblock=${ERASEBLOCK_SIZE} -D ${SLUGOS_DEVICE_TABLE}"
IMAGE_LINGUAS = ""
# This is passed to the image command to build the correct /dev
@@ -34,12 +36,15 @@ PACK_IMAGE_DEPENDS = ""
IMAGE_TOOLS = ""
#EXTRA_IMAGEDEPENDS += "${IMAGE_TOOLS}"
-FOONAS_SUPPORT += "diffutils cpio findutils uboot-utils udev"
+FOONAS_SUPPORT += "diffutils cpio findutils udev"
+FOONAS_SUPPORT_turbostation += "uboot-utils"
# this gets /lib/modules made....
-FOONAS_KERNEL = "kernel-module-ext3 kernel-module-minix \
+FOONAS_KERNEL_turbostation = "kernel-module-ext3 kernel-module-minix \
kernel-module-usb-storage"
+FOONAS_KERNEL_n2100 = "kernel-module-ext2 kernel-module-usb-storage"
+
RDEPENDS = " \
base-files base-passwd netbase \
busybox initscripts foonas-init \
@@ -93,3 +98,34 @@ turbostation_pack_image() {
rm -f $PADFILE
ls -l $OUTPUT
}
+
+n2100_pack_image() {
+ # find latest kernel
+ KERNEL=`ls -tr ${DEPLOY_DIR_IMAGE}/zImage* | tail -1`
+ if [ -z "$KERNEL" ]; then
+ oefatal "No kernel found in ${DEPLOY_DIR_IMAGE}. Bitbake linux to create one."
+ exit 1
+ fi
+ ROOTFS=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.jffs2
+ OUTPUT=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.flash.img
+ PADFILE=${DEPLOY_DIR_IMAGE}/padfile.zzz
+ HEX_MAX_KERN_SIZE=1C0000
+ DEC_MAX_KERN_SIZE=`echo "ibase=16; $HEX_MAX_KERN_SIZE" | bc `
+ HEX_MAX_ROOT_SIZE=DC0000
+ DEC_MAX_ROOT_SIZE=`echo "ibase=16; $HEX_MAX_ROOT_SIZE" | bc `
+ KERNEL_SIZE=`ls -l $KERNEL | awk '{print $5}'`
+ if [ $KERNEL_SIZE -gt $DEC_MAX_KERN_SIZE ]; then
+ oefatal "Kernel too large at $KERNEL_SIZE bytes. Max is $DEC_MAX_KERN_SIZE."
+ exit 1
+ fi
+ ROOT_SIZE=`ls -l $ROOTFS | awk '{print $5}'`
+ if [ $ROOT_SIZE -gt $DEC_MAX_ROOT_SIZE ]; then
+ oefatal "Rootfs is too large at $ROOT_SIZE bytes. Max is $DEC_MAX_ROOT_SIZE."
+ exit 1
+ fi
+ PAD_SIZE=`echo "$DEC_MAX_KERN_SIZE - $KERNEL_SIZE" | bc `
+ dd if=/dev/zero of=$PADFILE bs=$PAD_SIZE count=1 2>>/dev/null
+ cat $KERNEL $PADFILE $ROOTFS > $OUTPUT
+ rm -f $PADFILE
+ ls -l $OUTPUT
+} \ No newline at end of file
diff --git a/packages/images/openmoko-devel-image.bb b/packages/images/openmoko-devel-image.bb
index 3f238196a4..56890b5c34 100644
--- a/packages/images/openmoko-devel-image.bb
+++ b/packages/images/openmoko-devel-image.bb
@@ -3,4 +3,5 @@ require openmoko-image.bb
export PACKAGE_INSTALL += "\
task-openmoko-demo \
task-openmoko-debug \
+ task-openmoko-examples \
"