Commit Graph

62 Commits

Author SHA1 Message Date
Alyssa Ross
089ff89f49
lib.systems: drop scaleway-c1
These servers apparently no longer exist, since September 2, 2021[1].
If somebody needs this for non-Scaleway machines, they should suggest
its reintroduction with a different name.

[1]: https://news.ycombinator.com/item?id=27192757
2022-05-27 12:02:39 +00:00
Rick van Schijndel
b9e8ed239f
Merge pull request #161156 from a-m-joseph/abort-on-failed-platform-detection-instead-of-silently-assuming-pc
platforms.nix: use {} on failed detection instead of silently assuming pc
2022-05-04 05:37:16 +02:00
Adam Joseph
006c38fa53 platforms.nix: use {} on failed detection instead of silently assuming pc
This patch causes the autodetection code in lib/systems/platforms.nix
to return {} if it cannot detect the platform and one of the
platform.nix-detection-provided attributes (linux-kernel, gcc, and
rustc) are accessed, rather than silently assuming the "pc" platform
as was previously done.

It is definitely safe to assume that code using these attributes is
prepared to deal with `gcc` and `rustc` not being defined, because
many of the working entries in this file don't define it.

Regarding `linux-kernel` the situation is less certain, but some code
(`lib/systems/default.nix` for example) is already designed to deal
with that attribute being missing.  At worst it would result in an
"attribute not found" error.

While adding mips64el bootstrap support to nixpkgs, the silent
assumption that mips64el routers are actually Intel PCs caused
significant frustration.  This commit removes that assumption in order
to save people who port nixpkgs to new platforms in the future from
this frustration.
2022-05-03 13:31:41 -07:00
Artturin
4aab12d5a1 lib/systems/platforms: correctly import examples.nix
before: :p lib.systems failed with
error: getting status of '...examples': no such file or directory
2022-04-15 20:25:58 +03:00
Adam Joseph
ff69b8c2bf Ericson2314's suggestion here: https://github.com/NixOS/nixpkgs/pull/161158#discussion_r822295406 2022-03-10 20:30:19 -08:00
Adam Joseph
6de935a012 This commit adds only comments to platforms.nix. 2022-03-10 20:30:19 -08:00
Adam Joseph
998fd408e0 remove float = "hard" from mips entries 2022-03-10 20:30:18 -08:00
Adam Joseph
e748e1fd18 https://github.com/NixOS/nixpkgs/pull/161158#pullrequestreview-903824553 2022-03-10 20:30:18 -08:00
Adam Joseph
12371a51e6 lib/systems: add mips64el definitions
MIPS has a large space of {architecture,abi,endianness}; this commit
adds all of them to lib/systems/platforms.nix so we can be done with
it.

Currently lib/systems/inspect.nix has a single "isMips" predicate,
which is a bit ambiguous now that we will have both mips32 and mips64
support, with the latter having two ABIs.  Let's add four new
predicates (isMips32, isMips64, isMips64n32, and isMips64n64) and
treat the now-ambiguous isMips as deprecated in favor of the
more-specific predicates.  These predicates are used mainly for
enabling/disabling target-specific workarounds, and it is extremely
rare that a platform-specific workaround is needed, and both mips32
and mips64 need exactly the same workaround.

The separate predicates (isMips64n32 and isMips64n64) for ABI
distinctions are, unfortunately, useful.  Boost's user-scheduled
threading (used by nix) does does not currently supports mips64n32,
which is a very desirable ABI on routers since they rarely have
more than 2**32 bytes of DRAM.
2022-03-10 20:30:16 -08:00
Ryan Burns
288cc2007b lib/systems: update powernv kernel config
PowerNV was looking for a nonexisting zImage file.
Remove unnecessary .file / .installTarget.

Also add config options needed for default minimal
NixOS config and QEMU VirtIO/VirtFS devices.
2021-09-28 17:41:13 -07:00
Ryan Burns
525c69e724 lib/systems: fix scaleway-c1 platform
This regressed in 9c213398b3

The recursiveUpdate gave the platform both gcc.cpu and gcc.arch attrs
instead of only gcc.cpu. This is invalid; gcc configuration fails with:

```
Switch "--with-arch" may not be used with switch "--with-cpu"
```

