Lines 317-322
Link Here
|
317 |
done |
317 |
done |
318 |
} |
318 |
} |
319 |
|
319 |
|
|
|
320 |
# check for static linked file with objdump |
321 |
is_static() { |
322 |
objdump -T $1 2>&1 | grep "not a dynamic object" > /dev/null |
323 |
return $? |
324 |
} |
325 |
|
320 |
create_initramfs_modules() { |
326 |
create_initramfs_modules() { |
321 |
local group |
327 |
local group |
322 |
local group_modules |
328 |
local group_modules |
Lines 368-373
Link Here
|
368 |
fi |
374 |
fi |
369 |
mkdir -p "${TEMP}/initramfs-aux-temp/etc" |
375 |
mkdir -p "${TEMP}/initramfs-aux-temp/etc" |
370 |
mkdir -p "${TEMP}/initramfs-aux-temp/sbin" |
376 |
mkdir -p "${TEMP}/initramfs-aux-temp/sbin" |
|
|
377 |
mkdir -p "${TEMP}/initramfs-aux-temp/bin" |
371 |
if [ -f "${CMD_LINUXRC}" ] |
378 |
if [ -f "${CMD_LINUXRC}" ] |
372 |
then |
379 |
then |
373 |
cp "${CMD_LINUXRC}" "${TEMP}/initramfs-aux-temp/init" |
380 |
cp "${CMD_LINUXRC}" "${TEMP}/initramfs-aux-temp/init" |
Lines 430-435
Link Here
|
430 |
chmod +x "${TEMP}/initramfs-aux-temp/etc/initrd.scripts" |
437 |
chmod +x "${TEMP}/initramfs-aux-temp/etc/initrd.scripts" |
431 |
chmod +x "${TEMP}/initramfs-aux-temp/etc/initrd.defaults" |
438 |
chmod +x "${TEMP}/initramfs-aux-temp/etc/initrd.defaults" |
432 |
chmod +x "${TEMP}/initramfs-aux-temp/sbin/modprobe" |
439 |
chmod +x "${TEMP}/initramfs-aux-temp/sbin/modprobe" |
|
|
440 |
|
441 |
if [ "${LUKS}" = '1' ] |
442 |
then |
443 |
is_static /bin/cryptsetup || gen_die "LUKS support requires static cryptsetup-luks. USE=-dynamic emerge cryptsetup-luks" |
444 |
rm -f ${TEMP}/initramfs-aux-temp/bin/cryptsetup |
445 |
cp /bin/cryptsetup ${TEMP}/initramfs-aux-temp/bin/cryptsetup |
446 |
fi |
447 |
|
433 |
cd "${TEMP}/initramfs-aux-temp/" |
448 |
cd "${TEMP}/initramfs-aux-temp/" |
434 |
find . -print | cpio --quiet -o -H newc | gzip -9 > ${CACHE_CPIO_DIR}/initramfs-aux.cpio.gz |
449 |
find . -print | cpio --quiet -o -H newc | gzip -9 > ${CACHE_CPIO_DIR}/initramfs-aux.cpio.gz |
435 |
rm -r "${TEMP}/initramfs-aux-temp/" |
450 |
rm -r "${TEMP}/initramfs-aux-temp/" |