StarLabsLtd / firmware

71 stars 5 forks source link

[Starbook VI - AMD] Can't Install Coreboot / No Supported Device #65

Open 3lpsy opened 1 year ago

3lpsy commented 1 year ago

Background

I ordered a Starbook MK V last may so I'm not sure if I own a V or VI (it has a fingerprint reader if that helps). While I ordered it with Coreboot, it came with American Megatrends.

Other Info

CPU: AMD Ryzen 7 5800U with Radeon Graphics OS: Arch Linux

First Attempt

When attempting to switch branches, I first performed a BIOS update and rebooted. Then when running switch-branch, i received a No Supported Devices message. I am running Arch Linux with the standard linux kernel (I had different issues under linux-hardened but I believe those are expected). I first attempted to use the Manjaro fwupd-starlabs and flashrom-starlabs packages. I've included the details below

Arch Linux + Standard Kernel + Starlabs fwupdmgr + Starlabs Flashrom

$ sudo fwupdmgr switch-branch
No supported devices

$ sudo flashrom -p internal
flashrom unknown on Linux 6.1.8-arch1-1 (x86_64)
flashrom is free software, get the source code at https://flashrom.org

Using clock_gettime for delay loops (clk_id: 1, resolution: 1ns).
No DMI table found.
Found chipset "AMD FP4".
Enabling flash write... FCH device found but SMBus revision 0x51 does not match known values.
Please report this to flashrom@flashrom.org and include this log and
the output of lspci -nnvx, thanks!.
Could not determine chipset generation.PROBLEMS, continuing anyway
========================================================================
You may be running flashrom on an unknown laptop. We could not
detect this for sure because your vendor has not set up the SMBIOS
tables correctly. Some internal buses have been disabled for
safety reasons. You can enforce using all buses by adding
  -p internal:laptop=this_is_not_a_laptop
to the command line, but please read the following warning if you
are not sure.

Laptops, notebooks and netbooks are difficult to support and we
recommend to use the vendor flashing utility. The embedded controller
(EC) in these machines often interacts badly with flashing.
See the manpage and https://flashrom.org/Laptops for details.

If flash is shared with the EC, erase is guaranteed to brick your laptop
and write may brick your laptop.
Read and probe may irritate your EC and cause fan failure, backlight
failure and sudden poweroff.
You have been warned.
========================================================================
No EEPROM/flash device found.
Note: flashrom can never write if the flash chip isn't found automatically.

Second Attempt

I also installed the flashrom-git package from the Arch AUR and attempted to switch to coreboot. I also added the iomem=relaxed kernel param to systemd-boot.

Arch Linux + Standard Kernel + Starlabs fwupdmgr + flashrom-git + iomem=relaxed

$ sudo fwupdmgr switch-branch
No supported devices

$ sudo flashrom -p internal
flashrom v1.2-1167-gbc712dea on Linux 6.1.8-arch1-1 (x86_64)
flashrom is free software, get the source code at https://flashrom.org

Using clock_gettime for delay loops (clk_id: 1, resolution: 1ns).
No DMI table found.
Found chipset "AMD FP4".
Enabling flash write... OK.
========================================================================
You may be running flashrom on an unknown laptop. We could not
detect this for sure because your vendor has not set up the SMBIOS
tables correctly. Some internal buses have been disabled for
safety reasons. You can enforce using all buses by adding
  -p internal:laptop=this_is_not_a_laptop
to the command line, but please read the following warning if you
are not sure.

Laptops, notebooks and netbooks are difficult to support and we
recommend to use the vendor flashing utility. The embedded controller
(EC) in these machines often interacts badly with flashing.
See the manpage and https://flashrom.org/Laptops for details.

If flash is shared with the EC, erase is guaranteed to brick your laptop
and write may brick your laptop.
Read and probe may irritate your EC and cause fan failure, backlight
failure and sudden poweroff.
You have been warned.
========================================================================
Found Winbond flash chip "W25Q128.W" (16384 kB, SPI) mapped at physical address 0x00000000ff000000.
===
This flash part has status UNTESTED for operations: WP
The test status of this chip may have been updated in the latest development
version of flashrom. If you are running the latest development version,
please email a report to flashrom@flashrom.org if any of the above operations
work correctly for you with this flash chip. Please include the flashrom log
file for all operations you tested (see the man page for details), and mention
which mainboard or programmer you tested in the subject line.
Thanks for your help!
No operations were specified.

