Cov txheej txheem:

Lenovo T420 Coreboot W/Raspberry Pi: 13 Cov Kauj Ruam (nrog Duab)
Lenovo T420 Coreboot W/Raspberry Pi: 13 Cov Kauj Ruam (nrog Duab)

Video: Lenovo T420 Coreboot W/Raspberry Pi: 13 Cov Kauj Ruam (nrog Duab)

Video: Lenovo T420 Coreboot W/Raspberry Pi: 13 Cov Kauj Ruam (nrog Duab)
Video: Замена BIOS на ThinkPad с использованием GPL CoreBoot (бывший LinuxBios) 2024, Kaum ib hlis
Anonim
Lenovo T420 Coreboot W/Raspberry Pi
Lenovo T420 Coreboot W/Raspberry Pi

Coreboot yog qhov qhib qhov hloov pauv bios. Phau ntawv qhia no yuav piav qhia cov kauj ruam xav tau los teeb tsa nws ntawm Lenovo T420.

Ua ntej koj pib koj yuav tsum nyiam siv lub davhlau ya nyob twg Linux nrog rau tshem tawm koj lub khoos phis tawj.

Muaj lub sijhawm uas qhov no yuav cib koj lub laptop koj ua qhov no ntawm koj tus kheej txoj kev pheej hmoo.

Khoom siv

  • Ponoma 5250 Test Clip - Rau txuas rau bios chip.
  • Poj niam rau Poj Niam Breadboard Jumper Cables - Kuj tseem hu ua Dupont xov hlau.
  • Phillips Ntsia Hlau
  • Me Pliers, lossis 5.0 mm hex ntsis.
  • Thermal compound
  • Isopropyl cawv
  • Paj Rwb Swabs
  • Lenovo T420 Lenovo Phab 2
  • Khoos phis tawj siv Linux. "Lub PC tseem ceeb"
  • Raspberry Pi (3 lossis 4) - khiav qhov hloov tshiab kawg lossis Raspberry Pi OS - Cov lus qhia ntawm kev teeb tsa tuaj yeem pom ntawm no.
  • T420 Khoos phis tawj kho vajtse phau ntawv

Kauj Ruam 1: Hloov Kho Tus Txheej Txheem Embedded ntawm T420

Nws yog lub tswv yim zoo los hloov qhov Embedded Controller rau qhov hloov tshiab kawg. Txoj hauv kev yooj yim tshaj plaws los ua qhov no yog teeb tsa qhov tseeb ntawm lub Hoobkas bios. Coreboot tsis tuaj yeem kov EC. Koj yuav tsis tuaj yeem hloov kho nws tom qab flashing tshwj tsis yog tias koj rov qab mus rau lub Hoobkas bios.

Kauj Ruam 2: Npaj Raspberry Pi rau Flashing. (RAU RPI)

Npaj Raspberry Pi rau Flashing. (RAU RPI)
Npaj Raspberry Pi rau Flashing. (RAU RPI)
Npaj Raspberry Pi rau Flashing. (RAU RPI)
Npaj Raspberry Pi rau Flashing. (RAU RPI)

Txhawm rau nyeem/sau ntawv mus rau bios chip koj xav tau los pab qee qhov qauv siv.

Nkag mus rau raspberry pi teeb tsa kev siv hluav taws xob.

sudo raspi-teeb tsa

Hauv qab cov kev xaiv interface pab kom:

  • P2 SSH - yog tias koj yuav tau khiav tus pi headless
  • P4 TSI
  • P5 Ib 2C
  • P8 Remote GPIO - Yog siv ssh txuas rau pi

Kauj Ruam 3: Npaj lub 'Main' Computer rau Tsim Coreboot (Ntawm Lub PC Loj)

Thawj qhov uas yuav tsum ua yog teeb tsa qhov kev vam khom xav tau los tsim coreboot.

Rau Debian raws qhov system

sudo apt install git build-essential gnat flex bison libncurses5-dev wget zlib1g-dev

Rau qhov ua raws Arch

sudo pacman -S base-devel gcc-ada flex bison ncurses wget zlib git

Ua cov npe hauv koj lub tsev kom ua haujlwm. Piv txwv li no kuv yuav hu nws ua 'haujlwm'. Koj tseem yuav xav tau phau ntawv teev npe khaws cov duab ntawm lub Hoobkas. Kuv yuav hu cov npe ntawd 'roms' Koj tuaj yeem ua qhov no hauv ib kab kom txuag sijhawm

mkdir -p ~/ua haujlwm/roms

Txav mus rau hauv phau ntawv teev npe ua haujlwm

cd ~/ua haujlwm

Rub tawm qhov tseeb version ntawm ME_Cleaner los ntawm github

git clone

Rub tawm qhov tseeb version ntawm Coreboot

git clone

Txav mus rau hauv phau ntawv teev npe coreboot

cd ~/ua haujlwm/coreboot

Rub tawm qhov xav tau submodules

git submodule hloov tshiab --init --checkout

Ua cov npe los tuav qee cov ntaub ntawv tshwj xeeb rau koj T420 nws yuav xav tau tom qab.

mkdir -p ~/ua haujlwm/coreboot/3rdparty/blobs/mainboard/lenovo/t420

Tsim cov cuab yeej ifd. Qhov no yuav raug siv los faib lub Hoobkas bios rau hauv nws thaj tsam sib txawv.

cd ~/ua haujlwm/coreboot/utils/ifdtool

ua

Kauj Ruam 4: Kaw Cov Kab

Hlau Txuas Qhov Clip
Hlau Txuas Qhov Clip

Siv 6 tus poj niam rau poj niam xaim los txuas cov clip rau Pi

Bios 1> Pi 24

Bios 2> Pi 21

Bios 4> Pi 25

Bios 5> Pi 19

Bios 7> Pi 23

Bios 8> Pi 17

Pins 3 thiab 7 ntawm Bios tsis siv.

Kauj ruam 5: Nkag mus rau Bios Chip

Nkag mus rau Bios Chip
Nkag mus rau Bios Chip
Nkag mus rau Bios Chip
Nkag mus rau Bios Chip
Nkag mus rau Bios Chip
Nkag mus rau Bios Chip
Nkag mus rau Bios Chip
Nkag mus rau Bios Chip

Bios nti nyob hauv qab lub tawb yob. Txhawm rau nkag mus rau nws koj yuav tsum tau tshem lub rooj tsav xwm niam.

Phau Ntawv Kho Cov Khoos Phis Tawj tuaj yeem muab cov lus qhia yog tias koj muaj teeb meem nrhiav nws tawm.

Kuv tau suav nrog kuv cov duab rhuav. Lawv tsis tau npaj rau pej xeem saib (kuv cov ntawv sau tsis zoo thov txim) tab sis dab tsi heck lawv yuav pab tau.

Kauj Ruam 6: Txuas daim Clip rau Bios Chip

Txuas lub Clip rau Bios Chip
Txuas lub Clip rau Bios Chip
Txuas lub Clip rau Bios Chip
Txuas lub Clip rau Bios Chip
Txuas lub Clip rau Bios Chip
Txuas lub Clip rau Bios Chip

Nrog Pi powered OFF txuas cov clip rau bios nti.

Kauj Ruam 7: Nyeem Flash Chip (Ntawm RPI)

Nyeem Flash Chip (Ntawm RPI)
Nyeem Flash Chip (Ntawm RPI)
Nyeem Flash Chip (Ntawm RPI)
Nyeem Flash Chip (Ntawm RPI)

Lub zog ntawm Pi

Tsim cov npe roms thiab txav mus rau nws.

mkdir -p ~/ua haujlwm/roms

cd ~/ua haujlwm/roms

Txhawm rau nyeem thiab sau cov nti koj yuav tsum tau siv lub program hu ua Flashrom. Ua ntej kom ntseeg tau tias nws tau teeb tsa

sudo apt nruab flashrom

Siv flashrom los tshuaj xyuas lub nti thiab xyuas kom nws txuas nrog

flashrom -p linux_spi: dev =/dev/spidev0.0, spispeed = 128

Nyeem lub Hoobkas bios tawm lub nti 3 zaug thiab txuag lawv li factory1.rom factory2.rom factory3.rom

Siv qhov -c xaiv los qhia koj lub flash nti. Nco ntsoov sau txhua yam ntawm cov lus hais

Txhua qhov kev nyeem yuav siv qee lub sijhawm nyob ntawm lub nti nws tuaj yeem nyob nruab nrab ntawm 30-45 feeb txhua qhov nyeem. Tsis txhob txhawj xeeb yog tias nws zoo li pi tau dai.

flashrom -p linux_spi: dev =/dev/spidev0.0, spispeed = 128 -c -r factory1.rom

flashrom -p linux_spi: dev =/dev/spidev0.0, spispeed = 128 -c -r factory2.rom

flashrom -p linux_spi: dev =/dev/spidev0.0, spispeed = 128 -c -r factory3.rom

Kauj Ruam 8: Sib Piv 3 Cov Ntaub Ntawv (Ntawm RPI)

Sib piv 3 Cov Ntaub Ntawv (Ntawm RPI)
Sib piv 3 Cov Ntaub Ntawv (Ntawm RPI)

Tom ntej no koj xav sib piv 3 cov ntaub ntawv kom ntseeg tau tias koj tau nyeem zoo / sib txuas

sha512sum Hoobkas*.rom

Yog tias lawv txhua tus sib phim luam lawv mus rau lub khoos phis tawj tseem ceeb hauv ~/ua haujlwm/roms phau ntawv teev npe.

Hwj chim tawm Pi. Koj tuaj yeem tso qhov clip txuas.

Kauj Ruam 9: Ntxuav ME (Ntawm Lub PC Loj)

Ntxuav ME (Ntawm Lub PC Loj)
Ntxuav ME (Ntawm Lub PC Loj)

Txav mus rau ~/ua haujlwm/roms

cd ~/ua haujlwm/roms

Lub Hoobkas roms yuav tsum tsis raug kho. Luam ib daim ntawm lawv los ntxuav.

cp factory1.rom ntxuav.rom

Ntxuav IME ntawm kev ntxuav.rom

~/ua haujlwm/me_cleaner/me_cleaner.py -S ntxuav.rom

Kauj ruam 10: Split Rom Duab. (Hauv PC loj)

Split Rom Duab. (Hauv PC loj)
Split Rom Duab. (Hauv PC loj)

Bios nti tau faib ua 4 cheeb tsam. Koj yuav tsum faib cov duab ntxuav.rom rau hauv nws thaj tsam sib txawv nrog cov cuab yeej ifd muab los ntawm coreboot

~/ua haujlwm/coreboot/utils/ifdtool/ifdtool -x ntxuav.rom

Qhov no yuav tsim 4 cov ntaub ntawv. Peb yuav tsum hloov npe 3 ntawm lawv thiab tuaj yeem tshem tawm 1

Hloov lub cheeb tsam piav qhia

mv flashregion_0_flashdescriptor.bin descriptor.bin

Rho tawm thaj tsam bios - Nws yuav raug hloov pauv nrog coreboot.

rm flashregion_1_bios.bin

Hloov npe thaj tsam GBE

mv flashregion_2_gbe.bin gbe.bin

Hloov npe cheeb tsam ME

mv flashregion_3_me.bin me.bin

Luam cov ntaub ntawv rau hauv phau ntawv teev npe coreboot

cp descriptor.bin gbe.bin me.bin ~/ua haujlwm/coreboot/3rdparty/blobs/mainboard/lenovo/t420/

Kauj Ruam 11: Kho Kho Duab Coreboot. (Hauv PC loj)

Kho cov duab Coreboot. (Hauv PC loj)
Kho cov duab Coreboot. (Hauv PC loj)
Kho cov duab Coreboot. (Hauv PC loj)
Kho cov duab Coreboot. (Hauv PC loj)
Kho cov duab Coreboot. (Hauv PC loj)
Kho cov duab Coreboot. (Hauv PC loj)
Kho cov duab Coreboot. (Hauv PC loj)
Kho cov duab Coreboot. (Hauv PC loj)

Txav mus rau phau ntawv teev npe coreboot

cd ~/ua haujlwm/coreboot

Configure coreboot.

ua nconfig

Qhov no yuav coj mus rau Coreboot config editor. Feem ntau ntawm kev teeb tsa ua ntej yog qhov zoo, tab sis muaj qee qhov uas tuaj yeem muab ntxiv. Qhov no yog qhov yooj yim teeb tsa. Ntau yam kev xaiv xws li cov ntxaij vab tshaus, vga roms, lwm txoj kev them nyiaj muaj. Cov kev xaiv no dhau ntawm thaj tsam ntawm phau ntawv qhia no.

Kev teeb tsa dav dav

Siv CMOS rau kev teeb tsa tus nqi

Mainboard

  • Tus muag khoom Mainboard >>> Xaiv >> Lenovo
  • Mainboard qauv >>> Xaiv >>> T420

Chipset

  • Ntxiv Intel cov ntaub ntawv descriptor.bin
  • Ntxiv Intel ME/TXE firmware
  • Ntxiv gigabit ethernet teeb tsa

Devices

  • Pab kom PCIe Clock Power Management
  • Pab kom PCIe ASPM L1 SubState

Generic Tsav Tsheb

PS/2 keyboard pib

Kauj Ruam 12: Tsim Coreboot (Ntawm Lub PC Loj)

Sijhawm los ua ke!

Ua ntej tsim lub gcc toolchain

ua crossgcc-i386 CPUS = X

X = tus naj npawb xov uas koj lub CPU muaj.

Tsim coreboot

ua iasl

ua

Qhov no yuav tsim cov ntawv ~/ua haujlwm/coreboot/tsim/coreboot.rom.

Fais fab ntawm Pi thiab luam cov ntawv ntawd rau koj ~/ua haujlwm/roms phau ntawv teev npe.

Kauj Ruam 13: Sau Coreboot rau T420 (Ntawm RPI)

Sau Coreboot rau T420 (Ntawm RPI)
Sau Coreboot rau T420 (Ntawm RPI)
Sau Coreboot rau T420 (Ntawm RPI)
Sau Coreboot rau T420 (Ntawm RPI)
Sau Coreboot rau T420 (Ntawm RPI)
Sau Coreboot rau T420 (Ntawm RPI)

Txav mus rau roms directory

cd ~/ua haujlwm/roms

Kuaj lub nti kom paub tseeb tias nws tau kuaj pom

flashrom -p linux_spi: dev =/dev/spidev0.0, spispeed = 128

Sau cov duab coreboot. Qhov no yuav siv sijhawm ntev dua tom qab nyeem daim duab.

flashrom -p linux_spi: dev =/dev/spidev0.0, spispeed = 128 -c -w coreboot.rom

Tom qab sau tau txheeb xyuas lub zog tawm ntawm pi. Tshem tawm Clip thiab rov ua dua lub T420.

Nrog koj zoo siab uas koj nyuam qhuav flashed Coreboot.

Pom zoo: