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

uneeded builds when using binfmt for a crossSystem #988

Open
meck opened this issue Mar 11, 2025 · 0 comments
Open

uneeded builds when using binfmt for a crossSystem #988

meck opened this issue Mar 11, 2025 · 0 comments

Comments

@meck
Copy link
Contributor

meck commented Mar 11, 2025

I'm cross compiling a system for armv7 and trying to use disko to write an sd-card.

In the Im doing a writeShellScript that references ubootAmx335xEVM (an armv7 only build).
and adding to environment.systemPackages.

I'm using binfmt while building the sdcard

disko.imageBuilder = {
  enableBinfmt = true;
  pkgs = pkgs.buildPackages;
  kernelPackages = pkgs.buildPackages.linuxPackages_latest;
};

When running the build (on an x86 host) the following line in make-disk-image.nix seems
to try to build ubootAmx335xEVM using x86 gcc which fails.

ln -sfn ${systemToInstallNative.config.system.build.etc}/etc/udev/rules.d /etc/udev/rules.d

The issue can be workaround by doing:

environment.systemPackages = lib.mkIf (pkgs.stdenv.hostPlatform == "armv7l-linux") [
  update-bootloader
];

However it seems a lot of unnecary packages ar build in this situation when refrencing systemToInstallNative.config.system.build.etc just to get the udev rules.

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

No branches or pull requests

1 participant