forked from Mirror/pmbootstrap
pmb/netboot: new feature (MR 2064)
pmbootstrap netboot command exposes the generated vendor-codename.img rootfs through nbd interface so that device can mount it and boot postmarketOS without having any storage medium at all. Co-authored-by: Luca Weiss <luca@z3ntu.xyz>
This commit is contained in:
parent
997e3fb1f5
commit
47539f1bef
5 changed files with 96 additions and 2 deletions
|
@ -508,6 +508,19 @@ def arguments_status(subparser):
|
|||
return ret
|
||||
|
||||
|
||||
def arguments_netboot(subparser):
|
||||
ret = subparser.add_parser("netboot",
|
||||
help="launch nbd server with pmOS rootfs")
|
||||
sub = ret.add_subparsers(dest="action_netboot")
|
||||
sub.required = True
|
||||
|
||||
start = sub.add_parser("serve", help="start nbd server")
|
||||
start.add_argument("--replace", action="store_true",
|
||||
help="replace stored netboot image")
|
||||
|
||||
return ret
|
||||
|
||||
|
||||
def package_completer(prefix, action, parser=None, parsed_args=None):
|
||||
args = parsed_args
|
||||
pmb.config.merge_with_args(args)
|
||||
|
@ -646,6 +659,7 @@ def arguments():
|
|||
arguments_kconfig(sub)
|
||||
arguments_export(sub)
|
||||
arguments_sideload(sub)
|
||||
arguments_netboot(sub)
|
||||
arguments_flasher(sub)
|
||||
arguments_initfs(sub)
|
||||
arguments_qemu(sub)
|
||||
|
@ -682,6 +696,8 @@ def arguments():
|
|||
dest="pkgs_local_mismatch",
|
||||
help="also delete locally compiled packages without"
|
||||
" existing aport of same version")
|
||||
zap.add_argument("-n", "--netboot", action="store_true",
|
||||
help="also delete stored images for netboot")
|
||||
zap.add_argument("-o", "--pkgs-online-mismatch", action="store_true",
|
||||
dest="pkgs_online_mismatch",
|
||||
help="also delete outdated packages from online mirrors"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue