blob: 789431ba0fbb1c114fd3b9e0f22c5ac150601371 [file] [log] [blame]
Patrick Williamsd91b4b32023-02-05 20:51:19 -06001SUMMARY = "Phosphor OpenBMC pre-init scripts for static-norootfs layout"
2DESCRIPTION = "Phosphor OpenBMC filesystem mount implementation for static-norootfs"
3LICENSE = "Apache-2.0"
4LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
5PR = "r1"
6
7SOURCE_FILES = "\
8 init \
9 10-early-mounts \
10 20-udev \
Patrick Williams4535b702023-02-09 12:45:46 -060011 21-factory-reset \
Patrick Williamsd91b4b32023-02-05 20:51:19 -060012 30-ubiattach-or-format \
13 50-mount-persistent \
14 "
15SRC_URI += "\
16 ${@' '.join(\
17 [ 'file://' + x for x in d.getVar('SOURCE_FILES', True).split()])} \
18 "
19
20S = "${WORKDIR}"
21
22inherit allarch
23inherit update-alternatives
24
25PKG_INSTALL_DIR="${libexecdir}/${BPN}"
26FILES:${PN} += "${PKG_INSTALL_DIR}"
27
28do_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
36RDEPENDS:${PN} += " \
Patrick Williams4535b702023-02-09 12:45:46 -060037 ${@d.getVar('PREFERRED_PROVIDER_u-boot-fw-utils', True) or \
38 'u-boot-fw-utils'} \
Patrick Williamsd91b4b32023-02-05 20:51:19 -060039 ${VIRTUAL-RUNTIME_base-utils} \
40 mtd-utils-ubifs \
41 udev \
42"
43
44ALTERNATIVE_LINK_NAME[init] = "${base_sbindir}/init"
45# Use a number higher than the systemd init alternative so that
46# ours is enabled instead.
47ALTERNATIVE_PRIORITY[init] ?= "400"
48
49ALTERNATIVE:${PN} = "init"
50ALTERNATIVE_TARGET[init] = "${PKG_INSTALL_DIR}/init"