Skip to content

Commit 0e4d8c6

Browse files
committed
WIP: Add support for SIG/AltArch and --kiwi-file
preliminary, several TODOs
1 parent 174915c commit 0e4d8c6

File tree

3 files changed

+15
-4
lines changed

3 files changed

+15
-4
lines changed

iso/empanadas/empanadas/backends/kiwi.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,12 @@
5555
"kiwiProfile": "Container",
5656
"fileType": "tar.xz",
5757
"outputKey": "container"
58+
},
59+
"SBC": {
60+
"kiwiType": "oem",
61+
"kiwiProfile": "SBC",
62+
"fileType": "raw",
63+
"outputKey": "disk_image"
5864
}
5965
}
6066
)
@@ -73,6 +79,7 @@ def wrapper(self, *args, **kwargs):
7379
class KiwiBackend(BackendInterface):
7480
"""Build an image using Kiwi"""
7581

82+
kiwi_file: str
7683
build_args: List[str] = field(factory=list)
7784
image_result: ImagesData = field(init=False)
7885
kiwi_conf: AttributeDict = field(init=False)
@@ -92,6 +99,7 @@ def build(self):
9299

93100
kiwi_command = [
94101
"kiwi-ng", "--color-output",
102+
"--kiwi-file", self.kiwi_file,
95103
*self.build_args,
96104
]
97105
if self.ctx.debug:
@@ -163,7 +171,7 @@ def clean(self):
163171

164172
def run_mock_command(self, mock_command: List[str]):
165173
mock_args = ["--configdir", "/tmp/mock-rocky-configs/etc/mock", "-r", f"rl-9-{self.ctx.architecture.name}-core-infra"]
166-
if self.ctx.image_type != 'Container':
174+
if self.ctx.image_type not in ['Container']:
167175
mock_args.append("--isolation=simple")
168176
command = [
169177
"mock",

iso/empanadas/empanadas/common.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,7 @@ class Color:
119119
"GenericCloud": ["Base", "LVM"],
120120
"Vagrant": ["Libvirt", "Vbox", "VMware"],
121121
"OCP": ["Base"],
122-
"RPI": ["Base"],
123-
"GenericArm": ["Minimal"],
122+
"SBC": ["RaspberryPi", "GenericArm"],
124123
}
125124

126125

iso/empanadas/empanadas/scripts/build_image.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,11 @@ def run():
6969

7070
for architecture in arches:
7171
if results.backend == "kiwi":
72-
backend = KiwiBackend()
72+
kiwi_file = "config.xml"
73+
if results.variant == "RaspberryPi":
74+
kiwi_file = "rocky-sbc-raspberrypi.xml"
75+
76+
backend = KiwiBackend(kiwi_file=kiwi_file)
7377
else:
7478
backend = ImageFactoryBackend(
7579
kickstart_dir="kickstart" if results.kickstartdir else "os",

0 commit comments

Comments
 (0)