Repository navigation
USB media manager, exFAT, battery rewrite, drives UI, Settings fixes - #24
Merged
Merged
Conversation
Removable media (kernel/src/media.rs): USB mass-storage volumes are mounted at /media/<label> (FAT32, exFAT, ext4; GPT and MBR), ejected safely through /dev/media (sync, all-or-nothing unmount, Busy while in use, cache flush and stop unit) and detached by force when the stick is pulled out, without the kernel or the USB controller thread waiting on the dead device. /run/media.status publishes the list (osyx_abi::media). exFAT: new osyx-exfat crate (read/write, format, check) and VFS adapter. FAT32 reads the volume label from the root directory entry. osyx-part reads MBR tables (removable disks only). Partitions of disks whose name ends in a digit are <disk>p<n>. Battery: new osyx-battery crate (EC protocol with time-outs and error counting, unit conversion, several batteries, time estimates, last-good state through EC failures) behind batteryd; /run/battery keeps its first line and gains key=value details (osyx_abi::battery). The vendored AML interpreter gains Index/DerefOf, Subtract/Multiply/Divide/Mod/Or/XOr/Not/ SizeOf/LNot, Store into Index and package elements from locals. Desktop: drives button, list with label, file system, size and use, Open (Files) and Eject, notifications for plug, eject and unplug; battery details on click. Settings: the Save, DHCP and Apply buttons never fired (they waited for Submitted, buttons answer Activated) and Settings ran as the desktop user although it writes system files; it now runs privileged and has a system update section served by osyx-update. Tests: scripts/usb-storage-test.ps1, USB steps and a Settings step in scripts/desktop-test.ps1, host tests for exfat, part, abi and battery.
|
Caution Review failedThe pull request is closed. Finishing Touches
Comment |
Contributor
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.
What
kernel/src/media.rs): volumes on USB sticks and disks are mounted at/media/<label>(FAT32, exFAT, ext4; GPT and MBR as Windows writes them). Eject iseject <disk>to/dev/media: sync, all-or-nothing unmount (Busywhile a file is open), cache flush, stop unit. A stick pulled out while mounted is detached by force without the kernel or the USB controller thread waiting on the dead device./run/media.statuslists the media.osyx-exfatcrate (read/write, format, check) and VFS adapter. FAT32 reads the volume label from the root directory.osyx-partreads MBR tables on removable disks.osyx-batterycrate behindbatteryd(EC protocol with time-outs and error counting, mAh/mWh, several batteries, time estimates, last good state through EC failures)./run/batterykeeps its first line and gainskey=valuedetails. The vendored AML interpreter gainsIndex/DerefOf,Subtract/Multiply/Divide/Mod/Or/XOr/Not/SizeOf/LNot,StoreintoIndexand package elements from locals; without them a typical firmware_BSTcould not run.Response::Submitted, buttons answerActivated), and Settings ran as the desktop user although it writes system files; it now runs privileged as its header says. New "System update" section (version, check, install, status, errors) served byosyx-update, which answers requests written to/etc/osyx/update.request.Tests
Host:
osyx-exfat,osyx-part,osyx-abi,osyx-battery(mock EC, hand-assembled AML). QEMU:scripts/usb-storage-test.ps1(FAT32 and exFAT: automount, busy refusal, eject, replug, pull-out),scripts/desktop-test.ps1(USB steps and a Settings step), plussmp-test,win-test,usbhub-testrun during development.Not verified on real hardware
exFAT writes, the battery on a ThinkPad T495 (EC and firmware AML), eject on real sticks. The "Install update" path needs a configured release URL and was not exercised.