[OpenWrt-Devel] [PATCH 3/3] ipq806x: fix AP148 boot from NOR

Mathieu Olivari mathieu at codeaurora.org
Fri Mar 13 18:01:02 EDT 2015


This patch allows AP148 to boot from NOR flash.

As we're using a FIT image as kernel (which includes kernel bin + DTB)
we enable the MTD_SPLIT_FIT_FW kernel option, which will detect the FIT
image and automatically split the "firmware" partition into 2 MTD parts
(kernel + rootfs).

The rootfs will then be parsed and split between rootfs + rootfs_data,
as usual.

Signed-off-by: Mathieu Olivari <mathieu at codeaurora.org>
---
 target/linux/ipq806x/config-3.18                   |  3 ++
 .../patches-3.18/021-add-ap148-partitions.patch    | 35 ++++++++++++++++++++++
 2 files changed, 38 insertions(+)
 create mode 100644 target/linux/ipq806x/patches-3.18/021-add-ap148-partitions.patch

diff --git a/target/linux/ipq806x/config-3.18 b/target/linux/ipq806x/config-3.18
index e5ce0e4..97687ac 100644
--- a/target/linux/ipq806x/config-3.18
+++ b/target/linux/ipq806x/config-3.18
@@ -226,6 +226,9 @@ CONFIG_MSM_MMCC_8974=y
 CONFIG_MTD_CMDLINE_PARTS=y
 CONFIG_MTD_M25P80=y
 CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_SPLIT_FIRMWARE=y
+CONFIG_MTD_SPLIT_FIT_FW=y
+CONFIG_MTD_SPLIT_SUPPORT=y
 CONFIG_MULTI_IRQ_HANDLER=y
 CONFIG_MUTEX_SPIN_ON_OWNER=y
 CONFIG_NEED_DMA_MAP_STATE=y
diff --git a/target/linux/ipq806x/patches-3.18/021-add-ap148-partitions.patch b/target/linux/ipq806x/patches-3.18/021-add-ap148-partitions.patch
new file mode 100644
index 0000000..34eb9c0
--- /dev/null
+++ b/target/linux/ipq806x/patches-3.18/021-add-ap148-partitions.patch
@@ -0,0 +1,35 @@
+--- a/arch/arm/boot/dts/qcom-ipq8064-ap148.dts
++++ b/arch/arm/boot/dts/qcom-ipq8064-ap148.dts
+@@ -78,13 +78,28 @@
+ 					reg = <0>;
+ 
+ 					partition at 0 {
+-						label = "rootfs";
+-						reg = <0x0 0x1000000>;
++						label = "lowlevel_init";
++						reg = <0x0 0x1b0000>;
+ 					};
+ 
+ 					partition at 1 {
+-						label = "scratch";
+-						reg = <0x1000000 0x1000000>;
++						label = "u-boot";
++						reg = <0x1b0000 0x80000>;
++					};
++
++					partition at 2 {
++						label = "u-boot-env";
++						reg = <0x230000 0x40000>;
++					};
++
++					partition at 3 {
++						label = "caldata";
++						reg = <0x270000 0x40000>;
++					};
++
++					partition at 4 {
++						label = "firmware";
++						reg = <0x2b0000 0x1d50000>;
+ 					};
+ 				};
+ 			};
-- 
1.9.1
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list