<feed xmlns='http://www.w3.org/2005/Atom'>
<title>staging/pepe2k/scripts, branch v22.03.3</title>
<subtitle>Staging tree of Piotr Dymacz</subtitle>
<id>https://git.openwrt.org/openwrt/staging/pepe2k/atom?h=v22.03.3</id>
<link rel='self' href='https://git.openwrt.org/openwrt/staging/pepe2k/atom?h=v22.03.3'/>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/openwrt/staging/pepe2k/'/>
<updated>2022-12-04T15:45:30Z</updated>
<entry>
<title>scripts/ext-tools: introduce new script to install prebuilt tools</title>
<updated>2022-12-04T15:45:30Z</updated>
<author>
<name>Christian Marangi</name>
</author>
<published>2022-09-30T17:36:06Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/openwrt/staging/pepe2k/commit/?id=439e19de967bffcc7a9fa4d2e16e873a67b95738'/>
<id>urn:sha1:439e19de967bffcc7a9fa4d2e16e873a67b95738</id>
<content type='text'>
Add a simple script to make it easier to install a prebuilt tools tar.
Currently it will be used by our tools container and kernel workflow on
github.

Simple script that take a tar that contains prebuilt host tools, extract
them and refresh the timestamps to skip recompilation of such host
tools.

By default it refresh timestamps of build_dir/host and
staging_dir/host/stamp.

Signed-off-by: Christian Marangi &lt;ansuelsmth@gmail.com&gt;
(cherry picked from commit 5428bdc2dfaa45bc7adc89c3b9224da7d21961d0)
</content>
</entry>
<entry>
<title>ramips: add support for ZyXEL NWA50AX / NWA55AXE</title>
<updated>2022-10-14T21:14:50Z</updated>
<author>
<name>David Bauer</name>
</author>
<published>2022-05-27T15:48:06Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/openwrt/staging/pepe2k/commit/?id=2050bc4f64e3824d6a632cce5fabc0b816ea0508'/>
<id>urn:sha1:2050bc4f64e3824d6a632cce5fabc0b816ea0508</id>
<content type='text'>
Hardware
--------
CPU:    Mediatek MT7621
RAM:    256M DDR3
FLASH:  128M NAND
ETH:    1x Gigabit Ethernet
WiFi:   Mediatek MT7915 (2.4/5GHz 802.11ax 2x2 DBDC)
BTN:    1x Reset (NWA50AX only)
LED:    1x Multi-Color (NWA50AX only)

UART Console
------------
NWA50AX:
Available below the rubber cover next to the ethernet port.
NWA55AXE:
Available on the board when disassembling the device.

Settings: 115200 8N1

Layout:

&lt;12V&gt; &lt;LAN&gt; GND-RX-TX-VCC

Logic-Level is 3V3. Don't connect VCC to your UART adapter!

Installation Web-UI
-------------------
Upload the Factory image using the devices Web-Interface.

As the device uses a dual-image partition layout, OpenWrt can only
installed on Slot A. This requires the current active image prior
flashing the device to be on Slot B.

If the currently installed image is started from Slot A, the device will
flash OpenWrt to Slot B. OpenWrt will panic upon first boot in this case
and the device will return to the ZyXEL firmware upon next boot.

If this happens, first install a ZyXEL firmware upgrade of any version
and install OpenWrt after that.

Installation TFTP
-----------------
This installation routine is especially useful in case
 * unknown device password (NWA55AXE lacks reset button)
 * bricked device

Attach to the UART console header of the device. Interrupt the boot
procedure by pressing Enter.

The bootloader has a reduced command-set available from CLI, but more
commands can be executed by abusing the atns command.

Boot a OpenWrt initramfs image available on a TFTP server at
192.168.1.66. Rename the image to owrt.bin

 $ atnf owrt.bin
 $ atna 192.168.1.88
 $ atns "192.168.1.66; tftpboot; bootm"

Upon booting, set the booted image to the correct slot:

 $ zyxel-bootconfig /dev/mtd10 get-status
 $ zyxel-bootconfig /dev/mtd10 set-image-status 0 valid
 $ zyxel-bootconfig /dev/mtd10 set-active-image 0

