kld problem at Atheros AR9132

Mori Hiroki yamori813 at yahoo.co.jp
Fri Feb 10 03:35:32 UTC 2017


Hi.

I use ZRouter build system. This tools build ELF kernel first by buildkernel.
Then ELF kernel convert to kbin by use objcopy command. 

ELF -> kbin -> LZMA -> U-BOOT -> block pad

microserver % file Buffalo_WZR-HP-G301NH_kernel*
Buffalo_WZR-HP-G301NH_kernel:                         ELF 32-bit MSB executable,
 MIPS, MIPS32 version 1 (FreeBSD), dynamically linked, interpreter /red/herring,
 not stripped
Buffalo_WZR-HP-G301NH_kernel.kbin:                    data
Buffalo_WZR-HP-G301NH_kernel.kbin.oldlzma:            LZMA compressed data, non-
streamed, size 4127856
Buffalo_WZR-HP-G301NH_kernel.kbin.oldlzma.uboot:      u-boot legacy uImage, Free
BSD Kernel Image, Linux/MIPS, OS Kernel Image (lzma), 1250861 bytes, Wed Feb  8 
02:46:30 2017, Load Address: 0x80001100, Entry Point: 0x80001100, Header CRC: 0x
B20327B9, Data CRC: 0x670E041D
Buffalo_WZR-HP-G301NH_kernel.kbin.oldlzma.uboot.sync: u-boot legacy uImage, Free
BSD Kernel Image, Linux/MIPS, OS Kernel Image (lzma), 1250861 bytes, Wed Feb  8 
02:46:30 2017, Load Address: 0x80001100, Entry Point: 0x80001100, Header CRC: 0x
B20327B9, Data CRC: 0x670E041D

Old U-Boot can't boot ELF kernel dirctory.

This is good command.

microserver % objcopy -V
GNU objcopy 2.17.50 [FreeBSD] 2007-07-03
Copyright 2007 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License.  This program has absolutely no warranty.



----- Original Message -----
> From: Adrian Chadd <adrian.chadd at gmail.com>
> To: Mori Hiroki <yamori813 at yahoo.co.jp>
> Cc: "freebsd-mips at freebsd.org" <freebsd-mips at freebsd.org>
> Date: 2017/2/9, Thu 07:02
> Subject: Re: kld problem at Atheros AR9132
> 
> How are you building that again? I know my way of doing it always
> outputs elf kernels.
> 
> 
> -a
> 
> 
> On 7 February 2017 at 15:28, Mori Hiroki <yamori813 at yahoo.co.jp> wrote:
>>  Hi
>> 
>>  I still have this problem. I use workaround by old objcopy command.
>>  It's unconvenient.
>> 
>>  "link_elf_lookup_symbol: missing symbol hash table" at boot log 
> indicate
>>  this problem.
>> 
>>  Copyright (c) 1992-2017 The FreeBSD Project.
>>  Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
>>          The Regents of the University of California. All rights reserved.
>>  FreeBSD is a registered trademark of The FreeBSD Foundation.
>>  FreeBSD 12.0-CURRENT #2 50b7905(rt_patch)-dirty: Tue Feb  7 22:10:26 JST 
> 2017
>>     
> hiroki at microserver:/storage/home/hiroki/obj/storage/home/hiroki/zrouter/tmp/
>>  mips.mips/storage/home/hiroki/freebsd/sys/Buffalo_WZR-HP-G301NH mips
>>  gcc version 4.2.1 20070831 patched [FreeBSD]
>>  Preloaded elf kernel "kernel" at 0x804332a0.
>>  link_elf_lookup_symbol: missing symbol hash table
>>  link_elf_lookup_symbol: missing symbol hash table
>>  real memory  = 67108864 (65536K bytes)
>> 
>> 
>>  ----- Original Message -----
>>> From: Mori Hiroki <yamori813 at yahoo.co.jp>
>>> To: "freebsd-mips at freebsd.org" 
> <freebsd-mips at freebsd.org>
>>> Date: 2016/9/23, Fri 22:52
>>> Subject: Re: kld problem at Atheros AR9132
>>> 
>>> Hi.
>>> 
>>> Still I have this problem. Dose any one have this problem
>>> process to kernel use by objcopy for u-boot.
>>> 
>>> I doubt this is big endian issue.
>>> 
>>> My AR231x port have no problem. Because of redboot not need
>>> obycopy process.
>>> 
>>> Regards.
>>> 
>>> Hiroki Mori
>>> 
>>> ----- Original Message -----
>>>> From: Mori Hiroki <yamori813 at yahoo.co.jp>
>>>> To: "freebsd-mips at freebsd.org" 
> <freebsd-mips at freebsd.org>
>>>> Date: 2016/4/25, Mon 17:41
>>>> Subject: kld problem at Atheros AR9132
>>>> 
>>>> Hi
>>>> 
>>>> I build Atheros AR9132 kernel by head source. I have problem that is
>>>> can't load kld module. RT3050 have no problem same source. I do
>>>> delete old object and full build but still have problem.
>>>> 
>>>> # kldload -v ufs
>>>> linker_load_file: trying to load /boot/kernel/ufs.ko
>>>> 
>>>> linker_make_file: new file, filename='ufs.ko' for 
> pathname='/boot/kernel/ufs.ko'
>>>> linker_file_add_dependency: adding kernel as dependency for ufs.ko
>>>> KLD ufs.ko: depends on kernel - not available or version mismatch
>>>> 
>>>> linker_file_unload: lf->refs=1
>>>> linker_file_unload: file is unloading, informing modules
>>>> linker_file_unload: lf->refs=2
>>>> linker_load_file: trying to load /boot/kernel/ufs.ko
>>>> linker_load_file: Unsupported file type
>>>> kldload: an error occurred while loading the module. Please check 
> dmesg(8) for m
>>>> ore details.
>>>> 
>>>> If you have advice, please let me know.
>>>> 
>>>> Thanks
>>>> 
>>>> Hiroki Mori
>>>> _______________________________________________
>>>> freebsd-mips at freebsd.org mailing list
>>>> https://lists.freebsd.org/mailman/listinfo/freebsd-mips
>>>> To unsubscribe, send any mail to 
> "freebsd-mips-unsubscribe at freebsd.org"
>>>> 
>>>> 
>>>> 
>>> _______________________________________________
>>> freebsd-mips at freebsd.org mailing list
>>> https://lists.freebsd.org/mailman/listinfo/freebsd-mips
>>> To unsubscribe, send any mail to 
> "freebsd-mips-unsubscribe at freebsd.org"
>>> 
>>> 
>>> 
>>  _______________________________________________
>>  freebsd-mips at freebsd.org mailing list
>>  https://lists.freebsd.org/mailman/listinfo/freebsd-mips
>>  To unsubscribe, send any mail to 
> "freebsd-mips-unsubscribe at freebsd.org"
> 


More information about the freebsd-mips mailing list