Compare commits
3 Commits
Author | SHA1 | Date |
---|---|---|
Daniel Barlow | 4ae1edbce7 | |
Daniel Barlow | 1a5efff3ae | |
Daniel Barlow | 8772e64b94 |
|
@ -81,7 +81,6 @@
|
||||||
PCIE_MEDIATEK = "y";
|
PCIE_MEDIATEK = "y";
|
||||||
|
|
||||||
BLOCK = "y"; # move this to base option
|
BLOCK = "y"; # move this to base option
|
||||||
NETDEVICES = "y"; # and this probably also
|
|
||||||
|
|
||||||
SPI_MASTER = "y";
|
SPI_MASTER = "y";
|
||||||
SPI = "y";
|
SPI = "y";
|
||||||
|
|
|
@ -175,7 +175,6 @@
|
||||||
CONSOLE_LOGLEVEL_QUIET = "4";
|
CONSOLE_LOGLEVEL_QUIET = "4";
|
||||||
|
|
||||||
NET = "y";
|
NET = "y";
|
||||||
NETDEVICES = "y";
|
|
||||||
ETHERNET = "y";
|
ETHERNET = "y";
|
||||||
NET_VENDOR_ATHEROS = "y";
|
NET_VENDOR_ATHEROS = "y";
|
||||||
AG71XX = "y"; # ethernet (qca,qca9530-eth)
|
AG71XX = "y"; # ethernet (qca,qca9530-eth)
|
||||||
|
|
|
@ -159,7 +159,6 @@
|
||||||
CONSOLE_LOGLEVEL_QUIET = "4";
|
CONSOLE_LOGLEVEL_QUIET = "4";
|
||||||
|
|
||||||
NET = "y";
|
NET = "y";
|
||||||
NETDEVICES = "y";
|
|
||||||
ETHERNET = "y";
|
ETHERNET = "y";
|
||||||
NET_VENDOR_RALINK = "y";
|
NET_VENDOR_RALINK = "y";
|
||||||
NET_RALINK_MDIO = "y";
|
NET_RALINK_MDIO = "y";
|
||||||
|
|
|
@ -143,7 +143,6 @@
|
||||||
REGULATOR_FIXED_VOLTAGE = "y";
|
REGULATOR_FIXED_VOLTAGE = "y";
|
||||||
|
|
||||||
NET = "y";
|
NET = "y";
|
||||||
NETDEVICES = "y";
|
|
||||||
ETHERNET = "y";
|
ETHERNET = "y";
|
||||||
|
|
||||||
PHYLIB = "y";
|
PHYLIB = "y";
|
||||||
|
|
|
@ -34,7 +34,6 @@
|
||||||
VIRTIO_PCI = "y";
|
VIRTIO_PCI = "y";
|
||||||
BLOCK = "y";
|
BLOCK = "y";
|
||||||
VIRTIO_BLK = "y";
|
VIRTIO_BLK = "y";
|
||||||
NETDEVICES = "y";
|
|
||||||
VIRTIO_NET = "y";
|
VIRTIO_NET = "y";
|
||||||
|
|
||||||
SERIAL_EARLYCON_ARM_SEMIHOST = "y"; # earlycon=smh
|
SERIAL_EARLYCON_ARM_SEMIHOST = "y"; # earlycon=smh
|
||||||
|
|
|
@ -60,7 +60,6 @@
|
||||||
VIRTIO_PCI = "y";
|
VIRTIO_PCI = "y";
|
||||||
BLOCK = "y";
|
BLOCK = "y";
|
||||||
VIRTIO_BLK = "y";
|
VIRTIO_BLK = "y";
|
||||||
NETDEVICES = "y";
|
|
||||||
VIRTIO_NET = "y";
|
VIRTIO_NET = "y";
|
||||||
|
|
||||||
SERIAL_8250= "y";
|
SERIAL_8250= "y";
|
||||||
|
|
|
@ -0,0 +1,111 @@
|
||||||
|
{
|
||||||
|
description = ''
|
||||||
|
Turris Omnia
|
||||||
|
************
|
||||||
|
'';
|
||||||
|
|
||||||
|
system = {
|
||||||
|
crossSystem = {
|
||||||
|
config = "armv7l-unknown-linux-musleabihf";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
module = {pkgs, config, lib, ... }:
|
||||||
|
let openwrt = pkgs.openwrt; in {
|
||||||
|
imports = [ ../../modules/arch/arm.nix ];
|
||||||
|
kernel = {
|
||||||
|
src = pkgs.pkgsBuildBuild.fetchurl {
|
||||||
|
name = "linux.tar.gz";
|
||||||
|
url = "https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.15.71.tar.gz";
|
||||||
|
hash = "sha256-yhO2cXIeIgUxkSZf/4aAsF11uxyh+UUZu6D1h92vCD8=";
|
||||||
|
};
|
||||||
|
extraPatchPhase = ''
|
||||||
|
${pkgs.openwrt.applyPatches.mvebu}
|
||||||
|
'';
|
||||||
|
config = {
|
||||||
|
PCI = "y";
|
||||||
|
OF = "y";
|
||||||
|
MEMORY = "y"; # for MVEBU_DEVBUS
|
||||||
|
DMADEVICES = "y"; # for MV_XOR
|
||||||
|
CPU_V7 = "y";
|
||||||
|
ARCH_MULTIPLATFORM = "y";
|
||||||
|
ARCH_MVEBU = "y";
|
||||||
|
ARCH_MULTI_V7= "y";
|
||||||
|
PCI_MVEBU = "y";
|
||||||
|
AHCI_MVEBU = "y";
|
||||||
|
MACH_ARMADA_38X = "y";
|
||||||
|
SMP = "y";
|
||||||
|
NR_CPUS = "4";
|
||||||
|
VFP = "y";
|
||||||
|
NEON= "y";
|
||||||
|
|
||||||
|
# WARNING: unmet direct dependencies detected for ARCH_WANT_LIBATA_LEDS
|
||||||
|
ATA = "y";
|
||||||
|
|
||||||
|
# switch is DSA
|
||||||
|
# CONFIG_NET_DSA_MV88E6060=y
|
||||||
|
# CONFIG_NET_DSA_MV88E6XXX=y
|
||||||
|
# CONFIG_NET_DSA_MV88E6XXX_GLOBAL2=y
|
||||||
|
|
||||||
|
# CONFIG_REGMAP=y
|
||||||
|
# CONFIG_REGMAP_I2C=y
|
||||||
|
# CONFIG_REGMAP_SPI=y
|
||||||
|
# CONFIG_REGMAP_MMIO=y
|
||||||
|
|
||||||
|
PSTORE = "y";
|
||||||
|
PSTORE_RAM = "y";
|
||||||
|
PSTORE_CONSOLE = "y";
|
||||||
|
PSTORE_DEFLATE_COMPRESS = "n";
|
||||||
|
|
||||||
|
SERIAL_8250 = "y";
|
||||||
|
SERIAL_8250_CONSOLE = "y";
|
||||||
|
SERIAL_OF_PLATFORM="y";
|
||||||
|
SERIAL_MVEBU_UART = "y";
|
||||||
|
SERIAL_MVEBU_CONSOLE = "y";
|
||||||
|
|
||||||
|
SERIAL_8250_DMA= "y";
|
||||||
|
SERIAL_8250_DW= "y";
|
||||||
|
SERIAL_8250_EXTENDED= "y";
|
||||||
|
SERIAL_8250_MANY_PORTS= "y";
|
||||||
|
SERIAL_8250_SHARE_IRQ= "y";
|
||||||
|
OF_ADDRESS= "y";
|
||||||
|
OF_MDIO= "y";
|
||||||
|
|
||||||
|
MVEBU_DEVBUS= "y"; # "Device Bus controller ... flash devices such as NOR, NAND, SRAM, and FPGA"
|
||||||
|
MVMDIO= "y";
|
||||||
|
MVNETA= "y";
|
||||||
|
MVNETA_BM= "y";
|
||||||
|
MVNETA_BM_ENABLE= "y";
|
||||||
|
MVPP2= "y";
|
||||||
|
MV_XOR= "y";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
boot = {
|
||||||
|
commandLine = [ "console=ttyS0,115200" ];
|
||||||
|
imageFormat = "fit";
|
||||||
|
};
|
||||||
|
|
||||||
|
hardware = {
|
||||||
|
defaultOutput = "flashimage";
|
||||||
|
loadAddress = "0x00008000";
|
||||||
|
entryPoint = "0x00008000";
|
||||||
|
rootDevice = "/dev/mtdblock0";
|
||||||
|
dts = {
|
||||||
|
src = "${config.system.outputs.kernel.modulesupport}/arch/arm/boot/dts/armada-385-turris-omnia.dts";
|
||||||
|
includes = [
|
||||||
|
# "${openwrt.src}/target/linux/mediatek/dts"
|
||||||
|
"${config.system.outputs.kernel.modulesupport}/arch/arm/boot/dts/"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
networkInterfaces =
|
||||||
|
let
|
||||||
|
inherit (config.system.service.network) link;
|
||||||
|
inherit (config.system.service) bridge;
|
||||||
|
in rec {
|
||||||
|
lan = link.build { ifname = "eth0"; };
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
|
@ -64,6 +64,8 @@ in {
|
||||||
PACKET = "y"; # for ppp, tcpdump ...
|
PACKET = "y"; # for ppp, tcpdump ...
|
||||||
SYSVIPC= "y";
|
SYSVIPC= "y";
|
||||||
|
|
||||||
|
NETDEVICES = "y"; # even PPP needs this
|
||||||
|
|
||||||
# disabling this option causes the kernel to use an "empty"
|
# disabling this option causes the kernel to use an "empty"
|
||||||
# initramfs instead: it has a /dev/console node and not much
|
# initramfs instead: it has a /dev/console node and not much
|
||||||
# else. Note that pid 1 is started *before* the root
|
# else. Note that pid 1 is started *before* the root
|
||||||
|
|
|
@ -77,7 +77,7 @@ stdenv.mkDerivation rec {
|
||||||
export KBUILD_OUTPUT=`pwd`
|
export KBUILD_OUTPUT=`pwd`
|
||||||
cp ${kconfigFile} .config
|
cp ${kconfigFile} .config
|
||||||
cp ${kconfigFile} .config.orig
|
cp ${kconfigFile} .config.orig
|
||||||
make V=1 olddefconfig
|
make olddefconfig
|
||||||
'';
|
'';
|
||||||
|
|
||||||
checkConfigurationPhase = ''
|
checkConfigurationPhase = ''
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/dts-v1/;
|
/dts-v1/;
|
||||||
|
|
||||||
// used on aarch64 to provide a U-bootable image that combines
|
// used on arm/aarch64 to provide a U-bootable image that combines
|
||||||
// kernel and fdt
|
// kernel and fdt
|
||||||
|
|
||||||
/ {
|
/ {
|
||||||
|
@ -12,7 +12,7 @@
|
||||||
description = "Vanilla Linux kernel";
|
description = "Vanilla Linux kernel";
|
||||||
// data = /incbin/("./vmlinux.bin.gz");
|
// data = /incbin/("./vmlinux.bin.gz");
|
||||||
type = "kernel";
|
type = "kernel";
|
||||||
arch = "arm64";
|
// arch = "arm64";
|
||||||
os = "linux";
|
os = "linux";
|
||||||
// compression = "gzip";
|
// compression = "gzip";
|
||||||
// load = <00000000>;
|
// load = <00000000>;
|
||||||
|
@ -28,7 +28,7 @@
|
||||||
description = "Flattened Device Tree blob";
|
description = "Flattened Device Tree blob";
|
||||||
// data = /incbin/("./target.dtb");
|
// data = /incbin/("./target.dtb");
|
||||||
type = "flat_dt";
|
type = "flat_dt";
|
||||||
arch = "arm64";
|
// arch = "arm64";
|
||||||
compression = "none";
|
compression = "none";
|
||||||
hash-1 {
|
hash-1 {
|
||||||
algo = "crc32";
|
algo = "crc32";
|
||||||
|
|
|
@ -59,9 +59,13 @@ in {
|
||||||
data = /incbin/("./vmlinux.bin.lzma");
|
data = /incbin/("./vmlinux.bin.lzma");
|
||||||
load = <${loadAddress}>;
|
load = <${loadAddress}>;
|
||||||
entry = <${entryPoint}>;
|
entry = <${entryPoint}>;
|
||||||
|
arch = "${arch}";
|
||||||
compression = "lzma";
|
compression = "lzma";
|
||||||
};
|
};
|
||||||
fdt-1 { data = /incbin/("./tmp.dtb"); };
|
fdt-1 {
|
||||||
|
data = /incbin/("./tmp.dtb");
|
||||||
|
arch = "${arch}";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
_VARS
|
_VARS
|
||||||
|
|
|
@ -34,4 +34,5 @@ in {
|
||||||
applyPatches.ath79 = doPatch "ath79";
|
applyPatches.ath79 = doPatch "ath79";
|
||||||
applyPatches.ramips = doPatch "ramips";
|
applyPatches.ramips = doPatch "ramips";
|
||||||
applyPatches.mediatek = doPatch "mediatek"; # aarch64
|
applyPatches.mediatek = doPatch "mediatek"; # aarch64
|
||||||
|
applyPatches.mvebu = doPatch "mvebu"; # arm
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue