X-Git-Url: http://git.ozo.com/?a=blobdiff_plain;f=patch-kernel%2Finstall.sh;h=06c252549cdbea44ae3d5d82be88ed1cd071bd41;hb=0f5e6bf980d5c582c4d56014f9dbf16926200c67;hp=e343b1c790be5afde6c2c3dae5cee7470413ec87;hpb=fbfef801157512d7e5c127214bc586a49b53d51b;p=madwifi%2F.git diff --git a/patch-kernel/install.sh b/patch-kernel/install.sh index e343b1c..06c2525 100755 --- a/patch-kernel/install.sh +++ b/patch-kernel/install.sh @@ -39,8 +39,8 @@ PATCH() # Location of various pieces. These mimic what is in Makefile.inc # and can be overridden from the environment. # -SRC_HAL=${HAL:-${SRC}/hal} -test -d ${SRC_HAL} || die "No hal directory ${SRC_HAL}" +SRC_HAL=${HAL:-${SRC}/ath_hal} +test -d ${SRC_HAL} || die "No ath_hal directory ${SRC_HAL}" SRC_NET80211=${WLAN:-${SRC}/net80211} test -d ${SRC_NET80211} || die "No net80211 directory ${SRC_NET80211}" SRC_ATH=${ATH:-${SRC}/ath} @@ -54,27 +54,16 @@ test -d ${SRC_COMPAT} || die "No compat directory ${SRC_COMPAT}" WIRELESS=${KERNEL_PATH}/drivers/net/wireless test -d ${WIRELESS} || die "No wireless directory ${WIRELESS}" -if test -f ${WIRELESS}/Kconfig; then - kbuild=2.6 - kbuildconf=Kconfig -else if test -f ${WIRELESS}/Config.in; then - kbuild=2.4 - kbuildconf=Config.in -else - die "Kernel build system is not supported" -fi -fi - echo "Copying top-level files" MADWIFI=${WIRELESS}/madwifi rm -rf ${MADWIFI} mkdir -p ${MADWIFI} -make -s -C ${SRC} svnversion.h -cp -f ${SRC}/BuildCaps.inc ${SRC}/svnversion.h ${SRC}/release.h ${MADWIFI} +cp -f ${SRC}/BuildCaps.inc ${SRC}/release.h ${MADWIFI} echo "Copying source files" -FILES=$(cd ${SRC} && find ath ath_hal ath_rate hal include net80211 -name '*.[ch]') +FILES=$(cd ${SRC} && find ath ath_hal ath_rate include net80211 -name '*.[ch]') +FILES="$FILES $(cd ${SRC} && find ath_hal -name '*.ini')" for f in $FILES; do case $f in *.mod.c) continue;; @@ -88,33 +77,14 @@ FILES=$(cd ${SRC} && find . -name Makefile.kernel) for f in $FILES; do cp -f ${SRC}/$f $(dirname ${MADWIFI}/$f)/Makefile done -cp -f ${SRC}/ath_hal/ah_target.inc ${MADWIFI}/ath_hal - -echo "Copying Atheros HAL files" -DST_HAL=${MADWIFI}/hal -cp -f ${SRC_HAL}/public/*.hal.o.uu ${DST_HAL}/public echo "Patching the build system" -if test "$kbuild" = 2.6; then cp -f Kconfig ${MADWIFI} sed -i '/madwifi/d;/^endmenu/i\ source "drivers/net/wireless/madwifi/Kconfig"' ${WIRELESS}/Kconfig sed -i '$a\ obj-$(CONFIG_ATHEROS) += madwifi/ /madwifi/d;' ${WIRELESS}/Makefile -else -cp -f Config.in ${MADWIFI} -sed -i '$a\ -source drivers/net/wireless/madwifi/Config.in -/madwifi/d' ${WIRELESS}/Config.in -sed -i '/madwifi/d;/include/i\ -subdir-$(CONFIG_ATHEROS) += madwifi\ -obj-$(CONFIG_ATHEROS) += madwifi/madwifi.o' ${WIRELESS}/Makefile -DST_DOC=${KERNEL_PATH}/Documentation -grep -q 'CONFIG_ATHEROS' ${DST_DOC}/Configure.help || \ - PATCH ${DST_DOC}/Configure.help Configure.help.patch -fi - echo "Done"