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

Bring gnat6 back #225191

Closed
wants to merge 2 commits into from
Closed

Bring gnat6 back #225191

wants to merge 2 commits into from

Conversation

mmlb
Copy link
Contributor

@mmlb mmlb commented Apr 7, 2023

Description of changes

Re-enables gnat6. This is mostly so we can build coreboot-4.11 without having to override its own build-tools scripts. coreboot seems to be very picky about its compilers and I'd like to let it do its thing. This will be helpful for linuxboot/heads#1269 for example.

I've also renamed gnatboot to gnat-bootstrap. I did this primarily for 2 reasons.

  1. Most of the other boostrap packages are named $compiler-bootstrap so it makes sense to keep that pattern.
  2. As someone not super knowledgeable about GCC's Ada and co I originally assumed gnatboot was the name of an actual binary, not a bootstrapping compiler. The new names makes it much more obvious to others like me.
Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 23.05 Release Notes (or backporting 22.11 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

@mmlb
Copy link
Contributor Author

mmlb commented Apr 7, 2023

@vcunat for you to 👁️ too. Thanks for your pointer in matrix!

@tlaurion
Copy link

tlaurion commented Apr 10, 2023

Adding some background notes on why this is so badly needed.

Gnat requires to be built from older versions. Gnat is required to build coreboot's libgfxinit, that is, native graphic initialization, providing firmware based text console or framebuffer.

Coreboot buildstack is cross-built, per coreboot version, from host's buildstack to provide per version reproducible bootblock, ramstage, romstage etc. It is possible to build directly from any toolchain (corrboot config option exists) but that is far from being recommended and is really fragile.

For one to be able to build coreboot's buikdstack dependable gnat, host buildstack needs to provide older version of gnat to be built. Under Heads, the host buildstack is also used to build musl-cross-make, which is then used to build all other linux libraires and binaries (Heads modules).

So without gnat6, coreboot 4.11 platforms for which a configuration requires gnat (libgfxinit) will fail to produce rom. Newer coreboot crossbuilt buildstack would succeed being built from NixOS today, but older ones won't build. Older buildstacks are only needed to build newer cross-compiled buildstacks.

NixOS already builds coreboot buildstack for newer coreboot versions (4.16+ if I recall well) but older and freer platforms having been dropped by coreboot (kgpe-d16, kcma-d8) under 4.11 won't cross compile on NixOS without gnat6.

Can't wait to see this merged and starting to collaborate on building reproducible docker images and recipes to build on top of other Linux OS, dodging other reproducibility issues linked to having so many Linux host tools being moving targets and have the same ROMs built for same Heads commit 10 years from now.

@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/prs-ready-for-review/3032/2059

@alyssais alyssais requested a review from yu-re-ka April 11, 2023 17:54
Comment on lines 107 to 104

if [[ ${majorVersion} == 4 ]]; then
mv $out/bin/gnatgcc_2wrap $out/bin/gnatgcc
ln -s $out/bin/gnatgcc $out/bin/gcc
fi
''
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if [[ ${majorVersion} == 4 ]]; then
mv $out/bin/gnatgcc_2wrap $out/bin/gnatgcc
ln -s $out/bin/gnatgcc $out/bin/gcc
fi
''
'' + '' lib.optionalString (majorVersion == 4) ''
mv $out/bin/gnatgcc_2wrap $out/bin/gnatgcc
ln -s $out/bin/gnatgcc $out/bin/gcc
''

if we are already using nix variables, we can make this a little cleaner

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can do

Comment on lines 53 to 68
version =
if majorVersion == "4" then
gccVersion
else
"${gccVersion}-${alireRevision}";
src =
if majorVersion == "4" then
fetchurl {
inherit url hash;
}
else
fetchzip {
url = "https://github.com/alire-project/GNAT-FSF-builds/releases/download/gnat-${version}/gnat-${stdenv.hostPlatform.system}-${version}.tar.gz";
inherit hash;
};
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we can move this into versionMap, to reduce the branching and make the code a bit cleaner.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried this there too originally, the version is easily moved up and I'll add that in. On the other hand src is quite a pain. I'm not sure how I'd avoid repeating the alire-project releases url for each version and architecture, it doesn't seem to end up being cleaner at all for src.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually that doesn't work either, not sure why. When I tried building with cb798bcae40 nix-build errored with:

nix-build -A gnat-bootstrap4
error: undefined variable 'gccVersion'

       at /home/manny/cloned/github.com/NixOS/nixpkgs/pkgs/development/compilers/gnat-bootstrap/default.nix:23:20:

           22|       alireRevision = "4";
           23|       version = "${gccVersion}-${alireRevision}";
             |                    ^
           24|     } // {

So going to go back.

@RaitoBezarius
Copy link
Member

RaitoBezarius commented Apr 12, 2023

I requested reviews from @felixsinger and @blitz as I know you have interest or have been involved with coreboot ecosystem in the past. Apologies if this was not desired.

@RaitoBezarius
Copy link
Member

This is an awesome PR as I use coreboot on my X230 with NixOS and I have been looking into adding a coreboot NixOS module to manage end-to-end everything in NixOS. :)

Some classical points: please read the CONTRIBUTING guide, rename your commits accordingly gnat6: init, etc.

Copy link
Member

@RaitoBezarius RaitoBezarius left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me; I didn't test it yet though.

@yu-re-ka
Copy link
Contributor

This is mostly so we can build coreboot-4.11 without having to override its own build-tools scripts.

May I ask why you are not building a more recent of coreboot?

@felixsinger
Copy link
Member

@RaitoBezarius Thanks for mentioning :) Will try to have a look later in the evening.

@RaitoBezarius
Copy link
Member

This is mostly so we can build coreboot-4.11 without having to override its own build-tools scripts.

May I ask why you are not building a more recent of coreboot?

This is mentioned in the second message:

NixOS already builds coreboot buildstack for newer coreboot versions (4.16+ if I recall well) but older and freer platforms having been dropped by coreboot (kgpe-d16, kcma-d8) under 4.11 won't cross compile on NixOS without gnat6.

@alyssais
Copy link
Member

alyssais commented Apr 12, 2023

NixOS already builds coreboot buildstack for newer coreboot versions (4.16+ if I recall well) but older and freer platforms having been dropped by coreboot (kgpe-d16, kcma-d8) under 4.11 won't cross compile on NixOS without gnat6.

Are these older coreboot versions being maintained? What would it take to update their required gnat version? I'm sympathetic, but I'm not sure we want to commit to indefinitely maintaining every package that happens to be required by an old, static version of Coreboot.

@yu-re-ka
Copy link
Contributor

+1, I would be much happier if we could figure out how to build coreboot for your platform without keeping around the older compiler(s)

@mmlb mmlb force-pushed the gnat6 branch 2 times, most recently from 5e735ed to 7bbaebb Compare April 12, 2023 12:58
@mmlb
Copy link
Contributor Author

mmlb commented Apr 12, 2023

I can't really say whether we should have this in nixpkgs or not. I suspect it would be very welcome by anyone wanting to build coreboot for their platform. I suspect the maintenance burden to be low. I'd also like to try and use gnat6 as the bootstrap compiler for the other gnats. It would be nice to minimize external dependencies imo.

@mmlb
Copy link
Contributor Author

mmlb commented Apr 28, 2023

@amjoseph-nixpkgs, I've rebased on top of #226179 to see what that looks like for this PR.

@tlaurion
Copy link

tlaurion commented May 6, 2023

@amjoseph-nixpkgs ping :)
And some updates in preliminarily results of removing ada dependency of coreboot libgfxinit for Heads at linuxboot/heads#1269 (comment)

@tlaurion
Copy link

tlaurion commented May 11, 2023

Ada might still be required. Otherwise some platforms stay in the dark until DRM+GPU kernel drivers take ownership of fb. With coreboot libgfxinit (which requires ada/gnat) a bootsplash can be showed within milliseconds until DRM+GPU takes over fb to provide proper fbwhiptail support. Otherwise leaving users in the dark for now around 8 to 10 seconds, depending of much stuff is inside of the spi chip and the speed in which that content can be read from spi (reading payload from spi up to jumping into it takes 6-8 seconds deonding if its size on older platforms at 50mhz) to a full fledged recovery environment userland (2 seconds).

Alternatives are evaluated, but gnat support should not be excluded, at least in the transition.

Details linuxboot/heads#1381 (comment)

@alyssais
Copy link
Member

I feel like I'm still missing answers to some important questions here.

  1. Would this be a useful step towards obtaining a binary-free bootstrap of modern GNAT? If so, how far away are we from such a bootstrap? That would sidestep my concerns about packaging compilers only used by unmaintained software, because it provides another reason to keep it around.
  2. @tlaurion has anybody tried backporting the libgfxinit (the only gnat-using part of coreboot) from a recent coreboot back to 4.11? Since it's written in a completely different language (Ada) than the rest of coreboot (C) the interfaces should be well-defined.

Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Sorry about the delayed response.

@mmlb
Copy link
Contributor Author

mmlb commented May 23, 2023

I feel like I'm still missing answers to some important questions here.

1. Would this be a useful step towards obtaining a binary-free bootstrap of modern GNAT?  If so, how far away are we from such a bootstrap?  That would sidestep my concerns about packaging compilers only used by unmaintained software, because it provides another reason to keep it around.

No, this is still using the same gnat4 binary originally from gentoo. If binary free bootstrapping is wanted I'm happy to look into it for gnat.

@tlaurion
Copy link

2. @tlaurion has anybody tried backporting the libgfxinit (the only gnat-using part of coreboot) from a recent coreboot back to 4.11? Since it's written in a completely different language (Ada) than the rest of coreboot (C) the interfaces should be well-defined.

@alyssais Sorry for the delay answering this.
The problem with upstream deprecated coreboot branches is not really the libgfxinit code itself but the buildstack pinned per coreboot versions to bootstrap builds for reproducibility. Those version numbered branches rarely gets patches upstreamed, which stall under review.coreboot.org.

As said in tickets referred here, libgfxinit is not "required" anymore on the only platform having GMA (which libgfxinit supports) while kgpe-d16 implements native graphic init and doesn't need libgfxinit at all.

The real problem here, if distributions wants to use Nix/NixOS as a buildstack for coreboot branches, is that coreboot by itself, outside of its possible configurations, will not build unless gnat is available for libgfxinit. So for example here, libreboot being a distribution of coreboot and having decided to pack seabios/grub as a payload will depend on seabios+vbios blob or use seabios graphic init. But that might change. Skulls depends on seabios the same way. linuxboot tries to provide the most generic linux configuration possible (now directly under coreboot since 4.18 if I recall well) and therefore the same problem arises on buildstack dependencies to gnat there, and yet again, if some boards are to depend on libgfxinit+linux to provide VESA, things might fail requiring Nix users to tackle this problem again.

libreml1um, and 4.11 coreboot, could definitely be patched directly under Heads though, if for whatever reason they would want to reenable libgfxinit. Note that libgfxinit offers interesting properties, including drawing a bootsplash directly in ramstage, so that slowing platforms reading from SPI are not left in the dark until linux kernel owns the graphic card for the first time in absence of libgfxinit.

The reason of all of this is purely generic. Ideally, older platforms supported by coreboot 4.11 releaseshould be able to be built if provided with the proper dependencies. And abusing Nix for thatwould simply be amazing. But to be honest, the librem1um being the only known case for libgfxinit potentially being needed might not justify the effort today. The platform is fast enough to not leave users in the dark until i915+drm drivers to own and draw in a functional framebuffer.

The ecosystem moving forward and away of fb, preferring KMS enabled drm drivers are desired and being pushed forward. So ideally, firwares would present a fb (native init or libgfxinit or efifb) so that the linux kernel can use it without overhead. Ideally, this would mean a single drm driver (simpledrm) with a single fb driver to fallback to (simplefb) which works out of the box without having to pack in the kernel anything big or complicated to get a console output on screen.

