71
arch_bits = arch.split("+", 1)
70
def split_arch(config, arch):
71
# To make sure we're compatible with everything before, we need to do the
72
# arch -> livefs_arch mapping here. This way we're consistent with how it
74
live_arch = config.livefs_arch_for_arch(arch)
75
arch_bits = live_arch.split("+", 1)
72
76
if len(arch_bits) == 1:
73
77
arch_bits.append("")
74
78
cpuarch, subarch = arch_bits
76
if cpuarch == "amd64" and subarch == "mac":
77
# Use normal amd64 live image on amd64+mac.
80
if cpuarch == "riscv64":
81
# need to specify subarch to get raw.xz instead of qcow2
82
# originally, no subarch was the unleashed image. Add support
83
# for user-friendly subarch names and translate them to u-boot
84
# target names for livecd-rootfs maybe the two will be able to
85
# merge but at the moment, they are very different SOCs.
87
subarch = "hifive" # for focal
88
elif subarch == "unleashed":
89
subarch = "sifive_fu540"
90
elif subarch == "unmatched":
91
subarch = "sifive_hifive_unmatched_fu740"
93
79
return cpuarch, subarch
96
82
def live_builder(config, arch):
97
cpuarch, subarch = split_arch(arch)
83
cpuarch, subarch = split_arch(config, arch)
98
84
project = config.project
100
86
path = os.path.join(config.root, "production", "livefs-builders")
126
112
def live_build_options(config, arch):
129
cpuarch, subarch = split_arch(arch)
115
cpuarch, subarch = split_arch(config, arch)
130
116
if (cpuarch in ("armel", "armhf") and
131
117
config.image_type == "daily-preinstalled"):
132
118
if subarch in ("mx5", "omap", "omap4"):
151
137
def live_project(config, arch):
152
project = config.project
154
if project == "livecd-base":
156
elif (project == "ubuntu-server" and
157
config.image_type == "daily-preinstalled"):
158
liveproject = "ubuntu-cpc"
159
elif project == "ubuntu-appliance":
160
liveproject = "ubuntu-core"
162
liveproject = project
164
cpuarch, subarch = split_arch(arch)
138
liveproject = config.livefs_project_for_arch(arch)
166
140
if config["CDIMAGE_DVD"]:
167
if project in ("ubuntu", "kubuntu", "edubuntu", "ubuntustudio"):
141
if config.project in ("ubuntu", "kubuntu", "edubuntu", "ubuntustudio"):
168
142
liveproject += "-dvd"
170
144
return liveproject
184
158
command.extend(live_build_options(config, arch))
186
cpuarch, subarch = split_arch(arch)
160
cpuarch, subarch = split_arch(config, arch)
188
162
command.extend(["-A", cpuarch])
204
178
def live_build_lp_kwargs(config, lp, lp_livefs, arch):
205
cpuarch, subarch = split_arch(arch)
179
cpuarch, subarch = split_arch(config, arch)
207
181
metadata_override = {}
254
228
bits = [config.project]
255
229
if config.subproject:
256
230
bits.append(config.subproject)
257
cpuarch, subarch = split_arch(arch)
231
cpuarch, subarch = split_arch(config, arch)
258
232
bits.append(cpuarch)
260
234
bits.append(subarch)
273
247
livefs_id_bits = [project]
274
248
if config.subproject:
275
249
livefs_id_bits.append(config.subproject)
276
cpuarch, subarch = split_arch(arch)
250
cpuarch, subarch = split_arch(config, arch)
278
252
livefs_id_bits.append(subarch)
279
253
if config["UBUNTU_DEFAULTS_LOCALE"]:
306
280
def live_lp_info(config, arch):
307
cpuarch, subarch = split_arch(arch)
281
cpuarch, subarch = split_arch(config, arch)
308
282
want_project_bits = [config.project]
309
283
if config.subproject:
310
284
want_project_bits.append(config.subproject)
462
436
if config["LIVECD_BASE"]:
463
437
return config["LIVECD_BASE"]
465
cpuarch, subarch = split_arch(arch)
439
cpuarch, subarch = split_arch(config, arch)
466
440
series = config["DIST"]
468
442
if config["LIVECD"]:
484
458
def flavours(config, arch):
485
cpuarch, subarch = split_arch(arch)
459
cpuarch, subarch = split_arch(config, arch)
486
460
project = config.project
487
461
series = config["DIST"]
550
524
if item == "ltsp-squashfs" and arch == "amd64":
551
525
# use i386 LTSP image on amd64 too
553
cpuarch, subarch = split_arch(arch)
527
cpuarch, subarch = split_arch(config, arch)
554
528
project = config.project
555
529
series = config["DIST"]
556
530
liveproject = live_project(config, arch)