r2846 - in jhalfs/branches/experimental: . HLFS menu

georgeb at linuxfromscratch.org georgeb at linuxfromscratch.org
Thu Jul 27 14:37:58 PDT 2006


Author: georgeb
Date: 2006-07-27 15:37:57 -0600 (Thu, 27 Jul 2006)
New Revision: 2846

Added:
   jhalfs/branches/experimental/menu/BusyBox-1.1.3-menu.patch
Removed:
   jhalfs/branches/experimental/menu/BusyBox-1.2.3-menu.patch
Modified:
   jhalfs/branches/experimental/Config.in
   jhalfs/branches/experimental/HLFS/hlfs.xsl
   jhalfs/branches/experimental/HLFS/master.sh
   jhalfs/branches/experimental/Makefile
Log:
Changes to Config.in. Adapt ./HLFS/master.sh to the latest svn (major changes in book

Modified: jhalfs/branches/experimental/Config.in
===================================================================
--- jhalfs/branches/experimental/Config.in	2006-07-27 00:40:54 UTC (rev 2845)
+++ jhalfs/branches/experimental/Config.in	2006-07-27 21:37:57 UTC (rev 2846)
@@ -41,7 +41,7 @@
 	endchoice
 
 	config	BRANCH_ID
-		string	"Branch (manditory)"
+		string	"Branch (mandatory)"
 		default	"**EDIT ME**"
 		depends	BRANCH
 		help
@@ -49,7 +49,7 @@
 			#   http://wiki.linuxfromscratch.org/alfs/wiki/SupportedBooks
 
 	config	BOOK
-		string	"Loc of working copy (manditory)"
+		string	"Loc of working copy (mandatory)"
 		default	"**EDIT ME**"
 		depends	WORKING_COPY
 		help
@@ -197,7 +197,7 @@
 		default "boot"		if BUILD_ROOT
 		
 	config	BOOT_CONFIG
-		string	"BOOT kernel config file (manditory)"
+		string	"BOOT kernel config file (mandatory)"
 		default ""
 		depends on BUILD_BOOT
 		help

Modified: jhalfs/branches/experimental/HLFS/hlfs.xsl
===================================================================
--- jhalfs/branches/experimental/HLFS/hlfs.xsl	2006-07-27 00:40:54 UTC (rev 2845)
+++ jhalfs/branches/experimental/HLFS/hlfs.xsl	2006-07-27 21:37:57 UTC (rev 2846)
@@ -94,9 +94,7 @@
           </xsl:otherwise>
         </xsl:choose>
         <xsl:if test="(sect2[@role='installation'] and
-                     not(@id='bootable-kernel')) or
-                     @id='ch-tools-adjusting' or
-                     @id='ch-system-readjusting'">
+                     not(@id='bootable-kernel'))">
           <xsl:text>cd $PKGDIR&#xA;</xsl:text>
           <xsl:if test="@id='ch-tools-uclibc' or @id='ch-system-uclibc'">
              <xsl:text>pushd ../; tar -xvf gettext-&gettext-version;.*; popd; &#xA;</xsl:text>
@@ -117,15 +115,18 @@
              <xsl:text>pushd ../; tar -xvf blfs-bootscripts-&blfs-bootscripts-version;.* ; popd; &#xA;</xsl:text>
           </xsl:if>
         </xsl:if>
-        <xsl:if test="@id='ch-system-kernfs'">
-          <xsl:text>export HLFS=$LFS&#xA;</xsl:text>
-        </xsl:if>
         <xsl:apply-templates select=".//para/userinput | .//screen"/>
         <xsl:text>exit</xsl:text>
       </exsl:document>
     </xsl:if>
   </xsl:template>
 
+  <xsl:template match="literal">
+    <xsl:if test="@condition=$model or not(@condition)">
+      <xsl:apply-templates/>
+    </xsl:if>
+  </xsl:template>
+  
   <xsl:template match="screen">
     <xsl:if test="(@condition=$model or not(@condition)) and
                   child::* = userinput and not(@role = 'nodump')">

Modified: jhalfs/branches/experimental/HLFS/master.sh
===================================================================
--- jhalfs/branches/experimental/HLFS/master.sh	2006-07-27 00:40:54 UTC (rev 2845)
+++ jhalfs/branches/experimental/HLFS/master.sh	2006-07-27 21:37:57 UTC (rev 2846)
@@ -7,24 +7,108 @@
 ###          FUNCTIONS          ###
 ###################################
 
+#----------------------------------#
+wrt_ExecuteAsUser() {              # Execute the file ($3) under the users account ($1), log in $2
+#----------------------------------#
+  local this_user=$1
+  local this_script=$2
+  local file=$3
+ 
+(
+cat << EOF
+	@( time { su - ${this_user} -c "source /home/${this_user}/.bashrc && $JHALFSDIR/${PROGNAME}-commands/$file" >>logs/$this_script 2>&1 ; } ) 2>>logs/$this_script && \\
+	echo -e "\nKB: \`du -skx --exclude=${SCRIPT_ROOT} \$(MOUNT_PT)\`\n" >>logs/$this_script
+EOF
+) >> $MKFILE.tmp
+}
 
+
+#----------------------------------#
+wrt_Unpack_SetOwner() {            # Unpack and set owner. Assign 'ROOT' var
+#----------------------------------#
+  local USER_ACCT=$1
+  local FILE=$2
+  local optSAVE_PREVIOUS=$3
+
+  if [ "${optSAVE_PREVIOUS}" != "1" ]; then
+    wrt_remove_existing_dirs "$FILE"
+  fi
+(
+cat << EOF
+	@\$(call unpack,$FILE)
+	@ROOT=\`head -n1 \$(MOUNT_PT)\$(SRC)/\$(PKG_LST) | sed 's@^./@@;s@/.*@@'\` && \\
+	echo "export PKGDIR=\$(MOUNT_PT)\$(SRC)/\$\$ROOT" > envars && \\
+	chown -R ${USER_ACCT} \$(MOUNT_PT)\$(SRC)/\$\$ROOT
+EOF
+) >> $MKFILE.tmp
+}
+
 #----------------------------#
-chapter3_Makefiles() {       # Initialization of the system
+process_toolchain() {        # embryo,cocoon and butterfly need special handling
 #----------------------------#
-  local TARGET LOADER
+  local toolchain=$1
+  local this_script=$2
+  local  tc_phase
 
-  echo "${tab_}${GREEN}Processing... ${L_arrow}Chapter3${R_arrow}"
+  echo "${tab_}${tab_}${GREEN}toolchain ${L_arrow}${toolchain}${R_arrow}"
 
-  # Define a few model dependant variables
-  if [[ ${MODEL} = "uclibc" ]]; then
-    TARGET="tools-linux-uclibc"; LOADER="ld-uClibc.so.0"
+  pkg_tarball=$(get_package_tarball_name "binutils")
+  wrt_Unpack_SetOwner "hlfs" "$pkg_tarball" 1
+  pkg_tarball=$(get_package_tarball_name "gcc-core")
+  wrt_Unpack_SetOwner "hlfs" "$pkg_tarball" 1
+  pkg_tarball=$(get_package_tarball_name "gcc-g++")
+  wrt_Unpack_SetOwner "hlfs" "$pkg_tarball" 1
+(
+cat << EOF
+	@echo "export PKGDIR=\$(MOUNT_PT)\$(SRC)" > envars
+EOF
+) >> $MKFILE.tmp
+  if [[ ${toolchain} = "butterfly-toolchain" ]]; then
+    [[ "$TEST" != "0" ]] && wrt_test_log2 "${this_script}"
+    wrt_run_as_chroot1 "$toolchain" "$this_script"
   else
-    TARGET="tools-linux-gnu";    LOADER="ld-linux.so.2"
+    wrt_ExecuteAsUser "hlfs" "$toolchain" "$this_script"
   fi
 
-  # NOTE: We use the lfs username and groupname also in HLFS
-  # If /home/lfs is already present in the host, we asume that the
-  # lfs user and group are also presents in the host, and a backup
+  pkg_tarball=$(get_package_tarball_name "binutils")
+  wrt_remove_existing_dirs  "$pkg_tarball"
+  pkg_tarball=$(get_package_tarball_name "gcc-core")
+  wrt_remove_existing_dirs  "$pkg_tarball"
+
+  # Manually remove the toolchain directories..
+  tc_phase=`echo $toolchain | sed -e 's@[0-9]\{3\}-@@' -e 's at -toolchain@@'`
+  case $tc_phase in 
+    embryo | cocoon)  # toolchain phase
+(
+cat << EOF
+	@rm -r \$(MOUNT_PT)\$(SRC)/${tc_phase}-toolchain && \\
+	rm  -r \$(MOUNT_PT)\$(SRC)/${tc_phase}-build
+EOF
+) >> $MKFILE.tmp
+    ;;    
+    butterfly )	# system phase
+(
+cat << EOF
+	@rm -r \$(SRC)/butterfly-toolchain && \\
+	rm -r \$(SRC)/butterfly-build
+EOF
+) >> $MKFILE.tmp
+    ;;
+  esac
+
+}
+
+
+#----------------------------#
+chapter3_Makefiles() {       # Initialization of the system
+#----------------------------#
+
+  echo "${tab_}${GREEN}Processing... ${L_arrow}Chapter3${R_arrow}"
+
+
+  # NOTE: We use the hlfs username and groupname also in HLFS
+  # If /home/hlfs is already present in the host, we asume that the
+  # hlfs user and group are also presents in the host, and a backup
   # of their bash init files is made.
 (
 cat << EOF
@@ -43,38 +127,35 @@
 
 021-addinguser:  020-creatingtoolsdir
 	@\$(call echo_message, Building)
-	@if [ ! -d /home/lfs ]; then \\
-		groupadd lfs; \\
-		useradd -s /bin/bash -g lfs -m -k /dev/null lfs; \\
+	@if [ ! -d /home/hlfs ]; then \\
+		groupadd hlfs; \\
+		useradd -s /bin/bash -g hlfs -m -k /dev/null hlfs; \\
 	else \\
-		touch user-lfs-exist; \\
+		touch user-hlfs-exist; \\
 	fi;
-	@chown lfs \$(MOUNT_PT)/tools && \\
-	chown lfs \$(MOUNT_PT)/sources && \\
+	@chown hlfs \$(MOUNT_PT)/tools && \\
+	chown hlfs \$(MOUNT_PT)/sources && \\
 	touch \$@ && \\
 	echo " "\$(BOLD)Target \$(BLUE)\$@ \$(BOLD)OK && \\
 	echo --------------------------------------------------------------------------------\$(WHITE)
 
 022-settingenvironment:  021-addinguser
 	@\$(call echo_message, Building)
-	@if [ -f /home/lfs/.bashrc -a ! -f /home/lfs/.bashrc.XXX ]; then \\
-		mv /home/lfs/.bashrc /home/lfs/.bashrc.XXX; \\
+	@if [ -f /home/hlfs/.bashrc -a ! -f /home/hlfs/.bashrc.XXX ]; then \\
+		mv /home/hlfs/.bashrc /home/hlfs/.bashrc.XXX; \\
 	fi;
-	@if [ -f /home/lfs/.bash_profile  -a ! -f /home/lfs/.bash_profile.XXX ]; then \\
-		mv /home/lfs/.bash_profile /home/lfs/.bash_profile.XXX; \\
+	@if [ -f /home/hlfs/.bash_profile  -a ! -f /home/hlfs/.bash_profile.XXX ]; then \\
+		mv /home/hlfs/.bash_profile /home/hlfs/.bash_profile.XXX; \\
 	fi;
-	@echo "set +h" > /home/lfs/.bashrc && \\
-	echo "umask 022" >> /home/lfs/.bashrc && \\
-	echo "HLFS=\$(MOUNT_PT)" >> /home/lfs/.bashrc && \\
-	echo "LC_ALL=POSIX" >> /home/lfs/.bashrc && \\
-	echo "PATH=/tools/bin:/bin:/usr/bin" >> /home/lfs/.bashrc && \\
-	echo "export HLFS LC_ALL PATH" >> /home/lfs/.bashrc && \\
-	echo "" >> /home/lfs/.bashrc && \\
-	echo "target=$(uname -m)-${TARGET}" >> /home/lfs/.bashrc && \\
-	echo "ldso=/tools/lib/${LOADER}" >> /home/lfs/.bashrc && \\
-	echo "export target ldso" >> /home/lfs/.bashrc && \\
-	echo "source $JHALFSDIR/envars" >> /home/lfs/.bashrc && \\
-	chown lfs:lfs /home/lfs/.bashrc && \\
+	@echo "set +h" > /home/hlfs/.bashrc && \\
+	echo "umask 022" >> /home/hlfs/.bashrc && \\
+	echo "HLFS=\$(MOUNT_PT)" >> /home/hlfs/.bashrc && \\
+	echo "LC_ALL=POSIX" >> /home/hlfs/.bashrc && \\
+	echo "PATH=/tools/bin:/bin:/usr/bin" >> /home/hlfs/.bashrc && \\
+	echo "export HLFS LC_ALL PATH" >> /home/hlfs/.bashrc && \\
+	echo "" >> /home/hlfs/.bashrc && \\
+	echo "source $JHALFSDIR/envars" >> /home/hlfs/.bashrc && \\
+	chown hlfs:hlfs /home/hlfs/.bashrc && \\
 	touch envars && \\
 	touch \$@ && \\
 	echo " "\$(BOLD)Target \$(BLUE)\$@ \$(BOLD)OK && \\
@@ -115,12 +196,10 @@
 
     # Grab the name of the target (minus the -headers or -cross in the case of gcc
     # and binutils in chapter 5)
-    name=`echo $this_script | sed -e 's@[0-9]\{3\}-@@' -e 's at -cross@@' -e 's at -headers@@'`
+    name=`echo $this_script | sed -e 's@[0-9]\{3\}-@@' `
 
     # Adjust 'name'
     case $name in
-      linux-libc) name="linux-libc-headers" ;;
-      gcc)        name="gcc-core"  ;;
       uclibc)     name="uClibc"  ;;
     esac
 
@@ -133,66 +212,42 @@
     #
     # Drop in the name of the target on a new line, and the previous target
     # as a dependency. Also call the echo_message function.
+    
+    # This is a very special script and requires manual processing
+    # NO Optimization allowed
+    if [[ ${name} = "embryo-toolchain" ]] || \
+       [[ ${name} = "cocoon-toolchain" ]]; then
+       wrt_target "$this_script" "$PREV"
+         process_toolchain "${this_script}" "${file}"
+       wrt_touch
+       PREV=$this_script
+       continue
+    fi
+    #
     wrt_target "$this_script" "$PREV"
-
     # Find the version of the command files, if it corresponds with the building of
     # a specific package
     pkg_tarball=$(get_package_tarball_name $name)
     # If $pkg_tarball isn't empty, we've got a package...
     if [ "$pkg_tarball" != "" ] ; then
       # Insert instructions for unpacking the package and to set the PKGDIR variable.
-      case $this_script in
-        *binutils* )  wrt_unpack "$pkg_tarball" 1 ;; # Do not delete an existing package directories
-        *)            wrt_unpack "$pkg_tarball" ;;
-      esac
+      wrt_Unpack_SetOwner "hlfs" "$pkg_tarball"
       # If the testsuites must be run, initialize the log file
       [[ "$TEST" = "3" ]] && wrt_test_log "${this_script}"
       # If using optimizations, write the instructions
       [[ "$OPTIMIZE" = "2" ]] &&  wrt_optimize "$name" && wrt_makeflags "$name"
     fi
-
-    case $this_script in
-      *binutils* )  # Dump the path to sources directory for later removal
-(
-cat << EOF
-	@ROOT=\`head -n1 \$(MOUNT_PT)\$(SRC)/\$(PKG_LST) | sed 's@^./@@;s@/.*@@'\` && \\
-	echo "\$(MOUNT_PT)\$(SRC)/\$\$ROOT" >> sources-dir
-EOF
-) >> $MKFILE.tmp
-        ;;
-      *adjusting* )  # For the Adjusting phase we must to cd to the binutils-build directory.
-        echo -e '\t at echo "export PKGDIR=$(MOUNT_PT)$(SRC)/binutils-build" > envars' >> $MKFILE.tmp
-        ;;
-    esac
-
     # Insert date and disk usage at the top of the log file, the script run
     # and date and disk usage again at the bottom of the log file.
-    wrt_run_as_su "${this_script}" "${file}"
+    wrt_ExecuteAsUser "hlfs" "$this_script" "${file}"
 
     # Remove the build directory(ies) except if the package build fails
     # (so we can review config.cache, config.log, etc.)
     # For Binutils the sources must be retained for some time.
     if [ "$pkg_tarball" != "" ] ; then
-      case "${this_script}" in
-        *binutils*) : ;;   # do NOTHING
-	*gcc*) wrt_remove_build_dirs "gcc"    ;;
-        *)     wrt_remove_build_dirs "$name"    ;;
-      esac
+       wrt_remove_build_dirs "$name"
     fi
 
-    # Remove the Binutils pass 1 sources after a successful Adjusting phase.
-    case "${this_script}" in
-     *adjusting*)
-(
-cat << EOF
-	@rm -r \`cat sources-dir\` && \\
-	rm -r \$(MOUNT_PT)\$(SRC)/binutils-build && \\
-	rm sources-dir
-EOF
-) >> $MKFILE.tmp
-      ;;
-    esac
-
     # Include a touch of the target name so make can check if it's already been made.
     wrt_touch
     #
@@ -209,7 +264,6 @@
 #----------------------------#
 chapter6_Makefiles() {       # sysroot or chroot build phase
 #----------------------------#
-  local TARGET LOADER
   local file
   local this_script
   # Set envars and scripts for iteration targets
@@ -237,14 +291,6 @@
   fi
 
   echo "${tab_}${GREEN}Processing... ${L_arrow}Chapter6$N${R_arrow}"
-  #
-  # Set these definitions early and only once
-  #
-  if [[ ${MODEL} = "uclibc" ]]; then
-    TARGET="pc-linux-uclibc"; LOADER="ld-uClibc.so.0"
-  else
-    TARGET="pc-linux-gnu";    LOADER="ld-linux.so.2"
-  fi
 
   for file in chapter06$N/* ; do
     # Keep the script file name
@@ -268,11 +314,9 @@
     #
     case $name in
       glibc)  sed 's/rm /rm -f /' -i chapter06$N/$this_script        ;;
-      gcc)    sed 's/rm /rm -f /' -i chapter06$N/$this_script        ;;
     esac
 
     case $name in
-      gcc)     name="gcc-core" ;;
       uclibc)  name="uClibc"   ;;
     esac
 
@@ -301,17 +345,24 @@
     #--------------------------------------------------------------------#
     #
     # Drop in the name of the target on a new line, and the previous target
-    # as a dependency. Also call the echo_message function.		
+    # as a dependency. Also call the echo_message function.
+    if [[ ${name} = "butterfly-toolchain" ]]; then
+       wrt_target "$this_script" "$PREV"
+         process_toolchain "${this_script}" "${file}"
+       wrt_touch
+       PREV=$this_script
+       continue
+    fi
+
     wrt_target "${this_script}${N}" "$PREV"
 
     # If $pkg_tarball isn't empty, we've got a package...
     # Insert instructions for unpacking the package and changing directories
     if [ "$pkg_tarball" != "" ] ; then
       wrt_unpack2 "$pkg_tarball"
-      wrt_target_vars
       # If the testsuites must be run, initialize the log file
       case $name in
-        binutils | gcc-core | glibc )
+        glibc )
           [[ "$TEST" != "0" ]] && wrt_test_log2 "${this_script}"
           ;;
         * )
@@ -322,12 +373,6 @@
       [[ "$OPTIMIZE" != "0" ]] &&  wrt_optimize "$name" && wrt_makeflags "$name"
     fi
 
-    case $this_script in
-      *readjusting*) # For the Re-Adjusting phase we must to cd to the binutils-build directory.
-        echo -e '\t at echo "export PKGDIR=$(SRC)/binutils-build" > envars' >> $MKFILE.tmp
-        ;;
-    esac
-
     # In the mount of kernel filesystems we need to set LFS and not to use chroot.
     case "${this_script}" in
       *kernfs*)
@@ -343,19 +388,6 @@
       wrt_remove_build_dirs "$name"
     fi
     #
-    # Remove the Binutils pass 2 sources after a successful Re-Adjusting phase.
-    case "${this_script}" in
-      *readjusting*)
-(
-cat << EOF
-	@rm -r \`cat sources-dir\` && \\
-	rm -r \$(MOUNT_PT)\$(SRC)/binutils-build && \\
-	rm sources-dir
-EOF
-) >> $MKFILE.tmp
-      ;;
-    esac
-
     # Include a touch of the target name so make can check if it's already been made.
     wrt_touch
     #
@@ -519,7 +551,7 @@
 
 chapter3:  020-creatingtoolsdir 021-addinguser 022-settingenvironment
 
-chapter5:  chapter3 $chapter5 restore-lfs-env
+chapter5:  chapter3 $chapter5 restore-hlfs-env
 
 chapter6:  chapter5 $chapter6
 
@@ -533,18 +565,18 @@
 restart: restart_code all
 
 clean-chapter3:
-	-if [ ! -f user-lfs-exist ]; then \\
-		userdel lfs; \\
-		rm -rf /home/lfs; \\
+	-if [ ! -f user-hlfs-exist ]; then \\
+		userdel hlfs; \\
+		rm -rf /home/hlfs; \\
 	fi;
 	rm -rf \$(MOUNT_PT)/tools
 	rm -f /tools
-	rm -f envars user-lfs-exist
+	rm -f envars user-hlfs-exist
 	rm -f 02* logs/02*.log
 
 clean-chapter5:
 	rm -rf \$(MOUNT_PT)/tools/*
-	rm -f $chapter5 restore-lfs-env sources-dir
+	rm -f $chapter5 restore-hlfs-env sources-dir
 	cd logs && rm -f $chapter5 && cd ..
 
 clean-chapter6:
@@ -561,15 +593,15 @@
 	rm -f $chapter7
 	cd logs && rm -f $chapter7 && cd ..
 
-restore-lfs-env:
+restore-hlfs-env:
 	@\$(call echo_message, Building)
-	@if [ -f /home/lfs/.bashrc.XXX ]; then \\
-		mv -f /home/lfs/.bashrc.XXX /home/lfs/.bashrc; \\
+	@if [ -f /home/hlfs/.bashrc.XXX ]; then \\
+		mv -f /home/hlfs/.bashrc.XXX /home/hlfs/.bashrc; \\
 	fi;
-	@if [ -f /home/lfs/.bash_profile.XXX ]; then \\
-		mv /home/lfs/.bash_profile.XXX /home/lfs/.bash_profile; \\
+	@if [ -f /home/hlfs/.bash_profile.XXX ]; then \\
+		mv /home/hlfs/.bash_profile.XXX /home/hlfs/.bash_profile; \\
 	fi;
-	@chown lfs:lfs /home/lfs/.bash* && \\
+	@chown hlfs:hlfs /home/hlfs/.bash* && \\
 	touch \$@ && \\
 	echo " "\$(BOLD)Target \$(BLUE)\$@ \$(BOLD)OK && \\
 	echo --------------------------------------------------------------------------------\$(WHITE)
@@ -580,9 +612,9 @@
 	@-umount \$(MOUNT_PT)/dev
 	@-umount \$(MOUNT_PT)/sys
 	@-umount \$(MOUNT_PT)/proc
-	@-if [ ! -f user-lfs-exist ]; then \\
-		userdel lfs; \\
-		rm -rf /home/lfs; \\
+	@-if [ ! -f user-hlfs-exist ]; then \\
+		userdel hlfs; \\
+		rm -rf /home/hlfs; \\
 	fi;
 
 restart_code:

Modified: jhalfs/branches/experimental/Makefile
===================================================================
--- jhalfs/branches/experimental/Makefile	2006-07-27 00:40:54 UTC (rev 2845)
+++ jhalfs/branches/experimental/Makefile	2006-07-27 21:37:57 UTC (rev 2846)
@@ -1,5 +1,6 @@
 # From the Build Scripts Written By: Jim Gifford <lfs at jg555.com>
-# Modified By: Joe Ciccone <jciccone at linuxfromscratch.org>
+# Modified By: Joe Ciccone <jciccone at linuxfromscratch.org
+# Additional changes: George Boudreau <georgeb at linuxfromscratch.org>
 
 TOPDIR=$(shell pwd)
 CONFIG_CONFIG_IN = Config.in

Copied: jhalfs/branches/experimental/menu/BusyBox-1.1.3-menu.patch (from rev 2844, jhalfs/branches/experimental/menu/BusyBox-1.2.3-menu.patch)
===================================================================
--- jhalfs/branches/experimental/menu/BusyBox-1.1.3-menu.patch	                        (rev 0)
+++ jhalfs/branches/experimental/menu/BusyBox-1.1.3-menu.patch	2006-07-27 21:37:57 UTC (rev 2846)
@@ -0,0 +1,507 @@
+diff -Npr menu-bb/conf.c menu/conf.c
+*** menu-bb/conf.c	2006-03-22 16:16:18.000000000 -0500
+--- menu/conf.c	2006-07-26 17:26:45.000000000 -0400
+*************** int main(int ac, char **av)
+*** 535,554 ****
+  	conf_parse(name);
+  	//zconfdump(stdout);
+  	switch (input_mode) {
+- 	case set_default:
+- 		if (!defconfig_file)
+- 			defconfig_file = conf_get_default_confname();
+- 		if (conf_read(defconfig_file)) {
+- 			printf("***\n"
+- 				"*** Can't find default configuration \"%s\"!\n"
+- 				"***\n", defconfig_file);
+- 			exit(1);
+- 		}
+- 		break;
+  	case ask_silent:
+  		if (stat(".config", &tmpstat)) {
+  			printf("***\n"
+! 				"*** You have not yet configured BusyBox!\n"
+  				"***\n"
+  				"*** Please run some configurator (e.g. \"make oldconfig\" or\n"
+  				"*** \"make menuconfig\" or \"make config\").\n"
+--- 535,544 ----
+  	conf_parse(name);
+  	//zconfdump(stdout);
+  	switch (input_mode) {
+  	case ask_silent:
+  		if (stat(".config", &tmpstat)) {
+  			printf("***\n"
+! 				"*** You have not yet configured JHALFS!\n"
+  				"***\n"
+  				"*** Please run some configurator (e.g. \"make oldconfig\" or\n"
+  				"*** \"make menuconfig\" or \"make config\").\n"
+*************** int main(int ac, char **av)
+*** 576,582 ****
+  		check_conf(&rootmenu);
+  	} while (conf_cnt);
+  	if (conf_write(NULL)) {
+! 		fprintf(stderr, "\n*** Error during writing of the BusyBox configuration.\n\n");
+  		return 1;
+  	}
+  	return 0;
+--- 566,572 ----
+  		check_conf(&rootmenu);
+  	} while (conf_cnt);
+  	if (conf_write(NULL)) {
+! 		fprintf(stderr, "\n*** Error during writing of the JHALFS configuration.\n\n");
+  		return 1;
+  	}
+  	return 0;
+diff -Npr menu-bb/confdata.c menu/confdata.c
+*** menu-bb/confdata.c	2006-03-22 16:16:18.000000000 -0500
+--- menu/confdata.c	2006-07-26 17:26:45.000000000 -0400
+***************
+*** 13,24 ****
+  #define LKC_DIRECT_LINK
+  #include "lkc.h"
+  
+! const char conf_def_filename[] = ".config";
+  
+  const char conf_defname[] = "defconfig";
+  
+  const char *conf_confnames[] = {
+! 	".config",
+  	conf_defname,
+  	NULL,
+  };
+--- 13,24 ----
+  #define LKC_DIRECT_LINK
+  #include "lkc.h"
+  
+! const char conf_def_filename[] = "configuration";
+  
+  const char conf_defname[] = "defconfig";
+  
+  const char *conf_confnames[] = {
+! 	"configuration",
+  	conf_defname,
+  	NULL,
+  };
+*************** static char *conf_expand_value(const cha
+*** 49,70 ****
+  	return res_value;
+  }
+  
+- char *conf_get_default_confname(void)
+- {
+- 	struct stat buf;
+- 	static char fullname[PATH_MAX+1];
+- 	char *env, *name;
+- 
+- 	name = conf_expand_value(conf_defname);
+- 	env = getenv(SRCTREE);
+- 	if (env) {
+- 		sprintf(fullname, "%s/%s", env, name);
+- 		if (!stat(fullname, &buf))
+- 			return fullname;
+- 	}
+- 	return name;
+- }
+- 
+  int conf_read(const char *name)
+  {
+  	FILE *in = NULL;
+--- 49,54 ----
+*************** struct menu *next_menu(struct menu *menu
+*** 271,277 ****
+  
+  int conf_write(const char *name)
+  {
+! 	FILE *out, *out_h;
+  	struct symbol *sym;
+  	struct menu *menu;
+  	const char *basename;
+--- 255,261 ----
+  
+  int conf_write(const char *name)
+  {
+! 	FILE *out;
+  	struct symbol *sym;
+  	struct menu *menu;
+  	const char *basename;
+*************** int conf_write(const char *name)
+*** 279,288 ****
+  	int type, l;
+  	const char *str;
+  
+- 	/* busybox`s code */
+- 	const char *opt_name;
+- 	int use_flg;
+- 
+  	dirname[0] = 0;
+  	if (name && name[0]) {
+  		struct stat st;
+--- 263,268 ----
+*************** int conf_write(const char *name)
+*** 309,342 ****
+  	out = fopen(newname, "w");
+  	if (!out)
+  		return 1;
+- 	out_h = NULL;
+- 	if (!name) {
+- 		out_h = fopen(".tmpconfig.h", "w");
+- 		if (!out_h)
+- 			return 1;
+- 	}
+  	fprintf(out, "#\n"
+! 		     "# Automatically generated make config: don't edit\n"
+  		     "#\n");
+  
+- 	/* busybox`s code */
+- 	if (out_h) {
+- 		fprintf(out_h, "#ifndef BB_CONFIG_H\n#define BB_CONFIG_H\n");
+- 		fprintf(out_h, "/*\n"
+- 			     " * Automatically generated header file: don't edit\n"
+- 			     " */\n\n"
+- 			     "/* Version Number */\n"
+- 			     "#define BB_VER \"%s\"\n"
+- 			     "#define BB_BT \"%s\"\n",
+- 			     getenv("VERSION"),
+- 			     getenv("BUILDTIME"));
+- 		if (getenv("EXTRA_VERSION"))
+- 			fprintf(out_h, "#define BB_EXTRA_VERSION \"%s\"\n",
+- 				     getenv("EXTRA_VERSION"));
+- 		fprintf(out_h, "\n");
+- 	}
+- 	/* end busybox`s code */
+- 
+  	if (!sym_change_count)
+  		sym_clear_all_valid();
+  
+--- 289,299 ----
+  	out = fopen(newname, "w");
+  	if (!out)
+  		return 1;
+  	fprintf(out, "#\n"
+! 		     "# Automatically generated configuration: don't edit\n"
+! 		     "# use make menuconfig or make config to make changes\n"
+  		     "#\n");
+  
+  	if (!sym_change_count)
+  		sym_clear_all_valid();
+  
+*************** int conf_write(const char *name)
+*** 357,367 ****
+  				     "#\n"
+  				     "# %s\n"
+  				     "#\n", str);
+- 			if (out_h)
+- 				fprintf(out_h, "\n"
+- 					       "/*\n"
+- 					       " * %s\n"
+- 					       " */\n", str);
+  		} else if (!(sym->flags & SYMBOL_CHOICE)) {
+  			sym_calc_value(sym);
+  			if (!(sym->flags & SYMBOL_FORCEWRITE))
+--- 314,319 ----
+*************** int conf_write(const char *name)
+*** 375,388 ****
+  					type = S_BOOLEAN;
+  			}
+  
+- 			/* busybox`s code */
+- 			opt_name = strchr(sym->name, '_');
+- 			if(opt_name == NULL)
+- 				opt_name = sym->name;
+- 			else
+- 				opt_name++;
+- 			use_flg = 1;
+- 			/* end busybox`s code */
+  
+  			switch (type) {
+  			case S_BOOLEAN:
+--- 327,332 ----
+*************** int conf_write(const char *name)
+*** 390,410 ****
+  				switch (sym_get_tristate_value(sym)) {
+  				case no:
+  					fprintf(out, "# %s is not set\n", sym->name);
+- 					if (out_h)
+- 						fprintf(out_h, "#undef %s\n", sym->name);
+- 					use_flg = 0;    /* busybox`s code */
+  					break;
+  				case mod:
+- #if 0   /* busybox`s code */
+  					fprintf(out, "%s=m\n", sym->name);
+- 					if (out_h)
+- 						fprintf(out_h, "#define %s_MODULE 1\n", sym->name);
+- #endif  /* busybox`s code */
+  					break;
+  				case yes:
+  					fprintf(out, "%s=y\n", sym->name);
+- 					if (out_h)
+- 						fprintf(out_h, "#define %s 1\n", sym->name);
+  					break;
+  				}
+  				break;
+--- 334,345 ----
+*************** int conf_write(const char *name)
+*** 412,473 ****
+  				// fix me
+  				str = sym_get_string_value(sym);
+  				fprintf(out, "%s=\"", sym->name);
+- 				if (out_h)
+- 					fprintf(out_h, "#define %s \"", sym->name);
+  				do {
+  					l = strcspn(str, "\"\\");
+  					if (l) {
+  						fwrite(str, l, 1, out);
+- 						if (out_h)
+- 							fwrite(str, l, 1, out_h);
+  					}
+  					str += l;
+  					while (*str == '\\' || *str == '"') {
+  						fprintf(out, "\\%c", *str);
+- 						if (out_h)
+- 							fprintf(out_h, "\\%c", *str);
+  						str++;
+  					}
+  				} while (*str);
+  				fputs("\"\n", out);
+- 				if (out_h)
+- 					fputs("\"\n", out_h);
+  				break;
+  			case S_HEX:
+  				str = sym_get_string_value(sym);
+  				if (str[0] != '0' || (str[1] != 'x' && str[1] != 'X')) {
+  					fprintf(out, "%s=%s\n", sym->name, *str ? str : "0");
+- 					if (out_h)
+- 						fprintf(out_h, "#define %s 0x%s\n", sym->name, str);
+  					break;
+  				}
+  			case S_INT:
+  				str = sym_get_string_value(sym);
+  				fprintf(out, "%s=%s\n", sym->name, *str ? str : "0");
+- 				if (out_h)
+- 					fprintf(out_h, "#define %s %s\n", sym->name, str);
+  				break;
+  			}
+- 			/* busybox`s code */
+- 			if (out_h) {
+- 				fprintf(out_h, "#define ENABLE_%s %d\n", opt_name, use_flg);
+- 				fprintf(out_h, "#define USE_%s(...)%s\n", opt_name,
+- 					(use_flg ? "  __VA_ARGS__" : ""));
+- 				fprintf(out_h, "#define SKIP_%s(...)%s\n\n", opt_name,
+- 					(use_flg ? "" : "  __VA_ARGS__"));
+- 			}
+- 			/* end busybox`s code */
+  		}
+  next:
+  		menu = next_menu(menu);
+  	}
+  	fclose(out);
+- 	if (out_h) {
+- 		fprintf(out_h, "#endif /* BB_CONFIG_H */\n");   /* busybox`s code */
+- 		fclose(out_h);
+- 		rename(".tmpconfig.h", "include/bb_config.h");  /* busybox`s config name */
+- 		file_write_dep(NULL);
+- 	}
+  	if (!name || basename != conf_def_filename) {
+  		if (!name)
+  			name = conf_def_filename;
+--- 347,381 ----
+diff -Npr menu-bb/Makefile menu/Makefile
+*** menu-bb/Makefile	2006-03-22 16:16:18.000000000 -0500
+--- menu/Makefile	2006-07-26 18:06:25.000000000 -0400
+***************
+*** 1,11 ****
+  # Makefile for BusyBox
+  #
+  # Copyright (C) 2002 Erik Andersen <andersen at codepoet.org>
+  
+- top_srcdir=../..
+- top_builddir=../..
+- srcdir=$(top_srcdir)/scripts/config
+- include $(top_srcdir)/Rules.mak
+  
+  all: ncurses conf mconf
+  
+--- 1,30 ----
+  # Makefile for BusyBox
+  #
+  # Copyright (C) 2002 Erik Andersen <andersen at codepoet.org>
++ # Modified by George Boudreau georgeb at LinuxFromScratch.org
++ 
++ top_srcdir=.
++ top_builddir=.
++ srcdir=$(top_srcdir)
++ 
++ # Select the compiler needed to build binaries for your development system
++ HOSTCC    = gcc
++ HOSTCFLAGS= -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer
++ 
++ # Ensure consistent sort order, 'gcc -print-search-dirs' behavior, etc.
++ LC_ALL:= C
++ 
++ SED       ?= sed
++ SECHO     := @-false
++ DISP      := pur
++ Q         := @
++ 
++ show_objs          = $(subst $(top_builddir)/,,$(subst ../,,$@))
++ pur_disp_compile.h = echo "  "HOSTCC $(show_objs)
++ disp_compile.h     = $($(DISP)_disp_compile.h)
++ cmd_compile.h      = $(HOSTCC) $(HOSTCFLAGS) -c -o $@ $<
++ compile.h          = @$(disp_compile.h) ; $(cmd_compile.h)
+  
+  
+  all: ncurses conf mconf
+  
+diff -Npr menu-bb/mconf.c menu/mconf.c
+*** menu-bb/mconf.c	2006-03-22 16:16:18.000000000 -0500
+--- menu/mconf.c	2006-07-26 17:26:45.000000000 -0400
+*************** static char menu_backtitle[128];
+*** 32,38 ****
+  static const char mconf_readme[] =
+  "Overview\n"
+  "--------\n"
+! "Some features may be built directly into BusyBox.  Some features\n"
+  "may be completely removed altogether.  There are also certain\n"
+  "parameters which are not really features, but must be\n"
+  "entered in as decimal or hexadecimal numbers or possibly text.\n"
+--- 32,38 ----
+  static const char mconf_readme[] =
+  "Overview\n"
+  "--------\n"
+! "Some features may be built directly into JHALFS.  Some features\n"
+  "may be completely removed altogether.  There are also certain\n"
+  "parameters which are not really features, but must be\n"
+  "entered in as decimal or hexadecimal numbers or possibly text.\n"
+*************** load_config_text[] =
+*** 194,204 ****
+  	"last retrieved.  Leave blank to abort.",
+  load_config_help[] =
+  	"\n"
+! 	"For various reasons, one may wish to keep several different BusyBox\n"
+  	"configurations available on a single machine.\n"
+  	"\n"
+  	"If you have saved a previous configuration in a file other than the\n"
+! 	"BusyBox's default, entering the name of the file here will allow you\n"
+  	"to modify that configuration.\n"
+  	"\n"
+  	"If you are uncertain, then you have probably never used alternate\n"
+--- 194,204 ----
+  	"last retrieved.  Leave blank to abort.",
+  load_config_help[] =
+  	"\n"
+! 	"For various reasons, one may wish to keep several different JHALFS\n"
+  	"configurations available on a single machine.\n"
+  	"\n"
+  	"If you have saved a previous configuration in a file other than the\n"
+! 	"JHALFS's default, entering the name of the file here will allow you\n"
+  	"to modify that configuration.\n"
+  	"\n"
+  	"If you are uncertain, then you have probably never used alternate\n"
+*************** save_config_text[] =
+*** 208,214 ****
+  	"as an alternate.  Leave blank to abort.",
+  save_config_help[] =
+  	"\n"
+! 	"For various reasons, one may wish to keep different BusyBox\n"
+  	"configurations available on a single machine.\n"
+  	"\n"
+  	"Entering a file name here will allow you to later retrieve, modify\n"
+--- 208,214 ----
+  	"as an alternate.  Leave blank to abort.",
+  save_config_help[] =
+  	"\n"
+! 	"For various reasons, one may wish to keep different JHALFS\n"
+  	"configurations available on a single machine.\n"
+  	"\n"
+  	"Entering a file name here will allow you to later retrieve, modify\n"
+*************** int main(int ac, char **av)
+*** 940,946 ****
+  
+  	sym = sym_lookup("VERSION", 0);
+  	sym_calc_value(sym);
+! 	snprintf(menu_backtitle, 128, "BusyBox v%s Configuration",
+  		sym_get_string_value(sym));
+  
+  	mode = getenv("MENUCONFIG_MODE");
+--- 940,946 ----
+  
+  	sym = sym_lookup("VERSION", 0);
+  	sym_calc_value(sym);
+! 	snprintf(menu_backtitle, 128, "JHALFS v%s Configuration",
+  		sym_get_string_value(sym));
+  
+  	mode = getenv("MENUCONFIG_MODE");
+*************** int main(int ac, char **av)
+*** 961,976 ****
+  	init_dialog();
+  	do {
+  		stat = dialog_yesno(NULL,
+! 				    "Do you wish to save your new BusyBox configuration?", 5, 60);
+  	} while (stat < 0);
+  	end_dialog();
+  
+  	if (stat == 0) {
+  		conf_write(NULL);
+  		printf("\n"
+! 			"*** End of BusyBox configuration.\n");
+  	} else
+! 		printf("\n\nYour BusyBox configuration changes were NOT saved.\n\n");
+  
+  	return 0;
+  }
+--- 961,976 ----
+  	init_dialog();
+  	do {
+  		stat = dialog_yesno(NULL,
+! 				    "Do you wish to save your new JHALFS configuration?", 5, 60);
+  	} while (stat < 0);
+  	end_dialog();
+  
+  	if (stat == 0) {
+  		conf_write(NULL);
+  		printf("\n"
+! 			"*** End of JHALFS configuration.\n");
+  	} else
+! 		printf("\n\nYour JHALFS configuration changes were NOT saved.\n\n");
+  
+  	return 0;
+  }
+diff -Npr menu-bb/zconf.tab.c_shipped menu/zconf.tab.c_shipped
+*** menu-bb/zconf.tab.c_shipped	2006-03-22 16:16:18.000000000 -0500
+--- menu/zconf.tab.c_shipped	2006-07-26 17:26:45.000000000 -0400
+*************** void conf_parse(const char *name)
+*** 1925,1931 ****
+  	sym_init();
+  	menu_init();
+  	modules_sym = sym_lookup("MODULES", 0);
+! 	rootmenu.prompt = menu_add_prop(P_MENU, "BusyBox Configuration", NULL, NULL);
+  
+  	//zconfdebug = 1;
+  	zconfparse();
+--- 1925,1931 ----
+  	sym_init();
+  	menu_init();
+  	modules_sym = sym_lookup("MODULES", 0);
+! 	rootmenu.prompt = menu_add_prop(P_MENU, "JHALFS Configuration", NULL, NULL);
+  
+  	//zconfdebug = 1;
+  	zconfparse();
+diff -Npr menu-bb/zconf.y menu/zconf.y
+*** menu-bb/zconf.y	2006-03-22 16:16:18.000000000 -0500
+--- menu/zconf.y	2006-07-26 17:26:45.000000000 -0400
+*************** void conf_parse(const char *name)
+*** 487,493 ****
+  	sym_init();
+  	menu_init();
+  	modules_sym = sym_lookup("MODULES", 0);
+! 	rootmenu.prompt = menu_add_prop(P_MENU, "BusyBox Configuration", NULL, NULL);
+  
+  	//zconfdebug = 1;
+  	zconfparse();
+--- 487,493 ----
+  	sym_init();
+  	menu_init();
+  	modules_sym = sym_lookup("MODULES", 0);
+! 	rootmenu.prompt = menu_add_prop(P_MENU, "JHALFS Configuration", NULL, NULL);
+  
+  	//zconfdebug = 1;
+  	zconfparse();

Deleted: jhalfs/branches/experimental/menu/BusyBox-1.2.3-menu.patch
===================================================================
--- jhalfs/branches/experimental/menu/BusyBox-1.2.3-menu.patch	2006-07-27 00:40:54 UTC (rev 2845)
+++ jhalfs/branches/experimental/menu/BusyBox-1.2.3-menu.patch	2006-07-27 21:37:57 UTC (rev 2846)
@@ -1,507 +0,0 @@
-diff -Npr menu-bb/conf.c menu/conf.c
-*** menu-bb/conf.c	2006-03-22 16:16:18.000000000 -0500
---- menu/conf.c	2006-07-26 17:26:45.000000000 -0400
-*************** int main(int ac, char **av)
-*** 535,554 ****
-  	conf_parse(name);
-  	//zconfdump(stdout);
-  	switch (input_mode) {
-- 	case set_default:
-- 		if (!defconfig_file)
-- 			defconfig_file = conf_get_default_confname();
-- 		if (conf_read(defconfig_file)) {
-- 			printf("***\n"
-- 				"*** Can't find default configuration \"%s\"!\n"
-- 				"***\n", defconfig_file);
-- 			exit(1);
-- 		}
-- 		break;
-  	case ask_silent:
-  		if (stat(".config", &tmpstat)) {
-  			printf("***\n"
-! 				"*** You have not yet configured BusyBox!\n"
-  				"***\n"
-  				"*** Please run some configurator (e.g. \"make oldconfig\" or\n"
-  				"*** \"make menuconfig\" or \"make config\").\n"
---- 535,544 ----
-  	conf_parse(name);
-  	//zconfdump(stdout);
-  	switch (input_mode) {
-  	case ask_silent:
-  		if (stat(".config", &tmpstat)) {
-  			printf("***\n"
-! 				"*** You have not yet configured JHALFS!\n"
-  				"***\n"
-  				"*** Please run some configurator (e.g. \"make oldconfig\" or\n"
-  				"*** \"make menuconfig\" or \"make config\").\n"
-*************** int main(int ac, char **av)
-*** 576,582 ****
-  		check_conf(&rootmenu);
-  	} while (conf_cnt);
-  	if (conf_write(NULL)) {
-! 		fprintf(stderr, "\n*** Error during writing of the BusyBox configuration.\n\n");
-  		return 1;
-  	}
-  	return 0;
---- 566,572 ----
-  		check_conf(&rootmenu);
-  	} while (conf_cnt);
-  	if (conf_write(NULL)) {
-! 		fprintf(stderr, "\n*** Error during writing of the JHALFS configuration.\n\n");
-  		return 1;
-  	}
-  	return 0;
-diff -Npr menu-bb/confdata.c menu/confdata.c
-*** menu-bb/confdata.c	2006-03-22 16:16:18.000000000 -0500
---- menu/confdata.c	2006-07-26 17:26:45.000000000 -0400
-***************
-*** 13,24 ****
-  #define LKC_DIRECT_LINK
-  #include "lkc.h"
-  
-! const char conf_def_filename[] = ".config";
-  
-  const char conf_defname[] = "defconfig";
-  
-  const char *conf_confnames[] = {
-! 	".config",
-  	conf_defname,
-  	NULL,
-  };
---- 13,24 ----
-  #define LKC_DIRECT_LINK
-  #include "lkc.h"
-  
-! const char conf_def_filename[] = "configuration";
-  
-  const char conf_defname[] = "defconfig";
-  
-  const char *conf_confnames[] = {
-! 	"configuration",
-  	conf_defname,
-  	NULL,
-  };
-*************** static char *conf_expand_value(const cha
-*** 49,70 ****
-  	return res_value;
-  }
-  
-- char *conf_get_default_confname(void)
-- {
-- 	struct stat buf;
-- 	static char fullname[PATH_MAX+1];
-- 	char *env, *name;
-- 
-- 	name = conf_expand_value(conf_defname);
-- 	env = getenv(SRCTREE);
-- 	if (env) {
-- 		sprintf(fullname, "%s/%s", env, name);
-- 		if (!stat(fullname, &buf))
-- 			return fullname;
-- 	}
-- 	return name;
-- }
-- 
-  int conf_read(const char *name)
-  {
-  	FILE *in = NULL;
---- 49,54 ----
-*************** struct menu *next_menu(struct menu *menu
-*** 271,277 ****
-  
-  int conf_write(const char *name)
-  {
-! 	FILE *out, *out_h;
-  	struct symbol *sym;
-  	struct menu *menu;
-  	const char *basename;
---- 255,261 ----
-  
-  int conf_write(const char *name)
-  {
-! 	FILE *out;
-  	struct symbol *sym;
-  	struct menu *menu;
-  	const char *basename;
-*************** int conf_write(const char *name)
-*** 279,288 ****
-  	int type, l;
-  	const char *str;
-  
-- 	/* busybox`s code */
-- 	const char *opt_name;
-- 	int use_flg;
-- 
-  	dirname[0] = 0;
-  	if (name && name[0]) {
-  		struct stat st;
---- 263,268 ----
-*************** int conf_write(const char *name)
-*** 309,342 ****
-  	out = fopen(newname, "w");
-  	if (!out)
-  		return 1;
-- 	out_h = NULL;
-- 	if (!name) {
-- 		out_h = fopen(".tmpconfig.h", "w");
-- 		if (!out_h)
-- 			return 1;
-- 	}
-  	fprintf(out, "#\n"
-! 		     "# Automatically generated make config: don't edit\n"
-  		     "#\n");
-  
-- 	/* busybox`s code */
-- 	if (out_h) {
-- 		fprintf(out_h, "#ifndef BB_CONFIG_H\n#define BB_CONFIG_H\n");
-- 		fprintf(out_h, "/*\n"
-- 			     " * Automatically generated header file: don't edit\n"
-- 			     " */\n\n"
-- 			     "/* Version Number */\n"
-- 			     "#define BB_VER \"%s\"\n"
-- 			     "#define BB_BT \"%s\"\n",
-- 			     getenv("VERSION"),
-- 			     getenv("BUILDTIME"));
-- 		if (getenv("EXTRA_VERSION"))
-- 			fprintf(out_h, "#define BB_EXTRA_VERSION \"%s\"\n",
-- 				     getenv("EXTRA_VERSION"));
-- 		fprintf(out_h, "\n");
-- 	}
-- 	/* end busybox`s code */
-- 
-  	if (!sym_change_count)
-  		sym_clear_all_valid();
-  
---- 289,299 ----
-  	out = fopen(newname, "w");
-  	if (!out)
-  		return 1;
-  	fprintf(out, "#\n"
-! 		     "# Automatically generated configuration: don't edit\n"
-! 		     "# use make menuconfig or make config to make changes\n"
-  		     "#\n");
-  
-  	if (!sym_change_count)
-  		sym_clear_all_valid();
-  
-*************** int conf_write(const char *name)
-*** 357,367 ****
-  				     "#\n"
-  				     "# %s\n"
-  				     "#\n", str);
-- 			if (out_h)
-- 				fprintf(out_h, "\n"
-- 					       "/*\n"
-- 					       " * %s\n"
-- 					       " */\n", str);
-  		} else if (!(sym->flags & SYMBOL_CHOICE)) {
-  			sym_calc_value(sym);
-  			if (!(sym->flags & SYMBOL_FORCEWRITE))
---- 314,319 ----
-*************** int conf_write(const char *name)
-*** 375,388 ****
-  					type = S_BOOLEAN;
-  			}
-  
-- 			/* busybox`s code */
-- 			opt_name = strchr(sym->name, '_');
-- 			if(opt_name == NULL)
-- 				opt_name = sym->name;
-- 			else
-- 				opt_name++;
-- 			use_flg = 1;
-- 			/* end busybox`s code */
-  
-  			switch (type) {
-  			case S_BOOLEAN:
---- 327,332 ----
-*************** int conf_write(const char *name)
-*** 390,410 ****
-  				switch (sym_get_tristate_value(sym)) {
-  				case no:
-  					fprintf(out, "# %s is not set\n", sym->name);
-- 					if (out_h)
-- 						fprintf(out_h, "#undef %s\n", sym->name);
-- 					use_flg = 0;    /* busybox`s code */
-  					break;
-  				case mod:
-- #if 0   /* busybox`s code */
-  					fprintf(out, "%s=m\n", sym->name);
-- 					if (out_h)
-- 						fprintf(out_h, "#define %s_MODULE 1\n", sym->name);
-- #endif  /* busybox`s code */
-  					break;
-  				case yes:
-  					fprintf(out, "%s=y\n", sym->name);
-- 					if (out_h)
-- 						fprintf(out_h, "#define %s 1\n", sym->name);
-  					break;
-  				}
-  				break;
---- 334,345 ----
-*************** int conf_write(const char *name)
-*** 412,473 ****
-  				// fix me
-  				str = sym_get_string_value(sym);
-  				fprintf(out, "%s=\"", sym->name);
-- 				if (out_h)
-- 					fprintf(out_h, "#define %s \"", sym->name);
-  				do {
-  					l = strcspn(str, "\"\\");
-  					if (l) {
-  						fwrite(str, l, 1, out);
-- 						if (out_h)
-- 							fwrite(str, l, 1, out_h);
-  					}
-  					str += l;
-  					while (*str == '\\' || *str == '"') {
-  						fprintf(out, "\\%c", *str);
-- 						if (out_h)
-- 							fprintf(out_h, "\\%c", *str);
-  						str++;
-  					}
-  				} while (*str);
-  				fputs("\"\n", out);
-- 				if (out_h)
-- 					fputs("\"\n", out_h);
-  				break;
-  			case S_HEX:
-  				str = sym_get_string_value(sym);
-  				if (str[0] != '0' || (str[1] != 'x' && str[1] != 'X')) {
-  					fprintf(out, "%s=%s\n", sym->name, *str ? str : "0");
-- 					if (out_h)
-- 						fprintf(out_h, "#define %s 0x%s\n", sym->name, str);
-  					break;
-  				}
-  			case S_INT:
-  				str = sym_get_string_value(sym);
-  				fprintf(out, "%s=%s\n", sym->name, *str ? str : "0");
-- 				if (out_h)
-- 					fprintf(out_h, "#define %s %s\n", sym->name, str);
-  				break;
-  			}
-- 			/* busybox`s code */
-- 			if (out_h) {
-- 				fprintf(out_h, "#define ENABLE_%s %d\n", opt_name, use_flg);
-- 				fprintf(out_h, "#define USE_%s(...)%s\n", opt_name,
-- 					(use_flg ? "  __VA_ARGS__" : ""));
-- 				fprintf(out_h, "#define SKIP_%s(...)%s\n\n", opt_name,
-- 					(use_flg ? "" : "  __VA_ARGS__"));
-- 			}
-- 			/* end busybox`s code */
-  		}
-  next:
-  		menu = next_menu(menu);
-  	}
-  	fclose(out);
-- 	if (out_h) {
-- 		fprintf(out_h, "#endif /* BB_CONFIG_H */\n");   /* busybox`s code */
-- 		fclose(out_h);
-- 		rename(".tmpconfig.h", "include/bb_config.h");  /* busybox`s config name */
-- 		file_write_dep(NULL);
-- 	}
-  	if (!name || basename != conf_def_filename) {
-  		if (!name)
-  			name = conf_def_filename;
---- 347,381 ----
-diff -Npr menu-bb/Makefile menu/Makefile
-*** menu-bb/Makefile	2006-03-22 16:16:18.000000000 -0500
---- menu/Makefile	2006-07-26 18:06:25.000000000 -0400
-***************
-*** 1,11 ****
-  # Makefile for BusyBox
-  #
-  # Copyright (C) 2002 Erik Andersen <andersen at codepoet.org>
-  
-- top_srcdir=../..
-- top_builddir=../..
-- srcdir=$(top_srcdir)/scripts/config
-- include $(top_srcdir)/Rules.mak
-  
-  all: ncurses conf mconf
-  
---- 1,30 ----
-  # Makefile for BusyBox
-  #
-  # Copyright (C) 2002 Erik Andersen <andersen at codepoet.org>
-+ # Modified by George Boudreau georgeb at LinuxFromScratch.org
-+ 
-+ top_srcdir=.
-+ top_builddir=.
-+ srcdir=$(top_srcdir)
-+ 
-+ # Select the compiler needed to build binaries for your development system
-+ HOSTCC    = gcc
-+ HOSTCFLAGS= -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer
-+ 
-+ # Ensure consistent sort order, 'gcc -print-search-dirs' behavior, etc.
-+ LC_ALL:= C
-+ 
-+ SED       ?= sed
-+ SECHO     := @-false
-+ DISP      := pur
-+ Q         := @
-+ 
-+ show_objs          = $(subst $(top_builddir)/,,$(subst ../,,$@))
-+ pur_disp_compile.h = echo "  "HOSTCC $(show_objs)
-+ disp_compile.h     = $($(DISP)_disp_compile.h)
-+ cmd_compile.h      = $(HOSTCC) $(HOSTCFLAGS) -c -o $@ $<
-+ compile.h          = @$(disp_compile.h) ; $(cmd_compile.h)
-  
-  
-  all: ncurses conf mconf
-  
-diff -Npr menu-bb/mconf.c menu/mconf.c
-*** menu-bb/mconf.c	2006-03-22 16:16:18.000000000 -0500
---- menu/mconf.c	2006-07-26 17:26:45.000000000 -0400
-*************** static char menu_backtitle[128];
-*** 32,38 ****
-  static const char mconf_readme[] =
-  "Overview\n"
-  "--------\n"
-! "Some features may be built directly into BusyBox.  Some features\n"
-  "may be completely removed altogether.  There are also certain\n"
-  "parameters which are not really features, but must be\n"
-  "entered in as decimal or hexadecimal numbers or possibly text.\n"
---- 32,38 ----
-  static const char mconf_readme[] =
-  "Overview\n"
-  "--------\n"
-! "Some features may be built directly into JHALFS.  Some features\n"
-  "may be completely removed altogether.  There are also certain\n"
-  "parameters which are not really features, but must be\n"
-  "entered in as decimal or hexadecimal numbers or possibly text.\n"
-*************** load_config_text[] =
-*** 194,204 ****
-  	"last retrieved.  Leave blank to abort.",
-  load_config_help[] =
-  	"\n"
-! 	"For various reasons, one may wish to keep several different BusyBox\n"
-  	"configurations available on a single machine.\n"
-  	"\n"
-  	"If you have saved a previous configuration in a file other than the\n"
-! 	"BusyBox's default, entering the name of the file here will allow you\n"
-  	"to modify that configuration.\n"
-  	"\n"
-  	"If you are uncertain, then you have probably never used alternate\n"
---- 194,204 ----
-  	"last retrieved.  Leave blank to abort.",
-  load_config_help[] =
-  	"\n"
-! 	"For various reasons, one may wish to keep several different JHALFS\n"
-  	"configurations available on a single machine.\n"
-  	"\n"
-  	"If you have saved a previous configuration in a file other than the\n"
-! 	"JHALFS's default, entering the name of the file here will allow you\n"
-  	"to modify that configuration.\n"
-  	"\n"
-  	"If you are uncertain, then you have probably never used alternate\n"
-*************** save_config_text[] =
-*** 208,214 ****
-  	"as an alternate.  Leave blank to abort.",
-  save_config_help[] =
-  	"\n"
-! 	"For various reasons, one may wish to keep different BusyBox\n"
-  	"configurations available on a single machine.\n"
-  	"\n"
-  	"Entering a file name here will allow you to later retrieve, modify\n"
---- 208,214 ----
-  	"as an alternate.  Leave blank to abort.",
-  save_config_help[] =
-  	"\n"
-! 	"For various reasons, one may wish to keep different JHALFS\n"
-  	"configurations available on a single machine.\n"
-  	"\n"
-  	"Entering a file name here will allow you to later retrieve, modify\n"
-*************** int main(int ac, char **av)
-*** 940,946 ****
-  
-  	sym = sym_lookup("VERSION", 0);
-  	sym_calc_value(sym);
-! 	snprintf(menu_backtitle, 128, "BusyBox v%s Configuration",
-  		sym_get_string_value(sym));
-  
-  	mode = getenv("MENUCONFIG_MODE");
---- 940,946 ----
-  
-  	sym = sym_lookup("VERSION", 0);
-  	sym_calc_value(sym);
-! 	snprintf(menu_backtitle, 128, "JHALFS v%s Configuration",
-  		sym_get_string_value(sym));
-  
-  	mode = getenv("MENUCONFIG_MODE");
-*************** int main(int ac, char **av)
-*** 961,976 ****
-  	init_dialog();
-  	do {
-  		stat = dialog_yesno(NULL,
-! 				    "Do you wish to save your new BusyBox configuration?", 5, 60);
-  	} while (stat < 0);
-  	end_dialog();
-  
-  	if (stat == 0) {
-  		conf_write(NULL);
-  		printf("\n"
-! 			"*** End of BusyBox configuration.\n");
-  	} else
-! 		printf("\n\nYour BusyBox configuration changes were NOT saved.\n\n");
-  
-  	return 0;
-  }
---- 961,976 ----
-  	init_dialog();
-  	do {
-  		stat = dialog_yesno(NULL,
-! 				    "Do you wish to save your new JHALFS configuration?", 5, 60);
-  	} while (stat < 0);
-  	end_dialog();
-  
-  	if (stat == 0) {
-  		conf_write(NULL);
-  		printf("\n"
-! 			"*** End of JHALFS configuration.\n");
-  	} else
-! 		printf("\n\nYour JHALFS configuration changes were NOT saved.\n\n");
-  
-  	return 0;
-  }
-diff -Npr menu-bb/zconf.tab.c_shipped menu/zconf.tab.c_shipped
-*** menu-bb/zconf.tab.c_shipped	2006-03-22 16:16:18.000000000 -0500
---- menu/zconf.tab.c_shipped	2006-07-26 17:26:45.000000000 -0400
-*************** void conf_parse(const char *name)
-*** 1925,1931 ****
-  	sym_init();
-  	menu_init();
-  	modules_sym = sym_lookup("MODULES", 0);
-! 	rootmenu.prompt = menu_add_prop(P_MENU, "BusyBox Configuration", NULL, NULL);
-  
-  	//zconfdebug = 1;
-  	zconfparse();
---- 1925,1931 ----
-  	sym_init();
-  	menu_init();
-  	modules_sym = sym_lookup("MODULES", 0);
-! 	rootmenu.prompt = menu_add_prop(P_MENU, "JHALFS Configuration", NULL, NULL);
-  
-  	//zconfdebug = 1;
-  	zconfparse();
-diff -Npr menu-bb/zconf.y menu/zconf.y
-*** menu-bb/zconf.y	2006-03-22 16:16:18.000000000 -0500
---- menu/zconf.y	2006-07-26 17:26:45.000000000 -0400
-*************** void conf_parse(const char *name)
-*** 487,493 ****
-  	sym_init();
-  	menu_init();
-  	modules_sym = sym_lookup("MODULES", 0);
-! 	rootmenu.prompt = menu_add_prop(P_MENU, "BusyBox Configuration", NULL, NULL);
-  
-  	//zconfdebug = 1;
-  	zconfparse();
---- 487,493 ----
-  	sym_init();
-  	menu_init();
-  	modules_sym = sym_lookup("MODULES", 0);
-! 	rootmenu.prompt = menu_add_prop(P_MENU, "JHALFS Configuration", NULL, NULL);
-  
-  	//zconfdebug = 1;
-  	zconfparse();




More information about the alfs-log mailing list