Third Attempt

Finally, I installed Manjaro on a USB device, booted into it and tried performing the same action. I of course used the starlabs fwupd and flashrom packages. I don't have the raw results for the flashrom command, but the switch-branch command had the same output.

Is Coreboot supported on the AMD variant? And if possible, can you please advise me on what I'm missing. If there is a distro I can install to a USB and just that, that's also fine. Though I'd prefer to know the likelihood of success with the AMD model.

rmsthebest commented 1 year ago

They are waiting for an FSP fix from AMD before they upload coreboot for the AMD version. Support has said everyone who bought the coreboot amd laptops will be notified when it is available.

Imho it is strange that each customer has to discover for themselves that they didnt receive what they purchased, but it is what it is I guess. To be clear, I'm glad they sent them even if they havent got coreboot working yet, but the delivery receipt should not have said that it contained a laptop with coreboot.

3lpsy commented 1 year ago

Yeah, I'm just happy to have my laptop. Fine being patient and glad support will eventually get added :)

neeshy commented 1 year ago

Any news on this? It's been over 5 months. Have you guys received word from AMD about that FSP fix? On our end, is it currently possible to build coreboot from source and flash it manually w/ flashrom?

As far as I can tell, only Intel support for the StarBooks has been merged into upstream coreboot. Likewise, I only see Intel related commits on StarLab's coreboot fork.

Sean-StarLabs commented 1 year ago

Yes, still waiting for a new build though. The latest emails hint at getting something soon.

On our end, is it currently possible to build coreboot from source and flash it manually w/ flashrom?

You can build and flash anything you like; it wouldn't circumvent the problem and would introduce others that exist in the publicly available blobs.

As far as I can tell, only Intel support for the StarBooks has been merged into upstream coreboot. Likewise, I only see Intel related commits on StarLab's coreboot fork.

Patches won't be merged until the problem is fixed.

neeshy commented 1 year ago

The latest emails hint at getting something soon.

That sounds promising :)

sysnux commented 1 year ago

Yes, still waiting for a new build though. The latest emails hint at getting something soon.

Any update?

Sean-StarLabs commented 1 year ago

It's basically being held up by internal AMD stuff (NDA's prevent too much detail there) - I'll give them another nudge!

kostadinnm commented 11 months ago

I'm on the same boat - I'd be glad to have it working with ami bios. But I hope this to be like so only in the beginning and get an update to try the open source firmware. Is there anything we as a community can do to help in moving this forward by AMD?!

sysnux commented 11 months ago

Still waiting for the coreboot I ordered more than one year ago... fortunately, the StarBook AMD arrived sooner ;)

flokaiser commented 10 months ago

Do you have any update?

flokaiser commented 9 months ago

