Selection of ethernet peripheral by application

Christian MAUDERER christian.mauderer at embedded-brains.de
Fri Jun 4 07:32:15 UTC 2021


Am 02.06.21 um 20:37 schrieb Kinsey Moore:
> Hello,
> 
>  From what I’ve seen of the various BSPs supported by LibBSD that have 
> multiple ethernet peripherals,
> 
> only one tends to be chosen and supported. I’ve encountered a situation 
> where the majority of platform
> 
> examples (Zynq Ultrascale+ MPSoC dev boards) use CGEM3 as the 
> only/primary ethernet interface and I
> 
> need to have the option of selecting a different peripheral as the 
> primary interface.
> 
> Unfortunately, the current configuration of LibBSD/RTEMS does not allow 
> for easy switching among the
> 
> available interfaces. The easy one-off option is to just create a BSP 
> variant with a little bit of extra logic
> 
> to select the correct interface in LibBSD, but this problem seems more 
> generally applicable than just
> 
> ethernet and just this one BSP. Is the best alternative to configure all 
> available devices in
> 
> nexus-devices.h and let LibBSD figure it out?
> 
> Thanks,
> Kinsey
> 

If the problem is with "nexus-devices.h": You can always just add 
further devices or a completely own set of devices in your application. 
For example it should be no problem to use

====
SYSINIT_MODULE_REFERENCE(wlan_ratectl_none);
SYSINIT_MODULE_REFERENCE(wlan_sta);
SYSINIT_MODULE_REFERENCE(wlan_amrr);
SYSINIT_MODULE_REFERENCE(wlan_wep);
SYSINIT_MODULE_REFERENCE(wlan_tkip);
SYSINIT_MODULE_REFERENCE(wlan_ccmp);
SYSINIT_DRIVER_REFERENCE(rtwn_usb, uhub);
SYSINIT_REFERENCE(rtwn_rtl8188eufw);

#define RTEMS_BSD_CONFIG_BSP_CONFIG
#define RTEMS_BSD_CONFIG_TERMIOS_KQUEUE_AND_POLL
#define RTEMS_BSD_CONFIG_INIT

#include <machine/rtems-bsd-config.h>
====

in your application to add WLAN support. You could also remove the 
RTEMS_BSD_CONFIG_BSP_CONFIG (which has the effect that nexus-devices.h 
is not included in the rtems-bsd-config.h) and define a different set of 
modules for your application.

Best regards

Christian
-- 
--------------------------------------------
embedded brains GmbH
Herr Christian MAUDERER
Dornierstr. 4
82178 Puchheim
Germany
email: christian.mauderer at embedded-brains.de
phone: +49-89-18 94 741 - 18
fax:   +49-89-18 94 741 - 08

Registergericht: Amtsgericht München
Registernummer: HRB 157899
Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
Unsere Datenschutzerklärung finden Sie hier:
https://embedded-brains.de/datenschutzerklaerung/


More information about the devel mailing list