1*4882a593Smuzhiyun# 2*4882a593Smuzhiyun# Creates a root filesystem out of rpm packages 3*4882a593Smuzhiyun# 4*4882a593Smuzhiyun 5*4882a593SmuzhiyunROOTFS_PKGMANAGE = "rpm dnf" 6*4882a593Smuzhiyun 7*4882a593Smuzhiyun# dnf is using our custom sysconfig module, and so will fail without these 8*4882a593Smuzhiyunexport STAGING_INCDIR 9*4882a593Smuzhiyunexport STAGING_LIBDIR 10*4882a593Smuzhiyun 11*4882a593Smuzhiyun# Add 100Meg of extra space for dnf 12*4882a593SmuzhiyunIMAGE_ROOTFS_EXTRA_SPACE:append = "${@bb.utils.contains("PACKAGE_INSTALL", "dnf", " + 102400", "", d)}" 13*4882a593Smuzhiyun 14*4882a593Smuzhiyun# Dnf is python based, so be sure python3-native is available to us. 15*4882a593SmuzhiyunEXTRANATIVEPATH += "python3-native" 16*4882a593Smuzhiyun 17*4882a593Smuzhiyun# opkg is needed for update-alternatives 18*4882a593SmuzhiyunRPMROOTFSDEPENDS = "rpm-native:do_populate_sysroot \ 19*4882a593Smuzhiyun dnf-native:do_populate_sysroot \ 20*4882a593Smuzhiyun createrepo-c-native:do_populate_sysroot \ 21*4882a593Smuzhiyun opkg-native:do_populate_sysroot" 22*4882a593Smuzhiyun 23*4882a593Smuzhiyundo_rootfs[depends] += "${RPMROOTFSDEPENDS}" 24*4882a593Smuzhiyundo_populate_sdk[depends] += "${RPMROOTFSDEPENDS}" 25*4882a593Smuzhiyun 26*4882a593Smuzhiyundo_rootfs[recrdeptask] += "do_package_write_rpm do_package_qa" 27*4882a593Smuzhiyundo_rootfs[vardeps] += "PACKAGE_FEED_URIS PACKAGE_FEED_BASE_PATHS PACKAGE_FEED_ARCHS" 28*4882a593Smuzhiyun 29*4882a593Smuzhiyunpython () { 30*4882a593Smuzhiyun if d.getVar('BUILD_IMAGES_FROM_FEEDS'): 31*4882a593Smuzhiyun flags = d.getVarFlag('do_rootfs', 'recrdeptask') 32*4882a593Smuzhiyun flags = flags.replace("do_package_write_rpm", "") 33*4882a593Smuzhiyun flags = flags.replace("do_deploy", "") 34*4882a593Smuzhiyun flags = flags.replace("do_populate_sysroot", "") 35*4882a593Smuzhiyun d.setVarFlag('do_rootfs', 'recrdeptask', flags) 36*4882a593Smuzhiyun d.setVar('RPM_PREPROCESS_COMMANDS', '') 37*4882a593Smuzhiyun d.setVar('RPM_POSTPROCESS_COMMANDS', '') 38*4882a593Smuzhiyun 39*4882a593Smuzhiyun} 40