Skip to content

Commit

Permalink
zynq: add sd image support
Browse files Browse the repository at this point in the history
  • Loading branch information
fsagbuya committed Jan 2, 2024
1 parent ada3dcb commit 2cee7ae
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
5 changes: 5 additions & 0 deletions base.nix
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ with lib;
description = "enable rngd";
default = false;
};
not-os.sd = mkOption {
type = types.bool;
default = false;
description = "enable sd image support";
};
not-os.simpleStaticIp = mkOption {
type = types.bool;
default = false;
Expand Down
4 changes: 3 additions & 1 deletion stage-1.nix
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,9 @@ let
mkdir -p /mnt/nix/store/
${if config.not-os.nix then ''
${if config.not-os.sd && config.not-os.nix then ''
mount $root /mnt
'' else if config.not-os.nix then ''
# make the store writeable
mkdir -p /mnt/nix/.ro-store /mnt/nix/.overlay-store /mnt/nix/store
mount $root /mnt/nix/.ro-store -t squashfs
Expand Down
1 change: 1 addition & 0 deletions zynq_image.nix
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ in {
boot.kernelPackages = customKernelPackages;
nixpkgs.system = "armv7l-linux";
networking.hostName = "zynq";
not-os.sd = true;
system.build.zynq_image = pkgs.runCommand "zynq_image" {
preferLocalBuild = true;
} ''
Expand Down

0 comments on commit 2cee7ae

Please sign in to comment.