[PATCH fstools] libfstools: support custom executable validating overlay

2022-01-04 Thread Rafał Miłecki
From: Rafał Miłecki This results in calling /usr/libexec/overlay_verify which may either modify overlay (e.g. wipe it) or refuse it. It's needed by targets that need to validate that "rootfs_data" doesn't come from a previous firmware. They may provide a script that will wipe such /outdated/

[PATCH fstools 2/2] libfstools: use variable for overlay mount-point

2022-01-04 Thread Rafał Miłecki
From: Rafał Miłecki This avoids duplicating path over and over. Signed-off-by: Rafał Miłecki --- libfstools/overlay.c | 19 ++- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/libfstools/overlay.c b/libfstools/overlay.c index 26f0d6e..6790337 100644 ---

[PATCH fstools 1/2] libfstools: get rid of "extroot_prefix" global variable

2022-01-04 Thread Rafał Miłecki
From: Rafał Miłecki Replace it with mount_extroot() argument. It's cleaner than a global var. Signed-off-by: Rafał Miłecki --- libfstools/extroot.c| 7 +-- libfstools/libfstools.h | 3 +-- libfstools/overlay.c| 3 +-- mount_root.c| 3 +-- 4 files changed, 4

Re: [RFC PATCH 0/5] add support mikrotik routerboard hex poe

2022-01-04 Thread Sander Vanheule
Hi, On Sun, 2021-12-26 at 20:41 +0200, Oskari Lemmela wrote: > RFC patchset because of following open questions: > > --- [...] > POE driver is implemented as a kernel module. Every port is separate > hwmon device with same label as the DSA port. [...] > > Should this be implemented in Realtek

[PATCH v2 2/3] mikrotik: add support for mtd erase of varying sizes

2022-01-04 Thread Oskari Lemmela
Add support for variable size erase blocks. Enable it in all targets with mikrotik devices. Signed-off-by: Oskari Lemmela Tested-by: Stefan Hellermann --- target/linux/ath79/mikrotik/config-default| 1 + target/linux/generic/config-5.10 | 1 +

[PATCH v2 0/3] mikrotik: make soft_config partition writable

2022-01-04 Thread Oskari Lemmela
In order to change boot loader variables in small soft_config partition SPI NOR need to support erasing 4k blocks. Adding support for variable size erase blocks and enable it in all targets with mikrotik devices. In some of mikrotik devices parent mtd device is read-only. It makes soft_config

[PATCH v2 1/3] generic: platform/mikrotik: allow soft_config writes without 4k sectors

2022-01-04 Thread Oskari Lemmela
Always allow writing to the soft_config partition. The kernel sets the partition to read-only mode if the mtd device does not support 4k erase size. Signed-off-by: Oskari Lemmela Tested-by: Stefan Hellermann --- .../drivers/platform/mikrotik/rb_softconfig.c | 17 +++-- 1 file

[PATCH v2 3/3] mikrotik: make soft_config writable

2022-01-04 Thread Oskari Lemmela
The parent partition must be writable. Otherwise, all child partitions are in read-only mode. Signed-off-by: Oskari Lemmela Tested-by: Stefan Hellermann --- target/linux/ath79/dts/ar9344_mikrotik_routerboard-sxt-5n.dtsi | 1 - target/linux/ath79/dts/qca9533_mikrotik_routerboard-16m.dtsi

Re: [PATCH 0/3] mikrotik: make soft_config partition writable

2022-01-04 Thread Oskari Lemmelä
Hi, On 21.12.2021 15.19, Stefan Hellermann wrote: > Hi, > > I tested the series on a Mikrotik LHG 2. > > # cat /proc/mtd > dev:size erasesize name > mtd0: 0002 0001 "RouterBoot" > mtd1: e000 0001 "bootloader1" > mtd2: 1000 0001 "hard_config" > mtd3: 1000

[PATCH fstools 2/2] Update / fix extroot comments

2022-01-04 Thread Rafał Miłecki
From: Rafał Miłecki Comment in start() was invalid as mount_extroot() doesn't handle any mounting internally. It was a misunderstanding coming from block.s function called just the same. Signed-off-by: Rafał Miłecki --- libfstools/overlay.c | 4 mount_root.c | 6 +- 2 files

[PATCH fstools 1/2] libfstools: check for overlay mounting errors

2022-01-04 Thread Rafał Miłecki
From: Rafał Miłecki Signed-off-by: Rafał Miłecki --- libfstools/overlay.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libfstools/overlay.c b/libfstools/overlay.c index 5de12c5..87fad11 100644 --- a/libfstools/overlay.c +++ b/libfstools/overlay.c @@ -416,6 +416,7 @@