Die IDE/SCSI/SATA/USB-Erkennung erstellt nun schoene Ramdisks :D

Kernel ist jetzt noch modularer, da keine IDE/FS-Treiber vorhanden sind.


git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@561 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8
This commit is contained in:
ms
2007-05-18 16:00:20 +00:00
parent f2fdd0c1e9
commit ee78a5efc7
38 changed files with 22000 additions and 201 deletions

View File

@@ -33,7 +33,8 @@ echo "Starting syslogd"
syslogd -O /dev/tty4
echo "Starting udev daemon"
/sbin/udevstart
/sbin/udevd --daemon
/sbin/udevtrigger
/sbin/udevsettle
echo "Loading installer... Please wait!"
/bin/sleep 2
echo "Loading Installer..."

View File

@@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
# Linux kernel version: 2.6.16.50-ipfire
# Wed May 9 08:33:53 2007
# Thu May 17 13:06:57 2007
#
CONFIG_X86_32=y
CONFIG_SEMAPHORE_SLEEPERS=y
@@ -618,7 +618,6 @@ CONFIG_KLIPS_ENC_CRYPTOAPI=y
CONFIG_KLIPS_ENC_1DES=y
CONFIG_KLIPS_ENC_3DES=y
CONFIG_KLIPS_ENC_AES=y
CONFIG_KLIPS_ENC_NULL=y
CONFIG_KLIPS_IPCOMP=y
CONFIG_KLIPS_DEBUG=y
@@ -740,7 +739,7 @@ CONFIG_PNPACPI=y
#
# Block devices
#
CONFIG_BLK_DEV_FD=y
CONFIG_BLK_DEV_FD=m
# CONFIG_BLK_DEV_XD is not set
# CONFIG_PARIDE is not set
CONFIG_BLK_CPQ_DA=m
@@ -765,32 +764,32 @@ CONFIG_BLK_DEV_INITRD=y
# ATA/ATAPI/MFM/RLL support
#
CONFIG_IDE=y
CONFIG_BLK_DEV_IDE=y
CONFIG_BLK_DEV_IDE=m
#
# Please see Documentation/ide.txt for help/info on IDE drives
#
# CONFIG_BLK_DEV_IDE_SATA is not set
# CONFIG_BLK_DEV_HD_IDE is not set
CONFIG_BLK_DEV_IDEDISK=y
CONFIG_BLK_DEV_IDEDISK=m
# CONFIG_IDEDISK_MULTI_MODE is not set
CONFIG_BLK_DEV_IDECD=y
CONFIG_BLK_DEV_IDECD=m
# CONFIG_BLK_DEV_IDETAPE is not set
CONFIG_BLK_DEV_IDEFLOPPY=y
CONFIG_BLK_DEV_IDEFLOPPY=m
# CONFIG_BLK_DEV_IDESCSI is not set
# CONFIG_IDE_TASK_IOCTL is not set
#
# IDE chipset support/bugfixes
#
CONFIG_IDE_GENERIC=y
CONFIG_IDE_GENERIC=m
CONFIG_BLK_DEV_CMD640=y
# CONFIG_BLK_DEV_CMD640_ENHANCED is not set
CONFIG_BLK_DEV_IDEPNP=y
CONFIG_BLK_DEV_IDEPCI=y
CONFIG_IDEPCI_SHARE_IRQ=y
# CONFIG_BLK_DEV_OFFBOARD is not set
CONFIG_BLK_DEV_GENERIC=y
CONFIG_BLK_DEV_GENERIC=m
CONFIG_BLK_DEV_OPTI621=m
CONFIG_BLK_DEV_RZ1000=m
CONFIG_BLK_DEV_IDEDMA_PCI=y
@@ -968,12 +967,11 @@ CONFIG_SCSI_NCR53C8XX_SYNC=20
CONFIG_SCSI_MCA_53C9X=m
CONFIG_SCSI_PAS16=m
CONFIG_SCSI_PSI240I=m
CONFIG_SCSI_QLOGIC_FAS=m
CONFIG_SCSI_QLOGIC_FC=m
# CONFIG_SCSI_QLOGIC_FC_FIRMWARE is not set
# CONFIG_SCSI_QLOGIC_FAS is not set
# CONFIG_SCSI_QLOGIC_FC is not set
CONFIG_SCSI_QLOGIC_1280=m
# CONFIG_SCSI_QLA_FC is not set
CONFIG_SCSI_LPFC=m
# CONFIG_SCSI_LPFC is not set
CONFIG_SCSI_SIM710=m
CONFIG_53C700_IO_MAPPED=y
CONFIG_SCSI_SYM53C416=m
@@ -1002,7 +1000,7 @@ CONFIG_MD_LINEAR=m
CONFIG_MD_RAID0=m
CONFIG_MD_RAID1=m
# CONFIG_MD_RAID10 is not set
# CONFIG_MD_RAID5 is not set
CONFIG_MD_RAID5=m
# CONFIG_MD_RAID6 is not set
CONFIG_MD_MULTIPATH=m
# CONFIG_MD_FAULTY is not set
@@ -1805,16 +1803,16 @@ CONFIG_EXT2_FS_XATTR=y
CONFIG_EXT2_FS_POSIX_ACL=y
CONFIG_EXT2_FS_SECURITY=y
# CONFIG_EXT2_FS_XIP is not set
CONFIG_EXT3_FS=y
CONFIG_EXT3_FS=m
CONFIG_EXT3_FS_XATTR=y
CONFIG_EXT3_FS_POSIX_ACL=y
CONFIG_EXT3_FS_SECURITY=y
CONFIG_JBD=y
CONFIG_JBD=m
# CONFIG_JBD_DEBUG is not set
CONFIG_FS_MBCACHE=y
CONFIG_REISER4_FS=y
CONFIG_REISER4_FS=m
# CONFIG_REISER4_DEBUG is not set
CONFIG_REISERFS_FS=y
CONFIG_REISERFS_FS=m
# CONFIG_REISERFS_CHECK is not set
CONFIG_REISERFS_PROC_INFO=y
CONFIG_REISERFS_FS_XATTR=y
@@ -1833,7 +1831,7 @@ CONFIG_XFS_SECURITY=y
CONFIG_XFS_POSIX_ACL=y
# CONFIG_XFS_RT is not set
# CONFIG_OCFS2_FS is not set
CONFIG_MINIX_FS=y
# CONFIG_MINIX_FS is not set
# CONFIG_ROMFS_FS is not set
CONFIG_INOTIFY=y
# CONFIG_QUOTA is not set
@@ -1846,7 +1844,7 @@ CONFIG_DNOTIFY=y
#
# CD-ROM/DVD Filesystems
#
CONFIG_ISO9660_FS=y
CONFIG_ISO9660_FS=m
CONFIG_JOLIET=y
# CONFIG_ZISOFS is not set
CONFIG_UDF_FS=m
@@ -1944,7 +1942,7 @@ CONFIG_MSDOS_PARTITION=y
# Native Language Support
#
CONFIG_NLS=y
CONFIG_NLS_DEFAULT="cp437"
CONFIG_NLS_DEFAULT="cp850"
# CONFIG_NLS_CODEPAGE_437 is not set
# CONFIG_NLS_CODEPAGE_737 is not set
# CONFIG_NLS_CODEPAGE_775 is not set

View File

