Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 10 Apr 2010 08:02:59 +0200
From:      harvey dent <harvey.two.face.kent@gmail.com>
To:        freebsd-questions@freebsd.org
Subject:   Custom kernel & atheros
Message-ID:  <p2r132803231004092302x7cdb8b21kb654ccf87abd2ab9@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
hi everybody
I try to make a custom kernel (for a "emachines" notebook), but i always get
this same error or a similar (dependent of choosing ath_hal or for example
ath_rf2425):

*ar2425.o(.text+0x582): In function
`ar2425RfAttach':

/usr/src/sys/dev/ath/ath_hal/ar5212/ar2425.c:691: undefined reference to
`ath_hal_malloc'

ar2425.o(.text+0x5d4):/usr/src/sys/dev/ath/ath_hal/ar5212/ar2425.c:705:
undefined reference to
`ar5212GetNfAdjust'
ar2425.o(.text+0x614): In function
`ar2425RfDetach':

/usr/src/sys/dev/ath/ath_hal/ar5212/ar2425.c:674: undefined reference to
`ath_hal_free'

ar2425.o(.text+0x6fd): In function `ar2425SetRfRegs':
/usr/src/sys/dev/ath/ath_hal/ar5212/ar2425.c:193: undefined reference to
`ar5212ModifyRfBuffer'
ar2425.o(.text+0x725):/usr/src/sys/dev/ath/ath_hal/ar5212/ar2425.c:194:
undefined reference to `ar5212ModifyRfBuffer'
ar2425.o(.text+0xa84): In function `ar2425SetChannel':
/usr/src/sys/dev/ath/ath_hal/ar5212/ar2425.c:99: undefined reference to
`ath_hal_reverseBits'
ar2425.o(.text+0xb4c):/usr/src/sys/dev/ath/ath_hal/ar5212/ar2425.c:113:
undefined reference to `ath_hal_reverseBits'
ar2425.o(.text+0xb62):/usr/src/sys/dev/ath/ath_hal/ar5212/ar2425.c:115:
undefined reference to `ath_hal_reverseBits'
ar2425.o(.text+0xbba):/usr/src/sys/dev/ath/ath_hal/ar5212/ar2425.c:117:
undefined reference to `ath_hal_reverseBits'
ar2425.o(.text+0xbd0):/usr/src/sys/dev/ath/ath_hal/ar5212/ar2425.c:119:
undefined reference to `ath_hal_reverseBits'
ar2425.o(.text+0xc21):/usr/src/sys/dev/ath/ath_hal/ar5212/ar2425.c:121: more
undefined references to `ath_hal_reverseBits' follow
sample.o(.text+0x404): In function `ath_rate_sysctl_stats':
/usr/src/sys/dev/ath/ath_rate/sample/sample.c:916: undefined reference to
`ieee80211_iterate_nodes'
sample.o(.text+0x539): In function `calc_usecs_unicast_packet':
/usr/src/sys/dev/ath/ath_rate/sample/sample.h:236: undefined reference to
`ath_hal_computetxtime'
sample.o(.text+0x5b5):/usr/src/sys/dev/ath/ath_rate/sample/sample.h:246:
undefined reference to `ath_hal_computetxtime'
sample.o(.text+0x745): In function `ath_rate_newassoc':
/usr/src/sys/dev/ath/ath_rate/sample/sample.c:771: undefined reference to
`ieee80211_note_mac'
sample.o(.text+0x7ea):/usr/src/sys/dev/ath/ath_rate/sample/sample.c:801:
undefined reference to `ieee80211_note'
sample.o(.text+0xcec): In function `update_stats':
/usr/src/sys/dev/ath/ath_rate/sample/sample.c:530: undefined reference to
`ieee80211_note_mac'
sample.o(.text+0x1040): In function `ath_rate_findrate':
/usr/src/sys/dev/ath/ath_rate/sample/sample.c:273: undefined reference to
`ieee80211_note_mac'
sample.o(.text+0x1216):/usr/src/sys/dev/ath/ath_rate/sample/sample.c:316:
undefined reference to `ieee80211_note_mac'
sample.o(.text+0x160c): In function `ath_rate_tx_complete':
/usr/src/sys/dev/ath/ath_rate/sample/sample.c:572: undefined reference to
`ieee80211_note_mac'
sample.o(.text+0x16e3):/usr/src/sys/dev/ath/ath_rate/sample/sample.c:590:
undefined reference to `ieee80211_note_mac'
sample.o(.text+0x18bc):/usr/src/sys/dev/ath/ath_rate/sample/sample.c:636:
more undefined references to `ieee80211_note_mac' follow
*** Error code 1

Stop in /usr/obj/usr/src/sys/PCBSD1.
*** Error code 1

Stop in /usr/src.
*** Error code 1

Stop in /usr/src.*

I ran "config", and no problem were find.
When I build a GENERIC kernel, there's no any problem.

Here the uname -a:
*FreeBSD pcbsd-8040 8.0-RELEASE-p2 FreeBSD 8.0-RELEASE-p2 #0: Tue Jan  5
16:02:27 UTC 2010
root@i386-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC
i386
*
Here the kernel config file:

*#
# GENERIC -- Generic kernel configuration file for FreeBSD/i386
#
# For more information on this file, please read the config(5) manual page,
# and/or the handbook section on Kernel Configuration Files:
#
#
http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html
#
# The handbook is also available locally in /usr/share/doc/handbook
# if you've installed the doc distribution, otherwise always see the
# FreeBSD World Wide Web server (http://www.FreeBSD.org/) for the
# latest information.
#
# An exhaustive list of options and more detailed explanations of the
# device lines is also present in the ../../conf/NOTES and NOTES files.
# If you are in doubt as to the purpose or necessity of a line, check first
# in NOTES.
#
# $FreeBSD$

cpu        I686_CPU
ident        PCBSD1

# To statically compile in device wiring instead of /boot/device.hints
#hints        "GENERIC.hints"        # Default places to look for devices.

# Use the following to compile in values accessible to the kernel
# through getenv() (or kenv(1) in userland). The format of the file
# is 'variable=value', see kenv(1)
#
# env        "GENERIC.env"

makeoptions    DEBUG=-g        # Build kernel with gdb(1) debug symbols

options     SCHED_ULE        # ULE scheduler
options     PREEMPTION        # Enable kernel thread preemption
options     INET            # InterNETworking
options     INET6            # IPv6 communications protocols
options     SCTP            # Stream Control Transmission Protocol
options     FFS            # Berkeley Fast Filesystem
options     SOFTUPDATES        # Enable FFS soft updates support
options     UFS_ACL            # Support for access control lists
options     UFS_DIRHASH        # Improve performance on big directories
options     UFS_GJOURNAL        # Enable gjournal-based UFS journaling
options     MD_ROOT            # MD is a potential root device
options     NFSCLIENT        # Network Filesystem Client
options     NFSSERVER        # Network Filesystem Server
options     NFSLOCKD        # Network Lock Manager
options     NFS_ROOT        # NFS usable as /, requires NFSCLIENT
options     PROCFS            # Process filesystem (requires PSEUDOFS)
options     PSEUDOFS        # Pseudo-filesystem framework
options     GEOM_PART_GPT        # GUID Partition Tables.
options     GEOM_LABEL        # Provides labelization
options     COMPAT_43TTY        # BSD 4.3 TTY compat (sgtty)
options     COMPAT_FREEBSD4        # Compatible with FreeBSD4
options     COMPAT_FREEBSD5        # Compatible with FreeBSD5
options     COMPAT_FREEBSD6        # Compatible with FreeBSD6
options     COMPAT_FREEBSD7        # Compatible with FreeBSD7
options     SCSI_DELAY=5000        # Delay (in ms) before probing SCSI
options     KTRACE            # ktrace(1) support
options     STACK            # stack(9) support
options     SYSVSHM            # SYSV-style shared memory
options     SYSVMSG            # SYSV-style message queues
options     SYSVSEM            # SYSV-style semaphores
options     P1003_1B_SEMAPHORES    # POSIX-style semaphores
options     _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time
extensions
options     PRINTF_BUFR_SIZE=128    # Prevent printf output being
interspersed.
options     KBD_INSTALL_CDEV    # install a CDEV entry in /dev
options     HWPMC_HOOKS        # Necessary kernel hooks for hwpmc(4)
options     AUDIT            # Security event auditing
options     MAC            # TrustedBSD MAC Framework
options        FLOWTABLE        # per-cpu routing cache
#options     KDTRACE_HOOKS        # Kernel DTrace hooks

# Enable i386 a.out binary support
options     COMPAT_AOUT

# To make an SMP kernel, the next two lines are needed
#options     SMP            # Symmetric MultiProcessor Kernel
device        apic            # I/O APIC

# CPU frequency control
device        cpufreq

# Bus support.
device        acpi
device        pci

##############################
# MCA bus:
#
# The MCA bus device is `mca'.  It provides auto-detection and
# configuration support for all devices on the MCA bus.
# No hints are required for MCA.

#device        mca # Mca Bus only in old ibm pc and some servers

# SMB bus
#
# System Management Bus support is provided by the 'smbus' device.
# Access to the SMBus device is via the 'smb' device (/dev/smb*),
# which is a child of the 'smbus' device.
#
# Supported devices:
# smb        standard I/O through /dev/smb*
#
# Supported SMB interfaces:
# iicsmb    I2C to SMB bridge with any iicbus interface
# bktr        brooktree848 I2C hardware interface
# intpm        Intel PIIX4 (82371AB, 82443MX) Power Management Unit
# alpm        Acer Aladdin-IV/V/Pro2 Power Management Unit
# ichsmb    Intel ICH SMBus controller chips (82801AA, 82801AB, 82801BA)
# viapm        VIA VT82C586B/596B/686A and VT8233 Power Management Unit
# amdpm        AMD 756 Power Management Unit
# amdsmb    AMD 8111 SMBus 2.0 Controller
# nfpm        NVIDIA nForce Power Management Unit
# nfsmb        NVIDIA nForce2/3/4 MCP SMBus 2.0 Controller
#
device        smbus        # Bus support, required for smb below.
device        ichsmb
device        smb

#############################

##################### BIOS
device        smbios


# ATA and ATAPI devices
device        ata
device        atadisk        # ATA disk drives
device          ataraid         # ATA RAID drives
options     ATA_STATIC_ID    # Static device numbering

# SCSI Controllers
device        ahc        # AHA2940 and onboard AIC7xxx devices
options     AHC_REG_PRETTY_PRINT    # Print register bitfields in debug
                    # output.  Adds ~128k to driver.
device        amd        # AMD 53C974 (Tekram DC-390(T))

# SCSI peripherals
device        scbus        # SCSI bus (required for SCSI)
device        ch        # SCSI media changers
device        da        # Direct Access (disks)
device        cd        # CD
device        pass        # Passthrough device (direct SCSI access)
device        ses        # SCSI Environmental Services (and SAF-TE)

# RAID controllers
device          aacp            # SCSI passthrough for aac (requires CAM)

# atkbdc0 controls both the keyboard and the PS/2 mouse
device        atkbdc        # AT keyboard controller
device        atkbd        # AT keyboard

#################
# Options for atkbd:
options     ATKBD_DFLT_KEYMAP    # specify the built-in keymap
makeoptions    ATKBD_DFLT_KEYMAP=fr.iso.acc
####################


device        psm        # PS/2 mouse

device        kbdmux        # keyboard multiplexer

device        vga        # VGA video card driver

# syscons is the default console driver, resembling an SCO console
device        sc
###################
options     VESA
options     SC_PIXEL_MODE
options     SC_HISTORY_SIZE=800    # number of history buffer lines
device        dpms
options     SC_TWOBUTTON_MOUSE
########
device        agp        # support several AGP chipsets

################# CONSOLE UTF8
options TEKEN_UTF8
options TEKEN_XTERM

#####################################
device        drm        # DRM core module required by DRM drivers
device        i915drm        # Intel i830 through i915

####################################


# Power management support (see NOTES for more options)
#device        apm
# Add suspend/resume support for the i8254.
device        pmtimer

# PCCARD (PCMCIA) support
# PCMCIA and cardbus bridge support
#device        cbb        # cardbus (yenta) bridge
#device        pccard        # PC Card (16-bit) bus
#device        cardbus        # CardBus (32-bit) bus

# PCI Ethernet NICs that use the common MII bus controller code.
# NOTE: Be sure to keep the 'device miibus' line in order to use these NICs!
device        miibus        # MII bus support
device        bge        # Broadcom BCM570xx Gigabit Ethernet

# ISA Ethernet NICs.  pccard NICs included.
#device        cs        # Crystal Semiconductor CS89x0 NIC
# 'device ed' requires 'device miibus'
#device        ed        # NE[12]000, SMC Ultra, 3c503, DS8390 cards

# Wireless NIC cards
options     IEEE80211_DEBUG    # enable debug msgs
options     IEEE80211_AMPDU_AGE # age frames in AMPDU reorder q's
options     IEEE80211_SUPPORT_MESH    # enable 802.11s draft support
#device        ath_hal        # pci/cardbus chip support
options     AH_SUPPORT_AR5416    # enable AR5416 tx/rx descriptors
device        ath_rf2425
device        ath_rate_sample    # SampleRate tx rate control for ath

# Pseudo devices.
device        loop        # Network loopback
device        random        # Entropy device
device        ether        # Ethernet support
device        tun        # Packet tunnel.
device        pty        # BSD-style compatibility pseudo ttys
device        md        # Memory "disks"
device        gif        # IPv6 and IPv4 tunneling
device        faith        # IPv6-to-IPv4 relaying (translation)
device        firmware    # firmware assist module

# The `bpf' device enables the Berkeley Packet Filter.
# Be aware of the administrative consequences of enabling this!
# Note that 'bpf' is required for DHCP.
device        bpf        # Berkeley packet filter

# USB support
device        uhci        # UHCI PCI->USB interface
device        ehci        # EHCI PCI->USB interface (USB 2.0)
device        usb        # USB Bus (required)
device        ukbd        # Keyboard
device        ums        # Mouse
device        urio        # Diamond Rio 500 MP3 player
# Modules
makeoptions MODULES_OVERRIDE="msdosfs msdosfs_iconv ntfs ntfs_iconv tmpfs
zfs udf udf_iconv usb/umass cd9660 cd9660_iconv hptrr linux linprocfs
linsysfs /ata/atapicd dc sound/sound sound/driver/hda speaker ahci usb/uhid
usb/ulpt ipfw wlan wlan_wep wlan_tkip wlan_ccmp wlan_amrr crypto ath if_lagg
tx nullfs splash /syscons/blank /syscons/dragon /syscons/fade /syscons/green
/syscons/logo /syscons/rain /syscons/snake /syscons/star /syscons/warp
libmchain libiconv zlib opensolaris geom/geom_eli geom/geom_journal
geom/geom_mirror geom/geom_uzip"
*
Thank you.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?p2r132803231004092302x7cdb8b21kb654ccf87abd2ab9>