Neues Verfahren fuer die Rootfiles.
authorms <ms@ea5c0bd1-69bd-2848-81d8-4f18e57aeed8>
Thu, 12 Oct 2006 15:52:06 +0000 (15:52 +0000)
committerms <ms@ea5c0bd1-69bd-2848-81d8-4f18e57aeed8>
Thu, 12 Oct 2006 15:52:06 +0000 (15:52 +0000)
Alle liegen in einer einzelnen Datei und die 3 verschiedenen Version koennen unterschiedlich zusammengestellt werden.
USB-Stick-Images mangels Notwendigkeit entfernt.

git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@314 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8

lfs/Config
lfs/cdrom
make.sh

index 9a81690c7918eb983532debda427d908067f7e7c..6060e2207e464065af962517c1557d2234c04a72 100644 (file)
@@ -51,7 +51,7 @@ DIR_CONF    = $(LFS_BASEDIR)/config
 DIR_INFO    = $(LFS_BASEDIR)/log
 DIR_TMP     = /var/tmp
 
-KGCC = ccache /usr/bin/gcc
+KGCC = gcc
 
 ###############################################################################
 # Common Macro Definitions
@@ -73,6 +73,17 @@ define PREBUILD
        echo "====================================== Installing $(THISAPP) ..."
        @echo "Install started; saving file list to $(DIR_SRC)/lsalr ..."
        @if [ ! -f $(DIR_SRC)/lsalr ]; then $(FIND_FILES) > $(DIR_SRC)/lsalr; fi
+       # Fix installation on partial rebuild, so modules install where they should
+       # and not everytime on the last compiled kernel
+       if [ -f $(DIR_SRC)/linux-$(KVER) ]; then \
+               if [ "$(SMP)" = "" ]; then \
+                       cd $(DIR_SRC)/linux-$(KVER) && \
+                               sed -i -e 's+^EXTRAVERSION.*$$+EXTRAVERSION\ =\ $(word 4,$(subst ., .,$(KVER)))+' Makefile; \
+               else \
+                       cd $(DIR_SRC)/linux-$(KVER) && \
+                               sed -i -e 's+^EXTRAVERSION.*$$+EXTRAVERSION\ =\ $(word 4,$(subst ., .,$(KVER)))-smp+' Makefile; \
+               fi; \
+       fi
 endef
 else
 define PREBUILD
@@ -84,7 +95,7 @@ endif
 #
 ifeq "$(ROOT)" ""
 define POSTBUILD
-       @echo "Install done; saving file list to $(DIR_INFO)/$(THISAPP) ..."
+       @echo "Install done; saving file list to $(TARGET) ..."
        @$(FIND_FILES) > $(DIR_SRC)/lsalrnew
        @diff $(DIR_SRC)/lsalr $(DIR_SRC)/lsalrnew | grep '^> ' | sed 's/^> //' | sort > $(TARGET)_diff
        @cp -f $(DIR_SRC)/lsalrnew $(DIR_SRC)/lsalr
@@ -92,12 +103,29 @@ define POSTBUILD
        sed -i -e 's+.\/++' $(TARGET)_diff
        # compare roofile ( same name as lfs script) with the list of installed files
        # special cases
+       # - if the corresponding rootfile is not found, touch $(TARGET)_missing_rootfile
        # - on a partial rebuild without a new file inside TARGET_diff, just touch TARGET
+       # $(TARGET)_diff : result of the diff
+       # ROOTFILE : reference of include/exclude files
+       # $(TARGET)_rootfile : ROOTFILE with KVER replacement
+       # $(TARGET) : log result with {commented|include|added} files
        if [ -s "$(TARGET)_diff" ]; then \
-               ROOTFILE=$(DIR_SRC)/src/ROOTFILES.$(MACHINE); \
+               if [ "$(PASS)" = "SMP" ]; then LFS_SCRIPT=$(firstword $(MAKEFILE_LIST))-smp; \
+               else LFS_SCRIPT=$(firstword $(MAKEFILE_LIST)); \
+               fi; \
+               echo $(LFS_SCRIPT); \
+               ROOTFILE=`find $(DIR_SRC)/config/rootfiles/common -maxdepth 1 -type f -name $$LFS_SCRIPT`; \
+               if [ "$$ROOTFILE" = "" ]; then \
+                       ROOTFILE=`find $(DIR_SRC)/config/rootfiles/ver_$(IPFVER) -type f -name $$LFS_SCRIPT`; \
+               fi; \
+               if [ "$$ROOTFILE" = "" ]; then \
+                       touch $(TARGET)_missing_rootfile; \
+                       ROOTFILE=$(TARGET)_missing_rootfile ; \
+                       echo "error $$LFS_SCRIPT not found in config/rootfiles"; \
+               fi; \
                sed "s/KVER/$(KVER)/g" $$ROOTFILE > $(TARGET)_rootfile; \
                for line in `cat $(TARGET)_diff`; do \
