[openwrt/openwrt] mpc85xx: add compressed zImage for mpc85xx

LEDE Commits lede-commits at lists.infradead.org
Sat Jun 1 05:42:01 PDT 2024


blocktrron pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/7d768a9ba671e8fb0be6f3b226dc286133009d1f

commit 7d768a9ba671e8fb0be6f3b226dc286133009d1f
Author: David Bauer <mail at david-bauer.net>
AuthorDate: Fri May 31 18:47:25 2024 +0200

    mpc85xx: add compressed zImage for mpc85xx
    
    Add a universal zImage which can be loaded by mpc85xx boards at
    load address 0x3000000. This allows boards to boot kernels larger than
    16MB even if the image is loaded temporarily from NAND at offset
    0x1000000 which some bootloaders do by default.
    
    Signed-off-by: David Bauer <mail at david-bauer.net>
---
 target/linux/mpc85xx/p1020/target.mk               |  2 +-
 ...powerpc-add-compressed-zImage-for-mpc85xx.patch | 40 ++++++++++++++++++++++
 ...powerpc-add-compressed-zImage-for-mpc85xx.patch | 40 ++++++++++++++++++++++
 3 files changed, 81 insertions(+), 1 deletion(-)

diff --git a/target/linux/mpc85xx/p1020/target.mk b/target/linux/mpc85xx/p1020/target.mk
index 27873b01c9..498d8981a1 100644
--- a/target/linux/mpc85xx/p1020/target.mk
+++ b/target/linux/mpc85xx/p1020/target.mk
@@ -1,5 +1,5 @@
 BOARDNAME:=P1020
-KERNEL_IMAGES:=simpleImage.ws-ap3710i simpleImage.ws-ap3825i simpleImage.hiveap-330
+KERNEL_IMAGES:=simpleImage.ws-ap3710i simpleImage.ws-ap3825i simpleImage.hiveap-330 zImage.la3000000
 
 define Target/Description
 	Build firmware images for Freescale P1020 based boards.
diff --git a/target/linux/mpc85xx/patches-6.1/010-powerpc-add-compressed-zImage-for-mpc85xx.patch b/target/linux/mpc85xx/patches-6.1/010-powerpc-add-compressed-zImage-for-mpc85xx.patch
new file mode 100644
index 0000000000..edf541a8cc
--- /dev/null
+++ b/target/linux/mpc85xx/patches-6.1/010-powerpc-add-compressed-zImage-for-mpc85xx.patch
@@ -0,0 +1,40 @@
+From b30ba76a980b3a9282f309c23e3bb0b0eb2c72cd Mon Sep 17 00:00:00 2001
+From: David Bauer <mail at david-bauer.net>
+Date: Thu, 30 May 2024 02:55:38 +0200
+Subject: [PATCH] powerpc: add compressed zImage for mpc85xx
+
+Add a universal zImage which can be loaded by mpc85xx boards at
+load address 0x3000000. This allows boards to boot kernels larger than
+16MB even if the image is loaded temporarily from NAND at offset
+0x1000000 which some bootloaders do by default.
+
+Signed-off-by: David Bauer <mail at david-bauer.net>
+---
+ arch/powerpc/boot/Makefile | 1 +
+ arch/powerpc/boot/wrapper  | 5 +++++
+ 2 files changed, 6 insertions(+)
+
+--- a/arch/powerpc/boot/Makefile
++++ b/arch/powerpc/boot/Makefile
+@@ -345,6 +345,7 @@ image-$(CONFIG_MPC836x_MDS)		+= cuImage.
+ image-$(CONFIG_ASP834x)			+= dtbImage.asp834x-redboot
+ 
+ # Board ports in arch/powerpc/platform/85xx/Kconfig
++image-y					+= zImage.la3000000
+ image-$(CONFIG_MPC8540_ADS)		+= cuImage.mpc8540ads
+ image-$(CONFIG_MPC8560_ADS)		+= cuImage.mpc8560ads
+ image-$(CONFIG_MPC85xx_CDS)		+= cuImage.mpc8541cds \
+--- a/arch/powerpc/boot/wrapper
++++ b/arch/powerpc/boot/wrapper
+@@ -254,6 +254,11 @@ if [ -n "$esm_blob" -a "$platform" != "p
+ fi
+ 
+ case "$platform" in
++la3000000)
++    binary=y
++    platformo="$object/fixed-head.o $object/of.o $object/epapr.o"
++    link_address='0x3000000'
++    ;;
+ of)
+     platformo="$object/of.o $object/epapr.o"
+     make_space=n
diff --git a/target/linux/mpc85xx/patches-6.6/010-powerpc-add-compressed-zImage-for-mpc85xx.patch b/target/linux/mpc85xx/patches-6.6/010-powerpc-add-compressed-zImage-for-mpc85xx.patch
new file mode 100644
index 0000000000..edf541a8cc
--- /dev/null
+++ b/target/linux/mpc85xx/patches-6.6/010-powerpc-add-compressed-zImage-for-mpc85xx.patch
@@ -0,0 +1,40 @@
+From b30ba76a980b3a9282f309c23e3bb0b0eb2c72cd Mon Sep 17 00:00:00 2001
+From: David Bauer <mail at david-bauer.net>
+Date: Thu, 30 May 2024 02:55:38 +0200
+Subject: [PATCH] powerpc: add compressed zImage for mpc85xx
+
+Add a universal zImage which can be loaded by mpc85xx boards at
+load address 0x3000000. This allows boards to boot kernels larger than
+16MB even if the image is loaded temporarily from NAND at offset
+0x1000000 which some bootloaders do by default.
+
+Signed-off-by: David Bauer <mail at david-bauer.net>
+---
+ arch/powerpc/boot/Makefile | 1 +
+ arch/powerpc/boot/wrapper  | 5 +++++
+ 2 files changed, 6 insertions(+)
+
+--- a/arch/powerpc/boot/Makefile
++++ b/arch/powerpc/boot/Makefile
+@@ -345,6 +345,7 @@ image-$(CONFIG_MPC836x_MDS)		+= cuImage.
+ image-$(CONFIG_ASP834x)			+= dtbImage.asp834x-redboot
+ 
+ # Board ports in arch/powerpc/platform/85xx/Kconfig
++image-y					+= zImage.la3000000
+ image-$(CONFIG_MPC8540_ADS)		+= cuImage.mpc8540ads
+ image-$(CONFIG_MPC8560_ADS)		+= cuImage.mpc8560ads
+ image-$(CONFIG_MPC85xx_CDS)		+= cuImage.mpc8541cds \
+--- a/arch/powerpc/boot/wrapper
++++ b/arch/powerpc/boot/wrapper
+@@ -254,6 +254,11 @@ if [ -n "$esm_blob" -a "$platform" != "p
+ fi
+ 
+ case "$platform" in
++la3000000)
++    binary=y
++    platformo="$object/fixed-head.o $object/of.o $object/epapr.o"
++    link_address='0x3000000'
++    ;;
+ of)
+     platformo="$object/of.o $object/epapr.o"
+     make_space=n




More information about the lede-commits mailing list