Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
emerge broadcom-sta fails (6.1.12 kernel) due to PREEMPT_RCU
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
oneone
Tux's lil' helper
Tux's lil' helper


Joined: 20 Sep 2017
Posts: 99

PostPosted: Wed Mar 01, 2023 11:11 am    Post subject: emerge broadcom-sta fails (6.1.12 kernel) due to PREEMPT_RCU Reply with quote

Hi!

I've recently built the 6.1.12 kernel, which is now stable for amd64. I am failing, however, to build all of the packages in @modules-rebuild, in particular net-wireless/broadcom-sta-6.30.223.271-r6. Below is the output of "emerge -va1 broadcom-sta". The problem seems to be that PREEMPT_RCU=y in my kernel config and I do not know how to change that. There does not seem to be a setting in "make menuconfig" for that [/quote][/code]and when unsetting it manually, "make menuconfig" resets it again. Any ideas?

Code:
These are the packages that would be merged, in order:

Calculating dependencies... done!
Dependency resolution took 6.07 s.

[ebuild   R   ~] net-wireless/broadcom-sta-6.30.223.271-r6::gentoo  USE="-dist-kernel" 0 KiB

Total: 1 package (1 reinstall), Size of downloads: 0 KiB

Would you like to merge these packages? [Yes/No]

>>> Verifying ebuild manifests

>>> Running pre-merge checks for net-wireless/broadcom-sta-6.30.223.271-r6
 *
 * If you are stuck using this unmaintained driver (likely in a MacBook),
 * you may be interested to know that a newer compatible wireless card
 * is supported by the in-tree brcmfmac driver. It has a model number
 * BCM943602CS and is for sale on the second hand market for less than
 * 20 USD.
 *
 * See https://wikidevi.com/wiki/Broadcom_Wireless_Adapters and
 *     https://wikidevi.com/wiki/Broadcom_BCM943602CS
 * for more information.
 *

>>> Emerging (1 of 1) net-wireless/broadcom-sta-6.30.223.271-r6::gentoo
 * hybrid-v35_64-nodebug-pcoem-6_30_223_271.tar.gz BLAKE2B SHA512 size ;-) ...    [ ok ]
 * README-broadcom-sta-6.30.223.271.txt BLAKE2B SHA512 size ;-) ...               [ ok ]
 * Determining the location of the kernel source code
 * Found kernel source directory:
 *     /usr/src/linux
 * Found sources for kernel version:
 *     6.1.12-gentoo
 * Checking for suitable kernel configuration options ...
 *   BCMA: If you insist on building this, you must blacklist it!
 *   SSB: If you insist on building this, you must blacklist it!
 *   PREEMPT_RCU: Please do not set the Preemption Model to "Preemptible Kernel"; choose something else.                                                                   [ !! ]
 * Please check to make sure these options are set correctly.
 * Failure to do so may cause unexpected problems.
>>> Unpacking source...
>>> Unpacking hybrid-v35_64-nodebug-pcoem-6_30_223_271.tar.gz to /var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r6/work
>>> Unpacking README-broadcom-sta-6.30.223.271.txt to /var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r6/work
unpack README-broadcom-sta-6.30.223.271.txt: file format not recognized. Ignoring.
>>> Source unpacked in /var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r6/work
>>> Preparing source in /var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r6/work ...
 * Applying broadcom-sta-6.30.223.141-makefile.patch ...
patching file Makefile
Hunk #1 succeeded at 147 with fuzz 2 (offset 19 lines).                           [ ok ]
 * Applying broadcom-sta-6.30.223.141-eth-to-wlan.patch ...                       [ ok ]
 * Applying broadcom-sta-6.30.223.141-gcc.patch ...                               [ ok ]
 * Applying broadcom-sta-6.30.223.248-r3-Wno-date-time.patch ...
patching file Makefile
Hunk #1 succeeded at 145 with fuzz 2 (offset 19 lines).                           [ ok ]
 * Applying broadcom-sta-6.30.223.271-r1-linux-3.18.patch ...                     [ ok ]
 * Applying broadcom-sta-6.30.223.271-r2-linux-4.3-v2.patch ...                   [ ok ]
 * Applying broadcom-sta-6.30.223.271-r4-linux-4.7.patch ...                      [ ok ]
 * Applying broadcom-sta-6.30.223.271-r4-linux-4.8.patch ...                      [ ok ]
 * Applying broadcom-sta-6.30.223.271-r4-linux-4.11.patch ...                     [ ok ]
 * Applying broadcom-sta-6.30.223.271-r4-linux-4.12.patch ...                     [ ok ]
 * Applying broadcom-sta-6.30.223.271-r4-linux-4.15.patch ...                     [ ok ]
 * Applying broadcom-sta-6.30.223.271-r5-linux-5.1.patch ...                      [ ok ]
 * Applying broadcom-sta-6.30.223.271-r5-linux-5.6.patch ...                      [ ok ]
 * Applying broadcom-sta-6.30.223.271-r6-linux-5.9.patch ...                      [ ok ]
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r6/work ...
>>> Source configured.
>>> Compiling source in /var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r6/work ...
ln: failed to create symbolic link 'Module.symvers': File exists
 * Preparing wl module
make -j5 HOSTCC=x86_64-pc-linux-gnu-gcc 'LDFLAGS=-m elf_x86_64' -C /usr/src/linux M=/var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r6/work wl.ko
make: Entering directory '/usr/src/linux-6.1.12-gentoo'
warning: the compiler differs from the one used to build the kernel
  The kernel was built by: gcc (Gentoo 12.2.1_p20230121-r1 p10) 12.2.1 20230121
  You are using:           x86_64-pc-linux-gnu-gcc (Gentoo 12.2.1_p20230121-r1 p10) 12.2.1 20230121
CFG80211 API is prefered for this kernel version
Using CFG80211 API
  CC [M]  /var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r6/work/src/shared/linux_osl.o
make[1]: '/var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r6/work/wl.mod' is up to date.
  CC [M]  /var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r6/work/src/wl/sys/wl_linux.o
  CC [M]  /var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r6/work/src/wl/sys/wl_iw.o
  CC [M]  /var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r6/work/src/wl/sys/wl_cfg80211_hybrid.o
/var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r6/work/src/shared/linux_osl.c: In function ‘osl_dma_alloc_consistent’:
/var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r6/work/src/shared/linux_osl.c:603:14: error: implicit declaration of function ‘pci_alloc_consistent’; did you mean ‘osl_dma_alloc_consistent’? [-Werror=implicit-function-declaration]
  603 |         va = pci_alloc_consistent(osh->pdev, size, (dma_addr_t*)pap);
      |              ^~~~~~~~~~~~~~~~~~~~
      |              osl_dma_alloc_consistent
/var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r6/work/src/shared/linux_osl.c:603:12: warning: assignment to ‘void *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
  603 |         va = pci_alloc_consistent(osh->pdev, size, (dma_addr_t*)pap);
      |            ^
/var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r6/work/src/shared/linux_osl.c: In function ‘osl_dma_free_consistent’:
/var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r6/work/src/shared/linux_osl.c:616:9: error: implicit declaration of function ‘pci_free_consistent’; did you mean ‘osl_dma_free_consistent’? [-Werror=implicit-function-declaration]
  616 |         pci_free_consistent(osh->pdev, size, va, (dma_addr_t)pa);
      |         ^~~~~~~~~~~~~~~~~~~
      |         osl_dma_free_consistent
/var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r6/work/src/shared/linux_osl.c: In function ‘osl_dma_map’:
/var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r6/work/src/shared/linux_osl.c:626:38: error: ‘PCI_DMA_TODEVICE’ undeclared (first use in this function); did you mean ‘DMA_TO_DEVICE’?
  626 |         dir = (direction == DMA_TX)? PCI_DMA_TODEVICE: PCI_DMA_FROMDEVICE;
      |                                      ^~~~~~~~~~~~~~~~
      |                                      DMA_TO_DEVICE
/var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r6/work/src/shared/linux_osl.c:626:38: note: each undeclared identifier is reported only once for each function it appears in
/var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r6/work/src/shared/linux_osl.c:626:56: error: ‘PCI_DMA_FROMDEVICE’ undeclared (first use in this function); did you mean  DMA_FROM_DEVICE’?
  626 |         dir = (direction == DMA_TX)? PCI_DMA_TODEVICE: PCI_DMA_FROMDEVICE;
      |                                                        ^~~~~~~~~~~~~~~~~~
      |                                                        DMA_FROM_DEVICE
/var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r6/work/src/shared/linux_osl.c:659:17: error: implicit declaration of function ‘pci_map_single’; did you mean ‘dma_map_single’? [-Werror=implicit-function-declaration]
  659 |         return (pci_map_single(osh->pdev, va, size, dir));
      |                 ^~~~~~~~~~~~~~
      |                 dma_map_single
/var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r6/work/src/shared/linux_osl.c: In function ‘osl_dma_unmap’:
/var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r6/work/src/shared/linux_osl.c:668:38: error: ‘PCI_DMA_TODEVICE’ undeclared (first use in this function); did you mean ‘DMA_TO_DEVICE’?
  668 |         dir = (direction == DMA_TX)? PCI_DMA_TODEVICE: PCI_DMA_FROMDEVICE;
      |                                      ^~~~~~~~~~~~~~~~
      |                                      DMA_TO_DEVICE