-                       if grep -qE "^#$$line$$" $(TARGET)_rootfile ; then echo "#$$line" >> $(TARGET); \
+                       if grep -qE "^#$$line$$" $(TARGET)_rootfile; then echo "#$$line" >> $(TARGET); \
                        elif grep -qE "^$$line$$" $(TARGET)_rootfile ; then echo "$$line" >> $(TARGET); \
                        else echo "+$$line" >> $(TARGET); \
                        fi; \
index a94a739e3f3ed682c60da67a5db3be2ef55461e8..3028661a34a999154de8c2ae86667fdaf4396866 100644 (file)
--- a/lfs/cdrom
+++ b/lfs/cdrom
@@ -38,23 +38,17 @@ TARGET     = $(DIR_INFO)/$(THISAPP)
 objects = $(DL_FILE) \
        rawwritewin-0.7.zip \
        install-en-1.4.0.pdf.zip \
-       install-fr-1.4.0.pdf.zip \
-       quickstart-en.pdf.zip \
-       quickstart-fr-1.4.0.pdf.zip
+       quickstart-en.pdf.zip
 
 $(DL_FILE)                  = $(DL_FROM)/$(DL_FILE)
 rawwritewin-0.7.zip         = http://uranus.it.swin.edu.au/~jn/linux/rawwritewin-0.7.zip
 install-en-1.4.0.pdf.zip    = $(URL_SFNET)/ipcop/install-en-1.4.0.pdf.zip
-install-fr-1.4.0.pdf.zip    = $(URL_SFNET)/ipcop/install-fr-1.4.0.pdf.zip
 quickstart-en.pdf.zip       = http://www.ipcop.org/1.4.0/en/quickstart/quickstart-en.pdf.zip
-quickstart-fr-1.4.0.pdf.zip = http://www.ipcop.org/1.4.0/fr/quickstart/quickstart-fr-1.4.0.pdf.zip
 
 $(DL_FILE)_MD5                  = 7dac6ea496014d32dbce6c50feb254ca
 rawwritewin-0.7.zip_MD5         = 0130b497c8c3bc7d136a4236b0d9fbf6
 install-en-1.4.0.pdf.zip_MD5    = 07e0b5131f1434010d8a00571f9acd81
-install-fr-1.4.0.pdf.zip_MD5    = 2deb9d3bc46779cff18b681625fc4418
 quickstart-en.pdf.zip_MD5       = ca77ef5f1efca6bc519cc42acfd69aa4
-quickstart-fr-1.4.0.pdf.zip_MD5 = 7ec474aea03acba10371eb92579b0dec
 
 install : $(TARGET)
 
@@ -87,75 +81,34 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
        # Compress root filesystem
        # Reason for this tar+untar+tar is removing of entries listed two or more in src/ROOTFILES
        mkdir -p /install/cdrom/{doc,dosutils,images}
-       sed -e "s/KVER/$(KVER)/g" $(DIR_SRC)/src/ROOTFILES.$(MACHINE) > /tmp/ROOTFILES
+       find $(DIR_SRC)/config/rootfiles -type f -maxdepth 1 | xargs cat >> /tmp/ROOTFILES
+       find $(DIR_SRC)/config/rootfiles/ver_$(IPFVER) -type f -maxdepth 1 | xargs cat >> /tmp/ROOTFILES
        tar -c -C / --files-from=/tmp/ROOTFILES \
                -f /$(SNAME).tar --exclude='#*' --exclude='dev/pts/*' \
                --exclude='proc/*' --exclude='tmp/ROOTFILES'
        rm -f /tmp/ROOTFILES
        tar -x -C /tmp -f /$(SNAME).tar
        rm -f /$(SNAME).tar
