[LEDE-DEV] [PATCH uci] file: use fsync after renaming temp file

2016-09-06 Thread Rafał Miłecki
From: Rafał Miłecki We already use a temp file and rename it to avoid ending up with an empty file e.g. on power cut. What was missing however is fsync after rename. It's required to make sure directory starts using the new file instead of the old one. With this patch UCI changes are stored corr

Re: [LEDE-DEV] [PATCH] kernel: clean up usb gadget support

2016-09-06 Thread Felix Fietkau
On 2016-09-06 22:50, Tim Harvey wrote: > On Tue, Sep 6, 2016 at 1:15 PM, Felix Fietkau wrote: >> On 2016-09-06 18:57, Tim Harvey wrote: >>> On Sat, Sep 3, 2016 at 5:00 AM, Felix Fietkau wrote: Adding libcomposite.ko to multiple packages is a really bad idea. Why did you prefer that over

Re: [LEDE-DEV] [PATCH] cns3xxx: bump SPI partition map kernel size to 2MB

2016-09-06 Thread Felix Fietkau
On 2016-09-06 22:55, Tim Harvey wrote: > On Tue, Sep 6, 2016 at 1:17 PM, Felix Fietkau wrote: >> On 2016-09-06 18:38, Tim Harvey wrote: >>> The 4.4 kernel is not easily sized down to below the 1.5MB limit imposed by >>> the SPI flash MTD partition mapping. Increase this to 2MB where it is for >>>

Re: [LEDE-DEV] [PATCH] cns3xxx: bump SPI partition map kernel size to 2MB

2016-09-06 Thread Tim Harvey
On Tue, Sep 6, 2016 at 1:17 PM, Felix Fietkau wrote: > On 2016-09-06 18:38, Tim Harvey wrote: >> The 4.4 kernel is not easily sized down to below the 1.5MB limit imposed by >> the SPI flash MTD partition mapping. Increase this to 2MB where it is for >> NOR flash devices. Additionally add a check t

Re: [LEDE-DEV] [PATCH] kernel: clean up usb gadget support

2016-09-06 Thread Tim Harvey
On Tue, Sep 6, 2016 at 1:15 PM, Felix Fietkau wrote: > On 2016-09-06 18:57, Tim Harvey wrote: >> On Sat, Sep 3, 2016 at 5:00 AM, Felix Fietkau wrote: >>> Adding libcomposite.ko to multiple packages is a really bad idea. >>> Why did you prefer that over having proper dependencies in place? >> >> I

[LEDE-DEV] [PATCH] opkg: use fsync in migrate script to flush config files changes

2016-09-06 Thread Rafał Miłecki
From: Rafał Miłecki Whenever app/script wants to have its changes reliably stored it has to use (f)sync. It applies to this uci-defaults script as after exiting 0 we (most likely) won't be called ever again. Up to now power cut right after script execution could result in both: /etc/opkg.conf an

Re: [LEDE-DEV] [PATCH] cns3xxx: bump SPI partition map kernel size to 2MB

2016-09-06 Thread Felix Fietkau
On 2016-09-06 18:38, Tim Harvey wrote: > The 4.4 kernel is not easily sized down to below the 1.5MB limit imposed by > the SPI flash MTD partition mapping. Increase this to 2MB where it is for > NOR flash devices. Additionally add a check that ensures the kernel fits > within the 2MB limit. How abo

Re: [LEDE-DEV] [PATCH] kernel: clean up usb gadget support

2016-09-06 Thread Felix Fietkau
On 2016-09-06 18:57, Tim Harvey wrote: > On Sat, Sep 3, 2016 at 5:00 AM, Felix Fietkau wrote: >> Adding libcomposite.ko to multiple packages is a really bad idea. >> Why did you prefer that over having proper dependencies in place? > > I don't believe I added any deps - I removed libcomposite fro

Re: [LEDE-DEV] [PATCH] toolchain: Rework external toolchain libc selection

2016-09-06 Thread Florian Fainelli
On 09/03/2016 04:54 AM, Felix Fietkau wrote: > On 2016-09-02 23:57, Florian Fainelli wrote: >> Make it a choice menu which offers the 3 C libraries we know about: glibc, >> uClibc and musl. While at it, make it possible for the external toolchain >> libc >> to select USE_GLIBC, USE_UCLIBC or USE_M

Re: [LEDE-DEV] [PATCH] kernel: clean up usb gadget support

2016-09-06 Thread Tim Harvey
On Sat, Sep 3, 2016 at 5:00 AM, Felix Fietkau wrote: > On 2016-09-01 16:52, Tim Harvey wrote: >> clean up usb gadget support: >> - remove unnecessary kmod-usb-lib-composite >> - make kmod-usb-gadget a proper dependency vs a selection >> - rename modules so that they match standard linux kernel mod

[LEDE-DEV] [PATCH] imx6: override default inittab to add video console tty

2016-09-06 Thread Tim Harvey
Adds the following to the default inittab tty1::askfirst:/bin/ash --login Signed-off-by: Tim Harvey --- target/linux/imx6/base-files/etc/inittab | 4 1 file changed, 4 insertions(+) create mode 100644 target/linux/imx6/base-files/etc/inittab diff --git a/target/linux/imx6/base-files/etc/i

[LEDE-DEV] [PATCH] cns3xxx: bump SPI partition map kernel size to 2MB

2016-09-06 Thread Tim Harvey
The 4.4 kernel is not easily sized down to below the 1.5MB limit imposed by the SPI flash MTD partition mapping. Increase this to 2MB where it is for NOR flash devices. Additionally add a check that ensures the kernel fits within the 2MB limit. This resolves boot issues on SPI based boards such as

[LEDE-DEV] [PATCH] imx6: image: remove pca955x/ds1672/at24 from Ventana kernel modules

2016-09-06 Thread Tim Harvey
These need to be static in the kernel for Ventana Signed-off-by: Tim Harvey --- target/linux/imx6/image/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/linux/imx6/image/Makefile b/target/linux/imx6/image/Makefile index 7893e06..ad89da8 100644 --- a/target/linu

[LEDE-DEV] [PATCH] cns3xxx: add GW2394 Support

2016-09-06 Thread Tim Harvey
Signed-off-by: Tim Harvey --- target/linux/cns3xxx/files/arch/arm/mach-cns3xxx/laguna.c | 4 +++- .../linux/cns3xxx/patches-4.4/255-laguna-add-gsc-driver-support.patch | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/target/linux/cns3xxx/files/arch/arm/mach-cns

Re: [LEDE-DEV] overlayfs + ubifs: power cut results in "failed to create directory /overlay/work/work (errno: 17); mounting read-only"

2016-09-06 Thread Rafał Miłecki
On 6 September 2016 at 14:56, Rafał Miłecki wrote: > On 6 September 2016 at 14:50, Miklos Szeredi wrote: >> On Tue, Sep 6, 2016 at 1:59 PM, Richard Weinberger wrote: >>> overlayfs does not issue a recursive rm on workdir, AFAICT you are supposed >>> to cleanup >>> workdir yourself before mounti

Re: [LEDE-DEV] overlayfs + ubifs: power cut results in "failed to create directory /overlay/work/work (errno: 17); mounting read-only"

2016-09-06 Thread Rafał Miłecki
On 6 September 2016 at 14:50, Miklos Szeredi wrote: > On Tue, Sep 6, 2016 at 1:59 PM, Richard Weinberger wrote: >> Rafał, >> >> On 06.09.2016 12:46, Rafał Miłecki wrote: >>> Hi, >>> >>> In LEDE/OpenWrt we use UBI with two volumes: "rootfs" and "rootfs_data". >>> With >>> rootfs mounted at / we m

Re: [LEDE-DEV] overlayfs + ubifs: power cut results in "failed to create directory /overlay/work/work (errno: 17); mounting read-only"

2016-09-06 Thread Miklos Szeredi
On Tue, Sep 6, 2016 at 1:59 PM, Richard Weinberger wrote: > Rafał, > > On 06.09.2016 12:46, Rafał Miłecki wrote: >> Hi, >> >> In LEDE/OpenWrt we use UBI with two volumes: "rootfs" and "rootfs_data". With >> rootfs mounted at / we mount rootfs_data volume at /overlay and then use >> overlayfs to co

Re: [LEDE-DEV] overlayfs + ubifs: power cut results in "failed to create directory /overlay/work/work (errno: 17); mounting read-only"

2016-09-06 Thread Richard Weinberger
Rafał, On 06.09.2016 12:46, Rafał Miłecki wrote: > Hi, > > In LEDE/OpenWrt we use UBI with two volumes: "rootfs" and "rootfs_data". With > rootfs mounted at / we mount rootfs_data volume at /overlay and then use > overlayfs to combine these two. > > 1) Before: > /dev/root on / type squashfs (ro,

[LEDE-DEV] overlayfs + ubifs: power cut results in "failed to create directory /overlay/work/work (errno: 17); mounting read-only"

2016-09-06 Thread Rafał Miłecki
Hi, In LEDE/OpenWrt we use UBI with two volumes: "rootfs" and "rootfs_data". With rootfs mounted at / we mount rootfs_data volume at /overlay and then use overlayfs to combine these two. 1) Before: /dev/root on / type squashfs (ro,relatime) /dev/ubi0_1 on /overlay type ubifs (rw,noatime) 2) Mou

Re: [LEDE-DEV] [RFC] base-files: call "sync" before removing uci-defaults file

2016-09-06 Thread Koen Vandeputte
Hi All, My 2 cents on this topic: I had the same issue on my IMX6 boards. Writing or changing a file, some power cut happens (somebody else doing a remote PoE reset or whatever cause) and the FS could get corrupted or files are lost. (easy to reproduce) It seems a mounted UBIFS volume uses wr