···11-From 65d90cd17ad7cd3f9aeeb805a08be780fc5bae1a Mon Sep 17 00:00:00 2001
22-From: Sjoerd Simons <sjoerd@collabora.com>
33-Date: Sun, 22 Aug 2021 16:36:55 +0200
44-Subject: [PATCH] rpi: Copy properties from firmware dtb to the loaded dtb
55-66-The RPI firmware adjusts several property values in the dtb it passes
77-to u-boot depending on the board/SoC revision. Inherit some of these
88-when u-boot loads a dtb itself. Specificaly copy:
99-1010-* /model: The firmware provides a more specific string
1111-* /memreserve: The firmware defines a reserved range, better keep it
1212-* emmc2bus and pcie0 dma-ranges: The C0T revision of the bcm2711 Soc (as
1313- present on rpi 400 and some rpi 4B boards) has different values for
1414- these then the B0T revision. So these need to be adjusted to boot on
1515- these boards
1616-* blconfig: The firmware defines the memory area where the blconfig
1717- stored. Copy those over so it can be enabled.
1818-* /chosen/kaslr-seed: The firmware generates a kaslr seed, take advantage
1919- of that.
2020-2121-Signed-off-by: Sjoerd Simons <sjoerd@collabora.com>
2222-Origin: https://patchwork.ozlabs.org/project/uboot/patch/20210822143656.289891-1-sjoerd@collabora.com/
2323----
2424- board/raspberrypi/rpi/rpi.c | 48 +++++++++++++++++++++++++++++++++++++
2525- 1 file changed, 48 insertions(+)
2626-2727-diff --git a/board/raspberrypi/rpi/rpi.c b/board/raspberrypi/rpi/rpi.c
2828-index 372b26b6f2..64b8684b68 100644
2929---- a/board/raspberrypi/rpi/rpi.c
3030-+++ b/board/raspberrypi/rpi/rpi.c
3131-@@ -495,10 +495,58 @@ void *board_fdt_blob_setup(void)
3232- return (void *)fw_dtb_pointer;
3333- }
3434-3535-+int copy_property(void *dst, void *src, char *path, char *property)
3636-+{
3737-+ int dst_offset, src_offset;
3838-+ const fdt32_t *prop;
3939-+ int len;
4040-+
4141-+ src_offset = fdt_path_offset(src, path);
4242-+ dst_offset = fdt_path_offset(dst, path);
4343-+
4444-+ if (src_offset < 0 || dst_offset < 0)
4545-+ return -1;
4646-+
4747-+ prop = fdt_getprop(src, src_offset, property, &len);
4848-+ if (!prop)
4949-+ return -1;
5050-+
5151-+ return fdt_setprop(dst, dst_offset, property, prop, len);
5252-+}
5353-+
5454-+/* Copy tweaks from the firmware dtb to the loaded dtb */
5555-+void update_fdt_from_fw(void *fdt, void *fw_fdt)
5656-+{
5757-+ /* Using dtb from firmware directly; leave it alone */
5858-+ if (fdt == fw_fdt)
5959-+ return;
6060-+
6161-+ /* The firmware provides a more precie model; so copy that */
6262-+ copy_property(fdt, fw_fdt, "/", "model");
6363-+
6464-+ /* memory reserve as suggested by the firmware */
6565-+ copy_property(fdt, fw_fdt, "/", "memreserve");
6666-+
6767-+ /* Adjust dma-ranges for the SD card and PCI bus as they can depend on
6868-+ * the SoC revision
6969-+ */
7070-+ copy_property(fdt, fw_fdt, "emmc2bus", "dma-ranges");
7171-+ copy_property(fdt, fw_fdt, "pcie0", "dma-ranges");
7272-+
7373-+ /* Bootloader configuration template exposes as nvmem */
7474-+ if (copy_property(fdt, fw_fdt, "blconfig", "reg") == 0)
7575-+ copy_property(fdt, fw_fdt, "blconfig", "status");
7676-+
7777-+ /* kernel address randomisation seed as provided by the firmware */
7878-+ copy_property(fdt, fw_fdt, "/chosen", "kaslr-seed");
7979-+}
8080-+
8181- int ft_board_setup(void *blob, struct bd_info *bd)
8282- {
8383- int node;
8484-8585-+ update_fdt_from_fw(blob, (void *)fw_dtb_pointer);
8686-+
8787- node = fdt_node_offset_by_compatible(blob, -1, "simple-framebuffer");
8888- if (node < 0)
8989- lcd_dt_simplefb_add_node(blob);
9090---
9191-2.32.0
9292-
···7788stdenv.mkDerivation rec {
99 pname = "adguardhome";
1010- version = "0.107.34";
1010+ version = "0.107.35";
1111 src = sources.${system} or (throw "Source for ${pname} is not available for ${system}");
12121313 installPhase = ''
+3
pkgs/servers/nosql/mongodb/mongodb.nix
···149149 ] ++ lib.optionals (versionAtLeast version "4.4") [ "--link-model=static" ]
150150 ++ map (lib: "--use-system-${lib}") system-libraries;
151151152152+ # This seems to fix mongodb not able to find OpenSSL's crypto.h during build
153153+ hardeningDisable = [ "fortify3" ];
154154+152155 preBuild = ''
153156 sconsFlags+=" CC=$CC"
154157 sconsFlags+=" CXX=$CXX"
···14161416 protobuf3_11 = throw "protobuf3_11 does not receive updates anymore and has been removed"; # Added 2022-09-28
14171417 protobuf3_17 = throw "protobuf3_17 does not receive updates anymore and has been removed"; # Added 2023-05-21
14181418 protonup = protonup-ng; # Added 2022-11-06
14191419+ proxmark3-rrg = proxmark3; # Added 2023-07-25
14201420+ proxmark3-unstable = throw "removed in favor of rfidresearchgroup fork"; # Added 2023-07-25
14191421 proxytunnel = throw "proxytunnel has been removed from nixpkgs, because it has not been update upstream since it was added to nixpkgs in 2008 and has therefore bitrotted."; # added 2021-12-15
14201422 pulseaudio-hsphfpd = throw "pulseaudio-hsphfpd upstream has been abandoned"; # Added 2022-03-23
14211423 pulseaudio-modules-bt = throw "pulseaudio-modules-bt has been abandoned, and is superseded by pulseaudio's native bt functionality"; # Added 2022-04-01