SliTaz Packages

Community Doc Forum Pro Shop Bugs Hg
.

Receipt for package "broadcom-wl64"

# SliTaz package receipt.

PACKAGE="broadcom-wl64"
VERSION="6_30_223_271"
CATEGORY="network"
MAINTAINER="maintainer@slitaz.org"
LICENSE="other"
SHORT_DESC="Broadcom 802.11abg Linux STA Networking Drivers"
WEB_SITE="https://www.broadcom.com/support/download-search/?pf=Wireless+LAN+Infrastructure"
TARBALL="hybrid-v35_64-nodebug-pcoem-$VERSION.tar.gz"
WGET_URL="https://docs.broadcom.com/docs-and-downloads/docs/linux_sta/$TARBALL"
TAGS="wireless wifi driver"
PROVIDE="broadcom-wl:linux64"

DEPENDS="linux64"
BUILD_DEPENDS="git xz sysfsutils-dev findutils diffutils \
libtool kmod bc elfutils-dev openssl-dev"

# Rules to configure and make the package.
compile_rules()
{
    # Use wlan instead eth
    sed -i -e '/BRCM_WLAN_IFNAME/s/eth/wlan/' src/wl/sys/wl_linux.c

    while read file; do
        [ -f done.$file ] && continue
        echo "Apply $file..."
        patch -p1 < $stuff/$file || return 1
        cp $stuff/$file done.$file
    done <<EOT
001-null-pointer-fix.patch
002-rdtscl.patch
003-linux47.patch
004-linux48.patch
005-debian-fix-kernel-warnings.patch
006-linux411.patch
007-linux412.patch
008-linux415.patch
009-fix_mac_profile_discrepancy.patch
014-linux414.patch
017-linux56.patch
018-linux59.patch
EOT

    # Use cross toolchain x86_64
    export PATH=$PATH:/cross/x86_64/tools/bin

    # linux64-module-headers seem not enought for build module
    # Use linux kernel source and modules_prepare
    tar xf $SRC/linux-$kvers.tar.xz
    cd linux-$kvers
    cp $WOK/linux/stuff/linux-slitaz.config64 .config
    make ARCH=x86_64 CROSS_COMPILE=x86_64-slitaz-linux- modules_prepare
    cp $WOK/linux/install/linux64/usr/src/linux-$kvers-slitaz64/Module.symvers .
    cd -

    KBUILD_NOPEDANTIC=1 make ARCH=x86_64 CROSS_COMPILE=x86_64-slitaz-linux- \
        -C ./linux-$kvers M=`pwd`
    xz wl.ko
}

# Rules to gen a SliTaz package suitable for Tazpkg.
genpkg_rules()
{
    EXTRAVERSION=_${kvers}
    mkdir -p $fs/lib/modules/${kvers}-slitaz64/kernel/drivers/net/wireless
    # Compress and install module
    install -o root -m 0644 $src/wl.ko.xz \
        $fs/lib/modules/${kvers}-slitaz64/kernel/drivers/net/wireless/wl.ko.xz
}

# Post install/remove commands for Tazpkg.
post_install()
{
    chroot "$1/" depmod -a ${EXTRAVERSION#_}-slitaz64
}

post_remove()
{
    chroot "$1/" depmod -a ${EXTRAVERSION#_}-slitaz64
}
6025 packages and 203154 files in current database (Thu Apr 25 06:17:47 2024)