mkefiboot: Copy Mac bootloader, rather than linking it
The Mac firmware needs special-casing for hardlinked bootloaders, and it's kind of awkward to handle that in python. Just copy them for now instead.
This commit is contained in:
parent
3996d9c9e0
commit
a37389d574
@ -146,6 +146,8 @@ def estimate_size(rootdir, graft={}, fstype=None, blocksize=4096, overhead=128):
|
||||
getsize = lambda f: os.lstat(f).st_size
|
||||
if fstype == "btrfs":
|
||||
overhead = 64*1024 # don't worry, it's all sparse
|
||||
if fstype == "hfsplus":
|
||||
overhead = 200 # hack to deal with two bootloader copies
|
||||
if fstype in ("vfat", "msdos"):
|
||||
blocksize = 2048
|
||||
getsize = lambda f: os.stat(f).st_size # no symlinks, count as copies
|
||||
|
@ -70,8 +70,8 @@ def macmunge(imgfile, product):
|
||||
</dict>
|
||||
</plist>
|
||||
''' % (product,))
|
||||
os.link(loader, os.path.join(sysdir,'boot.efi'))
|
||||
os.link(config, os.path.join(sysdir,'boot.conf'))
|
||||
shutil.copy(loader, os.path.join(sysdir,'boot.efi'))
|
||||
shutil.copy(config, os.path.join(sysdir,'boot.conf'))
|
||||
# format data properly (big-endian UInt32)
|
||||
nodedata = struct.pack(">i", blessnode)
|
||||
dirdata = struct.pack(">i", dirnode)
|
||||
|
Loading…
Reference in New Issue
Block a user