diff options
author | Michael Janczyk | 2012-12-17 17:56:22 +0100 |
---|---|---|
committer | Michael Janczyk | 2012-12-17 17:56:22 +0100 |
commit | f6091ada5b293fe64e1dd6c6959189e0b8e4d1fa (patch) | |
tree | 415b402dfc2046b0f01392dea0c909aa17a1efa2 | |
parent | FW is now automatically added to the initramfs. Checks are done with modinfo. (diff) | |
download | core-f6091ada5b293fe64e1dd6c6959189e0b8e4d1fa.tar.gz core-f6091ada5b293fe64e1dd6c6959189e0b8e4d1fa.tar.xz core-f6091ada5b293fe64e1dd6c6959189e0b8e4d1fa.zip |
Follow links in modprobe.d when copying to stage3.
Minor version change, because of ne feautres
-rw-r--r-- | VERSIONS | 2 | ||||
-rw-r--r-- | src/boot-env/OpenSLX/MakeInitRamFS/Engine/Base.pm | 41 |
2 files changed, 29 insertions, 14 deletions
@@ -1,5 +1,5 @@ OPENSLX_VERSION_MAJOR="5" OPENSLX_VERSION_MINOR="0" -OPENSLX_VERSION_RELEASE="5" +OPENSLX_VERSION_RELEASE="6" OPENSLX_VERSION_STRING="${OPENSLX_VERSION_MAJOR}.${OPENSLX_VERSION_MINOR}.${OPENSLX_VERSION_RELEASE}${OPENSLX_VERSION_BUILD}" diff --git a/src/boot-env/OpenSLX/MakeInitRamFS/Engine/Base.pm b/src/boot-env/OpenSLX/MakeInitRamFS/Engine/Base.pm index 1eb91e88..e539ddd4 100644 --- a/src/boot-env/OpenSLX/MakeInitRamFS/Engine/Base.pm +++ b/src/boot-env/OpenSLX/MakeInitRamFS/Engine/Base.pm @@ -319,8 +319,9 @@ sub _copyKernelModules if (-e $firmwareSource){ my $targetDir = dirname("$self->{'build-path'}/lib/firmware/" . "$firmwareToBeCopied"); - $self->addCMD("mkdir -p $targetDir; \ - cp -pr --dereference $firmwareSource $targetDir"); + vlog(5,"Trying to make directory: $targetDir"); + $self->addCMD("mkdir -p $targetDir"); + $self->addCMD("cp -pr $firmwareSource $targetDir"); } else { vlog(3,"unable to find $firmwareSource for copying purposes"); } @@ -328,8 +329,9 @@ sub _copyKernelModules if (-e $kernelFWSource){ my $targetDir = dirname("$self->{'build-path'}/lib/firmware/" . "$self->{'kernel-version'}/$firmwareToBeCopied"); - $self->addCMD("mkdir -p $targetDir; \ - cp -pr --dereference $kernelFWSource $targetDir"); + vlog(5,"Trying to make directory: $targetDir"); + $self->addCMD("mkdir -p $targetDir"); + $self->addCMD("cp -pr $kernelFWSource $targetDir"); } else { vlog(3,"unable to find $kernelFWSource for copying purposes"); } @@ -341,10 +343,10 @@ sub _copyKernelModules "$self->{'root-path'}$moduleToBeCopied", $self->{'root-path'} ); my $target = "$self->{'build-path'}$moduleToBeCopied"; - my ($targetdir) = $target =~m/(.*\/).*$/; - vlog(5,"Trying to make directory: $targetdir"); - $self->addCMD("mkdir -p $targetdir"); - $self->addCMD("cp -p --dereference $source $target"); + my ($targetDir) = $target =~m/(.*\/).*$/; + vlog(5,"Trying to make directory: $targetDir"); + $self->addCMD("mkdir -p $targetDir"); + $self->addCMD("cp -p $source $target"); } return; @@ -353,11 +355,24 @@ sub _copyKernelModules sub _copyModprobeD { my $self = shift; - - my $source = "$self->{'root-path'}/etc/modprobe.d"; - my $target = "$self->{'build-path'}/etc"; - $self->addCMD("cp -pr --dereference $source $target"); - + my $target = "$self->{'build-path'}/etc/modprobe.d"; + + opendir my $modprobeDir, "$self->{'root-path'}/etc/modprobe.d" + or die "Cannot open directory: $!"; + my @modprobeFiles = readdir $modprobeDir; + closedir $modprobeDir; + + vlog(5,"Trying to make directory: $target"); + $self->addCMD("mkdir -p $target"); + foreach my $modprobeConf (@modprobeFiles) { + # ignore files beginning with '.' + next if ($modprobeConf =~ m/^\./); + my $source = followLink( + "$self->{'root-path'}/etc/modprobe.d/$modprobeConf", + $self->{'root-path'} + ); + $self->addCMD("cp -pr $source $target"); + } return; } |