diff options
Diffstat (limited to 'pkgs/default.nix')
| -rw-r--r-- | pkgs/default.nix | 110 |
1 files changed, 95 insertions, 15 deletions
diff --git a/pkgs/default.nix b/pkgs/default.nix index 82bd1a8..1b6f6f5 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -21,23 +21,76 @@ final: prev: { bigclown-leds = final.callPackage ./bigclown-leds {}; dodo = final.callPackage ./dodo {}; - astroid = prev.astroid.overrideAttrs (oldAttrs: { - version = "240629"; - src = final.fetchFromGitHub { - owner = "astroidmail"; - repo = "astroid"; - rev = "65acc24048a57039753cf2326dbfca6b608b91d1"; - hash = "sha256-PXFVOaCgBHNUg0aCJD1TL/ulzjz9v70/jW5ManUPcHw="; + elf-size-analyze = final.callPackage ./elf-size-analyze {}; + + # OpenWrt One + armTrustedFirmwareMT7981 = final.callPackage ./mtk-arm-trusted-firmware rec { + extraMakeFlags = [ + "BOOT_DEVICE=spim-nand" + "DRAM_USE_DDR4=1" + "UBI=1" + "OVERRIDE_UBI_START_ADDR=0x100000" + "bl2" + "bl31" + ]; + platform = "mt7981"; + extraMeta.platforms = ["aarch64-linux"]; + filesToInstall = ["build/${platform}/release/bl2.bin" "build/${platform}/release/bl31.bin"]; + }; + ubootOpenWrtOne = + # ubiupdatevol /dev/ubi0_2 u-boot.fip + (final.buildUBoot { + defconfig = "mt7981_openwrt-one-spi-nand_defconfig"; + extraMeta.platforms = ["aarch64-linux"]; + filesToInstall = ["u-boot.fip" ".config"]; + extraPatches = [./u-boot-add-openwrt-one.patch]; + extraConfig = '' + 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_REGULATOR=y + CONFIG_NVME=y + CONFIG_NVME_PCI=y + CONFIG_CMD_NVME=y + CONFIG_EFI_PARTITION=y + + CONFIG_CMD_SYSBOOT=y + CONFIG_SUPPORT_RAW_INITRD=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; + }); + linuxOpenWrtOne = final.buildLinux { + version = "6.18.0-rc1"; + src = final.buildPackages.fetchgit { + url = "git://git.kernel.org/pub/scm/linux/kernel/git/mediatek/linux.git"; + rev = "67ed5843a67b7ba63d79f2ba3fd21bee151d3138"; + hash = "sha256-jXBDVZOAk+/vf55cQWMlV4ZhmSwYucqMOuOGDLxSYis="; }; - patches = []; - buildInputs = oldAttrs.buildInputs ++ [final.webkitgtk_4_1]; - meta = oldAttrs.meta // {broken = false;}; - }); - - # nixpkgs patches - zigbee2mqtt = prev.zigbee2mqtt.overrideAttrs { - npmInstallFlags = ["--no-optional"]; # Fix cross build + kernelPatches = [ + { + name = "openwrt-one"; + patch = ./linux-openwrt-one-mediatek.patch; + #structuredExtraConfig = with final.lib.kernel; { + # NET_MEDIATEK_SOC = yes; + #}; + } + ]; }; + + # RaspberryPi ubootRaspberryPi3_btrfs = prev.buildUBoot { defconfig = "rpi_3_defconfig"; extraConfig = '' @@ -48,6 +101,32 @@ final: prev: { filesToInstall = ["u-boot.bin"]; }; + # NixPkgs patches + libcap = + if prev.stdenv.hostPlatform != prev.stdenv.buildPlatform + then + prev.libcap.overrideAttrs { + patches = [ + (final.fetchpatch { + url = "https://git.kernel.org/pub/scm/libs/libcap/libcap.git/patch/?id=d628b3bfe40338d4efff6b0ae50f250a0eb884c7"; + hash = "sha256-Eiv/BOJZkduL+hOEJd8K1LQd9wvOeCKchE2GaLcerVc="; + }) + ]; + } + else prev.libcap; + gvproxy = + if prev.stdenv.hostPlatform.is32bit + then + # Downgrade to get 32bit support working + prev.gvproxy.overrideAttrs (oldAttrs: { + version = "0.8.6"; + src = oldAttrs.src.override { + rev = "v0.8.6"; + hash = "sha256-a/Gd1QUxZ+47sQtndbehx86UjC1DezhqwS5d5VTIjRc="; + }; + }) + else prev.gvproxy; + # Older version of packages flac134 = prev.flac.overrideAttrs { version = "1.3.4"; @@ -56,5 +135,6 @@ final: prev: { hash = "sha256-j/BgfnWjIt181uxI9PIlRxQEricw0OqUUSexNVFV5zc="; }; outputs = ["out"]; + doCheck = false; }; } |