@@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
# Linux kernel version: 2.6.16.50-ipfire
# Wed May 9 08:34:23 2007
# Thu May 17 13:07:20 2007
#
CONFIG_X86_32=y
CONFIG_SEMAPHORE_SLEEPERS=y
@@ -624,7 +624,6 @@ CONFIG_KLIPS_ENC_CRYPTOAPI=y
CONFIG_KLIPS_ENC_1DES=y
CONFIG_KLIPS_ENC_3DES=y
CONFIG_KLIPS_ENC_AES=y
CONFIG_KLIPS_ENC_NULL=y
CONFIG_KLIPS_IPCOMP=y
CONFIG_KLIPS_DEBUG=y
@@ -746,7 +745,7 @@ CONFIG_PNPACPI=y
#
# Block devices
#
CONFIG_BLK_DEV_FD=y
CONFIG_BLK_DEV_FD=m
# CONFIG_BLK_DEV_XD is not set
# CONFIG_PARIDE is not set
CONFIG_BLK_CPQ_DA=m
@@ -771,32 +770,32 @@ CONFIG_BLK_DEV_INITRD=y
# ATA/ATAPI/MFM/RLL support
#
CONFIG_IDE=y
CONFIG_BLK_DEV_IDE=y
CONFIG_BLK_DEV_IDE=m
#
# Please see Documentation/ide.txt for help/info on IDE drives
#
# CONFIG_BLK_DEV_IDE_SATA is not set
# CONFIG_BLK_DEV_HD_IDE is not set
CONFIG_BLK_DEV_IDEDISK=y
CONFIG_BLK_DEV_IDEDISK=m
# CONFIG_IDEDISK_MULTI_MODE is not set
CONFIG_BLK_DEV_IDECD=y
CONFIG_BLK_DEV_IDECD=m
# CONFIG_BLK_DEV_IDETAPE is not set
CONFIG_BLK_DEV_IDEFLOPPY=y
CONFIG_BLK_DEV_IDEFLOPPY=m
# CONFIG_BLK_DEV_IDESCSI is not set
# CONFIG_IDE_TASK_IOCTL is not set
#
# IDE chipset support/bugfixes
#
CONFIG_IDE_GENERIC=y
CONFIG_IDE_GENERIC=m
CONFIG_BLK_DEV_CMD640=y
# CONFIG_BLK_DEV_CMD640_ENHANCED is not set
CONFIG_BLK_DEV_IDEPNP=y
CONFIG_BLK_DEV_IDEPCI=y
CONFIG_IDEPCI_SHARE_IRQ=y
# CONFIG_BLK_DEV_OFFBOARD is not set
CONFIG_BLK_DEV_GENERIC=y
CONFIG_BLK_DEV_GENERIC=m
CONFIG_BLK_DEV_OPTI621=m
CONFIG_BLK_DEV_RZ1000=m
CONFIG_BLK_DEV_IDEDMA_PCI=y
@@ -973,12 +972,11 @@ CONFIG_SCSI_NCR53C8XX_SYNC=20
# CONFIG_SCSI_NCR53C8XX_PROFILE is not set
CONFIG_SCSI_PAS16=m
CONFIG_SCSI_PSI240I=m
CONFIG_SCSI_QLOGIC_FAS=m
CONFIG_SCSI_QLOGIC_FC=m
# CONFIG_SCSI_QLOGIC_FC_FIRMWARE is not set
# CONFIG_SCSI_QLOGIC_FAS is not set
# CONFIG_SCSI_QLOGIC_FC is not set
CONFIG_SCSI_QLOGIC_1280=m
# CONFIG_SCSI_QLA_FC is not set
CONFIG_SCSI_LPFC=m
# CONFIG_SCSI_LPFC is not set
CONFIG_SCSI_SIM710=m
CONFIG_53C700_IO_MAPPED=y
CONFIG_SCSI_SYM53C416=m
@@ -1007,7 +1005,7 @@ CONFIG_MD_LINEAR=m
CONFIG_MD_RAID0=m
CONFIG_MD_RAID1=m
# CONFIG_MD_RAID10 is not set
# CONFIG_MD_RAID5 is not set
CONFIG_MD_RAID5=m
# CONFIG_MD_RAID6 is not set
CONFIG_MD_MULTIPATH=m
# CONFIG_MD_FAULTY is not set
@@ -1808,16 +1806,16 @@ CONFIG_EXT2_FS_XATTR=y
CONFIG_EXT2_FS_POSIX_ACL=y
CONFIG_EXT2_FS_SECURITY=y
# CONFIG_EXT2_FS_XIP is not set
CONFIG_EXT3_FS=y
CONFIG_EXT3_FS=m
CONFIG_EXT3_FS_XATTR=y
CONFIG_EXT3_FS_POSIX_ACL=y
CONFIG_EXT3_FS_SECURITY=y
CONFIG_JBD=y
CONFIG_JBD=m
# CONFIG_JBD_DEBUG is not set
CONFIG_FS_MBCACHE=y
CONFIG_REISER4_FS=y
CONFIG_REISER4_FS=m
# CONFIG_REISER4_DEBUG is not set
CONFIG_REISERFS_FS=y
CONFIG_REISERFS_FS=m
# CONFIG_REISERFS_CHECK is not set
CONFIG_REISERFS_PROC_INFO=y
CONFIG_REISERFS_FS_XATTR=y
@@ -1836,7 +1834,7 @@ CONFIG_XFS_SECURITY=y
CONFIG_XFS_POSIX_ACL=y
# CONFIG_XFS_RT is not set
# CONFIG_OCFS2_FS is not set
CONFIG_MINIX_FS=y
# CONFIG_MINIX_FS is not set
# CONFIG_ROMFS_FS is not set
CONFIG_INOTIFY=y
# CONFIG_QUOTA is not set
@@ -1849,7 +1847,7 @@ CONFIG_DNOTIFY=y
#
# CD-ROM/DVD Filesystems
#
CONFIG_ISO9660_FS=y
CONFIG_ISO9660_FS=m
CONFIG_JOLIET=y
# CONFIG_ZISOFS is not set
CONFIG_UDF_FS=m
@@ -1947,7 +1945,7 @@ CONFIG_MSDOS_PARTITION=y
# Native Language Support
#
CONFIG_NLS=y
CONFIG_NLS_DEFAULT="cp437"
CONFIG_NLS_DEFAULT="cp850"
# CONFIG_NLS_CODEPAGE_437 is not set
# CONFIG_NLS_CODEPAGE_737 is not set
# CONFIG_NLS_CODEPAGE_775 is not set

View File

@@ -0,0 +1,32 @@
#! /bin/sh
# Implement blacklisting for udev-loaded modules
# Includes module checking
# - Aaron Griffin & Tobias Powalowski for Archlinux
[ $# -ne 1 ] && exit 1
if [ -f /proc/cmdline ]; then
for cmd in $(cat /proc/cmdline); do
case $cmd in
*=*) eval $cmd ;;
esac
done
fi
# get the real names from modaliases
i="$(/bin/modprobe -i --show-depends $1 | minised "s#^insmod /lib.*/\(.*\)\.ko.*#\1#g" | minised 's|-|_|g')"
# add disablemodules= from commandline to blacklist
k="$(echo ${disablemodules} | minised 's|-|_|g' | minised 's|,| |g')"
if [ "${k}" != "" ] ; then
for o in ${k}; do
echo "${o}.ko" >> /disablemodules
done
for n in ${i}; do
if /bin/ugrep "^$n.ko" /disablemodules 2>&1 >/dev/null; then
exit 1
fi
done
fi
/bin/modprobe $1
# vim: set et ts=4:

View File

