3 # Images are generally built explicitly, do not need to be part of world.
4 EXCLUDE_FROM_WORLD = "1"
8 DEPENDS += "makedevs-native"
10 def get_image_deps(d):
13 for type in (bb.data.getVar('IMAGE_FSTYPES', d, 1) or "").split():
14 deps = bb.data.getVar('IMAGE_DEPENDS_%s' % type, d) or ""
19 DEPENDS += "${@get_image_deps(d)}"
21 IMAGE_DEVICE_TABLE ?= "${@bb.which(bb.data.getVar('BBPATH', d, 1), 'files/device_table-minimal.txt')}"
22 IMAGE_POSTPROCESS_COMMAND ?= ""
24 # Must call real_do_rootfs() from inside here, rather than as a separate
25 # task, so that we have a single fakeroot context for the whole process.
26 fakeroot do_rootfs () {
28 rm -rf ${IMAGE_ROOTFS}
30 if [ "${USE_DEVFS}" != "1" ]; then
31 mkdir -p ${IMAGE_ROOTFS}/dev
32 makedevs -r ${IMAGE_ROOTFS} -D ${IMAGE_DEVICE_TABLE}
39 rm -f ${IMAGE_ROOTFS}${libdir}/ipkg/lists/oe
41 ${IMAGE_PREPROCESS_COMMAND}
43 export TOPDIR=${TOPDIR}
45 for type in ${IMAGE_FSTYPES}; do
46 if test -z "$FAKEROOTKEY"; then
47 fakeroot -i ${TMPDIR}/fakedb.image bbimage -t $type -e ${FILE}
49 bbimage -n "${IMAGE_NAME}" -t "$type" -e "${FILE}"
53 ${IMAGE_POSTPROCESS_COMMAND}
56 DISTRO_LOCALE_FEEDS_PREFIXES ?= ""
57 DISTRO_LOCALE_FEEDS_HEADER ?= ""
59 python __anonymous() {
60 prefixes = bb.data.getVar("DISTRO_LOCALE_FEEDS_PREFIXES", d, 1).split()
61 locale_feeds = bb.data.getVar("DISTRO_LOCALE_FEEDS_HEADER", d, 1)
64 locale_feeds += "# For each supported locale there is a subfeed in each of the feed folders.\n"
65 locale_feeds += "# You can use your webbrowser to check for valid locale codes.\n\n"
66 locale_feeds += "# To point ipkg at packages for your locale, replace <my_locale> with the\n"
67 locale_feeds += "# locale code in the template below and remove the leading '#' characters.\n\n"
69 locale_feeds += "# src/gz %s-locale-<my_locale> %s/locale/<my_locale>\n" % (p.split('/')[-1], p)
71 # add feed for each IMAGE_LINGUA
72 linguas = bb.data.getVar("IMAGE_LINGUAS", d, 1).split()
75 locale_feeds += "\n# %s locale feeds\n" % fst
77 locale_feeds += "src/gz %s-locale-%s %s/locale/%s\n" % (p.split('/')[-1], fst, p, fst)
79 bb.data.setVar("DISTRO_LOCALE_FEEDS", locale_feeds, d)
84 echo "Building feeds for [${DISTRO}].."
86 for line in ${FEED_URIS}
88 # strip leading and trailing spaces/tabs, then split into name and uri
89 line_clean="`echo "$line"|sed 's/^[ \t]*//;s/[ \t]*$//'`"
90 feed_name="`echo "$line_clean" | sed -n 's/\(.*\)##\(.*\)/\1/p'`"
91 feed_uri="`echo "$line_clean" | sed -n 's/\(.*\)##\(.*\)/\2/p'`"
93 echo "Added $feed_name feed with URL $feed_uri"
95 # insert new feed-sources
96 echo "src/gz $feed_name $feed_uri" >> ${IMAGE_ROOTFS}/etc/ipkg/${feed_name}-feed.conf
99 if [ -z ${FEED_URIS} ]; then
100 cat > ${IMAGE_ROOTFS}/etc/ipkg/${DISTRO}-${DISTRO_VERSION}-feeds.conf <<EOF
104 cat > ${IMAGE_ROOTFS}/etc/ipkg/${DISTRO}-${DISTRO_VERSION}-locale-feeds.conf <<EOF
105 ${DISTRO_LOCALE_FEEDS}