Re: [OpenWrt-Devel] [PATCH 3/3] treewide: sysupgrade: use $UPGRADE_BACKUP to check for backup

2019-09-15 Thread Rafał Miłecki
Hi, please use text/plain for your e-mails On 2019-09-15 11:54, m...@adrianschmutzler.de wrote: please also backport this to 19.07, since the variables for ath79 are still wrong there. That was on my list and I've just done that ___ openwrt-devel

Re: [OpenWrt-Devel] sysupgrade: extending firmware validation

2019-09-11 Thread Rafał Miłecki
On Wed, 11 Sep 2019 at 14:45, Vincent Wiemann wrote: > On 11.09.19 13:00, Rafał Miłecki wrote: > > On Wed, 11 Sep 2019 at 12:19, Vincent Wiemann > > wrote: > >> Hi Rafal, > >> > >> better error messages for sysupgrade is a good idea. > > > &

Re: [OpenWrt-Devel] sysupgrade: extending firmware validation

2019-09-11 Thread Rafał Miłecki
On Wed, 11 Sep 2019 at 12:19, Vincent Wiemann wrote: > Hi Rafal, > > better error messages for sysupgrade is a good idea. Hi & let me ask shortly. Did you follow the recent development? Saw my improvements & pending patches? ___ openwrt-devel mailing

Re: [OpenWrt-Devel] sysupgrade: extending firmware validation

2019-09-11 Thread Rafał Miłecki
On Wed, 19 Jun 2019 at 16:07, Rafał Miłecki wrote: > Currently targets can implement platform_check_image() that verifies > submitted firmware file. It may return a success or failure. > > I'm looking for more complex implementation/solution. I'd like > firmware validation to pr

[OpenWrt-Devel] [PATCH procd] system: sysupgrade: send reply on error

2019-09-11 Thread Rafał Miłecki
From: Rafał Miłecki This provides some meaningful info on why sysupgrade has failed. Signed-off-by: Rafał Miłecki --- system.c | 25 + 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/system.c b/system.c index 2a5d5bc..4068e64 100644 --- a/system.c +++ b

[OpenWrt-Devel] [PATCH procd] system: refuse sysupgrade with backup if it's unsupported

2019-09-11 Thread Rafał Miłecki
From: Rafał Miłecki Don't allow it if validation methods marked firmware as not supporting a backup. Signed-off-by: Rafał Miłecki --- system.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/system.c b/system.c index 98fcb66..2a5d5bc 100644 --- a/system.c +++ b

Re: [OpenWrt-Devel] [PATCH 3/3] treewide: sysupgrade: use $UPGRADE_BACKUP to check for backup

2019-09-06 Thread Rafał Miłecki
On 2019-09-06 15:05, Adrian Schmutzler wrote: diff --git a/target/linux/ipq40xx/base-files/lib/upgrade/openmesh.sh b/target/linux/ipq40xx/base-files/lib/upgrade/openmesh.sh index e313562017..8e02186eb8 100644 --- a/target/linux/ipq40xx/base-files/lib/upgrade/openmesh.sh +++

[OpenWrt-Devel] [PATCH 3/3] treewide: sysupgrade: use $UPGRADE_BACKUP to check for backup

2019-09-05 Thread Rafał Miłecki
From: Rafał Miłecki Now that $UPGRADE_BACKUP is set conditionally there is no need to check the $UPGRADE_OPT_SAVE_CONFIG anymore. All conditions can be simplified. Signed-off-by: Rafał Miłecki --- package/base-files/files/lib/upgrade/common.sh | 2 +- package/base-files/files/lib

[OpenWrt-Devel] [PATCH procd 2/3] sysupgrade: support "backup" attribute

2019-09-05 Thread Rafał Miłecki
From: Rafał Miłecki This new attribute allows passing path of the backup archive. It provides much more flexibility than hardcoding /tmp/sysupgrade.tgz. It may help avoiding some cp/mv for user-provided backup archive. Signed-off-by: Rafał Miłecki --- initd/preinit.c | 2 +- system.c

[OpenWrt-Devel] [PATCH 0/3] sysupgrade: support custom backup paths

2019-09-05 Thread Rafał Miłecki
From: Rafał Miłecki Up to now preserving a backup over sysupgrade required using a magic path /tmp/sysupgrade.tgz. It was a bad design (hardcoded path) and required moving/copying already existing backup archives in some cases. This patchset makes sysupgrade more generic as it allows specifying

[OpenWrt-Devel] [PATCH 1/3] base-files: sysupgrade: pass "backup" ubus attribute

2019-09-05 Thread Rafał Miłecki
From: Rafał Miłecki This explicitly tells procd what backup file should be used during sysupgrade (if any). It's much more generic this way compared to the magic /tmp/sysupgrade.tgz file that had to be created before a call. Signed-off-by: Rafał Miłecki --- package/base-files/files/sbin

[OpenWrt-Devel] [PATCH] base-files: validate firmware for compatibility with backup

2019-09-05 Thread Rafał Miłecki
From: Rafał Miłecki This allows platform code to check if firmware image can be used with preserving a backup. It may be used e.g. when installing vendor firmwares that won't restore appended backup archive. Suggested-by: Luis Araneda Signed-off-by: Rafał Miłecki --- .../base-files/files/usr

Re: [OpenWrt-Devel] [PATCH] treewide: use new procd sysupgrade $UPGRADE_BACKUP variable

2019-09-05 Thread Rafał Miłecki
On 05.09.2019 09:13, Rafał Miłecki wrote: From: Rafał Miłecki It's a variable set by procd that should replace hardcoded /tmp/sysupgrade.tgz. My yesterday explanation & question regarding this work: [09:44] i'm planning some cleanups for sysupgrade + handling config backups [09:44] r

[OpenWrt-Devel] [PATCH procd] sysupgrade: set UPGRADE_BACKUP env variable

2019-09-05 Thread Rafał Miłecki
From: Rafał Miłecki It points to the backup file to use duing sysupgrace process. Right now it's hardcoded to the /tmp/sysupgrade.tgz. Once all cleanups are in place "sysupgrade" ubus method should be extended to allow passing any custom path. Signed-off-by: Rafał Miłecki --- sysupg

[OpenWrt-Devel] [PATCH] treewide: use new procd sysupgrade $UPGRADE_BACKUP variable

2019-09-05 Thread Rafał Miłecki
From: Rafał Miłecki It's a variable set by procd that should replace hardcoded /tmp/sysupgrade.tgz. Signed-off-by: Rafał Miłecki --- package/base-files/files/lib/upgrade/common.sh | 2 +- package/base-files/files/lib/upgrade/stage2 | 1 - target/linux/apm821xx/base

[OpenWrt-Devel] [PATCH 2/2] treewide: when copying a backup file always specify dest name

2019-09-04 Thread Rafał Miłecki
From: Rafał Miłecki $CONF_TAR shouldn't be assumed to always point to the sysupgrade.tgz. This change makes code more generic and allows refactoring $CONF_TAR. Signed-off-by: Rafał Miłecki --- target/linux/apm821xx/base-files/lib/upgrade/wdbook.sh | 2 +- target/linux/brcm2708/base-files

[OpenWrt-Devel] [PATCH 1/2] treewide: don't hardcode "sysupgrade.tgz" file name

2019-09-04 Thread Rafał Miłecki
From: Rafał Miłecki 1) Add BACKUP_FILE and use it when copying an archive to be restored after sysupgrade (on the next preinit). 2) Use CONF_TAR for copying backup prepared by the /sbin/sysupgrade Signed-off-by: Rafał Miłecki --- package/base-files/files/lib/upgrade/common.sh | 2

Re: [OpenWrt-Devel] RPi Zero W: broken serial since 4.19 switch

2019-09-03 Thread Rafał Miłecki
On Mon, 2 Sep 2019 at 16:08, Rafał Miłecki wrote: > Starting with the commit 42954857190b ("brcm2708: add linux 4.19 > support") I don't get any output over my Raspberry Pi Zero W serial > console. OpenWrt still boots fine (I can see full bootlog on a screen). Fixed b

Re: [OpenWrt-Devel] [PATCH procd] system: reject sysupgrade of broken firmware images

2019-09-03 Thread Rafał Miłecki
On Tue, 3 Sep 2019 at 18:57, Luis Araneda wrote: > On Sun, Sep 1, 2019 at 5:09 AM Rafał Miłecki wrote: > > On Sun, 1 Sep 2019 at 06:13, Reiner Karlsberg > > wrote: > > > This needs to be handled very carefully, not to break > > > actual usage of -F. >

Re: [OpenWrt-Devel] [PATCH] fstools: fix libblkid-tiny ntfs uuid detection

2019-09-03 Thread Rafał Miłecki
On Tue, 3 Sep 2019 at 18:00, z @ wrote: > detect ntfs uuid fails because blkid_probe_get_buffer override memory of buf, > so move blkid_probe_sprintf_uuid to before blkid_probe_get_buffer > > Signed-off-by: Haiqiang Xu I'm not sure about this solution. It's a workaround for the issue I reported

[OpenWrt-Devel] [PATCH] base-files: pass "force" parameter to the "sysupgrade" call

2019-09-03 Thread Rafał Miłecki
From: Rafał Miłecki This makes sysupgrade work with the most recent procd that validates firmware before proceeding. Signed-off-by: Rafał Miłecki --- package/base-files/files/sbin/sysupgrade | 3 +++ 1 file changed, 3 insertions(+) diff --git a/package/base-files/files/sbin/sysupgrade b

[OpenWrt-Devel] [PATCH procd] system: reject sysupgrade of invalid firmware images by default

2019-09-03 Thread Rafał Miłecki
From: Rafał Miłecki This validation step can be bypassed by passing "force" argument. This is very similar to the /sbin/sysupgrade behavior and --force. Signed-off-by: Rafał Miłecki --- system.c | 14 +++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/

Re: [OpenWrt-Devel] [PATCH] fstools: mkdev: Avoid out of bounds read

2019-09-02 Thread Rafał Miłecki
On Mon, 2 Sep 2019 at 22:33, Hauke Mehrtens wrote: > readlink() truncates and does not null terminate the string when more > bytes would be written than available. Just increase the char array by > one and assume that there is a problem when all bytes are needed. > > Coverity: #1330087, #1329991

Re: [OpenWrt-Devel] RPi Zero W: broken serial since 4.19 switch

2019-09-02 Thread Rafał Miłecki
On Mon, 2 Sep 2019 at 16:50, Álvaro Fernández Rojas wrote: > Did you try adding “enable_uart=1” to config.txt? > I removed it from config.txt because according to > https://www.raspberrypi.org/documentation/configuration/uart.md it affects > the core frequency slowing down some models. It

Re: [OpenWrt-Devel] [PATCH] bcm53xx: add generic subtarget

2019-09-01 Thread Rafał Miłecki
t (we already have bin/targets/bcm53xx/generic/). Acked-by: Rafał Miłecki ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Re: [OpenWrt-Devel] [PATCH procd] system: reject sysupgrade of broken firmware images

2019-09-01 Thread Rafał Miłecki
On Sun, 1 Sep 2019 at 06:13, Reiner Karlsberg wrote: > This needs to be handled very carefully, not to break > actual usage of -F. > I had to use -F couple of times, usually when downgrading > installed firmware, but with change of name over time. > Typical example: Change of image name for the

Re: [OpenWrt-Devel] [PATCH procd] system: reject sysupgrade of broken firmware images

2019-09-01 Thread Rafał Miłecki
On 2019-09-01 00:14, Karl Palsson wrote: What's the point of "force" if it doesn't force? Are we going to add a second -F to "really force" ? Or is it going to be "oh, -F failed for some lame reason, so I'll use mtd write, and still complain anyway" Firmware can be marked as: 1) Invalid 2)

[OpenWrt-Devel] [PATCH procd] system: reject sysupgrade of broken firmware images

2019-08-30 Thread Rafał Miłecki
From: Rafał Miłecki This uses recently added "validate_firmware_image" to validate passed firmware. If it happens to be invalid and marked as impossible to force then sysupgrade simply exits with an error. This change is needed to avoid bricking devices with some totally broken image

Re: [OpenWrt-Devel] [PATCH procd] system: add "validate_firmware_image" ubus method

2019-08-30 Thread Rafał Miłecki
On 30.08.2019 09:28, Rafał Miłecki wrote: This new method allows validating firmware image (stored on a device) using ubus. It uses new executable helper that provides detailed info about firmware image. The point of this method is to allow user interfaces provide various info before starting

[OpenWrt-Devel] [PATCH procd] system: add "validate_firmware_image" ubus method

2019-08-30 Thread Rafał Miłecki
From: Rafał Miłecki This new method allows validating firmware image (stored on a device) using ubus. It uses new executable helper that provides detailed info about firmware image. The point of this method is to allow user interfaces provide various info before starting actual upgrade process

Re: [OpenWrt-Devel] [PATCH 1/2] base-files: use JSON for storing firmware validation info

2019-08-30 Thread Rafał Miłecki
On Fri, 23 Aug 2019 at 08:15, Rafał Miłecki wrote: > So far firmware validation result was binary limited: it was either > successful or not. That meant various limitations, e.g.: > 1) Lack of proper feedback on validation problems > 2) No way of marking firmware as totally broken

Re: [OpenWrt-Devel] [PATCH 2/2] brcm47xx: extend firmware validation

2019-08-30 Thread Rafał Miłecki
On Fri, 23 Aug 2019 at 08:15, Rafał Miłecki wrote: > This provides TRX validation result, so final JSON may look like: > { > "tests": { > "fwtool_signature": true, > "fwtool_device_match&quo

[OpenWrt-Devel] libblkid-tiny: bugged buffer management

2019-08-26 Thread Rafał Miłecki
I noticed a bug in "block" tool behavior. It was providing inconsistent UUIDs for my disks with NTFS partitions. Please check UUID of /dev/sda1 in following examples: root@OpenWrt:/# block info /dev/mtdblock4: UUID="8463a403-99b3cf92-d2b7996f-c4ede4f4" VERSION="4.0" MOUNT="/rom"

[OpenWrt-Devel] [PATCH 2/2] brcm47xx: extend firmware validation

2019-08-23 Thread Rafał Miłecki
From: Rafał Miłecki This provides TRX validation result, so final JSON may look like: { "tests": { "fwtool_signature": true, "fwtool_device_match": true, "trx_valid": true },

[OpenWrt-Devel] [PATCH 1/2] base-files: use JSON for storing firmware validation info

2019-08-23 Thread Rafał Miłecki
From: Rafał Miłecki So far firmware validation result was binary limited: it was either successful or not. That meant various limitations, e.g.: 1) Lack of proper feedback on validation problems 2) No way of marking firmware as totally broken (impossible to install) This change introduces JSON

Re: [OpenWrt-Devel] [PATCH procd] system: support passing "options" to the "sysupgrade" ubus method

2019-08-22 Thread Rafał Miłecki
On Sat, 17 Aug 2019 at 12:31, Jo-Philipp Wich wrote: > > [...] > > + > > + blobmsg_for_each_attr(option, options, rem) { > > + const char *prefix = "UPGRADE_OPT_"; > > + char *name = malloc(strlen(prefix) + > > strlen(blobmsg_name(option))); > > + char

Re: [OpenWrt-Devel] [PATCH v2] ramips: add support for Xiaomi Mi Wi-Fi Router 3G v2

2019-08-22 Thread Rafał Miłecki
On Tue, 13 Aug 2019 at 20:25, Paul Fertser wrote: > diff --git a/target/linux/ramips/dts/mt7621_xiaomi_mir3g-v2.dts > b/target/linux/ramips/dts/mt7621_xiaomi_mir3g-v2.dts > new file mode 100644 > index 00..a1963d0072 > --- /dev/null > +++

Re: [OpenWrt-Devel] [PATCH RFC] base-files: add /sbin/check_image

2019-08-19 Thread Rafał Miłecki
On 19.08.2019 10:40, Rafał Miłecki wrote: This new executable allows validating firmware file. Its main advantage is JSON output which should allow all kind of UIs to provide a meaningful feedback on possible validation issues. Used design allows checking functions to mark firmware as totally

[OpenWrt-Devel] [PATCH RFC] base-files: add /sbin/check_image

2019-08-19 Thread Rafał Miłecki
From: Rafał Miłecki This new executable allows validating firmware file. Its main advantage is JSON output which should allow all kind of UIs to provide a meaningful feedback on possible validation issues. Used design allows checking functions to mark firmware as totally unsupported (FORCEABLE=0

[OpenWrt-Devel] [PATCH procd V2] system: support passing "options" to the "sysupgrade" ubus method

2019-08-16 Thread Rafał Miłecki
From: Rafał Miłecki Object passed as "options" gets translated into environment variables UPGRADE_OPT_*. E.g. "options": { "foo": 5 } will result in setting UPGRADE_OPT_FOO=5. This allows stage2 sysupgrade to get options explicitly. So far it was guessing what t

[OpenWrt-Devel] [PATCH 2/2] treewide: sysupgrade: pass "save_partitions" option to the "sysupgrade" method

2019-08-16 Thread Rafał Miłecki
From: Rafał Miłecki This explicitly lets stage2 know if partitions should be preserved. No more "touch /tmp/sysupgrade.always.overwrite.bootdisk.partmap" hack. Signed-off-by: Rafał Miłecki --- package/base-files/files/lib/upgrade/stage2 | 5 - package/base-files/

[OpenWrt-Devel] [PATCH 1/2] base-files: pass "save_config" option to the "sysupgrade" method

2019-08-16 Thread Rafał Miłecki
From: Rafał Miłecki This explicitly lets stage2 know if config should be preserved. Signed-off-by: Rafał Miłecki --- package/base-files/files/lib/upgrade/common.sh | 2 +- package/base-files/files/lib/upgrade/do_stage2 | 2 +- package/base-files/files/lib/upgrade/stage2| 2 -- package

[OpenWrt-Devel] [PATCH procd] system: support passing "options" to the "sysupgrade" ubus method

2019-08-16 Thread Rafał Miłecki
From: Rafał Miłecki Object passed as "options" gets translated into environment variables UPGRADE_OPT_*. E.g. "options": { "foo": 5 } will result in setting UPGRADE_OPT_FOO=5. This allows stage2 sysupgrade to get options explicitly. So far it was guessing what t

[OpenWrt-Devel] [PATCH] kernel: drop Fon(Foxconn) parser matching for the "firmware" partition

2019-08-06 Thread Rafał Miłecki
From: Rafał Miłecki This parser's matching function appears to be too generic as it matches e.g. Buffalo WZR-HP-G300NH. That results in incorrect parts parsing. Luckily this parser is needed by Fon FON2601 only which uses DT-based ramips target. It means we can depend on mtd subsystem matching

[OpenWrt-Devel] [PATCH] lua: create "lua" symlink in staging dir

2019-07-23 Thread Rafał Miłecki
From: Rafał Miłecki Packages using host lua expect /bin/lua which has been recently renamed to /bin/lua5.1. Create symlink for them. This fixes e.g. following error with gluon: /bin/sh: 1: openwrt/staging_dir/hostpkg/bin/lua: not found Fixes: fe59b46ca7e0 ("lua: include version n

[OpenWrt-Devel] [PATCH 1/2] treewide: sysupgrade: get rid of platform_nand_pre_upgrade()

2019-07-17 Thread Rafał Miłecki
From: Rafał Miłecki 1) nand_do_upgrade() is always called by a target code 2) nand_do_upgrade() starts with calling platform_nand_pre_upgrade() It means there is no need for the platform_nand_pre_upgrade() callback at all. All code that was present there could bo moved & simplly ca

[OpenWrt-Devel] [PATCH 2/2] base-files: drop support for the platform_nand_pre_upgrade()

2019-07-17 Thread Rafał Miłecki
From: Rafał Miłecki No target uses it anymore. All code from that callback was moved into the platform_do_upgrade(). Signed-off-by: Rafał Miłecki --- package/base-files/Makefile | 2 +- package/base-files/files/lib/upgrade/nand.sh | 4 2 files changed, 1 insertion(+), 5

[OpenWrt-Devel] [PATCH] layerscape: sysupgrade: get rid of platform_pre_upgrade()

2019-07-17 Thread Rafał Miłecki
From: Rafał Miłecki 1) RAMFS_COPY_BIN and RAMFS_COPY_DATA can be defined at top of the file like it's done for all other targets. 2) fw_printenv.lock can be created one step later in the platform_do_upgrade(). It seems to be working well on many other targets. Signed-off-by: Rafał

[OpenWrt-Devel] [PATCH] imx6: sysupgrade: document Apalis code handiing rootfs_data

2019-07-16 Thread Rafał Miłecki
From: Rafał Miłecki It should help people understand that code and prevent breaking it during some cleanups. Signed-off-by: Rafał Miłecki --- target/linux/imx6/base-files/lib/upgrade/platform.sh | 4 1 file changed, 4 insertions(+) diff --git a/target/linux/imx6/base-files/lib/upgrade

Re: [OpenWrt-Devel] [PATCH 2/3] imx6: get rid of platform_pre_upgrade()

2019-07-16 Thread Rafał Miłecki
On 2019-07-12 14:05, Rafał Miłecki wrote: From: Rafał Miłecki The only step between platform_pre_upgrade() and platform_do_upgrade() is switching to ramdisk. It should be fine to call "jffs2reset" & "umount" from the later callback and get rid of the first one. Sign

[OpenWrt-Devel] [PATCH] libroxml: bump to the 3.0.2 version

2019-07-14 Thread Rafał Miłecki
From: Rafał Miłecki * Fix for memory leak regression * Support for (un)escaping Signed-off-by: Rafał Miłecki --- package/libs/libroxml/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/libs/libroxml/Makefile b/package/libs/libroxml/Makefile index

[OpenWrt-Devel] [PATCH] orion: sysupgrade: change platform_check_image() args validation

2019-07-14 Thread Rafał Miłecki
From: Rafał Miłecki sysupgrade passes image to check as argument so use $# instead of $ARGC Signed-off-by: Rafał Miłecki --- target/linux/orion/generic/base-files/lib/upgrade/platform.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/linux/orion/generic/base-files

[OpenWrt-Devel] [PATCH] mvebu: sysupgrade: drop platform_copy_config_sdcard() argument

2019-07-14 Thread Rafał Miłecki
From: Rafał Miłecki That function doesn't take any arguments so don't pass anything when calling it. Signed-off-by: Rafał Miłecki --- target/linux/mvebu/base-files/lib/upgrade/platform.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/linux/mvebu/base-files/lib

[OpenWrt-Devel] [PATCH] treewide: sysupgrade: don't use $ARGV in platform_do_upgrade()

2019-07-14 Thread Rafał Miłecki
From: Rafał Miłecki stage2 passes image path to platform_do_upgrade() as an argument so it can be simply accessed using $1 Signed-off-by: Rafał Miłecki --- .../base-files/lib/upgrade/platform.sh | 4 ++-- .../ar71xx/base-files/lib/upgrade/dir825.sh| 4 ++-- .../ar71xx/base-files

[OpenWrt-Devel] [PATCH 2/2] base-files: don't set ARGV and ARGC

2019-07-14 Thread Rafał Miłecki
From: Rafał Miłecki Those are not used by any image check function anymore. Signed-off-by: Rafał Miłecki --- package/base-files/files/sbin/sysupgrade | 3 --- 1 file changed, 3 deletions(-) diff --git a/package/base-files/files/sbin/sysupgrade b/package/base-files/files/sbin/sysupgrade

[OpenWrt-Devel] [PATCH 1/2] mvebu: sysupgrade: don't use $ARGV in platform_check_image()

2019-07-14 Thread Rafał Miłecki
From: Rafał Miłecki sysupgrade passes image path to platform_check_image() as an argument so it can be simply accessed using $1 Signed-off-by: Rafał Miłecki --- target/linux/mvebu/base-files/lib/upgrade/platform.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target

Re: [OpenWrt-Devel] [PATCH] ath79: add support for gl-ar750

2019-07-13 Thread Rafał Miłecki
On Wed, 26 Jun 2019 at 12:27, Luochongjun wrote: > This patch supports gl-ar750, which was previously supported by ar71xx. > > Specification: > - SOC: QCA9531 (650MHz) > - Flash: 16 MiB (W25Q128FVSG) > - RAM: 128 MiB DDR2 > - Ethernet: 10/100: 2xLAN + 10/100: 1xWAN > - Wireless: 2.4GHz (bgn) and

[OpenWrt-Devel] [PATCH 3/3] ramips: get rid of platform_pre_upgrade()

2019-07-12 Thread Rafał Miłecki
From: Rafał Miłecki The only step between platform_pre_upgrade() and platform_do_upgrade() is switching to ramdisk. It should be fine to "mtd erase firmware" from the later callback and get rid of the first one. Signed-off-by: Rafał Miłecki --- .../ramips/base-files/lib/upgrade/p

[OpenWrt-Devel] [PATCH 1/3] ar71xx: get rid of platform_pre_upgrade()

2019-07-12 Thread Rafał Miłecki
From: Rafał Miłecki The only step between platform_pre_upgrade() and platform_do_upgrade() is switching to ramdisk. It should be fine to "mtd erase firmware" from the later callback and get rid of the first one. Signed-off-by: Rafał Miłecki --- .../ar71xx/base-files/lib/upgrade/p

[OpenWrt-Devel] [PATCH 2/3] imx6: get rid of platform_pre_upgrade()

2019-07-12 Thread Rafał Miłecki
From: Rafał Miłecki The only step between platform_pre_upgrade() and platform_do_upgrade() is switching to ramdisk. It should be fine to call "jffs2reset" & "umount" from the later callback and get rid of the first one. Signed-off-by: Rafał Miłecki --- .../imx

Re: [OpenWrt-Devel] [PATCH 1/2] ramips: Update ZBT WE1026 DTS-files

2019-07-03 Thread Rafał Miłecki
On Sun, 23 Jun 2019 at 11:25, Kristian Evensen wrote: > This commit makes the following changes to the WE1026 DTS-files: > > * The parts that are unique to the -5G-version (LED and 5GHz wifi) > are moved to a separate file, so that WE1026.dtsi can be referenced also > by the DTS for the -H

[OpenWrt-Devel] [PATCH] base-files: move stage2 upgrade to separated file

2019-07-03 Thread Rafał Miłecki
From: Rafał Miłecki do_upgrade_stage2() isn't really any common code. It isn't used anywhere except for /sbin/sysupgrade that passes it to the stage2. Moving its code to separated file also simplifies COMMAND variable. Signed-off-by: Rafał Miłecki --- .../base-files/files/lib/upgrade

Re: [OpenWrt-Devel] Lots of core packages fail in phase2(?) buildbot - maybe due to lua changes?

2019-07-03 Thread Rafał Miłecki
On 2019-07-03 06:59, Hannu Nyman wrote: I looked at the packages buildbot faillogs for OpenWrt master and the package download directories, and noticed that quite a lot of the core OpenWrt packages fail to build in the buildbot at the moment, like ubox, ubus, firewall, uci, netifd... and they

[OpenWrt-Devel] [PATCH 2/2] base-files: drop support for NAND upgrade in platform_pre_upgrade()

2019-07-02 Thread Rafał Miłecki
From: Rafał Miłecki With bcm53xx switched to the new procedure there is no more need for keeping that backward compatibility code. Signed-off-by: Rafał Miłecki --- package/base-files/files/lib/upgrade/common.sh | 4 +--- package/base-files/files/lib/upgrade/nand.sh | 9 - package

[OpenWrt-Devel] [PATCH 1/2] bcm53xx: sysupgrade: call nand_do_upgrade() from platform_do_upgrade()

2019-07-02 Thread Rafał Miłecki
From: Rafał Miłecki Calling nand_do_upgrade() from platform_pre_upgrade() was obsoleted in the commit 30f61a34b4cf ("base-files: always use staged sysupgrade"). This change brings bcm53xx in sync with other targets and allows dropping backward compatibility code. It shouldn't chang

[OpenWrt-Devel] [PATCH] base-files: drop unused jffs2_copy_config()

2019-07-02 Thread Rafał Miłecki
From: Rafał Miłecki Its last usage was dropped back in 2013 in the commit b95bdc8ab56e ("kernel/base-files: clean up old code related to refreshing mtd partitions, it is no longer used anywhere"). Signed-off-by: Rafał Miłecki --- package/base-files/files/lib/upgrade/comm

[OpenWrt-Devel] [PATCH] lua: fix build with MacOS's make

2019-06-28 Thread Rafał Miłecki
From: Rafał Miłecki It apparently requires passing V variable explicitly. Fixes: fe59b46ca7e0 ("lua: include version number in installed files") Reported-by: Kevin Darbyshire-Bryant Signed-off-by: Rafał Miłecki --- .../lua/patches-host/001-include-version-number.pa

Re: [OpenWrt-Devel] [PATCH V2 2/2] lua: rename package to lua5.1

2019-06-28 Thread Rafał Miłecki
On 22.06.2019 14:11, Rafał Miłecki wrote: From: Rafał Miłecki This will allow adding packages for new Lua releases cleanly. At the same time it doesn't break existing packages thanks to the PROVIDES. Signed-off-by: Rafał Miłecki This causes: WARNING: Makefile 'package/feeds/luci/luci

Re: [OpenWrt-Devel] [PATCH V2 1/2] lua: include version number in installed files

2019-06-27 Thread Rafał Miłecki
On 22.06.2019 14:11, Rafał Miłecki wrote: From: Rafał Miłecki This will allow installing Lua 5.1 and newer versions at the same time. Signed-off-by: Rafał Miłecki --- V2: Bump PKG_RELEASE I'm going to fix: Applying ./patches-host/010-lua-5.1.3-lnum-full-260308.patch using plaintext

Re: [OpenWrt-Devel] sysupgrade: extending firmware validation

2019-06-24 Thread Rafał Miłecki
On 19.06.2019 16:07, Rafał Miłecki wrote: My question is: what do you find the best way of implementing it? Today IRC chat log for a reference: [12:21] guys, would you check my "sysupgrade: extending firmware validation" e-mail? [12:21] jow: that possibly affects LuCI [12:21] b

Re: [OpenWrt-Devel] [PATCH] ramips: mt7621: Add new device AsiaRF AP7621-001

2019-06-22 Thread Rafał Miłecki
On 21.06.2019 17:50, Daniel Danzberger wrote: diff --git a/target/linux/ramips/dts/AP7621-001.dts b/target/linux/ramips/dts/AP7621-001.dts new file mode 100644 index 00..587c26457e --- /dev/null +++ b/target/linux/ramips/dts/AP7621-001.dts @@ -0,0 +1,157 @@ +/dts-v1/; Please include

[OpenWrt-Devel] [PATCH] lua5.3: package Lua 5.3 version

2019-06-22 Thread Rafał Miłecki
From: Rafał Miłecki This package provides an interpreter and compiler for Lua 5.3.5. It has been decided to use separated package due to a backward incompatibility of Lua 5.2 and 5.3. This package/version: 1) Does not include lnum patch as its author didn't decide to port it to the new

[OpenWrt-Devel] [PATCH V2 2/2] lua: rename package to lua5.1

2019-06-22 Thread Rafał Miłecki
From: Rafał Miłecki This will allow adding packages for new Lua releases cleanly. At the same time it doesn't break existing packages thanks to the PROVIDES. Signed-off-by: Rafał Miłecki --- V2: Update /install sections to make packages work actually --- package/utils/{lua => lua5.1}/Makef

Re: [OpenWrt-Devel] [PATCH 1/2] lua: include version number in installed files

2019-06-21 Thread Rafał Miłecki
On Fri, 21 Jun 2019 at 14:30, Rafał Miłecki wrote: > From: Rafał Miłecki > > This will allow installing Lua 5.1 and newer versions at the same time. I forgot to bump PKG_RELEASE. I'll handle that in V2 or when pushing it. ___ openwrt-deve

[OpenWrt-Devel] [PATCH 2/2] lua: rename package to lua5.1

2019-06-21 Thread Rafał Miłecki
From: Rafał Miłecki This will allow adding packages for new Lua releases cleanly. At the same time it doesn't break existing packages thanks to the PROVIDES. Signed-off-by: Rafał Miłecki --- package/utils/{lua => lua5.1}/Makefile| 36 ++- .../001-include-vers

[OpenWrt-Devel] [PATCH 1/2] lua: include version number in installed files

2019-06-21 Thread Rafał Miłecki
From: Rafał Miłecki This will allow installing Lua 5.1 and newer versions at the same time. Signed-off-by: Rafał Miłecki --- package/utils/lua/Makefile| 6 ++- .../001-include-version-number.patch | 48 +++ .../patches/001-include-version

Re: [OpenWrt-Devel] [PATCH] gemini: Make root filesystem writeable

2019-05-26 Thread Rafał Miłecki
On 24.05.2019 18:31, Linus Walleij wrote: The squashfs+jffs2 root filesystem only came up as read-only and the config would not take: [ 25.600237] mount_root: Could not open mtd device: /dev/mtd4 [ 25.634674] mount_root: reading rootfs_data failed [ 25.665346] mount_root: Could not open

Re: [OpenWrt-Devel] [PATCH] ramips: add support for Xiaomi Mi Router 4A (100M Edition)

2019-05-06 Thread Rafał Miłecki
On Sun, 5 May 2019 at 13:11, wrote: > diff --git a/target/linux/ramips/dts/XIAOMI-MIR4A-100M.dts > b/target/linux/ramips/dts/XIAOMI-MIR4A-100M.dts > new file mode 100644 > index 00..716b66ac44 > --- /dev/null > +++ b/target/linux/ramips/dts/XIAOMI-MIR4A-100M.dts > @@ -0,0 +1,146 @@ >

Re: [OpenWrt-Devel] [PATCH] kernel: iio: Fix BMP280 Auto probing

2019-05-02 Thread Rafał Miłecki
On Tue, 30 Apr 2019 at 17:58, Robert Marko wrote: > Currently Auto probing for BMP/BME280 does not work because kernel > module name in the call is not correct. > Package name was used instead of kernel module name. > > Signed-off-by: Robert Marko Looks correct, pushed, thanks!

Re: [OpenWrt-Devel] [PATCH] ramips: Add support for Head Weblink HDRM200

2019-05-02 Thread Rafał Miłecki
On Thu, 25 Apr 2019 at 14:18, Kristian Evensen wrote: > diff --git a/target/linux/ramips/dts/HDRM200.dts > b/target/linux/ramips/dts/HDRM200.dts > new file mode 100644 > index 00..b076f30978 > --- /dev/null > +++ b/target/linux/ramips/dts/HDRM200.dts > @@ -0,0 +1,226 @@ > +/dts-v1/; > +

Re: [OpenWrt-Devel] [PATCH] procd: add procd_running() helper for checking running state

2019-05-02 Thread Rafał Miłecki
On Wed, 1 May 2019 at 19:09, Jo-Philipp Wich wrote: > > From: Rafał Miłecki > > > > This should be helpful for implementing service_running() in procd init > > scripts. > > > > Signed-off-by: Rafał Miłecki > > --- > > package/system/procd/files/p

[OpenWrt-Devel] [PATCH] procd: add procd_running() helper for checking running state

2019-04-30 Thread Rafał Miłecki
From: Rafał Miłecki This should be helpful for implementing service_running() in procd init scripts. Signed-off-by: Rafał Miłecki --- package/system/procd/files/procd.sh | 15 +++ 1 file changed, 15 insertions(+) diff --git a/package/system/procd/files/procd.sh b/package/system

[OpenWrt-Devel] [PATCH] libroxml: bump to the 3.0.1 version

2019-04-23 Thread Rafał Miłecki
From: Rafał Miłecki Some of changes: * Support for local-name() * General refactoring * Better parsing performance * Fix possible buffer overflow & memleak * Validation checks * More commit functions (file, buffer, fd) Signed-off-by: Rafał Miłecki --- package/libs/libroxml/Makefile

[OpenWrt-Devel] [PATCH RFC] kernel: drop -fno-reorder-blocks

2019-04-09 Thread Rafał Miłecki
From: Rafał Miłecki Dropping this option significantly improves NAT performance on BCM5301X (bcm53xx) for LAN to WAN traffic with GRO disabled (+14%). It slightly affects kernel size - it gets bigger by 1,5% - 3% depending on a target. Unfortunately this change may decrease NAT performance

[OpenWrt-Devel] [PATCH] kernel: fix rtcache compilation with 4.19 and NF_CONNTRACK_IPV6

2019-04-04 Thread Rafał Miłecki
From: Rafał Miłecki This fixes: net/netfilter/nf_conntrack_rtcache.c: In function 'nf_rtcache_get_cookie': net/netfilter/nf_conntrack_rtcache.c:82:11: error: 'const struct rt6_info' has no member named 'rt6i_node'; did you mean 'rt6i_idev'? if (rt->rt6i_n

Re: [OpenWrt-Devel] Current "OpenWrt Style Guide for DTS"?

2019-01-23 Thread Rafał Miłecki
On Tue, 22 Jan 2019 at 23:06, Jeff Kletsky wrote: > Use of CPP #include vs. Device Tree /include/ > = > > * It appears that the CPP #include is preferred. Is this correct? Yes. That one is commonly used by DTS in Linux's sources and we try to match it

Re: [OpenWrt-Devel] Current "OpenWrt Style Guide for DTS"?

2019-01-23 Thread Rafał Miłecki
Thank you Chuanhong for handling this so well! Few minor comments below. On Wed, 23 Jan 2019 at 04:09, Chuanhong Guo wrote: > On Wed, Jan 23, 2019 at 6:07 AM Jeff Kletsky wrote: > ... > > > > Choice of Node Naming for Partitions > > > > > > In some DTS

Re: [OpenWrt-Devel] Current "OpenWrt Style Guide for DTS"?

2019-01-21 Thread Rafał Miłecki
On Mon, 21 Jan 2019 at 20:06, Jeff Kletsky wrote: > but I still have a few unanswered questions. Ask? -- Rafał ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Re: [OpenWrt-Devel] [PATCH] bcm53xx: add support for Phicomm K3

2019-01-20 Thread Rafał Miłecki
On 2019-01-19 18:39, Hao Dong wrote: Hardware specifications: - CPU: Broadcom BCM4709C0 @1.4GHz (Dual-Core ARM) - RAM: 512 MB (DDR3) - Flash: 128 MB (NAND) - LAN ports: 3, LAN speed: 10/100/1000 - WAN ports: 1, WAN speed: 10/100/1000 - 2.4G: BCM4366 4x4 MIMO 1000Mbps -- Skyworks SE2623L 2.4GHz

Re: [OpenWrt-Devel] [PATCH] bcm5300: add support for Phicomm K3

2019-01-18 Thread Rafał Miłecki
Looks nice, thanks! It should be bcm53xx:, but I'll fix that while pushing. See below. On Fri, 18 Jan 2019 at 03:48, Hao Dong wrote: > --- /dev/null > +++ > b/target/linux/bcm53xx/patches-4.14/322-ARM-dts-BCM5301X-Add-DT-for-PHICOMM-K3.patch > @@ -0,0 +1,117 @@ > +From

Re: [OpenWrt-Devel] [PATCH] samba36: add package with hotplug.d script for auto sharing

2018-12-27 Thread Rafał Miłecki
On 2018-12-27 08:50, rosys...@rosinson.com wrote: I added a while loop in samba.hotplug to solve the problem. The loop will stop until the file */overlay/.fs_state* is equal to "2" which indicates the filesystem is ready for everything. This really works fine for me. OK, apparently we're

Re: [OpenWrt-Devel] [PATCH] samba36: add package with hotplug.d script for auto sharing

2018-12-26 Thread Rafał Miłecki
On Thu, 27 Dec 2018 at 05:25, rosys...@rosinson.com wrote: > Be care of the issue that the mount points(external usb sda1, sda2, ) > will lost when system firstboot. That's right, fstools (block-mound / blockd) doesn't mount any external drives by default. We have to expect users to handle

[OpenWrt-Devel] [PATCH] samba36: add package with hotplug.d script for auto sharing

2018-12-26 Thread Rafał Miłecki
From: Rafał Miłecki The new samba36-hotplug package provides a hotplug.d script for the "mount" subsystem. It automatically shares every mounted block device. It works by updating /var/run/config/samba file which: 1) Is read by procd init script 2) Gets wiped on reboot providing a

[OpenWrt-Devel] [PATCH] samba36: append config from /var/run/config/ for runtime shares

2018-12-25 Thread Rafał Miłecki
From: Rafał Miłecki This will allow automation/hotplug.d scripts to store runtime shares in the /var/run/config/samba. It's useful e.g. for USB drives that user wants to be automatically shared. Using /var/run/config/ provides: 1) Automated cleaning on reboots It's important for consistency

[OpenWrt-Devel] [PATCH] Revert "samba36: add hotplug support"

2018-12-25 Thread Rafał Miłecki
From: Rafał Miłecki This reverts commit fd569e5e9d0a46ea957cb253e97a4b3ea8c2c540. After an extra review & discussion few concerns were raised regarding that feature: 1) It reacts to hotplug.d "block" events instead of more accurate (but currently unavailable) "mount"

Re: [OpenWrt-Devel] Broken packaging of modules (updating them) when using @lt or @gt

2018-12-17 Thread Rafał Miłecki
On 17.12.2018 07:20, Yousong Zhou wrote: On Mon, 17 Dec 2018 at 12:59, Rafał Miłecki wrote: On Sat, 15 Dec 2018 at 08:05, Yousong Zhou wrote: On Sat, 15 Dec 2018 at 06:00, Rafał Miłecki wrote: I've noticed a problem with kmod-phy-bcm-ns-usb2 defined in the target/linux/bcm53xx

Re: [OpenWrt-Devel] Broken packaging of modules (updating them) when using @lt or @gt

2018-12-16 Thread Rafał Miłecki
On Sat, 15 Dec 2018 at 08:05, Yousong Zhou wrote: > > On Sat, 15 Dec 2018 at 06:00, Rafał Miłecki wrote: > > > > I've noticed a problem with kmod-phy-bcm-ns-usb2 defined in the > > target/linux/bcm53xx/modules.mk > > > > Steps to reproduce: > > 1) Set

[OpenWrt-Devel] Broken packaging of modules (updating them) when using @lt or @gt

2018-12-14 Thread Rafał Miłecki
I've noticed a problem with kmod-phy-bcm-ns-usb2 defined in the target/linux/bcm53xx/modules.mk Steps to reproduce: 1) Setup .config with: CONFIG_TARGET_bcm53xx CONFIG_TARGET_MULTI_PROFILE TARGET_ALL_PROFILES CONFIG_TARGET_PER_DEVICE_ROOTFS 2) make V=s 3) vim

[OpenWrt-Devel] [PATCH] ramips: specify "firmware" partition format for remaining devices

2018-12-13 Thread Rafał Miłecki
From: Rafał Miłecki It results in calling the right MTD parser directly instead of trying them one by one. Signed-off-by: Rafał Miłecki --- I'm not sure about the AR670W.dts. It seems to be using WRG according to the image generating code: IMAGE/factory.bin := $$(sysupgrade_bin) | check-size

[OpenWrt-Devel] [PATCH 1/2] blockd: unmount device explicitly when it disappears

2018-12-12 Thread Rafał Miłecki
From: Rafał Miłecki To keep autofs behavior consistent blockd should request both: mounting and unmounting when needed. It's important as autofs-related actions may require slightly different handling. Without this patch: 1) autofs mounts were handled using TYPE_AUTOFS 2) autofs unmounts were

<    1   2   3   4   5   6   7   8   9   10   >