EdgeCore Wedge100BF-32QS Procedures: Recovery External/Main BIOS

Device Information

root@bmc:~# weutil
Wedge EEPROM :
Version: 1
Product Name: 100BF-32QS
Product Part Number: 20-000003
System Assembly Part Number: 015-000003-02
Facebook PCBA Part Number: 025-000003-02
Facebook PCB Part Number: 035-000003-02
ODM PCBA Part Number: N0PCH7632001S
ODM PCBA Serial Number: AL19009372
Product Production State: 1
Product Version: 1
Product Sub-Version: 3
Product Serial Number: AL18057571
Product Asset Tag: 000000001
System Manufacturer: Joytech
System Manufacturing Date: 05-13-21
PCB Manufacturer: ISU
Assembled At: Joytech
Local MAC: F8:8E:A1:3C:CA:54
Extended MAC Base: F8:8E:A1:3C:CA:5C
Extended MAC Address Size: 132
Location on Fabric: Montara
CRC8: 0xce
Platform : x86_64-accton_wedge100bf_32qs-r0

ONIE:/ # ifconfig
eth0 Link encap:Ethernet HWaddr 00:90:FB:73:E2:D4
inet addr:128.141.50.190 Bcast:128.141.50.191 Mask:255.255.255.192
inet6 addr: fe80::290:fbff:fe73:e2d4/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:178 errors:0 dropped:0 overruns:0 frame:0
TX packets:52 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:15919 (15.5 KiB) TX bytes:8968 (8.7 KiB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

Recovery Main BIOS

# Prepare the BIOS image in USB
# Wedge100BF-series BIOS R1.00.E4 (latest) Download URL:
# https://support.edge-core.com/hc/en-us/articles/4402479686425-Wedge100BF-series-BIOS-R1-00-E4-latest-?source=search

# Create FAT32 Partition on USB-stick
Disk Utility > MS-DOS (FAT) > Master Boot Record > Erase
# Copy upgrade files (PCOM-B634VG-BAREFOOT_R100E4.bin, Update.efi) to USB-stick.
# Insert USB-stick to the switch.

# 1. Switch to the external BIOS
# Make sure the baud rate in sol.sh is 57600
root@bmc:~# start_mTerm_server.sh stop
root@bmc:~# vi /usr/local/bin/sol.sh
/usr/bin/microcom -s 57600 $TTY
# Use the external BIOS flash chip to boot COMe.
root@bmc:~# source /usr/local/bin/openbmc-utils.sh
root@bmc:~# gpio_set BRG_COM_BIOS_DIS0_N 1
root@bmc:~# gpio_set BRG_COM_BIOS_DIS1_N 0
# Make sure the external BIOS connects to COMe instead of BMC.
root@bmc:~# gpio_set COM6_BUF_EN 0
root@bmc:~# gpio_set COM_SPI_SEL 0
# Reset the COMe module.
root@bmc:~# wedge_power.sh reset;sol.sh
Power reset microserver ... Done
You are in SOL session.
Use ctrl-x to quit.
-----------------------

# 2. Enter the external BIOS UEFI shell
# Press "ESC" when prompt to enter BIOS Setup
<ESC>
# In BIOS Setup, at "Save & Exit" page, choose [Built-in EFI shell].
# You should see the fs1 as Removable HardDisk(USB)

# 3. Switch to the BMC (use ctrl-x to quit) and set GPIO pin to the main BIOS
# Use the main BIOS flash chip to boot COMe.
root@bmc:~# source /usr/local/bin/openbmc-utils.sh
root@bmc:~# gpio_set BRG_COM_BIOS_DIS0_N 0
root@bmc:~# gpio_set BRG_COM_BIOS_DIS1_N 0
# Switch to external BIOS UEFI shell.
root@bmc:~# sol.sh
You are in SOL session.
Use ctrl-x to quit.
-----------------------

# 4. Switch to the external BIOS UEFI shell to burn the main BIOS
Shell> fs1:
fs1:\> Update.efi
# Wait until the installation is finished

# 5. Power off the device - cold reboot(unplug and replug the power cord)
# Warning!!! Please DO NOT exit UEFI shell 
# Please note this the Warning!!! As line 140 in my log, you'll need to cold reboot directly(power cycle the whole device).
# DO NOT EXECUTE "fs1:\> exit" and select "Save Changes and Reset" after BIOS upgraded.
# Unplug and plug the Wedge100BF-32QS device
# Wait until enter in root BMC
bmc logging: root
password: 0penBmc
# Reset the COMe module.
root@bmc:~# wedge_power.sh reset;sol.sh
board type is Montara
Power reset microserver ... Done
You are in SOL session.
Use ctrl-x to quit.
-----------------------

# Press "ESC" when prompt as below to enter BIOS Setup
<ESC>
# In BIOS Setup, at "Save & Exit" page, select "Save Changes and Reset" option from BIOS.
# Wait until GNU GRUB prompt and select "ONIE Rescue"
# Finally check that the content is like this:

** Rescue Mode Enabled **
ONIE:/ # parted /dev/sda print
Model: ATA SATA SSD (scsi)
Disk /dev/sda: 2048GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: 
Number  Start   End     Size    File system     Name            Flags
 1      1049kB  269MB   268MB   fat16           EFI System      boot, hidden
 2      269MB   404MB   134MB   ext4            ONIE-BOOT       hidden
 5      34.9GB  35.0GB  134MB   ext4            ONIE-DEMO-DIAG  hidden
 6      35.0GB  69.4GB  34.4GB  ext4            ACCTON-DIAG     hidden
 3      69.4GB  2047GB  1978GB  ext4
 4      2047GB  2048GB  1024MB  linux-swap(v1)

Recovery External BIOS

*1. Make sure GPIO SWITCH_EEPROM1_WRT is low. In the case, those SPI pins of BMC are not connected to the SWITCH EEPROM*
root@bmc:~# cat /tmp/gpionames/SWITCH_EEPROM1_WRT/direction
in
root@bmc:~# cat /tmp/gpionames/SWITCH_EEPROM1_WRT/value
0

# 2. Make sure SPI pins are configured as SPI instead of GPIO
root@bmc:~# source /usr/local/bin/openbmc-utils.sh
root@bmc:~# devmem_set_bit $(scu_addr 70) 12
root@bmc:~# openbmc_gpio_util.py dump | grep SPI
B22 => SPICS0#, functions: SPICS0#:SCU70[[13, 12]]!=0x0, VBCS#:SCU70[[5]]==0x1, GPIOI4:None
E20 => SPIDI, functions: SPIDI:SCU70[[13, 12]]!=0x0, VBDI:SCU70[[5]]==0x1, GPIOI7:None
G19 => SPICK, functions: SPICK:SCU70[[13, 12]]!=0x0, VBCK:SCU70[[5]]==0x1, GPIOI5:None
C18 => SPIDO, functions: SPIDO:SCU70[[13, 12]]!=0x0, VBDO:SCU70[[5]]==0x1, GPIOI6:None
E18 => GPIOB7, functions: EXTRST#:AND(SCU80[[15]]==0x1, AND(SCU90[[31]]==0x0, SCU3C[[3]]==0x1)), SPICS1#:AND(SCU80[[15]]==0x1, SCU90[[31]]==0x1), GPIOB7:None

# 3. Make sure the external BIOS flash connects to BMC instead of COMe
root@bmc:~# gpio_set COM_SPI_SEL 1
root@bmc:~# gpio_set COM6_BUF_EN 0

# 4. Create dev node for spidev
root@bmc:~# [ -c /dev/spidev5.0 ] || mknod /dev/spidev5.0 c 153 0

# 5. Load spidev module
root@bmc:~# modprobe spidev
root@bmc:~# flashrom -p linux_spi:dev=/dev/spidev5.0
flashrom v0.9.8-r1888 on Linux 2.6.28.9 (armv5tejl)
flashrom is free software, get the source code at http://www.flashrom.org

Calibrating delay loop... OK.
Found Winbond flash chip "W25Q128.V" (16384 kB, SPI) on linux_spi.
No operations were specified.
root@bmc:~# flashrom -p linux_spi:dev=/dev/spidev5.0 -r bios
flashrom v0.9.8-r1888 on Linux 2.6.28.9 (armv5tejl)
flashrom is free software, get the source code at http://www.flashrom.org

Calibrating delay loop... OK.
Found Winbond flash chip "W25Q128.V" (16384 kB, SPI) on linux_spi.
Reading flash... done.

# 6. Copy BIOS image(*.bin) to DUT by SCP
root@bmc:~# ifconfig eth0
eth0      Link encap:Ethernet  HWaddr 3C:2C:99:EC:59:6B  
          inet addr:188.188.184.100  Bcast:0.0.0.0  Mask:255.255.0.0
          inet6 addr: fe80::3e2c:99ff:feec:596b/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:604541 errors:0 dropped:0 overruns:0 frame:0
          TX packets:4955 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Interrupt:3 

# 7. Transmit BIOS image(*.bin) to DUT via SCP. Username/Password: root/0penBmc)
root@bmc:~# ls
PCOM-B634VG-BAREFOOT_R100E4.bin  bios
root@bmc:~#

# 8. Using R1.00.E4 to program the external BIOS
root@bmc:~# flashrom -V -p linux_spi:dev=/dev/spidev5.0 -w PCOM-B634VG-BAREFOOT_R100E4.bin
...
(Wait for program)
...
0xffd000-0xffdfff:S, 0xffe000-0xffefff:S, 0xfff000-0xffffff:S
Erase/write done.
Verifying flash... VERIFIED.
root@bmc:~# 

# 9. After the external BIOS recovered above, then you can use it to recover the main BIOS

Cold and Warm Reboot

# Access COMe
root@bmc:~# sol.sh
Use ctrl+x to get back to OpenBMC

# Warm reboot OpenBMC (COMe will not reboot)
root@bmc:~# reboot

# Cold reboot COMe in OpenBMC:
root@bmc:~# wedge_power.sh off
root@bmc:~# wedge_power.sh on

# Warm reboot COMe:
ONIE:/ # reboot
root@bfn-switch:~# reboot

# Cold reboot OpenBMC
Power cycle the whole device?
Edit | Attach | Watch | Print version | History: r2 < r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r2 - 2021-10-21 - MariaDelCarmenMisaMoreira
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    Main All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright &© 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
or Ideas, requests, problems regarding TWiki? use Discourse or Send feedback