diff --git a/pkgs/additional/u-boot-pinephone-pro/default.nix b/pkgs/additional/u-boot-pinephone-pro/default.nix index 5ee5f3e49..244818e7d 100644 --- a/pkgs/additional/u-boot-pinephone-pro/default.nix +++ b/pkgs/additional/u-boot-pinephone-pro/default.nix @@ -24,6 +24,29 @@ "u-boot.sym" ]; }).overrideAttrs (base: { + # default baud rate is 1500000, which is too fast for some USB <-> serial adapters to do + extraConfig = '' + CONFIG_BAUDRATE=115200 + ''; + # default layout is: + # scriptaddr = 0x00500000 + # script_offset_f = 0xffe000 + # script_size_f = 0x2000 + # pxefile_addr_r = 0x00600000 + # fdt_addr_r = 0x01e00000 + # fdtoverlay_addr_r = 0x01f00000 + # kernel_addr_r = 0x02080000 + # ramdisk_addr_r = 0x06000000 + # kernel_comp_addr_r = 0x08000000 + # kernel_comp_size = 0x2000000 + # + # 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 + ''; 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.