@@ -0,0 +1,115 @@
#! /bin/sh
#
# start_udev
# script to initialize /dev by using udev.
#
# Modified for Archlinux by Tobias Powalowski <tpowa@archlinux.org>
#
# Inspired by:
#
# Copyright (C) 2004 Greg Kroah-Hartman <greg@kroah.com>
#
# Released under the GPL v2 only.
#
# This needs to be run at the earliest possible point in the boot
# process.
#
# Based on the udev init.d script
#
# Thanks go out to the Gentoo developers for proving
# that this is possible to do.
#
# Yes, it's very verbose, feel free to turn off all of the echo calls,
# they were there to make me feel better that everything was working
# properly during development...
prog=udev
sysfs_dir=/sys
bin=/sbin/udev
udevd=/sbin/udevd
udev_root="/dev"
trigger_device_events ()
{
/sbin/udevtrigger
}
wait_for_queue ()
{
# disabled because it hangs network boot
#loop=20
#while ! [ "$loop" -gt 0 -a -d /dev/.udev/queue ]; do
# sleep 0.1;
# loop=$(($loop - 1))
#done
/sbin/udevsettle
}
make_extra_nodes ()
{
# there are a few things that sysfs does not export for us.
# these things go here (and remember to remove them in
# remove_extra_nodes()
#
# Thanks to Gentoo for the initial list of these.
ln -sf /proc/self/fd $udev_root/fd
ln -sf /proc/self/fd/0 $udev_root/stdin
ln -sf /proc/self/fd/1 $udev_root/stdout
ln -sf /proc/self/fd/2 $udev_root/stderr
ln -sf /proc/kcore $udev_root/core
}
udev_init ()
{
# don't use udev if sysfs is not mounted.
if [ ! -d $sysfs_dir/block ]; then
exit 1
fi
#echo "mounting... ramfs at $udev_root"
mount -t ramfs none $udev_root
# propogate /udev from /sys
#echo "Creating initial udev device nodes:"
#echo "making extra nodes"
make_extra_nodes
# check if udevd is already running
#echo "start udev daemon"
/sbin/udevd --daemon
case "$(uname -r)" in
2.6.[0-9]|2.6.[0-9][!0-9]*) ;;
*) if [ -f "/sys/class/tty/console/uevent" ]; then
#echo "Kernel >= 2.6.15 and supports uevents"
# trigger the sorted events
echo -e '\000\000\000\000' > /proc/sys/kernel/hotplug
# catch events that are real fast
mkdir -p /dev/.udev/queue
else
# for older kernels without uevents will be removed when udevstart dies in udev
echo "Kernel does not support uevents, you need a kernel >= 2.6.15!"
exit 1
fi
;;
esac
}
udev_uevents ()
{
# configure all devices
trigger_device_events
# until we know how to do better, just wait for _all_ events to finish
wait_for_queue
}
if [ $# -eq 0 ]; then
udev_init
udev_uevents
fi
[ "$1" = "init" ] && udev_init
[ "$1" = "uevents" ] && udev_uevents
exit 0

View File

@@ -0,0 +1,71 @@
# Udev rules for Archlinux by Tobias Powalowski <tpowa@archlinux.org>
#
# This ruleset should provide a DevFS-compatible device tree.
#
# There are a number of modifiers that are allowed to be used in some
# of the different fields. They provide the following subsitutions:
#
# %n the "kernel number" of the device.
# For example, 'sda3' has a "kernel number" of '3'
# %k the kernel name for the device.
# %M the kernel major number for the device
# %m the kernel minor number for the device
# %b the bus id for the device
# %c the string returned by the PROGRAM
# %s{filename} the content of a sysfs attribute.
# %% the '%' char itself.
#
# There are a number of modifiers that are allowed to be used in some of the
# fields. See the udev man page for a full description of them.
# global stuff
#
#####################################
# Early rules - begin
#####################################
# wait for sysfs
ACTION=="add", DEVPATH=="/devices/*", ENV{PHYSDEVBUS}=="?*", WAIT_FOR_SYSFS="bus"
ACTION=="add", SUBSYSTEM=="scsi", WAIT_FOR_SYSFS="ioerr_cnt"
#####################################
# Early rules -end
#####################################
#####################################
###### Hotplug rules - begin
#####################################
# check if the device has already been claimed by a driver
ENV{PHYSDEVDRIVER}=="?*", GOTO="hotplug_driver_loaded"
# Modaliases to load
ACTION=="add", ENV{MODALIAS}=="?*", RUN+="/lib/udev/load-modules.sh $env{MODALIAS}"
# SCSI addon modules
ACTION=="add", SUBSYSTEM=="scsi", SYSFS{type}=="[07]", RUN+="/lib/udev/load-modules.sh sd_mod"
ACTION=="add", SUBSYSTEM=="scsi", SYSFS{type}=="14", RUN+="/lib/udev/load-modules.sh sd_mod"
ACTION=="add", SUBSYSTEM=="scsi", SYSFS{type}=="[45]", RUN+="/lib/udev/load-modules.sh sr_mod"
ACTION=="add", SUBSYSTEM=="scsi", SYSFS{type}=="1", SYSFS{vendor}=="Onstream", SYSFS{model}!="ADR*", RUN+="/lib/udev/load-modules.sh osst"
ACTION=="add", SUBSYSTEM=="scsi", SYSFS{type}=="1", SYSFS{vendor}=="Onstream", SYSFS{model}=="ADR*", RUN+="/lib/udev/load-modules.sh st"
ACTION=="add", SUBSYSTEM=="scsi", SYSFS{type}=="1", SYSFS{vendor}!="Onstream", RUN+="/lib/udev/load-modules.sh st"
ACTION=="add", SUBSYSTEM=="scsi", SYSFS{type}=="[23689]", RUN+="/lib/udev/load-modules.sh sg"
LABEL="hotplug_driver_loaded"
# FIRMWARE
ACTION=="add", SUBSYSTEM=="firmware", ENV{FIRMWARE}=="?*", RUN+="/lib/udev/firmware.sh"
#####################################
##### Hotplug rules - end
#####################################
#####################################
###### CD/DVD symlinks - begin
#####################################
ACTION=="add", BUS=="ide", KERNEL=="hd[a-z]", IMPORT="/lib/udev/cdrom_id --export $tempnode"
ACTION=="add", BUS=="scsi", KERNEL=="sr[0-9]*", IMPORT="/lib/udev/cdrom_id --export $tempnode"
ACTION=="add", BUS=="scsi", KERNEL=="scd[a-z]", IMPORT="/lib/udev/cdrom_id --export $tempnode"
ENV{ID_CDROM}=="?*", SYMLINK+="cd/cdrom-%b"
ENV{ID_CDROM_CD_RW}=="?*", SYMLINK+="cd/cdrw-%b"
ENV{ID_CDROM_DVD}=="?*", SYMLINK+="cd/dvd-%b"
ENV{ID_CDROM_DVD_R}=="?*", SYMLINK+="cd/dvd-%b"
#####################################
###### CD/DVD symlinks - end
#####################################

View File

@@ -0,0 +1,7 @@
# vim: set ft=sh:
run_hook ()
{
msg -n ":: Loading udev..."
/etc/start_udev
msg "done."
}

View File

@@ -0,0 +1,26 @@
# vim:set ft=sh:
install ()
{
MODULES=""
BINARIES=""
FILES=" /etc/udev/udev.conf"
SCRIPT="udev"
add_file /lib/initcpio/udev/udevd /sbin/udevd
add_file /lib/initcpio/udev/udevtrigger /sbin/udevtrigger
add_file /lib/initcpio/udev/udevsettle /sbin/udevsettle
add_file /lib/initcpio/udev/udev.rules /etc/udev/rules.d/udev.rules
add_file /lib/initcpio/udev/start_udev /etc/start_udev
add_file /lib/initcpio/udev/firmware.sh /lib/udev/firmware.sh
add_file /lib/initcpio/udev/cdrom_id /lib/udev/cdrom_id
add_file /lib/initcpio/udev/load-modules.sh /lib/udev/load-modules.sh
}
help ()
{
cat <<HELPEOF
This hook will use udev to create your root device node
and detect the needed modules for your root device.
It is recommended to use this hook instead of modload.
HELPEOF
}

View File

@@ -42,7 +42,7 @@ usr/bin/fold
usr/bin/groups
usr/bin/hostid
usr/bin/id
#usr/bin/install
usr/bin/install
usr/bin/join
#usr/bin/link
#usr/bin/logname
@@ -58,7 +58,7 @@ usr/bin/paste
#usr/bin/printenv
usr/bin/printf
#usr/bin/ptx
#usr/bin/readlink
usr/bin/readlink
usr/bin/seq
#usr/bin/sha1sum
usr/bin/shred
@@ -76,7 +76,7 @@ usr/bin/tr
#usr/bin/tty
usr/bin/unexpand
usr/bin/uniq
#usr/bin/unlink
usr/bin/unlink
#usr/bin/users
#usr/bin/vdir
usr/bin/wc

File diff suppressed because it is too large Load Diff

View File

@@ -1301,3 +1301,4 @@ lib/modules/KVER-ipfire-smp
#lib/modules/KVER-ipfire-smp/source
#lib/modules/KVER-ipfire-smp/kernel/drivers/net/imq.ko
#lib/modules/KVER-ipfire-smp/kernel/net/ipv4/netfilter/ipt_IMQ.ko
sbin/gen_init_cpio

View File

@@ -0,0 +1,64 @@
etc/mkinitcpio.conf
etc/mkinitcpio.d
#etc/mkinitcpio.d/example.preset
lib/initcpio
#lib/initcpio/functions
#lib/initcpio/hooks
#lib/initcpio/hooks/filesystems
#lib/initcpio/hooks/fw
#lib/initcpio/hooks/modload
#lib/initcpio/hooks/raid
#lib/initcpio/hooks/resume
#lib/initcpio/hooks/usb
#lib/initcpio/init
#lib/initcpio/install
#lib/initcpio/install/autodetect
#lib/initcpio/install/base
#lib/initcpio/install/dsdt
#lib/initcpio/install/filesystems
#lib/initcpio/install/firmware
#lib/initcpio/install/fw
#lib/initcpio/install/ide
#lib/initcpio/install/modload
#lib/initcpio/install/net
#lib/initcpio/install/pata
#lib/initcpio/install/pcmcia
#lib/initcpio/install/raid
#lib/initcpio/install/resume
#lib/initcpio/install/sata
#lib/initcpio/install/scsi
#lib/initcpio/install/usb
#lib/initcpio/install/usbinput
sbin/mkinitcpio
etc/mkinitcpio.conf
etc/mkinitcpio.d
#etc/mkinitcpio.d/example.preset
lib/initcpio
#lib/initcpio/functions
#lib/initcpio/hooks
#lib/initcpio/hooks/filesystems
#lib/initcpio/hooks/fw
#lib/initcpio/hooks/modload
#lib/initcpio/hooks/raid
#lib/initcpio/hooks/resume
#lib/initcpio/hooks/usb
#lib/initcpio/init
#lib/initcpio/install
#lib/initcpio/install/autodetect
#lib/initcpio/install/base
#lib/initcpio/install/dsdt
#lib/initcpio/install/filesystems
#lib/initcpio/install/firmware
#lib/initcpio/install/fw
#lib/initcpio/install/ide
#lib/initcpio/install/modload
#lib/initcpio/install/net
#lib/initcpio/install/pata
#lib/initcpio/install/pcmcia
#lib/initcpio/install/raid
#lib/initcpio/install/resume
#lib/initcpio/install/sata
#lib/initcpio/install/scsi
#lib/initcpio/install/usb
#lib/initcpio/install/usbinput
sbin/mkinitcpio

View File

@@ -57,3 +57,14 @@ usr/sbin/udevmonitor
#usr/share/man/man8/udevtest.8
#usr/share/man/man8/udevtrigger.8
#usr/share/man/man8/vol_id.8
lib/initcpio/hooks/udev
lib/initcpio/install/udev
#lib/initcpio/udev
lib/initcpio/udev/cdrom_id
lib/initcpio/udev/firmware.sh
lib/initcpio/udev/load-modules.sh
lib/initcpio/udev/start_udev
lib/initcpio/udev/udev.rules
lib/initcpio/udev/udevd
lib/initcpio/udev/udevsettle
lib/initcpio/udev/udevtrigger

View File

@@ -59,6 +59,7 @@ WARNING: translation string unused: cache management
WARNING: translation string unused: cache size
WARNING: translation string unused: cached memory
WARNING: translation string unused: calamaris report interval (in minutes)
WARNING: translation string unused: capsinactive
WARNING: translation string unused: cfg restart
WARNING: translation string unused: choose config
WARNING: translation string unused: clear cache

View File

@@ -75,6 +75,7 @@ WARNING: translation string unused: cache management
WARNING: translation string unused: cache size
WARNING: translation string unused: cached memory
WARNING: translation string unused: calamaris report interval (in minutes)
WARNING: translation string unused: capsinactive
WARNING: translation string unused: cfg restart
WARNING: translation string unused: choose config
WARNING: translation string unused: choose media

View File

@@ -108,7 +108,7 @@
* hdparm-6.6
* htop-0.6.2
* httpd-2.2.2
* hwdata-0.191
* hwdata
* iana-etc-2.10
* ibod
* iftop-0.17
@@ -125,6 +125,7 @@
* java-1.5.0_06-for-ipfire
* jpegsrc.v6b
* kbd-1.12
* klibc-1.5
* kudzu-1.2.64
* l7-protocols-2006-09-10
* lame-3.96.1
@@ -163,6 +164,7 @@
* mc-4.6.1
* memtest86+-1.65
* misc-progs
* mkinitcpio-0.5.9
* mktemp-1.5
* mldonkey-2.7.7
* module-init-tools-3.2.2
@@ -242,6 +244,7 @@
* uClibc-0.9.28-pass2
* uClibc-0.9.28-pass3
* udev-096
* udev-096-klibc
* unzip552
* util-linux-2.12r
* vim-7.0

View File

@@ -55,7 +55,7 @@ download :$(patsubst %,$(DIR_DL)/%,$(objects))
md5 : $(subst %,%_MD5,$(objects))
dist:
@$(PAK)
$(PAK)
###############################################################################
# Downloading, checking, md5sum

View File

@@ -26,50 +26,28 @@
include Config
VER = 0.191
VER = ipfire
THISAPP = hwdata-$(VER)
DL_FILE = hwdata-$(VER).tar.gz
DL_FROM = $(URL_IPFIRE)
DIR_APP = $(DIR_SRC)/$(THISAPP)
THISAPP = hwdata
ifeq "$(LFS_PASS)" "install"
TARGET = $(DIR_INFO)/$(THISAPP)-install
else
TARGET = $(DIR_INFO)/$(THISAPP)
endif
FILES = MonitorsDB pci.ids upgradelist usb.ids videodrivers
###############################################################################
# Top-level Rules
###############################################################################
objects = $(DL_FILE)
$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
$(DL_FILE)_MD5 = 7a261b9eb813406f73b5eca2570f949a
objects =
install : $(TARGET)
check : $(patsubst %,$(DIR_CHK)/%,$(objects))
check :
download :$(patsubst %,$(DIR_DL)/%,$(objects))
download :
md5 : $(subst %,%_MD5,$(objects))
###############################################################################
# Downloading, checking, md5sum
###############################################################################
$(patsubst %,$(DIR_CHK)/%,$(objects)) :
@$(CHECK)
$(patsubst %,$(DIR_DL)/%,$(objects)) :
@$(LOAD)
$(subst %,%_MD5,$(objects)) :
@$(MD5)
md5 :
###############################################################################
# Installation Details
@@ -77,13 +55,11 @@ $(subst %,%_MD5,$(objects)) :
$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
@$(PREBUILD)
@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
ifeq "$(LFS_PASS)" "install"
-mkdir -p -m 755 /install/initrd/usr/share/hwdata
cd $(DIR_APP) && for foo in $(FILES) ; do install -m 644 $$foo /install/initrd/usr/share/hwdata ; done
install -m 644 $(DIR_SRC)/src/hwdata/*.ids /install/initrd/usr/share/hwdata
else
-mkdir -p -m 755 /usr/share/hwdata
cd $(DIR_APP) && for foo in $(FILES) ; do install -m 644 $$foo /usr/share/hwdata ; done
install -m 644 $(DIR_SRC)/src/hwdata/*.ids /usr/share/hwdata
endif
@rm -rf $(DIR_APP)
@$(POSTBUILD)

View File

@@ -72,37 +72,18 @@ $(TARGET) :
depmod -a -F /boot/System.map-$(KVER)-ipfire $(KVER)-ipfire
depmod -a -F /boot/System.map-$(KVER)-ipfire-smp $(KVER)-ipfire-smp
cd / && tar -cvf /tmp/drivers.tar \
cd / && tar -cf /tmp/drivers.tar \
--exclude=lib/modules/$(KVER)-ipfire/kernel/{arch,crypto} \
--exclude=lib/modules/$(KVER)-ipfire/kernel/drivers/{acpi,atm,bluetooth,block,char,cdrom,connector,cpufreq,hwmon,ide} \
--exclude=lib/modules/$(KVER)-ipfire/kernel/drivers/{ieee1394,isdn,mmc,md,parport,video} \
--exclude=lib/modules/$(KVER)-ipfire/kernel/drivers/{acpi,atm,bluetooth,block,char,connector,cpufreq,crypto,hwmon} \
--exclude=lib/modules/$(KVER)-ipfire/kernel/drivers/{ieee1394,mmc,md,parport,video} \
--exclude=lib/modules/$(KVER)-ipfire/kernel/drivers/net/{wan,ppp*,slip*,slhc*,tun*,wireless} \
--exclude=lib/modules/$(KVER)-ipfire/kernel/drivers/usb/{atm,input,storage,host} \
--exclude=lib/modules/$(KVER)-ipfire/kernel/drivers/usb/{3cp4218.ko,acm.ko,amedyn.ko,cxacru.ko} \
--exclude=lib/modules/$(KVER)-ipfire/kernel/drivers/usb/{speedtch.ko,hid.ko,usbcore.ko,at76c50*.ko} \
--exclude=lib/modules/$(KVER)-ipfire/kernel/net/{8021q,atm,bluetooth,bridge,ieee80211,ipsec,ipv4} \
--exclude=lib/modules/$(KVER)-ipfire/kernel/net/{wanrouter,netfilter,sched} \
--exclude=lib/modules/$(KVER)-ipfire/kernel/fs/{jfs,nfs*,xfs,udf,fuse} \
--exclude=lib/modules/$(KVER)-ipfire/kernel/drivers/usb/atm \
--exclude=lib/modules/$(KVER)-ipfire/kernel/net \
--exclude=lib/modules/$(KVER)-ipfire/{build,extra,misc,modules.*,source} \
lib/modules/$(KVER)-ipfire
cd /install/initrd/ && tar -xvf /tmp/drivers.tar && rm -f /tmp/drivers.tar
# Extra modules
-mkdir -p /install/initrd/lib/modules/$(KVER)-ipfire/kernel/drivers/usb/storage
cp -f /lib/modules/$(KVER)-ipfire/kernel/drivers/usb/storage/*.ko \
/install/initrd/lib/modules/$(KVER)-ipfire/kernel/drivers/usb/storage/
-mkdir -p /install/initrd/lib/modules/$(KVER)-ipfire/kernel/drivers/usb/host
cp -f /lib/modules/$(KVER)-ipfire/kernel/drivers/usb/host/*.ko \
/install/initrd/lib/modules/$(KVER)-ipfire/kernel/drivers/usb/host
-mkdir -p /install/initrd/lib/modules/$(KVER)-ipfire/kernel/drivers/usb/input
cp -f /lib/modules/$(KVER)-ipfire/kernel/drivers/usb/input/usbhid.ko \
/install/initrd/lib/modules/$(KVER)-ipfire/kernel/drivers/usb/input
-mkdir -p /install/initrd/lib/modules/$(KVER)-ipfire/kernel/drivers/usb/core
cp -f /lib/modules/$(KVER)-ipfire/kernel/drivers/usb/core/*.ko \
/install/initrd/lib/modules/$(KVER)-ipfire/kernel/drivers/usb/core
cp -f /lib/modules/$(KVER)-ipfire/modules.* /install/initrd/lib/modules/$(KVER)-ipfire
cp /opt/$(MACHINE)-uClibc/lib/libgcc_s.so.1 /install/initrd/lib/

View File

@@ -62,6 +62,6 @@ $(TARGET) :
-DNAME='\"$(NAME)\"' -DSNAME='\"$(SNAME)\"' -DVERSION='\"$(VERSION)\"' \
-DSLOGAN='\"$(SLOGAN)\"' -DCONFIG_ROOT='\"$(CONFIG_ROOT)\"' -DKERNEL_VERSION='\"$(KVER)\"'"
cd $(DIR_APP)/install && install -v -m 0755 install probenic.sh \
probecntrl.sh probehw.sh installbootsplash.sh mountsource.sh /install/initrd/bin
probecntrl.sh probehw.sh installbootsplash.sh mountsource.sh mountdest.sh /install/initrd/bin
@rm -rf $(DIR_APP)
@$(POSTBUILD)

89
lfs/klibc Normal file
View File

@@ -0,0 +1,89 @@
###############################################################################
# This file is part of the IPCop Firewall. #
# #
# IPCop is free software; you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
# the Free Software Foundation; either version 2 of the License, or #
# (at your option) any later version. #
# #
# IPCop is distributed in the hope that it will be useful, #
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
# GNU General Public License for more details. #
# #
# You should have received a copy of the GNU General Public License #
# along with IPCop; if not, write to the Free Software #
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #
# #
# Makefiles are based on LFSMake, which is #
# Copyright (C) 2002 Rod Roard <rod@sunsetsystems.com> #
# #
###############################################################################
###############################################################################
# Definitions
###############################################################################
include Config
VER = 1.5
THISAPP = klibc-$(VER)
DL_FILE = $(THISAPP).tar.gz
DL_FROM = $(URL_IPFIRE)
DIR_APP = $(DIR_SRC)/$(THISAPP)
TARGET = $(DIR_INFO)/$(THISAPP)
###############################################################################
# Top-level Rules
###############################################################################
objects = $(DL_FILE) \
klibc-extras-2.2.tar.gz
$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
klibc-extras-2.2.tar.gz = $(DL_FROM)/klibc-extras-2.2.tar.gz
$(DL_FILE)_MD5 = d55ce89c0656a7d6896ec0b2af07b5dc
klibc-extras-2.2.tar.gz_MD5 = 7e5042978531048c369f59ca1a13055b
install : $(TARGET)
check : $(patsubst %,$(DIR_CHK)/%,$(objects))
download :$(patsubst %,$(DIR_DL)/%,$(objects))
md5 : $(subst %,%_MD5,$(objects))
###############################################################################
# Downloading, checking, md5sum
###############################################################################
$(patsubst %,$(DIR_CHK)/%,$(objects)) :
@$(CHECK)
$(patsubst %,$(DIR_DL)/%,$(objects)) :
@$(LOAD)
$(subst %,%_MD5,$(objects)) :
@$(MD5)
###############################################################################
# Installation Details
###############################################################################
$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
@$(PREBUILD)
@rm -rf $(DIR_APP) $(DIR_SRC)/klibc* && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE) && \
tar zxf $(DIR_DL)/klibc-extras-2.2.tar.gz
cd $(DIR_APP) && ln -fs ../linux linux
cd $(DIR_SRC)/klibc-extras && sed -i "s|^INSTALL = .*|INSTALL = /usr/bin/install -c -m 755|g" Makefile
cd $(DIR_APP) && make
cd $(DIR_APP) && make install
cd $(DIR_SRC)/klibc-extras && make
cd $(DIR_SRC)/klibc-extras && make install
ln -sf sh.shared /usr/lib/klibc/bin/sh
mv /lib/klibc-*.so /lib/klibc-pFXBYGYRiBAAryaZ7Zw_ISKpcTk.so
mv /usr/lib/klibc/lib/klibc-*.so /usr/lib/klibc/lib/klibc-pFXBYGYRiBAAryaZ7Zw_ISKpcTk.so
@rm -rf $(DIR_APP) $(DIR_SRC)/klibc*
@$(POSTBUILD)

View File

@@ -81,8 +81,8 @@ ifeq "$(LFS_PASS)" "install"
cd $(DIR_APP) && make RPM_OPT_FLAGS="-O2 -I/opt/$(MACHINE)-uClibc/include" \
ARCH=$(MACHINE)
cd $(DIR_APP) && install -m 0755 kudzu /install/initrd/bin/kudzu
cd $(DIR_APP) && install -m 0644 libkudzu.a /install/initrd/lib
cd $(DIR_APP) && install -m 0644 libkudzu_loader.a /install/initrd/lib
#cd $(DIR_APP) && install -m 0644 libkudzu.a /install/initrd/lib
#cd $(DIR_APP) && install -m 0644 libkudzu_loader.a /install/initrd/lib
else
rm -rf /usr/sbin/kudzu
cd $(DIR_APP) && ARCH=$(MACHINE) RPM_OPT_FLAGS="$(CFLAGS)" make

View File

@@ -204,5 +204,10 @@ endif
# remove symlinked pcmcia directory
-rm -rf /lib/modules/$(VER)-ipfire{,-smp}/pcmcia
ifeq "$(SMP)" ""
# Only do this once on the non-SMP pass
$(DIR_APP) && install -m 755 usr/gen_init_cpio /sbin/
endif
@rm -rf $(DIR_SRC)/patch-o-matic* $(DIR_SRC)/iptables* $(DIR_SRC)/squashfs* $(DIR_SRC)/mISDN-* $(DIR_SRC)/netfilter-layer7-*
@$(POSTBUILD)

78
lfs/mkinitcpio Normal file
View File

@@ -0,0 +1,78 @@
###############################################################################
# This file is part of the IPCop Firewall. #
# #
# IPCop is free software; you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
# the Free Software Foundation; either version 2 of the License, or #
# (at your option) any later version. #
# #
# IPCop is distributed in the hope that it will be useful, #
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
# GNU General Public License for more details. #
# #
# You should have received a copy of the GNU General Public License #
# along with IPCop; if not, write to the Free Software #
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #
# #
# Makefiles are based on LFSMake, which is #
# Copyright (C) 2002 Rod Roard <rod@sunsetsystems.com> #
# #
###############################################################################
###############################################################################
# Definitions
###############################################################################
include Config
VER = 0.5.9
THISAPP = mkinitcpio-$(VER)
DL_FILE = $(THISAPP).tar.gz
DL_FROM = $(URL_IPFIRE)
DIR_APP = $(DIR_SRC)/mkinitcpio
TARGET = $(DIR_INFO)/$(THISAPP)
###############################################################################
# Top-level Rules
###############################################################################
objects = $(DL_FILE)
$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
$(DL_FILE)_MD5 = a80ca2af36962eaf85a7861ddfd4eea7
install : $(TARGET)
check : $(patsubst %,$(DIR_CHK)/%,$(objects))
download :$(patsubst %,$(DIR_DL)/%,$(objects))
md5 : $(subst %,%_MD5,$(objects))
###############################################################################
# Downloading, checking, md5sum
###############################################################################
$(patsubst %,$(DIR_CHK)/%,$(objects)) :
@$(CHECK)
$(patsubst %,$(DIR_DL)/%,$(objects)) :
@$(LOAD)
$(subst %,%_MD5,$(objects)) :
@$(MD5)
###############################################################################
# Installation Details
###############################################################################
$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
@$(PREBUILD)
@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
cd $(DIR_APP) && ./install.sh ""
sed -i 's|^FILELIST=.*|FILELIST="$$(mktemp)"|g' /sbin/mkinitcpio
@rm -rf $(DIR_APP)
@$(POSTBUILD)

View File

@@ -77,7 +77,7 @@ $(subst %,%_MD5,$(objects)) :
$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
@$(PREBUILD)
@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
@rm -rf $(DIR_APP) $(DIR_SRC)/snort* && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
cd $(DIR_APP) && ./configure --prefix=/usr --disable-nls \
--sysconfdir=/etc/snort \
--enable-linux-smp-stats --enable-smb-alerts
@@ -95,5 +95,5 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
chown -R nobody:nobody /etc/snort
-mkdir -p /var/log/snort
chown -R snort:snort /var/log/snort
@rm -rf $(DIR_APP)
@rm -rf $(DIR_APP) $(DIR_SRC)/snort*
@$(POSTBUILD)

View File

@@ -105,8 +105,8 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
cp -f $(DIR_SRC)/config/updxlrator/updxlrator /usr/sbin/updxlrator
cp -f $(DIR_SRC)/config/updxlrator/checkup /var/ipfire/updatexlrator/bin/checkup
cp -f $(DIR_SRC)/config/updxlrator/download /var/ipfire/updatexlrator/bin/download
mkdir -p /usr/lib/squid/errors.ipfire
cp -f $(DIR_SRC)/config/proxy/errors.ipfire/ /usr/lib/squid/errors.ipfire/
-mkdir -p /usr/lib/squid/errors.ipfire
cp -fr $(DIR_SRC)/config/proxy/errors.ipfire/* /usr/lib/squid/errors.ipfire/
chmod 755 /usr/sbin/updxlrator /var/ipfire/updatexlrator/bin/checkup \
/var/ipfire/updatexlrator/bin/download
@@ -123,6 +123,5 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
chmod 775 /srv/web/ipfire/html/updatecache/metadata
chmod 755 /var/log/updatexlrator
@rm -rf $(DIR_APP)
@$(POSTBUILD)

View File

@@ -57,7 +57,7 @@ download :$(patsubst %,$(DIR_DL)/%,$(objects))
md5 : $(subst %,%_MD5,$(objects))
dist:
@$(PAK)
$(PAK)
###############################################################################
# Downloading, checking, md5sum

View File

@@ -34,9 +34,13 @@ DL_FROM = $(URL_IPFIRE)
DIR_APP = $(DIR_SRC)/$(THISAPP)
ifeq "$(LFS_PASS)" "install"
TARGET = $(DIR_INFO)/$(THISAPP)-install
else
ifeq "$(KLIBC)" "1"
TARGET = $(DIR_INFO)/$(THISAPP)-klibc
else
TARGET = $(DIR_INFO)/$(THISAPP)
endif
endif
###############################################################################
# Top-level Rules
@@ -82,7 +86,7 @@ ifeq "$(LFS_PASS)" "install"
cd $(DIR_APP) && make DESTDIR=/install/initrd sbindir=/sbin udevdir=/dev
cd $(DIR_APP) && make DESTDIR=/install/initrd sbindir=/sbin udevdir=/dev install
rm -f /install/initrd/sbin/udev* /install/initrd/usr/sbin/udev* /install/initrd/usr/bin/udev*
cd $(DIR_APP) && install udevstart udevinfo /install/initrd/sbin
cd $(DIR_APP) && install udevstart udevinfo udevd udevsettle udevtrigger /install/initrd/sbin
cd /install/initrd/usr/share && rm -rf man
cd /install/initrd/dev && rm -f console
cd /install/initrd/dev && mknod -m 0600 console c 5 1
@@ -95,6 +99,27 @@ ifeq "$(LFS_PASS)" "install"
cd /install/initrd/dev && mknod -m 0600 tty4 c 4 4
cd /install/initrd/dev && mknod -m 0600 tty5 c 4 5
cd /install/initrd/dev && mknod -m 0600 tty6 c 4 6
else
ifeq "$(KLIBC)" "1"
cd $(DIR_APP) && sed -i "s|USE_LOG = .*|USE_LOG = false|g" Makefile
cd $(DIR_APP) && sed -i "s|USE_KLIBC = .*|USE_KLIBC = true|g" Makefile
cd $(DIR_APP) && make PROGRAMS="udevd udevsettle udevtrigger" EXTRAS="extras/firmware extras/cdrom_id"
-mkdir -p /lib/initcpio/udev
-mkdir -p /lib/initcpio/install
-mkdir -p /lib/initcpio/hooks
cd $(DIR_APP) && install -m755 udevd /lib/initcpio/udev
cd $(DIR_APP) && install -m755 udevtrigger /lib/initcpio/udev
cd $(DIR_APP) && install -m755 udevsettle /lib/initcpio/udev
cd $(DIR_APP) && install -m755 extras/firmware/firmware.sh /lib/initcpio/udev
cd $(DIR_APP) && install -m755 extras/cdrom_id/cdrom_id /lib/initcpio/udev
install -m755 $(DIR_SRC)/config/mkinitcpio/start_udev /lib/initcpio/udev
install -m644 $(DIR_SRC)/config/mkinitcpio/udev.rules /lib/initcpio/udev
install -m755 $(DIR_SRC)/config/mkinitcpio/load-modules.sh /lib/initcpio/udev
install -m644 $(DIR_SRC)/config/mkinitcpio/udev_install /lib/initcpio/install/udev
install -m644 $(DIR_SRC)/config/mkinitcpio/udev_hook /lib/initcpio/hooks/udev
else
cd $(DIR_APP) && tar jxf $(DIR_DL)/udev-config-6.2.tar.bz2
install -dv /lib/{firmware,udev/devices/{pts,shm}}
@@ -112,6 +137,7 @@ else
extras/scsi_id extras/usb_id extras/volume_id" install
cd $(DIR_APP) && cp -v udev-config-6.2/[0-9]* /etc/udev/rules.d/
touch /etc/udev/rules.d/30-persistent-network.rules
endif
endif
@rm -rf $(DIR_APP)
@$(POSTBUILD)

View File

@@ -350,6 +350,9 @@ buildipfire() {
ipfiremake fuse
ipfiremake pkg-config
ipfiremake cpio
ipfiremake klibc
ipfiremake mkinitcpio
ipfiremake udev KLIBC=1
ipfiremake expat
ipfiremake gdbm
ipfiremake gmp

13662
src/hwdata/pci.ids Normal file

File diff suppressed because it is too large Load Diff

5970
src/hwdata/usb.ids Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -11,6 +11,15 @@
#include "install.h"
int initialize_ide() {
mysystem("/sbin/modprobe ide-generic");
mysystem("/sbin/modprobe generic");
mysystem("/sbin/modprobe ide-cd");
mysystem("/sbin/modprobe ide-disk");
return 0;
}
/* checkide(). Scans the named drive letter and returns the IDE_??? type. */
int checkide(char letter)
{

View File

@@ -27,6 +27,7 @@ struct devparams
};
/* ide.c */
int initialize_ide();
int checkide(char letter);
char findidetype(int type);

View File

@@ -73,6 +73,9 @@ int main(int argc, char *argv[])
char *installtypes[] = { "CDROM/USB", "HTTP/FTP", NULL };
int installtype = CDROM_INSTALL;
int choice;
int i;
int found = 0;
int firstrun = 0;
char shortlangname[10];
char message[1000];
char title[STRING_SIZE];
@@ -120,6 +123,12 @@ int main(int argc, char *argv[])
fprintf(flog, "Couldn't open commandline: /proc/cmdline\n");
} else {
fgets(line, STRING_SIZE, cmdfile);
if (strstr (line, "noide") == NULL) {
fprintf(flog, "Initializing IDE controllers.\n");
initialize_ide();
} else {
fprintf(flog, "Skipping IDE detection.\n");
}
if (strstr (line, "nousb") == NULL) {
fprintf(flog, "Initializing USB controllers.\n");
initialize_usb();
@@ -127,9 +136,11 @@ int main(int argc, char *argv[])
fprintf(flog, "Skipping USB detection.\n");
}
// check if we have to make an unattended install
if (strstr (line, "unattended") != NULL) {
if (strstr (line, "unattended") != NULL) {
unattended = 1;
}
// Loading the cdrom-filesystem
mysystem("/sbin/modprobe iso9660");
}
if (unattended) {
@@ -202,9 +213,6 @@ int main(int argc, char *argv[])
fgets(sourcedrive, 5, handle);
fprintf(flog, "Source drive: %s\n", sourcedrive);
fclose(handle);
//snprintf(cdromparams.devnode_disk, STRING_SIZE, "/dev/%s", sourcedrive);
fprintf(flog, "Source device: %s\n", sourcedrive);
}
/* Configure the network now! */
@@ -221,17 +229,56 @@ int main(int argc, char *argv[])
goto EXIT;
}
}
// Now try to find destination device...
if ((hdletter = findidetype(IDE_HD))) {
sprintf(harddrive, "hd%c", hdletter);
goto FOUND_DESTINATION;
}
/* Need to clean this up at some point
scsi disk is sdb/sdc when sda/sdb is used for usb-key
if scsi-disk is sdd or more, it is not discovered
Support only 2 usb keys, none could be unplugged */
i = 0;
while (found == 0) {
i++;
fprintf(flog, "Harddisk scan pass %i\n", i);
rc = mysystem("/bin/mountdest.sh");
fprintf(flog, "RC %d\n", rc);
if (rc == 0) { // Found IDE disk
scsi_disk = 0;
found = 1;
} else if (rc == 1) { // Found SCSI/USB/SATA disk
scsi_disk = 1;
found = 1;
} else { // No harddisk found
if (firstrun == 1) {
errorbox(ctr[TR_NO_HARDDISK]);
goto EXIT;
}
// Do this if the kudzu-scan fails...
runcommandwithstatus("/bin/probehw.sh deep-scan", ctr[TR_PROBING_HARDWARE]);
firstrun = 1;
}
/* switch (mysystem("/bin/mountdest.sh")) {
case 0: // Found IDE disk
scsi_disk = 0;
found = 1;
break;
case 1: // Found SCSI disk
scsi_disk = 1;
found = 1;
break;
case 10: // No harddisk found
if (firstrun == 1) {
errorbox(ctr[TR_NO_HARDDISK]);
goto EXIT;
}
// Do this if the kudzu-scan fails...
runcommandwithstatus("/bin/probehw.sh deep-scan", ctr[TR_PROBING_HARDWARE]);
firstrun = 1;
} */
}
/*
// Need to clean this up at some point
// scsi disk is sdb/sdc when sda/sdb is used for usb-key
// if scsi-disk is sdd or more, it is not discovered
// Support only 2 usb keys, none could be unplugged
if (checkusb("sdb") && try_scsi("sdc")) {
scsi_disk = 1;
sprintf(harddrive, "sdc");
@@ -266,12 +313,16 @@ int main(int argc, char *argv[])
raid_disk = 1;
sprintf(harddrive, "ataraid/d0");
goto FOUND_DESTINATION;
}
/* nothing worked, give up */
errorbox(ctr[TR_NO_HARDDISK]);
goto EXIT;
} */
FOUND_DESTINATION:
if ((handle = fopen("/tmp/dest_device", "r")) == NULL) {
errorbox(ctr[TR_NO_HARDDISK]);
goto EXIT;
}
fgets(harddrive, 5, handle);
fclose(handle);
/* load unattended configuration */
if (unattended) {
fprintf(flog, "unattended: Reading unattended.conf\n");
@@ -443,6 +494,7 @@ int main(int argc, char *argv[])
}
/* Mount harddisk. */
mysystem("/sbin/modprobe reiserfs"); // to be banished...
snprintf(commandstring, STRING_SIZE, "/bin/mount %s3 /harddisk", hdparams.devnode_part);
if (runcommandwithstatus(commandstring, ctr[TR_MOUNTING_ROOT_FILESYSTEM]))
@@ -514,8 +566,9 @@ int main(int argc, char *argv[])
/* mount proc filesystem */
mysystem("mkdir /harddisk/proc");
mysystem("/bin/mount -t proc none /harddisk/proc");
mysystem("/bin/mount --bind /dev /harddisk/dev");
mysystem("/bin/mount --bind /proc /harddisk/proc");
mysystem("/bin/mount --bind /dev /harddisk/dev");
mysystem("/bin/mount --bind /sys /harddisk/sys");
/* Build cache lang file */
snprintf(commandstring, STRING_SIZE, "/sbin/chroot /harddisk /usr/bin/perl -e \"require '" CONFIG_ROOT "/lang.pl'; &Lang::BuildCacheLang\"");
@@ -528,25 +581,11 @@ int main(int argc, char *argv[])
/* Update /etc/fstab */
replace("/harddisk/etc/fstab", "DEVICE", hdparams.devnode_part_run);
/* if we detected SCSI/USB then fixup */
/* mysystem("/bin/probecntrl.sh");
if ((handle = fopen("/tmp/cntrldriver", "r")))
{
char *driver;
fgets(line, STRING_SIZE-1, handle);
fclose(handle);
line[strlen(line) - 1] = 0;
driver = strtok(line, ".");
if (strlen(driver) > 1) {
fprintf(flog, "Fixing up ipfirerd.img\n");
mkdir("/harddisk/initrd", S_IRWXU|S_IRWXG|S_IRWXO);
snprintf(commandstring, STRING_SIZE, "/sbin/chroot /harddisk /sbin/mkinitrd --with=scsi_mod %s --with=sd_mod --with=sr_mod /boot/ipfirerd.img %s-ipfire", driver, KERNEL_VERSION);
runcommandwithstatus(commandstring, ctr[TR_BUILDING_INITRD]);
snprintf(commandstring, STRING_SIZE, "/sbin/chroot /harddisk /sbin/mkinitrd --with=scsi_mod %s --with=sd_mod --with=sr_mod /boot/ipfirerd-smp.img %s-ipfire-smp", driver, KERNEL_VERSION);
runcommandwithstatus(commandstring, ctr[TR_BUILDING_INITRD]);
mysystem("/sbin/chroot /harddisk /bin/mv /boot/grub/scsigrub.conf /boot/grub/grub.conf");
}
} */
/* Going to make our initrd... */
snprintf(commandstring, STRING_SIZE, "/sbin/chroot /harddisk /sbin/mkinitcpio -v -g /boot/ipfirerd.img -k %s-ipfire", KERNEL_VERSION);
runcommandwithstatus(commandstring, ctr[TR_BUILDING_INITRD]);
snprintf(commandstring, STRING_SIZE, "/sbin/chroot /harddisk /sbin/mkinitcpio -v -g /boot/ipfirerd-smp.img -k %s-smp-ipfire", KERNEL_VERSION);
runcommandwithstatus(commandstring, ctr[TR_BUILDING_INITRD]);
sprintf(string, "root=%s3", hdparams.devnode_part_run);
replace( "/harddisk/boot/grub/grub.conf", "root=ROOT", string);
@@ -563,11 +602,9 @@ int main(int argc, char *argv[])
}
/* Install bootsplash */
mysystem("/bin/installbootsplash.sh");
// mysystem("/bin/installbootsplash.sh"); We cannot use this at the moment, it conflicts with our initrds...
mysystem("ln -s grub.conf /harddisk/boot/grub/menu.lst");
// mysystem("umount /harddisk/proc");
// mysystem("umount /harddisk/dev");
if (!unattended) {
sprintf(message, ctr[TR_CONGRATULATIONS_LONG],
@@ -580,8 +617,6 @@ int main(int argc, char *argv[])
EXIT:
fprintf(flog, "Install program ended.\n");
if (!(allok))
newtWinMessage(title, ctr[TR_OK], ctr[TR_PRESS_OK_TO_REBOOT]);
@@ -589,39 +624,32 @@ EXIT:
if (allok && !allok_fastexit)
{
/* /proc is needed by the module checker. We have to mount it
* so it can be seen by setup, which is run chrooted. */
// if (system("/bin/mount proc -t proc /harddisk/proc"))
// printf("Unable to mount proc in /harddisk.");
// else
// {
if (unattended) {
fprintf(flog, "Entering unattended setup\n");
if (unattended_setup(unattendedkv)) {
if (unattended) {
fprintf(flog, "Entering unattended setup\n");
if (unattended_setup(unattendedkv)) {
snprintf(commandstring, STRING_SIZE, "/bin/sleep 10");
runcommandwithstatus(commandstring, "Unattended installation finished, system will reboot");
} else {
} else {
errorbox("Unattended setup failed.");
goto EXIT;
}
}
}
fflush(flog);
fclose(flog);
newtFinished();
fflush(flog);
fclose(flog);
newtFinished();
if (!unattended) {
// Copy our scanned nics to the disk and lock because scan doesn't work in chroot
system("touch /harddisk/var/ipfire/ethernet/scan_lock");
system("cp -f /tmp/scanned_nics /harddisk/var/ipfire/ethernet/scanned_nics");
if (system("/sbin/chroot /harddisk /usr/local/sbin/setup /dev/tty2 INSTALL"))
printf("Unable to run setup.\n");
system("rm -f /harddisk/var/ipfire/ethernet/scan_lock");
}
if (!unattended) {
// Copy our scanned nics to the disk and lock because scan doesn't work in chroot
system("touch /harddisk/var/ipfire/ethernet/scan_lock");
system("cp -f /tmp/scanned_nics /harddisk/var/ipfire/ethernet/scanned_nics");
if (system("/sbin/chroot /harddisk /usr/local/sbin/setup /dev/tty2 INSTALL"))
printf("Unable to run setup.\n");
system("rm -f /harddisk/var/ipfire/ethernet/scan_lock");
}
if (system("/bin/umount /harddisk/proc"))
printf("Unable to umount /harddisk/proc.\n");
// }
if (system("/bin/umount /harddisk/proc"))
printf("Unable to umount /harddisk/proc.\n");
} else {
fflush(flog);
fclose(flog);
@@ -638,6 +666,7 @@ EXIT:
system("/bin/umount /harddisk/proc");
system("/bin/umount /harddisk/dev");
system("/bin/umount /harddisk/sys");
system("/bin/umount /harddisk/var");
system("/bin/umount /harddisk/boot");

View File

@@ -0,0 +1,39 @@
#!/bin/sh
echo "Scanning for possible destination drives"
# scan IDE devices
echo "--> IDE"
for DEVICE in $(kudzu -qps -t 30 -c HD -b IDE | grep device: | cut -d ' ' -f 2 | sort | uniq); do
echo -n "---> $DEVICE"
mount /dev/${DEVICE}1 /harddisk 2> /dev/null
if [ -e /harddisk/ipfire-*.tbz2 ]; then
umount /harddisk 2> /dev/null
echo " is source drive"
continue
else
umount /harddisk 2> /dev/null
echo -n "$DEVICE" > /tmp/dest_device
echo " - yes, it is our destination"
exit 0
fi
done
# scan USB/SCSI devices
echo "--> USB/SCSI"
for DEVICE in $(kudzu -qps -t 30 -c HD -b SCSI | grep device: | cut -d ' ' -f 2 | sort | uniq); do
echo -n "---> $DEVICE"
mount /dev/${DEVICE}1 /harddisk 2> /dev/null
if [ -e /harddisk/ipfire-*.tbz2 ]; then
umount /harddisk 2> /dev/null
echo " is source drive"
continue
else
umount /harddisk 2> /dev/null
echo -n "$DEVICE" > /tmp/dest_device
echo " - yes, it is our destination"
exit 1
fi
done
exit 10 # Nothing found

View File

@@ -3,22 +3,21 @@
echo "Scanning source media"
# scan CDROM devices
for DEVICE in $(kudzu -qps -t 30 -c CDROM | grep device: | cut -d ' ' -f 2 | sort | uniq); do
for DEVICE in $(kudzu -qps -t 30 -c CDROM | grep device: | cut -d ' ' -f 2 | sort | uniq); do
mount /dev/${DEVICE} /cdrom 2> /dev/null
if [ -e /cdrom/boot ]; then
echo -n ${DEVICE} > /tmp/source_device
exit 0
if [ -e /cdrom/ipfire-*.tbz2 ]; then
echo -n ${DEVICE} > /tmp/source_device
exit 0
fi
umount /cdrom 2> /dev/null
done
# scan HD device (usb sticks, etc.)
for DEVICE in $(kudzu -qps -t 30 -c HD | grep device: | cut -d ' ' -f 2 | sort | uniq); do
for DEVICE in $(kudzu -qps -t 30 -c HD | grep device: | cut -d ' ' -f 2 | sort | uniq); do
mount /dev/${DEVICE}1 /cdrom 2> /dev/null
if [ -e /cdrom/boot ]; then
echo -n ${DEVICE}1 > /tmp/source_device
exit 1
if [ -e /cdrom/ipfire-*.tbz2 ]; then
echo -n ${DEVICE}1 > /tmp/source_device
exit 1
fi
umount /cdrom 2> /dev/null
done

View File

@@ -1,7 +1,7 @@
#!/bin/sh
echo "Detecting Hardware"
for MODULE in $(kudzu -qps -t 30 | grep driver | cut -d ' ' -f 2 | sort | uniq); do
echo "Detecting Hardware..."
for MODULE in $(kudzu -qps -t 30 | grep driver: | cut -d ' ' -f 2 | sort | uniq); do
if [ "${MODULE}" = "unknown" ] || \
[ "${MODULE}" = "ignore" ]; then
continue
@@ -9,9 +9,42 @@ for MODULE in $(kudzu -qps -t 30 | grep driver | cut -d ' ' -f 2 | sort | uniq)
if grep -Eqe "^${MODULE} " /proc/modules; then
continue
fi
echo "Loading ${MODULE}"
modprobe -k ${MODULE}
udevstart
echo -n "Loading ${MODULE}"
modprobe ${MODULE} >/dev/null 2>&1
echo " --> ecode: $?"
done
if [ $# -eq 0 ]; then
exit 0
fi
## If the autodetection fails we will try to load every module...
## Do this only when we want...
for i in a b c d e f g; do
if [ ! -e /dev/sd$i ]; then
DEVICE="/dev/sd$i"
echo "Checking for: $DEVICE"
break
fi
done
for MODULE in $(ls /lib/modules/*/kernel/drivers/scsi); do
MODULE=`basename $MODULE | awk -F. '{ print $1 }'`
echo -n "Probing for $MODULE"
modprobe $MODULE >/dev/null 2>&1
RETVAL=$?
echo " --> ecode: $RETVAL"
if [ "$RETVAL" -eq "0" ]; then
sleep 3
if [ -e "$DEVICE" ]; then
break
fi
fi
done
sleep 5
exit 0

View File

@@ -52,7 +52,6 @@ int initialize_usb() {
usbuhci = 1;
mysystem("/sbin/modprobe usbhid");
mysystem("/sbin/udevstart");
return 0;
}