<feed xmlns='http://www.w3.org/2005/Atom'>
<title>staging/stintel/package/base-files, branch master</title>
<subtitle>Staging tree of Stijn Tintel</subtitle>
<id>https://git.openwrt.org/openwrt/staging/stintel/atom?h=master</id>
<link rel='self' href='https://git.openwrt.org/openwrt/staging/stintel/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/openwrt/staging/stintel/'/>
<updated>2026-11-04T21:34:59Z</updated>
<entry>
<title>base-files: system.sh: add mtd_get_part_erasesize()</title>
<updated>2026-11-04T21:34:59Z</updated>
<author>
<name>Michael Pratt</name>
</author>
<published>2026-08-30T22:02:50Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/openwrt/staging/stintel/commit/?id=932b3dc5177a848ba3d8068da2e24ac9b6eb1771'/>
<id>urn:sha1:932b3dc5177a848ba3d8068da2e24ac9b6eb1771</id>
<content type='text'>
Similar to mtd_get_part_size() but for the erase sector size.

Signed-off-by: Michael Pratt &lt;mcpratt@pm.me&gt;
Link: https://github.com/openwrt/openwrt/pull/24866
Signed-off-by: Robert Marko &lt;robimarko@gmail.com&gt;
</content>
</entry>
<entry>
<title>base-files: add mtd_get_mac_nvmem() for VLAN MAC addresses</title>
<updated>2026-11-04T21:34:59Z</updated>
<author>
<name>Michael Pratt</name>
</author>
<published>2026-08-22T18:47:44Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/openwrt/staging/stintel/commit/?id=474e8bd7d7c92f9d78f939637c07dd5fb47e8536'/>
<id>urn:sha1:474e8bd7d7c92f9d78f939637c07dd5fb47e8536</id>
<content type='text'>
Devicetree only allows for the base physical address of a device
to be set using NVMEM cells with a phandle to an NVMEM device.
This leaves out the ability to set a VLAN MAC, for example,
a WAN port of a switch to be a VLAN for the WAN firewall side
with a separate MAC address for isolated identification.

When the u-boot-env layout driver probes successfully,
all of the variables are available as NVMEM cells in sysfs,
not just the ones used with a phandle in devicetree.

Add a new function in system.sh that reads the cells in sysfs
based on the MTD device used in the NVMEM driver,
similar to mtd_get_mac_binary() and to how
u-boot tools are patched to detect NVMEM devices.

Ref: 8142c4554ffa ("fw_env: add fallback to Linux's NVMEM based access") # uboot.git
Signed-off-by: Michael Pratt &lt;mcpratt@pm.me&gt;
Link: https://github.com/openwrt/openwrt/pull/24866
Signed-off-by: Robert Marko &lt;robimarko@gmail.com&gt;
</content>
</entry>
<entry>
<title>base-files: add /tmp/resolv.conf.d/resolv.conf</title>
<updated>2026-11-03T11:57:36Z</updated>
<author>
<name>Daniel Golle</name>
</author>
<published>2026-11-02T14:42:33Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/openwrt/staging/stintel/commit/?id=e14841b1fc8edbe71524035890ad17d79488e227'/>
<id>urn:sha1:e14841b1fc8edbe71524035890ad17d79488e227</id>
<content type='text'>
/tmp/resolv.conf links to the netifd-maintained resolv.conf.auto, and
dnsmasq replaces the link by a file of its own, so the resolver
configuration leaves /tmp/resolv.conf.d whenever dnsmasq runs. A jail
sharing the host network can follow a file inside that directory
across rename-replacement, but not one outside it.

Create /tmp/resolv.conf.d/resolv.conf as the resolver configuration of
the system and point /tmp/resolv.conf at it. It links to
resolv.conf.auto relative to the directory, so it also resolves where a
jail mounts the directory at a different path.

