-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Early bootstrap refactor #811
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Simply lovely! 😄
board/aarch64/rootfs/usr/share/product/styx,dcp-sc-28p/etc/iitod.json
Outdated
Show resolved
Hide resolved
e1813d6
to
2343646
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔥!
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2343646
to
1bbe6d4
Compare
1bbe6d4
to
5985e6b
Compare
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This patch use the new compatible array in /run/system.json, installing in order, least to most significant product overrides. We also introduce a new way to run product specific scripts at init, to override default behavior in Infix, e.g., LED control. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Some services launched at bootstrap must be possible to override per product. One such service is iitod, which manages the LEDs in Infix. This change makes allows a product specific init script to clear the led condtion, preventing Finit from lauching iitod. Also, rename the ixinit-done condition to match the nomenclature used already. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This reverts commit 7d1a708. Turns out the second LED is actually connected. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
On Rev. B, the second LED on the copper ports is green instead of yellow. This patch renames them from yellow -> aux => <device>:aux:tp Also on Rev. B, the second LED for SFP ports do not work at all. This patch drops them from the device tree to avoid confusion. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
After the initial probe, set up all port leds: - Disable all LEDs - Enable netdev trigger for all green LEDs (tp + sfp) - Enable link statux and rx/tx activity - Skip all aux LEDs Also in script, a neat little flash function that can be used both for a production test, to verify all LEDs work, and at runtime to locate the device in a rack of devicess. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Bootstrapping a system with D-Bus using Finit will create the machine-id file /var/lib/dbus/machine-id, this can be used as the unique machine-id for services like RAUC, so let's set that as /etc/machine-id to reduce the log spam we get otherwise: Nov 7 06:18:08 test-05-25-f8 rauc[5512]: Failed to get machine-id: Failed to open file <E2>M-^@M-^\/etc/machine-id<E2>M-^@M-^]: No such file or directory Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Check if the "usb-ports" key exists in /run/system.json before calling jq, otherise we get the following error message: Nov 8 05:11:45 ix bootstrap[3349]: jq: error (at <stdin>:0): Cannot iterate over null (null) Also, minor whitespace cleanup and bashisms fixes. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
When we opportunistically set up mqprio on all interfaces, we pass over interfaces without offloading support. Catch that error message and log an informational message about which interfaces are skipped. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
5985e6b
to
6bdfdbe
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Once more with feeling! 😄
Description
Some products need workarounds to default Infix behavior. This change set is a refactor of the early system bootstrap to provide product-specific hooks. For the Styx platform we install a LED script that disables
iitod
in favor of a static setup.Sumamry of general changes in this pull request:
compatible
string is now split up and listed, in reverse order, as an array in/run/system.json
compatible
array from /run/system.json` to apply overrides, from least significant to most significantrunparts -s /etc/product/init.d
, meaning all product specific override scripts in that directory are called with astart
argumentled
andproduct
conditions, triggeringiitod
/etc/machine-id
, required by RAUC, now points to/var/lib/dbus/machine-id
, created by the Finit D-BUS plugin after factory reset-s
to enable syslog support, previously added in 0f410eb, this fixes rauc: ansi control characters in log messages #809Styx requires a few more generic, and specific, changes:
EINVAL
instead ofEOPNOTSUPP
, causing lots of (bogus) worrying log messagesled
condition, effectively disablingiitod
. This script can be called from the prompt to perform other actions as well (list, flash, setup, etc.), call/usr/libexec/styx/led.sh
(without any arguments) for more informationLED1
, the second green port. Instead of being called<device>:yellow:tp
it is now called<device>:green:aux
Checklist
Tick relevant boxes, this PR is-a or has-a: