Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
706960d
motd: write to /run/tacd/motd instead of /var/run/tacd
hnez Apr 8, 2026
7e27732
dbus: rauc: re-introspect services
hnez Mar 27, 2025
660d590
dbus: systemd: also monitor rauc.service
hnez Apr 2, 2025
ddeacd2
dbus: rauc: add Channels type to use instead of Vec<Channel>
hnez Apr 2, 2025
8a11260
dbus: rauc: use a UpdateRequest object instead of a simple URL for in…
hnez Apr 2, 2025
095b6db
dbus: rauc: allow restricting installation to a specific manifest_hash
hnez Apr 2, 2025
22fa360
dbus: rauc: remove tacd-based update polling
hnez Apr 2, 2025
aecdde0
dbus: rauc: update_channels: add a concept of a single primary channel
hnez Apr 2, 2025
1579763
dbus: rauc: only install bundles from the primary channel
hnez Apr 2, 2025
e0dd53b
dbus: rauc: system_conf: write runtime RAUC config with polling section
hnez Apr 2, 2025
9e9dbc1
dbus: systemd: make the Service struct remember the unit name
hnez Apr 8, 2026
6a64740
dbus: rauc: reload rauc daemon when required
hnez Apr 2, 2025
54a8b3e
dbus: rauc: trigger a single poll for updates after reloading the daemon
hnez Apr 3, 2025
8e925a9
dbus: rauc: forward poller status to broker
hnez Apr 2, 2025
47e47e4
dbus: rauc: add manifest_hash und effective_url to UpstreamBundle
hnez Apr 2, 2025
70099d2
dbus: rauc: add support for enabling the auto install feature
hnez Apr 2, 2025
322b7fb
dbus: rauc: implement forced polling via update channel files
hnez Mar 31, 2025
b28c927
dbus: rauc: allow configuring the *_criteria in channel files
hnez Mar 31, 2025
26c1105
dbus: rauc: split the Rauc struct into config and status topics
hnez Apr 8, 2026
db0f840
inhibit: create and remove inhibit file based on setup_mode status
hnez Apr 8, 2026
d1f3cba
inhibit: create/remove an inhibt file based on DUT power state
hnez Apr 8, 2026
8c58136
dbus: rauc: pause auto updating while the TAC is in setup mode
hnez Apr 8, 2026
b8b4f30
dbus: rauc: also pause auto updating while the DUT power is on
hnez Feb 20, 2026
69adb2a
dbus: rauc: break out flatten_slot_status()
hnez Feb 23, 2026
5f68988
dbus: rauc: break out booted_slot_other_slot()
hnez Feb 23, 2026
b92129a
dbus: rauc: use Err(anyhow!(...)) instead of bail!(...)
hnez Feb 23, 2026
9b9f8e3
dbus: rauc: mark the booted slot good again after RAUC restart
hnez Feb 23, 2026
65a0eed
web: setup: inform the user about additional headers that are sent now
hnez Apr 2, 2025
f809090
web: indicate to the user when a channel is enabled but not primary
hnez Apr 2, 2025
acf46b2
web: MqttComponents: add MqttHider which conditionally hides its chil…
hnez Apr 8, 2026
53b2aef
web: add toggle switches to enable automatic installation of updates
hnez Apr 2, 2025
ab4d3bc
web: use manifest_hash and effective_url when triggering an install
hnez Apr 2, 2025
b4a3c1a
web: TacComponents: UpdateChannels: update for single primary channel
hnez Apr 8, 2026
2d4704c
web: TacComponents: UpdateConfig: make the DUT Power inhibt configurable
hnez Apr 8, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/target
/.cargo
/demo_files/home/root/.ssh/authorized_keys
/demo_files/var/run/tacd/motd
/demo_files/run/
/web/npm-shrinkwrap.json
/web/oe-logs
/web/oe-workdir
4 changes: 3 additions & 1 deletion demo_files/srv/tacd/state.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
"persistent_topics": {
"/v1/tac/display/show_help": false,
"/v1/tac/setup_mode": false,
"/v1/tac/update/enable_polling": true
"/v1/tac/update/enable_auto_install": true,
"/v1/tac/update/enable_polling": true,
"/v1/tac/update/inhibit/dut_power": true
}
}
42 changes: 42 additions & 0 deletions demo_files/usr/lib/rauc/system.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# WARNING: this file is read by the tacd and used as a template to generate a
# version with additional update polling configuration.
# The original file is placed in `/usr/lib/rauc/system.conf`, while the runtime
# version is placed in `/run/rauc/system.conf`.
# The latter may not exist if polling is not enabled and thus no special
# runtime config is required.

[system]
compatible=Linux Automation GmbH - LXA TAC
bootloader=barebox
bundle-formats=-plain
data-directory=/srv/rauc

[keyring]
directory=/etc/rauc/certificates-enabled

[handlers]
system-info=/usr/lib/rauc/system-info-handler.sh

[streaming]
send-headers=boot-id;system-version;serial;transaction-id;uptime

# <tacd-polling-section>

[slot.rootfs.0]
device=/dev/disk/by-partuuid/e82e6873-62cc-46fb-90f0-3e936743fa62
type=ext4
bootname=system0
resize=true

[slot.rootfs.1]
device=/dev/disk/by-partuuid/8eb3e87e-2b4e-45e3-888b-2f678662862d
type=ext4
bootname=system1
resize=true

[slot.bootloader.0]
device=/dev/mmcblk1
type=boot-emmc

[log.all-log]
filename=all-events.log
71 changes: 68 additions & 3 deletions openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -697,6 +697,7 @@ paths:
- network-manager
- labgrid-exporter
- lxa-iobus
- rauc
put:
summary: Perform an action on a systemd service
tags: [System]
Expand All @@ -722,6 +723,7 @@ paths:
- network-manager
- labgrid-exporter
- lxa-iobus
- rauc
get:
summary: Get the status of a systemd service
tags: [System]
Expand Down Expand Up @@ -773,6 +775,45 @@ paths:
'400':
description: The value could not be parsed as boolean

/v1/tac/update/enable_auto_install:
put:
summary: Enable automatic installation of operating system updates
tags: [Updating]
requestBody:
content:
application/json:
schema:
type: boolean
responses:
'204':
description: Automatic installation of updates was enabled/disabled
'400':
description: The value could not be parsed as boolean

/v1/tac/update/inhibit/dut_power:
get:
summary: Whether the TAC should look for and install updates while the DUT is powered
tags: [Updating]
responses:
'200':
content:
application/json:
schema:
type: boolean
put:
summary: Set whether polling for updates while the DUT is powered is inhibited or not
tags: [Updating]
requestBody:
content:
application/json:
schema:
type: boolean
responses:
'204':
description: The configuration was applied
'400':
description: The value could not be parsed as boolean

/v1/tac/update/operation:
get:
summary: Get the currently running system update operation
Expand Down Expand Up @@ -825,12 +866,12 @@ paths:
content:
application/json:
schema:
type: string
$ref: '#/components/schemas/UpdateRequest'
responses:
'204':
description: The value was parsed as string and will be tried
description: The value was parsed successfully and will be tried
'400':
description: The value could not be parsed as string
description: The value could not be parsed

/v1/tac/update/channels:
get:
Expand Down Expand Up @@ -1100,6 +1141,14 @@ components:
nesting_depth:
type: number

UpdateRequest:
type: object
properties:
url:
type: string
manifest_hash:
type: string

UpdateChannels:
type: array
items:
Expand All @@ -1122,15 +1171,31 @@ components:
type: integer
enabled:
type: boolean
primary:
type: boolean
bundle:
type: object
properties:
compatible:
type: string
version:
type: string,
manifest_hash:
type: string,
effective_url:
type: string,
newer_than_installed:
type: boolean
force_polling:
type: boolean
force_auto_install:
type: boolean
candidate_criteria:
type: string
install_criteria:
type: string
reboot_criteria:
type: string

ServiceStatus:
type: object
Expand Down
12 changes: 0 additions & 12 deletions src/broker/topic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -335,18 +335,6 @@ impl<E: Serialize + DeserializeOwned + Clone + PartialEq> Topic<E> {

self.modify(|prev| if prev != msg { msg } else { None });
}

/// Wait until the topic is set to the specified value
pub async fn wait_for(self: &Arc<Self>, val: E) {
let (mut stream, sub) = self.clone().subscribe_unbounded();

// Unwrap here to keep the interface simple. The stream could only yield
// None if the sender side is dropped, which will not happen as we hold
// an Arc to self which contains the senders vec.
while stream.next().await.unwrap() != val {}

sub.unsubscribe()
}
}

impl<E: Serialize + DeserializeOwned + Clone + Not + Not<Output = E>> Topic<E> {
Expand Down
8 changes: 6 additions & 2 deletions src/dbus.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
use async_std::sync::Arc;

use crate::broker::{BrokerBuilder, Topic};
use crate::inhibit::InhibitFiles;
use crate::led::BlinkPattern;
use crate::watched_tasks::WatchedTasksBuilder;

Expand Down Expand Up @@ -82,18 +83,21 @@ impl DbusSession {
wtb: &mut WatchedTasksBuilder,
led_dut: Arc<Topic<BlinkPattern>>,
led_uplink: Arc<Topic<BlinkPattern>>,
inhibit_files: &'static InhibitFiles,
) -> anyhow::Result<Self> {
let tacd = Tacd::new();

let conn_builder = ConnectionBuilder::system()?.name("de.pengutronix.tacd")?;

let conn = Arc::new(tacd.serve(conn_builder).build().await?);

let systemd = Systemd::new(bb, wtb, &conn).await?;

Ok(Self {
hostname: Hostname::new(bb, wtb, &conn)?,
network: Network::new(bb, wtb, &conn, led_dut, led_uplink)?,
rauc: Rauc::new(bb, wtb, &conn)?,
systemd: Systemd::new(bb, wtb, &conn).await?,
rauc: Rauc::new(bb, wtb, &conn, systemd.rauc.clone(), inhibit_files)?,
systemd,
})
}
}
Loading