[LEDE-DEV] [PATCH] ramips: enable ramdisk for mt7621

2017-05-03 Thread Paul Spooren
Fixes #758

Signed-off-by: Paul Spooren 
---
 target/linux/ramips/mt7621/target.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/linux/ramips/mt7621/target.mk 
b/target/linux/ramips/mt7621/target.mk
index 121761f45f..d075acbf87 100644
--- a/target/linux/ramips/mt7621/target.mk
+++ b/target/linux/ramips/mt7621/target.mk
@@ -4,7 +4,7 @@
 
 SUBTARGET:=mt7621
 BOARDNAME:=MT7621 based boards
-FEATURES+=usb rtc nand
+FEATURES+=nand ramdisk rtc usb
 CPU_TYPE:=24kc
 
 DEFAULT_PACKAGES += kmod-mt76
-- 
2.11.0


___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


[LEDE-DEV] [PATCH] add --do-setup arg and default to squasfs

2017-05-17 Thread Paul Spooren
scripts/qemustart

the function do_setup is never used except if the script is changed
manually. It's used to easily setup bridges and traffic forwarding.
Adding the parameter --do-config simplifies the deployment.

The scripts defaults to the ext4 filesystem which is an unrealistic in
most cases. Now defaults to the squashfs img if exists.

Signed-off-by: Paul Spooren 
---
 scripts/qemustart | 20 +++-
 1 file changed, 15 insertions(+), 5 deletions(-)

