]> pilppa.org Git - familiar-h63xx-build.git/blob - org.handhelds.familiar/packages/meta/unslung-image.bb
OE tree imported from monotone branch org.openembedded.oz354fam083 at revision 8b12e3...
[familiar-h63xx-build.git] / org.handhelds.familiar / packages / meta / unslung-image.bb
1 LICENSE = MIT
2 PR = "r6"
3
4 IMAGE_BASENAME = "unslung"
5
6 IMAGE_LINGUAS = ""
7 USE_DEVFS = "1"
8
9 DEPENDS  = "unslung-kernel unslung-rootfs \
10         glibc slingbox ipkg wget cpio findutils portmap-unslung \
11         devio \
12         ${UNSLUNG_EXTRA_DEPENDS}"
13
14 IPKG_INSTALL = "unslung-rootfs \
15         libc6-unslung slingbox ipkg wget cpio findutils portmap-unslung \
16         devio \
17         ${UNSLUNG_EXTRA_INSTALL}"
18
19 IMAGE_PREPROCESS_COMMAND += "unslung_clean_image; "
20                 
21 inherit image_ipk
22
23 # Note that anything in this function must be repeatable without having to rebuild the rootfs
24 unslung_clean_image () {
25         # Remove the patches
26         rm -rf ${IMAGE_ROOTFS}/patches
27         # Remove the kernel image
28         rm -rf ${IMAGE_ROOTFS}/boot
29         # Remove info from the local feed used to build the image
30         rm -f ${IMAGE_ROOTFS}${libdir}/ipkg/lists/*
31         rm -f ${IMAGE_ROOTFS}/${sysconfdir}/version
32         # Tidy up some thing which are in the wrong place
33         mv ${IMAGE_ROOTFS}${libdir}/libipkg* ${IMAGE_ROOTFS}/lib/
34         # Remove the ipkg symlink - unsling puts it back in
35         rm -f ${IMAGE_ROOTFS}${bindir}/ipkg
36         # Hack out the modutils stuff - it's too hard to make it work
37         rm -f ${IMAGE_ROOTFS}${libdir}/ipkg/info/update-modules.postinst
38         rm -rf ${IMAGE_ROOTFS}/etc/rcS.d
39         echo "#!/bin/sh" > ${IMAGE_ROOTFS}/usr/sbin/update-modules
40         echo "exit 0" >> ${IMAGE_ROOTFS}/usr/sbin/update-modules
41         chmod ugo+x ${IMAGE_ROOTFS}/usr/sbin/update-modules
42         echo "#!/bin/sh" > ${IMAGE_ROOTFS}/sbin/depmod
43         echo "exit 0" >> ${IMAGE_ROOTFS}/sbin/depmod
44         chmod ugo+x ${IMAGE_ROOTFS}/sbin/depmod
45 }
46
47 python () {
48         # Don't build unslung images unless we're targeting an nslu2
49         mach = bb.data.getVar("MACHINE", d, 1)
50         if mach != 'nslu2':
51                 raise bb.parse.SkipPackage("Unslung only builds for the Linksys NSLU2")
52 }