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_FEEDS_FILE_PATTERN = "${IMAGE_ROOTFS}/etc/ipkg/${DISTRO}-${DISTRO_VERSION}-%s.conf"
58 python __anonymous() {
59 m = bb.data.getVar("MACHINE", d, 1)
60 pattern = bb.data.getVar("DISTRO_FEEDS_FILE_PATTERN", d, 1)
61 pfx = bb.data.getVar("DISTRO_FEEDS_PREFIX", d, 1)
62 cs = bb.data.getVar("DISTRO_FEEDS_COLLECTIONS", d, 1).split()
67 cmds += "cat > %s <<EOF\n" % file
69 desc = bb.data.getVar("DISTRO_FEEDS_COLLECTION_DESC_%s" % c, d, 1)
70 cmds += "# %s\n\n" % desc
72 feeds = bb.data.getVar("DISTRO_FEEDS_IN_%s" % c, d, 1).split()
74 desc = bb.data.getVar("DISTRO_FEEDS_FEED_DESC_%s" % f, d, 1)
75 cmds += "# %s - %s\n" % (f, desc)
76 cmds += "src/gz %s-%s %s/%s/%s\n" % (c, f, pfx, c, f)
77 cmds += "src/gz %s-%s-%s %s/%s/%s/machine/%s\n\n" % (c, f, m, pfx, c, f, m)
82 cmds += "\n# For each supported locale there is a subfeed in each of the feed folders.\n"
83 cmds += "# You can use your webbrowser to check for valid locale codes.\n\n"
84 cmds += "# To point ipkg at packages for your locale, replace <my_locale> with the\n"
85 cmds += "# locale code in the template below and remove the leading '#' characters.\n\n"
87 cmds += "# src/gz %s-%s-locale-<my_locale> %s/%s/%s/locale/<my_locale>\n" % (c, f, pfx, c, f)
89 # add feed for each IMAGE_LINGUA
90 linguas = bb.data.getVar("IMAGE_LINGUAS", d, 1).split()
93 cmds += "\n# %s locale feeds\n" % fst
95 cmds += "src/gz %s-%s-locale-%s %s/%s/%s/locale/%s\n" % (c, f, fst, pfx, c, f, fst)
99 bb.data.setVar("DISTRO_FEEDS_COMMANDS", cmds, d)
102 insert_feed_uris () {
104 echo "Building feeds for [${DISTRO}].."
106 ${DISTRO_FEEDS_COMMANDS}
108 mkdir -p ${DEPLOY_DIR}/ipkg_confs/${MACHINE}
109 cp -f ${IMAGE_ROOTFS}/etc/ipkg/*conf ${DEPLOY_DIR}/ipkg_confs/${MACHINE}