summaryrefslogtreecommitdiff
path: root/classes
diff options
context:
space:
mode:
Diffstat (limited to 'classes')
-rw-r--r--classes/e.bbclass11
-rw-r--r--classes/lsppchd-image.bbclass3
-rw-r--r--classes/lsppchg-image.bbclass3
-rw-r--r--classes/n2100-image.bbclass30
-rw-r--r--classes/storcenter-image.bbclass30
-rw-r--r--classes/turbostation-image.bbclass30
6 files changed, 102 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..6aab20127a
--- /dev/null
+++ b/classes/lsppchd-image.bbclass
@@ -0,0 +1,3 @@
+lsppchd_pack_image() {
+:
+} \ No newline at end of file
diff --git a/classes/lsppchg-image.bbclass b/classes/lsppchg-image.bbclass
new file mode 100644
index 0000000000..5d9da87c7d
--- /dev/null
+++ b/classes/lsppchg-image.bbclass
@@ -0,0 +1,3 @@
+lsppchg_pack_image() {
+:
+} \ No newline at end of file
diff --git a/classes/n2100-image.bbclass b/classes/n2100-image.bbclass
new file mode 100644
index 0000000000..519be213d5
--- /dev/null
+++ b/classes/n2100-image.bbclass
@@ -0,0 +1,30 @@
+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/storcenter-image.bbclass b/classes/storcenter-image.bbclass
new file mode 100644
index 0000000000..de77f1b417
--- /dev/null
+++ b/classes/storcenter-image.bbclass
@@ -0,0 +1,30 @@
+storcenter_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-storcenter 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=170000
+ DEC_MAX_KERN_SIZE=`echo "ibase=16; $HEX_MAX_KERN_SIZE" | bc `
+ HEX_MAX_ROOT_SIZE=590000
+ 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..e61ffc825b
--- /dev/null
+++ b/classes/turbostation-image.bbclass
@@ -0,0 +1,30 @@
+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
+}