diff --git a/scripts/qemustart b/scripts/qemustart
index 5cadd7d6a8..f77c674a9c 100755
--- a/scripts/qemustart
+++ b/scripts/qemustart
@@ -84,6 +84,7 @@ check_setup() {
 usage() {
cat >&2 <
  [ []]
  [--kernel ]
@@ -119,6 +120,11 @@ rand_mac() {
 parse_args() {
while [ "$#" -gt 0 ]; do
case "$1" in
+   --do-setup) 
+  echo "running setup"
+  do_setup 
+  exit 0
+  ;;
--kernel) o_kernel="$2"; shift 2 ;;
--rootfs) o_rootfs="$2"; shift 2 ;;
--help|-h)
@@ -216,9 +222,13 @@ start_qemu_x86() {
local qemu_exe
 
[ -n "$rootfs" ] || {
-   
rootfs="$o_bindir/lede-$o_target-${o_subtarget%-*}-combined-ext4.img"
-   if [ ! -f "$rootfs" -a -s "$rootfs.gz" ]; then
-   gunzip "$rootfs.gz"
+   
rootfs="$o_bindir/lede-$o_target-${o_subtarget%-*}-combined-squashfs.img"
+   if [ ! -f "$rootfs" ]; then
+   
rootfs="$o_bindir/lede-$o_target-${o_subtarget%-*}-combined-ext4.img"
+
+   if [ ! -f "$rootfs" -a -s "$rootfs.gz" ]; then
+   gunzip "$rootfs.gz"
+   fi
fi
}
#
@@ -276,6 +286,6 @@ start_qemu() {
esac
 }
 
-check_setup \
-   && parse_args "$@" \
+parse_args "$@" \
+   && check_setup \
&& start_qemu
-- 
2.11.0


___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


[LEDE-DEV] [PATCH] add --extend-squasfs to qemustart script

2017-05-22 Thread Paul Spooren
scripts/qemustart

using squashfs results in a "no space left on device" error. You need to
manually extend the new build with a tool like dd.

This patch adds the --extend-squasfs parameter to enlarge the image to
64MB. The (64MB - 20MB =) ~44MB free space will be used by the
overlayfs.

This approach is very simple and resets the overlayfs if used twices.

Signed-off-by: Paul Spooren 
---
 scripts/qemustart | 9 -
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/scripts/qemustart b/scripts/qemustart
index f77c674a9c..4dc4051696 100755
--- a/scripts/qemustart
+++ b/scripts/qemustart
@@ -85,6 +85,7 @@ usage() {
cat >&2 <
  [ []]
  [--kernel ]
@@ -124,7 +125,8 @@ parse_args() {
   echo "running setup"
   do_setup 
   exit 0
-  ;;
+   ;;
+   --extend-squashfs) EXTEND_SQUASHFS=true; shift 1; ;;
--kernel) o_kernel="$2"; shift 2 ;;
--rootfs) o_rootfs="$2"; shift 2 ;;
--help|-h)
@@ -223,6 +225,11 @@ start_qemu_x86() {
 
[ -n "$rootfs" ] || {

rootfs="$o_bindir/lede-$o_target-${o_subtarget%-*}-combined-squashfs.img"
+   if [ -f "$rootfs" ] && [ "$EXTEND_SQUASHFS" ]; then
+   mv "$rootfs" "${rootfs}_org"
+   dd if=/dev/zero of="$rootfs" bs=1M count=64
+   dd if="${rootfs}_org" of="$rootfs" conv=notrunc
+   fi
if [ ! -f "$rootfs" ]; then

rootfs="$o_bindir/lede-$o_target-${o_subtarget%-*}-combined-ext4.img"
 
-- 
2.11.0


___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


[LEDE-DEV] GSoC 2017 & RFC - Attended Sysupgrade

2017-05-30 Thread Paul Spooren
Dear all,

I'm Paul Spooren and applied for this years GSoC. My project is to build
an attended sysupgrade to easily reflash routers on new releases.

For more information please read my blog post here:
https://blog.freifunk.net/2017/05/30/gsoc-2017-attended-sysupgrade/

Thanks in advance for all kind of feedback!

Best, Paul Spooren



___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


[LEDE-DEV] [PATCH] added package_list function to imagebuilder

2017-06-05 Thread Paul Spooren
imagebuilder: the imagebuilder can now post all available
packages by using make package_list. This is usefull to see all packages
with versions (and size)

Signed-off-by: Paul Spooren 
---
 target/imagebuilder/files/Makefile | 32 
 1 file changed, 20 insertions(+), 12 deletions(-)

diff --git a/target/imagebuilder/files/Makefile 
b/target/imagebuilder/files/Makefile
index f0e2bd1281..2c787544c0 100644
--- a/target/imagebuilder/files/Makefile
+++ b/target/imagebuilder/files/Makefile
@@ -13,7 +13,7 @@ export TOPDIR LC_ALL LANG
 export OPENWRT_VERBOSE=s
 all: help
 
-export PATH:=$(TOPDIR)/staging_dir/host/bin:$(PATH)
+include $(TOPDIR)/include/host.mk
 
 ifneq ($(OPENWRT_BUILD),1)
   override OPENWRT_BUILD=1
@@ -82,6 +82,7 @@ PROFILE_LIST = $(foreach p,$(PROFILE_NAMES), \
 
 staging_dir/host/.prereq-build: include/prereq-build.mk
mkdir -p tmp
+   rm -f tmp/.host.mk
@$(_SINGLE)$(NO_TRACE_MAKE) -j1 -r -s -f 
$(TOPDIR)/include/prereq-build.mk prereq 2>/dev/null || { \
echo "Prerequisite check failed. Use FORCE=1 to override."; \
false; \
@@ -111,20 +112,14 @@ _call_image: staging_dir/host/.prereq-build
echo
rm -rf $(TARGET_DIR)
mkdir -p $(TARGET_DIR) $(BIN_DIR) $(TMP_DIR) $(DL_DIR)
-   if [ ! -f "$(PACKAGE_DIR)/Packages" ] || [ ! -f 
"$(PACKAGE_DIR)/Packages.gz" ] || [ "`find $(PACKAGE_DIR) -cnewer 
$(PACKAGE_DIR)/Packages.gz`" ]; then \
-   echo "Package list missing or not up-to-date, generating it.";\
-   $(MAKE) package_index; \
-   else \
-   mkdir -p $(TARGET_DIR)/tmp; \
-   $(OPKG) update || true; \
-   fi
+   $(MAKE) package_reload
$(MAKE) package_install
 ifneq ($(USER_FILES),)
$(MAKE) copy_files
 endif
-   $(MAKE) -s package_postinst
-   $(MAKE) -s build_image
-   $(MAKE) -s checksum
+   $(MAKE) package_postinst
+   $(MAKE) build_image
+   $(MAKE) checksum
 
 package_index: FORCE
@echo
@@ -135,6 +130,19 @@ package_index: FORCE
) >/dev/null 2>/dev/null
$(OPKG) update || true
 
+package_reload:
+   if [ ! -f "$(PACKAGE_DIR)/Packages" ] || [ ! -f 
"$(PACKAGE_DIR)/Packages.gz" ] || [ "`find $(PACKAGE_DIR) -cnewer 
$(PACKAGE_DIR)/Packages.gz`" ]; then \
+   echo "Package list missing or not up-to-date, generating it.";\
+   $(MAKE) package_index; \
+   else \
+   mkdir -p $(TARGET_DIR)/tmp; \
+   $(OPKG) update || true; \
+   fi
+
+package_list: FORCE
+   @$(MAKE) package_reload |:
+   @$(OPKG) list --size 2>/dev/null | awk -F" - " '{printf "%s %s %s\n", 
$$1, $$2, $$3}'
+
 package_install: FORCE
@echo
@echo Installing packages...
@@ -193,7 +201,7 @@ ifneq ($(PROFILE),)
   endif
 endif
(unset PROFILE FILES PACKAGES MAKEFLAGS; \
-   $(MAKE) -s _call_image \
+   $(MAKE) _call_image \
$(if $(PROFILE),USER_PROFILE="$(PROFILE_FILTER)") \
$(if $(FILES),USER_FILES="$(FILES)") \
$(if $(PACKAGES),USER_PACKAGES="$(PACKAGES)") \
-- 
2.11.0


___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


Re: [LEDE-DEV] Planning v17.01.2

2017-06-05 Thread Paul Spooren
Hi, for my efforts on attended-sysupgrades I'd need luci2-io-helper in
the official repositories.
Is that possible for the upcoming release?

https://github.com/jow-/luci-ng/tree/master/luci2-io-helper

Best,
Paul

Am 04.06.2017 um 21:01 schrieb Jo-Philipp Wich:
> Hi,
>
> I decided to delay 17.01.2 by another week to wait for Kernel 4.4.71
> getting released which will fix a number of networking related
> vulnerabilities.
>
> The currently projected release date is Saturday, the 10th.
>
> Regards,
> Jo
>
> ___
> Lede-dev mailing list
> Lede-dev@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/lede-dev



___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


Re: [LEDE-DEV] Travis broken?

2017-08-19 Thread Paul Spooren
On 8/19/17 11:39 PM, Alexander Couzens wrote:
> If you package has a huge dependency tree, there isn't a fix, except
> move from travis away to a private instance or jenkins.

Maybe more build cores speed up the build process?

https://github.com/openwrt/packages/pull/4736

Best,

Paul



___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


[LEDE-DEV] usign image signatures for update server

2017-08-31 Thread Paul Spooren
Hey all,

I'm creating a service to easily sysupgrade to new releases. My plan is
to sign all images via usign and verify the signatures on the clients
(router).

Currently I have no Idea how to mange the private keys and I came up
with two possible scenarios:

a)
- Builders send image to update server
- Update server signs image
- Bad as secret keys shouldn't be stored on web servers

b)
- Builders have their own secret keys
- Sign images on build
- Exchange signatures with update server
- Somewhere safe is signed list with all builder public keys
- Good?

How is the current setup for LEDE? The update server generates images on
demand so no air-gap is possible, signing should happen just in time.

Thanks for all help!

Best,
Paul



___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


[LEDE-DEV] jshn.sh: json_load replaces "-" with "_"

2017-10-29 Thread Paul Spooren
Hi all,

I'm currently trying to use jshn.sh but it changes the data and makes it
unusable.

Below an example:

root@LEDE:~# json_string="{ \"foo-bar\": 10 }"
root@LEDE:~# echo $json_string
{ "foo-bar": 10 }
root@LEDE:~# json_init
root@LEDE:~# json_load "$json_string"
root@LEDE:~# json_dump
{ "foo_bar": 10 }

Expected would be the same output as input. Is this a bug or a feature?

Context:

Running snapshot build. I'm trying to use rpcd-mod-packagelist [1] but
as e.g. "kmod-r8169" becomes "kmod_r8169" it's useless.

Best,

Paul Spooren

[1]:
https://github.com/openwrt/packages/tree/master/utils/rpcd-mod-packagelist


___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


Re: [LEDE-DEV] jshn.sh: json_load replaces "-" with "_"

2017-10-30 Thread Paul Spooren
On 10/30/17 3:28 AM, Matthias Schiffer wrote:
> On 10/29/2017 09:21 PM, Paul Spooren wrote:
>> Hi all,
>>
>> I'm currently trying to use jshn.sh but it changes the data and makes it
>> unusable.
>>
>> Below an example:
>>
>> root@LEDE:~# json_string="{ \"foo-bar\": 10 }"
>> root@LEDE:~# echo $json_string
>> { "foo-bar": 10 }
>> root@LEDE:~# json_init
>> root@LEDE:~# json_load "$json_string"
>> root@LEDE:~# json_dump
>> { "foo_bar": 10 }
>>
>> Expected would be the same output as input. Is this a bug or a feature?
>>
>> Context:
>>
>> Running snapshot build. I'm trying to use rpcd-mod-packagelist [1] but
>> as e.g. "kmod-r8169" becomes "kmod_r8169" it's useless.
>>
>> Best,
>>
>> Paul Spooren
>>
>> [1]:
>> https://github.com/openwrt/packages/tree/master/utils/rpcd-mod-packagelist
> This is definitely a bug in jshn.sh (or possibly a "known limitation" to
> keep the code simple, as shell variable names can't contain dashes). It
> should be possible to fix this in jshn with some clever escaping of keys -
> at least for such "simple" special characters (without looking into it in
> detail, I assume other unusual characters that aren't allowed in shell
> variable names are also an issue; supporting the full range of unicode
> might need more work, or entail a prohibitive performance penalty.)
>
> It might actually be much easier to fix the concrete issue by rewriting
> rpcd-mod-packagelist in C (as I suggested in [2]).
>
> Matthias
>
>
> [2] https://github.com/openwrt/packages/pull/5037
>
>
As requested [1] here the detailed use case:

TL;DR: packages are parsed via rpcd-mod-packagelist, additional info is
attached and send as a json post to an "image on demand" server.

I started to create an build server [2] that builds firmware images
based on delivered parameters. A possible use case is an simple "online
imagebuilder" [3] or as a simple way to upgrade you existing system to a
new release without the need to reinstall any package.

ubus and rpcd is needed for the luci frontend
luci-app-attendedsysupgrade [4]. Recently I created a CLI version with
the same functionality [5]. To send a valid request I need a packagelist
from rpcd-mod-packagelist and some information from $(ubus call system
board). To combine both to a json request I tried the following:

json_init
json_load "$(ubus call packagelist list)"
json_add_string "target" $target
json_add_string "subtarget" $subtarget

This results in a valid structure but all packagenames are renamed
(rpcd-mod-packagelist becomes rpcd_mod_packagelist). The error happens
as json_load runs jshn(.c) -r $input, jshn replaces all "-" with "_".
This seemed strange to me as jshn.sh can handle json_add_string
"foo-bar" "foo" (as used in rpcd-mod-packagelist).

A possible solution could be to add the code of rpcd-mod-packagelist to
the attendedsysupgrade.sh to avoid json_load.

Paul

[1]: https://github.com/openwrt/packages/pull/5037#issuecomment-340416041
[2]: https://github.com/aparcar/gsoc17-attended-sysupgrade
[3]: https://ledeupdate.planetexpress.cc/imagebuilder
[4]:
https://github.com/openwrt/luci/tree/master/applications/luci-app-attendedsysupgrade
[5]: https://github.com/aparcar/packages/tree/attendedsysupgrade


___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


[LEDE-DEV] tools/squashfs update to 5.0 before next release

2018-04-17 Thread Paul Spooren

Hi,

if I understand lynxis staging tree [1] correctly, future squashfs 
images will be reproducible.


Will this be merged to master before the next 18.x release?

Best,
Paul

[1] 
https://git.openwrt.org/?p=openwrt/staging/lynxis.git;a=commit;h=1fd818d4f8255cbaa0173d856f09f24bd88a6209



___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


Re: [LEDE-DEV] tools/squashfs update to 5.0 before next release

2018-04-30 Thread Paul Spooren



On Tue, Apr 17, 2018 at 6:10 PM, Paul Spooren 
 wrote:

Hi,

if I understand lynxis staging tree [1] correctly, future squashfs 
images will be reproducible.


Will this be merged to master before the next 18.x release?

Best,
Paul

[1] 
https://git.openwrt.org/?p=openwrt/staging/lynxis.git;a=commit;h=1fd818d4f8255cbaa0173d856f09f24bd88a6209


I tried the patch apart from a typo (?) in the file 
`./tools/squashfs4/Makefile` it seems to work and creates actually 
reproducible squashfs images!


The typo is line 18 [1] where the 4 of squashfs is missing.
In the current state the staging tree produces the following error 
message:


CFLAGS="-O2 -I/home/a/src/openwrt/staging_dir/host/include " 
CPPFLAGS="-I/home/a/src/openwrt/staging_dir/host/include " CXXFLAGS="" 
LDFLAGS="-L/home/a/src/openwrt/staging_dir/host/lib " make -C 
/home/a/src/openwrt/build_dir/host/squashfs5.0/squashfs-tools 
XZ_SUPPORT=1 LZMA_XZ_SUPPORT=1 XATTR_SUPPORT= 
LZMA_LIB="/home/a/src/openwrt/staging_dir/host/lib/liblzma.a" 
EXTRA_CFLAGS="-I/home/a/src/openwrt/staging_dir/host/include" 
mksquashfs unsquashfs
make[4]: *** 
/home/a/src/openwrt/build_dir/host/squashfs5.0/squashfs-tools: No such 
file or directory.  Stop.
make[3]: *** [Makefile:44: 
/home/a/src/openwrt/build_dir/host/squashfs5.0/.built] Error 2

make[3]: Leaving directory '/home/a/src/openwrt/tools/squashfs4'
make[2]: *** [tools/Makefile:154: tools/squashfs4/compile] Error 2
make[2]: Leaving directory '/home/a/src/openwrt'
make[1]: *** [tools/Makefile:150: 
/home/a/src/openwrt/staging_dir/target-mipsel_24kc_musl/stamp/.tools_compile_yynynynyynnnyyynyynynnyyynnyy] 
Error 2

make[1]: Leaving directory '/home/a/src/openwrt'
make: *** [/home/a/src/openwrt/include/toplevel.mk:218: world] Error 
2```


Best regards,
Paul Spooren

[1] 
https://git.openwrt.org/?p=openwrt/staging/lynxis.git;a=blob;f=tools/squashfs4/Makefile;h=fd4388d03137454914007e8f1fb7a120c127674c;hb=1fd818d4f8255cbaa0173d856f09f24bd88a6209#l18




___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev




___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


Re: [LEDE-DEV] [PATCH] brcm2708: add squashfs rootfs image

2018-05-05 Thread Paul Spooren



On Thu, Mar 29, 2018 at 9:22 AM, Daniel Golle  
wrote:

On Tue, Mar 27, 2018 at 07:42:18PM +0200, Christian Lamparter wrote:

 This patch adds a image with squashfs as the root filesystem.
 A rootfs_data partition will be generated on the first boot
 and placed inside the rootfs partition (just after the squashfs
 image).

 advantages:
  - it is possible to migrate from an existing -ext4
installation and back via sysupgrade.
  - existing partition layout will not be lost.
  - slightly smaller image size.
  - support for attendedsysupgrade

 disadvantages:
  - needs f2fs + tools as well. This is because fs-tools decides on 
the
blocksize of the sdcard. So either f2fs or ext4 can get choosen 
as
the rootfs_data filesystem (depends on the size of the root 
partition).

  - rootfs_data is placed into the rootfs partition. This makes
it difficult for tools that expect a /dev/mmc0pX device.
It also makes it difficult for data recovery tools since they
might not expect to find a embedded partition or will be
confused.

 For people with existing build configurations: make sure to include 
mkf2fs
 and f2fsck package into the image... Otherwise the new -squashfs 
image will
 boot of a ram-overlay and won't keep the configurations after a 
reboot.


 Cc: Álvaro Fernández Rojas 
 Cc: Paul Spooren 
 Cc: Daniel Golle 
 Signed-off-by: Christian Lamparter 


Acked-by: Daniel Golle 


I tried the patch and the created squashfs works! However, trying a 
sysupgrade errored saying it's unsupported. Is it possible we have to 
teach the sysupgrade that squashfs is compatible, too?


Except from that, it works and runs with no problems on my RPI3, please 
merge.


Regarding the doubts of Christian, is there any problem producing the 
ext4 and squashfs per default?


Best, Paul


___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


Re: [LEDE-DEV] [RFC PATCH] tools/squashfs: change to upstream and update to new version 5.0-rc1

2018-05-05 Thread Paul Spooren
Are there any updates on this issue? I'd really like to see squasfs 5.0 
used in OpenWrt!


On Sat, May 27, 2017 at 8:51 PM, Hauke Mehrtens  
wrote:

On 05/26/2017 06:13 PM, Alexander Couzens wrote:

 squashfs is quite long unmaintained. All patches from major
 distributions are integrated.
 Fixed timestamp is now using the environment SOURCE_DATE_EPOCH
 instead of arguments.

 Signed-off-by: Alexander Couzens 


Thanks for working on this.


 ---
  include/image.mk   |   3 +-
  tools/squashfs4/Makefile   |  12 +-
  tools/squashfs4/patches/100-portability.patch  |  40 -
  .../patches/110-allow_static_liblzma.patch |  30 -
  tools/squashfs4/patches/120-cygwin_fixes.patch | 153 
  tools/squashfs4/patches/150-freebsd_fixes.patch|  10 -
  .../patches/160-expose_lzma_xz_options.patch   | 929 
-

  ...0-add_support_for_LZMA_MAGIC_to_unsqashfs.patch |  72 --
  tools/squashfs4/patches/180-openbsd_compat.patch   |  24 -
  .../patches/190-no_nonstatic_inline.patch  |  36 -
  .../patches/200-add-fixed-timestamp-option.patch   |  82 --
  11 files changed, 6 insertions(+), 1385 deletions(-)
  delete mode 100644 tools/squashfs4/patches/100-portability.patch
  delete mode 100644 
tools/squashfs4/patches/110-allow_static_liblzma.patch

  delete mode 100644 tools/squashfs4/patches/120-cygwin_fixes.patch
  delete mode 100644 tools/squashfs4/patches/150-freebsd_fixes.patch
  delete mode 100644 
tools/squashfs4/patches/160-expose_lzma_xz_options.patch
  delete mode 100644 
tools/squashfs4/patches/170-add_support_for_LZMA_MAGIC_to_unsqashfs.patch

  delete mode 100644 tools/squashfs4/patches/180-openbsd_compat.patch
  delete mode 100644 
tools/squashfs4/patches/190-no_nonstatic_inline.patch
  delete mode 100644 
tools/squashfs4/patches/200-add-fixed-timestamp-option.patch


 diff --git a/include/image.mk b/include/image.mk
 index ad9535d018..eaabba2d0e 100644
 --- a/include/image.mk
 +++ b/include/image.mk
 @@ -203,8 +203,7 @@ define Image/mkfs/squashfs
  	$(STAGING_DIR_HOST)/bin/mksquashfs4 $(call mkfs_target_dir,$(1)) 
$@ \

-nopad -noappend -root-owned \
-comp $(SQUASHFSCOMP) $(SQUASHFSOPT) \
 -  -processors 1 \
 -  $(if $(SOURCE_DATE_EPOCH),-fixed-time $(SOURCE_DATE_EPOCH))
 +  -processors 1
  endef

  # $(1): board name
 diff --git a/tools/squashfs4/Makefile b/tools/squashfs4/Makefile
 index e2c9fc91cc..e176f06e86 100644
 --- a/tools/squashfs4/Makefile
 +++ b/tools/squashfs4/Makefile
 @@ -7,14 +7,12 @@
  include $(TOPDIR)/rules.mk

  PKG_NAME:=squashfs4
 -PKG_VERSION:=4.2
 +PKG_VERSION:=5.0

 -PKG_SOURCE:=squashfs$(PKG_VERSION).tar.gz
 -PKG_SOURCE_URL:=@SF/squashfs
 
-PKG_HASH:=d9e0195aa922dbb665ed322b9aaa96e04a476ee650f39bbeadb0d00b24022e96

 -PKG_CAT:=zcat
 -
 -HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/squashfs$(PKG_VERSION)
 +PKG_SOURCE_PROTO:=git
 +PKG_SOURCE_DATE:=2017-05-25
 +PKG_SOURCE_URL:=https://github.com/lynxis/squashfs-tools.git
 +PKG_SOURCE_VERSION:=32a07d4156a281084c90a4b78affc8b0b32a26fc

  include $(INCLUDE_DIR)/host-build.mk



Why not use https://github.com/squashfs-tools/squashfs-tools or what
will be the official repo?


 index 9e1c1fbb1e..00
 --- a/tools/squashfs4/patches/160-expose_lzma_xz_options.patch
 +++ /dev/null
 @@ -1,929 +0,0 @@
  /dev/null
 -+++ b/squashfs-tools/lzma_xz_options.h

..

 -+struct lzma_opts {
 -+ uint32_t dict_size;
 -+ uint32_t flags;
 -+#define LZMA_OPT_FLT_MASK0x
 -+#define LZMA_OPT_PRE_OFF 16
 -+#define LZMA_OPT_PRE_MASK(0xf << LZMA_OPT_PRE_OFF)
 -+#define LZMA_OPT_EXTREME 20
 -+ uint16_t bit_opts;
 -+#define LZMA_OPT_LC_OFF  0
 -+#define LZMA_OPT_LC_MASK (0x7 << LZMA_OPT_LC_OFF)
 -+#define LZMA_OPT_LP_OFF  3
 -+#define LZMA_OPT_LP_MASK (0x7 << LZMA_OPT_LP_OFF)
 -+#define LZMA_OPT_PB_OFF  6
 -+#define LZMA_OPT_PB_MASK (0x7 << LZMA_OPT_PB_OFF)
 -+ uint16_t fb;
 -+};


Nice that you got this change upstream. The kernel version of this
structure only has the first two members, but it still works.
See struct disk_comp_opts in fs/squashfs/xz_wrapper.c

Hauke

___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev



___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev