blob: b0498f8ebba0942b7eaf0cf039d60d50d6363e6b [file] [log] [blame]
Tung Nguyen8f221bf2020-12-16 05:52:18 +00001SUMMARY = "Ampere Computing LLC Host Control Implementation"
2DESCRIPTION = "A host control implementation suitable for Ampere Computing LLC's systems"
3PR = "r1"
4LICENSE = "Apache-2.0"
5LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
6
7inherit systemd
8inherit obmc-phosphor-systemd
9
Thang Q. Nguyend57a5fb2022-02-18 05:57:04 +000010RDEPENDS:${PN} = "bash"
Tung Nguyen8f221bf2020-12-16 05:52:18 +000011S = "${WORKDIR}"
12
ThuBaNguyen98f43be2021-07-01 22:29:49 +070013SRC_URI = " \
Thang Q. Nguyend57a5fb2022-02-18 05:57:04 +000014 file://ampere-host-force-reset@.service \
15 file://ampere-host-on-host-check@.service \
16 file://ampere_host_check.sh \
Tung Nguyen8f221bf2020-12-16 05:52:18 +000017 "
18
Tung Nguyen8f221bf2020-12-16 05:52:18 +000019SYSTEMD_PACKAGES = "${PN}"
Thang Q. Nguyenfa1aa4d2021-08-07 05:09:50 +000020SYSTEMD_SERVICE:${PN} = " \
Thang Q. Nguyend57a5fb2022-02-18 05:57:04 +000021 ampere-host-force-reset@.service \
22 "
Tung Nguyen8f221bf2020-12-16 05:52:18 +000023
ThuBaNguyenfb214782021-07-08 14:20:43 +070024# append force reboot
ThuBaNguyen2f952142021-07-05 13:32:26 +070025HOST_WARM_REBOOT_FORCE_TGT = "ampere-host-force-reset@.service"
ThuBaNguyenfb214782021-07-08 14:20:43 +070026HOST_WARM_REBOOT_FORCE_INSTMPL = "ampere-host-force-reset@{0}.service"
Tung Nguyen8f221bf2020-12-16 05:52:18 +000027HOST_WARM_REBOOT_FORCE_TGTFMT = "obmc-host-force-warm-reboot@{0}.target"
ThuBaNguyenfb214782021-07-08 14:20:43 +070028HOST_WARM_REBOOT_FORCE_TARGET_FMT = "../${HOST_WARM_REBOOT_FORCE_TGT}:${HOST_WARM_REBOOT_FORCE_TGTFMT}.requires/${HOST_WARM_REBOOT_FORCE_INSTMPL}"
Patrick Williamse83c2202021-09-01 16:17:33 -050029SYSTEMD_LINK:${PN} += "${@compose_list_zip(d, 'HOST_WARM_REBOOT_FORCE_TARGET_FMT', 'OBMC_HOST_INSTANCES')}"
Thang Q. Nguyenfa1aa4d2021-08-07 05:09:50 +000030SYSTEMD_SERVICE:${PN} += "${HOST_WARM_REBOOT_FORCE_TGT}"
Tung Nguyen8f221bf2020-12-16 05:52:18 +000031
ThuBaNguyen7b452822021-06-06 14:36:07 +070032HOST_ON_RESET_HOSTTMPL = "ampere-host-on-host-check@.service"
33HOST_ON_RESET_HOSTINSTMPL = "ampere-host-on-host-check@{0}.service"
34HOST_ON_RESET_HOSTTGTFMT = "obmc-host-startmin@{0}.target"
35HOST_ON_RESET_HOSTFMT = "../${HOST_ON_RESET_HOSTTMPL}:${HOST_ON_RESET_HOSTTGTFMT}.requires/${HOST_ON_RESET_HOSTINSTMPL}"
Patrick Williamse83c2202021-09-01 16:17:33 -050036SYSTEMD_LINK:${PN} += "${@compose_list_zip(d, 'HOST_ON_RESET_HOSTFMT', 'OBMC_HOST_INSTANCES')}"
Thang Q. Nguyenfa1aa4d2021-08-07 05:09:50 +000037SYSTEMD_SERVICE:${PN} += "${HOST_ON_RESET_HOSTTMPL}"
Thang Q. Nguyend57a5fb2022-02-18 05:57:04 +000038
39do_install() {
40 install -d ${D}/usr/sbin
41 install -m 0755 ${WORKDIR}/ampere_host_check.sh ${D}/${sbindir}/
42}