<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-10-28T14:46:20Z</updated>
<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>
<entry>
<title>base-files: add CONFIG_TARGET_SERIAL to PKG_CONFIG_DEPENDS</title>
<updated>2026-10-07T12:07:47Z</updated>
<author>
<name>Wei-Ting Yang</name>
</author>
<published>2026-10-07T04:59:42Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/openwrt/staging/stintel/commit/?id=935d33d31a3e26e6e6c3be2d481a7f2457351289'/>
<id>urn:sha1:935d33d31a3e26e6e6c3be2d481a7f2457351289</id>
<content type='text'>
Ensure changes to CONFIG_TARGET_SERIAL trigger a base-files rebuild so
that the latest value is used in /etc/inittab.

Signed-off-by: Wei-Ting Yang &lt;williamatcg@gmail.com&gt;
Link: https://github.com/openwrt/openwrt/pull/25689
Signed-off-by: Robert Marko &lt;robimarko@gmail.com&gt;
</content>
</entry>
<entry>
<title>base-files: configure the preinit interface on hotplug</title>
<updated>2026-10-06T23:03:51Z</updated>
<author>
<name>Daniel Golle</name>
</author>
<published>2026-10-04T16:06:11Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/openwrt/staging/stintel/commit/?id=ac0b20dbcec63e6b2d6ad2e8a36c97f6d07075a6'/>
<id>urn:sha1:ac0b20dbcec63e6b2d6ad2e8a36c97f6d07075a6</id>
<content type='text'>
preinit_ip runs once when preinit starts and configures the preinit
interface only if its driver has already registered it. Drivers that
probe while preinit is running leave failsafe without a network.

Run procd's preinit hotplug daemon on net add events, as the rule in
hotplug-preinit.json.d does, and have it start /sbin/preinit-netdev.
The script runs the new preinit_netdev boot hook, which targets use to
rename the new netdev, and then calls preinit_ip_event, which
configures the preinit interface unless it already carries the
preinit address.

Signed-off-by: Daniel Golle &lt;daniel@makrotopia.org&gt;
</content>
</entry>
<entry>
<title>base-files: add ucidef for LEDs with configurable brightness</title>
<updated>2026-10-05T08:26:16Z</updated>
<author>
<name>Manuel Fombuena</name>
</author>
<published>2026-05-19T12:08:00Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/openwrt/staging/stintel/commit/?id=c5cffacc1d4f7d2b9f9112dda9531252db2cdec6'/>
<id>urn:sha1:c5cffacc1d4f7d2b9f9112dda9531252db2cdec6</id>
<content type='text'>
Add ucidef_set_led_brightness() to set up a static LED with an optional
brightness level, complementing ucidef_set_led_default() for hardware
that supports per-channel current or PWM control.

The function writes a "brightness" type to board.json alongside the
default on/off state. config_generate picks this up and writes the
brightness option to the UCI LED config, where the led init script
already knows to apply it.

Signed-off-by: Manuel Fombuena &lt;fombuena@outlook.com&gt;
Link: https://github.com/openwrt/openwrt/pull/23457
Signed-off-by: Robert Marko &lt;robimarko@gmail.com&gt;
</content>
</entry>
</feed>
