[OpenWrt-Devel] [PATCH 1/4] tools: build squashfs (v3) for ath79

Mathias Kresin dev at kresin.me
Wed Jun 13 14:01:28 EDT 2018


13.06.2018 10:51, Zoltan HERPAI:
> Certain Netgear devices use BE squashfs for the kernel image. As
> squashfs4 only supports creating LE images, add squashfs (v3) into
> the tools to be built for ath79.
> 
> Trying to use an LE squashfs (thus trying to use squashfs4 only for
> building the image) for the kernel image results in the bootloader
> barfing and stopping.
> 
> Signed-off-by: Zoltan HERPAI <wigyori at uid0.hu>
> ---
>   tools/Makefile | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/tools/Makefile b/tools/Makefile
> index d2b5daf..c8ef02c 100644
> --- a/tools/Makefile
> +++ b/tools/Makefile
> @@ -31,6 +31,7 @@ tools-$(CONFIG_TARGET_orion_generic) += wrt350nv2-builder upslug2
>   tools-$(CONFIG_TARGET_x86) += qemu
>   tools-$(CONFIG_TARGET_mxs) += elftosb sdimage
>   tools-$(CONFIG_TARGET_ar71xx) += lzma-old squashfs
> +tools-$(CONFIG_TARGET_ath79) += squashfs
>   tools-$(CONFIG_USES_MINOR) += kernel2minor
>   tools-y += lzma squashfs4
>   tools-$(BUILD_B43_TOOLS) += b43-tools
> 

Hey Zoltan,

I tried to do exactly the same at time I noticed the issue. If I apply 
your patch, the following (and even more related) new warnings are shown 
on my system:

tools/Makefile:153: warning: overriding recipe for target 
'tools/squashfs/clean'
tools/Makefile:153: warning: ignoring old recipe for target 
'tools/squashfs/clean'
tools/Makefile:153: warning: overriding recipe for target 
'tools/squashfs/download'
tools/Makefile:153: warning: ignoring old recipe for target 
'tools/squashfs/download'
tools/Makefile:153: warning: overriding recipe for target 
'tools/squashfs/prepare'
tools/Makefile:153: warning: ignoring old recipe for target 
'tools/squashfs/prepare'
tools/Makefile:153: warning: overriding recipe for target 
'tools/squashfs/compile'

I've no idea what is going wrong. Instead I've the following change in 
my local tree since a few days (but didn't managed to send it yet):

diff --git a/tools/Makefile b/tools/Makefile
index d2b5daf..b546c64 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -30,7 +30,10 @@ tools-y += mtools dosfstools libressl
  tools-$(CONFIG_TARGET_orion_generic) += wrt350nv2-builder upslug2
  tools-$(CONFIG_TARGET_x86) += qemu
  tools-$(CONFIG_TARGET_mxs) += elftosb sdimage
-tools-$(CONFIG_TARGET_ar71xx) += lzma-old squashfs
+tools-$(CONFIG_TARGET_ar71xx) += lzma-old
+ifeq ($(CONFIG_TARGET_ar71xx)$(CONFIG_TARGET_ath79),y)
+  tools-y += squashfs
+endif
  tools-$(CONFIG_USES_MINOR) += kernel2minor
  tools-y += lzma squashfs4
  tools-$(BUILD_B43_TOOLS) += b43-tools

Using this approach the squashfs3 binary is build for ar71xx and ath79 
without these warning.

Mathias


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/listinfo/openwrt-devel



More information about the openwrt-devel mailing list