Page 1 of 1

Buildroot kernel modules

Posted: 2025-05-21 17:12
by andybisson
I have successfully built the buildroot firmware and it works well. I then used the kernel config tool to add modules for usb serial devices. The build produces the following output:

Code: Select all

make: Entering directory '/home/andy/Lyra-sdk/kernel-6.1'
  SYNC    include/config/auto.conf.cmd
  CALL    scripts/checksyscalls.sh
  CC [M]  drivers/usb/serial/usb-serial.o
  CC [M]  drivers/usb/serial/generic.o
  CC [M]  drivers/usb/serial/bus.o
  CC [M]  drivers/usb/serial/ch341.o
  CC [M]  drivers/usb/serial/cp210x.o
  CC [M]  drivers/usb/serial/ftdi_sio.o
  CC [M]  drivers/usb/serial/pl2303.o
  CC [M]  drivers/usb/serial/usb-serial-simple.o
  LD [M]  drivers/usb/serial/usbserial.o
  MODPOST Module.symvers
  CC [M]  drivers/usb/serial/ch341.mod.o
  CC [M]  drivers/usb/serial/cp210x.mod.o
  CC [M]  drivers/usb/serial/ftdi_sio.mod.o
  CC [M]  drivers/usb/serial/pl2303.mod.o
  CC [M]  drivers/usb/serial/usb-serial-simple.mod.o
  CC [M]  drivers/usb/serial/usbserial.mod.o
  LD [M]  drivers/usb/serial/ch341.ko
  LD [M]  drivers/usb/serial/usbserial.ko
  LD [M]  drivers/usb/serial/pl2303.ko
  LD [M]  drivers/usb/serial/usb-serial-simple.ko
  LD [M]  drivers/usb/serial/cp210x.ko
  LD [M]  drivers/usb/serial/ftdi_sio.ko
  Kernel: arch/arm/boot/Image is ready
  Kernel: arch/arm/boot/Image.gz is ready
  Kernel: arch/arm/boot/zImage is ready
  Image:  resource.img (with rk3506g-luckfox-lyra-sd.dtb logo.bmp logo_kernel.bmp) is ready
  Image:  boot.img (with Image  resource.img) is ready
  Image:  zboot.img (with zImage  resource.img) is ready
make: Leaving directory '/home/andy/Lyra-sdk/kernel-6.1'
This all looks fine but when I burn the generated firmware these modules are not present (not shown by lsmod.) What do I have to do to add them to the kernel properly?

Re: Buildroot kernel modules

Posted: 2025-05-21 20:04
by andybisson
It turns out that a clean build is required and then it all works

Re: Buildroot kernel modules

Posted: 2025-05-22 1:48
by longcx
How long does it take you to build a Buildroot image? I've been running the build command for 18 hours, but it seems like it will still take a long time to complete. :?

Re: Buildroot kernel modules

Posted: 2025-05-22 8:18
by andybisson
I haven't timed it but it's of the order of 30-40 minutes on 8-core i7 so I assume there is an issue with your build.
I was actually very pleasantly surprised by the speed and simplicity of the build. These things are usually a nightmare.