glib-2.0: add git version with 2.29.3 including gdbus-codegen
[openembedded.git] / classes / magicbox-image.bbclass
blob37f4c7947fad0b420a7eea8c8bf4f62259d570a7
1 DEPENDS += "u-boot-mkimage-native"
3 magicbox_gen_images() {
4         # find latest kernel
5         KERNEL=`ls -tr ${DEPLOY_DIR_IMAGE}/uImage* | tail -n 1`
6         if [ -z "$KERNEL" ]; then
7                 oefatal "No kernel found in ${DEPLOY_DIR_IMAGE}. Exiting !"
8                 exit 1
9         fi
11         #squashfs
12         #We need to prep the image so that u-boot recognizes it
13          mv ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.squashfs ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.squashfs.bin
14          ${STAGING_BINDIR_NATIVE}/uboot-mkimage -A ppc -O linux -T ramdisk -C none -n "OPLinux-uclibc-squashfs"  \
15                 -d ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.squashfs.bin ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.squashfs
16          rm -f ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.squashfs.bin
19         #squashfs-lzma
20         #same as squashfs
21          mv ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.squashfs-lzma ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.squashfs-lzma.bin
22          ${STAGING_BINDIR_NATIVE}/uboot-mkimage -A ppc -O linux -T ramdisk -C none -n "OPLinux-uclibc-squashfs-lzma"  \
23            -d ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.squashfs-lzma.bin ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.squashfs-lzma
24          rm -f ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.squashfs-lzma.bin
26         #kernel+jffs2 in a single image
27         #Add jffs2 marker at the end of the rootfs file
28         echo -ne '\xde\xad\xc0\xde' >> ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.jffs2
30        
31         ( dd if=$KERNEL bs=65536 conv=sync; \ 
32         dd if=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.jffs2 bs=65536 conv=sync; \
33         ) >  ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.jffs2.flash.bin
39 IMAGE_POSTPROCESS_COMMAND += "magicbox_gen_images; "