diff options
Diffstat (limited to 'classes/image.bbclass')
| -rw-r--r-- | classes/image.bbclass | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/classes/image.bbclass b/classes/image.bbclass index f03a115388..2105195003 100644 --- a/classes/image.bbclass +++ b/classes/image.bbclass @@ -1,4 +1,5 @@ inherit rootfs_${IMAGE_PKGTYPE} +inherit kernel-arch LICENSE = "MIT" PACKAGES = "" @@ -17,6 +18,9 @@ IMAGE_INITSCRIPTS ?= "initscripts" # IMAGE_LOGIN_MANAGER ?= "tinylogin" +# set sane default for the SPLASH variable +SPLASH ?= "" + IMAGE_KEEPROOTFS ?= "" IMAGE_KEEPROOTFS[doc] = "Set to non-empty to keep ${IMAGE_ROOTFS} around after image creation." @@ -32,7 +36,7 @@ IMAGE_BASENAME[export] = "1" export PACKAGE_INSTALL ?= "${IMAGE_INSTALL} ${IMAGE_BOOT}" # We need to recursively follow RDEPENDS and RRECOMMENDS for images -do_rootfs[recrdeptask] += "do_deploy do_populate_staging" +do_rootfs[recrdeptask] += "do_deploy do_populate_sysroot" # Images are generally built explicitly, do not need to be part of world. EXCLUDE_FROM_WORLD = "1" @@ -43,7 +47,7 @@ PID = "${@os.getpid()}" PACKAGE_ARCH = "${MACHINE_ARCH}" -do_rootfs[depends] += "makedevs-native:do_populate_staging fakeroot-native:do_populate_staging" +do_rootfs[depends] += "makedevs-native:do_populate_sysroot fakeroot-native:do_populate_sysroot" python () { import bb @@ -51,9 +55,9 @@ python () { deps = bb.data.getVarFlag('do_rootfs', 'depends', d) or "" for type in (bb.data.getVar('IMAGE_FSTYPES', d, True) or "").split(): for dep in ((bb.data.getVar('IMAGE_DEPENDS_%s' % type, d) or "").split() or []): - deps += " %s:do_populate_staging" % dep + deps += " %s:do_populate_sysroot" % dep for dep in (bb.data.getVar('EXTRA_IMAGEDEPENDS', d, True) or "").split(): - deps += " %s:do_populate_staging" % dep + deps += " %s:do_populate_sysroot" % dep bb.data.setVarFlag('do_rootfs', 'depends', deps, d) runtime_mapping_rename("PACKAGE_INSTALL", d) @@ -115,8 +119,12 @@ fakeroot do_rootfs () { mkdir -p ${IMAGE_ROOTFS} mkdir -p ${DEPLOY_DIR_IMAGE} + mkdir -p ${IMAGE_ROOTFS}/etc + if [ "${USE_DEVFS}" != "1" ]; then + rm -rf ${IMAGE_ROOTFS}/etc/device_table for devtable in ${@get_devtable_list(d)}; do + cat $devtable >> ${IMAGE_ROOTFS}/etc/device_table makedevs -r ${IMAGE_ROOTFS} -D $devtable done fi @@ -197,7 +205,7 @@ log_check() { # can decide if they want it or not zap_root_password () { - sed 's%^root:[^:]*:%root:*:%' < ${IMAGE_ROOTFS}/etc/passwd >${IMAGE_ROOTFS}/etc/passwd.new + sed 's%^root:[^:]*:%root::%' < ${IMAGE_ROOTFS}/etc/passwd >${IMAGE_ROOTFS}/etc/passwd.new mv ${IMAGE_ROOTFS}/etc/passwd.new ${IMAGE_ROOTFS}/etc/passwd } @@ -237,7 +245,7 @@ install_linguas() { if [ -e ${IMAGE_ROOTFS}/usr/bin/opkg-cl ] ; then OPKG="opkg-cl ${IPKG_ARGS}" - ${OPKG} update + ${OPKG} update || true ${OPKG} list_installed | awk '{print $1}' |sort | uniq > /tmp/installed-packages for i in $(cat /tmp/installed-packages | grep -v locale) ; do @@ -252,7 +260,9 @@ if [ -e ${IMAGE_ROOTFS}/usr/bin/opkg-cl ] ; then cat /tmp/wanted-locale-packages /tmp/available-locale-packages | sort | uniq -d > /tmp/pending-locale-packages - cat /tmp/pending-locale-packages | xargs ${OPKG} -nodeps install + if [ -s /tmp/pending-locale-packages ] ; then + cat /tmp/pending-locale-packages | xargs ${OPKG} -nodeps install + fi rm -f ${IMAGE_ROOTFS}${libdir}/opkg/lists/* for i in ${IMAGE_ROOTFS}${libdir}/opkg/info/*.preinst; do |
