diff --git a/pkgs/additional/armbian-build/default.nix b/pkgs/additional/armbian-build/default.nix new file mode 100644 index 000000000..8e01b0caa --- /dev/null +++ b/pkgs/additional/armbian-build/default.nix @@ -0,0 +1,287 @@ +{ + fetchFromGitHub, + lib, + newScope, +}: +lib.makeScope newScope (self: with self; { + src = fetchFromGitHub { + owner = "armbian"; + repo = "build"; + rev = "0a18ec690e423ffb25f66d39c09c0618f768e82d"; + hash = "sha256-a+UtdjEMQk3GkiR2FHCDhZb9H9qbAbYa/mu9c8cVbSY="; + }; + patches.megous = with self.patches.megous; { + # make an entry for `boot.kernelPatches` from a sanitized commit message from megi's repo: + getByName = name: { + inherit name; + patch = "${src}/patch/kernel/archive/sunxi-6.10/patches.megous/${name}.patch"; + }; + + # e.g. `byName.media-ov5640-Implement-autofocus` is a valid kernel patch + byName = lib.genAttrs patchNames getByName; + + # ordered patches + series = builtins.map getByName patchNames; + + patchNames = [ + # ordered patches, from + "media-ov5640-Experiment-Try-to-disable-denoising-sharpening" + "media-ov5640-Sleep-after-poweroff-to-ensure-next-poweron-is-not" + "media-ov5640-Don-t-powerup-the-sensor-during-driver-probe" + "media-ov5640-set-default-ae-target-lower" + "media-ov5640-Improve-error-reporting" + "media-ov5640-Implement-autofocus" + "media-ov5640-Improve-firmware-load-time" + "media-ov5640-Fix-focus-commands-blocking-until-complete" + "media-ov5640-Add-read-only-property-for-vblank" + "media-ov5640-use-pm_runtime_force_suspend-resume-for-system-sus" + "media-sun6i-csi-capture-Use-subdev-operation-to-access-bridge-f" + "media-sun6i-csi-subdev-Use-subdev-active-state-to-store-active-" + "media-sun6i-csi-merge-sun6i_csi_formats-and-sun6i_csi_formats_m" + "media-sun6i-csi-add-V4L2_CAP_IO_MC-capability" + "media-sun6i-csi-implement-vidioc_enum_framesizes" + "media-sun6i-csi-Add-multicamera-support-for-parallel-bus" + "nfc-pn544-Add-support-for-VBAT-PVDD-regulators" + "bluetooth-bcm-Restore-drive_rts_on_open-true-behavior-on-bcm207" + "mmc-add-delay-after-power-class-selection" + "ARM-dts-sun8i-a83t-tbs-a711-Add-PN544-NFC-support" + "ARM-dts-sun8i-a83t-tbs-a711-Add-powerup-down-support-for-the-3G" + "ARM-dts-sun8i-a83t-Add-cedrus-video-codec-support-to-A83T-untes" + "ARM-dts-suni-a83t-Add-i2s0-pins" + "ARM-dts-sun8i-a83t-tbs-a711-Add-sound-support-via-AC100-codec" + "ARM-dts-sun8i-a83t-tbs-a711-Add-regulators-to-the-accelerometer" + "ARM-dts-sun8i-a83t-tbs-a711-Add-camera-sensors-HM5065-GC2145" + "ARM-dts-sun8i-a83t-tbs-a711-Add-flash-led-support" + "dt-bindings-input-gpio-vibrator-Don-t-require-enable-gpios" + "input-gpio-vibra-Allow-to-use-vcc-supply-alone-to-control-the-v" + "ARM-dts-sun8i-a83t-tbs-a711-Add-support-for-the-vibrator-motor" + "ARM-dts-sun8i-a83t-tbs-a711-Increase-voltage-on-the-vibrator" + "dt-bindings-leds-Add-a-binding-for-AXP813-charger-led" + "leds-axp20x-Support-charger-LED-on-AXP20x-like-PMICs" + "ARM-dts-axp813-Add-charger-LED" + "ARM-dts-sun8i-a83t-tbs-a711-Enable-charging-LED" + "MAINTAINERS-Add-entry-for-Himax-HM5065" + "dt-bindings-media-Add-bindings-for-Himax-HM5065-camera-sensor" + "hm5065-yaml-bindings-wip" + "media-hm5065-Add-subdev-driver-for-Himax-HM5065-camera-sensor" + "media-i2c-gc2145-Move-upstream-driver-out-of-the-way" + "media-gc2145-Galaxycore-camera-module-driver" + "media-gc2145-Added-BGGR-bayer-mode" + "media-gc2145-Disable-debug-output" + "media-gc2145-Add-PIXEL_RATE-HBLANK-and-VBLANK-controls" + "media-gc2145-implement-system-suspend" + "media-gc2145-fix-white-balance-colors" + "media-i2c-gc2145-Parse-and-register-properties" + "mailbox-Allow-to-run-mailbox-while-timekeeping-is-suspended" + "ARM-sunxi-Add-experimental-suspend-to-memory-implementation-for" + "ARM-sunxi-sunxi_cpu0_hotplug_support_set-is-not-supported-on-A8" + "firmware-scpi-Add-support-for-sending-a-SCPI_CMD_SET_SYS_PWR_ST" + "ARM-sunxi-Use-SCPI-to-send-suspend-message-to-SCP-on-A83T" + "gnss-ubx-Send-soft-powerdown-message-on-suspend" + "clk-sunxi-ng-Export-CLK_DRAM-for-devfreq" + "ARM-dts-sun8i-a83t-Add-MBUS-node" + "clk-sunxi-ng-Set-maximum-P-and-M-factors-to-1-for-H3-pll-cpux-c" + "clk-sunxi-ng-Don-t-use-CPU-PLL-gating-and-CPUX-reparenting-to-H" + "ARM-dts-sun8i-h3-Use-my-own-more-aggressive-OPPs-on-H3" + "arm64-dts-sun50i-h5-Use-my-own-more-aggressive-OPPs-on-H5" + "ARM-dts-sun8i-h3-orange-pi-pc-Increase-max-CPUX-voltage-to-1.4V" + "ARM-dts-sun8i-a83t-Improve-CPU-OPP-tables-go-up-to-1.8GHz" + "cpufreq-sun50i-Show-detected-CPU-bin-for-easier-debugging" + "net-stmmac-sun8i-Use-devm_regulator_get-for-PHY-regulator" + "net-stmmac-sun8i-Rename-PHY-regulator-variable-to-regulator_phy" + "net-stmmac-sun8i-Add-support-for-enabling-a-regulator-for-PHY-I" + "arm64-dts-allwinner-orange-pi-3-Enable-ethernet" + "input-cyttsp4-De-obfuscate-platform-data-for-keys" + "input-cyttsp4-Remove-useless-indirection-with-driver-platform-d" + "input-cyttsp4-Remove-unused-enable_vkeys" + "input-cyttsp4-De-obfuscate-MT-signals-setup-platform-data" + "input-cyttsp4-Clear-the-ids-buffer-in-a-saner-way" + "input-cyttsp4-ENOSYS-error-is-ok-when-powering-up" + "input-cyttsp4-Faster-recovery-from-failed-wakeup-HACK" + "input-cyttsp4-Use-i2c-spi-names-directly-in-the-driver" + "input-cyttsp4-Port-the-driver-to-use-device-properties" + "input-cyttsp4-Restart-on-wakeup-wakeup-by-I2C-read-doesn-t-work" + "input-cyttsp4-Fix-warnings" + "input-cyttsp4-Make-the-driver-not-hog-the-system-s-workqueue" + "input-cyttsp4-Fix-probe-oops" + "video-fbdev-eInk-display-driver-for-A13-based-PocketBooks" + "regulator-Add-simple-driver-for-enabling-a-regulator-from-users" + "regulator-tp65185x-Add-tp65185x-eInk-panel-regulator-driver" + "regulator-tp65185-Add-hwmon-device-for-reading-temperature" + "iio-adc-sun4i-gpadc-iio-Allow-to-use-sun5i-a13-gpadc-iio-from-D" + "mtd-spi-nor-Add-vdd-regulator-support" + "ARM-dts-sun5i-Add-soc-handle" + "ARM-dts-sun5i-Add-PocketBook-Touch-Lux-3-display-ctp-support" + "ARM-dts-sun5i-a13-pocketbook-touch-lux-3-Add-RTC-clock-cells" + "arm64-dts-sun50i-a64-pinephone-Add-front-back-cameras" + "arm64-dts-sun50i-a64-pinephone-Add-Type-C-support-for-all-PP-va" + "arm64-dts-sun50i-a64-pinephone-Add-modem-power-manager" + "arm64-dts-sun50i-a64-pinephone-Fix-BH-modem-manager-behavior" + "arm64-dts-sun50i-a64-pinephone-Add-detailed-OCV-to-capactiy-con" + "arm64-dts-sun50i-a64-pinephone-Shorten-post-power-on-delay-on-m" + "arm64-dts-sun50i-a64-pinephone-Add-mount-matrix-for-acceleromet" + "arm64-dts-sun50i-a64-pinephone-Add-support-for-Bluetooth-audio" + "arm64-dts-sun50i-a64-pinephone-Enable-internal-HMIC-bias" + "arm64-dts-sun50i-a64-pinephone-Add-support-for-modem-audio" + "arm64-dts-sun50i-a64-pinephone-Bump-I2C-frequency-to-400kHz" + "arm64-dts-sun50i-a64-pinephone-Add-interrupt-pin-for-WiFi" + "arm64-dts-sun50i-a64-pinephone-Power-off-the-touch-controller-i" + "arm64-dts-sun50i-a64-pinephone-Don-t-make-lradc-keys-a-wakeup-s" + "arm64-dts-sun50i-a64-pinephone-Set-minimum-backlight-duty-cycle" + "arm64-dts-sun50i-a64-pinephone-Add-supply-for-i2c-bus-to-anx768" + "arm64-dts-sun50i-a64-pinephone-Workaround-broken-HDMI-HPD-signa" + "arm64-dts-sun50i-a64-pinephone-Add-AF8133J-to-PinePhone" + "arm64-dts-sun50i-a64-pinephone-Add-mount-matrix-for-PinePhone-m" + "arm64-dts-sun50i-a64-pinephone-Add-support-for-Pinephone-keyboa" + "arm64-dts-sun50i-a64-pinephone-Enable-Pinephone-Keyboard-power-" + "arm64-dts-sun50i-a64-pinephone-Add-support-for-Pinephone-1.2-be" + "arm64-dts-sun50i-a64-pinephone-Add-power-supply-to-stk3311" + "arm64-dts-sun50i-a64-pinephone-Add-reboot-mode-driver" + "arm64-dts-sun50i-a64-pinephone-Use-newer-jack-detection-impleme" + "arm64-dts-sun50-a64-pinephone-Define-jack-pins-in-DT" + "dt-bindings-sound-Add-jack-type-property-to-sun8i-a33-codec" + "ASoC-sun8i-codec-Allow-the-jack-type-to-be-set-via-device-tree" + "ASoC-sun8i-codec-define-button-keycodes" + "ASoC-sun8i-codec-Add-debug-output-for-jack-detection" + "ASoC-sun8i-codec-Set-jack_type-from-DT-in-probe" + "ASoC-simple-card-Allow-to-define-pins-for-aux-jack-devices" + "clk-sunxi-ng-a64-Increase-PLL_AUDIO-base-frequency" + "dt-bindings-mfd-Add-codec-related-properties-to-AC100-PMIC" + "sound-soc-ac100-codec-Support-analog-part-of-X-Powers-AC100-cod" + "sound-soc-sun8i-codec-Add-support-for-digital-part-of-the-AC100" + "ASoC-ec25-New-codec-driver-for-the-EC25-modem" + "ASOC-sun9i-hdmi-audio-Initial-implementation" + "ARM-dts-sunxi-h3-h5-Add-hdmi-sound-card" + "ARM-dts-sun8i-h3-Enable-hdmi-sound-card-on-boards-with-hdmi" + "ARM-dts-sun8i-h2-plus-bananapi-m2-zero-Enable-HDMI-audio" + "ARM-dts-sun8i-a83t-Add-hdmi-sound-card" + "ARM-dts-sun8i-a83t-Enable-hdmi-sound-card-on-boards-with-hdmi" + "ARM-dts-sun8i-r40-Add-hdmi-sound-card" + "ARM-dts-sun8i-r40-bananapi-m2-ultra-Enable-HDMI-audio" + "ARM-dts-sun8i-v40-bananapi-m2-berry-Enable-HDMI-audio" + "arm64-dts-allwinner-h6-Add-hdmi-sound-card" + "arm64-dts-allwinner-h6-Enable-hdmi-sound-card-on-boards-with-hd" + "arm64-dts-allwinner-a64-Add-hdmi-sound-card" + "arm64-dts-allwinner-a64-Enable-hdmi-sound-card-on-boards-with-h" + "arm64-dts-allwinner-h5-Enable-hdmi-sound-card-on-boards-with-hd" + "arm64-dts-sun50i-a64-Set-fifo-size-for-uarts" + "ARM-dts-sun8i-a83t-Set-fifo-size-for-uarts" + "Mark-some-slow-drivers-for-async-probe-with-PROBE_PREFER_ASYNCH" + "arm64-xor-Select-32regs-without-benchmark-to-speed-up-boot" + "clk-Implement-protected-clocks-for-all-OF-clock-providers" + "Revert-clk-qcom-Support-protected-clocks-property" + "ARM-dts-sunxi-a83t-Protect-SCP-clocks" + "ARM-dts-sunxi-h3-h5-Protect-SCP-clocks" + "arm64-dts-allwinner-a64-Protect-SCP-clocks" + "arm64-dts-allwinner-h6-Protect-SCP-clocks" + "bus-sunxi-rsb-Always-check-register-address-validity" + "firmware-arm_scpi-Support-unidirectional-mailbox-channels" + "ARM-dts-sunxi-a83t-Add-SCPI-protocol" + "ARM-dts-sunxi-h3-h5-Add-SCPI-protocol" + "arm64-dts-allwinner-a64-Add-SCPI-protocol" + "arm64-dts-allwinner-h6-Add-SCPI-protocol" + "ARM-dts-sun8i-a83t-tbs-a711-Give-Linux-more-privileges-over-SCP" + "rtc-sun6i-Allow-RTC-wakeup-after-shutdown" + "misc-modem-power-Power-manager-for-modems" + "ARM-dts-sun8i-a83t-Add-missing-GPU-trip-point" + "arm64-dts-sun50i-h5-Add-missing-GPU-trip-point" + "arm64-dts-sun50i-a64-Add-missing-trip-points-for-GPU" + "arm64-dts-allwinner-a64-Fix-LRADC-compatible" + "ASoC-codec-es8316-DAC-Soft-Ramp-Rate-is-just-a-2-bit-control" + "spi-rockchip-Fix-runtime-PM-and-other-issues" + "spi-fixes" + "media-cedrus-Fix-failure-to-clean-up-hardware-on-probe-failure" + "ASoC-rockchip-Fix-doubling-of-playback-speed-after-system-sleep" + "usb-musb-sunxi-Avoid-enabling-host-side-code-on-SoCs-where-it-s" + "arm64-dts-allwinner-Enforce-consistent-MMC-numbering" + "ARM-dts-sunxi-Add-aliases-for-MMC" + "drm-rockchip-Fix-panic-on-reboot-when-DRM-device-fails-to-bind" + "usb-gadget-Fix-dangling-pointer-in-netdev-private-data" + "Fix-for-usb-gadget-on-PP" + "mmc-dw-mmc-rockchip-fix-sdmmc-after-soft-reboot" + "Revert-drm-sun4i-lvds-Invert-the-LVDS-polarity" + "of-property-fw_devlink-Support-allwinner-sram-links" + "arm64-dts-rockchip-rk356x-Fix-PCIe-register-map-and-ranges" + "Fix-intptr_t-typedef" + "mmc-sunxi-mmc-Remove-runtime-PM" + "pci-Workaround-ITS-timeouts-on-poweroff-reboot-on-Orange-Pi-5-P" + "usb-serial-option-add-reset_resume-callback-for-WWAN-devices" + "media-rkisp1-Adapt-to-different-SoCs-having-different-size-limi" + "media-ov5648-Fix-call-to-pm_runtime_set_suspended" + "drm-rockchip-dw-mipi-dsi-rockchip-Fix-ISP1-PHY-initialization" + "drm-rockchip-dw-mipi-dsi-rockchip-Restore-DPHY-config-on-resume" + "bluetooth-h5-Don-t-re-initialize-rtl8723cs-on-resume" + "drm-sun4i-Unify-sun8i_-_layer-structs" + "drm-sun4i-Add-more-parameters-to-sunxi_engine-commit-callback" + "drm-sun4i-Fix-layer-zpos-change-atomic-modesetting" + "drm-sun4i-drm-Change-update_bits-to-write" + "drm-sun4i-Mark-one-of-the-UI-planes-as-a-cursor-one" + "drm-sun4i-Implement-gamma-correction" + "drm-panel-st7703-Fix-xbd599-timings-to-make-refresh-rate-exactl" + "drm-sun4i-Support-taking-over-display-pipeline-state-from-p-boo" + "video-pwm_bl-Allow-to-change-lth_brightness-via-sysfs" + "clk-sunxi-ng-sun50i-a64-Switch-parent-of-MIPI-DSI-to-periph0-1x" + "drm-sun4i-tcon-Support-keeping-dclk-rate-upon-ancestor-clock-ch" + "phy-allwinner-sun4i-usb-Add-support-for-usb_role_switch" + "regulator-axp20x-Add-support-for-vin-supply-for-drivevbus" + "regulator-axp20x-Turn-N_VBUSEN-to-input-on-x-powers-sense-vbus-" + "drm-bridge-dw-hdmi-Allow-to-accept-HPD-status-from-other-driver" + "drm-bridge-dw-hdmi-Report-HDMI-hotplug-events" + "usb-typec-anx7688-Add-driver-for-ANX7688-USB-C-HDMI-bridge" + "usb-typec-anx7688-Port-to-Linux-6.9" + "usb-typec-anx7688-Port-to-Linux-6.10" + "dt-bindings-axp20x-adc-allow-to-use-TS-pin-as-GPADC" + "iio-adc-axp20x_adc-allow-to-set-TS-pin-to-GPADC-mode" + "power-axp20x_battery-Allow-to-set-target-voltage-to-4.35V" + "power-supply-axp20x_battery-Add-support-for-reporting-OCV" + "regulator-axp20x-Enable-over-temperature-protection-and-16s-res" + "power-supply-axp20x_battery-Setup-thermal-regulation-experiment" + "power-supply-axp20x_battery-Fix-charging-done-detection" + "mfd-axp20x-Add-battery-IRQ-resources" + "power-supply-axp20x_battery-Send-uevents-for-status-changes" + "power-supply-axp20x_battery-Monitor-battery-health" + "power-supply-axp20x-usb-power-Change-Vbus-hold-voltage-to-4.5V" + "power-axp803-Add-interrupts-for-low-battery-power-condition" + "power-supply-axp20x-battery-Support-POWER_SUPPLY_PROP_CHARGE_BE" + "power-supply-axp20x-battery-Enable-poweron-by-RTC-alarm" + "power-supply-axp20x-battery-Add-support-for-POWER_SUPPLY_PROP_E" + "power-supply-Add-support-for-USB_BC_ENABLED-and-USB_DCP_INPUT_C" + "power-supply-axp20x-usb-power-Add-missing-interrupts" + "sunxi-Use-dev_err_probe-to-handle-EPROBE_DEFER-errors" + "thermal-sun8i-Be-loud-when-probe-fails" + "i2c-mv64xxx-Don-t-make-a-fuss-when-pinctrl-recovery-state-is-no" + "iio-st_sensors-Don-t-report-error-when-the-device-is-not-presen" + "opp-core-Avoid-confusing-error-when-no-regulator-is-defined-in-" + "rtc-Print-which-error-caused-RTC-read-failure" + "arm64-dts-allwinner-a64-pinetab-add-front-camera" + "arm64-allwinner-dts-a64-enable-K101-IM2BYL02-panel-for-PineTab" + "arm64-dts-sun50i-a64-pinetab-Name-sound-card-PineTab" + "arm64-dts-sun50i-a64-pinetab-Add-accelerometer" + "arm64-dts-sun50i-a64-pinetab-enable-RTL8723CS-bluetooth" + "usb-typec-fusb302-Slightly-increase-wait-time-for-BC1.2-result" + "usb-typec-fusb302-Set-the-current-before-enabling-pullups" + "usb-typec-fusb302-Extend-debugging-interface-with-driver-state-" + "usb-typec-fusb302-Retry-reading-of-CC-pins-status-if-activity-i" + "usb-typec-fusb302-More-useful-of-logging-status-on-interrupt" + "usb-typec-fusb302-Update-VBUS-state-even-if-VBUS-interrupt-is-n" + "usb-typec-fusb302-Add-OF-extcon-support" + "usb-typec-fusb302-Fix-register-definitions" + "usb-typec-fusb302-Clear-interrupts-before-we-start-toggling" + "usb-typec-typec-extcon-Add-typec-extcon-bridge-driver" + "usb-typec-typec-extcon-Enable-debugging-for-now" + "usb-typec-typec-extcon-Allow-to-force-reset-on-each-mux-change" + "Revert-usb-typec-tcpm-unregister-existing-source-caps-before-re" + "usb-typec-altmodes-displayport-Respect-DP_CAP_RECEPTACLE-bit" + "usb-typec-tcpm-Unregister-altmodes-before-registering-new-ones" + "usb-typec-tcpm-Fix-PD-devices-capabilities-registration" + "usb-typec-tcpm-Improve-logs" + "Make-microbuttons-on-Orange-Pi-PC-and-PC-2-work-as-power-off-bu" + "Add-support-for-my-private-Sapomat-device" + "ARM-dts-sun8i-h3-orange-pi-one-Enable-all-gpio-header-UARTs" + "mtd-spi-nor-Add-Alliance-memory-support" + "Add-README.md-with-information-and-u-boot-patches" + "Defconfigs-for-all-my-devices" + "Update-defconfigs" + ]; + }; +}) diff --git a/pkgs/default.nix b/pkgs/default.nix index a62b93bca..5fa792290 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -17,6 +17,7 @@ let ### ADDITIONAL PACKAGES alsa-ucm-pinephone-manjaro = callPackage ./additional/alsa-ucm-pinephone-manjaro { }; alsa-ucm-pinephone-pmos = callPackage ./additional/alsa-ucm-pinephone-pmos { }; + armbian-build = lib.recurseIntoAttrs (callPackage ./additional/armbian-build { }); blast-ugjka = callPackage ./additional/blast-ugjka { }; bootpart-uefi-x86_64 = callPackage ./additional/bootpart-uefi-x86_64 { }; bunpen = callPackage ./additional/bunpen { };