Conversation
mgmtd hands its message handlers pointers into the receive stream, where messages are packed back to back, so some start unaligned. On 32-bit Arm GCC uses VFP stores for their 64-bit members, which the kernel cannot fix up, and mgmtd dies with SIGBUS as soon as a notification is sent. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Every board with an SDHCI controller already enables MMC_SDHCI in its own U-Boot defconfig, so the common fragment only forced the driver on boards with other MMC controllers. On sunxi this breaks the SPL build, which has no DM_MMC and cannot compile sdhci.c. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
The first Banana Pi, an Allwinner A20 board. Mainline U-Boot builds the SPL and U-Boot together from its Bananapi defconfig, and the A20 boot ROM loads them from 8 KiB into the SD card, so the GPT partition entries are moved to 1 MiB. The sunxi board code resets fdtfile after the environment is imported, dropping the vendor directory on 32-bit Arm, so ixvariant sets it again at preboot. POWER_SUPPLY is enabled explicitly, the sun4i USB PHY depends on it and the shared kernel config does not set it. GPIOLIB is added to the shared arm kernel config. Without it LEDS_GPIO and LEDS_TRIGGER_GPIO are dropped before any board fixup has selected a GPIO driver, so GPIO LEDs were missing on all 32-bit Arm boards. The board is enabled in the arm defconfigs like the other 32-bit boards, disable BR2_PACKAGE_BANANAPI_BPI_M1 to leave it out of a build. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
hwmon labels are free text, but normalize_sensor_name() only rewrote underscores, so a label like "SoC temperature" from the Allwinner A20 SoC sensor ended up in the name. The space breaks the pattern for sensor names, statd fails to parse the yanger data, and no hardware status is shown at all. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
libuev exports -D_TIME_BITS=64 to its users, its ABI has time_t in it, so mdns-alias and finit were built with a 64-bit time_t while everything else on 32-bit Arm used 32 bits. mdns-alias passes a struct timeval between libuev and Avahi, read the wrong size, and turned D-Bus timeouts into garbage. Avahi then reported every connection attempt as "Memory exhausted" and mdns-alias never got to publish anything. One time ABI for the whole system also makes 32-bit Arm Y2038 ready. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
The 32-bit Arm boards are small, and FRR with bash is a big part of the image. Static routing covers what they are used for. As with the minimal builds, BUSYBOX_SHOW_OTHERS is set explicitly, since it was selected only through bash. neofetch goes too, it selects bash. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
iitod unpacked a boolean into a bool where jansson writes an int, corrupting the stack on 32-bit Arm as soon as an LED was set on or off, and printed 64-bit integers with %d, so blink rates came out wrong. Two latent bugs found along the way are fixed too: rule inputs were matched by name prefix, and resolving an alias freed a string still in use by the config. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
iitod gets a control socket, root:wheel so admin users need no sudo, and the iitoctl tool to show which rule drives each LED and why. The new locate method blinks every LED iitod manages, the base for a locate RPC. The patches change Makefile.am, so the package is now autoreconfigured. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
RPCs that act on the device should log who asked for them, but the helper that finds the requesting user was private to support.c. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
A locate started from a management system is easily forgotten, and keeps every LED blinking. iitod now takes an optional timeout. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Blinks all LEDs, by default for 60 seconds, so the unit can be found, e.g., in a rack. Available over NETCONF/RESTCONF, as the CLI command locate, and from the Hardware page in the web interface. The default NACM rules deny guests, all other users may call it. confd forwards the request to iitod, which keeps the timer. Systems where iitod is disabled, because of unreliable kernel LED support, have no control socket and the RPC fails with an error saying so. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR adds support for the Banana Pi BPI-M1 (Allwinner A20) to the 32-bit Arm build, with its own
bpi_m1_boot_defconfig. Bringing it up showed a number of 32-bit Arm problems, which are fixed here.Board:
MMC_SDHCIdropped from the common U-Boot fragment, since every board with an SDHCI controller already sets itGPIOLIBadded to the arm kernel config; without it, GPIO LEDs were missing on all 32-bit boards32-bit Arm fixes:
mgmtdcrash on unaligned messages (patch)mdns-aliasnever published, becauselibuevforces 64-bit time_t and the rest of the system was 32-bit. All 32-bit Arm builds now use 64-bittime_tiitodcrashed and never blinked (iitopatches)statddropped all hardware status when a sensor label contained a spaceLocate:
infix-hardware:locateRPC that blinks all LEDs to find the chassis, by default for 60 siitodis disablediitohas a releaseChecklist
Tick relevant boxes, this PR is-a or has-a: