Author: alexander
Date: 2007-10-21 08:38:05 -0600 (Sun, 21 Oct 2007)
New Revision: 2124

Modified:
   trunk/Makefile
   trunk/doc/lfscd-remastering-howto.txt
   trunk/isolinux/isolinux.cfg
   trunk/packages/initramfs/Makefile
   trunk/packages/linux/Makefile
   trunk/packages/linux64/Makefile
   trunk/packages/syslinux/Makefile
Log:
Split initramfs into 32-bit and 64-bit parts, allowing the CD to boot on
computers with 32 MB of RAM.


Modified: trunk/Makefile
===================================================================
--- trunk/Makefile      2007-10-20 07:08:58 UTC (rev 2123)
+++ trunk/Makefile      2007-10-21 14:38:05 UTC (rev 2124)
@@ -290,7 +290,7 @@
        ch-libchewing ch-scim-chewing ch-scim-pinyin ch-scim-input-pad \
        ch-hibernate-script ch-slang ch-mc ch-fuse ch-dosfstools ch-ntfsprogs \
        ch-libaal ch-reiser4progs ch-vbetool ch-bin86 ch-lilo ch-syslinux \
-       ch-scsi-firmware ch-net-firmware ch-linux32
+       ch-scsi-firmware ch-net-firmware ch-linux32 ch-initramfs
 ifeq ($(CD_ARCH),x86)
        make ch-grub
        make ch-linux
@@ -298,7 +298,6 @@
        make ch-gcc64
 endif
        make ch-linux64
-       make ch-initramfs
        make ch-gcc33
        make update-caches
 

Modified: trunk/doc/lfscd-remastering-howto.txt
===================================================================
--- trunk/doc/lfscd-remastering-howto.txt       2007-10-20 07:08:58 UTC (rev 
2123)
+++ trunk/doc/lfscd-remastering-howto.txt       2007-10-21 14:38:05 UTC (rev 
2124)
@@ -16,6 +16,8 @@
 
 For LFS LiveCD 6.2-x, see the old "lfscd-remastering-howto-6.2.txt" hint.
 
+For LFS LiveCD 6.3-rX with x<2124, see the old 
"lfscd-remastering-howto-6.3-old.txt" hint.
+
 HINT:
 
 You will need:
@@ -96,23 +98,21 @@
 In the chroot, change the current directory to /build, and install any
 additional packages you want. Modify other files as necessary.
 
-Check out the initramfs files:
-       svn co svn://svn.linuxfromscratch.org/livecd/trunk/packages/initramfs
+Generate initramfs images for your CD by running the create-initramfs command
+for each kernel. This command accepts the following parameters: the LiveCD
+version, the kernel version, and the name of the initramfs file to create.
 
-Remove the "include $(ROOT)/scripts/functions" and
-"cp initramfs_data.cpio.gz /boot/isolinux/initramfs_data.cpio.gz" lines
-from the Makefile. Generate the initramfs image for your CD:
-
 For x86:
-       make compile-stage2 VERSION="x86-6.3-custom" LINKER=ld-linux.so.2
+       create-initramfs x86-6.3-custom 2.6.22.5 initramfs_data.cpio.gz
+       create-initramfs x86-6.3-custom 2.6.22.5-64bit initramfs_data64.cpio.gz
 
 For x86_64:
-       make compile-stage2 VERSION="x86_64-6.3-custom" \
-           LINKER=ld-linux-x86-64.so.2 64bit=true
+       create-initramfs x86_64-6.3-custom 2.6.22.5-64bit 
initramfs_data64.cpio.gz
 
 (you can replace the "6.3-custom" with your own string). This produces the
-initramfs_data.cpio.gz file in the current directory. Copy it to /build:
-       cp initramfs_data.cpio.gz /build
+initramfs_data.cpio.gz and possibly initramfs_data64.cpio.gz files in the
+current directory. Copy them to /build:
+       cp initramfs_data*.cpio.gz /build
 
 Exit from the chroot and clean up the mounts:
        exit
@@ -151,9 +151,9 @@
 Copy the directory structure from the original LiveCD:
        cp -r /media/cdrom/*/ $WORK/iso
 
-Replace the stock initramfs image with your own:
-       cp $WORK/build/initramfs_data.cpio.gz \
-           $WORK/iso/boot/isolinux/initramfs_data.cpio.gz
+Replace the stock initramfs images with your own:
+       cp $WORK/build/initramfs_data*.cpio.gz \
+           $WORK/iso/boot/isolinux/
 
 Recompress the root.ext2 file:
        mkzftree -F $WORK/root.ext2 $WORK/iso/root.ext2
@@ -186,3 +186,6 @@
 
    [2007-08-28]
     * Updated for the final 6.3 version
+
+   [2007-10-21]
+    * Updated for the new create-initramfs script

Modified: trunk/isolinux/isolinux.cfg
===================================================================
--- trunk/isolinux/isolinux.cfg 2007-10-20 07:08:58 UTC (rev 2123)
+++ trunk/isolinux/isolinux.cfg 2007-10-21 14:38:05 UTC (rev 2124)
@@ -19,4 +19,4 @@
 
 label linux64
   kernel linux64
-  append initrd=initramfs_data_cpio.gz quiet
+  append initrd=initramfs_data64_cpio.gz quiet

Modified: trunk/packages/initramfs/Makefile
===================================================================
--- trunk/packages/initramfs/Makefile   2007-10-20 07:08:58 UTC (rev 2123)
+++ trunk/packages/initramfs/Makefile   2007-10-21 14:38:05 UTC (rev 2124)
@@ -3,8 +3,6 @@
 NM= initramfs
 VRS= 1
 
-WDIR= temp
-
 # Targets
 
 include $(ROOT)/scripts/functions
@@ -19,43 +17,12 @@
        @touch $@
 
 compile-stage2:
-       mkdir -p $(WDIR)/{bin,dev,etc/udev/rules.d,lib/firmware,sbin,sys,proc}
-ifdef 64bit
-       ln -s lib $(WDIR)/lib64
-endif
-       cp /etc/udev/udev.conf $(WDIR)/etc/udev/udev.conf
-       cp /etc/udev/rules.d/{05-*,2*,60-*} $(WDIR)/etc/udev/rules.d
-       sed -i 's/, *GROUP="[^"]*"//' $(WDIR)/etc/udev/rules.d/*
-       echo "blacklist generic" >$(WDIR)/etc/modprobe.conf
-       echo "blacklist ata_generic" >>$(WDIR)/etc/modprobe.conf
-       sed -e s/@VERSION@/$(VERSION)/ -e s/@LINKER@/$(LINKER)/ init.in 
>$(WDIR)/init
-       chmod 755 $(WDIR)/init
-       cp fakecd.iso.head $(WDIR)
-       mknod -m 640 $(WDIR)/dev/console c 5 1
-       mknod -m 664 $(WDIR)/dev/null c 1 3
-       cp 
/bin/{sh,dd,cat,cp,killall,ls,mkdir,mount,umount,sed,sleep,ln,rm,uname} 
$(WDIR)/bin
-       cp /lib/{librt.so.1,libpthread.so.0} $(WDIR)/lib
-       cp /lib/{libblkid.so.1,libc.so.6,libdl.so.2,$(LINKER)} $(WDIR)/lib
-       cp /lib/{libncursesw.so.5,libreadline.so.5,libhistory.so.5} $(WDIR)/lib
-       cp /lib/{libpthread.so.0,librt.so.1,libuuid.so.1} $(WDIR)/lib
-       cp /lib/{libvolume_id.so.0,libsysfs.so.2} $(WDIR)/lib
-       cp /usr/lib/libdevmapper.so.1.02 $(WDIR)/lib
-       cp -a /lib/udev $(WDIR)/lib
-       cp -a /lib/firmware/{aic94xx-seq.fw,ql*.bin} $(WDIR)/lib/firmware
-       cp /sbin/{losetup,blockdev,udevd,udevtrigger,udevsettle,modprobe} 
$(WDIR)/sbin
-       cp /sbin/pcmcia-{check-broken-cis,socket-startup} $(WDIR)/sbin
-       cp /usr/bin/stat $(WDIR)/bin
-       cp /usr/sbin/dmsetup $(WDIR)/sbin
-       find 
/lib/modules/*/kernel/drivers/{ata,base,block,cdrom,ide,ieee1394,firewire,hid,message,scsi,pcmcia,usb/{core,host,storage}}
 \
