Changeset 1994

Show
Ignore:
Timestamp:
07/29/07 13:23:06 (1 year ago)
Author:
jhuntwork
Message:

Merge 64-bit changes to minimal branch. Should be able to build either x86 or x86_64 from one set of scripts.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/minimal/Makefile

    r1989 r1994  
    1313# 
    1414 
    15 # Machine architecure, LiveCD version, and specific arch variables. 
    16 #============================================================================== 
    17  
    1815# Place your personal customizations in Makefile.personal 
    1916# instead of editing this Makefile. 
     
    2219-include Makefile.personal 
    2320 
    24 #============================================================================== 
    25  
    26 # Here are the various variables you might want/need to change. You can change 
    27 # them here or in Makefile.personal. Variables mentioned in the README will not 
    28 # be commented on here. 
     21# Here are the various variables you might want/need to change. 
     22# Variables mentioned in the README will not be commented on here. 
    2923 
    3024export MPBASE ?= /mnt/lfs 
     
    3327ROOTFS_MEGS := 1536 
    3428 
    35 export VERSION ?= x86-6.3-min-pre2 
    36 export CFLAGS ?= -O2 -pipe -s -fno-strict-aliasing -mtune=i686 
     29# Machine architecure, LiveCD version, and specific arch variables. 
     30#============================================================================== 
     31 
     32export CD_ARCH := $(shell uname -m | sed 's|i[3456]|x|') 
     33export VERSION ?= $(CD_ARCH)-6.3-min-pre2 
     34export CFLAGS ?= -O2 -pipe -s -fno-strict-aliasing 
     35 
     36ifeq ($(CD_ARCH),x86) 
     37export LFS_TARGET ?= i486-pc-linux-gnu 
     38export CFLAGS := $(CFLAGS) -mtune=i686 
     39export LINKER := ld-linux.so.2 
     40endif 
     41 
     42ifeq ($(CD_ARH),x86_64) 
     43export 64bit = true 
     44export LFS_TARGET ?= $(MACHTYPE) 
     45export LINKER := ld-linux-x86-64.so.2 
     46endif 
     47 
    3748export CXXFLAGS ?= $(CFLAGS) 
    38 export LFS_TARGET ?= i486-pc-linux-gnu 
    39  
    4049 
    4150# Default timezone 
     
    101110        @if [ `whoami` != "root" ] ; then \ 
    102111         echo "You must be logged in as root." && exit 1 ; fi 
     112 
     113test-env: 
     114        env 
    103115 
    104116# This image should be kept as clean as possible, i.e.: 
     
    160172        -ln -s /proc/kcore $(MP)/dev/core 
    161173        touch $(MKTREE) 
     174ifdef 64bit 
     175        -if [ ! -L $(MP)/lib64 ] ; then ln -s lib $(MP)/lib64 ; fi 
     176        -if [ ! -L $(MP)/usr/lib64 ] ; then ln -s lib $(MP)/usr/lib64 ; fi 
     177endif 
    162178 
    163179# This target builds just a base LFS system, minus the kernel and bootscripts 
     
    263279        ch-sysfsutils ch-pcmcia-cs ch-pcmciautils \ 
    264280        ch-blfs-bootscripts ch-oui-data ch-hibernate-script ch-slang ch-mc \ 
    265         ch-fuse ch-dosfstools ch-ntfsprogs ch-bin86 ch-grub ch-lilo ch-syslinux \ 
    266         ch-binutils64 ch-gcc64 ch-linux64 ch-scsi-firmware ch-net-firmware \ 
    267         ch-initramfs 
     281        ch-fuse ch-dosfstools ch-ntfsprogs ch-bin86 ch-lilo ch-syslinux \ 
     282        ch-scsi-firmware ch-net-firmware ch-initramfs \ 
     283ifeq ($(CD_ARCH),x86) 
     284        ch-grub 
     285endif 
    268286        make update-caches 
    269287 
     
    349367 
    350368update-caches: 
    351         cd /usr/share/fonts ; mkfontscale ; mkfontdir ; fc-cache -f 
    352369        mandb -c 2>/dev/null 
    353370        echo 'dummy / ext2 defaults 0 0' >/etc/mtab 
  • branches/minimal/isolinux/isolinux.cfg

    r1769 r1994  
    88  kernel linux 
    99  append initrd=initramfs_data_cpio.gz 
    10  
    11 label linux64 
    12   kernel linux64 
    13   append initrd=initramfs_data_cpio.gz 
  • branches/minimal/isolinux/options.msg

    r1769 r1994  
    99792 = 1024x768x24    791 = 1024x768x16 
    1010789 = 800x600x24     788 = 800x600x16 
    11  
    12 A 64-bit kernel for use with CLFS is available as "linux64" 
    1311 
    1412To set your timezone, add TZ=your_timezone anywhere 
  • branches/minimal/packages/LFS-BOOK/Makefile

    r1973 r1994  
    1111#SHA-$(FILE)= 729bcf04d8e4ed0af3c58daf0d289e94d6385052 
    1212 
    13 REV= 8225 
     13REV= 8250 
    1414REVPARM= -r $(REV) 
    1515 
     16ifeq ($(CD_ARCH),x86) 
    1617URL= svn://svn.linuxfromscratch.org/LFS/trunk/BOOK 
     18endif 
     19ifeq ($(CD_ARCH),x86_64) 
     20URL= svn://svn.linuxfromscratch.org/LFS/branches/x86_64/BOOK 
     21endif 
    1722 
    1823# Targets 
     
    4146clean: 
    4247        -rm -rf tmp 
     48        -rm -rf $(ROOT)/root/tmp 
    4349 
    4450.PHONY: clean chroot compile-stage2 
  • branches/minimal/packages/bin86/Makefile

    r1884 r1994  
    99SHA-$(FILE)= 656f06b4b26d08412132e338baa25e42d713eeec 
    1010 
     11PATCH= $(DIR)-x86_64-1.patch 
     12URL-$(PATCH)= http://svn.cross-lfs.org/svn/repos/cross-lfs/trunk/patches/$(PATCH) 
     13SHA-$(PATCH)= 2c967c062fbee4e40ca1bf55feec2033e132e0a9 
     14 
    1115# Targets 
    1216 
     
    1721        'cd $(ROOT) && make ch-$(NM) $(chbash-post-bash)' 
    1822 
    19 stage2: Makefile $(FILE) 
     23stage2: Makefile $(FILE) $(PATCH) 
    2024        $(std_build) 
    2125 
    2226compile-stage2: 
     27ifeq ($(CD_ARCH),x86_64) 
     28        patch -Np1 -i ../$(PATCH) 
     29endif 
    2330        make PREFIX=/usr MANDIR=/usr/share/man/man1 
    2431        make PREFIX=/usr MANDIR=/usr/share/man/man1 install 
  • branches/minimal/packages/binutils/Makefile

    r1835 r1994  
    2525        unset CFLAGS ; make -C ld LIB_PATH=$(WD)/lib 
    2626        cp -v ld/ld-new $(WD)/bin 
     27ifdef 64bit 
     28        ln -s lib $(WD)/lib64 
     29endif 
    2730 
    2831adjust-toolchain: 
     
    3134        mv -v $(WD)/bin/{ld-new,ld} 
    3235        ln -sv $(WD)/bin/ld $(WD)/$$(gcc -dumpmachine)/bin/ld 
    33         gcc -dumpspecs | sed 's@^/lib/ld-linux.so.2@/tools&@g' \ 
     36        gcc -dumpspecs | sed 's@/lib[64]*/$(LINKER)@/tools&@g' \ 
    3437          > `dirname $$(gcc -print-libgcc-file-name)`/specs 
    3538        GCC_INCLUDEDIR=`dirname $$(gcc -print-libgcc-file-name)`/include && \ 
     
    6164        mv -v $(WD)/bin/{ld-new,ld} 
    6265        ln -sv $(WD)/bin/ld $(WD)/$$(gcc -dumpmachine)/bin/ld 
    63         gcc -dumpspecs | sed \ 
    64             -e 's@/tools/lib/ld-linux.so.2@/lib/ld-linux.so.2@g' \ 
     66        gcc -dumpspecs | sed -e 's@/tools@@g' \ 
    6567            -e '/\*startfile_prefix_spec:/{n;s@.*@/usr/lib/ @}' \ 
    6668            -e '/\*cpp:/{n;s@$$@ -isystem /usr/include@}' > \ 
  • branches/minimal/packages/gcc/Makefile

    r1973 r1994  
    2626        unset CFLAGS ; CC="gcc -B/usr/bin/" ../$(DIR)/configure --prefix=$(WD) \ 
    2727         --with-local-prefix=$(WD) --disable-nls --enable-shared \ 
    28          --enable-languages=c --enable-static 
     28         --enable-languages=c --enable-static --disable-multilib 
    2929        unset CFLAGS ; make bootstrap 
    3030        unset CFLAGS ; make install 
     
    4141         > gcc/Makefile.in 
    4242        cd ../$(DIR) ; patch -Np1 -i ../$(PATCH1) 
     43ifdef 64bit 
     44        cd ../$(DIR) ; cp -v gcc/config/i386/t-linux64{,.tmp} && \ 
     45         sed '/MULTILIB_OSDIRNAMES/d' gcc/config/i386/t-linux64.tmp \ 
     46         > gcc/config/i386/t-linux64 
     47endif 
    4348# --enable-static overrides the unsuitable default in config.site 
    4449        ../$(DIR)/configure --prefix=$(WD) \ 
    4550         --with-local-prefix=$(WD) --enable-clocale=gnu --enable-shared \ 
    4651         --enable-threads=posix --enable-__cxa_atexit --enable-languages=c,c++ \ 
    47          --disable-libstdcxx-pch --enable-static 
     52         --disable-libstdcxx-pch --enable-static --disable-multilib 
    4853        make 
    4954        make install 
     
    6671        ../$(DIR)/configure --prefix=/usr --libexecdir=/usr/lib \ 
    6772         --enable-shared --enable-threads=posix --enable-__cxa_atexit \ 
    68          --enable-clocale=gnu --enable-languages=c,c++ --enable-static 
     73         --enable-clocale=gnu --enable-languages=c,c++ --enable-static \ 
     74         --disable-multilib 
    6975        make 
    7076        -make -k check 
  • branches/minimal/packages/glibc/Makefile

    r1973 r1994  
    5151        cd ../$(DIR) ; unpack ../$(FILE2) ; mv glibc-libidn-$(VRS) libidn 
    5252        sed -i \ 
    53         's|libs -o|libs -L/usr/lib -Wl,-dynamic-linker=/lib/ld-linux.so.2 -o|' \ 
     53        's|libs -o|libs -L/usr/lib -Wl,-dynamic-linker=/lib/$(LINKER) -o|' \ 
    5454                ../$(DIR)/scripts/test-installation.pl 
    5555# LiveCD specific locale additions 
  • branches/minimal/packages/initramfs/Makefile

    r1985 r1994  
    2121compile-stage2: 
    2222        mkdir -p $(WDIR)/{bin,dev,etc/udev/rules.d,lib/firmware,sbin,sys,proc} 
     23ifdef 64bit 
     24        ln -s lib $(WDIR)/lib64 
     25endif 
    2326        cp /etc/udev/udev.conf $(WDIR)/etc/udev/udev.conf 
    2427        cp /etc/udev/rules.d/{05-*,2*,60-*} $(WDIR)/etc/udev/rules.d 
     
    3033        mknod -m 664 $(WDIR)/dev/null c 1 3 
    3134        cp /bin/{sh,dd,cat,cp,killall,mkdir,mount,umount,sed,sleep,ln,rm,uname} $(WDIR)/bin 
    32         cp /lib/{libblkid.so.1,libc.so.6,libdl.so.2,ld-linux.so.2} $(WDIR)/lib 
     35        cp /lib/{libblkid.so.1,libc.so.6,libdl.so.2,$(LINKER)} $(WDIR)/lib 
    3336        cp /lib/{libncursesw.so.5,libreadline.so.5,libhistory.so.5} $(WDIR)/lib 
    3437        cp /lib/{libpthread.so.0,librt.so.1,libuuid.so.1} $(WDIR)/lib 
  • branches/minimal/packages/initramfs/init.in

    r1985 r1994  
    1818nodhcp=0 
    1919cdtype= 
     20 
     21case `uname -m` in  
     22        i[3456]86) LINKER="ld-linux.so.2" ;; 
     23 
     24        x86_64) LINKER="ld-linux-x86-64.so.2" ;; 
     25esac 
    2026 
    2127find_cd() { 
     
    339345# Clean up and free some memory 
    340346rm -rf /bin /sbin /lib /sys /proc /dev /.tmpfs /init /fakecd.iso.head 
    341 ./lib/ld-linux.so.2 --library-path ./lib ./bin/mount -n --move . / 
    342 exec ../lib/ld-linux.so.2 --library-path ./lib ./usr/sbin/chroot . "$init" "$@" 
     347./lib/${LINKER} --library-path ./lib ./bin/mount -n --move . / 
     348exec ../lib/${LINKER} --library-path ./lib ./usr/sbin/chroot . "$init" "$@" 
  • branches/minimal/packages/linux/Makefile

    r1973 r1994  
    2626        mkdir -p /boot/isolinux 
    2727        make mrproper 
    28         cp ../config.x86 .config 
     28        cp ../config.$(CD_ARCH) .config 
    2929        make 
    3030        make modules_install 
     31ifeq $(CD_ARCH),x86) 
    3132        cp -v arch/i386/boot/bzImage /boot/isolinux/linux 
     33endif 
     34ifeq $(CD_ARCH),x86_64) 
     35        cp -v arch/x86_64/boot/bzImage /boot/isolinux/linux 
     36endif 
    3237        cd .. ; ./debian-style-headers.sh $(DIR) 
    3338 
  • branches/minimal/packages/traceroute/Makefile

    r1816 r1994  
    99SHA-$(FILE)= c68ec1b09539a8e9655c138031c3090bda92d5f1 
    1010 
     11PATCH= $(DIR)-update_config-1.patch 
     12URL-$(PATCH)= http://svn.cross-lfs.org/svn/repos/patches/$(NM)/$(PATCH) 
     13SHA-$(PATCH)= f52c3772bcd63f9f06137128d8e3b64c7c533743 
     14 
    1115# Targets 
    1216 
     
    1721        'cd $(ROOT) && make ch-$(NM) $(chbash-post-bash)' 
    1822 
    19 stage2: Makefile $(FILE) 
     23stage2: Makefile $(FILE) $(PATCH) 
    2024        $(std_build) 
    2125 
    2226compile-stage2: 
     27ifeq ($(CD_ARCH),x86_64) 
     28        patch -Np1 -i ../$(PATCH) 
     29endif 
    2330        sed -i -e 's/-o bin/-o root/' Makefile.in 
    2431        ./configure --prefix=/usr 
  • branches/minimal/packages/unzip/Makefile

    r1871 r1994  
    2121 
    2222compile-stage2: 
     23ifeq ($(CD_ARCH),x86) 
    2324        make -f unix/Makefile LOCAL_UNZIP=-D_FILE_OFFSET_BITS=64 linux 
     25else 
     26        make -f unix/Makefile LOCAL_UNZIP=-D_FILE_OFFSET_BITS=64 linux_noasm 
     27endif 
    2428        make prefix=/usr MANDIR=/usr/share/man/man1 install 
    2529 
  • branches/minimal/packages/zlib/Makefile

    r1816 r1994  
    2929 
    3030compile-stage2: 
    31         ./configure --prefix=/usr --shared --libdir=/lib 
    32         make 
     31        unset CFLAGS ; ./configure --prefix=/usr --shared --libdir=/lib 
     32        unset CFLAGS ; make 
    3333        make install 
    3434        rm /lib/libz.so 
    3535        ln -sf ../../lib/libz.so.$(VRS) /usr/lib/libz.so 
    3636        make clean 
    37         ./configure --prefix=/usr 
    38         make 
     37        unset CFLAGS ; ./configure --prefix=/usr 
     38        unset CFLAGS ; make 
    3939        make install 
    4040        chmod 644 /usr/lib/libz.a 
  • branches/minimal/scripts/functions

    r1927 r1994  
    55# Date  : 2005-07-17 
    66#============================================================================== 
     7 
     8define get_arch 
     9        @uname -m 
     10endef 
    711 
    812define echo_message 
  • branches/minimal/scripts/shutdown-helper

    r1985 r1994  
    11#!/bin/sh 
    22 
     3case `uname -m` in 
     4        i[3456]86) LINKER="ld-linux.so.2" ;; 
     5 
     6        x86_64) LINKER="ld-linux-x86-64.so.2" ;; 
     7esac 
     8 
    39FILES="/lib/libc.so.6 
    4 /lib/ld-linux.so.2 
     10/lib/${LINKER} 
    511/lib/libreadline.so.5 
    612/lib/libhistory.so.5