framework-system icon indicating copy to clipboard operation
framework-system copied to clipboard

Framework 13 AMD Support on Linux

Open afzalarsalan opened this issue 1 year ago • 17 comments

I've noticed that trying this tool on Linux runs into the issue where /dev/cros_ec doesn't seem to exist on the latest kernel. I wanted to know if there was any blockers or action items that would enable this program's functionality to work on Linux

Failure Code

Self-Test
  SMBIOS Platform:     Framework13Amd
  SMBIOS is_framework: true
  Dump EC memory region
Failed to open /dev/cros_ec. Because: Os { code: 2, kind: NotFound, message: "No such file or directory" }
thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', framework_lib/src/chromium_ec/cros_ec.rs:70:34
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

afzalarsalan avatar Nov 01 '23 19:11 afzalarsalan

You can use --driver portio to directly talk to the EC without a kernel driver. But it won't work with secureboot. See #16 But kernel driver fixes are already out there and coming soon.

JohnAZoidberg avatar Nov 02 '23 09:11 JohnAZoidberg

Is it intended that it's trying to talk to the CrOS EC when on an AMD board? I'm not 100% sure of the exact differences, but I'm pretty sure the EC on CrOS and non-CrOS devices serve some different functions.

becausewat avatar Nov 06 '23 19:11 becausewat

But kernel driver fixes are already out there and coming soon

Is there a mailing list thread or link one could use to track these fixes, to see what kernel version they might end up in?

sserenade avatar Nov 06 '23 19:11 sserenade

@sserenade maybe this one? https://lore.kernel.org/lkml/[email protected]/T/

OctopusET avatar Nov 07 '23 09:11 OctopusET

@OctopusET I just tested the patch and the kernel still doesn't provide /dev/cros_ec with it applied (thanks for taking a look though!)

prurigro avatar Nov 07 '23 17:11 prurigro

Seems like this is the patchset- I just applied it on 6.6.2 and framework_tool now functions correctly!

prurigro avatar Nov 22 '23 04:11 prurigro

You can use --driver portio to directly talk to the EC without a kernel driver. But it won't work with secureboot. See #16 But kernel driver fixes are already out there and coming soon.

This works for me. Thank you!

dyslexicjedi avatar Dec 05 '23 20:12 dyslexicjedi

Hello @prurigro do you if the patchset you have shared has landed upstream yet in 6.7 ? I don't think it has but I haven't checked really thoroughly

AkechiShiro avatar Feb 17 '24 16:02 AkechiShiro

@AkechiShiro it's not in mainline 6.8-rc5, so it's probably not in 6.7.

lengau avatar Feb 18 '24 23:02 lengau

Yeah, I'm still patching it in to each 6.7.x release

prurigro avatar Feb 19 '24 06:02 prurigro

Why not making portio the default?

ufechner7 avatar Apr 07 '24 20:04 ufechner7

Why not making portio the default?

portio does not work when secure boot is enabled https://github.com/FrameworkComputer/framework-system/pull/16

stefanhoelzl avatar Apr 07 '24 20:04 stefanhoelzl

The patch series has been merged to the chrome platform tree for-next branch.

I guess it will then go into kernel 6.10

stefanhoelzl avatar Apr 10 '24 05:04 stefanhoelzl

portio does not work when secure boot is enabled #16

You can temporarily lift kernel lockdown using https://github.com/blastrock/unlockdown while waiting for 6.10

Agno94 avatar Apr 12 '24 18:04 Agno94

Seems like this is the patchset- I just applied it on 6.6.2 and framework_tool now functions correctly!

@prurigro , if you don't mind me asking, how are you doing this? I've never done that before, but I'd love to get this tool running w/o disabling Secure Boot or Kernel Lockdown. (till I get access to the 6.10 kernel)

elreydetoda avatar May 24 '24 04:05 elreydetoda

@elreydetoda Hey, so in Archlinux what I do is grab the package for the most recent kernel and add the patches to the build script before running it (ie: patch -Np1 < ../1.patch for each of the four patches). I'll drop them in an archive here so you don't have to dig them out of the mailing list.

Let me know if you need more detail in one direction or another- I didn't want to go too in depth considering how different an experience it would be depending on the distro you're using.

framework-system-amd-support.tar.gz

prurigro avatar May 24 '24 04:05 prurigro

I just tested the 6.10.2 release without any patches and framework_tool works with secure boot enabled. I believe this issue can be closed :)

prurigro avatar Jul 29 '24 01:07 prurigro

Same as #43. Solved with recent kernels on all platforms.

JohnAZoidberg avatar Jan 30 '25 00:01 JohnAZoidberg