Patrick Williams | d91b4b3 | 2023-02-05 20:51:19 -0600 | [diff] [blame] | 1 | SUMMARY = "Phosphor OpenBMC pre-init scripts for static-norootfs layout" |
| 2 | DESCRIPTION = "Phosphor OpenBMC filesystem mount implementation for static-norootfs" |
| 3 | LICENSE = "Apache-2.0" |
| 4 | LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10" |
| 5 | PR = "r1" |
| 6 | |
| 7 | SOURCE_FILES = "\ |
| 8 | init \ |
| 9 | 10-early-mounts \ |
| 10 | 20-udev \ |
Patrick Williams | 4535b70 | 2023-02-09 12:45:46 -0600 | [diff] [blame] | 11 | 21-factory-reset \ |
Patrick Williams | d91b4b3 | 2023-02-05 20:51:19 -0600 | [diff] [blame] | 12 | 30-ubiattach-or-format \ |
| 13 | 50-mount-persistent \ |
| 14 | " |
| 15 | SRC_URI += "\ |
| 16 | ${@' '.join(\ |
| 17 | [ 'file://' + x for x in d.getVar('SOURCE_FILES', True).split()])} \ |
| 18 | " |
| 19 | |
| 20 | S = "${WORKDIR}" |
| 21 | |
| 22 | inherit allarch |
| 23 | inherit update-alternatives |
| 24 | |
| 25 | PKG_INSTALL_DIR="${libexecdir}/${BPN}" |
| 26 | FILES:${PN} += "${PKG_INSTALL_DIR}" |
| 27 | |
| 28 | do_install() { |
| 29 | install -d ${D}${PKG_INSTALL_DIR} |
| 30 | |
| 31 | for f in ${SOURCE_FILES} ; do |
| 32 | install -m 0755 ${S}/$f ${D}${PKG_INSTALL_DIR}/$f |
| 33 | done |
| 34 | } |
| 35 | |
| 36 | RDEPENDS:${PN} += " \ |
Patrick Williams | 4535b70 | 2023-02-09 12:45:46 -0600 | [diff] [blame] | 37 | ${@d.getVar('PREFERRED_PROVIDER_u-boot-fw-utils', True) or \ |
| 38 | 'u-boot-fw-utils'} \ |
Patrick Williams | d91b4b3 | 2023-02-05 20:51:19 -0600 | [diff] [blame] | 39 | ${VIRTUAL-RUNTIME_base-utils} \ |
| 40 | mtd-utils-ubifs \ |
| 41 | udev \ |
| 42 | " |
| 43 | |
| 44 | ALTERNATIVE_LINK_NAME[init] = "${base_sbindir}/init" |
| 45 | # Use a number higher than the systemd init alternative so that |
| 46 | # ours is enabled instead. |
| 47 | ALTERNATIVE_PRIORITY[init] ?= "400" |
| 48 | |
| 49 | ALTERNATIVE:${PN} = "init" |
| 50 | ALTERNATIVE_TARGET[init] = "${PKG_INSTALL_DIR}/init" |