/var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r6/work/src/shared/linux_osl.c:668:56: error: ‘PCI_DMA_FROMDEVICE’ undeclared (first use in this function); did you mean  DMA_FROM_DEVICE’?
  668 |         dir = (direction == DMA_TX)? PCI_DMA_TODEVICE: PCI_DMA_FROMDEVICE;
      |                                                        ^~~~~~~~~~~~~~~~~~
      |                                                        DMA_FROM_DEVICE
/var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r6/work/src/shared/linux_osl.c:669:9: error: implicit declaration of function ‘pci_unmap_single’; did you mean ‘dma_unmap_single’? [-Werror=implicit-function-declaration]
  669 |         pci_unmap_single(osh->pdev, (uint32)pa, size, dir);
      |         ^~~~~~~~~~~~~~~~
      |         dma_unmap_single
/var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r6/work/src/shared/linux_osl.c: In function ‘osl_os_get_image_block’:
/var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r6/work/src/shared/linux_osl.c:1087:35: warning: passing argument 2 of ‘kernel_read’ makes pointer from integer without a cast [-Wint-conversion]
 1087 |         rdlen = kernel_read(fp, fp->f_pos, buf, len);
      |                                 ~~^~~~~~~
      |                                   |
      |                                   loff_t {aka long long int}
In file included from ./include/linux/huge_mm.h:8,
                 from ./include/linux/mm.h:737,
                 from /var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r6/work/src/include/linuxver.h:65,
                 from /var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r6/work/src/shared/linux_osl.c:25:
./include/linux/fs.h:3033:43: note: expected ‘void *’ but argument is of type ‘loff_t’ {aka ‘long long int’}
 3033 | extern ssize_t kernel_read(struct file *, void *, size_t, loff_t *);
      |                                           ^~~~~~
/var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r6/work/src/shared/linux_osl.c:1087:44: warning: passing argument 3 of ‘kernel_read’ makes integer from pointer without a cast [-Wint-conversion]
 1087 |         rdlen = kernel_read(fp, fp->f_pos, buf, len);
      |                                            ^~~
      |                                            |
      |                                            char *
./include/linux/fs.h:3033:51: note: expected ‘size_t’ {aka ‘long unsigned int’} but argument is of type ‘char *’
 3033 | extern ssize_t kernel_read(struct file *, void *, size_t, loff_t *);
      |                                                   ^~~~~~
/var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r6/work/src/shared/linux_osl.c:1087:49: warning: passing argument 4 of ‘kernel_read’ makes pointer from integer without a cast [-Wint-conversion]
 1087 |         rdlen = kernel_read(fp, fp->f_pos, buf, len);
      |                                                 ^~~
      |                                                 |
      |                                                 int
./include/linux/fs.h:3033:59: note: expected ‘loff_t *’ {aka ‘long long int *’} but argument is of type ‘int’
 3033 | extern ssize_t kernel_read(struct file *, void *, size_t, loff_t *);
      |                                                           ^~~~~~~~
cc1: some warnings being treated as errors
make[1]: *** [scripts/Makefile.build:250: /var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r6/work/src/shared/linux_osl.o] Error 1
make[1]: *** Waiting for unfinished jobs....
In file included from /var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r6/work/src/wl/sys/wl_linux.c:81:
/var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r6/work/src/wl/sys/wl_iw.h:74: warning: "isprint" redefined
   74 | #define isprint(c) bcm_isprint(c)
      |
In file included from ./include/linux/string_helpers.h:6,
                 from ./include/linux/seq_file.h:7,
                 from ./include/linux/seq_file_net.h:5,
                 from ./include/net/net_namespace.h:191,
                 from ./include/linux/netdevice.h:38,
                 from /var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r6/work/src/include/linuxver.h:69,
                 from /var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r6/work/src/wl/sys/wl_linux.c:27:
./include/linux/ctype.h:30: note: this is the location of the previous definition
   30 | #define isprint(c)      ((__ismask(c)&(_P|_U|_L|_D|_SP)) != 0)
      |
In file included from /var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r6/work/src/include/osl.h:79,
                 from /var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r6/work/src/wl/sys/wl_linux.c:28:
/var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r6/work/src/wl/sys/wl_linux.c: In function ‘wl_attach’:
/var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r6/work/src/wl/sys/wl_linux.c:647:43: warning: passing argument 1 of ‘memcpy’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
  647 |         bcopy(&wl->pub->cur_etheraddr, dev->dev_addr, ETHER_ADDR_LEN);
/var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r6/work/src/include/linux_osl.h:156:49: note: in definition of macro ‘bcopy’
  156 |         #define bcopy(src, dst, len)    memcpy((dst), (src), (len))
      |                                                 ^~~
