Skip to contentSkip to conversation

arm-bsp/juno: move to compressed initramfs image

PATCH New Jon Mason 1 participant 2 messages Jan 18, 2023 Arm/versatile express platform

lore
Share & tools
lore

Jon Mason

author
#0 lore raw

PATCH 1/2 arm-bsp/juno: move to compressed initramfs image

Change u-boot and machine config to default to booting a compressed initramfs. This allows for easier testing. A compressed image is needed as the image is too big for the storage, and the error notifying of such is vague.

---
 meta-arm-bsp/conf/machine/juno.conf           |  7 +++-
 .../recipes-bsp/images/firmware-image-juno.bb |  2 +-
 ...-modify-to-boot-compressed-initramfs.patch | 41 +++++++++++++++++++
 .../recipes-bsp/u-boot/u-boot_%.bbappend      |  4 +-
 4 files changed, 50 insertions(+), 4 deletions(-)
 create mode 100644 meta-arm-bsp/recipes-bsp/u-boot/u-boot/juno/0002-configs-vexpress-modify-to-boot-compressed-initramfs.patch
meta-arm-bsp/conf/machine/juno.conf +5 -2
index c002ed63..4a86d4e2 100644
@@ -10,10 +10,10 @@ require conf/machine/include/arm/arch-armv8a.inc
 
 MACHINE_FEATURES = "usbhost usbgadget alsa screen wifi bluetooth optee pci"
 
-KERNEL_IMAGETYPE = "Image"
+KERNEL_IMAGETYPE = "Image.gz"
 KERNEL_DEVICETREE = "arm/juno.dtb arm/juno-r1.dtb arm/juno-r2.dtb"
 
-IMAGE_FSTYPES += "tar.bz2 ext4"
+IMAGE_FSTYPES += "tar.bz2 ext4 cpio.gz"
 
 SERIAL_CONSOLES = "115200;ttyAMA0"
 
@@ -25,3 +25,6 @@ EXTRA_IMAGEDEPENDS += "trusted-firmware-a virtual/bootloader firmware-image-juno
 
 # Juno u-boot configuration
 UBOOT_MACHINE = "vexpress_aemv8a_juno_defconfig"
