<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>15878</bug_id>
          
          <creation_ts>2025-05-25 05:24:57 +0000</creation_ts>
          <short_desc>linux-yocto does not build for qemuriscv32</short_desc>
          <delta_ts>2026-05-28 13:16:28 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>OE-Core</product>
          <component>kernel</component>
          <version>5.3</version>
          <rep_platform>Other</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Low</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>6.1</target_milestone>
          
          <blocked>15433</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Khem Raj">raj.khem</reporter>
          <assigned_to name="Unassigned">unassigned</assigned_to>
          <cc>randy.macleod</cc>
    
    <cc>tgamblin</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>102067</commentid>
    <comment_count>0</comment_count>
    <who name="Khem Raj">raj.khem</who>
    <bug_when>2025-05-25 05:24:57 +0000</bug_when>
    <thetext>kernel does not build currently when debug info is enabled for kernel during build. It ends up with modpost failing with errors like 

WARNING: modpost: vmlinux: section mismatch in reference: bstr_printf+0x2c0 (section: .text) -&gt; init_dynamic_event (section: .init.text)
WARNING: modpost: vmlinux: section mismatch in reference: bstr_printf+0x332 (section: .text) -&gt; init_dynamic_event (section: .init.text)
WARNING: modpost: vmlinux: section mismatch in reference: bstr_printf+0x366 (section: .text) -&gt; init_dynamic_event (section: .init.text)
WARNING: modpost: vmlinux: section mismatch in reference: bstr_printf+0x3ee (section: .text) -&gt; init_dynamic_event (section: .init.text)
ERROR: modpost: vmlinux: local symbol &apos;system_state&apos; was exported
ERROR: modpost: vmlinux: local symbol &apos;static_key_initialized&apos; was exported
ERROR: modpost: vmlinux: local symbol &apos;reset_devices&apos; was exported
ERROR: modpost: vmlinux: local symbol &apos;loops_per_jiffy&apos; was exported
ERROR: modpost: vmlinux: local symbol &apos;init_uts_ns&apos; was exported
ERROR: modpost: vmlinux: local symbol &apos;wait_for_initramfs&apos; was exported
ERROR: modpost: vmlinux: local symbol &apos;init_task&apos; was exported
ERROR: modpost: vmlinux: local symbol &apos;riscv_cached_mvendorid&apos; was exported
ERROR: modpost: vmlinux: local symbol &apos;riscv_cached_marchid&apos; was exported
ERROR: modpost: vmlinux: local symbol &apos;riscv_cached_mimpid&apos; was exported
ERROR: modpost: vmlinux: local symbol &apos;riscv_isa_extension_base&apos; was exported
ERROR: modpost: vmlinux: local symbol &apos;__riscv_isa_extension_available&apos; was exported
ERROR: modpost: vmlinux: local symbol &apos;riscv_get_intc_hwnode&apos; was exported
ERROR: modpost: vmlinux: local symbol &apos;pm_power_off&apos; was exported
ERROR: modpost: vmlinux: local symbol &apos;return_address&apos; was exported
ERROR: modpost: vmlinux: local symbol &apos;riscv_timebase&apos; was exported
ERROR: modpost: vmlinux: local symbol &apos;memset&apos; was exported
ERROR: modpost: vmlinux: local symbol &apos;memcpy&apos; was exported
ERROR: modpost: vmlinux: local symbol &apos;memmove&apos; was exported
ERROR: modpost: vmlinux: local symbol &apos;__memset&apos; was exported
ERROR: modpost: vmlinux: local symbol &apos;__memcpy&apos; was exported
ERROR: modpost: vmlinux: local symbol &apos;__memmove&apos; was exported
ERROR: modpost: vmlinux: local symbol &apos;riscv_set_cacheinfo_ops&apos; was exported

...

ERROR: modpost: __ex_table+0x17a0 references non-executable section &apos;.debug_loclists&apos;
WARNING: modpost: vmlinux: section mismatch in reference: 0x17a4 (section: __ex_table) -&gt; .LLST146 (section: .debug_loclists)
ERROR: modpost: __ex_table+0x17a4 references non-executable section &apos;.debug_loclists&apos;
WARNING: modpost: vmlinux: section mismatch in reference: event_nfs4_renew+0xc (section: .data) -&gt; unbound_reg_init (section: .init.text)
WARNING: modpost: vmlinux: section mismatch in reference: linear_target+0x24 (section: .data) -&gt; bpf_syscall_sysctl_init (section: .init.text)
make[2]: *** [/mnt/b/yoe/master/sources/poky/build/tmp/work-shared/qemuriscv32/kernel-source/scripts/Makefile.modpost:145: vmlinux.symvers] Error 1
make[1]: *** [/mnt/b/yoe/master/sources/poky/build/tmp/work-shared/qemuriscv32/kernel-source/Makefile:1901: modpost] Error 2
make: *** [/mnt/b/yoe/master/sources/poky/build/tmp/work-shared/qemuriscv32/kernel-source/Makefile:224: __sub-make] Error 2
ERROR: oe_runmake failed

The workaround is to disable debug info in defconfig for now.

KERNEL_FEATURES:remove:riscv32 = &quot;features/debug/debug-kernel.scc&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>102090</commentid>
    <comment_count>1</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2025-05-29 14:36:38 +0000</bug_when>
    <thetext>There is a work-around merged but this bug should remain opened until we figure out a proper fix.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>103592</commentid>
    <comment_count>2</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2025-12-18 15:42:33 +0000</bug_when>
    <thetext>Not important unless someone can explain their use-case.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>105597</commentid>
    <comment_count>3</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2026-05-28 13:16:28 +0000</bug_when>
    <thetext>Bulk move of 6.0 Medium bugs to 6.1.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>