In file included from ./arch/x86/include/asm/string.h:5,
                 from ./include/linux/string.h:20,
                 from ./include/linux/bitmap.h:11,
                 from ./include/linux/cpumask.h:12,
                 from ./arch/x86/include/asm/cpumask.h:5,
                 from ./arch/x86/include/asm/msr.h:11,
                 from ./arch/x86/include/asm/processor.h:22,
                 from ./arch/x86/include/asm/timex.h:5,
                 from ./include/linux/timex.h:67,
                 from ./include/linux/time32.h:13,
                 from ./include/linux/time.h:60,
                 from ./include/linux/stat.h:19,
                 from ./include/linux/module.h:13,
                 from /var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r6/work/src/include/linuxver.h:40:
./arch/x86/include/asm/string_64.h:22:27: note: expected ‘void *’ but argument is of type ‘const unsigned char *’
   22 | extern void *memcpy(void *to, const void *from, size_t len);
      |                     ~~~~~~^~
/var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r6/work/src/wl/sys/wl_linux.c: In function ‘wl_pci_probe’:
/var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r6/work/src/wl/sys/wl_linux.c:786:9: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
  786 |         if ((val & 0x0000ff00) != 0)
      |         ^~
/var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r6/work/src/wl/sys/wl_linux.c:788:17: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
  788 |                 bar1_size = pci_resource_len(pdev, 2);
      |                 ^~~~~~~~~
/var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r6/work/src/wl/sys/wl_linux.c: In function ‘wl_set_mac_address’:
/var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r6/work/src/wl/sys/wl_linux.c:1853:31: warning: passing argument 1 of ‘memcpy’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
 1853 |         bcopy(sa->sa_data, dev->dev_addr, ETHER_ADDR_LEN);
/var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r6/work/src/include/linux_osl.h:156:49: note: in definition of macro ‘bcopy’
  156 |         #define bcopy(src, dst, len)    memcpy((dst), (src), (len))
      |                                                 ^~~
./arch/x86/include/asm/string_64.h:22:27: note: expected ‘void *’ but argument is of type ‘const unsigned char *’
   22 | extern void *memcpy(void *to, const void *from, size_t len);
      |                     ~~~~~~^~
/var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r6/work/src/wl/sys/wl_linux.c: In function ‘_wl_add_monitor_if’:
/var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r6/work/src/wl/sys/wl_linux.c:3032:37: warning: passing argument 1 of ‘memcpy’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
 3032 |         bcopy(wl->dev->dev_addr, dev->dev_addr, ETHER_ADDR_LEN);
/var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r6/work/src/include/linux_osl.h:156:49: note: in definition of macro ‘bcopy’
  156 |         #define bcopy(src, dst, len)    memcpy((dst), (src), (len))
      |                                                 ^~~
./arch/x86/include/asm/string_64.h:22:27: note: expected ‘void *’ but argument is of type ‘const unsigned char *’
   22 | extern void *memcpy(void *to, const void *from, size_t len);
      |                     ~~~~~~^~
/var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r6/work/src/wl/sys/wl_linux.c: In function ‘wl_proc_read’:
/var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r6/work/src/wl/sys/wl_linux.c:3313:26: error: implicit declaration of function ‘PDE_DATA’; did you mean ‘NODE_DATA’? [-Werror=implicit-function-declaration]
 3313 |         wl_info_t * wl = PDE_DATA(file_inode(filp));
      |                          ^~~~~~~~
      |                          NODE_DATA
/var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r6/work/src/wl/sys/wl_linux.c:3313:26: warning: initialization of ‘wl_info_t *’ {aka ‘struct wl_info *’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
/var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r6/work/src/wl/sys/wl_linux.c: In function ‘wl_proc_write’:
/var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r6/work/src/wl/sys/wl_linux.c:3370:26: warning: initialization of ‘wl_info_t *’ {aka ‘struct wl_info *’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
 3370 |         wl_info_t * wl = PDE_DATA(file_inode(filp));
      |                          ^~~~~~~~
/var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r6/work/src/wl/sys/wl_cfg80211_hybrid.c:1792:20: error: initialization of ‘int (*)(struct wiphy *, struct net_device *, int,  u8,  bool,  const u8 *, struct key_params *)’ {aka ‘int (*)(struct wiphy *, struct net_device *, int,  unsigned char,  _Bool,  const unsigned char *, struct key_params *)’} from incompatible pointer type ‘s32 (*)(struct wiphy *, struct net_device *, u8,  bool,  const u8 *, struct key_params *)’ {aka ‘int (*)(struct wiphy *, struct net_device *, unsigned char,  _Bool,  const unsigned char *, struct key_params *)’} [-Werror=incompatible-pointer-types]
 1792 |         .add_key = wl_cfg80211_add_key,
      |                    ^~~~~~~~~~~~~~~~~~~
/var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r6/work/src/wl/sys/wl_cfg80211_hybrid.c:1792:20: note: (near initialization for ‘wl_cfg80211_ops.add_key’)
/var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r6/work/src/wl/sys/wl_cfg80211_hybrid.c:1793:20: error: initialization of ‘int (*)(struct wiphy *, struct net_device *, int,  u8,  bool,  const u8 *)’ {aka ‘int (*)(struct wiphy *, struct net_device *, int,  unsigned char,  _Bool,  const unsigned char *)’} from incompatible pointer type ‘s32 (*)(struct wiphy *, struct net_device *, u8,  bool,  const u8 *)’ {aka ‘int (*)(struct wiphy *, struct net_device *, unsigned char,  _Bool,  const unsigned char *)’} [-Werror=incompatible-pointer-types]
 1793 |         .del_key = wl_cfg80211_del_key,
      |                    ^~~~~~~~~~~~~~~~~~~
/var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r6/work/src/wl/sys/wl_cfg80211_hybrid.c:1793:20: note: (near initialization for ‘wl_cfg80211_ops.del_key’)
/var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r6/work/src/wl/sys/wl_cfg80211_hybrid.c:1794:20: error: initialization of ‘int (*)(struct wiphy *, struct net_device *, int,  u8,  bool,  const u8 *, void *, void (*)(void *, struct key_params *))’ {aka ‘int (*)(struct wiphy *, struct net_device *, int,  unsigned char,  _Bool,  const unsigned char *, void *, void (*)(void *, struct key_params *))’} from incompatible pointer type ‘s32 (*)(struct wiphy *, struct net_device *, u8,  bool,  const u8 *, void *, void (*)(void *, struct key_params *))’ {aka ‘int (*)(struct wiphy *, struct net_device *, unsigned char,  _Bool,  const unsigned char *, void *, void (*)(void *, struct key_params *))’} [-Werror=incompatible-pointer-types]
 1794 |         .get_key = wl_cfg80211_get_key,
      |                    ^~~~~~~~~~~~~~~~~~~
/var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r6/work/src/wl/sys/wl_cfg80211_hybrid.c:1794:20: note: (near initialization for ‘wl_cfg80211_ops.get_key’)
/var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r6/work/src/wl/sys/wl_cfg80211_hybrid.c:1795:28: error: initialization of ‘int (*)(struct wiphy *, struct net_device *, int,  u8,  bool,  bool)’ {aka ‘int (*)(struct wiphy *, struct net_device *, int,  unsigned char,  _Bool,  _Bool)’} from incompatible pointer type ‘s32 (*)(struct wiphy *, struct net_device *, u8,  bool,  bool)’ {aka ‘int (*)(struct wiphy *, struct net_device *, unsigned char,  _Bool,  _Bool)’} [-Werror=incompatible-pointer-types]
 1795 |         .set_default_key = wl_cfg80211_config_default_key,
      |                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r6/work/src/wl/sys/wl_cfg80211_hybrid.c:1795:28: note: (near initialization for ‘wl_cfg80211_ops.set_default_key’)
/var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r6/work/src/wl/sys/wl_cfg80211_hybrid.c: In function ‘wl_bss_roaming_done’:
/var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r6/work/src/wl/sys/wl_cfg80211_hybrid.c:2362:18: error: ‘struct cfg80211_roam_info’ has no member named ‘channel’
 2362 |         roam_info.channel = &wl->conf->channel,
      |                  ^
/var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r6/work/src/wl/sys/wl_cfg80211_hybrid.c:2363:18: error: ‘struct cfg80211_roam_info’ has no member named ‘bssid’
 2363 |         roam_info.bssid = (u8 *)&wl->bssid,
      |                  ^
/var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r6/work/src/wl/sys/wl_cfg80211_hybrid.c:2362:47: warning: left-hand operand of comma expression has no effect [-Wunused-value]
 2362 |         roam_info.channel = &wl->conf->channel,
      |                                               ^
/var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r6/work/src/wl/sys/wl_cfg80211_hybrid.c:2363:43: warning: left-hand operand of comma expression has no effect [-Wunused-value]
 2363 |         roam_info.bssid = (u8 *)&wl->bssid,
      |                                           ^
In file included from /var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r6/work/src/wl/sys/wl_cfg80211_hybrid.c:43:
/var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r6/work/src/wl/sys/wl_cfg80211_hybrid.c: In function ‘wl_set_auth_type’:
/var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r6/work/src/wl/sys/wl_cfg80211_hybrid.h:52:12: warning: this statement may fall through [-Wimplicit-fallthrough=]
   52 |         if (wl_dbg_level & WL_DBG_DBG) {                        \
      |            ^
/var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r6/work/src/wl/sys/wl_cfg80211_hybrid.c:793:17: note: in expansion of macro ‘WL_DBG’
  793 |                 WL_DBG(("network eap\n"));
      |                 ^~~~~~
/var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r6/work/src/wl/sys/wl_cfg80211_hybrid.c:794:9: note: here
  794 |         default:
      |         ^~~~~~~
cc1: some warnings being treated as errors
make[1]: *** [scripts/Makefile.build:250: /var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r6/work/src/wl/sys/wl_cfg80211_hybrid.o] Error 1
cc1: some warnings being treated as errors
make[1]: *** [scripts/Makefile.build:250: /var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r6/work/src/wl/sys/wl_linux.o] Error 1
make: *** [Makefile:2005: /var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r6/work] Error 2
make: Leaving directory '/usr/src/linux-6.1.12-gentoo'
 * ERROR: net-wireless/broadcom-sta-6.30.223.271-r6::gentoo failed (compile phase):
 *   emake failed
 *
 * If you need support, post the output of `emerge --info '=net-wireless/broadcom-sta-6.30.223.271-r6::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=net-wireless/broadcom-sta-6.30.223.271-r6::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r6/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r6/temp/environment'.
 * Working directory: '/var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r6/work'
 * S: '/var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r6/work'

>>> Failed to emerge net-wireless/broadcom-sta-6.30.223.271-r6, Log file:

>>>  '/var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r6/temp/build.log'

 * Messages for package net-wireless/broadcom-sta-6.30.223.271-r6:

 *
 * If you are stuck using this unmaintained driver (likely in a MacBook),
 * you may be interested to know that a newer compatible wireless card
 * is supported by the in-tree brcmfmac driver. It has a model number
 * BCM943602CS and is for sale on the second hand market for less than
 * 20 USD.
 *
 * See https://wikidevi.com/wiki/Broadcom_Wireless_Adapters and
 *     https://wikidevi.com/wiki/Broadcom_BCM943602CS
 * for more information.
 *

 * Messages for package net-wireless/broadcom-sta-6.30.223.271-r6:

 *   BCMA: If you insist on building this, you must blacklist it!
 *   SSB: If you insist on building this, you must blacklist it!
 *   PREEMPT_RCU: Please do not set the Preemption Model to "Preemptible Kernel"; choose something else.
 * Please check to make sure these options are set correctly.
 * Failure to do so may cause unexpected problems.
 * ERROR: net-wireless/broadcom-sta-6.30.223.271-r6::gentoo failed (compile phase):
 *   emake failed
 *
 * If you need support, post the output of `emerge --info '=net-wireless/broadcom-sta-6.30.223.271-r6::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=net-wireless/broadcom-sta-6.30.223.271-r6::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r6/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r6/temp/environment'.
 * Working directory: '/var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r6/work'
 * S: '/var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r6/work
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30917
Location: here

PostPosted: Wed Mar 01, 2023 12:23 pm    Post subject: Reply with quote

There is an open bug with a patch for this problem, but after that you should fall in the error
Code:
./include/linux/fortify-string.h:212:37: note: expected void *’ but argument is of type const unsigned char *’
  212 | __FORTIFY_INLINE void *memcpy(void *p, const void *q, __kernel_size_t size)
      |                               ~~~~~~^
/var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r6/work/src/wl/sys/wl_linux.c: In function wl_proc_read’:
/var/tmp/portage/net-wireless/broadcom-sta-6.30.223.271-r6/work/src/wl/sys/wl_linux.c:3313:26: error: implicit declaration of function PDE_DATA’; did you mean NODE_DATA’? [-Werror=implicit-function-declaration]
 3313 |         wl_info_t * wl = PDE_DATA(file_inode(filp));
      |           

where a patch is not yet available.
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
oneone
Tux's lil' helper
Tux's lil' helper


Joined: 20 Sep 2017
Posts: 99

PostPosted: Wed Mar 01, 2023 12:59 pm    Post subject: Reply with quote

Thanks! I will watch that bug in that case and keep the 5.15.88 kernel for so long.
Back to top
View user's profile Send private message
ukky
Tux's lil' helper
Tux's lil' helper


Joined: 26 Feb 2023
Posts: 109
Location: Montreal, Canada

PostPosted: Wed Mar 01, 2023 3:14 pm    Post subject: Reply with quote

oneone,

Preemption model is selected in General setup->Preemption Model.
Option PREEMPT_RCU cannot be modified directly.
PREEMPT_RCU is selected automatically when you choose any of these preemption models:
    a) Preemptible Kernel (Low-Latency Desktop)
    b) Fully Preemptible Kernel (Real-Time) (this might not be available on all CPU architectures)

Also, PREEMPT_RCU is selected automatically when you enable PREEMPT_DYNAMIC in 'General setup'.
Back to top
View user's profile Send private message
oneone
Tux's lil' helper
Tux's lil' helper


Joined: 20 Sep 2017
Posts: 99

PostPosted: Wed Mar 01, 2023 7:41 pm    Post subject: Reply with quote

Thank you very much, ukky. Unsetting PREEMPT_DYNAMIC did the trick. I'll recompile with that setting. Probably it won't fix the issue due to the mentioned bugs, but in any case I would have to unset it.

EDIT: I could successfully rebuild the kernel with the desired settings, but as expected broadcom-sta still fails to compile for the same reason.
Back to top
View user's profile Send private message
ukky
Tux's lil' helper
Tux's lil' helper


Joined: 26 Feb 2023
Posts: 109
Location: Montreal, Canada

PostPosted: Thu Mar 02, 2023 3:54 am    Post subject: Reply with quote

Code:
$ cd /usr/src/linux
$ make clean
$ make
$ sudo bash -c 'make install && make modules_install'
$ sudo emerge -av1 net-wireless/broadcom-sta
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21635

PostPosted: Thu Mar 02, 2023 12:23 pm    Post subject: Reply with quote

The proposed commands look questionable to me. First you use a prompt that traditionally indicates a non-root user, but you propose that the user build in the kernel source tree, which by default only root can do (and which is discouraged: Building the kernel as root can be harmful). Then you use sudo for the install step, which is unnecessary if you meant for all these steps to be root, and it assumes a working sudo, which is not guaranteed. On my system, those latter commands fail because I do not have sudo:
Code:
$ sudo bash -c 'make install && make modules_install'
-bash: sudo: command not found
We have no indication that OP has sudo installed and working, so recommending OP use it may lead to a failure.

Finally, if you're going to sudo bash -c commands, you could include that emerge in the commands.
Back to top
View user's profile Send private message
ukky
Tux's lil' helper
Tux's lil' helper


Joined: 26 Feb 2023
Posts: 109
Location: Montreal, Canada

PostPosted: Thu Mar 02, 2023 3:20 pm    Post subject: Reply with quote

Hu,

I was under impression that oneone knows how to modify kernel build parameters, how to build and install kernel.
My command sequence was a guideline, just an idea.
How a user builds his/her kernel is a matter of preferences, thus '$ make' is just a hint to rebuild a kernel (as a non-root user).
I totally agree with you that building kernel as a root user is really bad idea. Personally, I build kernel out-of-tree as a non-root user.
Back to top
View user's profile Send private message
oneone
Tux's lil' helper
Tux's lil' helper


Joined: 20 Sep 2017
Posts: 99

PostPosted: Sun Mar 05, 2023 6:26 pm    Post subject: Reply with quote

As I said, I was able to rebuild the kernel with CONFIG_PREEMPT_DYNAMIC=n, but - as mentioned by fedeliallalinea - this is not the only problem that prevents me from building broadcom-sta. Thank you, however, for letting me know how to switch this setting. I know, it's a bit offtopic, but is there a general method for obtaining something like a dependency tree for kernel settings in order to find out which settings implicitly set/unset others?
Back to top
View user's profile Send private message
ukky
Tux's lil' helper
Tux's lil' helper


Joined: 26 Feb 2023
Posts: 109
Location: Montreal, Canada

PostPosted: Sun Mar 05, 2023 6:35 pm    Post subject: Reply with quote

oneone,

I never heard of any tool that generates the whole dependency tree for kernel settings.
But if you are interested only in a single kernel parameter, let's say PREEMPT_DYNAMIC, you can:
Code:
make menuconfig

Hit search key '/'.
Type 'PREEMPT_DYNAMIC'
You'll get a search results and from there, for your PREEMPT_DYNAMIC, you'll see:
- Depends on: {rules}
- Selects: {rules}
Back to top
View user's profile Send private message
oneone
Tux's lil' helper
Tux's lil' helper


Joined: 20 Sep 2017
Posts: 99

PostPosted: Sun Mar 05, 2023 6:54 pm    Post subject: Reply with quote

Strange that there is no such thing - I come across this issue every now and then.

I am aware of the search functionality in menuconfig, but there seem to be two problems. Firstly the "Selects" list is not always exhaustive (e.g. the list for PREEMPT_DYNAMIC does not show that it selects PREEMPT_RCU) and secondly there is not always a "Depends on" list, which I am most interested in (e.g. PREEMPT_RCU does not have such a list, the entry only shows that it selects TREE_RCU).
Back to top
View user's profile Send private message
ukky
Tux's lil' helper
Tux's lil' helper


Joined: 26 Feb 2023
Posts: 109
Location: Montreal, Canada

PostPosted: Sun Mar 05, 2023 7:11 pm    Post subject: Reply with quote

oneone,

To do a collect full information and find all dependencies for a specific kernel parameter, for example PREEMPT_RCU:
Code:
$ find /usr/src/linux-6.1.12-gentoo/ -type f -name 'Kconfig*' -exec grep --with-filename --line-number '\bPREEMPT_RCU\b' "{}" \;

This will give you a list of files where this parameter is defined or used.
Then you iterate this process for each kernel parameter that affects parameter you are analyzing.
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 4157
Location: Bavaria

PostPosted: Sun Mar 05, 2023 7:45 pm    Post subject: Reply with quote

oneone,

you are right, sometimes its hard to understand kernels logic ... because there have been changes in the past ... PREMPT_RCU is a good example ... Today it is a "calculated" option you cannot change directly. What to do when you have such an option ?

First: Search with / (you have done). You get this information:
Quote:
Defined at kernel/rcu/Kconfig:19

Now view this Kconfig file at Line 19 and you will see:
Code:
config PREEMPT_RCU
        bool
        default y if PREEMPTION

Now you know where it depends ... and you will see ALSO there is still a help text, you will never see anymore TODAY in "make menuconfig" ... ;-)
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21635

