Firefly Open Source Community

   Login   |   Register   |
New_Topic
Print Previous Topic Next Topic

[Linux] Problems building Linux kernel with RT patch PREEMPT_RT

19

Credits

0

Prestige

0

Contribution

new registration

Rank: 1

Credits
19

【Linux】 Problems building Linux kernel with RT patch PREEMPT_RT

Posted at 4/11/2024 13:48:45      View:1174 | Replies:3        Print      Only Author   [Copy Link] 1#
Problem description and steps to reproduce:
Last edited by Andy_S In 4/11/2024 19:18 Editor

Hello.
When building the Linux kernel with the RT patch PREEMPT_RT 5.10.198, the errors below appear. Please tell me what needs to be done to correct them.


   AS      .tmp_vmlinux.kallsyms2.S
  LD      vmlinux
  BTFIDS  vmlinux
  SORTTAB vmlinux
  SYSMAP  System.map
  OBJCOPY arch/arm64/boot/Image
  MODPOST modules-only.symvers
  LZ4C    arch/arm64/boot/Image.lz4
drivers/mmc/core/.mmc_blk_data.cmd: No such file or directory
make[2]: *** [scripts/Makefile.modpost:168: modules-only.symvers] Ошибка 1
make[1]: *** [Makefile:1856: modules] Ошибка 2
make: *** [arch/arm64/Makefile:214: rk3568-firefly-itx-3568q.img] Error 2
make: Leaving directory '/home/andy/PROJECTS_RT/rk356x_linux5.10_release/kernel'
ERROR: Running /home/andy/PROJECTS_RT/rk356x_linux5.10_release/device/rockchip/common/build-hooks/10-kernel.sh - run_command failed!
ERROR: exit code 2 from line 36:
    $@
ERROR: call stack:
    build-helper: run_command(36)
    10-kernel.sh: do_build(61)
    10-kernel.sh: build_hook(209)
    build-helper: try_func(63)




SDK name:  rk356x_linux5.10_bsp_release_20240319_v1.4.0b

Configuration kernel in   logs_and_configForKernel.tar.gz



The following errors that occurred when building the kernel have been fixed:
ERROR:  

security/smack/smack_lsm.c:54:21: warning: 'smack_ipv6_lock' defined but not used [-Wunused-variable]
error, forbidden warning:smack_lsm.c:54
   54 | static DEFINE_MUTEX(smack_ipv6_lock);
      |                     ^~~~~~~~~~~~~~~


FOR CORRECTION:
    #ifdef SMACK_IPV6_PORT_LABELING
    static DEFINE_MUTEX(smack_ipv6_lock);
    #endif

   

              
ERROR:               
drivers/usb/dwc2/platform.c: In function 'dwc2_resume':
drivers/usb/dwc2/platform.c:816:12: error: 'struct dwc2_hsotg' has no member named 'driver'
  816 |   if (!dwc2->driver)
      |            ^~
make[4]: *** [scripts/Makefile.build:273: drivers/usb/dwc2/platform.o] Ошибка 1
make[3]: *** [scripts/Makefile.build:516: drivers/usb/dwc2] Ошибка 2
make[2]: *** [scripts/Makefile.build:516: drivers/usb] Ошибка 2
make[2]: *** Ожидание завершения заданий…


FOR CORRECTION:  (file   .config)
  <M>   DesignWare USB2 DRD Core Support  
  затем выбрать
           DWC2 Mode Selection (Dual Role mode)  --->   



         
ERROR:
rivers/rpmsg/virtio_rpmsg_bus.c:194:3: error: 'const struct rpmsg_endpoint_ops' has no member named 'get_mtu'
  194 |  .get_mtu = virtio_rpmsg_get_mtu,
      |   ^~~~~~~
drivers/rpmsg/virtio_rpmsg_bus.c:194:13: error: initialization of '__poll_t (*)(struct rpmsg_endpoint *, struct file *, poll_table *)' {aka 'unsigned int (*)(struct rpmsg_endpoint *, struct file *, struct poll_table_struct *)'} from incompatible pointer type 'ssize_t (*)(struct rpmsg_endpoint *)' {aka 'long int (*)(struct rpmsg_endpoint *)'} [-Werror=incompatible-pointer-types]
  194 |  .get_mtu = virtio_rpmsg_get_mtu,
      |             ^~~~~~~~~~~~~~~~~~~~
drivers/rpmsg/virtio_rpmsg_bus.c:194:13: note: (near initialization for 'virtio_endpoint_ops.poll')
cc1: some warnings being treated as errors
make[3]: *** [scripts/Makefile.build:273: drivers/rpmsg/virtio_rpmsg_bus.o] Ошибка 1
make[2]: *** [scripts/Makefile.build:516: drivers/rpmsg] Ошибка 2
make[2]: *** Ожидание завершения заданий…

FOR CORRECTION:   
    .trysend_offchannel = virtio_rpmsg_trysend_offchannel,
#ifdef CONFIG_NO_GKI
    .get_mtu = virtio_rpmsg_get_mtu,
#endif



ERROR:
drivers/rpmsg/virtio_rpmsg_bus.c:712:16: warning: 'virtio_rpmsg_get_mtu' defined but not used [-Wunused-function]
error, forbidden warning:virtio_rpmsg_bus.c:712
  712 | static ssize_t virtio_rpmsg_get_mtu(struct rpmsg_endpoint *ept)
      |                ^~~~~~~~~~~~~~~~~~~~
make[3]: *** [scripts/Makefile.build:273: drivers/rpmsg/virtio_rpmsg_bus.o] Ошибка 1
make[2]: *** [scripts/Makefile.build:516: drivers/rpmsg] Ошибка 2
make[2]: *** Ожидание завершения заданий…

FOR CORRECTION:
#ifdef CONFIG_NO_GKI
static ssize_t virtio_rpmsg_get_mtu(struct rpmsg_endpoint *ept);
#endif


#ifdef CONFIG_NO_GKI
static ssize_t virtio_rpmsg_get_mtu(struct rpmsg_endpoint *ept)
{
    struct rpmsg_device *rpdev = ept->rpdev;
    struct virtio_rpmsg_channel *vch = to_virtio_rpmsg_channel(rpdev);

    return vch->vrp->buf_size - sizeof(struct rpmsg_hdr);
}
#endif





Log_files.tar.gz

67.29 KB, Down times: 0

logs_and_configForKernel.tar.gz

266.51 KB, Down times: 0

Reply

Use props Report

70

Credits

0

Prestige

0

Contribution

registered members

Rank: 2

Credits
70
Posted at 11/13/2024 19:21:07        Only Author  2#
Discover Adoro stylish and comfortable casual shoes for men designed to elevate your wardrobe. Shop now for the perfect blend of style and comfort.
Reply

Use props Report

64

Credits

0

Prestige

0

Contribution

registered members

Rank: 2

Credits
64
Posted at 11/13/2024 20:11:19        Only Author  3#
Update your wardrobe with Gulaal’s new dress. Our fresh designs offer a perfect blend of modern trends and timeless elegance for any occasion.
Reply

Use props Report

52

Credits

0

Prestige

0

Contribution

registered members

Rank: 2

Credits
52
Posted at 7 day before        Only Author  4#
Explore elegant unstitched suits for any occasion. Personalize your wardrobe with our high-quality fabrics and create a look that’s uniquely yours.
Reply

Use props Report

You need to log in before you can reply Login | Register

This forum Credits Rules

Quick Reply Back to top Back to list