Copy the OpenWrt ramboot-factory image to the device using scp.
Write the factory image to NAND and reboot the device.

 $ mtd write ramboot-factory.bin firmware
 $ reboot

Signed-off-by: David Bauer &lt;mail@david-bauer.net&gt;
(cherry picked from commit a0b7fef0ffe4cd9cca39a652a37e4f3ce8f0a681)
</content>
</entry>
<entry>
<title>scripts: ext-toolchain: add support for musl</title>
<updated>2022-10-03T15:40:26Z</updated>
<author>
<name>Christian Marangi</name>
</author>
<published>2022-07-17T15:56:59Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/openwrt/staging/pepe2k/commit/?id=4ad6925a9e6685ecb1931cd76431d1339f47e8c2'/>
<id>urn:sha1:4ad6925a9e6685ecb1931cd76431d1339f47e8c2</id>
<content type='text'>
Openwrt now supports only glibc and musl. Add support for musl and
rework the libc check to handle the new config flags and correctly
compile package basend on that.

Signed-off-by: Christian Marangi &lt;ansuelsmth@gmail.com&gt;
(cherry picked from commit 7be01fe13b4517e5edb8a4818f437d60144cdcb4)
</content>
</entry>
<entry>
<title>scripts: ext-toolchain: add support for info.mk in probe_cc</title>
<updated>2022-10-03T15:40:26Z</updated>
<author>
<name>Christian Marangi</name>
</author>
<published>2022-07-17T15:56:36Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/openwrt/staging/pepe2k/commit/?id=65bd63206900c0660ac5eb9465a4ffdacb9e51ec'/>
<id>urn:sha1:65bd63206900c0660ac5eb9465a4ffdacb9e51ec</id>
<content type='text'>
Openwrt generate info.mk that contains the libc type. For probe_cc check
if the file exist and parse directly it for LIBC type.

Signed-off-by: Christian Marangi &lt;ansuelsmth@gmail.com&gt;
(cherry picked from commit 75311977f5ff64b491cb57ac713d75e0e410d786)
</content>
</entry>
<entry>
<title>scripts: ext-toolchain: actually probe libc type on config generation</title>
<updated>2022-10-03T15:40:26Z</updated>
<author>
<name>Christian Marangi</name>
</author>
<published>2022-07-17T15:53:58Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/openwrt/staging/pepe2k/commit/?id=b0622d1221281babcb4fa6901becff0ee9bfe6ab'/>
<id>urn:sha1:b0622d1221281babcb4fa6901becff0ee9bfe6ab</id>
<content type='text'>
Currently we never call probe_cc before config generation, this cause
the script to never actually detect the correct libc type.
Call probe_cc before config generation to correctl set the .config file.

Signed-off-by: Christian Marangi &lt;ansuelsmth@gmail.com&gt;
(cherry picked from commit ddeabc75ebe3151ff7da302cb1aae702b3ad7eba)
</content>
</entry>
<entry>
<title>scripts: ext-toolchain: add option to overwrite config</title>
<updated>2022-10-03T15:40:26Z</updated>
<author>
<name>Christian Marangi</name>
</author>
<published>2022-07-04T16:22:18Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/openwrt/staging/pepe2k/commit/?id=d1a6c3559142a68035a171fb61535401857d41c5'/>
<id>urn:sha1:d1a6c3559142a68035a171fb61535401857d41c5</id>
<content type='text'>
It can be useful to overwrite an already generated config.
Option are simply added at the end of the config and make defconfig
will overwrite the relevant option with the new one.

Signed-off-by: Christian Marangi &lt;ansuelsmth@gmail.com&gt;
(cherry picked from commit f4dd18ca39c42a324e34633c8ee553717531bc3b)
</content>
</entry>
<entry>
<title>scripts: ext-toolchain: fix wrong prefix in print_config generation</title>
<updated>2022-10-03T15:40:26Z</updated>
<author>
<name>Christian Marangi</name>
</author>
<published>2022-07-03T00:20:11Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/openwrt/staging/pepe2k/commit/?id=24cf766dfe80721dd033132a90399cb28138a63f'/>
<id>urn:sha1:24cf766dfe80721dd033132a90399cb28138a63f</id>
<content type='text'>
The parsed prefix in print_config is wrong and this produce broken
generated .config that won't work with any external toolchain.

Currently the prefix from a CC of

'arm-openwrt-linux-muslgnueabi-gcc-12.1.0'

produce a prefix

'arm-openwrt-linux-muslgnueabi-gcc-'

This is wrong as the real prefix should be

'arm-openwrt-linux-muslgnueabi-'

This is probably caused by a change in how the toolchain is now handled
that now append also the gcc version. Probably in ancient days the
version wasn't part of the name and the prefix generation stripped the
'-gcc' instead of the gcc version.

Fix this and correctly strip the gcc version and the gcc suffix to
correctly call toolchain bins.

Signed-off-by: Christian Marangi &lt;ansuelsmth@gmail.com&gt;
(cherry picked from commit 53c293262fce844c8291ab82e6726a8489d3c57b)
</content>
</entry>
<entry>
<title>scripts/download.pl: fix downloads with wget</title>
<updated>2022-09-16T16:50:46Z</updated>
<author>
<name>Petr Štetiar</name>
</author>
<published>2022-09-13T05:40:37Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/openwrt/staging/pepe2k/commit/?id=81388f74b58e98d79274a788b442b7a1aa8a11c7'/>
<id>urn:sha1:81388f74b58e98d79274a788b442b7a1aa8a11c7</id>
<content type='text'>
Several users of wget for downloads (curl is not available in the
system) have reported broken download functionality:

 wget --tries=5 --timeout=20 --output-document=-  https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.10.142.tar.xz
 http://: Invalid host name.

Thats all happening due to '' was passed as an argument, which got later
expanded to http://.

In the context of a list constructor '' is not nothing, it is an empty
string element.  So fix it by using () as it will yield "nothing" and
thus not introduce an empty string element.

Fixes: #10692
Fixes: 90c6e3aedf16 ("scripts: always check certificates")
Signed-off-by: Jo-Philipp Wich &lt;jo@mein.io&gt; [shellwords() -&gt; ()]
Signed-off-by: Petr Štetiar &lt;ynezz@true.cz&gt;
(cherry picked from commit 50a48faa1b8424e6b4b436b7118fffa2cba14b18)
</content>
</entry>
<entry>
<title>scripts/download.pl: silence can't exec curl warning</title>
<updated>2022-09-16T16:50:46Z</updated>
<author>
<name>Petr Štetiar</name>
</author>
<published>2022-09-13T05:38:10Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/openwrt/staging/pepe2k/commit/?id=b8cbca8ac8e89aa417a2ab739b81d288185a4b2d'/>
<id>urn:sha1:b8cbca8ac8e89aa417a2ab739b81d288185a4b2d</id>
<content type='text'>
When running build in verbose mode `make V=s` we can see a lot of
following warnings when curl is not available in the system:

 Can't exec "curl": No such file or directory at scripts/download.pl line 77.

So lets fix it by redirecting of the stderr to null hole.

Signed-off-by: Petr Štetiar &lt;ynezz@true.cz&gt;
(cherry picked from commit c836ca84e8f641e10a8349a8f9b7432b33d6cec1)
</content>
</entry>
<entry>
<title>scripts: always check certificates</title>
<updated>2022-09-16T16:50:46Z</updated>
<author>
<name>Josh Roys</name>
</author>
<published>2022-07-23T15:23:16Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/openwrt/staging/pepe2k/commit/?id=340b138932c3720db227821415f494ac81e8b675'/>
<id>urn:sha1:340b138932c3720db227821415f494ac81e8b675</id>
<content type='text'>
Remove flags from wget and curl instructing them to ignore bad server
certificates. Although other mechanisms can protect against malicious
modifications of downloads, other vectors of attack may be available
to an adversary.

TLS certificate verification can be disabled by turning oof the
"Enable TLS certificate verification during package download" option
enabled by default in the "Global build settings" in "make menuconfig"

Signed-off-by: Josh Roys &lt;roysjosh@gmail.com&gt;
[ add additional info on how to disable this option ]
Signed-off-by: Christian Marangi &lt;ansuelsmth@gmail.com&gt;
(cherry picked from commit 90c6e3aedf167b0ae1baf376e7800a631681e69a)
</content>
</entry>
</feed>
