From: gobo72 Date: Sat, 12 Mar 2011 21:26:58 +0000 (+0000) Subject: -Fixed error for new tar package and root user X-Git-Url: http://gitweb.hugovil.com/?a=commitdiff_plain;h=88f5fb0c316fe9a38c3d05a2e2a2dcfbc5c95557;p=hvlinux.git -Fixed error for new tar package and root user -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 --- diff --git a/config/sysinfos.default b/config/sysinfos.default index 399c582..28a996f 100644 --- a/config/sysinfos.default +++ b/config/sysinfos.default @@ -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" diff --git a/config/sysinfos.hp-mini b/config/sysinfos.hp-mini index 2cd2ff8..218ec44 100644 --- a/config/sysinfos.hp-mini +++ b/config/sysinfos.hp-mini @@ -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" diff --git a/stage2/hv-install-2 b/stage2/hv-install-2 index 25a5edc..857afa3 100755 --- a/stage2/hv-install-2 +++ b/stage2/hv-install-2 @@ -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 diff --git a/stage2/packages-update b/stage2/packages-update index 84b6bf9..0ef7037 100755 --- a/stage2/packages-update +++ b/stage2/packages-update @@ -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 diff --git a/stage2/pkg/linux b/stage2/pkg/linux index 2065bf0..dd0af0b 100644 --- a/stage2/pkg/linux +++ b/stage2/pkg/linux @@ -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}) diff --git a/stage2/pkg/wireless-tools b/stage2/pkg/wireless-tools index e72babc..002ae8e 100644 --- a/stage2/pkg/wireless-tools +++ b/stage2/pkg/wireless-tools @@ -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 } diff --git a/stage2/pkg/wpa_supplicant b/stage2/pkg/wpa_supplicant index e404fae..69c8331 100644 --- a/stage2/pkg/wpa_supplicant +++ b/stage2/pkg/wpa_supplicant @@ -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 +}