From b7d1d99f41dcf50a8635f608679947f4455a0c7c Mon Sep 17 00:00:00 2001 From: gobo72 Date: Fri, 4 Mar 2011 04:55:43 +0000 Subject: [PATCH] Ajout Makefile stage0 --- functions | 27 +++++--------- functions-update => functions-fpkg | 0 functions-ac => functions-ipkg | 0 stage0/INSTALL | 2 +- stage0/Makefile | 24 ++++++++++++ stage0/{install-1 => hv-install-1} | 4 +- stage0/{install-2 => hv-install-2} | 0 stage0/packages-update | 2 +- stage1/packages-update | 2 +- stage2/INSTALL | 59 +++++++----------------------- stage2/packages-update | 2 +- stage3/packages-update | 2 +- stage4/packages-update | 2 +- stage5/packages-update | 2 +- stage6/packages-update | 2 +- sysinfos | 9 +++-- 16 files changed, 62 insertions(+), 77 deletions(-) rename functions-update => functions-fpkg (100%) rename functions-ac => functions-ipkg (100%) create mode 100644 stage0/Makefile rename stage0/{install-1 => hv-install-1} (78%) rename stage0/{install-2 => hv-install-2} (100%) diff --git a/functions b/functions index 17dcbdb..89230b9 100644 --- a/functions +++ b/functions @@ -496,23 +496,14 @@ hv_groupadd() { arguments=${*} - set +e - + # The last argument is the group name while [ $# -ne 0 ]; do - last_argument=${*} + groupname=${*} shift done - groupadd ${arguments} - error=$? - - set -e - - if [ ${error} -eq 0 -o ${error} -eq 9 ]; then - # 9 means the group already exists - return ${EXIT_SUCCESS} - else - exit ${EXIT_FAILURE} + if ! cat /etc/group | egrep "^${groupname}:" 1> /dev/null 2>&1; then + groupadd ${arguments} fi } @@ -522,7 +513,7 @@ hv_useradd() { arguments="${*}" - # The last argument is the username + # The last argument is the user name while [ $# -ne 0 ]; do username=${*} shift @@ -753,9 +744,9 @@ ipkg_display_build_infos() # -l Unique identification label in 'install.log' # (default is package name and version) # -m Installation mode: -# ac Standard autoconf package, build in separate dir -# acnb Standard autoconf package, building in source dir -# nb No autoconf (configure) +# ac Standard autoconf package, build in separate dir (default) +# acnb Standard autoconf package, build in source dir +# noac No autoconf (configure) # gnome # xorg # pm @@ -847,7 +838,7 @@ ipkg() exec > ${PACKAGE_LOG} 2>&1 # Sourcing standard ac script. - source ${SCRDIR}/../functions-ac + source ${SCRDIR}/../functions-ipkg source ${SCRDIR}/${DEFAULT_IPKG_SCRIPT} ipkg_script ${ALT_SCRIPT_NAME} diff --git a/functions-update b/functions-fpkg similarity index 100% rename from functions-update rename to functions-fpkg diff --git a/functions-ac b/functions-ipkg similarity index 100% rename from functions-ac rename to functions-ipkg diff --git a/stage0/INSTALL b/stage0/INSTALL index 485fe6d..9ac34f1 100644 --- a/stage0/INSTALL +++ b/stage0/INSTALL @@ -9,4 +9,4 @@ Installation 2. Modify the 'sysinfos' configuration file to reflect your system configuration. -3. Launch './install-1' +3. Launch './hv-install-1' diff --git a/stage0/Makefile b/stage0/Makefile new file mode 100644 index 0000000..5fd7c05 --- /dev/null +++ b/stage0/Makefile @@ -0,0 +1,24 @@ +# Makefile for hvlinux + +# Pour émuler option command-line --silent ? +#.SILENT: + +# Idées pour future targets: +# clean +# strip +# compress -> compressdoc (à partir du stage2) +# dep +# list -> list installed packages and versions + +.PHONY: get test + +all: get + @./hv-install-1 + +# Fetch packages from network +get: + @./packages-update + +# Test integrity of packages +test: + @./packages-update test diff --git a/stage0/install-1 b/stage0/hv-install-1 similarity index 78% rename from stage0/install-1 rename to stage0/hv-install-1 index 1d6b6c8..260e3c4 100755 --- a/stage0/install-1 +++ b/stage0/hv-install-1 @@ -10,10 +10,10 @@ init_log_file rscr mult "Performing pre-install" pre-install -# Logging-in as 'lfs' user, and executing the install-2 script. The +# Logging-in as 'lfs' user, and executing the hv-install-2 script. The # 'su -' command starts with a clean environment and enters the home # directory of the user. -su - lfs -c "cd ${PWD}; ./install-2" +su - lfs -c "cd ${PWD}; ./hv-install-2" echo "Total build time: $(get_total_build_time ${LFS_LOG_FILE})h" diff --git a/stage0/install-2 b/stage0/hv-install-2 similarity index 100% rename from stage0/install-2 rename to stage0/hv-install-2 diff --git a/stage0/packages-update b/stage0/packages-update index a719bb4..b110c61 100755 --- a/stage0/packages-update +++ b/stage0/packages-update @@ -8,7 +8,7 @@ USE_HV_PATCHES=1 # Reading system configuration informations, functions and package versions. source ../sysinfos source ../functions -source ../functions-update +source ../functions-fpkg source ../packages-list update_packages_init diff --git a/stage1/packages-update b/stage1/packages-update index 7add361..bd39bce 100755 --- a/stage1/packages-update +++ b/stage1/packages-update @@ -6,7 +6,7 @@ USE_HV_PATCHES=1 # Reading system configuration informations, functions and package versions. source ../sysinfos source ../functions -source ../functions-update +source ../functions-fpkg source ../packages-list update_packages_init diff --git a/stage2/INSTALL b/stage2/INSTALL index d009cd4..bb329b6 100644 --- a/stage2/INSTALL +++ b/stage2/INSTALL @@ -1,57 +1,24 @@ +stage2: Installing basic system software + +Installation +------------ -Installation instructions -------------------------- +1. Launch ./hv-install-1 -Note: In this example, the destination partition is /dev/hda6, and - the sources partition is /dev/hda10. +2. Compile new kernel (enable loadable modules support) -1. Create and/or format the destination partition: - >$ mkreiserfs /dev/hda6 +3. Type 'exit' -2. Mount the partition: - >$ mount -t reiserfs /dev/hda6 /mnt/linux +4. Reboot. -3. In the destination partition root, create a directory that will - be used to mount the CD or hard disk partition containing the sources: - >$ cd /mnt/linux - >$ mkdir -p mnt/hvlinux +5. Run script /usr/local/bin/udev-create-persistent-net.sh -4. Mount the sources partition: - >$ mount -t reiserfs /dev/hda10 /mnt/linux/mnt/hvlinux - -5. Copy the tools directory to the LFS (/mnt/linux) partition: - >$ cp -a /mnt/linux/mnt/hvlinux/tools /mnt/linux - This is needed only if you did not run stage1 installation - -6. Modify the "/mnt/linux/mnt/hvlinux/scripts/sysinfos" file to - reflect your configuration. - -7. If you want a separate boot partition, make sure it is mounted - under ${LFS}/boot. - -8. Launch the installation of stage 2: - >$ /mnt/linux/mnt/hvlinux/scripts/stage2/install-1 - -9. After that, compile a fresh kernel. - (réactiver support pour les modules) - -10. type 'exit' - -11. You can now remove the /mnt/linux/tools directory. - -12. Reboot. - -13. When the GRUB prompt appears, install grub on the MBR with: +6. Optional. To install GRUB, launch 'grub'. When the GRUB prompt appears, + install grub on the MBR with (example with boot partition on first partition + of first disk): grub> root (hd0,0) grub> setup (hd0) grub> reboot -14. login as root, and create the password for the regular user: +7. Login as root, and create the password for the regular user: >$ passwd reguser - -Post-install guide ------------------- - 1. Compiler nouveau kernel - 2. Ajouter une entrée à /boot/grub/menu.lst - 3. Effacer le répertoire /tools et /cross-tools - 4. Rouler le script /usr/local/bin/udev-create-persistent-net.sh diff --git a/stage2/packages-update b/stage2/packages-update index fd9ba07..9bb528a 100755 --- a/stage2/packages-update +++ b/stage2/packages-update @@ -8,7 +8,7 @@ USE_HV_PATCHES=1 # Reading system configuration informations, functions and package versions. source ../sysinfos source ../functions -source ../functions-update +source ../functions-fpkg source ../packages-list update_packages_init diff --git a/stage3/packages-update b/stage3/packages-update index 8d5f230..3d0b79b 100755 --- a/stage3/packages-update +++ b/stage3/packages-update @@ -7,7 +7,7 @@ USE_HV_PATCHES=1 # Reading system configuration informations, functions and package versions. source ../sysinfos source ../functions -source ../functions-update +source ../functions-fpkg source ../packages-list update_packages_init diff --git a/stage4/packages-update b/stage4/packages-update index 5d0f82a..dd607d5 100755 --- a/stage4/packages-update +++ b/stage4/packages-update @@ -7,7 +7,7 @@ USE_HV_PATCHES=1 # Reading system configuration informations, functions and package versions. source ../sysinfos source ../functions -source ../functions-update +source ../functions-fpkg source ../packages-list # Execute a return statement instead of exit, to be able to continue with diff --git a/stage5/packages-update b/stage5/packages-update index 247ef96..7532cdf 100755 --- a/stage5/packages-update +++ b/stage5/packages-update @@ -7,7 +7,7 @@ USE_HV_PATCHES=1 # Reading system configuration informations, functions and package versions. source ../sysinfos source ../functions -source ../functions-update +source ../functions-fpkg source ../packages-list # Execute a return statement instead of exit, to be able to continue with diff --git a/stage6/packages-update b/stage6/packages-update index 3213409..1ca8aed 100644 --- a/stage6/packages-update +++ b/stage6/packages-update @@ -3,7 +3,7 @@ # Reading system configuration informations, functions and package versions. source ../sysinfos source ../functions -source ../functions-update +source ../functions-fpkg source ../packages-list update_packages_init diff --git a/sysinfos b/sysinfos index 4607dfb..f5a38dc 100644 --- a/sysinfos +++ b/sysinfos @@ -17,7 +17,7 @@ REGUSER="hugo" # Destination path where to install new Linux-HV system. This is usually where # you have mounted your new LFS partition, but it can also be any directory. # This is relevant only for stage 0 and 1. -LFS="/mnt/hvlinux" +LFS="/mnt/stockage/hvlinux-hp-mini" # Destination partition where to install new Linux-HV system LFS_PARTITION="/dev/sdb7" @@ -33,10 +33,13 @@ SWAP_PARTITION="/dev/sdb2" # arm926t - ARM 926T little endian # x86 (i686) # x86_64 (AMD Athlon 64) -HVL_TARGET="x86_64" +HVL_TARGET="x86" # Used for setting '-march=xxx' option in CFLAGS and CPPFLAGS -MACHINE_ARCHITECTURE="" +# GCC-4.5 +MARCH_FLAGS="-march=atom -mssse3 -mfpmath=sse -fomit-frame-pointer" +# GCC < 4.5 +MARCH_FLAGS="-march=core2 -mtune=generic -mssse3 -mfpmath=sse -fomit-frame-pointer" # Keyboard mapping (example: us) KEYBOARD="us" -- 2.20.1