Re: [OpenWrt-Devel] [RFC PATCH] build: re-enable parallelism for mksquashfs

2018-11-07 Thread Felix Fietkau
On 2018-11-08 02:20, Daniel Santos wrote:
> On 11/07/2018 01:52 PM, Felix Fietkau wrote:
>> On 2018-11-05 00:19, Daniel Santos wrote:
>>> This was disabled by commit dcd0e4a6727611f03eb3d3a75f073235f5f1229c due
>>> to a threading bug back in 2009.  The specifics of the bug are not given
>>> in the commit message and squashfs-tools has had several updates to it's
>>> parallelism since this time.  There are currently no open issues related
>>> to parallelism in their issue tracker:
>>> https://github.com/plougher/squashfs-tools/issues
>>>
>>> It now "works for me" with 16 threads, and while this is a terrible test
>>> for a race condition I still propose we remove this work-around
>>> unless and until we have specific knowledge of a current bug.
>>>
>>> Signed-off-by: Daniel Santos 
>> Are the images still reproducible after that change?
>> If I remember correctly, threading would break that.
> Hello.  I'm not sure what you mean by the images being reproducible. 
> I've been building with TARGET_ROOTFS_SQUASHFS=y and
> TARGET_ROOTFS_SQUASHFS=256 for a few weeks now without any problem.  I'm
> presuming they've fixed it, but I didn't see specific mention of this
> bug in their github issue tracker.  They may have discussed it elsewhere
> prior to porting to github.
Reproducible as in https://reproducible-builds.org/
You're supposed to be able to generate the binary-identical rootfs image
on different machines, as long as you're using the same version and the
same configuration.
From my understanding, using multiple threads for the squashfs build can
make the order in which data appears in the filesystem image
non-deterministic.

- Felix


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [RFC PATCH] build: re-enable parallelism for mksquashfs

2018-11-07 Thread Jo-Philipp Wich
Hi,

> I'm not sure what you mean by the images being reproducible. 

It means that different mksquashfs runs with different amounts of CPUs
on different hosts should yield bit-identical images having the same
checksum given the same input.

~ Jo



signature.asc
Description: OpenPGP digital signature
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [RFC PATCH] build: re-enable parallelism for mksquashfs

2018-11-07 Thread Daniel Santos
On 11/07/2018 01:52 PM, Felix Fietkau wrote:
> On 2018-11-05 00:19, Daniel Santos wrote:
>> This was disabled by commit dcd0e4a6727611f03eb3d3a75f073235f5f1229c due
>> to a threading bug back in 2009.  The specifics of the bug are not given
>> in the commit message and squashfs-tools has had several updates to it's
>> parallelism since this time.  There are currently no open issues related
>> to parallelism in their issue tracker:
>> https://github.com/plougher/squashfs-tools/issues
>>
>> It now "works for me" with 16 threads, and while this is a terrible test
>> for a race condition I still propose we remove this work-around
>> unless and until we have specific knowledge of a current bug.
>>
>> Signed-off-by: Daniel Santos 
> Are the images still reproducible after that change?
> If I remember correctly, threading would break that.
>
> - Felix
>

Hello.  I'm not sure what you mean by the images being reproducible. 
I've been building with TARGET_ROOTFS_SQUASHFS=y and
TARGET_ROOTFS_SQUASHFS=256 for a few weeks now without any problem.  I'm
presuming they've fixed it, but I didn't see specific mention of this
bug in their github issue tracker.  They may have discussed it elsewhere
prior to porting to github.

Daniel

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] tools: tplink-safeloader: add C7v5 EU SupportList

2018-11-07 Thread David Bauer
Currently flash from WebIF is broken for Archer C7 v5 EU models as their
SupportList entries are missing.

The added entries originate from TP-Links latest Archer C7 v5 EU
firmware.

Signed-off-by: David Bauer 
---
 tools/firmware-utils/src/tplink-safeloader.c | 6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/tools/firmware-utils/src/tplink-safeloader.c 
b/tools/firmware-utils/src/tplink-safeloader.c
index a51cca476e..2959a212f8 100644
--- a/tools/firmware-utils/src/tplink-safeloader.c
+++ b/tools/firmware-utils/src/tplink-safeloader.c
@@ -665,7 +665,11 @@ static struct device_info boards[] = {
.support_list =
"SupportList:\n"
"{product_name:Archer 
C7,product_ver:5.0.0,special_id:}\n"
-   "{product_name:Archer 
C7,product_ver:5.0.0,special_id:5553}\n",
+   "{product_name:Archer 
C7,product_ver:5.0.0,special_id:4555}\n"
+   "{product_name:Archer 
C7,product_ver:5.0.0,special_id:5553}\n"
+   "{product_name:Archer 
C7,product_ver:5.0.0,special_id:4341}\n"
+   "{product_name:Archer 
C7,product_ver:5.0.0,special_id:4A50}\n"
+   "{product_name:Archer 
C7,product_ver:5.0.0,special_id:5457}\n",
 
