86 lines
2.9 KiB
Diff
86 lines
2.9 KiB
Diff
|
From ddf04b2773e5316e2b645ee669d172e8a61b2d00 Mon Sep 17 00:00:00 2001
|
||
|
From: Serhii Serhieiev <adron@mstnt.com>
|
||
|
Date: Mon, 14 Feb 2022 06:50:56 +0200
|
||
|
Subject: [PATCH 04/18] mvebu: RB5009: start to use UBI
|
||
|
|
||
|
Now UBI on a NAND flash drive is used as rootfs.
|
||
|
The kernel is still located on a NOR flash drive in the form of a FIT image.
|
||
|
|
||
|
Signed-off-by: Serhii Serhieiev <adron@mstnt.com>
|
||
|
---
|
||
|
.../cortexa72/base-files/lib/upgrade/platform.sh | 3 +--
|
||
|
.../arm64/boot/dts/marvell/armada-7040-rb5009.dts | 12 +++---------
|
||
|
target/linux/mvebu/image/cortexa72.mk | 6 +-----
|
||
|
3 files changed, 5 insertions(+), 16 deletions(-)
|
||
|
|
||
|
diff --git a/target/linux/mvebu/cortexa72/base-files/lib/upgrade/platform.sh b/target/linux/mvebu/cortexa72/base-files/lib/upgrade/platform.sh
|
||
|
index d61e937cdc..55bdfb7264 100755
|
||
|
--- a/target/linux/mvebu/cortexa72/base-files/lib/upgrade/platform.sh
|
||
|
+++ b/target/linux/mvebu/cortexa72/base-files/lib/upgrade/platform.sh
|
||
|
@@ -36,8 +36,7 @@ platform_do_upgrade() {
|
||
|
legacy_sdcard_do_upgrade "$1"
|
||
|
;;
|
||
|
mikrotik,rb5009)
|
||
|
- PART_NAME=firmware
|
||
|
- default_do_upgrade "$1"
|
||
|
+ nand_do_upgrade "$1"
|
||
|
;;
|
||
|
*)
|
||
|
default_do_upgrade "$1"
|
||
|
diff --git a/target/linux/mvebu/files/arch/arm64/boot/dts/marvell/armada-7040-rb5009.dts b/target/linux/mvebu/files/arch/arm64/boot/dts/marvell/armada-7040-rb5009.dts
|
||
|
index 66c74451f0..5535f8ad89 100644
|
||
|
--- a/target/linux/mvebu/files/arch/arm64/boot/dts/marvell/armada-7040-rb5009.dts
|
||
|
+++ b/target/linux/mvebu/files/arch/arm64/boot/dts/marvell/armada-7040-rb5009.dts
|
||
|
@@ -129,8 +129,7 @@
|
||
|
reg = <0xe0000 0x20000>;
|
||
|
};
|
||
|
partition@7 {
|
||
|
- compatible = "denx,fit";
|
||
|
- label = "firmware";
|
||
|
+ label = "kernel";
|
||
|
reg = <0x100000 0xf00000>;
|
||
|
};
|
||
|
partition@8 {
|
||
|
@@ -158,13 +157,8 @@
|
||
|
#size-cells = <1>;
|
||
|
|
||
|
partition@0 {
|
||
|
- label = "RouterBoard NAND Boot";
|
||
|
- reg = <0x0 0x800000>;
|
||
|
- };
|
||
|
-
|
||
|
- partition@800000 {
|
||
|
- label = "RouterBoard NAND Main";
|
||
|
- reg = <0x800000 0x3f800000>;
|
||
|
+ label = "ubi";
|
||
|
+ reg = <0x0 0x40000000>;
|
||
|
};
|
||
|
};
|
||
|
};
|
||
|
diff --git a/target/linux/mvebu/image/cortexa72.mk b/target/linux/mvebu/image/cortexa72.mk
|
||
|
index fc4712a597..9f872d3afc 100644
|
||
|
--- a/target/linux/mvebu/image/cortexa72.mk
|
||
|
+++ b/target/linux/mvebu/image/cortexa72.mk
|
||
|
@@ -56,17 +56,13 @@ define Device/mikrotik_rb5009
|
||
|
DEVICE_DTS := armada-7040-rb5009
|
||
|
DEVICE_DTS_DIR := $(DTS_DIR)/marvell
|
||
|
$(call Device/FitImageLzma)
|
||
|
+ $(Device/NAND-128K)
|
||
|
DEVICE_VENDOR := MikroTik
|
||
|
DEVICE_MODEL := RB5009
|
||
|
SOC := armada-7040
|
||
|
KERNEL_LOADADDR := 0x22000000
|
||
|
KERNEL_INITRAMFS = $$(KERNEL)
|
||
|
KERNEL_INITRAMFS_SUFFIX := -fit-uImage.elf
|
||
|
- BLOCKSIZE := 64k
|
||
|
- IMAGE_SIZE := 15360k
|
||
|
- IMAGES := sysupgrade.bin
|
||
|
- IMAGE/sysupgrade.bin := append-kernel | pad-to $$(BLOCKSIZE) | \
|
||
|
- append-rootfs | pad-rootfs | check-size | append-metadata
|
||
|
DEVICE_PACKAGES += kmod-i2c-gpio
|
||
|
endef
|
||
|
TARGET_DEVICES += mikrotik_rb5009
|
||
|
--
|
||
|
2.42.1
|
||
|
|