Fix the modules and firmware symlinks

On architectures which have libdir other than lib,
we have to create the lib directory in the initrd
prior to copying modules and firmware
This commit is contained in:
Martin Gracik 2010-03-31 17:28:29 +02:00
parent dfbedd6f0e
commit 36104bc143

View File

@ -126,7 +126,11 @@ export PS1 PATH
dst_moddir = os.path.join(self.dsttree, "modules", kernel.version) dst_moddir = os.path.join(self.dsttree, "modules", kernel.version)
# create the lib/modules symlink # create the lib/modules symlink
os.symlink("/modules", os.path.join(self.dsttree, self.const.MODDIR)) libmod = os.path.join(self.dsttree, self.const.MODDIR)
libmoddir = os.path.dirname(libmod)
if not os.path.isdir(libmoddir):
os.makedirs(libmoddir)
os.symlink("/modules", libmod)
# copy all modules to the initrd tree # copy all modules to the initrd tree
os.makedirs(os.path.dirname(dst_moddir)) os.makedirs(os.path.dirname(dst_moddir))
@ -209,7 +213,11 @@ export PS1 PATH
shutil.copy2(src, dst) shutil.copy2(src, dst)
# create the lib/firmware symlink # create the lib/firmware symlink
os.symlink("/firmware", os.path.join(self.dsttree, self.const.FWDIR)) libfw = os.path.join(self.dsttree, self.const.FWDIR)
libfwdir = os.path.dirname(libfw)
if not os.path.isdir(libfwdir):
os.makedirs(libfwdir)
os.symlink("/firmware", libfw)
# copy additional firmware # copy additional firmware
fw = [("ipw2100", "ipw2100*"), fw = [("ipw2100", "ipw2100*"),