u-boot-pinephone-pro: disable HDCP blob

This commit is contained in:
2024-10-06 11:06:06 +00:00
parent 871b855204
commit 6579e6264c
2 changed files with 17 additions and 6 deletions

View File

@@ -2,6 +2,13 @@
# prefer to encode these in `sane.programs`
# resort to this method for e.g. system dependencies, or things which are referenced from too many places.
(self: super: with self; {
# DISABLE HDCP BLOB in pinephone pro.
# this is used by u-boot; requires redeploying the bootloader (the SPL, specifically).
# i can see that nixpkgs does process this option, but the hash of bl31.elf doesn't actually change
arm-trusted-firmware = super.arm-trusted-firmware.override {
unfreeIncludeHDCPBlob = false;
};
beam = super.beam.override {
# build erlang without webkit (for servo)
wxGTK32 = wxGTK32.override {

View File

@@ -11,6 +11,7 @@
defconfig = "pinephone-pro-rk3399_defconfig";
filesToInstall = [
"idbloader.img" #< entry point: place it at sector 64 & it'll load whatever's at sector 16384 into RAM and jump to it
"idbloader-spi.img" #< idbloader, if you want to flash that to SPI. BROM has a glitch where it fetches 4 KiB blocks from SPI, but loads them into RAM in 2 KiB strides, so this is idbloader.img with 2KiB of zeros after each 2KiB of data.
"u-boot" #< ELF file
"u-boot.bin" #< raw binary; on an ordinary platform (not RK3399), this would be loaded into ram and jumped to.
"u-boot-rockchip.bin"
@@ -28,6 +29,7 @@
extraConfig = ''
CONFIG_BAUDRATE=115200
'';
# default layout is:
# scriptaddr = 0x00500000
# script_offset_f = 0xffe000
@@ -42,14 +44,16 @@
#
# this offers 63.5 MiB for the kernel.
# unfortunately, my bloated kernels can be larger than that, so push the addresses back and hope it works:
postPatch = (base.postPatch or "") + ''
substituteInPlace include/configs/rk3399_common.h \
--replace-fail ramdisk_addr_r=0x06000000 ramdisk_addr_r=0x0a000000 \
--replace-fail kernel_comp_addr_r=0x08000000 kernel_comp_addr_r=0x0c000000
'';
# postPatch = (base.postPatch or "") + ''
# substituteInPlace include/configs/rk3399_common.h \
# --replace-fail ramdisk_addr_r=0x06000000 ramdisk_addr_r=0x0a000000 \
# --replace-fail kernel_comp_addr_r=0x08000000 kernel_comp_addr_r=0x0c000000
# '';
env = (base.env or {}) // {
# XXX: RK3399 ships a blob for HDCP (media copy protection) in the trusted firmware.
# that can be removed with `unfreeIncludeHDCPBlob = false`, if so desired.
# that can be removed with:
# `(arm-trusted-firmware.override { unfreeIncludeHDCPBlob = false; }).armTrustedFirmwareRK3399`, if so desired.
BL31 = "${armTrustedFirmwareRK3399}/bl31.elf";
};
})