5 DEPENDS += "makedevs-native"
10 for type in (oe.data.getVar('IMAGE_FSTYPES', d, 1) or "").split():
11 deps = oe.data.getVar('IMAGE_DEPENDS_%s' % type, d) or ""
16 DEPENDS += "${@get_image_deps(d)}"
18 IMAGE_DEVICE_TABLE = "${@oe.which(oe.data.getVar('OEPATH', d, 1), 'files/device_table-minimal.txt')}"
19 IMAGE_POSTPROCESS_COMMAND ?= ""
21 # Must call real_do_rootfs() from inside here, rather than as a separate
22 # task, so that we have a single fakeroot context for the whole process.
23 fakeroot do_rootfs () {
25 rm -rf ${IMAGE_ROOTFS}
27 if [ "${USE_DEVFS}" != "1" ]; then
28 mkdir -p ${IMAGE_ROOTFS}/dev
29 makedevs -r ${IMAGE_ROOTFS} -D ${IMAGE_DEVICE_TABLE}
36 export TOPDIR=${TOPDIR}
38 for type in ${IMAGE_FSTYPES}; do
39 if test -z "$FAKEROOTKEY"; then
40 fakeroot -i ${TMPDIR}/fakedb.image oeimage -t $type -e ${FILE}
42 oeimage -n "${IMAGE_NAME}" -t "$type" -e "${FILE}"
46 ${IMAGE_POSTPROCESS_COMMAND}
51 test -z "$FEED_URIS" && return 0
53 # comment out existing feed-sources inserted by ipkg-collateral
54 cat ${IMAGE_ROOTFS}/etc/ipkg.conf | sed "s/^src\ /#src\ /" > ${IMAGE_ROOTFS}/etc/ipkg.conf_
55 rm ${IMAGE_ROOTFS}/etc/ipkg.conf && mv ${IMAGE_ROOTFS}/etc/ipkg.conf_ ${IMAGE_ROOTFS}/etc/ipkg.conf
57 # extract, then delete destinations
58 cat ${IMAGE_ROOTFS}/etc/ipkg.conf | egrep "^dest\ " > ${IMAGE_ROOTFS}/etc/ipkg.conf.dest
59 cat ${IMAGE_ROOTFS}/etc/ipkg.conf | egrep -v "^dest\ " > ${IMAGE_ROOTFS}/etc/ipkg.conf_
60 rm ${IMAGE_ROOTFS}/etc/ipkg.conf && mv ${IMAGE_ROOTFS}/etc/ipkg.conf_ ${IMAGE_ROOTFS}/etc/ipkg.conf
63 for line in ${FEED_URIS}
66 # strip leading and trailing spaces/tabs, then split into name and uri
67 line_clean="`echo "$line"|sed 's/^[ \t]*//;s/[ \t]*$//'`"
68 feed_name="`echo "$line_clean" | sed -n 's/\(.*\)##\(.*\)/\1/p'`"
69 feed_uri="`echo "$line_clean" | sed -n 's/\(.*\)##\(.*\)/\2/p'`"
71 # insert new feed-sources
72 echo "src $feed_name $feed_uri" >> ${IMAGE_ROOTFS}/etc/ipkg.conf
75 # remove temporary files and rebuild ipkg.conf
76 echo "" >> ${IMAGE_ROOTFS}/etc/ipkg.conf
77 cat ${IMAGE_ROOTFS}/etc/ipkg.conf.dest >> ${IMAGE_ROOTFS}/etc/ipkg.conf
78 rm ${IMAGE_ROOTFS}/etc/ipkg.conf.dest
80 cp ${IMAGE_ROOTFS}/etc/ipkg.conf ${WORKDIR}