diff options
Diffstat (limited to 'infra/libkookie/nixpkgs/lib/systems/platforms.nix')
-rw-r--r-- | infra/libkookie/nixpkgs/lib/systems/platforms.nix | 63 |
1 files changed, 48 insertions, 15 deletions
diff --git a/infra/libkookie/nixpkgs/lib/systems/platforms.nix b/infra/libkookie/nixpkgs/lib/systems/platforms.nix index ab3cf1d54301..a0dccc859883 100644 --- a/infra/libkookie/nixpkgs/lib/systems/platforms.nix +++ b/infra/libkookie/nixpkgs/lib/systems/platforms.nix @@ -203,6 +203,35 @@ rec { # Legacy attribute, for compatibility with existing configs only. raspberrypi2 = armv7l-hf-multiplatform; + zero-gravitas = { + name = "zero-gravitas"; + kernelBaseConfig = "zero-gravitas_defconfig"; + kernelArch = "arm"; + # kernelTarget verified by checking /boot on reMarkable 1 device + kernelTarget = "zImage"; + kernelAutoModules = false; + kernelDTB = true; + gcc = { + fpu = "neon"; + cpu = "cortex-a9"; + }; + }; + + zero-sugar = { + name = "zero-sugar"; + kernelBaseConfig = "zero-sugar_defconfig"; + kernelArch = "arm"; + kernelDTB = true; + kernelAutoModules = false; + kernelPreferBuiltin = true; + kernelTarget = "zImage"; + gcc = { + cpu = "cortex-a7"; + fpu = "neon-vfpv4"; + float-abi = "hard"; + }; + }; + scaleway-c1 = armv7l-hf-multiplatform // { gcc = { cpu = "cortex-a9"; @@ -442,10 +471,9 @@ rec { ## Other ## - riscv-multiplatform = bits: { + riscv-multiplatform = { name = "riscv-multiplatform"; kernelArch = "riscv"; - bfdEmulation = "elf${bits}lriscv"; kernelTarget = "vmlinux"; kernelAutoModules = true; kernelBaseConfig = "defconfig"; @@ -455,17 +483,22 @@ rec { ''; }; - selectBySystem = system: { - i486-linux = pc32; - i586-linux = pc32; - i686-linux = pc32; - x86_64-linux = pc64; - armv5tel-linux = sheevaplug; - armv6l-linux = raspberrypi; - armv7a-linux = armv7l-hf-multiplatform; - armv7l-linux = armv7l-hf-multiplatform; - aarch64-linux = aarch64-multiplatform; - mipsel-linux = fuloong2f_n32; - powerpc64le-linux = powernv; - }.${system} or pcBase; + select = platform: + # x86 + /**/ if platform.isx86_32 then pc32 + else if platform.isx86_64 then pc64 + + # ARM + else if platform.isAarch32 then let + version = platform.parsed.cpu.version or ""; + in if lib.versionOlder version "6" then sheevaplug + else if lib.versionOlder version "7" then raspberrypi + else armv7l-hf-multiplatform + else if platform.isAarch64 then aarch64-multiplatform + + else if platform.parsed.cpu == lib.systems.parse.cpuTypes.mipsel then fuloong2f_n32 + + else if platform.parsed.cpu == lib.systems.parse.cpuTypes.powerpc64le then powernv + + else pcBase; } |