Signed-off-by: Daniel Golle &lt;daniel@makrotopia.org&gt;
</content>
</entry>
<entry>
<title>base-files: start only enabled services on package upgrade</title>
<updated>2026-10-28T14:46:20Z</updated>
<author>
<name>Felix Fietkau</name>
</author>
<published>2026-10-27T13:46:34Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/openwrt/staging/stintel/commit/?id=a0318a5106e6c26a1ebfd425b9f1671f63fb1ebe'/>
<id>urn:sha1:a0318a5106e6c26a1ebfd425b9f1671f63fb1ebe</id>
<content type='text'>
Since commit afaa34ccd734 ("base-files: don't modify enabled state of
service on upgrade"), default_postinst() starts every init script of
the package on an upgrade, and leaves out only the enable. With opkg the
prerm stops the service first, so the pair acts as a restart. apk runs
no prerm on an upgrade, and its post-upgrade script calls
default_postinst() with PKG_UPGRADE=1. A reinstall or an upgrade with
apk thus starts a service that the system has disabled and stopped.

On an upgrade, start an init script only where it reports itself
enabled. A fresh install still enables and starts each service, and an
offline root still only enables it.

With opkg, a service that the system has disabled but that was started
by hand now stays stopped after an upgrade, since the prerm stops it
and the postinst no longer starts it.

Signed-off-by: Felix Fietkau &lt;nbd@nbd.name&gt;
</content>
</entry>
<entry>
<title>base-files: legacy-sdcard: don't erase extra partitions on sysupgrade</title>
<updated>2026-10-15T08:38:14Z</updated>
<author>
<name>John Audia</name>
</author>
<published>2026-10-04T08:31:40Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/openwrt/staging/stintel/commit/?id=89d8b6df9c67ecf8d16ff61593b7a245c99e269b'/>
<id>urn:sha1:89d8b6df9c67ecf8d16ff61593b7a245c99e269b</id>
<content type='text'>
Writing the full image erases partitions the image lacks. Refuse that at
upgrade time unless sysupgrade -p is given, so --force and failsafe
cannot bypass it, and read MBR and GPT tables the same way everywhere.

sysupgrade now exports SAVE_PARTITIONS to the image check and the -p help
text mentions the erase.

Signed-off-by: John Audia &lt;therealgraysky@proton.me&gt;
</content>
</entry>
<entry>
<title>base-files: legacy-sdcard: drop the bootloader write</title>
<updated>2026-10-15T08:38:14Z</updated>
<author>
<name>John Audia</name>
</author>
<published>2026-10-04T08:31:40Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/openwrt/staging/stintel/commit/?id=0488cd78d26e92af516e2e32615e62f5978a5b82'/>
<id>urn:sha1:0488cd78d26e92af516e2e32615e62f5978a5b82</id>
<content type='text'>
It writes to "$diskdev" without /dev/, so it creates a file in the
working directory and has never reached the disk.

Signed-off-by: John Audia &lt;therealgraysky@proton.me&gt;
</content>
</entry>
<entry>
<title>base-files: support per-color intensities for multicolor LEDs</title>
<updated>2026-10-11T19:28:57Z</updated>
<author>
<name>André Valentin</name>
</author>
<published>2026-08-23T22:47:11Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/openwrt/staging/stintel/commit/?id=eaffd8be91a828d1af1e27124e08e1d3dc7b6d90'/>
<id>urn:sha1:eaffd8be91a828d1af1e27124e08e1d3dc7b6d90</id>
<content type='text'>
The led init script already knows how to drive a multicolor LED: it reads
multi_index and writes one intensity per color to multi_intensity, taken
from color_&lt;name&gt; options of the led section. Nothing fills those options
in, though - generate_led only passes name, sysfs, trigger and default on
to uci, so the intensities stay at zero and the LED remains dark whatever
trigger is set. No board has been able to use it so far.

Pass any color_* key of a board.json led object through to the led
section, and add ucidef_set_led_colors() to set them from board.d:

  ucidef_set_led_default "led1" "LED1" "nbg7815:led1" "1"
  ucidef_set_led_colors "led1" red 255 green 255 blue 255

The colors are not restricted to RGB - the keys are matched against
whatever the LED reports in multi_index.

Signed-off-by: André Valentin &lt;avalentin@marcant.net&gt;
</content>
</entry>
<entry>
<title>base-files: keep /var/lock volatile with persistent /var</title>
<updated>2026-10-11T14:39:26Z</updated>
<author>
<name>Ivan Romanov</name>
</author>
<published>2026-10-08T08:26:09Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/openwrt/staging/stintel/commit/?id=3735d605990364ae2c8ea2722323e3b4a2b5a861'/>
<id>urn:sha1:3735d605990364ae2c8ea2722323e3b4a2b5a861</id>
<content type='text'>
Enabling CONFIG_TARGET_ROOTFS_PERSIST_VAR leaves /var/lock on
persistent storage, allowing stale lock files to survive reboots.

Link /var/lock to ../tmp/lock so that lock files remain volatile.
Use a relative symlink to keep build-time accesses within the
target root filesystem. Create the target directory for rootfs
preparation. procd already recreates /tmp/lock at boot.

Fixes: 57807f50ded6 ("base-files: add option to make /var persistent")
Signed-off-by: Ivan Romanov &lt;drizt72@zoho.eu&gt;
Link: https://github.com/openwrt/openwrt/pull/25718
Signed-off-by: Robert Marko &lt;robimarko@gmail.com&gt;
</content>
</entry>
<entry>
<title>base-files: add -f to board_detect and config_generate</title>
<updated>2026-10-08T07:50:37Z</updated>
<author>
<name>Felix Fietkau</name>
</author>
<published>2026-09-28T10:17:17Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/openwrt/staging/stintel/commit/?id=1a93f81a6ef4adf169f9724ea0365d8f10c10264'/>
<id>urn:sha1:1a93f81a6ef4adf169f9724ea0365d8f10c10264</id>
<content type='text'>
board_detect runs board.d only when the target file is missing, and
/etc/board.json is now a symlink to a copy of board-base.json. With -f,
board_detect runs board.d again, also when /tmp/board.json exists, and
replaces the target file. config_generate passes -f to board_detect.
config_generate still creates only the UCI configuration that is
missing.

The regenerated copy in tmpfs has no wlan runtime data until the next
'wifi config'.

Signed-off-by: Felix Fietkau &lt;nbd@nbd.name&gt;
</content>
</entry>
<entry>
<title>base-files: keep the board.d data in board-base.json, board.json in tmpfs</title>
<updated>2026-10-08T07:50:37Z</updated>
<author>
<name>Felix Fietkau</name>
</author>
<published>2026-09-28T09:56:46Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/openwrt/staging/stintel/commit/?id=220bdab34e251a6478d924ad36d2a3dd7457cf50'/>
<id>urn:sha1:220bdab34e251a6478d924ad36d2a3dd7457cf50</id>
<content type='text'>
wifi-detect adds runtime wlan data to /etc/board.json. It rewrites the
file on flash at least twice on every boot: the run before kmodloader
sees no wiphy and removes the data, and the hotplug run adds it again.

board_detect now writes the board.d data to /etc/board-base.json and
copies it to /tmp/sysinfo/board.json on every boot. base-files ships
/etc/board.json as a symlink to the copy in tmpfs, so readers do not
change. If /etc/board.json is not a symlink, for example a file kept
across a reflash or a file added to the image, board_detect replaces
it with the symlink. The sysupgrade overlay backup skips
board-base.json, as it skips board.json.

If /tmp/board.json exists when board_detect creates board-base.json,
board_detect uses it instead of running board.d again. That file comes
from preinit_config_board() or the x86 diag.sh in the same boot. The
preinit shell holds their exported jshn state, and board.d run from it
writes an empty object.

Changes in behaviour:
- Changes to /etc/board.json do not persist. Persistent changes go to
  /etc/board-base.json.
- Removing /etc/board.json no longer runs board.d again.
- board_detect exits 0 when the target file exists. Before, it exited
  1. As a result, preinit_match_diag_led() in the x86 diag.sh now uses
  the /tmp/board.json from preinit_config_board().

Signed-off-by: Felix Fietkau &lt;nbd@nbd.name&gt;
</content>
</entry>
</feed>