-       cd /tmp && tar zcf /install/cdrom/$(SNAME)-$(VERSION).tgz * && rm -rf *
+       cd /tmp && tar jcf /install/cdrom/$(SNAME)-$(VERSION).tbz2 * && rm -rf *
+
        # Other files
-       sed 's/VERSION/$(VERSION)/' $(DIR_SRC)/config/cdrom/README.txt \
-               > /install/cdrom/README.txt
-       cp $(DIR_SRC)/doc/COPYING             /install/cdrom/
-       cp /install/images/*.img              /install/cdrom/images
-       unzip $(DIR_DL)/install-en-1.4.0.pdf.zip -d /install/cdrom/doc/english
-       unzip $(DIR_DL)/quickstart-en.pdf.zip -d /install/cdrom/doc/english
-       unzip $(DIR_DL)/install-fr-1.4.0.pdf.zip -d /install/cdrom/doc/francais
-       unzip $(DIR_DL)/quickstart-fr-1.4.0.pdf.zip -d /install/cdrom/doc/francais
-       cp $(DIR_SRC)/doc/{ChangeLog,packages-list.txt} /install/cdrom/doc
-       cp $(DIR_DL)/rawrite.exe              /install/cdrom/dosutils
+       sed 's/VERSION/$(VERSION)/' $(DIR_SRC)/config/cdrom/README.txt > /install/cdrom/README.txt
+       cp $(DIR_SRC)/doc/COPYING                               /install/cdrom/
+       cp /install/images/*.img                                /install/cdrom/images
+       unzip $(DIR_DL)/install-en-1.4.0.pdf.zip -d     /install/cdrom/doc
+       unzip $(DIR_DL)/quickstart-en.pdf.zip -d                /install/cdrom/doc
+       cp $(DIR_SRC)/doc/{ChangeLog,packages-list.txt} /install/cdrom/doc
+       cp $(DIR_DL)/rawrite.exe                                /install/cdrom/dosutils
        unzip -j -L $(DIR_DL)/rawwritewin*.zip -x "*.txt" -d /install/cdrom/dosutils
 
-       # make the CDROM iso, USB(superfloppy&partionned) iso
-       if [ "$(MACHINE)" == "i386" ]; then \
-               mkdir -p /install/cdrom/boot/isolinux; \
-               dd if=/dev/zero  bs=1k count=2            > /install/cdrom/boot/isolinux/boot.catalog; \
-               cp /install/images/cdinitrd.gz              /install/cdrom/boot/isolinux/instroot.gz; \
-               cp /boot/vmlinuz-installer                  /install/cdrom/boot/isolinux/vmlinuz; \
-               cp $(DIR_SRC)/config/kernel/syslinux.cfg    /install/cdrom/boot/isolinux/isolinux.cfg; \
-               cp /usr/lib/syslinux/isolinux.bin           /install/cdrom/boot/isolinux/isolinux.bin; \
-               sed -e 's/boot IPFire/boot IPFire $(VERSION)/' $(DIR_SRC)/config/kernel/install-message \
-                       > /install/message; \
-               cp /install/message /install/cdrom/boot/isolinux/message; \
-               cd /install/cdrom && mkisofs -J -r -V "$(NAME)_$(VERSION)" \
-                       -b boot/isolinux/isolinux.bin -no-emul-boot -boot-load-size 4 -boot-info-table \
-                       -c boot/isolinux/boot.catalog \
-                       . > /install/images/$(SNAME)-install-$(VERSION).$(MACHINE).iso; \
-               echo "compute size +64 blocks for bootsector/fat/etc..." && \
-               dd bs=1024 count=$$((`du -k -s ../cdrom|awk '{print $$1}'` + 64)) if=/dev/zero of=/install/images/$(SNAME)-install-usb-$(VERSION).$(MACHINE).iso; \
-               echo "move boot files on top of disk" && \
-               rm -rf boot && \
-               mkdosfs -n IPFIREBOOT -F 16 -I /install/images/$(SNAME)-install-usb-$(VERSION).$(MACHINE).iso && \
-               mount -t vfat -o loop /install/images/$(SNAME)-install-usb-$(VERSION).$(MACHINE).iso /install/mnt && \
-               cp -R ../cdrom/* /install/mnt && \
-               cp /install/images/cdinitrd.gz              /install/mnt/instroot.gz && \
-               cp /boot/vmlinuz-installer                  /install/mnt/vmlinuz && \
-               cp $(DIR_SRC)/config/kernel/syslinux.cfg    /install/mnt/syslinux.cfg && \
-               cp /install/message /install/mnt/message && \
-               umount /install/mnt && echo "and make the isofile a bootable system ready for dd" && \
-               syslinux /install/images/$(SNAME)-install-usb-$(VERSION).$(MACHINE).iso && \
-               echo "# Build the USB-partitionned scheme ISO (cover majority of BIOS)" && \
-               ISOs=/install/images/$(SNAME)-install-usb-$(VERSION).$(MACHINE).iso && \
-               ISOp=/install/images/$(SNAME)-install-usbp-$(VERSION).$(MACHINE).iso && \
-               dd bs=1k if=/dev/zero of=$$ISOp count=$$((`du -k -s $$ISOs | awk '{print $$1}'` + 10 )) && \
-               echo "# Partitionning with 32 sectors geometry." && \
-               echo "# If less, some (my) bios do not recognize the key as a bootable disk." && \
-               echo -e "0,,6,*\n;\n;\n;" > /tmp/sdisk.txt && \
-               sfdisk -qLDH 256 -S 32 $$ISOp < /tmp/sdisk.txt && \
-               echo "#Just put a mbr and superfloppy at the right place. seek=32 is due to -D & 32 sectors" && \
-               echo "#in sfdisk. If you ever change partitionning, adjust also here." && \
-               /usr/local/sbin/install-mbr $$ISOp && \
-               dd if=$$ISOs of=$$ISOp bs=512 seek=32; \
-       elif [ "$(MACHINE)" == "alpha" ]; then \
-               mkdir -p /install/cdrom/etc; \
-               cp /boot/vmlinuz-$(KVER) /install/cdrom/vmlinuz; \
-               cp /install/images/cdinitrd.gz  /install/cdrom/instroot.gz; \
-               cp /boot/bootlx /install/cdrom; \
-               cp $(DIR_SRC)/config/kernel/aboot.conf /install/cdrom/etc/aboot.conf; \
-               cd /install/cdrom && mkisofs -J -r -V "$(NAME)_$(VERSION)" \
-                       . > /install/images/$(SNAME)-install-$(VERSION).$(MACHINE).iso; \
-               isomarkboot /install/images/$(SNAME)-install-$(VERSION).$(MACHINE).iso bootlx; \
-       fi
-
+       # make the ISO
+       mkdir -p /install/cdrom/boot/isolinux; \
+       dd if=/dev/zero  bs=1k count=2            > /install/cdrom/boot/isolinux/boot.catalog; \
+       cp /install/images/cdinitrd.gz              /install/cdrom/boot/isolinux/instroot.gz; \
+       cp /boot/vmlinuz-installer                  /install/cdrom/boot/isolinux/vmlinuz; \
+       cp $(DIR_SRC)/config/kernel/syslinux.cfg    /install/cdrom/boot/isolinux/isolinux.cfg; \
+       cp $(DIR_SRC)/config/kernel/install-message /install/cdrom/boot/isolinux/message; \
+       cp /usr/lib/syslinux/isolinux.bin           /install/cdrom/boot/isolinux/isolinux.bin; \
+       cd /install/cdrom && mkisofs -J -r -V "$(NAME)_$(VERSION)" \
+           -b boot/isolinux/isolinux.bin -no-emul-boot -boot-load-size 4 -boot-info-table \
+           -c boot/isolinux/boot.catalog . > /install/images/$(SNAME)-$(VERSION).$(MACHINE).iso
diff --git a/make.sh b/make.sh
index 0a01c17ff2eeddd7b85b4eff48f5558d068d8a6b..cf15c5b59dd378f2ce77cc91fec11bc3e2028728 100644 (file)
--- a/make.sh
+++ b/make.sh
@@ -33,7 +33,9 @@ KVER=`grep --max-count=1 VER lfs/linux | awk '{ print $3 }'`
 MACHINE=`uname -m`
 SVN_REVISION=`svn info | grep Revision | cut -c 11-`
 
-# Setzen des IPFire Builds
+IPFVER="full"                          # Which version should be compiled? (full|light|voice)
+
+# Set an information about the build number
 if [ -e ./.svn ]; then
        FIREBUILD=`cat .svn/entries |sed -n 's/^[ \t]*revision=\"// p' | sed -n 's/\".*$// p'`
 fi