diff options
Diffstat (limited to 'meta-openbmc-mods/meta-common/recipes-core')
12 files changed, 91 insertions, 27 deletions
diff --git a/meta-openbmc-mods/meta-common/recipes-core/ac-boot-check/ac-boot-check/ac-boot-check.service b/meta-openbmc-mods/meta-common/recipes-core/ac-boot-check/ac-boot-check/ac-boot-check.service index de607f1a7..e8b563850 100644 --- a/meta-openbmc-mods/meta-common/recipes-core/ac-boot-check/ac-boot-check/ac-boot-check.service +++ b/meta-openbmc-mods/meta-common/recipes-core/ac-boot-check/ac-boot-check/ac-boot-check.service @@ -1,6 +1,6 @@ [Unit] Description=Check for AC boot -After=settings.service +After=xyz.openbmc_project.Settings.service [Service] Type=oneshot diff --git a/meta-openbmc-mods/meta-common/recipes-core/at-scale-debug/at-scale-debug_git.bb b/meta-openbmc-mods/meta-common/recipes-core/at-scale-debug/at-scale-debug_git.bb index b57ae1ca5..1f7fbe73b 100644 --- a/meta-openbmc-mods/meta-common/recipes-core/at-scale-debug/at-scale-debug_git.bb +++ b/meta-openbmc-mods/meta-common/recipes-core/at-scale-debug/at-scale-debug_git.bb @@ -12,7 +12,7 @@ DEPENDS = "sdbusplus openssl libpam libgpiod" do_configure[depends] += "virtual/kernel:do_shared_workdir" -SRC_URI = "git://git@github.com/Intel-BMC/asd;protocol=ssh" +SRC_URI = "git://github.com/Intel-BMC/asd;protocol=git" SRCREV = "1.4.2" inherit useradd diff --git a/meta-openbmc-mods/meta-common/recipes-core/crashdump/crashdump_git.bb b/meta-openbmc-mods/meta-common/recipes-core/crashdump/crashdump_git.bb index 21ae0bff7..9d3883d3a 100644 --- a/meta-openbmc-mods/meta-common/recipes-core/crashdump/crashdump_git.bb +++ b/meta-openbmc-mods/meta-common/recipes-core/crashdump/crashdump_git.bb @@ -12,7 +12,7 @@ EXTRA_OECMAKE = "-DCRASHDUMP_BUILD_UT=ON" LICENSE = "Proprietary" LIC_FILES_CHKSUM = "file://LICENSE;md5=26bb6d0733830e7bab774914a8f8f20a" -SRC_URI = "git://git@github.com/Intel-BMC/crashdump;protocol=ssh" +SRC_URI = "git://github.com/Intel-BMC/crashdump;protocol=git" SRCREV = "0.4" S = "${WORKDIR}/git" diff --git a/meta-openbmc-mods/meta-common/recipes-core/fw-update/files/fwupd.sh b/meta-openbmc-mods/meta-common/recipes-core/fw-update/files/fwupd.sh index ca5da9598..3073128e0 100644 --- a/meta-openbmc-mods/meta-common/recipes-core/fw-update/files/fwupd.sh +++ b/meta-openbmc-mods/meta-common/recipes-core/fw-update/files/fwupd.sh @@ -48,7 +48,13 @@ if [ $# -eq 0 ]; then # set DEFURI in $HOME/.fwupd.defaults URI="$DEFURI" else - URI="$1" + if [[ "$1" == *"/"* ]]; then + URI=$1 # local file + local_file=1 ; + else + URI="file:////tmp/images/$1/image-runtime" + local_file=0 ; + fi fi PROTO=$(echo "$URI" | sed 's,\([a-z]*\)://.*$,\1,') @@ -60,10 +66,12 @@ else REMOTE_PATH=$(echo "$REMOTE" | sed 's,[^/]*/\(.*\)$,\1,') fi LOCAL_PATH="/tmp/$(basename $REMOTE_PATH)" +echo "URI=$URI" echo "PROTO=$PROTO" echo "REMOTE=$REMOTE" echo "REMOTE_HOST=$REMOTE_HOST" echo "REMOTE_PATH=$REMOTE_PATH" +echo "LOCAL_PATH=$LOCAL_PATH" if [ ! -e $LOCAL_PATH ] || [ $(stat -c %s $LOCAL_PATH) -eq 0 ]; then echo "Download '$REMOTE_PATH' from $PROTO $REMOTE_HOST $REMOTE_PATH" case "$PROTO" in @@ -105,25 +113,37 @@ fi # PFR image update section # this file being created at build time for PFR images -if [ -e /usr/share/pfr ] -then +if [ -e /usr/share/pfr ] && [ $local_file -eq 0 ]; then + if [ -e /tmp/fwupd_progress ]; then + echo "Firmware update already in progress" + exit 1 + fi +touch /tmp/fwupd_progress + # read the image type from the uploaded image # Byte at location 0x8 gives image type -img_type=$(hexdump -s 8 -n 1 $LOCAL_PATH | cut -b12,1 | sed '2d;') +img_type=$(busctl get-property xyz.openbmc_project.Software.BMC.Updater /xyz/openbmc_project/software/$1 xyz.openbmc_project.Software.Version Purpose | cut -d " " -f 2 | cut -d "." -f 6 | sed 's/.\{1\}$//') +img_target=$(busctl get-property xyz.openbmc_project.Software.BMC.Updater /xyz/openbmc_project/software/$1 xyz.openbmc_project.Software.Activation RequestedActivation | cut -d " " -f 2| cut -d "." -f 6 | sed 's/.\{1\}$//') + echo "image-type=$img_type" +echo "image-target=$img_target" # BMC image - max size 32MB -if [ "$img_type" = '04' ]; then +if [ "$img_type" = 'BMC' ]; then echo "BMC firmware image" # 32MB - 33554432 img_size=33554432 - upd_intent_val=0x08 + if [ "$img_target" = 'StandbySpare' ]; then + upd_intent_val=0x10 + else + upd_intent_val=0x08 + fi # page is at 4KB boundary img_page_offset=0 erase_offset=0 blk_cnt=0x200 # CPLD image- max size 4MB -elif [ "$img_type" = '00' ]; then +elif [ "$img_type" = 'Other' ]; then echo "CPLD firmware image" # 4MB - 4194304 img_size=4194304 @@ -134,11 +154,15 @@ elif [ "$img_type" = '00' ]; then erase_offset=0x3000000 blk_cnt=0x40 # BIOS image- max size 16MB -elif [ "$img_type" = '02' ]; then +elif [ "$img_type" = 'Host' ]; then echo "BIOS firmware image" # 16MB- 16777216 img_size=16777216 - upd_intent_val=0x01 + if [ "$img_target" = 'StandbySpare' ]; then + upd_intent_val=0x02 + else + upd_intent_val=0x01 + fi # dd command accepts the offset in decimal # below is the page offset in 4KB boundary img_page_offset=8192 @@ -146,18 +170,21 @@ elif [ "$img_type" = '02' ]; then blk_cnt=0x100 else echo "${img_type}:Unknown image type, exiting the firmware update script" + rm -rf /tmp/fwupd_progress exit 1 fi -# do a quick sanity check on the image +# do a size check on the image if [ $(stat -c "%s" "$LOCAL_PATH") -gt $img_size ]; then echo "Update file "$LOCAL_PATH" is bigger than the supported image size" + rm -rf /tmp/fwupd_progress exit 1 fi TGT="/dev/mtd/image-stg" -echo "Updating $(basename $TGT)" +echo "Update $(basename $TGT)" flash_erase $TGT $erase_offset $blk_cnt +sync echo "Writing $(stat -c "%s" "$LOCAL_PATH") bytes" # cat "$LOCAL_PATH" > "$TGT" dd bs=4k seek=$img_page_offset if=$LOCAL_PATH of=$TGT @@ -165,8 +192,12 @@ sync echo "Written $(stat -c "%s" "$LOCAL_PATH") bytes" # remove the updated image from /tmp rm -f $LOCAL_PATH -echo "Setting update intent in PFR CPLD" +echo "Writing $upd_intent_val to update intent register in PFR RoT" sleep 5 # delay for sync and to get the above echo messages + +# remove the file which used as lock +rm -rf /tmp/fwupd_progress + # write to PFRCPLD about BMC update intent. i2cset -y 4 0x38 0x13 $upd_intent_val @@ -197,11 +228,13 @@ fi BOOTADDR=$(fw_printenv bootcmd | awk '{print $2}') TGT="/dev/mtd/image-a" -case "$BOOTADDR" in - 20080000) TGT="/dev/mtd/image-b"; BOOTADDR="22480000" ;; - 22480000) TGT="/dev/mtd/image-a"; BOOTADDR="20080000" ;; - *) TGT="/dev/mtd/image-a"; BOOTADDR="20080000" ;; -esac +if [ ! -e /usr/share/pfr ]; then + case "$BOOTADDR" in + 20080000) TGT="/dev/mtd/image-b"; BOOTADDR="22480000" ;; + 22480000) TGT="/dev/mtd/image-a"; BOOTADDR="20080000" ;; + *) TGT="/dev/mtd/image-a"; BOOTADDR="20080000" ;; + esac +fi echo "Updating $(basename $TGT) (use bootm $BOOTADDR)" flash_erase $TGT 0 0 if [ $? -ne 0 ]; then diff --git a/meta-openbmc-mods/meta-common/recipes-core/host-error-monitor/host-error-monitor_git.bb b/meta-openbmc-mods/meta-common/recipes-core/host-error-monitor/host-error-monitor_git.bb index 5aab3db34..faa08a58c 100644 --- a/meta-openbmc-mods/meta-common/recipes-core/host-error-monitor/host-error-monitor_git.bb +++ b/meta-openbmc-mods/meta-common/recipes-core/host-error-monitor/host-error-monitor_git.bb @@ -2,7 +2,7 @@ LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://${INTELBASE}/COPYING.apache-2.0;md5=34400b68072d710fecd0a2940a0d1658" inherit cmake systemd -SRC_URI = "git://git@github.com/Intel-BMC/host-error-monitor.git;protocol=ssh" +SRC_URI = "git://github.com/Intel-BMC/host-error-monitor.git;protocol=ssh" DEPENDS = "boost sdbusplus libgpiod libpeci" diff --git a/meta-openbmc-mods/meta-common/recipes-core/interfaces/libmctp_git.bb b/meta-openbmc-mods/meta-common/recipes-core/interfaces/libmctp_git.bb index 560efc72c..fcf6631ea 100644 --- a/meta-openbmc-mods/meta-common/recipes-core/interfaces/libmctp_git.bb +++ b/meta-openbmc-mods/meta-common/recipes-core/interfaces/libmctp_git.bb @@ -2,7 +2,7 @@ SUMMARY = "libmctp" DESCRIPTION = "Implementation of MCTP (DTMF DSP0236)" SRC_URI = "git://github.com/openbmc/libmctp.git" -SRCREV = "8081beba756d371cba40dee86b37bbc654020b17" +SRCREV = "62d7236f6be8e830e753c94b6b9018004a7f8e27" PV = "0.1+git${SRCPV}" diff --git a/meta-openbmc-mods/meta-common/recipes-core/ipmi/intel-ipmi-oem_%.bbappend b/meta-openbmc-mods/meta-common/recipes-core/ipmi/intel-ipmi-oem_%.bbappend index baab0e9eb..bfe6de7b2 100644 --- a/meta-openbmc-mods/meta-common/recipes-core/ipmi/intel-ipmi-oem_%.bbappend +++ b/meta-openbmc-mods/meta-common/recipes-core/ipmi/intel-ipmi-oem_%.bbappend @@ -1,4 +1,4 @@ EXTRA_OECMAKE += "${@bb.utils.contains('IMAGE_FSTYPES', 'intel-pfr', '-DINTEL_PFR_ENABLED=ON', '', d)}" EXTRA_OECMAKE += "${@bb.utils.contains('EXTRA_IMAGE_FEATURES', 'validation-unsecure', '-DBMC_VALIDATION_UNSECURE_FEATURE=ON', '', d)}" SRC_URI = "git://github.com/openbmc/intel-ipmi-oem.git" -SRCREV = "09a8314bb754dccd4af2ef8d2d9e6e43f6da74ec" +SRCREV = "822b0b40efe7695b56e1edb80f995d3c810d6d22" diff --git a/meta-openbmc-mods/meta-common/recipes-core/ipmi/ipmi-providers.bb b/meta-openbmc-mods/meta-common/recipes-core/ipmi/ipmi-providers.bb index 7f6d406d4..939efa75f 100644 --- a/meta-openbmc-mods/meta-common/recipes-core/ipmi/ipmi-providers.bb +++ b/meta-openbmc-mods/meta-common/recipes-core/ipmi/ipmi-providers.bb @@ -1,7 +1,7 @@ SUMMARY = "Intel IPMI Providers" DESCRIPTION = "IPMI Provider Libraries" -SRC_URI = "git://git@github.com/Intel-BMC/intel-ipmi-providers;protocol=ssh" +SRC_URI = "git://github.com/Intel-BMC/intel-ipmi-providers;protocol=ssh" SRCREV = "b2c6184269e3bdf601c38f716ac7ee73379af71b" S = "${WORKDIR}/git" diff --git a/meta-openbmc-mods/meta-common/recipes-core/libpeci/libpeci_git.bb b/meta-openbmc-mods/meta-common/recipes-core/libpeci/libpeci_git.bb index 8b97f95e8..9401b2496 100644 --- a/meta-openbmc-mods/meta-common/recipes-core/libpeci/libpeci_git.bb +++ b/meta-openbmc-mods/meta-common/recipes-core/libpeci/libpeci_git.bb @@ -2,10 +2,10 @@ LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://${INTELBASE}/COPYING.apache-2.0;md5=34400b68072d710fecd0a2940a0d1658" inherit cmake -SRC_URI = "git://git@github.com/Intel-BMC/provingground.git;protocol=ssh" +SRC_URI = "git://github.com/Intel-BMC/provingground.git;protocol=ssh" PV = "0.1+git${SRCPV}" -SRCREV = "e1dbcef575309efeb04d275565a6e9649f3b89dd" +SRCREV = "eddf621897090ba346b1aaa81a4b8be12076ab60" S = "${WORKDIR}/git/libpeci" diff --git a/meta-openbmc-mods/meta-common/recipes-core/nv-sync/nv-sync/nv-sync.service b/meta-openbmc-mods/meta-common/recipes-core/nv-sync/nv-sync/nv-sync.service new file mode 100644 index 000000000..852027209 --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-core/nv-sync/nv-sync/nv-sync.service @@ -0,0 +1,11 @@ +[Unit] +Description=Overlay sync to NV storage + +[Service] +# Run rsync periodically to sync the overlay to NV storage +ExecStart=bash -c 'while true; do rsync -a --delete /tmp/.overlay/ /tmp/.rwfs/.overlay; sleep 20; done' +# On shutdown, archive the bash history so we don't lose it and run one last sync +ExecStop=bash -c 'history -a; rsync -a --delete /tmp/.overlay/ /tmp/.rwfs/.overlay' + +[Install] +WantedBy=multi-user.target diff --git a/meta-openbmc-mods/meta-common/recipes-core/nv-sync/nv-sync_git.bb b/meta-openbmc-mods/meta-common/recipes-core/nv-sync/nv-sync_git.bb new file mode 100644 index 000000000..0ee70e880 --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-core/nv-sync/nv-sync_git.bb @@ -0,0 +1,20 @@ +SUMMARY = "NV Overlay Sync" +DESCRIPTION = "Script to periodically sync the overlay to NV storage" + +S = "${WORKDIR}" +SRC_URI = "file://nv-sync.service \ +" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://${INTELBASE}/COPYING.apache-2.0;md5=34400b68072d710fecd0a2940a0d1658" + +inherit systemd + +FILES_${PN} += "${systemd_system_unitdir}/nv-sync.service" + +do_install() { + install -d ${D}${systemd_system_unitdir} + install -m 0644 ${WORKDIR}/nv-sync.service ${D}${systemd_system_unitdir} +} + +SYSTEMD_SERVICE_${PN} += " nv-sync.service" diff --git a/meta-openbmc-mods/meta-common/recipes-core/peci-pcie/peci-pcie_git.bb b/meta-openbmc-mods/meta-common/recipes-core/peci-pcie/peci-pcie_git.bb index 2b77a193c..4bf1c9548 100644 --- a/meta-openbmc-mods/meta-common/recipes-core/peci-pcie/peci-pcie_git.bb +++ b/meta-openbmc-mods/meta-common/recipes-core/peci-pcie/peci-pcie_git.bb @@ -5,7 +5,7 @@ LICENSE = "CLOSED" LIC_FILES_CHKSUM = "" inherit cmake systemd -SRC_URI = "git://git@github.com/Intel-BMC/at-scale-debug;protocol=ssh" +SRC_URI = "git://github.com/Intel-BMC/at-scale-debug;protocol=ssh" DEPENDS = "boost sdbusplus libpeci" |