Re: [PATCH] bcm47xx: relocate LZMA loader #2

2023-02-07 Thread Rafał Miłecki

On 7.02.2023 15:06, Rafał Miłecki wrote:

From: Rafał Miłecki 

Increased size of the 5.15 kernel requires bumping BZ_TEXT_START again.
Without this CFE hangs at the:
Starting program at 0x80001000

This fixes booting 5.15 based mips74k images on:
1. BCM4706 (Luxul XWR-1750)
2. BCM5357B0 (Linksys E1000 V2.1)
3. BCM47186B0 (Luxul XWR-600)


4. BCM5358 (Linksys E2500 V3)



It isn't needed but also doesn't break:
1. BCM5354 (Asus WL-500gP V2)

Ref: 4cd97e476089 ("bcm47xx: relocate LZMA loader")
Cc: Hauke Mehrtens 
Signed-off-by: Rafał Miłecki 



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


Using prebuilt binaries in SDK builds

2023-02-07 Thread Eric Montellese
Hello all,

As I'm sure those on this list are aware, OpenWrt is used extensively in the 
commercial router world.

At NETGEAR, I am working to find a satisfactory solution to an annoying little 
corporate problem -- but I think the solution to that problem may be of value 
to the greater open-source community.

The situation is this:
When building a particular source package using the SDK, I need to rebuild any 
dependent packages from source as well

This has two problems:
1. It takes unnecessary time (since the package has already been built before).
2. More importantly for my use case, code sharing is not always possible within 
the corporate world.  Source code to a dependency may not be available.

(2) has led to some 'ugly' solutions to make it possible for companies to share 
libraries with one another and enable a source build.

Given that this seems like a common-enough problem I wonder if (a) the problem 
has already been solved (and I just haven't been able to find) or (b) if it is 
a problem that the community is interested in solving (rather than me going off 
in a hole and solving it for just our use case).  Even in the open-source 
world, "it'd be nice" if a user could make a change to a package without (for 
example) needing to rebuild openssl just to get the required files available in 
the staging_dir.

My suggested solution is to generate two outputs from the build:
1. The IPK, as normal
2. A staging_tarball which includes all of the files copied during the 
Build/InstallDev phase.

The 'staging_tarball' could be created by changing the $(1) parameter passed to 
Build/InstallDev to a new temporary directory which (after InstallDev returns) 
can be overlayed onto the actual staging_dir as well as tarred up for future 
use.  All of these 'staging_tarballs' would use the same naming convention as 
the IPKs and go into another directory under the 'bin' output directory.

I recognize that this solution is not one that is usable in all circumstances.  
For example, if the package you're building changes a CONFIG rule that would 
have an effect on the dependent build, this would not work -- however, the same 
problem already exists for IPKs.

Thoughts on this proposed solution, or any alternatives, are appreciated.

Best Regards,
Eric
This e-mail, including attachments, may include confidential and/or proprietary 
information, and may be used only by the person or entity to which it is 
addressed. If the reader of this e-mail is not the intended recipient or his or 
her authorized agent, the reader is hereby notified that any dissemination, 
distribution or copying of this e-mail is prohibited. If you have received this 
e-mail in error, please notify the sender by replying to this message and 
delete this e-mail immediately.

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


[PATCH] elfutils: fix build with GCC 11

2023-02-07 Thread Andre Heider
GCC 11 doesn't know about -Wno-error=use-after-free and aborts
compilation.

Fixes: 2748c45d "elfutils: Ignore wrong use-after-free error"
Signed-off-by: Andre Heider 
---
 package/libs/elfutils/Makefile | 10 +-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/package/libs/elfutils/Makefile b/package/libs/elfutils/Makefile
index 5204e0847e..e8477ead03 100644
--- a/package/libs/elfutils/Makefile
+++ b/package/libs/elfutils/Makefile
@@ -80,7 +80,15 @@ HOST_CONFIGURE_VARS += \
 CONFIGURE_VARS += \
ac_cv_search__obstack_free=yes
 
-TARGET_CFLAGS += -D_GNU_SOURCE -Wno-unused-result -Wno-format-nonliteral 
-Wno-error=use-after-free
+TARGET_CFLAGS += \
+   -D_GNU_SOURCE \
+   -Wno-unused-result \
+   -Wno-format-nonliteral
+
+ifneq ($(CONFIG_GCC_USE_VERSION_11),y)
+TARGET_CFLAGS += \
+   -Wno-error=use-after-free
+endif
 
 define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include
-- 
2.39.1


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


Re: strange errors on mpc85xx-p1010-tplink_tl-wdr4900-v1

2023-02-07 Thread Bastian Bittorf
On Sun, Feb 05, 2023 at 03:47:46PM +, Bastian Bittorf wrote:
> I build r21997 for the wdr4900, flashed with
> 'sysupgrade -n /tmp/factory.bin' and recognized strange
> errors with custom scripts. It can be reduced to:
> 
> $ test A -gt 5 && echo OK
> ash: A: out of range
> OK

i compiled kernel-6.1 + busybox 1.36.0 for powerpc/mpc85xx [1]
using toolchain from http://musl.cc/powerpc-linux-muslsf-cross.tgz
and it is just the same broken behavior.

it does not happen an other architectures,
so it can be a compiler or toolchain issue.

i will investigate further.
bye, bastian

[1] http://intercity-vpn.de/mpc85xx/
qemu-system-ppc -M mpc8544ds -kernel zImage -initrd initramfs.cpio.gz -nographic

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


[PATCH] bcm47xx: relocate LZMA loader #2

2023-02-07 Thread Rafał Miłecki
From: Rafał Miłecki 

Increased size of the 5.15 kernel requires bumping BZ_TEXT_START again.
Without this CFE hangs at the:
Starting program at 0x80001000

This fixes booting 5.15 based mips74k images on:
1. BCM4706 (Luxul XWR-1750)
2. BCM5357B0 (Linksys E1000 V2.1)
3. BCM47186B0 (Luxul XWR-600)

It isn't needed but also doesn't break:
1. BCM5354 (Asus WL-500gP V2)

Ref: 4cd97e476089 ("bcm47xx: relocate LZMA loader")
Cc: Hauke Mehrtens 
Signed-off-by: Rafał Miłecki 
---
 target/linux/bcm47xx/image/lzma-loader/src/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/target/linux/bcm47xx/image/lzma-loader/src/Makefile 
b/target/linux/bcm47xx/image/lzma-loader/src/Makefile
index a3e7ae1c92..44891a7ab0 100644
--- a/target/linux/bcm47xx/image/lzma-loader/src/Makefile
+++ b/target/linux/bcm47xx/image/lzma-loader/src/Makefile
@@ -18,8 +18,8 @@
 #
 
 TEXT_START := 0x80001000
-BZ_TEXT_START  := 0x8070
-BZ_STACK_START := 0x8080
+BZ_TEXT_START  := 0x8080
+BZ_STACK_START := 0x8090
 
 OBJCOPY:= $(CROSS_COMPILE)objcopy -O binary -R .reginfo -R 
.note -R .comment -R .mdebug -S
 
-- 
2.34.1


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