Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

T430 build does not boot #667

Closed
slashnick opened this issue Jan 30, 2020 · 36 comments
Closed

T430 build does not boot #667

slashnick opened this issue Jan 30, 2020 · 36 comments

Comments

@slashnick
Copy link

slashnick commented Jan 30, 2020

I tried twice to flash Heads onto a T430.

In both cases, it never gives any screen output, just a black screen. I left it on for 30 minutes or so, and still no output.

x230-flash boots just fine. I think I'm only using the upper 4MB of the 12MB ROM image by using --ifd --image bios. Maybe that's where I'm going wrong?

The steps I followed (in case I've been doing it wrong):

  1. Attach a chip clip to the 4MB BIOS chip
  2. Write x230-flash.rom to the chip
  3. Plug in a flash drive with the 12MB coreboot.rom that I built from make BOARD=x230
  4. Boot the machine
  5. mount-usb
  6. flashrom --force --noverify-all --programmer internal:laptop=force_I_want_a_brick --ifd --image bios /media/coreboot.rom
  7. Reboot (I didn't set up GPG keys or the TPM or anything)
@flawedworld
Copy link
Contributor

Please see #656 and #580 . The port is done pretty much, we need to just fix GPG issues which are due to upstream it seems.

@tlaurion
Copy link
Collaborator

tlaurion commented Jan 30, 2020

@flawedworld : GPG_TTY temporary fix is in master now (until #665 is permanently fixed so that value to /dev/console is not hardcoded anymore)

@slashnick
Copy link
Author

@flawedworld I flashed a build off of #656. I'd expect to get an error message about GPG, but I don't get any graphics output at all.

@flawedworld
Copy link
Contributor

@nickfrostatx Are you using a T430 with Nvidia GPU or only the iGPU?

@flawedworld
Copy link
Contributor

@nickfrostatx Please update us after trying the latest commits in #656

@tlaurion
Copy link
Collaborator

@nickfrostatx #656 is merged. Please tag me here if you still experience the same issue.

@openfinesse
Copy link

openfinesse commented May 31, 2020

@tlaurion I'm not sure if @nickfrostatx ever figured it out, but I have tried to flash to the t430 multiple times and it always ends up with no video output after the reboot.

Steps:

  1. Externally flash 8MB unlocked and me cleaned image.
  2. Flash t430-flash.rom image to the 4MB chip
  3. Boot to heads shell, mount usb, and add GPG key to 12MB image.
  4. Flash 12MB coreboot.rom image (from /build/t430/). Flash shows VERIFIED
  5. Reboot with "reboot" command.

The laptop seems to reboot but there is no video output after this point at all. (Tried MiniDP)

I've attached the images I built in case there of any use.
t430-images.zip
Please let me know if I should be doing something differently.

@snmcmillan
Copy link
Contributor

@openfinesse
Do you have an Intel or nvidia model?

@openfinesse
Copy link

Intel

@flawedworld
Copy link
Contributor

flawedworld commented May 31, 2020

@openfinesse can you try again but instead of typing in reboot you just hold down power then turn on again? I am going to check hashes in a second please give me a mo.

@flawedworld
Copy link
Contributor

Building cleanly @ commit 78053b9 with make BOARD=t430 produces a SHA256 of coreboot.rom being:
fc79e3de048865d52897ddf2a718df550c9ab42d88280d3cce6d7edfd3da2670

Your SHA256 of the coreboot.rom in the attached zip file is:
f7361916361e2619348fb37dd0dafba451df507887fca3efb159a20841f6b715

You may wish to try another system or try with a clean tree.

@flawedworld
Copy link
Contributor

Adding on to that, building cleanly @ commit 78053b9 with make BOARD=t430-flash produces a SHA256 of t430-flash.rom being:
1a607dc2c0e3ef1a081c3da02e043bf6eff3ac50c2a808467887cd15d94eeb6b

Your SHA256 of t430-flash.rom in the attached zip is:
909e2f5cbd84573630d01f3c0a77acb79393ee84f9172a39b2e2b578295378d1

@lsafd
Copy link

lsafd commented Jun 1, 2020

First off I would like to say that I am a relatively new user so please excuse the mistakes that I will probably make.

I am flashing to a x230 and having the exact same issue as @openfinesse.

Steps:

  1. Flash x230-flash.rom image to the 4MB chip.
  2. Externally flash 8MB unlocked and me cleaned image.
  3. Boot to heads shell, run "mount-usb".
  4. Run "flash.sh -c /media/coreboot.rom" to flash the 12MB coreboot.rom image (from /build/x230-hotp-verification/).
  5. Run "reboot" to reboot.

I end up with a blank screen, but the light for the power button turns on and off as expected. Attached is the coreboot.rom file.

rom_file.zip

I will try to do a clean build at commit 78053b9.

@flawedworld
Copy link
Contributor

@lsafd Your coreboot.rom file has a SHA256 of:
2a5877ed2909b4660b8f74a78821f40afa6cafb0186f68672fec7a83cf210ba3

Building at 78053b9 produces:
84ed5c262d78eb14fa5ae8bf44acd6e670852b3e0b2ddf062864e76a1aecc8e5

Try on a clean tree or another system.

@lsafd
Copy link

lsafd commented Jun 3, 2020

I will do a clean build when I can, but I am currently having problems with #733.

@tlaurion
Copy link
Collaborator

tlaurion commented Jun 3, 2020

@flawedworld

Building cleanly @ commit 78053b9 with make BOARD=t430 produces a SHA256 of coreboot.rom being:
fc79e3de048865d52897ddf2a718df550c9ab42d88280d3cce6d7edfd3da2670

Your SHA256 of the coreboot.rom in the attached zip file is:
f7361916361e2619348fb37dd0dafba451df507887fca3efb159a20841f6b715

You may wish to try another system or try with a clean tree.

Kernel is not reproducible. So hash wont be the same until #571 is fixed.

@tlaurion
Copy link
Collaborator

tlaurion commented Jun 3, 2020

@lsafd : #733 is fixed

@tlaurion
Copy link
Collaborator

tlaurion commented Jun 3, 2020

Reopening issue

@tlaurion tlaurion reopened this Jun 3, 2020
@tlaurion
Copy link
Collaborator

tlaurion commented Jun 3, 2020

Let me know which tickets to close and which to let open, a lot exist for t430.

@snmcmillan
Copy link
Contributor

I think the issue title "T430 build does not boot" (adjust for X230 if applicable) is a better fit, since I don't think this is a video issue.

@lsafd
Copy link

lsafd commented Jun 3, 2020

Alright, I re-cloned the git and built x230-hotp-verification again. The resulting coreboot.rom file has the exact same sha256.

Is there any new information I could provide or new strategies I could try. I could post images of me running flash.sh if that would help. I am just unsure where to go from here.

@tlaurion
Copy link
Collaborator

tlaurion commented Jun 3, 2020

@flawedworld is latest commit working for you? (nothing changed related to t430 per se)

@tlaurion
Copy link
Collaborator

tlaurion commented Jun 3, 2020

Alright, I re-cloned the git and built x230-hotp-verification again. The resulting coreboot.rom file has the exact same sha256.

Is there any new information I could provide or new strategies I could try. I could post images of me running flash.sh if that would help. I am just unsure where to go from here.

@lsafd : i'm confused. You are talking about x230 and not t430? Please open another issue.

On x230-flash being flashed, that should be as easy as doing:
Run "flash.sh -c /media/coreboot.rom" to flash the 12MB coreboot.rom image (from /build/x230-hotp-verification/).

@lsafd
Copy link

lsafd commented Jun 3, 2020

Sorry I didn't understand I will open another issue. Should I delete my previous comments as they were all related to the x230? (I wrote my steps above that was one of them and I am still having troubles)

@tlaurion
Copy link
Collaborator

tlaurion commented Jun 3, 2020

They have really common base, but this issue is linked to @openfinesse / @nickfrostatx issue which is a T430 not booting (with potential screen issue) that I think non-relevent since #656 got merged.

Please let us know so we can close still opened t430 issue if non-relevant anymore. (I do not own that model, please tag t430 owners from #691 )

@tlaurion
Copy link
Collaborator

tlaurion commented Jun 4, 2020

@flawedworld @lsafd @SebastianMcMillan @openfinesse @nickfrostatx @MrChromebox

I did a quick review of the following facts:

  • xx30 (t430, x230 and others, x230 tested only here) have the following space available for BIOS region in IFD per output of ifdtool -x bottom.rom extracted from original bottom SPI chip, initially upgraded to latest BIOS version (2.75 for x230):
Found Region Section
FLREG0:    0x00000000
  Flash Region 0 (Flash Descriptor): 00000000 - 00000fff 
FLREG1:    0x0bff0500
  Flash Region 1 (BIOS): 00500000 - 00bfffff 
FLREG2:    0x04ff0003
  Flash Region 2 (Intel ME): 00003000 - 004fffff
FLREG3:    0x00020001
  Flash Region 3 (GbE): 00001000 - 00002fff 
FLREG4:    0x00001fff
  Flash Region 4 (Platform Data): 00fff000 - 00000fff (unused)

We are interested in the following line:
Flash Region 1 (BIOS): 00500000 - 00bfffff
so 00bfffff - 00500000 = 6FFFFF (70000, which was the correct value of initial x230 board, while I do not understand why and how t430 could have a 80000 value. This seems to be the reason of the no screen output aka no boot from coreboot (or brick)

What we could do here is take some of the #307 (the IFD) and put it in blobs, considering that ifd was unlocked and ME was neutered and outputted:

The ME region can be reduced up to:
 00003000:0001afff me

So 0001afff - 00003000 = 17FFF (decimal: 98303)

Meaning that the original region:

FLREG2:    0x04ff0003
  Flash Region 2 (Intel ME): 00003000 - 004fffff 

has became:

FLREG2:    0x04ff0003
  Flash Region 2 (Intel ME): 00003000 - 0001afff

So we passed from
004fffff - 00003000 = 4FCFFF (dec: 5230591)
to dec: 98303
so gained 5230591 - 98303 = 5132288

Which we SHOULD pass to the BIOS region:

FLREG1:    0x0bff0500
  Flash Region 1 (BIOS): 00500000 - 00bfffff 

Which we remember was hex: 70000
to Dec: 7340032 + 5132288 = 12472320
To hex: BE5000 (MAXIMAL THEORETIC CBFS REGION VALUE IN COREBOOT CONFIG FOR FULLY NEUTERED ME)

I made the error of replacing 70000 to 80000 in x230-hotp-verification based on considered working t430 coreboot config. This doesn't seem to be valid.

Reconsidering what to do from here for the x230-hotp-verification platform, which doesn't compile if we go back to CBFS_REGION of 70000, not having enough space:

x230-hotp-verification/util/cbfstool/cbfstool x230-hotp-verification/coreboot.pre.tmp add-payload -f ../../build/x230-hotp-verification/bzImage -n fallback/payload  -c none  -r COREBOOT   -C "intel_iommu=igfx_off quiet" -I "../../build/x230-hotp-verification/initrd.cpio.xz"
E: Could not add [../../build/x230-hotp-verification/bzImage, 7001540 bytes (6837 KB)@0x0]; too big?
E: Failed to add '../../build/x230-hotp-verification/bzImage' into ROM image.
E: Failed while operating on 'COREBOOT' region!
E: The image will be left unmodified.
make[1]: *** [Makefile.inc:920: x230-hotp-verification/coreboot.pre] Error 1
make[1]: Leaving directory '/root/project/build/coreboot-4.8.1'
make: *** [Makefile:382: /root/project/build/coreboot-4.8.1/x230-hotp-verification/.build] Error 1

Src

Important notes:

  • We cannot change the CBFS_REGION and make it larger alone (bigger BIOS) without having IFD regions adapted so that ME region smaller and freed space being given to the BIOS region. Providing IFD.bin alone could resolve that.
  • When calling flash.sh, we are actually asking flashrom to take the image.rom and flash the BIOS region out of it.
  • Consequently, it seems that flashrom doesn't validate that there is enough space and just overwrites what is there in SPI flash, resulting in a non-booting machine.

Solution:

  • We could have generic flash script (common to xx30) flash both Flash Descriptor and BIOS regions from prepared xx30 images.
  • Since those IFD regions are aligned, this means that flashed IFD should probably become:
    • Flash Region 1 (BIOS): 00500000 - 0001b000
    • Flash Region 2 (Intel ME): 00003000 - 0001afff
  • But that means that ME will need to be neutered and flashed externally prior of flashing the BIOS region and IFD over unlocked IFD.

@flawedworld
Copy link
Contributor

@flawedworld is latest commit working for you? (nothing changed related to t430 per se)

Works on commit 78053b9 for me, I am using fully stripped out and shrunk ME

@tlaurion
Copy link
Collaborator

tlaurion commented Jun 5, 2020

@flawedworld is latest commit working for you? (nothing changed related to t430 per se)

Works on commit 78053b9 for me, I am using fully stripped out and shrunk ME

@flawedworld : so without libremkey-hotp-verification support. Seems like we are just lucky and don't use the CBFS_REGION fully.

@bwachter
Copy link

I got a t430 to play with a few weeks ago, and ran into the same issue. 9719510 is the first revision which works for me, though it seems it's not a fully clean build - I've only removed the t430 folder, and got a working image.

I've since removed everything in build, which results in an image with a different checksum, and a black screen when flashed. So far I haven't been able to get a working image with a clean build.

@tlaurion
Copy link
Collaborator

tlaurion commented Aug 31, 2020

@Trapacid @flawedworld @lsafd @SebastianMcMillan : What is the right CBFS_REGION to be in master?
Is https://github.com/osresearch/heads-wiki/blob/master/Clean-the-ME-firmware.md followed?

We seem to not move forward on this which creates duplicates like #815.
Board owners, please follow up.

@tlaurion tlaurion changed the title No screen output after flashing to a T430 T430 build does not boot Aug 31, 2020
@snmcmillan
Copy link
Contributor

snmcmillan commented Aug 31, 2020 via email

@bwachter
Copy link

I've tried the same CBFS_REGION setting as for x230 when debugging the black screen. I have no idea what made the one I currently use boot - but it wasnt the CBFS size change.

@ghost
Copy link

ghost commented Aug 31, 2020

I've tried to follow https://github.com/corna/me_cleaner/wiki/External-flashing on shrinking the regions, but I don't know what to do with the shrunken ME and IFD bin files besides putting them in heads/build/coreboot-4.8.1/3rdparty/blobs/mainboard/lenovo/t430 and running make BOARD=t430 and t430-flash in heads directory.

Tried flashing that coreboot.rom from build/t430 internally and just gave a black screen after reboot.

Running me_cleaner to shrink the compiled coreboot.rom prints some python error about 'entries' not being defined and running me_cleaner on the regular ME blobs from the original 12mb dump prints the same thing.

CBFS size in t430 config is 0x800000 while size in x230 is in 0x700000.

And just in case, my T430 does not have an NVIDIA card.

update: reached out to @flawedworld again and told me what I need to actually do. Going to try this again, but following directions this time.

@tlaurion
Copy link
Collaborator

tlaurion commented Aug 31, 2020

@Trapacid CBFS should be equal as in x230 so 710000 and me cleaner instructions from heads-wiki should be applied on 8MB spi flash dump and reflashed.

Any improvement on doc and t430 PR should follow please.

Will edit with references

@tlaurion
Copy link
Collaborator

tlaurion commented Sep 1, 2020

Instructions for testing here: #815 (comment)

@tlaurion
Copy link
Collaborator

tlaurion commented Sep 2, 2020

Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants