diff options
author | Jason M. Bills <jason.m.bills@intel.com> | 2022-01-06 23:59:39 +0300 |
---|---|---|
committer | Jason M. Bills <jason.m.bills@intel.com> | 2022-01-06 23:59:39 +0300 |
commit | 32777eec25d2c527a62e5ffab90a3dfef35855aa (patch) | |
tree | 588a90a6fe9fb0b35c7ce23ea3bd79fa5151ccde /meta-qualcomm/meta-centriq2400-rep/recipes-phosphor/socupdate | |
parent | 61f1ca1b31a9a1108e9e7f71e47fdc19beb0490b (diff) | |
parent | 5cc2f81c5b66da00cad24e18b0d23442af060c3f (diff) | |
download | openbmc-32777eec25d2c527a62e5ffab90a3dfef35855aa.tar.xz |
Merge tag '0.86' of firmware.bmc.openbmc.yocto.openbmc into update
Diffstat (limited to 'meta-qualcomm/meta-centriq2400-rep/recipes-phosphor/socupdate')
-rw-r--r-- | meta-qualcomm/meta-centriq2400-rep/recipes-phosphor/socupdate/files/socupdate.sh | 129 | ||||
-rw-r--r-- | meta-qualcomm/meta-centriq2400-rep/recipes-phosphor/socupdate/socupdate.bb | 14 |
2 files changed, 0 insertions, 143 deletions
diff --git a/meta-qualcomm/meta-centriq2400-rep/recipes-phosphor/socupdate/files/socupdate.sh b/meta-qualcomm/meta-centriq2400-rep/recipes-phosphor/socupdate/files/socupdate.sh deleted file mode 100644 index 67d706339..000000000 --- a/meta-qualcomm/meta-centriq2400-rep/recipes-phosphor/socupdate/files/socupdate.sh +++ /dev/null @@ -1,129 +0,0 @@ -#!/bin/sh -e -# SOC update tool, need two parameter(soc update file name and TFTP ip) - -if [ ! -n "$1" -o ! -n "$2" ] ;then - echo "Please enter SOC-ImageName and TFTP-IP." - echo "Format: socupdate.sh FileName IP" - echo "Example: socupdate.sh 0ACJAXXX.ROM 192.168.1.1" - exit -fi - -echo "SOC update start." - -echo "Check BMC status." -checkbmc='gpioutil -p Q4' -if $checkbmc = "1"; then - echo "BMC is ready." -else - echo "BMC isn't ready." - exit -fi - -echo "Check SOC image does it exist." -cd /tmp/ -FILEEXIST=0 -if [ -f "/tmp/$1" ]; then - GETFILE=`du -k $1 | awk '{print $1}'` - if [ "$GETFILE" -eq "65536" ]; then - FILEEXIST=1 - echo "SOC image is exist." - else - FILEEXIST=0 - fi -fi - -if [ $FILEEXIST -eq 0 ]; then - echo "Get SOC image from TFTP server." - echo "Please wait a few minutes." - tftp -g -r $1 $2 & - sleep 2 - LENGTH=0 - ERRCOUNT=0 - while true - do - echo -ne "\r[" - usleep 500000 - while [ $LENGTH -le 30 ] - do - usleep 500000 - echo -n ">" - LENGTH=$(($LENGTH+1)) - if [ -f "/tmp/$1" ]; then - GETFILE=`du -k $1 | awk '{print $1}'` - if [ $GETFILE -eq 65536 ]; then - echo -en "\r" - echo -en "--- Image download completed --- \n" - usleep 1000000 - break 2 - fi - else - ERRCOUNT=$(($ERRCOUNT+1)) - if [ $ERRCOUNT -le 10 ]; then - echo -en "\r" - echo -en "SOC-ImageName or TFTP-IP is ERROR. \n" - usleep 500000 - exit - fi - fi - done - echo -n "]" - LENGTH=0 - usleep 500000 - echo -en "\r " - done -fi -sleep 3 - -echo "Switch the host SPI bus to BMC." -cmd='gpioutil -p C7 -v 1' -if $cmd 1>/dev/null 2>&1; then - echo "Switch completed." -else - echo "Switch failed." -fi -echo "Load the ASpeed SMC driver" -echo 1e630000.flash-controller > /sys/bus/platform/drivers/aspeed-smc/bind -sleep 2 -chassisstate=$(obmcutil chassisstate | awk -F. '{print $NF}') -echo "---Current Chassisstate $chassisstate---" -if [ "$chassisstate" == 'On' ]; -then - echo "---Chassis on turning it off---" - obmcutil chassisoff - sleep 10 -fi - -echo "Flashcp to update SOC." -echo "Please wait a few minutes." -flashcp -v /tmp/$1 /dev/mtd6 -sleep 3 - -echo "Switch the host SPI bus to HOST." -cmd1='gpioutil -p C7 -v 0' -if $cmd1 1>/dev/null 2>&1; then - echo "Switch completed." -else - echo "Switch failed." -fi -echo "unLoad the ASpeed SMC driver" -echo 1e630000.flash-controller > /sys/bus/platform/drivers/aspeed-smc/unbind -echo -ne "SOC update steps is complete.\n" -if [ "$chassisstate" == 'On' ]; -then - echo "5 sec later will be power-on." - echo "If wantn't power-on, please CTRL + C leave script." - WAITSEC=5 - while [ $WAITSEC -ge 0 ] - do - echo -n "Countdown seconds:$WAITSEC" - sleep 1 - echo -en "\r" - WAITSEC=$(($WAITSEC-1)) - if [ $WAITSEC -eq 0 ]; then - echo -en "\r" - echo -en "--- Power-on --- \n" - obmcutil chassison - break 1 - fi - done -fi diff --git a/meta-qualcomm/meta-centriq2400-rep/recipes-phosphor/socupdate/socupdate.bb b/meta-qualcomm/meta-centriq2400-rep/recipes-phosphor/socupdate/socupdate.bb deleted file mode 100644 index 9c4a0bd7e..000000000 --- a/meta-qualcomm/meta-centriq2400-rep/recipes-phosphor/socupdate/socupdate.bb +++ /dev/null @@ -1,14 +0,0 @@ -SUMMARY = "Qualcomm SOC update" -DESCRIPTION = "" -HOMEPAGE = "" -PR = "r1" -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10" - - -SRC_URI += "file://socupdate.sh" - -do_install() { - install -d ${D}${bindir} - install -m 0755 ${WORKDIR}/socupdate.sh ${D}${bindir}/socupdate.sh -} |