diff options
Diffstat (limited to 'meta-fii')
-rw-r--r-- | meta-fii/OWNERS | 1 | ||||
-rw-r--r-- | meta-fii/meta-kudo/conf/local.conf.sample | 2 | ||||
-rw-r--r-- | meta-fii/meta-kudo/recipes-kudo/kudo-sys-utility/kudo-boot/init_once.sh | 82 |
3 files changed, 50 insertions, 35 deletions
diff --git a/meta-fii/OWNERS b/meta-fii/OWNERS index 3fb7829f6..f227b081f 100644 --- a/meta-fii/OWNERS +++ b/meta-fii/OWNERS @@ -2,6 +2,5 @@ owners: - benjaminfair@google.com - vveerach@google.com - lancelot.kao@fii-usa.com -- mohaimen.alsamarai@fii-na.com - xiao-peng.chen@fii-na.com - mustafa.shehabi@fii-na.com diff --git a/meta-fii/meta-kudo/conf/local.conf.sample b/meta-fii/meta-kudo/conf/local.conf.sample index ed6eb492b..ad8272cf5 100644 --- a/meta-fii/meta-kudo/conf/local.conf.sample +++ b/meta-fii/meta-kudo/conf/local.conf.sample @@ -1,6 +1,6 @@ MACHINE ??= "kudo" DISTRO ?= "openbmc-kudo" -PACKAGE_CLASSES ?= "package_rpm" +PACKAGE_CLASSES ?= "package_ipk" SANITY_TESTED_DISTROS:append ?= " *" EXTRA_IMAGE_FEATURES = "debug-tweaks" USER_CLASSES ?= "buildstats image-prelink" diff --git a/meta-fii/meta-kudo/recipes-kudo/kudo-sys-utility/kudo-boot/init_once.sh b/meta-fii/meta-kudo/recipes-kudo/kudo-sys-utility/kudo-boot/init_once.sh index adb86f238..8231e3de8 100644 --- a/meta-fii/meta-kudo/recipes-kudo/kudo-sys-utility/kudo-boot/init_once.sh +++ b/meta-fii/meta-kudo/recipes-kudo/kudo-sys-utility/kudo-boot/init_once.sh @@ -1,51 +1,67 @@ #!/bin/bash source /usr/sbin/kudo-lib.sh -# 0 for EVT. DVT will have a non-zero board version + +function set_mux_default(){ + # set all mux route to CPU before power on host + # BMC_CPU_RTC_I2C_SEL #120 + set_gpio_ctrl 120 out 1 + # BMC_CPU_DDR_I2C_SEL #84 + set_gpio_ctrl 84 out 1 + # BMC_CPU_EEPROM_I2C_SEL #85 + set_gpio_ctrl 85 out 1 + # BMC_CPU_PMBUS_SEL #86 + set_gpio_ctrl 86 out 1 + # LED control + # LED_BMC_LIVE #7 + set_gpio_ctrl 7 out 1 + + # SPI control + # Send command to CPLD to switch the bios spi interface to host + i2cset -y -f -a 13 0x76 0x10 0x00 + +} + +# 0 - 63 EVT +# 64 + DVT/PVT boardver=$(printf '%d' `cat /sys/bus/i2c/drivers/fiicpld/34-0076/CMD00 | awk '{print $6}'`) -# sleep so that FRU and all ipmitool Devices are ready before HOST OS -# gpio 143 for HPM_STBY_RST_N do to DC-SCM spec -set_gpio_ctrl 143 out 1 -sleep 5 # for the MUX to get ready -# set all mux route to CPU before power on host -# BMC_CPU_RTC_I2C_SEL #120 -set_gpio_ctrl 120 out 1 -# BMC_CPU_DDR_I2C_SEL #84 -set_gpio_ctrl 84 out 1 + # On EVT machines, the secondary SCP EEPROM is used. # Set BMC_I2C_BACKUP_SEL to secondary. -if [[ $boardver == 0 ]]; then +if [[ $boardver -lt 64 ]]; then echo "EVT system. Choosing secondary SCP EEPROM." set_gpio_ctrl 168 out 0 -fi -# BMC_CPU_EEPROM_I2C_SEL #85 -set_gpio_ctrl 85 out 1 -# BMC_CPU_PMBUS_SEL #86 -set_gpio_ctrl 86 out 1 - -# LED control -# LED_BMC_LIVE #7 -set_gpio_ctrl 7 out 1 - -# SPI control -# Send command to CPLD to switch the bios spi interface to host -i2cset -y -f -a 13 0x76 0x10 0x00 - -# Power control -# MON_BMC_ALIVE, GPIO 10(EVT), GPIO137(DVT) -set_gpio_ctrl 10 out 1 -set_gpio_ctrl 137 out 1 -# S0_BMC_OK, GPIO 69 -set_gpio_ctrl 69 out 1 + set_mux_default + # Power control + # S0_BMC_OK, GPIO 69 + set_gpio_ctrl 69 out 1 + + # MON_BMC_ALIVE, GPIO 10(EVT), GPIO137(DVT) + set_gpio_ctrl 137 out 0 # setting unused GPIO + set_gpio_ctrl 10 out 1 +else + echo "DVT or PVT system" + # sleep so that FRU and all ipmitool Devices are ready before HOST OS + # gpio 143 for HPM_STBY_RST_N do to DC-SCM spec + set_gpio_ctrl 143 out 1 # on DVT this became HPM_STBY_RST_N (EVT1 came from CPLD) + sleep 5 # for the MUX to get ready + set_mux_default + # Power control + # S0_BMC_OK, GPIO 69 + set_gpio_ctrl 69 out 1 + + # MON_BMC_ALIVE GPIO137(DVT) + set_gpio_ctrl 10 out 0 # setting unused GPIO + set_gpio_ctrl 137 out 1 +fi # Disable CPU 1 CLK when cpu not detected -boardver=$(printf '%d' `cat /sys/bus/i2c/drivers/fiicpld/34-0076/CMD00 | awk '{print $6}'`) # echo init_once cpu $CPU1_STATUS > /dev/ttyS0 # echo init_once board $boardver > /dev/ttyS0 CPU1_STATUS_N=$(get_gpio_ctrl 136) if [[ $CPU1_STATUS_N == 1 ]]; then #Execute this only on DVT systems - if [[ $boardver == 0 ]]; then + if [[ $boardver -lt 64 ]]; then echo EVT system $boardver else echo DVT system $boardver |