diff options
author | OpenEmbedded Project <openembedded-devel@lists.openembedded.org> | 2007-03-19 05:40:26 +0000 |
---|---|---|
committer | OpenEmbedded Project <openembedded-devel@lists.openembedded.org> | 2007-03-19 05:40:26 +0000 |
commit | 8d17ea8879d198758dc774c34c9c2ee4867e7956 (patch) | |
tree | 4b36407b89c967552938c7b8217d1112080dd432 /classes | |
parent | 6d8dd9329c28fc8ff104da9d9258e79452524b43 (diff) | |
parent | f757c62cc9f18deebdaef52364e694947342d99e (diff) |
merge of '15eabf62626d7b5980c5f03a6eb67c7cf0c49ccb'
and '376139a78fd1210e26df4a08e3bb9e37fb09c274'
Diffstat (limited to 'classes')
-rw-r--r-- | classes/e.bbclass | 11 | ||||
-rw-r--r-- | classes/lsppchd-image.bbclass | 1 | ||||
-rw-r--r-- | classes/lsppchg-image.bbclass | 1 | ||||
-rw-r--r-- | classes/n2100-image.bbclass | 36 | ||||
-rw-r--r-- | classes/turbostation-image.bbclass | 35 |
5 files changed, 79 insertions, 5 deletions
diff --git a/classes/e.bbclass b/classes/e.bbclass index f20c1f8b60..59f2771027 100644 --- a/classes/e.bbclass +++ b/classes/e.bbclass @@ -22,11 +22,12 @@ export ESMART_CONFIG = "${STAGING_BINDIR_CROSS}/esmart-config" export FREETYPE_CONFIG = "${STAGING_BINDIR_CROSS}/freetype-config" export IMLIB2_CONFIG = "${STAGING_BINDIR_CROSS}/imlib2-config" -do_compile_prepend() { - find ${S} -name Makefile | xargs sed -i 's:/usr/include:${STAGING_INCDIR}:' - find ${S} -name Makefile | xargs sed -i 's:/usr/X11R6/include:${STAGING_INCDIR}:' -} +#do_compile_prepend() { +# find ${S} -name Makefile | xargs sed -i 's:/usr/include:${STAGING_INCDIR}:' +# find ${S} -name Makefile | xargs sed -i 's:/usr/X11R6/include:${STAGING_INCDIR}:' +#} -PACKAGES = "${PN}-dbg ${PN} ${PN}-themes" +PACKAGES = "${PN}-dbg ${PN} ${PN}-themes ${PN}-dev" FILES_${PN} = "${libdir}/lib*.so*" FILES_${PN}-themes = "${datadir}/${PN}/themes ${datadir}/${PN}/data ${datadir}/${PN}/fonts ${datadir}/${PN}/pointers ${datadir}/${PN}/images ${datadir}/${PN}/users ${datadir}/${PN}/images ${datadir}/${PN}/styles" +FILES_${PN}-dev += "${includedir}"
\ No newline at end of file diff --git a/classes/lsppchd-image.bbclass b/classes/lsppchd-image.bbclass new file mode 100644 index 0000000000..da280551d4 --- /dev/null +++ b/classes/lsppchd-image.bbclass @@ -0,0 +1 @@ +IMAGE_POSTPROCESS_COMMAND += "" diff --git a/classes/lsppchg-image.bbclass b/classes/lsppchg-image.bbclass new file mode 100644 index 0000000000..da280551d4 --- /dev/null +++ b/classes/lsppchg-image.bbclass @@ -0,0 +1 @@ +IMAGE_POSTPROCESS_COMMAND += "" diff --git a/classes/n2100-image.bbclass b/classes/n2100-image.bbclass new file mode 100644 index 0000000000..811b1d37b7 --- /dev/null +++ b/classes/n2100-image.bbclass @@ -0,0 +1,36 @@ +DEPENDS += "openssl-native" +EXTRA_IMAGECMD = "--little-endian" +ERASEBLOCK_SIZE = "0x20000" +IMAGE_FSTYPES = "jffs2" +IMAGE_POSTPROCESS_COMMAND += '${MACHINE}_pack_image;' + +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 +} diff --git a/classes/turbostation-image.bbclass b/classes/turbostation-image.bbclass new file mode 100644 index 0000000000..d82e3996d5 --- /dev/null +++ b/classes/turbostation-image.bbclass @@ -0,0 +1,35 @@ +EXTRA_IMAGECMD = "--big-endian" +ERASEBLOCK_SIZE = "0x20000" +IMAGE_FSTYPES = "jffs2" +IMAGE_POSTPROCESS_COMMAND += '${MACHINE}_pack_image;' + +turbostation_pack_image() { + # find latest kernel + KERNEL=`ls -tr ${DEPLOY_DIR_IMAGE}/uImage* | tail -1` + if [ -z "$KERNEL" ]; then + oefatal "No kernel found in ${DEPLOY_DIR_IMAGE}. Bitbake linux-turbostation 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=200000 + DEC_MAX_KERN_SIZE=`echo "ibase=16; $HEX_MAX_KERN_SIZE" | bc ` + HEX_MAX_ROOT_SIZE=D00000 + 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 +} |