diff options
author | Richard Purdie <richard@openedhand.com> | 2006-07-21 10:10:31 +0000 |
---|---|---|
committer | Richard Purdie <richard@openedhand.com> | 2006-07-21 10:10:31 +0000 |
commit | b2f192faabe412adce79534e22efe9fb69ee40e2 (patch) | |
tree | 7076c49d4286f8a1733650bd8fbc7161af200d57 /meta/classes/wrt-image.bbclass | |
parent | 2cf0eadf9f730027833af802d7e6c90b44248f80 (diff) | |
download | openembedded-core-b2f192faabe412adce79534e22efe9fb69ee40e2.tar.gz openembedded-core-b2f192faabe412adce79534e22efe9fb69ee40e2.tar.bz2 openembedded-core-b2f192faabe412adce79534e22efe9fb69ee40e2.zip |
Rename /openembedded/ -> /meta/
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@530 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'meta/classes/wrt-image.bbclass')
-rw-r--r-- | meta/classes/wrt-image.bbclass | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/meta/classes/wrt-image.bbclass b/meta/classes/wrt-image.bbclass new file mode 100644 index 0000000000..ba1163a719 --- /dev/null +++ b/meta/classes/wrt-image.bbclass @@ -0,0 +1,33 @@ +# 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 bb.data.inherits_class('image_ipk', d): + skd = bb.data.getVar('STAGING_KERNEL_DIR', d, 1) + return base_read_file(skd+'/kernel-abiversion') + return "-no kernel version for available-" + +wrt_create_images() { + I=${DEPLOY_DIR}/images + KERNEL_VERSION="${@wrt_get_kernel_version(d)}" + + 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_prepend = "${@["wrt-imagetools-native ", ""][(bb.data.getVar('PACKAGES', d, 1) == '')]}"
\ No newline at end of file |