1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

9.1 RC3: Custom Kernel Build Error 1

Discussion in 'Installing and Upgrading FreeBSD' started by decsis, Dec 9, 2012.

  1. decsis

    decsis New Member

    Messages:
    30
    Likes Received:
    0
    Hello,
    I tried making my first own Kernel, but unfortunately, it fails during make buildkernel:

    Here is my Kernel config:
    http://pastebin.com/dyRes4gi

    The problem is, I don't see what's wrong:

    Code:
    ar9280.c:(.text+0x144): undefined reference to `ath_hal_free'
    ar9280.o: In function `ar9280WriteRegs':
    ar9280.c:(.text+0x11d): undefined reference to `ath_hal_ini_write'
    ar9287.o: In function `ar9287RfAttach':
    ar9287.c:(.text+0x73): undefined reference to `ath_hal_malloc'
    ar9287.o: In function `ar9287RfDetach':
    ar9287.c:(.text+0x144): undefined reference to `ath_hal_free'
    ar9287.o: In function `ar9287SetChannel':
    ar9287.c:(.text+0x49f): undefined reference to `ath_hal_ini_write'
    ar9287.o: In function `ar9287WriteRegs':
    ar9287.c:(.text+0x11d): undefined reference to `ath_hal_ini_write'
    sample.o: In function `calc_usecs_unicast_packet':
    sample.c:(.text+0x605): undefined reference to `ath_hal_pkt_txtime'
    sample.c:(.text+0x6e9): undefined reference to `ath_hal_pkt_txtime'
    *** [kernel] Error code 1
    
    Stop in /usr/obj/usr/src/sys/MYKERNEL.
    *** [buildkernel] Error code 1
    
    Stop in /usr/src.
    *** [buildkernel] Error code 1
    
    Stop in /usr/src.
    
     
  2. sk8harddiefast

    sk8harddiefast Member

    Messages:
    2,011
    Likes Received:
    7
    On your kernel config you have commented
    Code:
    device         ath             # Atheros NIC's
    device         ath_pci         # Atheros pci/cardbus glue
    Uncomment them and try again
     
  3. decsis

    decsis New Member

    Messages:
    30
    Likes Received:
    0
    Thanks a lot, I will try it out!
     
  4. morbit

    morbit New Member

    Messages:
    215
    Likes Received:
    0
    The real problem is, you have commented some ath stuff, but not all of it. What you have left depends on stuff you've already commented out. Make your mind about what you want to achieve, and proceed accordingly.
     
  5. decsis

    decsis New Member

    Messages:
    30
    Likes Received:
    0
    Thanks, the problem is solved. I just wasn't sure if I can remove all these ath modules...doing this solved the problem.
     
  6. morbit

    morbit New Member

    Messages:
    215
    Likes Received:
    0
    Well, as I've said that depends on what you want to achieve, precisely if you already have or plan to use ath hardware, especially if you are not building related modules too (this is only in-kernel config, by default most drivers are also built as modules, and available in /boot/kernel/directory as *ko files to load on boot (editing /boot/loader.conf) or run-time (using kldload). If you want only few modules to bundle in /boot/kernel/ directory, you must define them in MODULES_OVERRIDE=.

    Oh, and most probably, you don't have AC'97 as well as Intel HD, AC'97 is earlier generation of integrated Intel sound, choose what's appropriate in your case, similar with Intel NICs, do you have 3 different ones? See what drivers(s) attach, and comment out not needed ones.