WIP: limiswitch: init #27

Draft
rlahfa wants to merge 1 commit from switch-tool into main
Owner

Tests

  • Finish an MTD partition layout parser
  • Finish a free parser
  • Finish a df parser
  • Finish a kernel log regex scanner for the machine type
  • Figure out interesting OS oper state tests, e.g. "in U-Boot", "in userspace", "kernel panicked"
  • Test primary/secondary determination using bootconfig binary data decoding
  • Write a connection URI parser and test it for serial and ssh, test unsupported types

Partition layout compatibility

  • Encode a partition layout decoder and map it over a known layout
  • Have a mechanism to perform migrations (return ENOSUPPORTED for now, all the time)

Toplevel compatibility

  • Encode a toplevel decoder and map it over a known device type
  • Verify compatibility

Misc

  • Retrieve stores paths for a specific image type
  • Compute delta
  • Test for delta computations
  • "Does it fit in the target" tests
  • Copy closure primitive (in dry run, this should NEVER RUN for real)

Next steps:

preinit project (ZeroPulse)

  • Fix the kernel command line parameters passed from U-Boot.
  • Reuse the previous code library.
  • When booting an A/B system, use the proper kernel command line argument to open the right devices.
  • Support complicated layouts implying overlays and userdata.
  • When everything fails, fallback to a failsafe initialization with a predefined failsafe script.

Advanced U-Boot control (AbyssCommand)

  • Support for MRD modification (decode it, modify a single byte of it, etc.)
  • Boot into TFTP (assumes serial connection type)
  • Recover (assumes serial connection type)
  • Listen for netconsole messages

Initialization

  • Bootstrap: try to detect if the target system is running a stock OS and will send the initial installation payload

Write an agent component (advanced)

  • If the agent is supported, SSH can use it or agent connection can happen directly.

Signed-off-by: Raito Bezarius masterancpp@gmail.com

## Tests - [ ] Finish an MTD partition layout parser - [ ] Finish a `free` parser - [ ] Finish a `df` parser - [ ] Finish a kernel log regex scanner for the machine type - [ ] Figure out interesting OS oper state tests, e.g. "in U-Boot", "in userspace", "kernel panicked" - [ ] Test primary/secondary determination using bootconfig binary data decoding - [ ] Write a connection URI parser and test it for serial and ssh, test unsupported types ## Partition layout compatibility - [ ] Encode a partition layout decoder and map it over a known layout - [ ] Have a mechanism to perform migrations (return ENOSUPPORTED for now, all the time) ## Toplevel compatibility - [ ] Encode a toplevel decoder and map it over a known device type - [ ] Verify compatibility ## Misc - [ ] Retrieve stores paths for a specific image type - [ ] Compute delta - [ ] Test for delta computations - [ ] "Does it fit in the target" tests - [ ] Copy closure primitive (in dry run, this should NEVER RUN for real) --- Next steps: ## preinit project (`ZeroPulse`) - [ ] Fix the kernel command line parameters passed from U-Boot. - [ ] Reuse the previous code library. - [ ] When booting an A/B system, use the proper kernel command line argument to open the right devices. - [ ] Support complicated layouts implying overlays and userdata. - [ ] When everything fails, fallback to a failsafe initialization with a predefined failsafe script. ## Advanced U-Boot control (`AbyssCommand`) - [ ] Support for MRD modification (decode it, modify a single byte of it, etc.) - [ ] Boot into TFTP (assumes serial connection type) - [ ] Recover (assumes serial connection type) - [ ] Listen for netconsole messages ## Initialization - [ ] Bootstrap: try to detect if the target system is running a stock OS and will send the initial installation payload ## Write an agent component (advanced) - [ ] If the agent is supported, SSH can use it or agent connection can happen directly. Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
rlahfa added 1 commit 2024-09-17 13:51:06 +02:00
limiswitch: init
All checks were successful
build liminix / build_vm_qemu_mips (pull_request) Successful in 29s
54bcc78a96
Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
Author
Owner

Maybe a rename of the whole tool to aeroswitch because I can do it.

Maybe a rename of the whole tool to `aeroswitch` because I can do it.
All checks were successful
build liminix / build_vm_qemu_mips (pull_request) Successful in 29s
This pull request is marked as a work in progress.
This branch is out-of-date with the base branch
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin switch-tool:switch-tool
git checkout switch-tool

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git checkout main
git merge --no-ff switch-tool
git checkout switch-tool
git rebase main
git checkout main
git merge --ff-only switch-tool
git checkout switch-tool
git rebase main
git checkout main
git merge --no-ff switch-tool
git checkout main
git merge --squash switch-tool
git checkout main
git merge --ff-only switch-tool
git checkout main
git merge switch-tool
git push origin main
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: DGNum/liminix#27
No description provided.