[solved] Building kernel packages for an Ubuntu flavour fails

Ralf Mardorf kde.lists at yahoo.com
Fri Apr 7 07:14:45 UTC 2023


On Thu, 2023-04-06 at 21:12 +0200, Ralf Mardorf wrote:
> On Thu, 2023-04-06 at 11:16 -0400, Little Girl wrote:
> > https://stackoverflow.com/questions/56149191/linux-latest-stable-compilation-cannot-represent-change-to-vmlinux-gdb-py
> I will try what's suggested by this link and report back.

Hi,

and thank you again. It was an adventure, but now everything seems to be
good.

Building the linux 6.2.9-custom packages worked after removing the
symbolic link, booting 6.2.9-custom works, HDMI audio works now, but
building the Linux device driver for the RealTek RTL8125 2.5Gigabit
Ethernet controller failed.

   root at xubu:/usr/src/r8125-9.011.00# ./autorun.sh 
   
   Check old driver and unload it.
   Build the module and install
   In file included from /usr/src/r8125-9.011.00/src/r8125_n.c:83:
   /usr/src/r8125-9.011.00/src/r8125_n.c: In function ‘rtl8125_init_napi’:
   /usr/src/r8125-9.011.00/src/r8125.h:679:57: error: too many arguments to function ‘netif_napi_add’
     679 | #define RTL_NAPI_CONFIG(ndev, priv, function, weight)   netif_napi_add(ndev, &priv->napi, function, weight)
         |                                                         ^~~~~~~~~~~~~~
   /usr/src/r8125-9.011.00/src/r8125_n.c:13776:17: note: in expansion of macro ‘RTL_NAPI_CONFIG’
   13776 |                 RTL_NAPI_CONFIG(tp->dev, r8125napi, poll, R8125_NAPI_WEIGHT);
         |                 ^~~~~~~~~~~~~~~
   In file included from /usr/src/r8125-9.011.00/src/r8125_n.c:42:
   ./include/linux/netdevice.h:2588:1: note: declared here
    2588 | netif_napi_add(struct net_device *dev, struct napi_struct *napi,
         | ^~~~~~~~~~~~~~
   make[3]: *** [scripts/Makefile.build:252: /usr/src/r8125-9.011.00/src/r8125_n.o] Error 1
   make[2]: *** [Makefile:2021: /usr/src/r8125-9.011.00/src] Error 2
   make[1]: *** [Makefile:188: modules] Error 2
   make: *** [Makefile:41: modules] Error 2
   
   
   root at xubu:/usr/src/r8125-9.011.00# uname -a
   Linux xubu 6.2.9-custom #3 SMP PREEMPT_DYNAMIC Fri Apr  7 00:11:46 CEST 2023 x86_64 x86_64 x86_64 GNU/Linux


-------------


I booted the old kernel, while I didn't believe that linux-libc-dev is
the culprit (but I was confused), I replaced it by the original version.
Btw. I didn't found out how to do this by apt only, hence the wget
workaround.


   weremouse at xubu:/usr/src$ uname -a
   Linux xubu 5.4.0-42-generic #46-Ubuntu SMP Fri Jul 10 00:24:02 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
   
   weremouse at xubu:/usr/src$ dpkg -l "linux*" | grep libc
   ii  linux-libc-dev:amd64                  6.2.9-custom-3       amd64        Linux support headers for userspace development
   
   weremouse at xubu:/usr/src$ wget -q http://security.ubuntu.com/ubuntu/pool/main/l/linux/linux-libc-dev_5.4.0-146.163_amd64.deb
   
   weremouse at xubu:/usr/src$ sudo apt install ./linux-libc-dev_5.4.0-146.163_amd64.deb
   [snip]
   
   weremouse at xubu:/usr/src$ dpkg -l "linux*" | grep libc
   ii  linux-libc-dev:amd64                  5.4.0-146.163        amd64        Linux Kernel Headers for development


-------------


I rebooted and tried to build the module again. When the script unloaded
the old driver this time, I got a notification about disconnecting the
network.


   root at xubu:/usr/src/r8125-9.011.00# ./autorun.sh 
   
   Check old driver and unload it.
   rmmod r8169
   Build the module and install
   [snip]
   make: *** [Makefile:41: modules] Error 2
   
   root at xubu:/usr/src/r8125-9.011.00# uname -a
   Linux xubu 6.2.9-custom #3 SMP PREEMPT_DYNAMIC Fri Apr  7 00:11:46 CEST 2023 x86_64 x86_64 x86_64 GNU/Linux
   
   root at xubu:/usr/src/r8125-9.011.00# modprobe r8169


Building the r8125 module failed again, but I loaded the r8169 driver
and it works for r8125, too. So actually I have Internet access without
the need to build the r8125 module.

FWIW while HDMI audio works, aplay on Xubuntu shows

card 1: PCH [HDA Intel PCH], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: PCH [HDA Intel PCH], device 7: HDMI 1 [HDMI 1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: PCH [HDA Intel PCH], device 8: HDMI 2 [HDMI 2]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: PCH [HDA Intel PCH], device 9: HDMI 3 [HDMI 3]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

and on Arch Linux it shows

card 3: PCH [HDA Intel PCH], device 3: HDMI 0 [EV2450]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 3: PCH [HDA Intel PCH], device 7: HDMI 1 [HDMI 1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 3: PCH [HDA Intel PCH], device 8: HDMI 2 [HDMI 2]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 3: PCH [HDA Intel PCH], device 9: HDMI 3 [HDMI 3]
  Subdevices: 1/1
  Subdevice #0: subdevice #0


The difference is that Xubuntu's "HDMI 0 [HDMI 0]" doesn't provide the
extra information "HDMI 0 [EV2450]" that Arch Linux shows. EV2450 is the
EIZO display's name.

FWIW...

[rocketmouse at archlinux ~]$ uname -r; lsmod | grep r8 
6.2.9-arch1-1
r8125                 270336  0

...the same kernel on Arch, but with the vendor's r8125 driver.

Regards,
Ralf



More information about the ubuntu-users mailing list