PostPosted: Sun Mar 05, 2023 7:49 pm    Post subject: Reply with quote

For a simple search like this, there is no need to use find, especially with -exec, which creates numerous child processes. You can get an equivalent result, much faster, with:
Code:
grep --with-filename --line-number --recursive --include='Kconfig*' '\bPREEMPT_RCU\b' /usr/src/linux-6.1.12-gentoo/
Back to top
View user's profile Send private message
oneone
Tux's lil' helper
Tux's lil' helper


Joined: 20 Sep 2017
Posts: 99

PostPosted: Sun Mar 05, 2023 8:19 pm    Post subject: Reply with quote

Ok cool, I found the help text, that's a start (thx pietinger) :)

I also got the list of files where PREEMPT_RCU occurrs in, but that is only:

Code:

/usr/src/linux-6.1.12-gentoo/kernel/rcu/Kconfig:19:config PREEMPT_RCU
/usr/src/linux-6.1.12-gentoo/kernel/rcu/Kconfig:201:   depends on (RT_MUTEXES && PREEMPT_RCU && RCU_EXPERT) || PREEMPT_RT


How would this tell me that PREEMPT_DYNAMIC selects PREEMPT_RCU? Kconfig:19 is just the definition of PREEMPT_RCU itself and Kconfig:201 is the dependency list of RCU_BOOST, which depends on PREEMPT_RCU. There is no occurrence of "select PREEMPT_RCU" though. Hmmm..
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 4157
Location: Bavaria

