diff options
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/default.nix | 32 | ||||
-rw-r--r-- | pkgs/u-boot-add-openwrt-one.patch | 21 |
2 files changed, 43 insertions, 10 deletions
diff --git a/pkgs/default.nix b/pkgs/default.nix index 10bb325..f80464b 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -40,14 +40,30 @@ final: prev: { (final.buildUBoot { defconfig = "mt7981_openwrt-one-spi-nand_defconfig"; extraMeta.platforms = ["aarch64-linux"]; - BL31 = "${final.armTrustedFirmwareMT7981}/bl31.elf"; - filesToInstall = ["u-boot.bin"]; + filesToInstall = ["u-boot.fip" ".config"]; extraPatches = [./u-boot-add-openwrt-one.patch]; extraConfig = '' - CONFIG_FS_BTRFS=y - CONFIG_CMD_BTRFS=y + CONFIG_CMD_BOOTMENU=n + CONFIG_AUTOBOOT_MENU_SHOW=n + CONFIG_BOOTDELAY=3 + + CONFIG_PCI=y + CONFIG_PCIE_MEDIATEK_GEN3=y + CONFIG_PCI_DEBUG=y + CONFIG_DM_DEBUG=y + CONFIG_NVME=y + CONFIG_NVME_PCI=y + CONFIG_CMD_NVME=y + #CONFIG_FS_BTRFS=y + #CONFIG_CMD_BTRFS=y CONFIG_BOARD_LATE_INIT=n ''; + postBuild = '' + ${final.buildPackages.armTrustedFirmwareTools}/bin/fiptool create \ + --soc-fw '${final.armTrustedFirmwareMT7981}/bl31.bin' \ + --nt-fw ./u-boot.bin \ + u-boot.fip + ''; }).overrideAttrs (oldAttrs: { nativeBuildInputs = [final.buildPackages.unixtools.xxd] ++ oldAttrs.nativeBuildInputs; }); @@ -78,15 +94,13 @@ final: prev: { if prev.hostPlatform.is32bit then # Downgrade to get 32bit support working - prev.gvproxy.overrideAttrs { + prev.gvproxy.overrideAttrs (oldAttrs: { version = "0.8.6"; - src = prev.buildPackages.fetchFromGitHub { - owner = "containers"; - repo = "gvisor-tap-vsock"; + src = oldAttrs.src.override { rev = "v0.8.6"; hash = "sha256-a/Gd1QUxZ+47sQtndbehx86UjC1DezhqwS5d5VTIjRc="; }; - } + }) else prev.gvproxy; # Older version of packages diff --git a/pkgs/u-boot-add-openwrt-one.patch b/pkgs/u-boot-add-openwrt-one.patch index 722f1ee..a154b6c 100644 --- a/pkgs/u-boot-add-openwrt-one.patch +++ b/pkgs/u-boot-add-openwrt-one.patch @@ -1,6 +1,9 @@ +diff --git a/arch/arm/dts/openwrt-one.dts b/arch/arm/dts/openwrt-one.dts +new file mode 100644 +index 00000000000..5828310fb2d --- /dev/null +++ b/arch/arm/dts/openwrt-one.dts -@@ -0,0 +1,203 @@ +@@ -0,0 +1,207 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (c) 2024 John Crispin <john@phrozen.org> @@ -66,6 +69,10 @@ + status = "okay"; +}; + ++&pcie { ++ status = "okay"; ++}; ++ +ð { + status = "okay"; + mediatek,gmac-id = <1>; @@ -204,6 +211,9 @@ +&watchdog { + status = "disabled"; +}; +diff --git a/configs/mt7981_openwrt-one-nor_defconfig b/configs/mt7981_openwrt-one-nor_defconfig +new file mode 100644 +index 00000000000..c83d6f2a516 --- /dev/null +++ b/configs/mt7981_openwrt-one-nor_defconfig @@ -0,0 +1,125 @@ @@ -332,6 +342,9 @@ +CONFIG_USB_STORAGE=y +CONFIG_UBIFS_SILENCE_MSG=y +CONFIG_HEXDUMP=y +diff --git a/configs/mt7981_openwrt-one-spi-nand_defconfig b/configs/mt7981_openwrt-one-spi-nand_defconfig +new file mode 100644 +index 00000000000..ccca0a0c9dc --- /dev/null +++ b/configs/mt7981_openwrt-one-spi-nand_defconfig @@ -0,0 +1,126 @@ @@ -461,6 +474,9 @@ +CONFIG_USB_XHCI_MTK=y +CONFIG_USB_STORAGE=y +CONFIG_HEXDUMP=y +diff --git a/defenvs/openwrt-one-nor_env b/defenvs/openwrt-one-nor_env +new file mode 100644 +index 00000000000..f3ffa599f5d --- /dev/null +++ b/defenvs/openwrt-one-nor_env @@ -0,0 +1,48 @@ @@ -512,6 +528,9 @@ +_init_env=setenv _init_env ; echo Initialize Env ; run ubi_create_env ; saveenv +_switch_to_menu=setenv _switch_to_menu ; setenv bootdelay 3 ; setenv bootmenu_delay 3 ; setenv bootmenu_0 $bootmenu_0d ; setenv bootmenu_0d ; run _bootmenu_update_title +_bootmenu_update_title=setenv _bootmenu_update_title ; setenv bootmenu_title "$bootmenu_title [33m$ver[0m" +diff --git a/defenvs/openwrt-one-spi-nand_env b/defenvs/openwrt-one-spi-nand_env +new file mode 100644 +index 00000000000..8d59dd3dd6d --- /dev/null +++ b/defenvs/openwrt-one-spi-nand_env @@ -0,0 +1,62 @@ |