When those combined (sandy/ivy bridge platformsused as example here) libgfxinit can draw a bootsplash within millisecond, after which slow spi access continues reading kernel initrd (8 seconds showing bootsplash) and then the kernel kicks in and can use sysfb exposed fb through simplefb. When kexec'ing into another OS, that framebuffer (simplefb) can be exposed through kexec and be reused again through simplefb+simpledrm and then more complex drm drivers can take ownership of the fb again for i915drm. Without libgfxinit, the kernel needs to pack i915drm which even if compressed takes 500kb of precious SPI space. And leave the user in the dark untilthat i915drm driver can draw in the console. This is now 10 seconds on the x230. No problem here, the x230 is currently maintained under coreboot. But the librem1um was supported 2 years ago and now isnt. And the ecosystem is moving leaving that platform not being able to be built with Nix today.

Now, on what really matters here for Nix, ideally, if any of those platforms are deprecated into coreboot tomorrow, the desire is to be able to pin a package commit that would permit that board to continue to be able to build coreboot without any patches needed on top of coreboot. A downstream project using Nix to build a reproducible ROM should be able to do so in 10 years from now.

Sorry for the long reply and hoping this explains why those old perceived tools are needed otherwise patching things are needed and therefore repruducible builds cannot be obtained (We cannot build librem1um with libgfxinit enabled in coreboot today with Nix).

@mweinelt mweinelt added the 12.approvals: 2 This PR was reviewed and approved by two reputable people label Jun 2, 2023
@ghost
Copy link

ghost commented Aug 23, 2023

@ofborg eval

@ghost ghost marked this pull request as draft August 23, 2023 23:46
@ghost
Copy link

ghost commented Aug 23, 2023

Rebased. Apparently github can't see that this is a nonconflicting rebase.

@ghost ghost force-pushed the gnat6 branch 2 times, most recently from bef646f to ac68fed Compare August 23, 2023 23:50
@ghost ghost marked this pull request as ready for review August 23, 2023 23:50
@yu-re-ka
Copy link
Contributor

yu-re-ka commented Aug 23, 2023

My assumptions:

  • Latest coreboot 4.20 will build fine with the more recent gnat we already have in nixpkgs
  • coreboot derivatives will eventually move on from coreboot 4.11 to more recent versions

If you want to build coreboot 4.11 from 2019, why don't you use a nixpkgs checkout from 2019, which has the gnat6 you need (more specifically nix shell nixpkgs/nixos-21.05#gnat6 since gnat was already previously removed for being hard to maintain)?

Otherwise what is the expectation; until when do we keep this around?

@ghost
Copy link

ghost commented Aug 24, 2023

My assumptions:

  • coreboot derivatives will eventually move on from coreboot 4.11 to more recent versions

This is an incorrect assumption. Coreboot 4.12 dropped support for all the IME/PSP-free hardware. It was a very contentious decision. A lot of people are still very bitter about it. Please don't reopen this old wound.

Otherwise what is the expectation; until when do we keep this around?

Until gnuboot is in nixpkgs? (It too requires GNAT).

since gnat was already previously removed for being hard to maintain)?

The removal had more to do with nobody being motivated to fix it. As long as @mmlb is willing to maintain it with high-quality PRs like this one I think we should merge them. If it breaks again and @mmlb goes AWOL we can remove it again.

@ghost
Copy link

ghost commented Aug 24, 2023

@mmlb, do you have an alternative source for gnatboot-4.1? Gentoo seems to have moved it elsewhere and I can't find the new URL. I was hoping it would still be in ofborg's cache, but apparently it is not.

trying https://ftp.snt.utwente.nl/pub/os/linux/gentoo/distfiles/gnatboot-4.1-amd64.tar.bz2
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
copying path '/nix/store/rhx3c6qvnp8jss777q8znmsifcfy0cw3-source-highlight-3.1.9-dev' from 'https://cache.nixos.org'...
  0   196    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
curl: (22) The requested URL returned error: 404
trying https://distfiles.gentoo.org/distfiles/gnatboot-4.1-amd64.tar.bz2
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0   302    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
curl: (22) The requested URL returned error: 404
trying https://mirrors.kernel.org/gentoo/distfiles/gnatboot-4.1-amd64.tar.bz2
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
copying path '/nix/store/skylwyykbfnvhq7qssywi0ggwv2ffmm6-python3.10-pyelftools-0.29' from 'https://cache.nixos.org'...
copying path '/nix/store/md052k6fr3ka5p6bbg238qhjrhya1p7j-python3-3.10.12-env' from 'https://cache.nixos.org'...
  0   369    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
curl: (22) The requested URL returned error: 404
error: cannot download source from any mirror
error: builder for '/nix/store/5y0088vk3h5y9hhmcdd55nw52y7irr88-source.drv' failed with exit code 1;
       last 10 log lines:
       >                                  Dload  Upload   Total   Spent    Left  Speed
       >   0   302    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
       > curl: (22) The requested URL returned error: 404
       >
       > trying https://mirrors.kernel.org/gentoo/distfiles/gnatboot-4.1-amd64.tar.bz2
       >   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
       >                                  Dload  Upload   Total   Spent    Left  Speed
       >   0   369    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
       > curl: (22) The requested URL returned error: 404
       > error: cannot download source from any mirror
       For full logs, run 'nix log /nix/store/5y0088vk3h5y9hhmcdd55nw52y7irr88-source.drv'.

@mmlb
Copy link
Contributor Author

mmlb commented Aug 24, 2023

@mmlb, do you have an alternative source for gnatboot-4.1? Gentoo seems to have moved it elsewhere and I can't find the new URL. I was hoping it would still be in ofborg's cache, but apparently it is not.

trying https://ftp.snt.utwente.nl/pub/os/linux/gentoo/distfiles/gnatboot-4.1-amd64.tar.bz2
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
copying path '/nix/store/rhx3c6qvnp8jss777q8znmsifcfy0cw3-source-highlight-3.1.9-dev' from 'https://cache.nixos.org'...
  0   196    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
curl: (22) The requested URL returned error: 404
trying https://distfiles.gentoo.org/distfiles/gnatboot-4.1-amd64.tar.bz2
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0   302    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
curl: (22) The requested URL returned error: 404
trying https://mirrors.kernel.org/gentoo/distfiles/gnatboot-4.1-amd64.tar.bz2
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
copying path '/nix/store/skylwyykbfnvhq7qssywi0ggwv2ffmm6-python3.10-pyelftools-0.29' from 'https://cache.nixos.org'...
copying path '/nix/store/md052k6fr3ka5p6bbg238qhjrhya1p7j-python3-3.10.12-env' from 'https://cache.nixos.org'...
  0   369    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
curl: (22) The requested URL returned error: 404
error: cannot download source from any mirror
error: builder for '/nix/store/5y0088vk3h5y9hhmcdd55nw52y7irr88-source.drv' failed with exit code 1;
       last 10 log lines:
       >                                  Dload  Upload   Total   Spent    Left  Speed
       >   0   302    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
       > curl: (22) The requested URL returned error: 404
       >
       > trying https://mirrors.kernel.org/gentoo/distfiles/gnatboot-4.1-amd64.tar.bz2
       >   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
       >                                  Dload  Upload   Total   Spent    Left  Speed
       >   0   369    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
       > curl: (22) The requested URL returned error: 404
       > error: cannot download source from any mirror
       For full logs, run 'nix log /nix/store/5y0088vk3h5y9hhmcdd55nw52y7irr88-source.drv'.

I do not have one up any where atm but would be fine with a quick GH repo with a release that contains the tarball.

@mmlb
Copy link
Contributor Author

mmlb commented Aug 24, 2023

@alyssais

1. Would this be a useful step towards obtaining a binary-free bootstrap of modern GNAT? 

Not really, we're still using a binary build of gnat here.

If so, how far away are we from such a bootstrap?

Very far it seems. I've recently learned that gnat has never been bootstrappable, even the first release required a pre-existing gnat compiler 🤯 . There's a project at the very earliest of stages to try and bootstrap gnat (https://fossil.irvise.xyz/gnat-bootstrap/forum)

@wegank wegank removed the 12.approvals: 2 This PR was reviewed and approved by two reputable people label Sep 7, 2023
Mostly a partial revert of 6e64369 but
massaged to make it work with the current gnat-bootstrap/default.nix setup.
Use gnatboot4 to compile gnat6. Bringing this back to support building
coreboot 4.11 outside of nixpkgs.
@mmlb
Copy link
Contributor Author

mmlb commented Sep 17, 2023

I've uploaded the gnat4.1 tarball to a repo I control and have updated the PR to use it instead of mirror based off from gentoo. I'd really like to see the repo under nixos' umbrella instead though, thoughts on doing so?

@RaitoBezarius
Copy link
Member

RaitoBezarius commented Oct 11, 2023

I feel like I'm still missing answers to some important questions here.
[...]
2. > @tlaurion has anybody tried backporting the libgfxinit (the only gnat-using part of coreboot) from a recent coreboot back to 4.11? Since it's written in a completely different language (Ada) than the rest of coreboot (C) the interfaces should be well-defined.

Interestingly, it happens I went into the rabbit hole with OwnerBoot.

I am using the coreboot-toolchain 4.16 with coreboot 4.9 (worse than 4.11 arguably) as this is the ownerboot tree (https://git.sr.ht/~amjoseph/ownerboot/).

Basically, for my X230, I encountered many toolchain issues indeed and it was not super hard to fix but quite annoying to use intuition to guess "oh this is a new warning, let's silence it here, let's do that, etc." or read next commits to find out about a new GCC breakage for GNAT (or even GCC!).

So I can confirm it is possible to get:

FMAP REGION: FALLBACK
Name                           Offset     Type           Size   Comp
cbfs master header             0x0        cbfs header        32 none
fallback/romstage              0x80       stage           73588 none
fallback/ramstage              0x12080    stage          102052 none
config                         0x2af80    raw               566 none
revision                       0x2b200    raw               570 none
vbt.bin                        0x2b480    raw              1433 LZMA (4281 decompressed)
cmos_layout.bin                0x2ba80    cmos_layout      1804 none
fallback/postcar               0x2c200    stage           15644 none
fallback/dsdt.aml              0x2ff80    raw             13778 none
(empty)                        0x335c0    null          1883672 none
bootblock                      0x1ff400   bootblock        1968 none
FMAP REGION: NORMAL
Name                           Offset     Type           Size   Comp
cbfs master header             0x0        cbfs header        32 none
fallback/romstage              0x80       stage           73588 none
fallback/ramstage              0x12080    stage          102052 none
config                         0x2af80    raw               566 none
revision                       0x2b200    raw               570 none
vbt.bin                        0x2b480    raw              1433 LZMA (4281 decompressed)
cmos_layout.bin                0x2ba80    cmos_layout      1804 none
fallback/postcar               0x2c200    stage           15644 none
fallback/dsdt.aml              0x2ff80    raw             13778 none
(empty)                        0x335c0    null          1885716 none
installing

Of course, it fails for unrelated reason I believe:

E: Image is missing 'COREBOOT' region
E: Could not add [/nix/store/a22y44d8p7pzv93kjgl5by0hv6fwn2a4-linux-x86_64-unknown-linux-gnu-5.10.148/bzImage, 7506985 bytes (7331 KB)@0x0]; too big?
E: Failed to add '/nix/store/a22y44d8p7pzv93kjgl5by0hv6fwn2a4-linux-x86_64-unknown-linux-gnu-5.10.148/bzImage' into ROM image.

Maybe, I will get somewhere on a future nerdsnipe in some oceansprint.org with some fellows who are interested into better coreboot in nixpkgs.

As a matter of fact, I believe it is very possible to use libgfxinit + libhwbase on older coreboot with newer coreboot-toolchain (4.16), I think we can go further, but I will let this to the next one, the only reason I went for 4.16 is that glibc changed the fact that minimum stack size was a constant, and it created serious issues with GCC 8.3.0.

@wegank wegank added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Mar 19, 2024
@mmlb
Copy link
Contributor Author

mmlb commented May 9, 2024

no longer needing this, so just going to go ahead on close

@mmlb mmlb closed this May 9, 2024
@mmlb mmlb deleted the gnat6 branch May 9, 2024 22:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md 8.has: clean-up 8.has: package (new) This PR adds a new package 10.rebuild-darwin: 11-100 10.rebuild-linux: 11-100
Projects
None yet
Development

Successfully merging this pull request may close these issues.