Use own addrsize implementation (dhorak)
Anaconda doesn't built the addrsize tool used to create the file containing size and load address for initrd.img. So we implement its function directly in lorax.
This commit is contained in:
parent
8e0d377992
commit
4448e59f6e
@ -27,6 +27,7 @@ import subprocess
|
||||
import shutil
|
||||
import glob
|
||||
import collections
|
||||
import struct
|
||||
|
||||
from base import DataHolder
|
||||
from sysutils import joinpaths, cpfile, replace
|
||||
@ -635,16 +636,13 @@ class S390(object):
|
||||
logger.info("compressing the install tree")
|
||||
self.installtree.compress(initrd, kernel, self.ctype, self.cargs)
|
||||
|
||||
# run addrsize
|
||||
addrsize = joinpaths(self.installtree.root, "usr/libexec",
|
||||
"anaconda", "addrsize")
|
||||
|
||||
cmd = [addrsize, INITRD_ADDRESS, initrd.fpath,
|
||||
joinpaths(self.outputroot, IMAGESDIR, "initrd.addrsize")]
|
||||
|
||||
p = subprocess.Popen(cmd, stdin=subprocess.PIPE,
|
||||
stdout=subprocess.PIPE)
|
||||
p.wait()
|
||||
# create initrd.addrsize
|
||||
addrsize = open(joinpaths(self.outputroot, IMAGESDIR,
|
||||
"initrd.addrsize"), "wb")
|
||||
addrsize_data = struct.pack(">iiii", 0, int(INITRD_ADDRESS, 16), 0,
|
||||
os.stat(initrd.fpath).st_size)
|
||||
addrsize.write(addrsize_data)
|
||||
addrsize.close()
|
||||
|
||||
# add kernel and initrd to .treeinfo
|
||||
kernel_arch = kernel.version.split(".")[-1]
|
||||
|
Loading…
Reference in New Issue
Block a user