-Fixed error for new tar package and root user
authorgobo72 <gobo72@364a67c3-989e-7be9-548d-dae8560ea662>
Sat, 12 Mar 2011 21:26:58 +0000 (21:26 +0000)
committergobo72 <gobo72@364a67c3-989e-7be9-548d-dae8560ea662>
Sat, 12 Mar 2011 21:26:58 +0000 (21:26 +0000)
-Fixed error in naming of B43_LPPHY variable
-Added templates for wireless-tools SSID
-Added wpa-supplicant configuration file
-Added possibility to add new kernel sources after stage1

config/sysinfos.default
config/sysinfos.hp-mini
stage2/hv-install-2
stage2/packages-update
stage2/pkg/linux
stage2/pkg/wireless-tools
stage2/pkg/wpa_supplicant

index 399c582..28a996f 100644 (file)
@@ -46,7 +46,7 @@ SOUND_CARD="yes"
 
 # Wifi support
 #WIFI_SUPPORT="no"
-#FIRMWARE_B43_LPPHY="yes"
+#B43_LPPHY="yes"
 
 # Keyboard mapping (example: us, cf)
 KEYBOARD="us"
index 2cd2ff8..218ec44 100644 (file)
@@ -27,7 +27,7 @@ XORG_VIDEO_DRIVER="intel"
 DVDROM="no"
 
 WIFI_SUPPORT="yes"
-FIRMWARE_B43_LPPHY="yes"
+B43_LPPHY="yes"
 
 # General network settings
 INTERFACES="eth0 wlan0"
index 25a5edc..857afa3 100755 (executable)
@@ -30,7 +30,7 @@ ipkg ${PSMISC}
 ipkg ${SHADOW}
 ipkg -m noac ${SYSKLOGD}
 ipkg -m noac ${SYSVINIT}
-ipkg ${TAR_PACKAGE} "--bindir=/bin --libexecdir=/usr/sbin"
+FORCE_UNSAFE_CONFIGURE=1 ipkg ${TAR_PACKAGE} "--bindir=/bin --libexecdir=/usr/sbin"
 ipkg ${TEXINFO}
 ipkg ${UDEV}
 ipkg -m noac ${UDEV_CONFIG}
@@ -41,7 +41,7 @@ if [ -n "${WIFI_SUPPORT}" ]; then
     PREFIX=/usr ipkg -m noac -s wireless-tools ${WIRELESS_TOOLS}
     ipkg -m noac ${WPA_SUPPLICANT}
 
-    if [ -n "${FIRMWARE_B43_LPPHY}" ]; then
+    if [ -n "${B43_LPPHY}" ]; then
         PREFIX=/usr ipkg -m noac ${B43_FWCUTTER}
         ipkg -m noac -s firmware-b43-lpphy ${FIRMWARE_B43_LPPHY}
     fi
index 84b6bf9..0ef7037 100755 (executable)
@@ -70,7 +70,7 @@ if [ -n "${WIFI_SUPPORT}" ]; then
         "http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux"
     fpkg -e "tar.gz" ${WPA_SUPPLICANT} "http://hostap.epitest.fi/releases"
 
-    if [ -n "${FIRMWARE_B43_LPPHY}" ]; then
+    if [ -n "${B43_LPPHY}" ]; then
         fpkg ${B43_FWCUTTER} "http://bu3sch.de/b43/fwcutter"
         fpkg ${FIRMWARE_B43_LPPHY} "http://downloads.openwrt.org/sources"
     fi
index 2065bf0..dd0af0b 100644 (file)
@@ -2,17 +2,24 @@
 
 hvbuild()
 {
-    # The kernel sources were already copied into /usr/src in stage0
-    cd /usr/src/${PACKAGE}
-    make mrproper
-    make headers_check
+    # Check if kernel sources from stage0 are still there
+    if [ ! -d /usr/src/${PACKAGE} ]; then
+        # If no, then copy them. We don't install headers and
+        # assume that it is a new kernel version installation.
+        mv ${LFS_TMP}/${PACKAGE} /usr/src
+    else
+        # Install headers
+        cd /usr/src/${PACKAGE}
+        make mrproper
+        make headers_check
 
-    # Remove any previous headers install
-    rm -rf dest
-    make INSTALL_HDR_PATH=dest headers_install
-    cp -rv dest/include/* /usr/include
-    find /usr/include -name .install -or -name ..install.cmd | xargs rm -fv
-    rm -rf dest
+        # Remove any previous headers install
+        rm -rf dest
+        make INSTALL_HDR_PATH=dest headers_install
+        cp -rv dest/include/* /usr/include
+        find /usr/include -name .install -or -name ..install.cmd | xargs rm -fv
+        rm -rf dest
+    fi
 
     # Install HV kernel compilation script:
     VERSION=$(get_pkg_ver ${PACKAGE})
index e72babc..002ae8e 100644 (file)
@@ -8,6 +8,19 @@ hvconfig_pre()
 
 hvbuild_post()
 {
-    echo "TODO: Configurer ssid"
     install -d -m755 /etc/sysconfig/network/ssid
+
+cat > /etc/sysconfig/network/ssid/TEMPLATE << EOF
+# This file must be named exactly as your ESSID (case is important)
+SSID="MYNETWORK-SSID"
+KEY_TYPE="WPA-PSK"
+
+# This can be "static" or "dhcp"
+BOOTPROTO="static"
+
+# The following variables are used only for "static":
+IPADDR="192.168.1.6"
+PREFIX_LENGTH="24"
+GATEWAY="192.168.1.1"
+EOF
 }
index e404fae..69c8331 100644 (file)
@@ -29,3 +29,18 @@ EOF
     install -m 644 doc/docbook/*8 /usr/man/man8
     install -m 644 doc/docbook/wpa_supplicant.conf.5 /usr/man/man5
 }
+
+hvbuild_post()
+{
+    # Create default wpa configuration file
+    cat > /etc/wpa_supplicant.conf << EOF
+ctrl_interface=/var/run/wpa_supplicant
+
+network={
+  ssid="insert your SSID here"
+  scan_ssid=1
+  key_mgmt=WPA-PSK
+  psk="insert your password here"
+}
+EOF
+}