forked from Mirror/pmbootstrap
pmb/config/flashers: add support for single kernel 'flavor' (MR 2093)
This commit is contained in:
parent
09794ef832
commit
05c9fb784f
2 changed files with 12 additions and 5 deletions
|
@ -1,5 +1,6 @@
|
|||
# Copyright 2021 Oliver Smith
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
import pmb.config.pmaports
|
||||
|
||||
|
||||
def variables(args, flavor, method):
|
||||
|
@ -43,7 +44,6 @@ def variables(args, flavor, method):
|
|||
vars = {
|
||||
"$BOOT": "/mnt/rootfs_" + args.device + "/boot",
|
||||
"$DTB": _dtb,
|
||||
"$FLAVOR": flavor if flavor is not None else "",
|
||||
"$IMAGE_SPLIT_BOOT": "/home/pmos/rootfs/" + args.device + "-boot.img",
|
||||
"$IMAGE_SPLIT_ROOT": "/home/pmos/rootfs/" + args.device + "-root.img",
|
||||
"$IMAGE": "/home/pmos/rootfs/" + args.device + ".img",
|
||||
|
@ -62,4 +62,11 @@ def variables(args, flavor, method):
|
|||
"/usr/share/uuu/flash_script.lst"
|
||||
}
|
||||
|
||||
# Backwards compatibility with old mkinitfs (pma#660)
|
||||
pmaports_cfg = pmb.config.pmaports.read_config(args)
|
||||
if pmaports_cfg.get("supported_mkinitfs_without_flavors", False):
|
||||
vars["$FLAVOR"] = ""
|
||||
else:
|
||||
vars["$FLAVOR"] = f"-{flavor}" if flavor is not None else "-"
|
||||
|
||||
return vars
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue