astro / nix-openwrt-imagebuilder

Build OpenWRT images in Nix derivations
MIT License
129 stars 16 forks source link

Build image for Linksys WRT1900ACS #21

Closed phodina closed 1 year ago

phodina commented 1 year ago

Hello,

could I ask you for help to build image for Linksys WRT1900ACS.

What would be the Nix commands to execute?

Also how to use custom config from make menuconfig?

astro commented 1 year ago

The profile for that device is called linksys_wrt1900acs.

Could you please tell me where the README seems to omit important stuff? Do you intend to use default.nix or the Flake?

Do you mean make menuconfig for building OpenWRT? This tool does not build OpenWRT but runs the OpenWRT ImageBuilder to generate customized firmwares with the customization parameters that it accepts. (I would prefer a real OpenWRT build in Nix, too. Please, somebody go ahead and build it!)

GeorgesAlkhouri commented 1 year ago

Hi @astro, first of all thanks for you effort and this repository. I am also trying to build a custom image for the linksys wrt1900acs router. I tried to build it via nix flake like this:

    packages.x86_64-linux.my-router = let
      pkgs = nixpkgs.legacyPackages.x86_64-linux;
      profiles = openwrt-imagebuilder.lib.profiles {inherit pkgs;};
      config = profiles.identifyProfile "linksys_wrt1900ac"; #also tried linksys_wrt1900acs, note the 's' at the end
    in
      openwrt-imagebuilder.lib.build config;

with an error as result. error: No match for OpenWRT profile linksys_wrt1900ac Do you have an idea why this is not working.

I also tried to build the profiles list (to see all available profiles) via nix run -j4 .#profiles-list but also got an error:

error: hash mismatch in fixed-output derivation '/nix/store/9r857z4cm6vhrx8p9qg17x14knywg1kr-sha256sums.drv':
         specified: sha256-uRFapR5RFfI7yEvxL8yB84Vt9N2W3f+XwfijSBMVEzA=
            got:    sha256-ky0V+Pffd62GPDzVB0EtReftNEzR4f2NCChqPxda7Zc=
astro commented 1 year ago

The profile's files seem to be (still?) missing in 22.03.3 but they are present in in 22.03.2. Not sure what's going on but there is nothing that I can do here.

Specify the release:

profiles = openwrt-imagebuilder.lib.profiles { inherit pkgs; release = "22.03.2"; };

If you get mismatched sha256sums wait for the next update hashes action. Sorry.