From: <ch...@us...> - 2007-11-14 18:07:45
|
Revision: 711 http://ipcop.svn.sourceforge.net/ipcop/?rev=711&view=rev Author: chepati Date: 2007-11-14 10:07:48 -0800 (Wed, 14 Nov 2007) Log Message: ----------- Renamed lfs/initrd lfs/initramfs to reflect the fact that we no longer use initrd and have switched to initramfs Modified Paths: -------------- ipcop/trunk/make.sh Added Paths: ----------- ipcop/trunk/lfs/initramfs Removed Paths: ------------- ipcop/trunk/lfs/initrd Copied: ipcop/trunk/lfs/initramfs (from rev 710, ipcop/trunk/lfs/initrd) =================================================================== --- ipcop/trunk/lfs/initramfs (rev 0) +++ ipcop/trunk/lfs/initramfs 2007-11-14 18:07:48 UTC (rev 711) @@ -0,0 +1,273 @@ +############################################################################### +# 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 <ro...@su...> # +# # +# Modifications by: # +# ??-12-2003 Mark Wormgoor < ma...@wo...> # +# - Modified Makefile for IPCop build # +# # +# $Id$ +# # +############################################################################### + +############################################################################### +# Definitions +############################################################################### + +include Config + +PKG_NAME = initrd +HOST_ARCH = all +OTHER_SRC = no + +THISAPP = initrd +DIR_APP = $(DIR_SRC)/$(THISAPP) +TARGET = $(DIR_INFO)/$(STAGE_ORDER)_$(STAGE)/$(THISAPP) + +############################################################################### +# Top-level Rules +############################################################################### + +install : $(TARGET) + +check : + +download : + +md5 : + +############################################################################### +# Installation Details +############################################################################### + +$(TARGET) : + # Make sure some directories exist + mkdir -p $(INSTALLER_DIR)/initrd/{usr,bin,lib,dev,etc,mnt,root,cdrom,dev,harddisk,proc,tmp,sys} + mkdir -p $(INSTALLER_DIR)/initrd/{usr/share/terminfo/l,usr/share/udhcpc,var/run} + ln -s /bin $(INSTALLER_DIR)/initrd/sbin + ln -s /bin $(INSTALLER_DIR)/initrd/usr/bin + ln -s /bin $(INSTALLER_DIR)/initrd/usr/sbin + ln -s /lib $(INSTALLER_DIR)/initrd/usr/lib + + # Install udevd, udevtrigger, udevsettle + install -D /sbin/udevd $(INSTALLER_DIR)/initrd/bin + install -D /sbin/udevsettle $(INSTALLER_DIR)/initrd/bin + install -D /sbin/udevtrigger $(INSTALLER_DIR)/initrd/bin + + # Copy some udev devices and helpers + cp -a /lib/udev $(INSTALLER_DIR)/initrd/lib/ + + # Copy the udev rules + cp -a /etc/udev $(INSTALLER_DIR)/initrd/etc/ + + # Copy /etc/group so udev doesn't complain about unknown groups + cp -a /etc/group $(INSTALLER_DIR)/initrd/etc/ + + # Install required libraries + install -c -D /lib/libc-2.5.1.so $(INSTALLER_DIR)/initrd/lib/libc-2.5.1.so + ln -sf libc-2.5.1.so $(INSTALLER_DIR)/initrd/lib/libc.so.6 + install -c -D /lib/libdl-2.5.1.so $(INSTALLER_DIR)/initrd/lib/libdl-2.5.1.so + ln -sf libdl-2.5.1.so $(INSTALLER_DIR)/initrd/lib/libdl.so.2 + install -c -D /lib/libnss_files-2.5.1.so $(INSTALLER_DIR)/initrd/lib/libnss_files-2.5.1.so + ln -sf libnss_files-2.5.1.so $(INSTALLER_DIR)/initrd/lib/libnss_files.so.2 + install -c -D /usr/lib/libncursesw.so.5.6 $(INSTALLER_DIR)/initrd/lib/libncursesw.so.5.6 + ln -sf libncursesw.so.5.6 $(INSTALLER_DIR)/initrd/lib/libncursesw.so + install -c -D /lib/ld-2.5.1.so $(INSTALLER_DIR)/initrd/lib/ld-2.5.1.so + ln -sf ld-2.5.1.so $(INSTALLER_DIR)/initrd/$(LINKER) + install -c -D /lib/libsysfs.so.1.0.3 $(INSTALLER_DIR)/initrd/lib/libsysfs.so.1.0.3 + ln -sf libsysfs.so.1.0.3 $(INSTALLER_DIR)/initrd/lib/libsysfs.so.1 + install -c -D /lib/libext2fs.so.2.4 $(INSTALLER_DIR)/initrd/lib/libext2fs.so.2.4 + ln -sf libext2fs.so.2.4 $(INSTALLER_DIR)/initrd/lib/libext2fs.so.2 + install -c -D /lib/libcom_err.so.2.1 $(INSTALLER_DIR)/initrd/lib/libcom_err.so.2.1 + ln -sf libcom_err.so.2.1 $(INSTALLER_DIR)/initrd/lib/libcom_err.so.2 + install -c -D /lib/libblkid.so.1.0 $(INSTALLER_DIR)/initrd/lib/libblkid.so.1.0 + ln -sf libblkid.so.1.0 $(INSTALLER_DIR)/initrd/lib/libblkid.so.1 + install -c -D /lib/libuuid.so.1.2 $(INSTALLER_DIR)/initrd/lib/libuuid.so.1.2 + ln -sf libuuid.so.1.2 $(INSTALLER_DIR)/initrd/lib/libuuid.so.1 + install -c -D /lib/libe2p.so.2.3 $(INSTALLER_DIR)/initrd/lib/libe2p.so.2.3 + ln -sf libe2p.so.2.3 $(INSTALLER_DIR)/initrd/lib/libe2p.so.2 + + # Install pccardctl, pcmcia-check-broken-cis, lspcmcia (from pcmciautils) + install -c -D /sbin/pccardctl $(INSTALLER_DIR)/initrd/bin/pccardctl + install -c -D /sbin/pcmcia-check-broken-cis $(INSTALLER_DIR)/initrd/bin/pcmcia-check-broken-cis + ln -sf pccardctl $(INSTALLER_DIR)/initrd/bin/lspcmcia + install -c -d $(INSTALLER_DIR)/initrd/etc/pcmcia + install -c -m 644 -D /etc/pcmcia/config.opts $(INSTALLER_DIR)/initrd/etc/pcmcia/config.opts + install -c -D /sbin/pcmcia-socket-startup $(INSTALLER_DIR)/initrd/bin/pcmcia-socket-startup + + # Install a few keyboard utilities (from kbd) + install -c -D /bin/kbd_mode $(INSTALLER_DIR)/initrd/bin/kbd_mode + install -c -D /bin/loadkeys $(INSTALLER_DIR)/initrd/bin/loadkeys + install -c -D /bin/setfont $(INSTALLER_DIR)/initrd/bin/setfont + install -c -D /usr/bin/dumpkeys $(INSTALLER_DIR)/initrd/bin/dumpkeys + install -c -D /usr/bin/loadunimap $(INSTALLER_DIR)/initrd/bin/loadunimap + install -c -D /usr/bin/showconsolefont $(INSTALLER_DIR)/initrd/bin/showconsolefont + install -c -D /usr/bin/unicode_start $(INSTALLER_DIR)/initrd/bin/unicode_start + install -c -D /usr/bin/unicode_stop $(INSTALLER_DIR)/initrd/bin/unicode_stop + mkdir -p $(INSTALLER_DIR)/initrd/usr/share/kbd/consolefonts + install -m 0644 /usr/share/kbd/consolefonts/lat0-16.psfu.gz \ + $(INSTALLER_DIR)/initrd/usr/share/kbd/consolefonts/lat0-16.psfu.gz + install -m 0644 /usr/share/kbd/consolefonts/lat1-16.psfu.gz \ + $(INSTALLER_DIR)/initrd/usr/share/kbd/consolefonts/lat1-16.psfu.gz + install -m 0644 /usr/share/kbd/consolefonts/lat2-16.psfu.gz \ + $(INSTALLER_DIR)/initrd/usr/share/kbd/consolefonts/lat2-16.psfu.gz + install -m 0644 /usr/share/kbd/consolefonts/lat5-16.psfu.gz \ + $(INSTALLER_DIR)/initrd/usr/share/kbd/consolefonts/lat5-16.psfu.gz + install -m 0644 /usr/share/kbd/consolefonts/iso07u-16.psfu.gz \ + $(INSTALLER_DIR)/initrd/usr/share/kbd/consolefonts/iso07u-16.psfu.gz + install -m 0644 /usr/share/kbd/consolefonts/viscii10-8x16.psfu.gz \ + $(INSTALLER_DIR)/initrd/usr/share/kbd/consolefonts/viscii10-8x16.psfu.gz + + # Install mke2fs (from e2fsprogs) + install -c -D /sbin/mke2fs $(INSTALLER_DIR)/initrd/bin/mke2fs + + # Install iowrap (from misc-progs) + install -c -D /usr/local/bin/iowrap $(INSTALLER_DIR)/initrd/bin/iowrap + + # Install parted and libparted (from parted) + install -c -D /usr/sbin/parted $(INSTALLER_DIR)/initrd/bin/parted + install -c -D /usr/lib/libparted-1.8.so.8.0.0 $(INSTALLER_DIR)/initrd/lib/libparted-1.8.so.8.0.0 + ln -sf libparted-1.8.so.8.0.0 $(INSTALLER_DIR)/initrd/lib/libparted-1.8.so.8 + + # Locale for installer + for i in $(DIR_SRC)/langs/*_* ; do \ + mkdir -p $(INSTALLER_DIR)/initrd/usr/share/locale/`basename $$i`/LC_MESSAGES; \ + msgfmt $$i/install.po -o $(INSTALLER_DIR)/initrd/usr/share/locale/`basename $$i`/LC_MESSAGES/install.mo; \ + done + + # Copy locale archive + mkdir -p $(INSTALLER_DIR)/initrd/lib/locale/ + cp -a /usr/lib/locale/locale-archive $(INSTALLER_DIR)/initrd/lib/locale/locale-archive + + # Copy over udhcp settings for busybox + install -m 0755 $(DIR_SRC)/config/busybox/default.script $(INSTALLER_DIR)/initrd/usr/share/udhcpc/default.script + + # Finish up initrd directory + cd $(INSTALLER_DIR)/initrd/etc && rm -f fstab + cp -aRf $(DIR_SRC)/config/install/* $(INSTALLER_DIR)/initrd/etc/ + cd $(INSTALLER_DIR)/initrd && mv etc/init . + rm -rf $(INSTALLER_DIR)/initrd/etc/.svn + rm -rf $(INSTALLER_DIR)/initrd/usr/share/man + cp -f /etc/issue $(INSTALLER_DIR)/initrd/etc/ + chmod 755 $(INSTALLER_DIR)/initrd/etc/halt $(INSTALLER_DIR)/initrd/etc/rc + cp -f /usr/share/terminfo/l/linux $(INSTALLER_DIR)/initrd/usr/share/terminfo/l + + # Extra modules + -rm -rf $(INSTALLER_DIR)/initrd/lib/modules + -mkdir -p $(INSTALLER_DIR)/initrd/lib/modules/$(KVER)/kernel/drivers/scsi + cp -f /lib/modules/$(KVER)/kernel/drivers/scsi/{sd_mod.ko,sr_mod.ko} \ + $(INSTALLER_DIR)/initrd/lib/modules/$(KVER)/kernel/drivers/scsi/ + + # File system + -mkdir -p $(INSTALLER_DIR)/initrd/lib/modules/$(KVER)/kernel/fs + cp -rf /lib/modules/$(KVER)/kernel/fs/* $(INSTALLER_DIR)/initrd/lib/modules/$(KVER)/kernel/fs + + # Copy modules.dep + cp -f /lib/modules/$(KVER)/modules.dep $(INSTALLER_DIR)/initrd/lib/modules/$(KVER) + + # Now that we have an almost complete initramfs directory structure (without the busybox binaries) + # copy it to /usr/lib/mkinitramfs so mkinitramfs will find it + # Start from scratch + rm -fr /usr/lib/mkinitramfs + mkdir -p /usr/lib/mkinitramfs + # Copy what we have created up till now in this script + cp -a $(INSTALLER_DIR)/initrd/* /usr/lib/mkinitramfs/ + # Remove all the modules from the directory structure -- we'll pick our own later, plus we don't want + # to end up with kernel <-> modules mismatch after a kernel upgrade + rm -fr /usr/lib/mkinitramfs/lib/modules + # The installer initramfs contains binaries we don't need in the bootstrap/rescue initramfs + rm -f /usr/lib/mkinitramfs/bin/* + # Now selectively copy the ones we need + for binary in mke2fs parted udevd udevsettle udevtrigger; do \ + cp -a $(INSTALLER_DIR)/initrd/bin/$$binary /usr/lib/mkinitramfs/bin/; \ + done + cp -a $(INSTALLER_DIR)/busybox/* /usr/lib/mkinitramfs/bin + + # Floppy initrd + -mkdir -p $(INSTALLER_DIR)/{images,mnt} + + # Copy over stuff we've already built (the installer, various supporting libs) + cp -aR $(INSTALLER_DIR)/initrd/* $(INSTALLER_DIR)/mnt + + # Now copy busybox + cp -a $(INSTALLER_DIR)/busybox/* $(INSTALLER_DIR)/mnt/bin/ + + # Make new dependencies + depmod -a -F /boot/System.map-$(KVER) $(KVER) + + # We do the stripping here because we don't want to destroy our development tree by stripping all symbols + # Instead we strip all binaries and libraries as we create the initrd. + # It's quite safe to do strip --strip-all on libraries if they will not be used for development. + cd $(INSTALLER_DIR)/mnt && find ./bin -maxdepth 1 -type f -exec $(TOOLS_DIR)/bin/strip --strip-all '{}' ';' + cd $(INSTALLER_DIR)/mnt && find ./lib -maxdepth 1 -type f -exec $(TOOLS_DIR)/bin/strip --strip-all '{}' ';' + + # Now create a cpio archive and call it root-VERSION.img + cd $(INSTALLER_DIR)/mnt && find . | cpio -o -H newc | gzip -9 > $(INSTALLER_DIR)/images/root-$(VERSION).img + + # Create a file list for root floppy + -rm $(DIR_INFO)/$(STAGE_ORDER)_$(STAGE)/root.list $(DIR_INFO)/$(STAGE_ORDER)_$(STAGE)/root-$(VERSION).img + cd $(INSTALLER_DIR)/mnt && find ./ -type d | sed 's!\./!!g' | sort > $(DIR_INFO)/$(STAGE_ORDER)_$(STAGE)/root.list + # we hide errors there listing empty directories + -cd $(INSTALLER_DIR)/mnt && \ + for dir in `cat $(DIR_INFO)/$(STAGE_ORDER)_$(STAGE)/root.list`; do \ + echo $$dir >> $(DIR_INFO)/$(STAGE_ORDER)_$(STAGE)/root-$(VERSION).img; \ + ls -s1 $$dir/* >> $(DIR_INFO)/$(STAGE_ORDER)_$(STAGE)/root-$(VERSION).img 2>/dev/null; \ + done + rm $(DIR_INFO)/$(STAGE_ORDER)_$(STAGE)/root.list + + # From this point on, we're building cdinitrd.img + +ifeq "$(MACHINE)" "sparc" + # Add firmwares on cdinitrd, only for sparc + # Copy over any binary firmware that may be needed by the installer. We also copy the LICENSE files. + mkdir -p $(INSTALLER_DIR)/mnt/lib/firmware + cp -a /lib/firmware $(INSTALLER_DIR)/initrd/lib/ + + # Firmware class modules (needed by drivers which require a binary firmware at load time) + cp -rf /lib/modules/$(KVER)/kernel/drivers/base $(INSTALLER_DIR)/initrd/lib/modules/$(KVER)/kernel/drivers +endif + + # Now that we're building the cdrom initrd we can copy the USB drivers + -mkdir -p $(INSTALLER_DIR)/initrd/lib/modules/$(KVER)/kernel/drivers/usb/storage + cp -f /lib/modules/$(KVER)/kernel/drivers/usb/storage/*.ko \ + $(INSTALLER_DIR)/initrd/lib/modules/$(KVER)/kernel/drivers/usb/storage/ + + -mkdir -p $(INSTALLER_DIR)/initrd/lib/modules/$(KVER)/kernel/drivers/usb/host + cp -f /lib/modules/$(KVER)/kernel/drivers/usb/host/*.ko \ + $(INSTALLER_DIR)/initrd/lib/modules/$(KVER)/kernel/drivers/usb/host + + -mkdir -p $(INSTALLER_DIR)/initrd/lib/modules/$(KVER)/kernel/drivers/hid/usbhid + cp -f /lib/modules/$(KVER)/kernel/drivers/hid/usbhid/usbhid.ko \ + $(INSTALLER_DIR)/initrd/lib/modules/$(KVER)/kernel/drivers/hid/usbhid + + -mkdir -p $(INSTALLER_DIR)/initrd/lib/modules/$(KVER)/kernel/drivers/usb/core + cp -f /lib/modules/$(KVER)/kernel/drivers/usb/core/*.ko \ + $(INSTALLER_DIR)/initrd/lib/modules/$(KVER)/kernel/drivers/usb/core + + # Now copy the modules directory to make sure the extra modules are in cdinitrd.img + cp -aR $(INSTALLER_DIR)/initrd/lib/modules $(INSTALLER_DIR)/mnt/lib + + # continue and make the CDRom initrd + cd $(INSTALLER_DIR)/mnt && tar xzf $(INSTALLER_DIR)/images/drivers-$(VERSION).img + cd $(INSTALLER_DIR)/mnt && tar xzf $(INSTALLER_DIR)/images/scsidrv-$(VERSION).img + touch $(INSTALLER_DIR)/mnt/CDROMBOOT + cd $(INSTALLER_DIR)/mnt && find . | cpio -o -H newc | gzip -9 > $(INSTALLER_DIR)/images/cdinitrd-$(VERSION).img + + rm -rf $(INSTALLER_DIR)/mnt/* + # yes we want it rebuilt at each time, so no POSTBUILD Deleted: ipcop/trunk/lfs/initrd =================================================================== --- ipcop/trunk/lfs/initrd 2007-11-14 17:59:48 UTC (rev 710) +++ ipcop/trunk/lfs/initrd 2007-11-14 18:07:48 UTC (rev 711) @@ -1,273 +0,0 @@ -############################################################################### -# 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 <ro...@su...> # -# # -# Modifications by: # -# ??-12-2003 Mark Wormgoor < ma...@wo...> # -# - Modified Makefile for IPCop build # -# # -# $Id$ -# # -############################################################################### - -############################################################################### -# Definitions -############################################################################### - -include Config - -PKG_NAME = initrd -HOST_ARCH = all -OTHER_SRC = no - -THISAPP = initrd -DIR_APP = $(DIR_SRC)/$(THISAPP) -TARGET = $(DIR_INFO)/$(STAGE_ORDER)_$(STAGE)/$(THISAPP) - -############################################################################### -# Top-level Rules -############################################################################### - -install : $(TARGET) - -check : - -download : - -md5 : - -############################################################################### -# Installation Details -############################################################################### - -$(TARGET) : - # Make sure some directories exist - mkdir -p $(INSTALLER_DIR)/initrd/{usr,bin,lib,dev,etc,mnt,root,cdrom,dev,harddisk,proc,tmp,sys} - mkdir -p $(INSTALLER_DIR)/initrd/{usr/share/terminfo/l,usr/share/udhcpc,var/run} - ln -s /bin $(INSTALLER_DIR)/initrd/sbin - ln -s /bin $(INSTALLER_DIR)/initrd/usr/bin - ln -s /bin $(INSTALLER_DIR)/initrd/usr/sbin - ln -s /lib $(INSTALLER_DIR)/initrd/usr/lib - - # Install udevd, udevtrigger, udevsettle - install -D /sbin/udevd $(INSTALLER_DIR)/initrd/bin - install -D /sbin/udevsettle $(INSTALLER_DIR)/initrd/bin - install -D /sbin/udevtrigger $(INSTALLER_DIR)/initrd/bin - - # Copy some udev devices and helpers - cp -a /lib/udev $(INSTALLER_DIR)/initrd/lib/ - - # Copy the udev rules - cp -a /etc/udev $(INSTALLER_DIR)/initrd/etc/ - - # Copy /etc/group so udev doesn't complain about unknown groups - cp -a /etc/group $(INSTALLER_DIR)/initrd/etc/ - - # Install required libraries - install -c -D /lib/libc-2.5.1.so $(INSTALLER_DIR)/initrd/lib/libc-2.5.1.so - ln -sf libc-2.5.1.so $(INSTALLER_DIR)/initrd/lib/libc.so.6 - install -c -D /lib/libdl-2.5.1.so $(INSTALLER_DIR)/initrd/lib/libdl-2.5.1.so - ln -sf libdl-2.5.1.so $(INSTALLER_DIR)/initrd/lib/libdl.so.2 - install -c -D /lib/libnss_files-2.5.1.so $(INSTALLER_DIR)/initrd/lib/libnss_files-2.5.1.so - ln -sf libnss_files-2.5.1.so $(INSTALLER_DIR)/initrd/lib/libnss_files.so.2 - install -c -D /usr/lib/libncursesw.so.5.6 $(INSTALLER_DIR)/initrd/lib/libncursesw.so.5.6 - ln -sf libncursesw.so.5.6 $(INSTALLER_DIR)/initrd/lib/libncursesw.so - install -c -D /lib/ld-2.5.1.so $(INSTALLER_DIR)/initrd/lib/ld-2.5.1.so - ln -sf ld-2.5.1.so $(INSTALLER_DIR)/initrd/$(LINKER) - install -c -D /lib/libsysfs.so.1.0.3 $(INSTALLER_DIR)/initrd/lib/libsysfs.so.1.0.3 - ln -sf libsysfs.so.1.0.3 $(INSTALLER_DIR)/initrd/lib/libsysfs.so.1 - install -c -D /lib/libext2fs.so.2.4 $(INSTALLER_DIR)/initrd/lib/libext2fs.so.2.4 - ln -sf libext2fs.so.2.4 $(INSTALLER_DIR)/initrd/lib/libext2fs.so.2 - install -c -D /lib/libcom_err.so.2.1 $(INSTALLER_DIR)/initrd/lib/libcom_err.so.2.1 - ln -sf libcom_err.so.2.1 $(INSTALLER_DIR)/initrd/lib/libcom_err.so.2 - install -c -D /lib/libblkid.so.1.0 $(INSTALLER_DIR)/initrd/lib/libblkid.so.1.0 - ln -sf libblkid.so.1.0 $(INSTALLER_DIR)/initrd/lib/libblkid.so.1 - install -c -D /lib/libuuid.so.1.2 $(INSTALLER_DIR)/initrd/lib/libuuid.so.1.2 - ln -sf libuuid.so.1.2 $(INSTALLER_DIR)/initrd/lib/libuuid.so.1 - install -c -D /lib/libe2p.so.2.3 $(INSTALLER_DIR)/initrd/lib/libe2p.so.2.3 - ln -sf libe2p.so.2.3 $(INSTALLER_DIR)/initrd/lib/libe2p.so.2 - - # Install pccardctl, pcmcia-check-broken-cis, lspcmcia (from pcmciautils) - install -c -D /sbin/pccardctl $(INSTALLER_DIR)/initrd/bin/pccardctl - install -c -D /sbin/pcmcia-check-broken-cis $(INSTALLER_DIR)/initrd/bin/pcmcia-check-broken-cis - ln -sf pccardctl $(INSTALLER_DIR)/initrd/bin/lspcmcia - install -c -d $(INSTALLER_DIR)/initrd/etc/pcmcia - install -c -m 644 -D /etc/pcmcia/config.opts $(INSTALLER_DIR)/initrd/etc/pcmcia/config.opts - install -c -D /sbin/pcmcia-socket-startup $(INSTALLER_DIR)/initrd/bin/pcmcia-socket-startup - - # Install a few keyboard utilities (from kbd) - install -c -D /bin/kbd_mode $(INSTALLER_DIR)/initrd/bin/kbd_mode - install -c -D /bin/loadkeys $(INSTALLER_DIR)/initrd/bin/loadkeys - install -c -D /bin/setfont $(INSTALLER_DIR)/initrd/bin/setfont - install -c -D /usr/bin/dumpkeys $(INSTALLER_DIR)/initrd/bin/dumpkeys - install -c -D /usr/bin/loadunimap $(INSTALLER_DIR)/initrd/bin/loadunimap - install -c -D /usr/bin/showconsolefont $(INSTALLER_DIR)/initrd/bin/showconsolefont - install -c -D /usr/bin/unicode_start $(INSTALLER_DIR)/initrd/bin/unicode_start - install -c -D /usr/bin/unicode_stop $(INSTALLER_DIR)/initrd/bin/unicode_stop - mkdir -p $(INSTALLER_DIR)/initrd/usr/share/kbd/consolefonts - install -m 0644 /usr/share/kbd/consolefonts/lat0-16.psfu.gz \ - $(INSTALLER_DIR)/initrd/usr/share/kbd/consolefonts/lat0-16.psfu.gz - install -m 0644 /usr/share/kbd/consolefonts/lat1-16.psfu.gz \ - $(INSTALLER_DIR)/initrd/usr/share/kbd/consolefonts/lat1-16.psfu.gz - install -m 0644 /usr/share/kbd/consolefonts/lat2-16.psfu.gz \ - $(INSTALLER_DIR)/initrd/usr/share/kbd/consolefonts/lat2-16.psfu.gz - install -m 0644 /usr/share/kbd/consolefonts/lat5-16.psfu.gz \ - $(INSTALLER_DIR)/initrd/usr/share/kbd/consolefonts/lat5-16.psfu.gz - install -m 0644 /usr/share/kbd/consolefonts/iso07u-16.psfu.gz \ - $(INSTALLER_DIR)/initrd/usr/share/kbd/consolefonts/iso07u-16.psfu.gz - install -m 0644 /usr/share/kbd/consolefonts/viscii10-8x16.psfu.gz \ - $(INSTALLER_DIR)/initrd/usr/share/kbd/consolefonts/viscii10-8x16.psfu.gz - - # Install mke2fs (from e2fsprogs) - install -c -D /sbin/mke2fs $(INSTALLER_DIR)/initrd/bin/mke2fs - - # Install iowrap (from misc-progs) - install -c -D /usr/local/bin/iowrap $(INSTALLER_DIR)/initrd/bin/iowrap - - # Install parted and libparted (from parted) - install -c -D /usr/sbin/parted $(INSTALLER_DIR)/initrd/bin/parted - install -c -D /usr/lib/libparted-1.8.so.8.0.0 $(INSTALLER_DIR)/initrd/lib/libparted-1.8.so.8.0.0 - ln -sf libparted-1.8.so.8.0.0 $(INSTALLER_DIR)/initrd/lib/libparted-1.8.so.8 - - # Locale for installer - for i in $(DIR_SRC)/langs/*_* ; do \ - mkdir -p $(INSTALLER_DIR)/initrd/usr/share/locale/`basename $$i`/LC_MESSAGES; \ - msgfmt $$i/install.po -o $(INSTALLER_DIR)/initrd/usr/share/locale/`basename $$i`/LC_MESSAGES/install.mo; \ - done - - # Copy locale archive - mkdir -p $(INSTALLER_DIR)/initrd/lib/locale/ - cp -a /usr/lib/locale/locale-archive $(INSTALLER_DIR)/initrd/lib/locale/locale-archive - - # Copy over udhcp settings for busybox - install -m 0755 $(DIR_SRC)/config/busybox/default.script $(INSTALLER_DIR)/initrd/usr/share/udhcpc/default.script - - # Finish up initrd directory - cd $(INSTALLER_DIR)/initrd/etc && rm -f fstab - cp -aRf $(DIR_SRC)/config/install/* $(INSTALLER_DIR)/initrd/etc/ - cd $(INSTALLER_DIR)/initrd && mv etc/init . - rm -rf $(INSTALLER_DIR)/initrd/etc/.svn - rm -rf $(INSTALLER_DIR)/initrd/usr/share/man - cp -f /etc/issue $(INSTALLER_DIR)/initrd/etc/ - chmod 755 $(INSTALLER_DIR)/initrd/etc/halt $(INSTALLER_DIR)/initrd/etc/rc - cp -f /usr/share/terminfo/l/linux $(INSTALLER_DIR)/initrd/usr/share/terminfo/l - - # Extra modules - -rm -rf $(INSTALLER_DIR)/initrd/lib/modules - -mkdir -p $(INSTALLER_DIR)/initrd/lib/modules/$(KVER)/kernel/drivers/scsi - cp -f /lib/modules/$(KVER)/kernel/drivers/scsi/{sd_mod.ko,sr_mod.ko} \ - $(INSTALLER_DIR)/initrd/lib/modules/$(KVER)/kernel/drivers/scsi/ - - # File system - -mkdir -p $(INSTALLER_DIR)/initrd/lib/modules/$(KVER)/kernel/fs - cp -rf /lib/modules/$(KVER)/kernel/fs/* $(INSTALLER_DIR)/initrd/lib/modules/$(KVER)/kernel/fs - - # Copy modules.dep - cp -f /lib/modules/$(KVER)/modules.dep $(INSTALLER_DIR)/initrd/lib/modules/$(KVER) - - # Now that we have an almost complete initramfs directory structure (without the busybox binaries) - # copy it to /usr/lib/mkinitramfs so mkinitramfs will find it - # Start from scratch - rm -fr /usr/lib/mkinitramfs - mkdir -p /usr/lib/mkinitramfs - # Copy what we have created up till now in this script - cp -a $(INSTALLER_DIR)/initrd/* /usr/lib/mkinitramfs/ - # Remove all the modules from the directory structure -- we'll pick our own later, plus we don't want - # to end up with kernel <-> modules mismatch after a kernel upgrade - rm -fr /usr/lib/mkinitramfs/lib/modules - # The installer initramfs contains binaries we don't need in the bootstrap/rescue initramfs - rm -f /usr/lib/mkinitramfs/bin/* - # Now selectively copy the ones we need - for binary in mke2fs parted udevd udevsettle udevtrigger; do \ - cp -a $(INSTALLER_DIR)/initrd/bin/$$binary /usr/lib/mkinitramfs/bin/; \ - done - cp -a $(INSTALLER_DIR)/busybox/* /usr/lib/mkinitramfs/bin - - # Floppy initrd - -mkdir -p $(INSTALLER_DIR)/{images,mnt} - - # Copy over stuff we've already built (the installer, various supporting libs) - cp -aR $(INSTALLER_DIR)/initrd/* $(INSTALLER_DIR)/mnt - - # Now copy busybox - cp -a $(INSTALLER_DIR)/busybox/* $(INSTALLER_DIR)/mnt/bin/ - - # Make new dependencies - depmod -a -F /boot/System.map-$(KVER) $(KVER) - - # We do the stripping here because we don't want to destroy our development tree by stripping all symbols - # Instead we strip all binaries and libraries as we create the initrd. - # It's quite safe to do strip --strip-all on libraries if they will not be used for development. - cd $(INSTALLER_DIR)/mnt && find ./bin -maxdepth 1 -type f -exec $(TOOLS_DIR)/bin/strip --strip-all '{}' ';' - cd $(INSTALLER_DIR)/mnt && find ./lib -maxdepth 1 -type f -exec $(TOOLS_DIR)/bin/strip --strip-all '{}' ';' - - # Now create a cpio archive and call it root-VERSION.img - cd $(INSTALLER_DIR)/mnt && find . | cpio -o -H newc | gzip -9 > $(INSTALLER_DIR)/images/root-$(VERSION).img - - # Create a file list for root floppy - -rm $(DIR_INFO)/$(STAGE_ORDER)_$(STAGE)/root.list $(DIR_INFO)/$(STAGE_ORDER)_$(STAGE)/root-$(VERSION).img - cd $(INSTALLER_DIR)/mnt && find ./ -type d | sed 's!\./!!g' | sort > $(DIR_INFO)/$(STAGE_ORDER)_$(STAGE)/root.list - # we hide errors there listing empty directories - -cd $(INSTALLER_DIR)/mnt && \ - for dir in `cat $(DIR_INFO)/$(STAGE_ORDER)_$(STAGE)/root.list`; do \ - echo $$dir >> $(DIR_INFO)/$(STAGE_ORDER)_$(STAGE)/root-$(VERSION).img; \ - ls -s1 $$dir/* >> $(DIR_INFO)/$(STAGE_ORDER)_$(STAGE)/root-$(VERSION).img 2>/dev/null; \ - done - rm $(DIR_INFO)/$(STAGE_ORDER)_$(STAGE)/root.list - - # From this point on, we're building cdinitrd.img - -ifeq "$(MACHINE)" "sparc" - # Add firmwares on cdinitrd, only for sparc - # Copy over any binary firmware that may be needed by the installer. We also copy the LICENSE files. - mkdir -p $(INSTALLER_DIR)/mnt/lib/firmware - cp -a /lib/firmware $(INSTALLER_DIR)/initrd/lib/ - - # Firmware class modules (needed by drivers which require a binary firmware at load time) - cp -rf /lib/modules/$(KVER)/kernel/drivers/base $(INSTALLER_DIR)/initrd/lib/modules/$(KVER)/kernel/drivers -endif - - # Now that we're building the cdrom initrd we can copy the USB drivers - -mkdir -p $(INSTALLER_DIR)/initrd/lib/modules/$(KVER)/kernel/drivers/usb/storage - cp -f /lib/modules/$(KVER)/kernel/drivers/usb/storage/*.ko \ - $(INSTALLER_DIR)/initrd/lib/modules/$(KVER)/kernel/drivers/usb/storage/ - - -mkdir -p $(INSTALLER_DIR)/initrd/lib/modules/$(KVER)/kernel/drivers/usb/host - cp -f /lib/modules/$(KVER)/kernel/drivers/usb/host/*.ko \ - $(INSTALLER_DIR)/initrd/lib/modules/$(KVER)/kernel/drivers/usb/host - - -mkdir -p $(INSTALLER_DIR)/initrd/lib/modules/$(KVER)/kernel/drivers/hid/usbhid - cp -f /lib/modules/$(KVER)/kernel/drivers/hid/usbhid/usbhid.ko \ - $(INSTALLER_DIR)/initrd/lib/modules/$(KVER)/kernel/drivers/hid/usbhid - - -mkdir -p $(INSTALLER_DIR)/initrd/lib/modules/$(KVER)/kernel/drivers/usb/core - cp -f /lib/modules/$(KVER)/kernel/drivers/usb/core/*.ko \ - $(INSTALLER_DIR)/initrd/lib/modules/$(KVER)/kernel/drivers/usb/core - - # Now copy the modules directory to make sure the extra modules are in cdinitrd.img - cp -aR $(INSTALLER_DIR)/initrd/lib/modules $(INSTALLER_DIR)/mnt/lib - - # continue and make the CDRom initrd - cd $(INSTALLER_DIR)/mnt && tar xzf $(INSTALLER_DIR)/images/drivers-$(VERSION).img - cd $(INSTALLER_DIR)/mnt && tar xzf $(INSTALLER_DIR)/images/scsidrv-$(VERSION).img - touch $(INSTALLER_DIR)/mnt/CDROMBOOT - cd $(INSTALLER_DIR)/mnt && find . | cpio -o -H newc | gzip -9 > $(INSTALLER_DIR)/images/cdinitrd-$(VERSION).img - - rm -rf $(INSTALLER_DIR)/mnt/* - # yes we want it rebuilt at each time, so no POSTBUILD Modified: ipcop/trunk/make.sh =================================================================== --- ipcop/trunk/make.sh 2007-11-14 17:59:48 UTC (rev 710) +++ ipcop/trunk/make.sh 2007-11-14 18:07:48 UTC (rev 711) @@ -1266,7 +1266,7 @@ chroot_make scsi.img chroot_make driver.img chroot_make installer - chroot_make initrd + chroot_make initramfs chroot_make boot.img chroot_make avmdrv This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |