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

nixos/sd-image: Increase default firmware partition size #66850

Merged
merged 1 commit into from Aug 18, 2019

Conversation

srhb
Copy link
Contributor

@srhb srhb commented Aug 18, 2019

#63835 increased the size of the files globbed for inclusion in the aarch64 sd image substantially, making the fw partition too small. It may be possible to actually reduce the number of files included instead, but I don't have a system relevant for testing. Maybe @luaduck knows?

The size here is more or less guesswork based on the size of the globbed files and uboot.bin
@samueldr you were the last to reduce the size here, do you think this bump will be problematic?

This should get nixos-unstable building again.

Motivation for this change
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.
Notify maintainers

cc @

@duckfullstop
Copy link
Contributor

I have no idea with regards to your question, but it probably makes sense here to just increase the firmware partition size (it's only going to get larger, most likely) - especially as it's such a small increase.

@srhb
Copy link
Contributor Author

srhb commented Aug 18, 2019

Ah, OK. I was mostly wondering about the glob that gets included in the image, which went from matching...

❯ (cd $(nix-build -E 'with import <nixpkgs> { config.allowUnsupportedSystem = true; }; raspberrypifw')/share/raspberrypi/boot && du -sch bootcode.bin fixup*.dat start*.elf)
37K     bootcode.bin
4,5K    fixup_cd.dat
4,5K    fixup.dat
4,5K    fixup_db.dat
4,5K    fixup_x.dat
517K    start_cd.elf
3,3M    start_db.elf
2,1M    start.elf
2,7M    start_x.elf
8,6M    total

to

❯ (cd $(nix-build -E 'with import <nixpkgs> { config.allowUnsupportedSystem = true; }; raspberrypifw')/share/raspberrypi/boot && du -sch bootcode.bin fixup*.dat start*.elf)
37K     bootcode.bin
4,5K    fixup4cd.dat
4,5K    fixup4.dat
4,5K    fixup4db.dat
4,5K    fixup4x.dat
4,5K    fixup_cd.dat
4,5K    fixup.dat
4,5K    fixup_db.dat
4,5K    fixup_x.dat
569K    start4cd.elf
3,3M    start4db.elf
2,0M    start4.elf
2,6M    start4x.elf
533K    start_cd.elf
3,3M    start_db.elf
2,1M    start.elf
2,7M    start_x.elf
17M     total

I have little to no idea what those files mean in this context. :-)

@samueldr
Copy link
Member

The reason it was reduced that much is that it is now a raspberry-pi specific firmware partition. Meaning that we could slim it as much as we needed.

There shouldn't be any issues in increasing it as much as needed to fit the firmware partition.

@samueldr
Copy link
Member

samueldr commented Aug 18, 2019

It may be possible to actually reduce the number of files included instead

This is an additional idea, which can be done later, is to filter the non-64 bit files from the aarch64 build, e.g. the rpi1 specific files.

The raspberry pi 2 files could be removed, if the 64 bit variant of the raspberry pi 2 doesn't use them when booted in 64 bit mode.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants