periodic checkin
This commit is contained in:
@@ -66,9 +66,9 @@ def genImg(conf):
|
||||
hashes['sha256'][a].update(stream)
|
||||
hashes['md5'][a].update(stream)
|
||||
with open(airoot + 'airootfs.sha256', 'w+') as f:
|
||||
f.write("{0} airootfs.sfs".format(hashes['sha256'][a].hexdigest()))
|
||||
f.write("{0} airootfs.sfs\n".format(hashes['sha256'][a].hexdigest()))
|
||||
with open(airoot + 'airootfs.md5', 'w+') as f:
|
||||
f.write("{0} airootfs.sfs".format(hashes['md5'][a].hexdigest()))
|
||||
f.write("{0} airootfs.sfs\n".format(hashes['md5'][a].hexdigest()))
|
||||
squashfses.append('{0}'.format(squashimg))
|
||||
print("{0}: [BUILD] Hash checksums complete.".format(datetime.datetime.now()))
|
||||
# Logo
|
||||
@@ -81,8 +81,10 @@ def genImg(conf):
|
||||
# We use a dict here so we can use the right filenames...
|
||||
# I might change how I handle this in the future.
|
||||
bootfiles = {}
|
||||
bootfiles['kernel'] = ['vmlinuz-linux-' + bdisk['name'], '{0}.{1}.kern'.format(bdisk['uxname'], bitness)]
|
||||
bootfiles['initrd'] = ['initramfs-linux-{0}.img'.format(bdisk['name']), '{0}.{1}.img'.format(bdisk['uxname'], bitness)]
|
||||
#bootfiles['kernel'] = ['vmlinuz-linux-' + bdisk['name'], '{0}.{1}.kern'.format(bdisk['uxname'], bitness)]
|
||||
bootfiles['kernel'] = ['vmlinuz-linux', '{0}.{1}.kern'.format(bdisk['uxname'], bitness)]
|
||||
#bootfiles['initrd'] = ['initramfs-linux-{0}.img'.format(bdisk['name']), '{0}.{1}.img'.format(bdisk['uxname'], bitness)]
|
||||
bootfiles['initrd'] = ['initramfs-linux.img', '{0}.{1}.img'.format(bdisk['uxname'], bitness)]
|
||||
for x in ('kernel', 'initrd'):
|
||||
shutil.copy2('{0}/root.{1}/boot/{2}'.format(chrootdir, a, bootfiles[x][0]), '{0}/boot/{1}'.format(prepdir, bootfiles[x][1]))
|
||||
for i in squashfses:
|
||||
@@ -233,9 +235,11 @@ def genUEFI(build, bdisk):
|
||||
if os.path.isfile(z):
|
||||
os.remove(z)
|
||||
shutil.copy(y, z)
|
||||
shutil.copy2('{0}/root.{1}/boot/vmlinuz-linux-{2}'.format(chrootdir, 'x86_64', bdisk['name']),
|
||||
#shutil.copy2('{0}/root.{1}/boot/vmlinuz-linux-{2}'.format(chrootdir, 'x86_64', bdisk['name']),
|
||||
shutil.copy2('{0}/root.{1}/boot/vmlinuz-linux'.format(chrootdir, 'x86_64'),
|
||||
'{0}/EFI/{1}/{2}.efi'.format(mountpt, bdisk['name'], bdisk['uxname']))
|
||||
shutil.copy2('{0}/root.{1}/boot/initramfs-linux-{2}.img'.format(chrootdir, 'x86_64', bdisk['name']),
|
||||
#shutil.copy2('{0}/root.{1}/boot/initramfs-linux-{2}.img'.format(chrootdir, 'x86_64', bdisk['name']),
|
||||
shutil.copy2('{0}/root.{1}/boot/initramfs-linux.img'.format(chrootdir, 'x86_64'),
|
||||
'{0}/EFI/{1}/{2}.img'.format(mountpt, bdisk['name'], bdisk['uxname']))
|
||||
# TODO: support both arch's as EFI bootable instead? Maybe? requires more research. very rare.
|
||||
#shutil.copy2('{0}/root.{1}/boot/vmlinuz-linux-{2}'.format(chrootdir, a, bdisk['name']),
|
||||
|
||||
@@ -113,11 +113,11 @@ def parseConfig(confs):
|
||||
elif not glob.glob('{0}/*v{1}r*.iso'.format(config_dict['build']['isodir'], config_dict['bdisk']['ver'])):
|
||||
config_dict['build']['buildnum'] = 0
|
||||
# and build a list of arch(es) we want to build
|
||||
if config_dict['build']['multiarch'] in ('','yes','true','1'):
|
||||
if config_dict['build']['multiarch'] in ('','yes','true','1','no','false','0'):
|
||||
config_dict['build']['arch'] = ['x86_64','i686']
|
||||
elif config_dict['build']['multiarch'] == 'x86_64':
|
||||
elif config_dict['build']['multiarch'] in ('x86_64','64','no32'):
|
||||
config_dict['build']['arch'] = ['x86_64']
|
||||
elif config_dict['build']['multiarch'] == 'i686':
|
||||
elif config_dict['build']['multiarch'] in ('i686','32','no64'):
|
||||
config_dict['build']['arch'] = ['i686']
|
||||
else:
|
||||
exit(('{0}: ERROR: {1} is not a valid value. Check your configuration.').format(
|
||||
|
||||
@@ -219,11 +219,12 @@ def genISO(conf):
|
||||
shutil.copy2('{0}/src/bin/ipxe.lkrn'.format(ipxe_src), '{0}/boot/ipxe.krn'.format(bootdir))
|
||||
isolinux_filelst = ['isolinux.bin',
|
||||
'ldlinux.c32']
|
||||
os.makedirs('{0}/isolinux'.format(bootdir), exist_ok = True)
|
||||
for f in isolinux_filelst:
|
||||
shutil.copy2('{0}/root.{1}/usr/lib/syslinux/bios/{2}'.format(chrootdir, arch[0], f), '{0}/{1}'.format(bootdir, f))
|
||||
shutil.copy2('{0}/root.{1}/usr/lib/syslinux/bios/{2}'.format(chrootdir, arch[0], f), '{0}/isolinux/{1}'.format(bootdir, f))
|
||||
tpl = env.get_template('BIOS/isolinux.cfg.j2')
|
||||
tpl_out = tpl.render(build = build, bdisk = bdisk)
|
||||
with open('{0}/isolinux.cfg'.format(bootdir), "w+") as f:
|
||||
with open('{0}/isolinux/isolinux.cfg'.format(bootdir), "w+") as f:
|
||||
f.write(tpl_out)
|
||||
print("{0}: [IPXE] Building Mini ISO ({1})...".format(datetime.datetime.now(), isopath))
|
||||
if efi:
|
||||
@@ -235,8 +236,8 @@ def genISO(conf):
|
||||
'-appid', bdisk['desc'],
|
||||
'-publisher', bdisk['dev'],
|
||||
'-preparer', 'prepared by ' + bdisk['dev'],
|
||||
'-eltorito-boot', 'isolinux.bin',
|
||||
'-eltorito-catalog', 'boot.cat',
|
||||
'-eltorito-boot', 'isolinux/isolinux.bin',
|
||||
'-eltorito-catalog', 'isolinux/boot.cat',
|
||||
'-no-emul-boot',
|
||||
'-boot-load-size', '4',
|
||||
'-boot-info-table',
|
||||
|
||||
Reference in New Issue
Block a user