So we revert to using `//` to retain only gcc.cpu
(which is more specific than the processor arch).
2021-08-18 21:52:14 -07:00
Ben Wolsieffer
e2d5af502a lib/systems/platforms: armv7l-hf-multiplatform: fix kernel build
autoModules triggers a build system bug where ks8851_mll needs to be built-in if
ks8851 is also built-in.
2021-07-30 14:08:02 -04:00
Zhaofeng Li
e2aee93caf platforms: Enable ftrace support for RISC-V
Support has landed in mainline for a while.
2021-06-01 19:49:30 -07:00
Zhaofeng Li
805e9ce9ea platforms: Build flat kernel image for RISC-V
Newer bootloaders for RISC-V (i.e., OpenSBI + U-Boot) support
flat and compressed kernel images but not vmlinux. Therefore,
let's build "Image" like what we do with aarch64.

Also copy DTBs while we are at it.
2021-06-01 19:49:30 -07:00
Andrew Childs
23cae56ca7 lib/systems/platforms: add Apple M1 2021-05-17 00:27:03 +09:00
Ben Wolsieffer
7b573e8051 lib/systems/platforms: remove TI_CPTS override
Forcing the module to be builtin breaks 5.10, which wants to compile it as a
module (probably due to dependencies). There doesn't seem to be a need to have
it builtin anymore, so we can just remove the override.
2021-02-15 11:23:17 -05:00
Ben Wolsieffer
1e1588898b lib/systems/platforms: note that RPi 3 fixes aren't needed for kernel >=4.17 2021-02-15 11:23:17 -05:00
Philipp Adolf
408ae0b13a lib: fix typo in platforms.nix
In 9c213398b3 kernelPreferBuiltin was
moved/renamed to linux-kernel.preferBuiltin. However, for
armv7l-hf-multiplatform the new option was written with an uppercase P,
which made the kernel build process ignore it.
2021-02-11 08:58:04 +01:00
John Ericson
9c213398b3 lib: Clean up how linux and gcc config is specified
Second attempt of 8929989614589ee3acd070a6409b2b9700c92d65; see that
commit for details.

This reverts commit 0bc275e634.
2021-01-23 10:01:28 -05:00
Jonathan Ringer
0bc275e634
Revert "lib: Clean up how linux and gcc config is specified"
This is a stdenv-rebuild, and should not be merged
into master

This reverts commit 8929989614.
2021-01-22 14:07:06 -08:00
John Ericson
8929989614 lib: Clean up how linux and gcc config is specified
The `platform` field is pointless nesting: it's just stuff that happens
to be defined together, and that should be an implementation detail.

This instead makes `linux-kernel` and `gcc` top level fields in platform
configs. They join `rustc` there [all are optional], which was put there
and not in `platform` in anticipation of a change like this.

`linux-kernel.arch` in particular also becomes `linuxArch`, to match the
other `*Arch`es.

The next step after is this to combine the *specific* machines from
`lib.systems.platforms` with `lib.systems.examples`, keeping just the
"multiplatform" ones for defaulting.
2021-01-21 22:44:09 -05:00
John Ericson
19852e3dc6
Merge pull request #104648 from samueldr/cleanup/kernelMajor
platforms.nix: Remove now unused kernelMajor
2021-01-18 14:08:30 -05:00
Andreas Rammhold
a44aec2b1b
lib/systems/platforms: treat missing cpu version as generic pcBase
Since 40e7be1 all ARM platforms that didn't have a parsed cpu version
(e.g. arm-none-eabi) would be handled as armv7l-hf-multiplatform which
did break building arm-trusted-platform packages for some targets (e.g.
rk3399).

Using pcBase as fallback, instead of armv7l-hf-multiplatform,
corresponds with the behaviour we had before 40e7be1.
2020-12-31 00:12:07 +01:00
John Ericson
8e21ce5fae
Merge pull request #105294 from Ericson2314/platform-config-improvements
Platform config improvements
2020-12-02 11:17:41 -05:00
Tad Fisher
454df2b0c3
Cross-compiling configuration for reMarkable 2 tablet 2020-11-29 23:01:58 -08:00
John Ericson
9918ba2dba lib/systems/exmaple: riscv-multiplatform no longer needs parameter 2020-11-29 00:03:51 +00:00
John Ericson
04f6973200 lib, binutils: Move Risc-V bfdEmulation to be by the others 2020-11-29 00:03:51 +00:00
John Ericson
40e7be11c8 lib.systems.platforms: Make selection more flexible
We dont have to match on exact strings if we get accessed to `parsed`.

Co-authored-by: Matthew Bauer <mjbauer95@gmail.com>
2020-11-29 00:03:45 +00:00
Ben Siraphob
77e00150ba Initial implementation of remarkable1 cross-compile 2020-11-23 21:18:54 +07:00
Samuel Dionne-Riel
837fe2e491 platforms.nix: Remove now unused kernelMajor
The last use of `kernelMajor` in Nixpkgs was removed in 2018.

Even then, I'm not positive it was actually in an exercised code path.

