Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 18 Jan 2021 09:45:10 +0100
From:      Emmanuel Vadot <manu@bidouilliste.com>
To:        "Dr. Rolf Jansen" <freebsd-rj@obsigna.com>
Cc:        freebsd-arm@freebsd.org
Subject:   Re: GENERICSD snapshot on a BBB has issues with loading the if_rtwn_usb module
Message-ID:  <20210118094510.48eee03d502ea25ab7d09938@bidouilliste.com>
In-Reply-To: <03F9A3D3-0A2B-4B09-9C8D-AAAF761C0F4C@obsigna.com>
References:  <47700631-2D94-4BA8-9707-9ADD70C99600@obsigna.com> <20210116184333.f91594f9c3505d2c588d9634@bidouilliste.com> <20210116184833.1a3182a20a2b6c727b64bb59@bidouilliste.com> <06F689CA-B781-4CEB-8F8A-B00FAC684DD3@obsigna.com> <20210117174539.43b55379e6a37881589616a8@bidouilliste.com> <DFBF17C9-935B-48E5-AD20-2F8265780FCD@obsigna.com> <20210117225539.c113796159735c5a3950c774@bidouilliste.com> <03F9A3D3-0A2B-4B09-9C8D-AAAF761C0F4C@obsigna.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 17 Jan 2021 19:01:24 -0300
"Dr. Rolf Jansen" <freebsd-rj@obsigna.com> wrote:

> > Am 17.01.2021 um 18:55 schrieb Emmanuel Vadot <manu@bidouilliste.com>:
> > 
> > On Sun, 17 Jan 2021 18:49:01 -0300
> > "Dr. Rolf Jansen" <freebsd-rj@obsigna.com> wrote:
> > 
> >>> Am 17.01.2021 um 13:45 schrieb Emmanuel Vadot <manu@bidouilliste.com>:
> >>> 
> >>> On Sat, 16 Jan 2021 15:11:28 -0300
> >>> "Dr. Rolf Jansen" <freebsd-rj@obsigna.com <mailto:freebsd-rj@obsigna.com>> wrote:
> >>> 
> >>>>> Am 16.01.2021 um 14:48 schrieb Emmanuel Vadot <manu@bidouilliste.com <mailto:manu@bidouilliste.com>>:
> >>>>> 
> >>>>> On Sat, 16 Jan 2021 18:43:33 +0100
> >>>>> Emmanuel Vadot <manu@bidouilliste.com <mailto:manu@bidouilliste.com> <mailto:manu@bidouilliste.com <mailto:manu@bidouilliste.com>>> wrote:
> >>>>> 
> >>>>>> On Sat, 16 Jan 2021 14:08:58 -0300
> >>>>>> "Dr. Rolf Jansen" <freebsd-rj@obsigna.com> wrote:
> >>>>>> 
> >>>>>>> I updated one of my BBB from an older 13-CURRENT (July 2020) to the latest 13-ALPHA1 snapshot from Jan, 14th ? GENERICSD-20210114-7ae27c2d6c4-255938.
> >>>>>>> 
> >>>>>>> I had successfully employed an USB-WLAN dongle based on the RTL8188eu chipset. I only added the following into /boot/loader.conf:
> >>>>>>> 
> >>>>>>> if_rtwn_usb_load="YES"
> >>>>>>> 
> >>>>>>> By that all dependend modules were loaded automatically in a snap. With ALPHA1 this doesn?t work anymore. After hours of troubleshooting, I got it working by adding the following into /etc/rc.conf:
> >>>>>>> 
> >>>>>>> kld_list="if_rtwn_usb"
> >>>>>>> 
> >>>>>>> The "Loading kernel modules:" takes apprx. 4 seconds, however, then the USB-WLAN device is enumerated correctly and it is ready to use. This makes me think that this uncommon huge delay is the culprit. I checked this with some snapshot thats I had installed already. The issue seems to have been introduced together with the switch to GENERICSD. A GENERICSD 13-CURRENT from end of December showed this issue already, while a BBB-specific snapshot (from November 2020) that I had installed on another BBB works as before by loading the modules in /boot/loader.conf.
> >>>>>>> 
> >>>>>>> I don't mind to load the modules by the way of the kld_list directive in /etc/rc.conf. However, the unusual long duration of loading the module and its dependencies might be an indication for a more fundamental issue.
> >>>>>>> 
> >>>>>>> Please feel free to ask me for doing more tests. 
> >>>>>>> 
> >>>>>>> Best regards
> >>>>>>> 
> >>>>>>> Rolf
> >>>>>> 
> >>>>>> I can reproduce that on my netbooted BBB.
> >>>>>> The module is correctly loaded :
> >>>>>> 
> >>>>>> Loading
> >>>>>> kernel... /boot/kernel/kernel text=0x1b4 text=0x68d638 text=0x1c84f0
> >>>>>> data=0xb4070 data=0x0+0x258000 syms=[0x4+0xa5ab0+0x4+0x119fd4] Loading
> >>>>>> configured modules... /boot/kernel/if_rtwn_usb.ko text=0xb960
> >>>>>> text=0x62c0 data=0x2cc+0x3b syms=[0x4+0x3570+0x4+0x293f] /boot/entropy
> >>>>>> size=0x1000 /etc/hostid
> >>>>>> size=0x25 Using DTB provided by EFI at
> >>>>>> 0x87f00000. Kernel entry at
> >>>>>> 0x96e00200... Kernel args:
> >>>>>> (null)                                                                                                 
> >>>>>> ---<<BOOT>>---                                                                                         
> >>>>>> 
> >>>>>> But it isn't loaded anymore after booting :
> >>>>>> root@bbb:~ # kldstat 
> >>>>>> Id Refs Address        Size Name
> >>>>>> 1    1 0xc0000000   d23a8c kernel
> >>>>>> 
> >>>>>> I don't think it has to do with the switch to GENERICSD, there is (at
> >>>>>> least shouldn't be) any difference between the old BBB image and the
> >>>>>> GENERICSD one.
> >>>> 
> >>>> Yes, this might well be a coincidence. I do neither have the last BBB specific snapshot nor the first GENERICSD one for testing these against each other.
> >>>> 
> >>>>> Just did a test on my OrangePi One (Allwinner H3 armv7 with 512MB of
> >>>>> RAM) and this is the same.
> >>>>> The problem seems to be module dependancy, loader only loads
> >>>>> if_rtnw_usb but doing a kldload also brings wlan.ko and rtwn.ko
> >>>> 
> >>>> I can confirm this. And in addition loading the if_rtwn_usb.ko module and its dependcies manually also takes now significantly longer compared to a manual load on the BBB specific 13-CURRENT from November. Perhaps something has been changed in the dependency resolver.
> >>>> 
> >>> 
> >>> Fixed in 0f2434ea000e
> >>> 
> >>> Thanks for reporting.
> >> 
> >> Unfortunately, this did not resolve the issue. I updated my working copy with git pull and verified that your changes made it into my source tree. Then I built a new kernel and replaced the original ALPHA1 kernel from 2021-01-14 by this new one. The rtwn-modules are still not loaded by the if_rtwn_usb_load="YES" directive in /boot/loader.conf.
> >> 
> >> Best regards
> >> 
> >> Rolf
> > 
> > You need to update loader.efi on the ESP partition.
> 
> Please excuse my ignorance. Do I need to build world for this? Then where is the newly build loader.efi?
> 
> Best regards
> 
> Rolf

 It's part of buildworld yes but you can rebuild it with :
(cd stand/ && make buildenv TARGET_ARCH=armv7 BUILDENV_SHELL="make
clean all -sj4")

 Then locate loader_lua.efi in the obj directory and place it in the
ESP (the fat16/fat32 partition) as efi/boot/bootarm.efi

-- 
Emmanuel Vadot <manu@bidouilliste.com> <manu@freebsd.org>



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