Browse Source

mkinitramfs: begun implementing firmware. WIP

user/karasz/firmware
Nagy Károly Gábriel 12 years ago
parent
commit
206a5d5384
2 changed files with 19 additions and 3 deletions
  1. +15
    -1
      base/mkinitramfs/install/D%libdir_kernel.in.txt
  2. +4
    -2
      base/mkinitramfs/install/D%sbindir_mkinitramfs.sh

+ 15
- 1
base/mkinitramfs/install/D%libdir_kernel.in.txt

@ -3,7 +3,7 @@
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
#
# Filename: package/.../mkinitramfs/install/D%libdir_kernel.in.txt
# Copyright (C) 2007 - 2009 The OpenSDE Project
# Copyright (C) 2007 - 2012 The OpenSDE Project
#
# More information can be found in the files COPYING and README.
#
@ -50,6 +50,20 @@ if [ -n "$moddir" ]; then
for dep in $( $MODINFO "$source" | grep "^depends:" | tr -s ' ' | cut -d' ' -f2 | tr ',' ' ' ); do
module_install "$dep"
done
for fw in $( $MODINFO "$source" | grep "^firmware:" | tr -s ' ' | cut -d' ' -f2 ); do
if [ -r "$firmwaredir/$fw" ]; then
echo -n " $fw"
fwdir=${fw%/*}
if [ "$fwdir" != "$fw" ]; then
mkdir -p "lib/firmware/$fwdir"
cp -a "$firmwaredir/$fw" "lib/firmware/$fwdir"
else
cp -a "$firmwaredir/$fw" "lib/firmware"
fi
fi
done
fi
else
modules_missing="$modules_missing $module"

+ 4
- 2
base/mkinitramfs/install/D%sbindir_mkinitramfs.sh

@ -3,7 +3,7 @@
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
#
# Filename: package/.../mkinitramfs/install/D%sbindir_mkinitramfs.sh
# Copyright (C) 2007 - 2009 The OpenSDE Project
# Copyright (C) 2007 - 2012 The OpenSDE Project
#
# More information can be found in the files COPYING and README.
#
@ -78,6 +78,8 @@ fi
moddir="${root}/lib/modules/$kernelver"
sysmap="${root}/boot/System.map_$kernelver"
libdir="${root}D_libdir"
firmwaredir="${root}/lib/firmware"
if [ -d "$moddir" ]; then
echo "kernel: $kernelver, module dir: ${moddir#$root/}"
if [ ! -r "$sysmap" ]; then
@ -114,7 +116,7 @@ if [ $? -eq 0 ]; then
errno=0
# prepare the environment for the plugins
export root tmpdir kernelver moddir libdir sysmap running
export root tmpdir kernelver moddir libdir firmwaredir sysmap running
# call the plugins
plugindir="etc/mkinitramfs.d"

Loading…
Cancel
Save