Date: Tue, 10 Jul 2018 16:06:56 +0200 From: Hans Petter Selasky <hps@selasky.org> To: Michael Tuexen <tuexen@freebsd.org>, FreeBSD PowerPC ML <freebsd-ppc@freebsd.org> Subject: Re: Loading modules from /boot/loader.conf Message-ID: <365d2fef-a272-16b2-de09-6344e2abc242@selasky.org> In-Reply-To: <B7AA170D-9F78-4F67-92FF-2EF0CC2B91D6@freebsd.org> References: <6DB7ABD4-8C04-46B3-8C07-FC591FC16F71@freebsd.org> <B7AA170D-9F78-4F67-92FF-2EF0CC2B91D6@freebsd.org>
index | next in thread | previous in thread | raw e-mail
On 07/10/18 13:23, Michael Tuexen wrote:
>> On 25. Jun 2018, at 19:17, Michael Tuexen <tuexen@FreeBSD.org> wrote:
>>
>> Dear all,
>>
>> I'm running FreeBSD head of today on a G4 MacMini. I'm trying to
>> load a kernel module using /boot/loader.conf by having the line
>>
>> tcp_rack_load="YES"
>>
>> in /boot/loader.conf
>>
>> However, this doesn't work and results in:
>>
>> FreeBSD/powerpc Open Firmware loader, Revision 0.1
>> (Tue Jun 12 01:08:20 UTC 2010 root@releng3.nyi.freebsd.org)
>> Memory: 1048576KB
>> Booted from: /pic@f4000000/ata-@d/disk@0
>>
>> Loading /boot/default/loader.conf
>> /boot/kernel/kernel data=0x706ac+0xed588 syms=[0x4+0xa3100+0x4+0x10bc45]
>> /boot/entropy size=0x1000
>> /boot/kernel/tcp_rack.ko text=0x2433c data=0x1d0+0x220 syms=[0x4+0x15a0+0x4+0x17bd]
>> loading required module 'kernel'
>> module 'kernel' exists but with wrong version
>>
>> Hit [Enter] to boot immediately, or any other key for command prompt.
>> ...
>>
>> I have no problems when running
>>
>> kldload tcp_rack
>>
>> after the system completely booted. Then the modules loads without any problems.
>>
>> Any idea what am I doing wrong?
> The problem seem to be in the metadata information stored in /boot/kernel/kernel.
>
> Concentrating on the version info for the kernel.
>
> The .symtab entry contains
>
> entry: 11727
> st_name: _mod_metadata_kernel_version
> st_value: 0xdcafd4
> st_size: 16
> st_info: STT_OBJECT STB_LOCAL
> st_shndx: 22
>
> which seems to be correct. However, looking at the version info, one finds:
>
> readelf -x .data.rel.local /boot/kernel/kernel provides
> 0x00dcafc8 3454f8e9 00000000 00000000 00000001 4T..............
> 0x00dcafd8 00000003 00000000 00000000 02000000 ................
>
> which corresponds to
>
> {.md_version = 1, .md_type = 3, .md_data = NULL, .md_cval = NULL}
>
> First of all, this information is NOT stored in the .data section as it is in
> the case of power64, amd64, arm64, but in the .data.rel.local section.
> Furthermore,md_data and md_cval are NULL, which should not be the case.
>
> In addition, the set_modmetadata_set should contain pointers to the module
> metadata, but it contains only NULL pointers, as can be checked with
> readelf -x set_modmetadata_set /boot/kernel/kernel
>
> Does anyone knows what is going wrong and why?
>
> Is it possible that
>
> https://svnweb.freebsd.org/base?view=revision&revision=268055
>
> is related to this issue? It only handles the 64-bit version.
> However, simply applying this also to __powerpc__ and recompiling
> the kernel didn't solve the issue.
>
Hi,
There is this thread with some more information:
https://lists.freebsd.org/pipermail/svn-src-all/2014-June/087354.html
--HPS
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?365d2fef-a272-16b2-de09-6344e2abc242>