AFAIUI this is now totally redundant and useless as it really was meant
for the 2.4 -> 2.6 transition.
2020-11-22 22:08:18 -05:00
volth
35d68ef143 treewide: remove redundant quotes 2019-08-26 21:40:19 +00:00
Ken Micklas
ec7643047c androidndk-pkgs: Remove -mfloat flag 2019-04-16 16:21:51 -04:00
Matthew Bauer
ac491d2df7 systems: remove android armv5te platform
this isn’t useful any more because the ndk we use no longer supports it.
2019-04-10 01:55:09 -04:00
Daniel Goertzen
1c10efc912 add generic x86_32 support (#52634)
* add generic x86_32 support

- Add support for i386-i586.
- Add `isx86_32` predicate that can replace most uses of `isi686`.
- `isi686` is reinterpreted to mean "exactly i686 arch, and not say i585 or i386".
- This branch was used to build working i586 kernel running on i586 hardware.

* revert `isi[345]86`, remove dead code

- Remove changes to dead code in `doubles.nix` and `for-meta.nix`.
- Remove `isi[345]86` predicates since other cpu families don't have specific model predicates.

* remove i386-linux since linux not supported on that cpu
2019-01-06 12:57:36 -06:00
John Ericson
aa964c82d3 lib.systems.platforms: Add more ARM autodetection 2018-10-31 19:04:06 -04:00
CrystalGamma
72d161f548 [RFC] ppc64le enablement (#45340)
* ppc64le enablement

* gcc, glibc: properly handle __float128

* lib/systems, stdenv: syntax cleanup

* gcc7: remove ugly hack

* gcc: add/update __float128 flags

* stdenv: add another pair of quotes for consistency

* gcc: move __float128 flag for ppc64le-glibc into common/platform-flags.nix
2018-08-21 15:31:34 -04:00
Ben Wolsieffer
7cb01d58b2 platforms/raspberrypi: enable kernelAutoModules 2018-06-12 20:44:23 +03:00
Tuomas Tynkkynen
27bb4da344 platforms.nix: More rpi2 cleanup 2018-05-31 18:06:09 +03:00
Tuomas Tynkkynen
3abdd4f1e3 platforms.nix: Clean up obsolete cruft from raspberrypi2 2018-05-31 18:06:09 +03:00
Tuomas Tynkkynen
db2988f7bd platforms.nix: Clean up obsolete cruft from raspberrypi
Works fine without, and the 'DRM n' is actually preventing the mainline
VC4 driver from building.
2018-05-31 18:06:09 +03:00
Tuomas Tynkkynen
96edbe4a0e linux_rpi: Specify defconfig in kernel expression
In particular, now the mainline kernel can be built on the RPi 1 as well
(so kernelBaseConfig should always be a mainline defconfig from now on).
And RPi 2 users can now use linux_rpi without doing the
`nixpkgs.config.platform = lib.systems.platforms.raspberrypi2;` dance.
2018-05-31 18:06:09 +03:00
John Ericson
f2004e6287 lib: Fix float handling for Aarch32
Forgot to adjust default so abi with explicit float attr would be used.
2018-05-12 15:18:31 -04:00
John Ericson
e3f6c6d18d lib: Add 32-bit Android platforms 2018-05-11 18:41:55 -04:00
John Ericson
341794a4b9 lib/systems: Sort platforms, and space CPUs 2018-05-11 15:02:18 -04:00
John Ericson
1fe81a4bcd lib: Clean up float/fpu options
ARM ABIs now have a float field. This is used as a fallback to lessen
our use of `platform.gcc.float`. I didn't know what the MIPs convention
is so I kept using `platform.gcc.float` in that case.
2018-05-10 18:02:00 -04:00
Daniel Barlow
9c50ae6898 lib, treewide: Add missing MIPS arches, and fix existing usage
Existing "mips64el" should be "mipsel".

This is just the barest minimum so that nixpkgs can recognize them as
systems - although required for building individual derivations onto
MIPS boards, it is not sufficient if you want to actually build nixos on
those targets
2018-02-23 20:43:42 -05:00
Shea Levy
32d3533b29
riscv: Compile console support into the kernel. 2018-02-19 22:43:18 -05:00
Shea Levy
6173f2f945
linux_riscv: Add 4.16-rc1.
Fixes #35148.
2018-02-19 12:14:22 -05:00
Shea Levy
e288febee0
Add riscv{32,64} crossSystems. 2018-02-18 00:09:25 -05:00
Tuomas Tynkkynen
e4bfe5aac9 treewide: Drop kernelHeadersBaseConfig
Nothing actually needs this.
2018-02-14 01:47:28 +02:00