mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-06-05 21:03:40 +00:00
lib/systems: unify ARMv5 platforms with stock kernel configuration
The `sheevaplug` kernel configuration was added a very long time ago and has not been adjusted for years. `pogoplug4` was identical to `sheevaplug` except for an even more stripped‐down kernel configuration, no device tree support, and a different load address for the uImage. These days, the stock kernel configuration builds and there has been an upstream device tree for the Pogoplug Series 4 for years; unify `sheevaplug` and `pogoplug4` into an `armv5tel-multiplatform` that uses the standard configuration. ARMv5 was also the only platform that defaulted to uImage, the [legacy U‐Boot image format] that is deprecated upstream. Our bootloader machinery in NixOS does not handle these images in any special way and even the original ARMv6 Raspberry Pi platform defaults to the standard zImage. We switch `armv5tel-multiplatform` to zImage to match. [legacy U‐Boot image format]: https://docs.u-boot.org/en/latest/usage/cmd/bootm.html#legacy-boot It is of course natural to worry about backwards compatibility here: this switches to a different kernel image format and drops support for root on NFS along with random oddities like KGDB and LatencyTOP. Renaming the platform is intended to help mitigate this risk. The reality, however, is that it is currently very difficult to build a configuration for ARMv5. I found <https://github.com/thefloweringash/sheevaplug-nix> online as an example configuration from many years ago; it already set `autoModules`, and builds U‐Boot using `CONFIG_DISTRO_DEFAULTS`, which should work out of the box without requiring the legacy U‐Boot image format. Even then, however, I confirmed with the author that it hasn’t been used in years, and I could barely get it to build with a modern Nixpkgs: OpenSSH is broken, Nix is broken, multiple default `environment.systemPackages` in the SD image profile are broken, `boot.initrd.includeDefaultModules` is broken, and `hardware.enableAllHardware` is broken. I conclude that if anyone is actively building systems on ARMv5, they have a forked Nixpkgs or a very custom setup. Given our general move to standard boot chains and no platform‐specific hacks, and the decaying state of our unofficial support for 32‐bit ARM, I think it is not worth maintaining support for the legacy image format for this one ancient platform. If anyone is running a heavily stripped‐down NixOS configuration on mission‐critical SheevaPlugs using a custom Nix‐free deployment setup relying on the legacy U‐Boot image format and somehow none of these kernel changes manage to loudly break their build, hopefully they’ll at least notice the release notes entry! Otherwise there’s always JTAG…
This commit is contained in:
@@ -40,10 +40,9 @@ rec {
|
||||
rust.rustcTarget = "powerpc-unknown-linux-gnu";
|
||||
};
|
||||
|
||||
sheevaplug = {
|
||||
armv5tel-multiplatform = {
|
||||
config = "armv5tel-unknown-linux-gnueabi";
|
||||
}
|
||||
// platforms.sheevaplug;
|
||||
};
|
||||
|
||||
raspberryPi = {
|
||||
config = "armv6l-unknown-linux-gnueabihf";
|
||||
@@ -99,11 +98,6 @@ rec {
|
||||
useLLVM = true;
|
||||
};
|
||||
|
||||
pogoplug4 = {
|
||||
config = "armv5tel-unknown-linux-gnueabi";
|
||||
}
|
||||
// platforms.pogoplug4;
|
||||
|
||||
ben-nanonote = {
|
||||
config = "mipsel-unknown-linux-uclibc";
|
||||
}
|
||||
|
||||
@@ -46,138 +46,15 @@ rec {
|
||||
## ARM
|
||||
##
|
||||
|
||||
pogoplug4 = {
|
||||
armv5tel-multiplatform = {
|
||||
linux-kernel = {
|
||||
name = "pogoplug4";
|
||||
name = "armv5tel-multiplatform";
|
||||
|
||||
baseConfig = "multi_v5_defconfig";
|
||||
autoModules = false;
|
||||
extraConfig = ''
|
||||
# Ubi for the mtd
|
||||
MTD_UBI y
|
||||
UBIFS_FS y
|
||||
UBIFS_FS_XATTR y
|
||||
UBIFS_FS_ADVANCED_COMPR y
|
||||
UBIFS_FS_LZO y
|
||||
UBIFS_FS_ZLIB y
|
||||
UBIFS_FS_DEBUG n
|
||||
'';
|
||||
makeFlags = [ "LOADADDR=0x8000" ];
|
||||
target = "uImage";
|
||||
# TODO reenable once manual-config's config actually builds a .dtb and this is checked to be working
|
||||
#DTB = true;
|
||||
};
|
||||
gcc = {
|
||||
arch = "armv5te";
|
||||
};
|
||||
};
|
||||
|
||||
sheevaplug = {
|
||||
linux-kernel = {
|
||||
name = "sheevaplug";
|
||||
|
||||
baseConfig = "multi_v5_defconfig";
|
||||
autoModules = false;
|
||||
extraConfig = ''
|
||||
BLK_DEV_RAM y
|
||||
BLK_DEV_INITRD y
|
||||
BLK_DEV_CRYPTOLOOP m
|
||||
BLK_DEV_DM m
|
||||
DM_CRYPT m
|
||||
MD y
|
||||
BTRFS_FS m
|
||||
XFS_FS m
|
||||
JFS_FS m
|
||||
EXT4_FS m
|
||||
USB_STORAGE_CYPRESS_ATACB m
|
||||
|
||||
# mv cesa requires this sw fallback, for mv-sha1
|
||||
CRYPTO_SHA1 y
|
||||
# Fast crypto
|
||||
CRYPTO_TWOFISH y
|
||||
CRYPTO_TWOFISH_COMMON y
|
||||
CRYPTO_BLOWFISH y
|
||||
CRYPTO_BLOWFISH_COMMON y
|
||||
|
||||
IP_PNP y
|
||||
IP_PNP_DHCP y
|
||||
NFS_FS y
|
||||
ROOT_NFS y
|
||||
TUN m
|
||||
NFS_V4 y
|
||||
NFS_V4_1 y
|
||||
NFS_FSCACHE y
|
||||
NFSD m
|
||||
NFSD_V2_ACL y
|
||||
NFSD_V3 y
|
||||
NFSD_V3_ACL y
|
||||
NFSD_V4 y
|
||||
NETFILTER y
|
||||
IP_NF_IPTABLES y
|
||||
IP_NF_FILTER y
|
||||
IP_NF_MATCH_ADDRTYPE y
|
||||
IP_NF_TARGET_LOG y
|
||||
IP_NF_MANGLE y
|
||||
IPV6 m
|
||||
VLAN_8021Q m
|
||||
|
||||
CIFS y
|
||||
CIFS_XATTR y
|
||||
CIFS_POSIX y
|
||||
CIFS_FSCACHE y
|
||||
CIFS_ACL y
|
||||
|
||||
WATCHDOG y
|
||||
WATCHDOG_CORE y
|
||||
ORION_WATCHDOG m
|
||||
|
||||
ZRAM m
|
||||
NETCONSOLE m
|
||||
|
||||
# Disable OABI to have seccomp_filter (required for systemd)
|
||||
# https://github.com/raspberrypi/firmware/issues/651
|
||||
OABI_COMPAT n
|
||||
|
||||
# Fail to build
|
||||
DRM n
|
||||
SCSI_ADVANSYS n
|
||||
USB_ISP1362_HCD n
|
||||
SND_SOC n
|
||||
SND_ALI5451 n
|
||||
FB_SAVAGE n
|
||||
SCSI_NSP32 n
|
||||
ATA_SFF n
|
||||
SUNGEM n
|
||||
IRDA n
|
||||
ATM_HE n
|
||||
SCSI_ACARD n
|
||||
BLK_DEV_CMD640_ENHANCED n
|
||||
|
||||
FUSE_FS m
|
||||
|
||||
# systemd uses cgroups
|
||||
CGROUPS y
|
||||
|
||||
# Latencytop
|
||||
LATENCYTOP y
|
||||
|
||||
# Ubi for the mtd
|
||||
MTD_UBI y
|
||||
UBIFS_FS y
|
||||
UBIFS_FS_XATTR y
|
||||
UBIFS_FS_ADVANCED_COMPR y
|
||||
UBIFS_FS_LZO y
|
||||
UBIFS_FS_ZLIB y
|
||||
UBIFS_FS_DEBUG n
|
||||
|
||||
# Kdb, for kernel troubles
|
||||
KGDB y
|
||||
KGDB_SERIAL_CONSOLE y
|
||||
KGDB_KDB y
|
||||
'';
|
||||
makeFlags = [ "LOADADDR=0x0200000" ];
|
||||
target = "uImage";
|
||||
DTB = true; # Beyond 3.10
|
||||
DTB = true;
|
||||
autoModules = true;
|
||||
preferBuiltin = true;
|
||||
target = "zImage";
|
||||
};
|
||||
gcc = {
|
||||
arch = "armv5te";
|
||||
@@ -407,7 +284,7 @@ rec {
|
||||
if version == null then
|
||||
pc
|
||||
else if lib.versionOlder version "6" then
|
||||
sheevaplug
|
||||
armv5tel-multiplatform
|
||||
else if lib.versionOlder version "7" then
|
||||
raspberrypi
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user