Kaydet (Commit) d2671ff5 authored tarafından sulincix's avatar sulincix

şişman initrd desteği

üst 8e7e5589
Usage $(basename $0) [OPTIONS]
Targeting options list:
OUPTUP Target initrd file output location.
WORKDIR Working directory. Created by mktemp command.
KERNELVER Target kernel version. Default is current kernel.
MODDIR Target module director. Default is current module directory.
CONFIG Used config file location. Default is /etc/initrd.conf
OUPTUP Target initrd file output location.
WORKDIR Working directory. Created by mktemp command.
KERNELVER Target kernel version. Default is current kernel.
MODDIR Target module director. Default is current module directory.
CONFIG Used config file location. Default is /etc/initrd.conf
General option list:
-d / --debug Print debug log.
-k / --keep Do not remove working directory after building.
-h / --help Print this message.
-n / --no-color Disable colorized output.
-c / --no-cpio Do not generate initrd image.
-f / --fallback Generate fallback initrd image.
-g / --no-glibc Do not install glibc module. (Disable dinamic library support.)
-s / --no-fsck Do not install fsck module.
-d / --debug Print debug log.
-k / --keep Do not remove working directory after building.
-h / --help Print this message.
-n / --no-color Disable colorized output.
-c / --no-cpio Do not generate initrd image.
-f / --fallback Generate fallback initrd image.
-g / --no-glibc Do not install glibc module. (Disable dinamic library support.)
-s / --no-fsck Do not install fsck module.
-u / --no-udev Do not install udev module.
-a / --all-module Include all kernel module (udev module needed)
Kullanım $(basename $0) [SEÇENEKLER]
Hedefleme seçenekleri listesi:
OUPTUP Hedef initrd dosyası çıktı yolu.
WORKDIR Çalışma dizini. mktepm tarafından oluşturulur.
KERNELVER Hedef çekirdek sürümü. Varsayılan şimdiki çekirdek.
MODDIR Hedef modül dizini. Varsayılan şimdiki modül dizini.
CONFIG Kullanılan ayar yolu. Varsayılan /etc/initrd.conf kullanılır.
OUPTUP Hedef initrd dosyası çıktı yolu.
WORKDIR Çalışma dizini. mktepm tarafından oluşturulur.
KERNELVER Hedef çekirdek sürümü. Varsayılan şimdiki çekirdek.
MODDIR Hedef modül dizini. Varsayılan şimdiki modül dizini.
CONFIG Kullanılan ayar yolu. Varsayılan /etc/initrd.conf kullanılır.
Genel seçenekler listesi:
-d / --debug Hata ayıklama çıktısı yazdırır.
-k / --keep Derleme sonrası çalışma dizinini temizlemez.
-h / --help Bu mesajı yazdırır.
-n / --no-color Renkli çıktı özelliğini kapatır.
-c / --no-cpio Initrd dosyası oluşturmaz.
-f / --fallback Yedek initrd dosyası oluşturur.
-g / --no-glibc Glibc modülünü kapat. (dinamik ikili desteğini kapatır)
-s / --no-fsck Fsck modülünü kapatır.
-d / --debug Hata ayıklama çıktısı yazdırır.
-k / --keep Derleme sonrası çalışma dizinini temizlemez.
-h / --help Bu mesajı yazdırır.
-n / --no-color Renkli çıktı özelliğini kapatır.
-c / --no-cpio Initrd dosyası oluşturmaz.
-f / --fallback Yedek initrd dosyası oluşturur.
-g / --no-glibc Glibc modülünü kapatır. (dinamik ikili desteğini kapatır)
-s / --no-fsck Fsck modülünü kapatır.
-u / --no-udev Udev modülünü kapatır.
-a / --all-module Tüm modülleri içerir. (udev modülü gerektirir)
......@@ -7,13 +7,17 @@
debug "Kernel Version" "${KERNELVER}"
debug "Module Directory" "${MODDIR}"
mkdir -p ${WORKDIR}/${MODDIR}
debug "Install main modules"
cp -prf ${MODDIR}/kernel/{crypto,fs,lib} ${WORKDIR}/${MODDIR}
debug "Install drivers"
cp -prf ${MODDIR}/kernel/drivers/{block,ata,md,firewire} ${WORKDIR}/${MODDIR}
cp -prf ${MODDIR}/kernel/drivers/{scsi,pcmcia,virtio} ${WORKDIR}/${MODDIR}
cp -prf ${MODDIR}/kernel/drivers/usb/{host,storage} ${WORKDIR}/${MODDIR}
if [ "$debug" != "true" ] ; then
debug "Remove debug drivers"
find ${WORKDIR}/${MODDIR} | grep debug | xargs rm -rf
if [ "$allmodule" == true ] && [ "$skipglibc" != "true" ] && [ "$skipudev" != "true" ]; then
cp -prf ${MODDIR}/* ${WORKDIR}/${MODDIR}
else
debug "Install main modules"
cp -prf ${MODDIR}/kernel/{crypto,fs,lib} ${WORKDIR}/${MODDIR}
debug "Install drivers"
cp -prf ${MODDIR}/kernel/drivers/{block,ata,md,firewire} ${WORKDIR}/${MODDIR}
cp -prf ${MODDIR}/kernel/drivers/{scsi,pcmcia,virtio} ${WORKDIR}/${MODDIR}
cp -prf ${MODDIR}/kernel/drivers/usb/{host,storage} ${WORKDIR}/${MODDIR}
if [ "$debug" != "true" ] ; then
debug "Remove debug drivers"
find ${WORKDIR}/${MODDIR} | grep debug | xargs rm -rf
fi
fi
......@@ -22,6 +22,8 @@ parse_args(){
export keepworkdir=false
export skipglibc=false
export skipfsck=false
export skipudev=false
export allmodule=false
export LANGDIR=/lib/initrd/locale
for i in $*
do
......@@ -36,12 +38,16 @@ parse_args(){
skipglibc=true
elif [ "$i" == "-s" ] || [ "$i" == "--no-fsck" ] ; then
skipfsck=true
elif [ "$i" == "-u" ] || [ "$i" == "--no-udev" ] ; then
export skipudev=true
elif [ "$i" == "-n" ] || [ "$i" == "--no-color" ] ; then
export nocolor=true
elif [ "$i" == "-c" ] || [ "$i" == "--no-cpio" ] ; then
export nocpio=true
elif [ "$i" == "-f" ] || [ "$i" == "--fallback" ] ; then
fallback=true
elif [ "$i" == "-a" ] || [ "$i" == "--all-modules" ] ; then
allmodule=true
else
export $i 2>/dev/null || true
fi
......
#Thanks for mll: https://github.com/ivandavidov/minimal
msg "Trying to connect network"
for DEVICE in /sys/class/net/* ; do
inf "Network device" $DEVICE
ip link set ${DEVICE##*/} up || true
[ ${DEVICE##*/} != lo ] && udhcpc -b -i ${DEVICE##*/} -s /etc/05_rc.dhcp || true
for DEVICE in /sys/class/net/* ; do
inf "Network device" $DEVICE
ip link set ${DEVICE##*/} up || true
[ ${DEVICE##*/} != lo ] && udhcpc -b -i ${DEVICE##*/} -s /etc/05_rc.dhcp || true
done
PATH=/bin
PATH=/bin:/xbin
TERM=linux
LANGDIR=/locale
rootfstype=ext4
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment