summaryrefslogtreecommitdiffstats
path: root/meta-raptor/meta-asus/recipes-utils/openbmc-utils/openbmc-utils_%.bbappend
diff options
context:
space:
mode:
Diffstat (limited to 'meta-raptor/meta-asus/recipes-utils/openbmc-utils/openbmc-utils_%.bbappend')
-rw-r--r--meta-raptor/meta-asus/recipes-utils/openbmc-utils/openbmc-utils_%.bbappend71
1 files changed, 71 insertions, 0 deletions
diff --git a/meta-raptor/meta-asus/recipes-utils/openbmc-utils/openbmc-utils_%.bbappend b/meta-raptor/meta-asus/recipes-utils/openbmc-utils/openbmc-utils_%.bbappend
new file mode 100644
index 0000000..45aef73
--- /dev/null
+++ b/meta-raptor/meta-asus/recipes-utils/openbmc-utils/openbmc-utils_%.bbappend
@@ -0,0 +1,71 @@
+# Copyright 2015-present Facebook. All Rights Reserved.
+#
+# This program file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the
+# Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program in a file named COPYING; if not, write to the
+# Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor,
+# Boston, MA 02110-1301 USA
+
+FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
+
+SRC_URI += "file://disable_watchdog.sh \
+ file://board-utils.sh \
+ "
+
+OPENBMC_UTILS_FILES += " \
+ disable_watchdog.sh \
+ "
+
+DEPENDS_append = " update-rc.d-native"
+
+do_install_board() {
+ # for backward compatible, create /usr/local/fbpackages/utils/ast-functions
+ olddir="/usr/local/fbpackages/utils"
+ install -d ${D}${olddir}
+ ln -s "/usr/local/bin/openbmc-utils.sh" "${D}${olddir}/ast-functions"
+
+ # common lib and include files
+ install -d ${D}${includedir}/facebook
+ install -m 0644 src/include/i2c-dev.h ${D}${includedir}/facebook/i2c-dev.h
+
+ # init
+ install -d ${D}${sysconfdir}/init.d
+ install -d ${D}${sysconfdir}/rcS.d
+
+ # the script to mount /mnt/data
+ install -m 0755 ${WORKDIR}/mount_data0.sh ${D}${sysconfdir}/init.d/mount_data0.sh
+ update-rc.d -r ${D} mount_data0.sh start 03 S .
+ install -m 0755 ${WORKDIR}/rc.early ${D}${sysconfdir}/init.d/rc.early
+ update-rc.d -r ${D} rc.early start 04 S .
+
+ # Initial GPIO setup and heartbeat monitor
+ install -m 0755 ${WORKDIR}/setup-gpio.sh ${D}${sysconfdir}/init.d/setup-gpio.sh
+ update-rc.d -r ${D} setup-gpio.sh start 59 S .
+ install -m 0755 ${WORKDIR}/start_us_monitor.sh ${D}${sysconfdir}/init.d/start_us_monitor.sh
+ update-rc.d -r ${D} start_us_monitor.sh start 84 S .
+
+ # networking is done after rcS, any start level within rcS
+ # for mac fixup should work
+ install -m 755 eth0_mac_fixup.sh ${D}${sysconfdir}/init.d/eth0_mac_fixup.sh
+ update-rc.d -r ${D} eth0_mac_fixup.sh start 70 S .
+
+ install -m 755 power-on.sh ${D}${sysconfdir}/init.d/power-on.sh
+ update-rc.d -r ${D} power-on.sh start 85 S .
+
+ install -m 0755 ${WORKDIR}/rc.local ${D}${sysconfdir}/init.d/rc.local
+ update-rc.d -r ${D} rc.local start 99 2 3 4 5 .
+
+ install -m 0755 ${WORKDIR}/disable_watchdog.sh ${D}${sysconfdir}/init.d/disable_watchdog.sh
+ update-rc.d -r ${D} disable_watchdog.sh start 99 2 3 4 5 .
+}
+
+FILES_${PN} += "${sysconfdir}"
OpenPOWER on IntegriCloud