-           
/lib/modules/*/kernel/fs/{mbcache.ko,ext2,ext3,ext4,jbd,jbd2,jfs,reiserfs,reiser4,xfs,fat,vfat,ntfs,isofs,udf,nls}
 \
-           /lib/modules/*/kernel/lib -type f | cpio --make-directories -p 
$(WDIR)
-       for a in /lib/modules/* ; do ver=$${a##*/} ; depmod -b $(WDIR) $$ver ; 
done
-       cd $(WDIR); find . | cpio -o -H newc | gzip -9 > 
../initramfs_data.cpio.gz
-       cp initramfs_data.cpio.gz /boot/isolinux/initramfs_data.cpio.gz
-       rm -rf $(WDIR)
+       mkdir -p /usr/share/initramfs
+       cp fakecd.iso.head /usr/share/initramfs
+       sed -e 's/@LINKER@/$(LINKER)/' init.in >/usr/share/initramfs/init.in
+       sed -e 's/@LINKER@/$(LINKER)/' create-initramfs.in > 
/usr/bin/create-initramfs
+       chmod 755 /usr/bin/create-initramfs
 
 clean:
-       -rm -rf $(WDIR)
-       -rm -f initramfs_data*
 
 .PHONY: clean chroot compile-stage2

Modified: trunk/packages/linux/Makefile
===================================================================
--- trunk/packages/linux/Makefile       2007-10-20 07:08:58 UTC (rev 2123)
+++ trunk/packages/linux/Makefile       2007-10-21 14:38:05 UTC (rev 2124)
@@ -97,6 +97,7 @@
        make
        make modules_install
        cp -v arch/i386/boot/bzImage /boot/isolinux/linux
+       create-initramfs $(VERSION) $(VRS) /boot/isolinux/initramfs_data.cpio.gz
        sed 's/VERSION/$(VRS)/' ../fakes-for-fglrx/uname.in 
>../fakes-for-fglrx/uname
        sed 's/VERSION/$(VRS)/' ../fakes-for-fglrx/cat.in 
>../fakes-for-fglrx/cat
        chmod 755 ../fakes-for-fglrx/{uname,cat}

Modified: trunk/packages/linux64/Makefile
===================================================================
--- trunk/packages/linux64/Makefile     2007-10-20 07:08:58 UTC (rev 2123)
+++ trunk/packages/linux64/Makefile     2007-10-21 14:38:05 UTC (rev 2124)
@@ -105,6 +105,8 @@
        touch include/linux/ioctl32.h
        $(CROSS_MAKE)
        $(CROSS_MAKE) modules_install
+       cp -v arch/x86_64/boot/bzImage /boot/isolinux/linux64
+       create-initramfs $(VERSION) $(VRS) 
/boot/isolinux/initramfs_data64.cpio.gz
        sed 's/VERSION/$(VRS)/' ../fakes-for-fglrx/uname.in 
>../fakes-for-fglrx/uname
        sed 's/VERSION/$(VRS)/' ../fakes-for-fglrx/cat.in 
>../fakes-for-fglrx/cat
        chmod 755 ../fakes-for-fglrx/{uname,cat}
@@ -133,16 +135,13 @@
            make KDIR=`pwd`/.. ; make KDIR=`pwd`/.. install
 ifeq ($(CD_ARCH),x86)
        rm /lib/modules/*-64bit/{source,build}
-       cp -v arch/x86_64/boot/bzImage /boot/isolinux/linux64
 endif
 ifeq ($(CD_ARCH),x86_64)
-       cp -v arch/x86_64/boot/bzImage /boot/isolinux/linux
        rm -rf $(DIR2) $(DIR3) $(DIR4) $(DIR5) $(DIR6) $(DIR7) $(DIR8) $(DIR9) 
$(DIR10)
        ../debian-style-headers.sh
 endif
        mv *.tgz /drivers
 
-
 clean:
        -rm -rf $(DIR)
        -rm -f fakes-for-fglrx/{uname,cat}

Modified: trunk/packages/syslinux/Makefile
===================================================================
--- trunk/packages/syslinux/Makefile    2007-10-20 07:08:58 UTC (rev 2123)
+++ trunk/packages/syslinux/Makefile    2007-10-21 14:38:05 UTC (rev 2124)
@@ -26,7 +26,8 @@
        cp -v F*.txt /boot/isolinux
        cp -v $(ROOT)/isolinux/{isolinux.cfg,boot.msg,splash.lss} /boot/isolinux
 ifeq ($(CD_ARCH),x86_64)
-       sed -i 's/kernel linux64/kernel linux/' /boot/isolinux/isolinux.cfg
+       sed -i  -e 's/kernel linux$$/kernel linux64/' \
+               -e 's/data_cpio/data64_cpio/'/boot/isolinux/isolinux.cfg
 endif
 
 clean:

-- 
http://linuxfromscratch.org/mailman/listinfo/livecd
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page

Reply via email to