summaryrefslogtreecommitdiff
path: root/classes/wrt-image.bbclass
diff options
context:
space:
mode:
authornslu2-linux.adm@bkbits.net <nslu2-linux.adm@bkbits.net>2005-06-12 21:40:09 +0000
committernslu2-linux.adm@bkbits.net <nslu2-linux.adm@bkbits.net>2005-06-12 21:40:09 +0000
commit9275be14b544aea8fd376a6602d21669404c5093 (patch)
treebb5d9c26304602a2ae3eee4e9bfbb5302d99c1c3 /classes/wrt-image.bbclass
parent76b46a7fc3c1c66dd8b6cd6769a6ec501523c758 (diff)
Merge bk://oe-devel.bkbits.net/openembedded
into bkbits.net:/repos/n/nslu2-linux/openembedded 2005/06/12 23:35:14+02:00 uni-frankfurt.de!mickeyl Merge bk://oe-devel@oe-devel.bkbits.net/openembedded into r2d2.tm.informatik.uni-frankfurt.de:/local/pkg/oe/packages 2005/06/12 22:51:57+02:00 (none)!br1 wrt cleanup 2005/06/12 22:49:31+02:00 (none)!br1 Merge bk://oe-devel@oe-devel.bkbits.net/openembedded into null.(none):/data/mtx/src/build/unstable.wrt/openembedded 2005/06/12 22:02:49+02:00 (none)!br1 add squashfs-lzma patches for smaller wrt images 2005/06/12 17:25:32+02:00 (none)!br1 wrt updates: create squashfs and jffs2 images 2005/06/12 16:35:25+02:00 uni-frankfurt.de!mickeyl Merge bk://oe-devel@oe-devel.bkbits.net/openembedded into r2d2.tm.informatik.uni-frankfurt.de:/local/pkg/oe/packages 2005/06/12 14:43:00+02:00 uni-frankfurt.de!mickeyl pygtk rdepends on python-shell BKrev: 42acabb9DYchxo1fFJnbe2sjmsq4GQ
Diffstat (limited to 'classes/wrt-image.bbclass')
-rw-r--r--classes/wrt-image.bbclass34
1 files changed, 34 insertions, 0 deletions
diff --git a/classes/wrt-image.bbclass b/classes/wrt-image.bbclass
index e69de29bb2..f6ca5bcb19 100644
--- a/classes/wrt-image.bbclass
+++ b/classes/wrt-image.bbclass
@@ -0,0 +1,34 @@
+# we dont need the kernel in the image
+ROOTFS_POSTPROCESS_COMMAND += "rm -f ${IMAGE_ROOTFS}/boot/zImage*"
+
+def wrt_get_kernel_version(d):
+ import bb
+ if not bb.data.inherits_class('native', d):
+ skd = bb.data.getVar('STAGING_KERNEL_DIR', d, 1)
+ return base_read_file(skd+'/kernel-abiversion')
+ return "-no kernel version for native-"
+
+KERNEL_VERSION = "${@wrt_get_kernel_version(d)}"
+
+wrt_create_images() {
+ I=${DEPLOY_DIR}/images
+
+ for type in ${IMAGE_FSTYPES}; do
+ # generic
+ trx -o ${I}/wrt-generic-${type}.trx ${I}/loader.gz \
+ ${I}/wrt-kernel-${KERNEL_VERSION}.lzma -a 0x10000 ${I}/${IMAGE_NAME}.rootfs.${type}
+
+ # WRT54GS
+ addpattern -2 -i ${I}/wrt-generic-${type}.trx -o ${I}/wrt54gs-${type}.trx -g
+
+ # WRT54G
+ sed "1s,^W54S,W54G," ${I}/wrt54gs-${type}.trx > ${I}/wrt54g-${type}.trx
+
+ # motorola
+ motorola-bin ${I}/wrt-generic-${type}.trx ${I}/motorola-${type}.bin
+ done;
+}
+
+IMAGE_POSTPROCESS_COMMAND += "wrt_create_images;"
+
+DEPENDS += "wrt-imagetools" \ No newline at end of file