forked from dan/liminix
follow openwrt more closely
This commit is contained in:
parent
833d05dc58
commit
84c07f30c9
@ -43,12 +43,23 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
module = {pkgs, config, lib, lim, ... }:
|
module = {pkgs, config, lib, lim, ... }:
|
||||||
let firmware = pkgs.stdenv.mkDerivation {
|
let
|
||||||
|
mediatek-firmware = pkgs.stdenv.mkDerivation {
|
||||||
name = "wlan-firmware";
|
name = "wlan-firmware";
|
||||||
phases = ["installPhase"];
|
phases = ["installPhase"];
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
mkdir $out
|
mkdir $out
|
||||||
cp ${pkgs.linux-firmware}/lib/firmware/mediatek/{mt7915,mt7615,mt7986_eeprom_mt7976,mt7981}* $out
|
|
||||||
|
cp ${pkgs.openwrt.linux-firmware}/lib/firmware/mediatek/{mt7915,mt7615,mt7986_eeprom_mt7976,mt7981}* $out
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
airoha-firmware = pkgs.stdenv.mkDerivation {
|
||||||
|
name = "airoha-firmware";
|
||||||
|
phases = ["installPhase"];
|
||||||
|
installPhase = ''
|
||||||
|
mkdir $out
|
||||||
|
|
||||||
|
cp ${pkgs.openwrt.linux-firmware}/lib/firmware/airoha/* $out
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
in {
|
in {
|
||||||
@ -126,6 +137,8 @@
|
|||||||
BUILTIN_RETURN_ADDRESS_STRIPS_PAC="y";
|
BUILTIN_RETURN_ADDRESS_STRIPS_PAC="y";
|
||||||
CC_HAVE_SHADOW_CALL_STACK="y";
|
CC_HAVE_SHADOW_CALL_STACK="y";
|
||||||
CC_HAVE_STACKPROTECTOR_SYSREG="y";
|
CC_HAVE_STACKPROTECTOR_SYSREG="y";
|
||||||
|
#CC_IMPLICIT_FALLTHROUGH="-Wimplicit-fallthrough=5";
|
||||||
|
CC_NO_ARRAY_BOUNDS="y";
|
||||||
CLKSRC_MMIO="y";
|
CLKSRC_MMIO="y";
|
||||||
CLONE_BACKWARDS="y";
|
CLONE_BACKWARDS="y";
|
||||||
CMDLINE_OVERRIDE="y";
|
CMDLINE_OVERRIDE="y";
|
||||||
@ -223,6 +236,7 @@
|
|||||||
FWNODE_MDIO="y";
|
FWNODE_MDIO="y";
|
||||||
FW_LOADER_PAGED_BUF="y";
|
FW_LOADER_PAGED_BUF="y";
|
||||||
#FW_LOADER_SYSFS="y";
|
#FW_LOADER_SYSFS="y";
|
||||||
|
#GCC11_NO_ARRAY_BOUNDS="y";
|
||||||
#GCC_ASM_GOTO_OUTPUT_WORKAROUND="y";
|
#GCC_ASM_GOTO_OUTPUT_WORKAROUND="y";
|
||||||
GCC_SUPPORTS_DYNAMIC_FTRACE_WITH_ARGS="y";
|
GCC_SUPPORTS_DYNAMIC_FTRACE_WITH_ARGS="y";
|
||||||
GENERIC_ALLOCATOR="y";
|
GENERIC_ALLOCATOR="y";
|
||||||
@ -272,7 +286,7 @@
|
|||||||
I2C_MT65XX="y";
|
I2C_MT65XX="y";
|
||||||
ICPLUS_PHY="y";
|
ICPLUS_PHY="y";
|
||||||
ILLEGAL_POINTER_VALUE="0xdead000000000000";
|
ILLEGAL_POINTER_VALUE="0xdead000000000000";
|
||||||
#INITRAMFS_SOURCE="\"\"";
|
#INITRAMFS_SOURCE="""";
|
||||||
IRQCHIP="y";
|
IRQCHIP="y";
|
||||||
IRQ_DOMAIN="y";
|
IRQ_DOMAIN="y";
|
||||||
IRQ_DOMAIN_HIERARCHY="y";
|
IRQ_DOMAIN_HIERARCHY="y";
|
||||||
@ -283,7 +297,6 @@
|
|||||||
JUMP_LABEL="y";
|
JUMP_LABEL="y";
|
||||||
LEDS_PWM="y";
|
LEDS_PWM="y";
|
||||||
LEDS_SMARTRG_LED="y";
|
LEDS_SMARTRG_LED="y";
|
||||||
LEDS_TRIGGER_PATTERN="y";
|
|
||||||
LIBFDT="y";
|
LIBFDT="y";
|
||||||
LOCK_DEBUGGING_SUPPORT="y";
|
LOCK_DEBUGGING_SUPPORT="y";
|
||||||
LOCK_SPIN_ON_OWNER="y";
|
LOCK_SPIN_ON_OWNER="y";
|
||||||
@ -326,7 +339,6 @@
|
|||||||
MTD_UBI_FASTMAP="y";
|
MTD_UBI_FASTMAP="y";
|
||||||
MTD_UBI_NVMEM="y";
|
MTD_UBI_NVMEM="y";
|
||||||
MTD_UBI_WL_THRESHOLD="4096";
|
MTD_UBI_WL_THRESHOLD="4096";
|
||||||
MTD_VIRT_CONCAT="y";
|
|
||||||
MTK_CPUX_TIMER="y";
|
MTK_CPUX_TIMER="y";
|
||||||
MTK_HSDMA="y";
|
MTK_HSDMA="y";
|
||||||
MTK_INFRACFG="y";
|
MTK_INFRACFG="y";
|
||||||
@ -459,7 +471,6 @@
|
|||||||
RTC_CLASS="y";
|
RTC_CLASS="y";
|
||||||
RTC_DRV_MT7622="y";
|
RTC_DRV_MT7622="y";
|
||||||
RTC_I2C_AND_SPI="y";
|
RTC_I2C_AND_SPI="y";
|
||||||
#RTL8261N_PHY="y";
|
|
||||||
RWSEM_SPIN_ON_OWNER="y";
|
RWSEM_SPIN_ON_OWNER="y";
|
||||||
SCHED_MC="y";
|
SCHED_MC="y";
|
||||||
SCSI="y";
|
SCSI="y";
|
||||||
@ -569,7 +580,8 @@
|
|||||||
dir {
|
dir {
|
||||||
lib = dir {
|
lib = dir {
|
||||||
firmware = dir {
|
firmware = dir {
|
||||||
mediatek = symlink firmware;
|
mediatek = symlink mediatek-firmware;
|
||||||
|
airoha = symlink airoha-firmware;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@ -653,20 +665,12 @@
|
|||||||
eth0 = link.build { ifname = "eth0"; };
|
eth0 = link.build { ifname = "eth0"; };
|
||||||
eth1 = link.build { ifname = "eth1"; };
|
eth1 = link.build { ifname = "eth1"; };
|
||||||
|
|
||||||
phy0-ap0 = link.build {
|
wlan0 = link.build {
|
||||||
ifname = "phy0-ap0";
|
ifname = "wlan0";
|
||||||
dependencies = [ mac80211 ];
|
dependencies = [ mac80211 ];
|
||||||
};
|
};
|
||||||
phy0-ap1 = link.build {
|
wlan1 = link.build {
|
||||||
ifname = "phy0-ap1";
|
ifname = "wlan1";
|
||||||
dependencies = [ mac80211 ];
|
|
||||||
};
|
|
||||||
phy1-ap0 = link.build {
|
|
||||||
ifname = "phy1-ap0";
|
|
||||||
dependencies = [ mac80211 ];
|
|
||||||
};
|
|
||||||
phy1-ap1 = link.build {
|
|
||||||
ifname = "phy1-ap1";
|
|
||||||
dependencies = [ mac80211 ];
|
dependencies = [ mac80211 ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ fetchFromGitHub, pkgsBuildBuild }:
|
{ fetchFromGitHub, pkgsBuildBuild, linux-firmware, fetchzip }:
|
||||||
let
|
let
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
name = "openwrt-source";
|
name = "openwrt-source";
|
||||||
@ -43,6 +43,14 @@ in {
|
|||||||
};
|
};
|
||||||
kernelVersion = "6.6.57";
|
kernelVersion = "6.6.57";
|
||||||
|
|
||||||
|
# From package/firmware/linux-firmware/Makefile
|
||||||
|
linux-firmware = linux-firmware.overrideAttrs(a: {
|
||||||
|
src = fetchzip {
|
||||||
|
url = "https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/snapshot/linux-firmware-20241017.tar.gz";
|
||||||
|
hash = "sha256-q4StJdoLCHQThFTzhxETDYlQP/ywmb3vwCr13xtrQzc=";
|
||||||
|
};
|
||||||
|
});
|
||||||
|
|
||||||
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
|
||||||
|
Loading…
Reference in New Issue
Block a user