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

Download, innoextract Lonovo website's downloaded ME blob and put it under blobs/xx30 from a module #797

Closed
tlaurion opened this issue Aug 9, 2020 · 11 comments
Labels
Bounty Work could be funded help wanted

Comments

@tlaurion
Copy link
Collaborator

tlaurion commented Aug 9, 2020

@tlaurion so you're proposing to put the blobs in the main Heads repo, along with reproducibility instructions? Any reason to not put them in a submodule as was discussed previously?

@MrChromebox : Any idea how to use innoextract to extract exe content (cab) in a module?

Originally posted by @tlaurion in #307 (comment)

@tlaurion tlaurion added Bounty Work could be funded help wanted labels Aug 9, 2020
@MrChromebox
Copy link
Contributor

@MrChromebox : Any idea how to use innoextract to extract exe content (cab) in a module?

unfortunately not, I've never had to use it before

@Thrilleratplay
Copy link
Contributor

Thrilleratplay commented Aug 23, 2020

@tlaurion I haven't flashed it on my machine yet but me_cleaner says it is valid.. For the x230:

# Download me_cleaner
wget https://raw.githubusercontent.com/corna/me_cleaner/master/me_cleaner.py
chmod +x me_cleaner.py

# Download X230 Lenovo
# Source: https://pcsupport.lenovo.com/us/en/products/laptops-and-netbooks/thinkpad-x-series-laptops/thinkpad-x230/downloads/driver-list/component?name=Chipset
wget https://download.lenovo.com/ibmdl/pub/pc/pccbbs/mobiles/g1rf42ww.exe 

# Extract ME bin
innoextract -I app/ME8_5M_Production.BIN g1rf42ww.exe

# Clean up and rename
mv app/ME8_5M_Production.BIN ./flashregion_2_intel_me.bin
rmdir app/

# Run me_cleaner
./me_cleaner.py flashregion_2_intel_me.bin 

What other systems does heads officially support?

And as for the bounty, this was trivial. The previous bounty is enough.

EDIT: I need to test this first. The size does not match the ME region I extracted from my x230 stock rom and there is data in the difference.

Stock rom version: ME/TXE firmware version 8.1.20.1336 (generation 2)
downloaded version: ME/TXE firmware version 8.0.12.1498 (generation 2)

@tlaurion
Copy link
Collaborator Author

tlaurion commented Aug 23, 2020

The version pointed to lenovo is more up to date then the one provided by extract of x230 2.76 proprietary Lenovo spi backup of bottom flash chip.

Might want to look at older version of the exe, or repair the ifd and reupload so it matches. Didn't went that far before since gbe was not valid/ illegal to distribute. Script should generate gbe when called by module buildas specified in board config.

@tlaurion
Copy link
Collaborator Author

Goal here would be to have a heads module that would be defined under board configs and called as a precondition of coreboot module if defined.

The blobs would then all be available for coreboot module build after that script being called.

Innoextract would need to be added in both CIs to be built.

If you look into the readme of the xx30 blobs, all platfroms supported by ME are there.

For Heads, the x230 t430 and t530 could be supported the same way and created with similar boards to the x230-external-flash board definition (or XXX-full-rom, what sounds best)

@tlaurion
Copy link
Collaborator Author

tlaurion commented Aug 23, 2020

Once that poc is valid, same could be done for xx20 boards like the t420 x220 and others, maximizing BIOS region and making rom fully flashable internally and externally (instead of just flashing the BIOS region internally per FLASHROM statement under board config for internal flashing / verification)

@tlaurion
Copy link
Collaborator Author

Better download and verify in script for specific and expected sha256sums

@Thrilleratplay
Copy link
Contributor

Thrilleratplay commented Aug 23, 2020

I assumed that was the intended result. I have a x220 Tablet I can test on and should have an extra x230 Tablet in a few days, I'll probably wait for that before continuing.

The confusing part is the file app/ME8_5M_Production.bin is 6.1M despite 5M being in the name. FWUpdLcl.exe may do something to truncate the file.

@Thrilleratplay
Copy link
Contributor

Thrilleratplay commented Aug 24, 2020

@tlaurion Sorry, part of that reply was thinking/typing out loud. After you pointed it out, I understand that you already have the extraction command in the PR for #703 but thought the download links were the same. Using the link in the PR, the resulting SHA256 are the same as in the PR.

The untouched extracted ME8_5M_Production.bin was 6.1M in the file I downloaded and is 7.5M the one you used. Why are these not 5M? I wanted test updating ME using the utility and do a binary diff between extracted file and the updated version flashed in the ME region. This is not really related to this ticket but now I am curious.

@tlaurion
Copy link
Collaborator Author

tlaurion commented Aug 24, 2020

Will reverify.
Reviewing librem_mini PR, mrChromebox came with a nice way of doing it while self hosting binaries somewhere else.
@Thrilleratplay: That may give you some ideas

@tlaurion
Copy link
Collaborator Author

tlaurion commented Nov 8, 2020

#703 is poc

@tlaurion tlaurion closed this as completed Nov 8, 2020
@tlaurion tlaurion mentioned this issue Nov 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bounty Work could be funded help wanted
Projects
None yet
Development

No branches or pull requests

3 participants