I think we were ghosted by a company :(

Sean-StarLabs commented 9 months ago

Sorry, not sure how I missed that - nothing yet. I'll give them another nudge.

cyb3rmonk commented 7 months ago

@Sean-StarLabs did you get an answer?

Also, I hope you guys review this mess internally. A key selling point for your laptops is coreboot. Personally, it's the main reason why I picked StarLabs for my new (now current) laptop. Right now, I feel like I've been baited and switched.

I understand you depend on AMD, but if that's the case then why advertise coreboot compatibility for a setup before you get everything you need from them?

That being said - I think we all appreciate the transparency you are giving us on the issue. Thanks for that.

jaj42 commented 7 months ago

Current feeling: https://xkcd.com/2881/ At some point you have to give up on the problem and embrace the fact that you have dozens of new friends

Sean-StarLabs commented 7 months ago

Yeah, so, paraphrasing - official channels are proving useless, so the engineer is going to try to reach someone from the PSP team directly. And, to be fair, that's how things get done with Intel - the only difference is "we" know the Intel devs.

Also, I hope you guys review this mess internally.

We're not doing any more AMDs until they fix it (for consumers).

I understand you depend on AMD, but if that's the case then why advertise coreboot compatibility for a setup before you get everything you need from them?

Because the code is 99% there. The way we usually do it, make the AMI firmware as it's way, way more time consuming (code base is about 20x the size of coreboot), and then do coreboot with essentially the same code. The same happened here, and it was a small details than turned into a big blocker. And, getting zero support from AMD honestly wasn't anticipated.

At some point you have to give up on the problem and embrace the fact that you have dozens of new friends

I like the idea, but no, I don't like giving up. AMD are slowly making progress with their open source code, and there is one other thread I'm pulling on at the moment - long shot, but worth a try.

Either way, it'll happen - the variable is when.

hicaru commented 6 months ago

Same issue, i bought the laptop and there no coreboot, support answer me soon. As i understand this soon already a year. i have no idea why starlabs selling for so big price laptops without coreboot. in the check and even support said thats laptop support coreboot. i ordered it with a confidence thats is true.......

hicaru commented 6 months ago

Yeah, so, paraphrasing - official channels are proving useless, so the engineer is going to try to reach someone from the PSP team directly. And, to be fair, that's how things get done with Intel - the only difference is "we" know the Intel devs.

Also, I hope you guys review this mess internally.

We're not doing any more AMDs until they fix it (for consumers).

I understand you depend on AMD, but if that's the case then why advertise coreboot compatibility for a setup before you get everything you need from them?

Because the code is 99% there. The way we usually do it, make the AMI firmware as it's way, way more time consuming (code base is about 20x the size of coreboot), and then do coreboot with essentially the same code. The same happened here, and it was a small details than turned into a big blocker. And, getting zero support from AMD honestly wasn't anticipated.

At some point you have to give up on the problem and embrace the fact that you have dozens of new friends

I like the idea, but no, I don't like giving up. AMD are slowly making progress with their open source code, and there is one other thread I'm pulling on at the moment - long shot, but worth a try.

Either way, it'll happen - the variable is when.

image

You don't need to lie! You still have them on sale!

Sean-StarLabs commented 6 months ago

You don't need to lie! You still have them on sale!

No, sorry, no idea how you got that from what I said. To clarify, we're not going to stop selling the ones we've already made because 100K of code doesn't have the license we want!

hicaru commented 6 months ago

You don't need to lie! You still have them on sale!

No, sorry, no idea how you got that from what I said. To clarify, we're not going to stop selling the ones we've already made because 100K of code doesn't have the license we want!

Could you publish it? We will build and flash it directly to chip.

Sean-StarLabs commented 6 months ago

Publish the coreboot patch? It's in Gerrit, but the problem isn't with building or flashing it - it's with the PSP not allowing the Ap base to be set, which stops FSP from running.

hicaru commented 6 months ago

Publish the coreboot patch? It's in Gerrit, but the problem isn't with building or flashing it - it's with the PSP not allowing the Ap base to be set, which stops FSP from running.

have we any chance to have coreboot in near time?

sjlongland commented 6 months ago

Publish the coreboot patch? It's in Gerrit, but the problem isn't with building or flashing it - it's with the PSP not allowing the Ap base to be set, which stops FSP from running.

have we any chance to have coreboot then in near time?

It's frustrating, but this is one of these situations where we're all going to have to be patient. Good things come to those who wait and all that.

AMD's a big company, likely there's a lot of layers of bureaucracy that need to be worked around… and this takes time. Starlabs is a UK-based company if I'm not mistaken, and AMD US-based, so time-zones further extend how long these negotiations will take.

Other equipment has been made in the past running CoreBoot on AMD hardware, so I don't think the issue is necessarily impossible to fix technically.

It'd be nice if the website had flagged that AMD + Coreboot was still being worked on (with no hard ETA known) and that the product would ship with AMI UEFI instead, but I am certain it'll happen eventually. I'm fine waiting as this machine has been a much better out-of-box experience running Linux than most machines with similar-age hardware. The machine still boots running UEFI firmware, and once grub loads the kernel and hands over, UEFI quickly becomes irrelevant anyway.

Let's give them the time they need before stomping our feet. :-)

hicaru commented 6 months ago

Publish the coreboot patch? It's in Gerrit, but the problem isn't with building or flashing it - it's with the PSP not allowing the Ap base to be set, which stops FSP from running.

have we any chance to have coreboot then in near time?

It's frustrating, but this is one of these situations where we're all going to have to be patient. Good things come to those who wait and all that.

AMD's a big company, likely there's a lot of layers of bureaucracy that need to be worked around… and this takes time. Starlabs is a UK-based company if I'm not mistaken, and AMD US-based, so time-zones further extend how long these negotiations will take.

Other equipment has been made in the past running CoreBoot on AMD hardware, so I don't think the issue is necessarily impossible to fix technically.

It'd be nice if the website had flagged that AMD + Coreboot was still being worked on (with no hard ETA known) and that the product would ship with AMI UEFI instead, but I am certain it'll happen eventually. I'm fine waiting as this machine has been a much better out-of-box experience running Linux than most machines with similar-age hardware. The machine still boots running UEFI firmware, and once grub loads the kernel and hands over, UEFI quickly becomes irrelevant anyway.

Let's give them the time they need before stomping our feet. :-)

have to sit with a AMD backdoor and wait for until someone reverse it or official AMD answer.

Sean-StarLabs commented 6 months ago

AMD backdoor

What do you mean?

hicaru commented 6 months ago

AMD backdoor

What do you mean?

i mean: AMD PSP is a backdoor like Intel ME

Sean-StarLabs commented 6 months ago

Okay. coreboot doesn't do anything different with the PSP than AMI does.

sjlongland commented 6 months ago

AMD backdoor

What do you mean?

i mean: AMD PSP is a backdoor like Intel ME

Unless you've got the equipment to non-destructively inspect every integrated circuit on your computer, I'd wager that any computer you buy or make yourself could theoretically have a backdoor you don't know about or control.

The only way around that would be to use such low-level building blocks (TTL chips, CPLDs, maybe FPGAs), that making a practical backdoor becomes impossible. Modern off-the-shelf x86 is not for you.

If that's not appealing, then we have to accept that we're not going to "see" everything that goes on inside every IC, and some of them have "features" we may not like. It's a package deal. That's life.

hicaru commented 6 months ago

AMD backdoor

What do you mean?

i mean: AMD PSP is a backdoor like Intel ME

Unless you've got the equipment to non-destructively inspect every integrated circuit on your computer, I'd wager that any computer you buy or make yourself could theoretically have a backdoor you don't know about or control.

The only way around that would be to use such low-level building blocks (TTL chips, CPLDs, maybe FPGAs), that making a practical backdoor becomes impossible. Modern off-the-shelf x86 is not for you.

If that's not appealing, then we have to accept that we're not going to "see" everything that goes on inside every IC, and some of them have "features" we may not like. It's a package deal. That's life.

To my deepest regret, I agree. There are indeed some open-source chips like RISC-V that are sufficiently open to be utilized. However, they are too weak for everyday use. Additionally, there is Elbrus, but it is overly proprietary and likely contains backdoors.

sjlongland commented 6 months ago

To my deepest regret, I agree. There are indeed some open-source chips like RISC-V that are sufficiently open to be utilized.

Even if they were, you don't know that the specimen you hold in your hand, is not backdoored for sure without (possibly destructive) inspection.

Something like a logic gate package: it's so generic it'd be almost impossible to practically back-door it. A CPLD or FPGA: could be more easily back-doored, but again, you'd maybe spot it in an X-ray photo since it'd be a "different" looking block inside a very regular and repetitive grid of blocks that have a very generic function and behaviour. An ASIC like an off-the-shelf CPU (any architecture you like): all bets are off.

If you want fast: go x86, go modern ARM… maybe look at RISC-V → accept there may be backdoors. If you want back-door free: get out your breadboards and start wiring TTL chips together → accept 8-bit or 16-bit CPUs with clock speeds in the kilohertz.

rmsthebest commented 6 months ago

Please stay on topic, I want to stay subscribed to this issue so I get notified when coreboot is available.

hicaru commented 6 months ago

Okay. coreboot doesn't do anything different with the PSP than AMI does.

These are just words, and you've already misled me once. How am I supposed to believe in this now? Т_Т i can only trust open code

Sean-StarLabs commented 5 months ago

How am I supposed to believe in this now?

Do you own research, PSP runs before the bootloader - AMD don't try and hide that

hicaru commented 5 months ago

How am I supposed to believe in this now?

Do you own research, PSP runs before the bootloader - AMD don't try and hide that

Friend, I understand all of this, and my point is really about something else. You could have mentioned that you support Coreboot so that people know what they're buying. My case is a prime example. I purchased something that didn't meet my expectations, and part of the mistake is mine—I could have checked the repository myself to see all the supported models! So, I'm heartbroken and left with no choice but to wait.

hicaru commented 5 months ago

Hello team. i see you still have there wrong info! please remove it! people will buy your laptop and get no coreboot! image

Sean-StarLabs commented 5 months ago

"No firmware is available for this device." - you don't think that covers it?

hicaru commented 5 months ago

"No firmware is available for this device." - you don't think that covers it?

ahh so can i download it and install directly SPI? could you share me a link for rom? or source code

Sean-StarLabs commented 5 months ago

ahh so can i download it and install directly SPI? could you share me a link for rom? or source code

I don't follow?

hicaru commented 5 months ago

ahh so can i download it and install directly SPI? could you share me a link for rom? or source code

I don't follow?

i mean if you have coreboot for this device, how can i build it? i want to flash SPI on board.

Sean-StarLabs commented 5 months ago

Click on the link - it shows "No firmware is available for this device."

hicaru commented 5 months ago

Click on the link - it shows "No firmware is available for this device."

ok, i though i didn't get something, because there check the box opposite coreboot(LVFS).

hicaru commented 5 months ago

Click on the link - it shows "No firmware is available for this device."

Please could you explain current stage, coreboot for VI AMD? sorry but we wait so many time T_T

Sean-StarLabs commented 5 months ago

Working on it

hicaru commented 5 months ago

on

you have an estimated release date?

Sean-StarLabs commented 5 months ago

I do not

hicaru commented 4 months ago

hello dear developers starlabs, i just have learned this page https://doc.coreboot.org/soc/amd/family17h.html, and i got a question! Why you cannot use open source AGESA which called Picasso in soc/amd/picasso or openSIL? As i understand the Official AMD AGESA need NDA, you will wait NDA files endlessly, because they will never open them in near future.

Sean-StarLabs commented 4 months ago

That's a different processor, and would still have the same problem.

NDAs aren't in the equation either.

hicaru commented 4 months ago

That's a different processor, and would still have the same problem.

NDAs aren't in the equation either.

yes, you are right((( it so sad

cyb3rmonk commented 3 months ago

I just realized I'm unable to update the system firmware to the latest version (i.e. fwupdmgr refresh --force && fwupdmgr update). The commands themselves complete successfully, but I get this error in dmsg on reboot, and the update is not installed:

[   15.913653] systemd[1]: Starting Firmware update daemon...
[   15.994985] fwupd[1944]: 03:12:52.955 FuPluginFlashrom     FCH device found but SMBus revision 0x51 does not match known values.
[   15.994985] fwupd[1944]: Please report this to flashrom@flashrom.org and include this log and
[   15.994985] fwupd[1944]: the output of lspci -nnvx, thanks!.
[   15.994985] fwupd[1944]: 03:12:52.955 FuPluginFlashrom     Could not determine chipset generation.
[   15.995368] fwupd[1944]: 03:12:52.955 FuPluginFlashrom     Laptops, notebooks and netbooks are difficult to support and we
[   15.995368] fwupd[1944]: recommend to use the vendor flashing utility. The embedded controller
[   15.995368] fwupd[1944]: (EC) in these machines often interacts badly with flashing.
[   15.995368] fwupd[1944]: See the manpage and https://flashrom.org/Laptops for details.
[   15.995368] fwupd[1944]: If flash is shared with the EC, erase is guaranteed to brick your laptop
[   15.995368] fwupd[1944]: and write may brick your laptop.
[   15.995368] fwupd[1944]: Read and probe may irritate your EC and cause fan failure, backlight
[   15.995368] fwupd[1944]: failure and sudden poweroff.
[   15.995368] fwupd[1944]: You have been warned.

Is this caused by the the same PSP / Ap base issue? Should I open a new issue for this?

Sean-StarLabs commented 3 months ago

Is this caused by the the same PSP / Ap base issue?

No, doesn't look like anything is wrong - what firmware are you running?

cyb3rmonk commented 3 months ago

I don't want to spam everyone who's subscribed to this thread, so since you've said this wasn't related to the PSP / Ap base issue I opened a separate issue: https://github.com/StarLabsLtd/firmware/issues/165