.support_trail = '\x00',
.soft_ver = "soft_ver:1.0.0\n",
-- 
2.19.1


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [RFC PATCH] build: re-enable parallelism for mksquashfs

2018-11-07 Thread Felix Fietkau
On 2018-11-05 00:19, Daniel Santos wrote:
> This was disabled by commit dcd0e4a6727611f03eb3d3a75f073235f5f1229c due
> to a threading bug back in 2009.  The specifics of the bug are not given
> in the commit message and squashfs-tools has had several updates to it's
> parallelism since this time.  There are currently no open issues related
> to parallelism in their issue tracker:
> https://github.com/plougher/squashfs-tools/issues
> 
> It now "works for me" with 16 threads, and while this is a terrible test
> for a race condition I still propose we remove this work-around
> unless and until we have specific knowledge of a current bug.
> 
> Signed-off-by: Daniel Santos 
Are the images still reproducible after that change?
If I remember correctly, threading would break that.

- Felix

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH 5/5] mesongx: new target

2018-11-07 Thread Tomasz Maciej Nowak
Hi Stijn, comments inline (disclaimer: I don't own such device).

W dniu 19.10.2018 o 19:37, Stijn Tintel pisze:
> This target supports Amlogic S9 SoCs.
> 
> Signed-off-by: Stijn Tintel 
> ---
>  target/linux/mesongx/Makefile  |  36 ++
>  target/linux/mesongx/base-files/etc/inittab|   5 +
>  .../mesongx/base-files/lib/preinit/79_move_config  |  22 +
>  .../mesongx/base-files/lib/upgrade/platform.sh |  95 +
>  target/linux/mesongx/config-4.14   | 455 
> +
>  target/linux/mesongx/image/Makefile|  66 +++
>  target/linux/mesongx/image/boot.odroid-c2.txt  |   8 +
>  7 files changed, 687 insertions(+)
>  create mode 100644 target/linux/mesongx/Makefile
>  create mode 100644 target/linux/mesongx/base-files/etc/inittab
>  create mode 100644 target/linux/mesongx/base-files/lib/preinit/79_move_config
>  create mode 100644 target/linux/mesongx/base-files/lib/upgrade/platform.sh
>  create mode 100644 target/linux/mesongx/config-4.14
>  create mode 100644 target/linux/mesongx/image/Makefile
>  create mode 100644 target/linux/mesongx/image/boot.odroid-c2.txt
> 
> diff --git a/target/linux/mesongx/Makefile b/target/linux/mesongx/Makefile
> new file mode 100644
> index 00..507f5d2526
> --- /dev/null
> +++ b/target/linux/mesongx/Makefile
> @@ -0,0 +1,36 @@
> +#
> +# Copyright (C) 2017-2018 Stijn Tintel 
> +#
> +# This is free software, licensed under the GNU General Public License v2.
> +# See /LICENSE for more information.
> +#
> +
> +include $(TOPDIR)/rules.mk
> +
> +ARCH:=aarch64
> +BOARD:=mesongx
> +BOARDNAME:=Amlogic S9 family
> +CPU_TYPE:=cortex-a53
> +DEVICE_TYPE:=other
> +FEATURES:=audio boot-part ext4 fpu squashfs usbgadget
> +MAINTAINER:=Stijn Tintel 
> +
> +KERNEL_PATCHVER:=4.14
> +
> +define Target/Description
> + Build firmware image for Amlogic S9 SoC devices.
> +endef
> +
> +include $(INCLUDE_DIR)/target.mk
> +
> +DEFAULT_PACKAGES += \
> + e2fsprogs \
> + kmod-sound-core \
> + kmod-usb-hid \
> + mkf2fs \
> + partx-utils \
> + v4l-utils

These v4l-utils shouldn't be part of default packages they are in packages repo.

> +
> +KERNELNAME:=Image dtbs
> +
> +$(eval $(call BuildTarget))
> diff --git a/target/linux/mesongx/base-files/etc/inittab 
> b/target/linux/mesongx/base-files/etc/inittab
> new file mode 100644
> index 00..a5100a7050
> --- /dev/null
> +++ b/target/linux/mesongx/base-files/etc/inittab
> @@ -0,0 +1,5 @@
> +::sysinit:/etc/init.d/rcS S boot
> +::shutdown:/etc/init.d/rcS K shutdown
> +::askconsole:/usr/libexec/login.sh
> +tty1::askfirst:/usr/libexec/login.sh
> +ttyAML0::askfirst:/usr/libexec/login.sh
> diff --git a/target/linux/mesongx/base-files/lib/preinit/79_move_config 
> b/target/linux/mesongx/base-files/lib/preinit/79_move_config
> new file mode 100644
> index 00..6ac1b3be69
> --- /dev/null
> +++ b/target/linux/mesongx/base-files/lib/preinit/79_move_config
> @@ -0,0 +1,22 @@
> +#!/bin/sh
> +# Copyright (C) 2012-2015 OpenWrt.org
> +
> +move_config() {
> + local partdev
> +
> + . /lib/upgrade/common.sh
> +
> + if export_bootdevice && export_partdevice partdev 1; then
> + mkdir -p /boot
> + if mount -t ext4 -o ro,noatime "/dev/$partdev" /boot; then
> + if [ -f /boot/sysupgrade.tgz ]; then
> + mount /boot -o remount,rw,noatime
> + mv -f /boot/sysupgrade.tgz /
> + mount /boot -o remount,ro,noatime
> + fi
> + fi
> + fi
> +}
> +
> +boot_hook_add preinit_mount_root move_config
> +
> diff --git a/target/linux/mesongx/base-files/lib/upgrade/platform.sh 
> b/target/linux/mesongx/base-files/lib/upgrade/platform.sh
> new file mode 100644
> index 00..3bfefc6b92
> --- /dev/null
> +++ b/target/linux/mesongx/base-files/lib/upgrade/platform.sh
> @@ -0,0 +1,95 @@
> +platform_check_image() {
> + local diskdev partdev diff
> + [ "$#" -gt 1 ] && return 1
> +
> + case "$(get_magic_word "$1")" in
> + 24c8) ;;
> + *)
> + echo "Invalid image type"
> + return 1
> + ;;
> + esac
> +
> + export_bootdevice && export_partdevice diskdev 0 || {
> + echo "Unable to determine upgrade device"
> + return 1
> + }
> +
> + get_partitions "/dev/$diskdev" bootdisk
> +
> + #extract the boot sector from the image
> + get_image "$@" | dd of=/tmp/image.bs count=1 bs=512b 2>/dev/null
> +
> + get_partitions /tmp/image.bs image
> +
> + #compare tables
> + diff="$(grep -F -x -v -f /tmp/partmap.bootdisk /tmp/partmap.image)"
> +
> + rm -f /tmp/image.bs /tmp/partmap.bootdisk /tmp/partmap.image
> +
> + if [ -n "$diff" ]; then
> + echo "Partition layout has changed. Full image will be written."
> + ask_bool 0 "Abort" && exit 1
> + return

Re: [OpenWrt-Devel] [PATCH v3 3/6] x86: add packages files to image bootfs

2018-11-07 Thread Tomasz Maciej Nowak
W dniu 01.11.2018 o 18:03, Philip Prindeville pisze:
> Inline
> 
>> On Oct 31, 2018, at 11:02 AM, Tomasz Maciej Nowak  wrote:
>>
>> Add files to bootfs image from selected as built-in packages, which want
>> to install files to targets boot file system.
>>
>> Signed-off-by: Tomasz Maciej Nowak 
>> ---
>> target/linux/x86/image/Makefile | 2 ++
>> 1 file changed, 2 insertions(+)
>>
>> diff --git a/target/linux/x86/image/Makefile 
>> b/target/linux/x86/image/Makefile
>> index b537c40f24..310a143e13 100644
>> --- a/target/linux/x86/image/Makefile
>> +++ b/target/linux/x86/image/Makefile
>> @@ -85,6 +85,7 @@ ifneq ($(CONFIG_GRUB_IMAGES),)
>>-e 's#@ROOT@#$(GRUB_ROOT)#g' \
>>-e 's#@TITLE@#$(GRUB_TITLE)#g' \
>>./grub.cfg > $(KDIR)/root.grub/boot/grub/grub.cfg
>> +-$(CP) $(STAGING_DIR_ROOT)/boot/* $(KDIR)/root.grub/boot/
> 
> Per below
> 
>>PADDING="$(CONFIG_TARGET_IMAGES_PAD)" SIGNATURE="$(SIGNATURE)" 
>> PATH="$(TARGET_PATH)" $(SCRIPT_DIR)/gen_image_generic.sh \
>>$(BIN_DIR)/$(IMG_PREFIX)-combined-$(1).img \
>>$(CONFIG_TARGET_KERNEL_PARTSIZE) $(KDIR)/root.grub \
>> @@ -123,6 +124,7 @@ define Image/Build/iso
>>-e 's#@TIMEOUT@#$(GRUB_TIMEOUT)#g' \
>>-e 's#@TITLE@#$(GRUB_TITLE)#g' \
>>./grub-iso.cfg > $(KDIR)/root.grub/boot/grub/grub.cfg
>> +-$(CP) $(STAGING_DIR_ROOT)/boot/* $(KDIR)/root.grub/boot/
> 
> I’d use . instead of *
> 

Thanks Philip, I'll change that in next version.

>>mkisofs -R -b boot/grub/eltorito.img -no-emul-boot -boot-info-table \
>>-o $(KDIR)/root.iso $(KDIR)/root.grub $(TARGET_DIR)
>> endef
>> -- 
>> 2.19.1
>>
>>
>> ___
>> openwrt-devel mailing list
>> openwrt-devel@lists.openwrt.org
>> https://lists.openwrt.org/mailman/listinfo/openwrt-devel
> 
> 
> ___
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel
> 

-- 
TMN

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel