mirror of
https://github.com/CHN-beta/nixpkgs.git
synced 2026-01-12 02:40:31 +08:00
Compare commits
3 Commits
qemu-vm/re
...
rpi-cm4-su
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
efd37bed5b | ||
|
|
d6ae2c696c | ||
|
|
5a3fcb2312 |
@@ -39,6 +39,17 @@
|
||||
# Supported in newer board revisions
|
||||
arm_boost=1
|
||||
|
||||
[cm4]
|
||||
kernel=u-boot-rpi-cm4.bin
|
||||
enable_gic=1
|
||||
armstub=armstub8-gic.bin
|
||||
disable_overscan=1
|
||||
|
||||
# Enable host mode on the 2711 built-in XHCI USB controller.
|
||||
# This line should be removed if the legacy DWC2 controller is required
|
||||
# (e.g. for USB device mode) or if USB support is not required.
|
||||
otg_mode=1
|
||||
|
||||
[all]
|
||||
# Boot in 64-bit mode.
|
||||
arm_64bit=1
|
||||
@@ -65,6 +76,10 @@
|
||||
cp ${pkgs.ubootRaspberryPi4_64bit}/u-boot.bin firmware/u-boot-rpi4.bin
|
||||
cp ${pkgs.raspberrypi-armstubs}/armstub8-gic.bin firmware/armstub8-gic.bin
|
||||
cp ${pkgs.raspberrypifw}/share/raspberrypi/boot/bcm2711-rpi-4-b.dtb firmware/
|
||||
|
||||
# Add cm4 specific files
|
||||
cp ${pkgs.ubootRaspberryPiCM4_64bit}/u-boot.bin firmware/u-boot-rpi-cm4.bin
|
||||
cp ${pkgs.raspberrypifw}/share/raspberrypi/boot/bcm2711-rpi-cm4.dtb firmware/
|
||||
'';
|
||||
populateRootCommands = ''
|
||||
mkdir -p ./files/boot
|
||||
|
||||
@@ -437,6 +437,28 @@ in {
|
||||
filesToInstall = ["u-boot.bin"];
|
||||
};
|
||||
|
||||
ubootRaspberryPiCM4_64bit = buildUBoot {
|
||||
defconfig = "rpi_4_defconfig";
|
||||
extraMeta.platforms = ["aarch64-linux"];
|
||||
filesToInstall = ["u-boot.bin"];
|
||||
extraConfig = ''
|
||||
CONFIG_CMD_NVME=y
|
||||
CONFIG_NVME=y
|
||||
CONFIG_NVME_PCI=y
|
||||
CONFIG_USB_STORAGE=y
|
||||
CONFIG_USB_FUNCTION_MASS_STORAGE=y
|
||||
CONFIG_USB_EHCI_HCD=y
|
||||
CONFIG_USB_EHCI_GENERIC=y
|
||||
CONFIG_USB_OHCI_HCD=y
|
||||
|
||||
CONFIG_USB_XHCI_BRCM=y
|
||||
'';
|
||||
extraPatches = [
|
||||
./rpi-cm4/0003-rpi-add-NVMe-to-boot-order.patch
|
||||
./rpi-cm4/0005-usb-xhci-brcm-Make-driver-compatible-with-downstream.patch
|
||||
];
|
||||
};
|
||||
|
||||
ubootRaspberryPiZero = buildUBoot {
|
||||
defconfig = "rpi_0_w_defconfig";
|
||||
extraMeta.platforms = ["armv6l-linux"];
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
From ae45864457182fcaa67911e1e3d8db242dff3646 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <ae45864457182fcaa67911e1e3d8db242dff3646.1645627172.git.stefan@agner.ch>
|
||||
In-Reply-To: <24b77460dbfa2497ceb7a1611bf28b6eb88a1d74.1645627172.git.stefan@agner.ch>
|
||||
References: <24b77460dbfa2497ceb7a1611bf28b6eb88a1d74.1645627172.git.stefan@agner.ch>
|
||||
From: Stefan Agner <stefan@agner.ch>
|
||||
Date: Tue, 29 Dec 2020 23:34:52 +0100
|
||||
Subject: [PATCH 3/5] rpi: add NVMe to boot order
|
||||
|
||||
The Compute Module 4 I/O Board can support a NVMe. Add NVMe to the boot
|
||||
order.
|
||||
|
||||
Signed-off-by: Stefan Agner <stefan@agner.ch>
|
||||
---
|
||||
include/configs/rpi.h | 7 +++++++
|
||||
1 file changed, 7 insertions(+)
|
||||
|
||||
diff --git a/include/configs/rpi.h b/include/configs/rpi.h
|
||||
index 4c5c1ac31f..e24c94c7d2 100644
|
||||
--- a/include/configs/rpi.h
|
||||
+++ b/include/configs/rpi.h
|
||||
@@ -143,6 +143,12 @@
|
||||
#define BOOT_TARGET_MMC(func)
|
||||
#endif
|
||||
|
||||
+#if CONFIG_IS_ENABLED(CMD_NVME)
|
||||
+ #define BOOT_TARGET_NVME(func) func(NVME, nvme, 0)
|
||||
+#else
|
||||
+ #define BOOT_TARGET_NVME(func)
|
||||
+#endif
|
||||
+
|
||||
#if CONFIG_IS_ENABLED(CMD_USB)
|
||||
#define BOOT_TARGET_USB(func) func(USB, usb, 0)
|
||||
#else
|
||||
@@ -163,6 +169,7 @@
|
||||
|
||||
#define BOOT_TARGET_DEVICES(func) \
|
||||
BOOT_TARGET_MMC(func) \
|
||||
+ BOOT_TARGET_NVME(func) \
|
||||
BOOT_TARGET_USB(func) \
|
||||
BOOT_TARGET_PXE(func) \
|
||||
BOOT_TARGET_DHCP(func)
|
||||
--
|
||||
2.35.1
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
From b00922ee48987ef91f0ca2aa3a66ad22c6c83d57 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <b00922ee48987ef91f0ca2aa3a66ad22c6c83d57.1645627172.git.stefan@agner.ch>
|
||||
In-Reply-To: <24b77460dbfa2497ceb7a1611bf28b6eb88a1d74.1645627172.git.stefan@agner.ch>
|
||||
References: <24b77460dbfa2497ceb7a1611bf28b6eb88a1d74.1645627172.git.stefan@agner.ch>
|
||||
From: Stefan Agner <stefan@agner.ch>
|
||||
Date: Thu, 7 Oct 2021 12:02:39 +0200
|
||||
Subject: [PATCH 5/5] usb: xhci-brcm: Make driver compatible with downstream
|
||||
device tree
|
||||
|
||||
The downstream device tree uses just "generic-xhci" as compatible
|
||||
string. Use this string to make U-Boot work with the downstream Kernel.
|
||||
|
||||
Signed-off-by: Stefan Agner <stefan@agner.ch>
|
||||
---
|
||||
drivers/usb/host/xhci-brcm.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/drivers/usb/host/xhci-brcm.c b/drivers/usb/host/xhci-brcm.c
|
||||
index fe17924028..0c6938187b 100644
|
||||
--- a/drivers/usb/host/xhci-brcm.c
|
||||
+++ b/drivers/usb/host/xhci-brcm.c
|
||||
@@ -82,7 +82,7 @@ static int xhci_brcm_deregister(struct udevice *dev)
|
||||
}
|
||||
|
||||
static const struct udevice_id xhci_brcm_ids[] = {
|
||||
- { .compatible = "brcm,generic-xhci" },
|
||||
+ { .compatible = "generic-xhci" },
|
||||
{ }
|
||||
};
|
||||
|
||||
--
|
||||
2.35.1
|
||||
|
||||
@@ -23762,6 +23762,7 @@ with pkgs;
|
||||
ubootRaspberryPi3_64bit
|
||||
ubootRaspberryPi4_32bit
|
||||
ubootRaspberryPi4_64bit
|
||||
ubootRaspberryPiCM4_64bit
|
||||
ubootRaspberryPiZero
|
||||
ubootRock64
|
||||
ubootRockPi4
|
||||
|
||||
Reference in New Issue
Block a user