Open Sourcing our Firmware

The readme points to traces on the mainboard where you can debug (and presumably flash) the EC via JTAG. Though you would need some extra hardware/solder some wires.

I would also be interested in a guide for a software approach though.

2 Likes

Looks like @DHowett put together more details on software programming in a previous post. That ectool binary mentioned there is built by default with the repo’s hx20 instructions under build/hx20/utils/ectool. make utils builds it separately under build/bds/util/ectool as well.

1 Like

Correct me if I’m wrong, ectool is just an interface between the EC and userspace, I’m not sure if it can be used to flash an EC binary.

ectool help lists all available commands and seems to include a number of flash-related ones (although I haven’t tested them so ymmv)

ectool help
...
flasherase <offset> <size>
      Erases EC flash
  flasheraseasync <offset> <size>
      Erases EC flash asynchronously
  flashinfo
      Prints information on the EC flash
  flashspiinfo
      Prints information on EC SPI flash, if present
  flashpd <dev_id> <port> <filename>
      Flash commands over PD
  flashprotect [now] [enable | disable]
      Prints or sets EC flash protection state
  flashread <offset> <size> <outfile>
      Reads from EC flash to a file
  flashwrite <offset> <infile>
      Writes to EC flash from a file
...

ectool flashwrite sounds promising, though

1 Like

Cool!᲼᲼᲼᲼᲼᲼᲼᲼᲼᲼᲼᲼᲼᲼᲼

I believe that ectool as shipped in that repository can’t communicate with the EC in the Laptop; it doesn’t look like it implements the MCHP LPC protocol in userspace, and the Linux cros_ec_lpcs driver does not yet support Framework’s specific I/O layout yet.

For now, you may want to use an ectool build from my repo (I’ll submit it as a PR!) as documented here.

7 Likes

Yes, please submit a PR. That would be excellent!

2 Likes

Sounds like an awesome first milestone for Community-backed improvements to the EC code. Way beyond my skills though… But I will vote for it just the same

1 Like

There’s the PR that adds support for communicating with this EC. It’ll be necessary until LKML: "Dustin L. Howett": [PATCH 0/2] platform/chrome: Add support for the Framework Laptop is accepted – which it may not be. I’ll poke the maintainers again after the weekend.

8 Likes

And disable Intel Me (Management Engine) / AMD Platform Security Processor (PSP)

3 Likes

The schematics are currently available for repair shops. Will the schematics be also available to open-source developers?

1 Like

Awesome! I’m very excited to try that out.

My current Acer laptop actually isn’t working properly due to a firmware bug / sleep resume crash / bios priority order panel malfunctioning (random letters there).

Ordered in batch 7, Looking forward to see / tryout the open-source firmware, might also try to learn and contribute to it if I can :grin:

We don’t currently have the ability to provide schematics to individual consumers, but we are working on ways to better support community software development.

5 Likes

It’s somewhere between. It’s basically that we have vetted that the Framework Laptop should work correctly for Ubuntu 21.10, Fedora 35, Manjaro 21.2.1, and now also Linux Mint 20.3 Cinnamon Edge (apart from any caveats called out in the guides) when the guide is followed. At the same time, we don’t yet have the depth of expertise in Linux in our support organization that the Community here has. Because of that, more custom setups, deviations from the guide (like using a different WM), or using other distros is something we would still point people to the Community for.

8 Likes

@nrp Sources to the FrameworkGuide should be great to open, if its on git. Might be easier for community to contribute to add more information, specially for notepoints and fixes which are usually not covered by distro docs because it follows for specific hardware. Or can we have a separate wiki instance running, for software debugging and installation steps?

2 Likes

for those following along, this is @DHowett’s updated patch series which appears to have been approved: LKML: Tzung-Bi Shih: Re: [PATCH v2 0/2] platform/chrome: add support for the Framework Laptop

5 Likes

Given that it was approved, any ideas on how long would it take to reach us, the end users?

@Korvin

I’d guess March might be the soonest possible release of 5.18

1 Like

It’s great !
I was curious that if you going to provide software support for Linux like System 76 with there DKMS and Drivers on GitHub.

I bought a framework laptop yesterday because of this.
Keep going! Open source the bios (Coreboot?), work on firmware upgrades from Linux!

My XPS 13 was a big disappointment because of the broken + unstable TB 3 implementation under Linux. Really hopeful the Framework is outta this world.

2 Likes