+
+INITRAMFS_IMAGE_BUNDLE ?= "1"
+INITRAMFS_IMAGE = "core-image-minimal"
meta-arm-bsp/recipes-bsp/images/firmware-image-juno.bb +1 -1
index 80565af6..473d28cc 100644
@@ -63,7 +63,7 @@ do_deploy() {
     done
 
     if [ "${INITRAMFS_IMAGE_BUNDLE}" -eq 1 ]; then
-        cp -L -f ${DEPLOY_DIR_IMAGE}/Image-initramfs-juno.bin \
+        cp -L -f ${DEPLOY_DIR_IMAGE}/Image.gz-initramfs-juno.bin \
             ${D}/${UNPACK_DIR}/SOFTWARE/Image
     else
         cp -L -f ${DEPLOY_DIR_IMAGE}/Image ${D}/${UNPACK_DIR}/SOFTWARE/
meta-arm-bsp/recipes-bsp/u-boot/u-boot/juno/0002-configs-vexpress-modify-to-boot-compressed-initramfs.patch new file +41 -0

41 lines not on this page · raw message

meta-arm-bsp/recipes-bsp/u-boot/u-boot_%.bbappend +3 -1
index 5e46f487..f26ab4a6 100644
@@ -77,7 +77,9 @@ SRC_URI:append:fvp-baser-aemv8r64 = " \
 #
 # Juno Machines
 #
-SRC_URI:append:juno = " file://0001-arm-juno-add-custom-bootcmd-to-autoboot-from-uEnv.tx.patch"
+SRC_URI:append:juno = " file://0001-arm-juno-add-custom-bootcmd-to-autoboot-from-uEnv.tx.patch \
+                        file://0002-configs-vexpress-modify-to-boot-compressed-initramfs.patch \
+                      "
 
 
 #
Signature · 1 line
2.17.1
author
#1 lore raw

PATCH 2/2 arm-bsp/juno: Update kernel patches to the latest

Pulling in the latest juno kernel patches from
https://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux.git

---
 ...uno-Add-thermal-critical-trip-points.patch |  60 +++++++
 ...-cache-properties-for-Arm-Ltd-platfo.patch | 141 +++++++++++++++++
 ...64-dts-fvp-Add-SPE-to-Foundation-FVP.patch |  38 +++++
 ...d-information-about-L1-and-L2-caches.patch | 149 ++++++++++++++++++
 ...s-align-LED-node-names-with-dtschema.patch |  84 ++++++++++
 .../linux/linux-arm-platforms.inc             |   7 +
 6 files changed, 479 insertions(+)
 create mode 100644 meta-arm-bsp/recipes-kernel/linux/files/juno/0001-arm64-dts-juno-Add-thermal-critical-trip-points.patch
 create mode 100644 meta-arm-bsp/recipes-kernel/linux/files/juno/0002-arm64-dts-Update-cache-properties-for-Arm-Ltd-platfo.patch
 create mode 100644 meta-arm-bsp/recipes-kernel/linux/files/juno/0003-arm64-dts-fvp-Add-SPE-to-Foundation-FVP.patch
 create mode 100644 meta-arm-bsp/recipes-kernel/linux/files/juno/0004-arm64-dts-fvp-Add-information-about-L1-and-L2-caches.patch
 create mode 100644 meta-arm-bsp/recipes-kernel/linux/files/juno/0005-ARM-dts-vexpress-align-LED-node-names-with-dtschema.patch
meta-arm-bsp/recipes-kernel/linux/files/juno/0001-arm64-dts-juno-Add-thermal-critical-trip-points.patch new file +60 -0
new file mode 100644
index 00000000..1c0f25eb
@@ -0,0 +1,60 @@
+From c4a7b9b587ca1bb4678d48d8be7132492b23a81c Mon Sep 17 00:00:00 2001
+From: Cristian Marussi <[email protected]>
+Date: Fri, 28 Oct 2022 15:08:33 +0100
+Subject: [PATCH] arm64: dts: juno: Add thermal critical trip points
+
+When thermnal zones are defined, trip points definitions are mandatory.
+Define a couple of critical trip points for monitoring of existing
+PMIC and SOC thermal zones.
+
+This was lost between txt to yaml conversion and was re-enforced recently
+via the commit 8c596324232d ("dt-bindings: thermal: Fix missing required property")
+
+Cc: Rob Herring <[email protected]>
+Cc: Krzysztof Kozlowski <[email protected]>
+Cc: [email protected]
+Signed-off-by: Cristian Marussi <[email protected]>
+Fixes: f7b636a8d83c ("arm64: dts: juno: add thermal zones for scpi sensors")
+Link: https://lore.kernel.org/r/[email protected]
+Signed-off-by: Sudeep Holla <[email protected]>
+
+Signed-off-by: Jon Mason <[email protected]>
+Upstream-Status: Backport
+---
+ arch/arm64/boot/dts/arm/juno-base.dtsi | 14 ++++++++++++++
+ 1 file changed, 14 insertions(+)
+
+diff --git a/arch/arm64/boot/dts/arm/juno-base.dtsi b/arch/arm64/boot/dts/arm/juno-base.dtsi
+index 2f27619d8abd..8b4d280b1e7e 100644
+--- a/arch/arm64/boot/dts/arm/juno-base.dtsi
++++ b/arch/arm64/boot/dts/arm/juno-base.dtsi
+@@ -751,12 +751,26 @@ pmic {
+ 			polling-delay = <1000>;
+ 			polling-delay-passive = <100>;
+ 			thermal-sensors = <&scpi_sensors0 0>;
++			trips {
++				pmic_crit0: trip0 {
++					temperature = <90000>;
++					hysteresis = <2000>;
++					type = "critical";
++				};
++			};
+ 		};
+ 
+ 		soc {
+ 			polling-delay = <1000>;
+ 			polling-delay-passive = <100>;
+ 			thermal-sensors = <&scpi_sensors0 3>;
++			trips {
++				soc_crit0: trip0 {
++					temperature = <80000>;
++					hysteresis = <2000>;
++					type = "critical";
++				};
++			};
+ 		};
+ 
+ 		big_cluster_thermal_zone: big-cluster {
+-- 
+2.30.2
+
meta-arm-bsp/recipes-kernel/linux/files/juno/0002-arm64-dts-Update-cache-properties-for-Arm-Ltd-platfo.patch new file +141 -0

141 lines not on this page · raw message

meta-arm-bsp/recipes-kernel/linux/files/juno/0003-arm64-dts-fvp-Add-SPE-to-Foundation-FVP.patch new file +38 -0
new file mode 100644
index 00000000..34dd0251
@@ -0,0 +1,38 @@
+From 3bd7a0219082c2c91570b81afc35f2aec57cade2 Mon Sep 17 00:00:00 2001
+From: James Clark <[email protected]>
+Date: Thu, 17 Nov 2022 10:25:36 +0000
+Subject: [PATCH] arm64: dts: fvp: Add SPE to Foundation FVP
+
+Add SPE DT node to FVP model. If the model doesn't support SPE (e.g.,
+turned off via parameter), the driver will skip the initialisation
+accordingly and thus is safe.
+
+Signed-off-by: James Clark <[email protected]>
+Link: https://lore.kernel.org/r/[email protected]
+Signed-off-by: Sudeep Holla <[email protected]>
+
+Signed-off-by: Jon Mason <[email protected]>
+Upstream-Status: Backport
+---
+ arch/arm64/boot/dts/arm/foundation-v8.dtsi | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/arch/arm64/boot/dts/arm/foundation-v8.dtsi b/arch/arm64/boot/dts/arm/foundation-v8.dtsi
+index c8bd23b1a7ba..029578072d8f 100644
+--- a/arch/arm64/boot/dts/arm/foundation-v8.dtsi
++++ b/arch/arm64/boot/dts/arm/foundation-v8.dtsi
+@@ -85,6 +85,11 @@ pmu {
+ 			     <GIC_SPI 63 IRQ_TYPE_LEVEL_HIGH>;
+ 	};
+ 
++	spe-pmu {
++		compatible = "arm,statistical-profiling-extension-v1";
++		interrupts = <GIC_PPI 5 IRQ_TYPE_LEVEL_HIGH>;
++	};
++
+ 	watchdog@2a440000 {
+ 		compatible = "arm,sbsa-gwdt";
+ 		reg = <0x0 0x2a440000 0 0x1000>,
+-- 
+2.30.2
+
meta-arm-bsp/recipes-kernel/linux/files/juno/0004-arm64-dts-fvp-Add-information-about-L1-and-L2-caches.patch new file +149 -0

149 lines not on this page · raw message

meta-arm-bsp/recipes-kernel/linux/files/juno/0005-ARM-dts-vexpress-align-LED-node-names-with-dtschema.patch new file +84 -0

84 lines not on this page · raw message

meta-arm-bsp/recipes-kernel/linux/linux-arm-platforms.inc +7 -0
index df906107..4f9bcfdf 100644
@@ -100,6 +100,13 @@ COMPATIBLE_MACHINE:juno = "juno"
 KBUILD_DEFCONFIG:juno = "defconfig"
 KCONFIG_MODE:juno = "--alldefconfig"
 FILESEXTRAPATHS:prepend:juno := "${ARMBSPFILESPATHS}"
+SRC_URI:append:juno = " \
+    file://0001-arm64-dts-juno-Add-thermal-critical-trip-points.patch \
+    file://0002-arm64-dts-Update-cache-properties-for-Arm-Ltd-platfo.patch \
+    file://0003-arm64-dts-fvp-Add-SPE-to-Foundation-FVP.patch \
+    file://0004-arm64-dts-fvp-Add-information-about-L1-and-L2-caches.patch \
+    file://0005-ARM-dts-vexpress-align-LED-node-names-with-dtschema.patch \
+    "
 
 #
 # Musca B1/S2 can't run Linux
Signature · 1 line
2.17.1