PostPosted: Sun Mar 05, 2023 8:33 pm    Post subject: Reply with quote

oneone wrote:
How would this tell me that PREEMPT_DYNAMIC selects PREEMPT_RCU? Kconfig:19 is just the definition of PREEMPT_RCU itself and Kconfig:201 is the dependency list of RCU_BOOST, which depends on PREEMPT_RCU. There is no occurrence of "select PREEMPT_RCU" though. Hmmm..

It is an iterative process. Now you now PREEMPT_RCU "default[s] [to] y if PREEMPTION", this = PREEMPTION is your next search ... ;-)
Back to top
View user's profile Send private message
ukky
Tux's lil' helper
Tux's lil' helper


Joined: 26 Feb 2023
Posts: 109
Location: Montreal, Canada

PostPosted: Sun Mar 05, 2023 8:34 pm    Post subject: Reply with quote

You have to find definition for PREEMPT_DYNAMIC, it will show what other options it selects. In this case it's PREEMPT_BUILD.
Then PREEMPT_BUILD selects PREEMPTION.
And PREEMPTION will select PREEMPT_RCU.
Back to top
View user's profile Send private message
oneone
Tux's lil' helper
Tux's lil' helper


Joined: 20 Sep 2017
Posts: 99

PostPosted: Sun Mar 05, 2023 8:47 pm    Post subject: Reply with quote

Ooh, I see. I totally missed the "if PREEMPTION" part :o

Thank you so much!!!
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 4157
Location: Bavaria

PostPosted: Sun Mar 05, 2023 8:49 pm    Post subject: Reply with quote

ukky wrote:
You have to find definition for PREEMPT_DYNAMIC, it will show what other options it selects. In this case it's PREEMPT_BUILD.
Then PREEMPT_BUILD selects PREEMPTION.
And PREEMPTION will select PREEMPT_RCU.


Yes ... and if you "come from the other end" you have to watch for "Selected BY" ... ;-)
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 4157
Location: Bavaria

PostPosted: Wed Mar 08, 2023 1:01 pm    Post subject: Reply with quote

Hu wrote:
For a simple search like this, there is no need to use find, especially with -exec, which creates numerous child processes. You can get an equivalent result, much faster, with:
Code:
grep --with-filename --line-number --recursive --include='Kconfig*' '\bPREEMPT_RCU\b' /usr/src/linux-6.1.12-gentoo/

Yes. When searching in Kconfig files it can be usefull to see in which section this keyword is. Therefore it can be usefull to use parameter -A and -B. With this (example):
Code:
 grep --with-filename --line-number --recursive -A 2 -B 1 --include='Kconfig*' '\bPREEMPT_RCU\b' /usr/src/linux-6.1.12-gentoo/

you will see additonal ONE line above and TWO lines below the line where your searched keyword is.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum