Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

risc-v/qemu: use fully linked apps for kernel build #11524

Merged
merged 1 commit into from
Jan 11, 2024

Conversation

yf13
Copy link
Contributor

@yf13 yf13 commented Jan 11, 2024

Summary

Fully linked apps take less storage and are efficient to load. This is to enable them for rv-vrit configurations in KERNEL build.

Changes:

  • arch/risc-v/Kconfig select BINFMT_ELF_EXECUTABLE for QEMU-RV
  • boards/risc-v/qemu-rv/rv-virt/configs
    • knsh32/defconfig enable ELF_EXECUTABLE, LIBM, OSTEST
    • knsh64/defconfig enable ELF_EXECUTABLE, LIBM, OSTEST
    • ksmp64/defconfig enable ELF_EXECUTABLE, LIBM, OSTEST
    • knetnsh64/defconfig enable ELF_EXECUTABLE, LIBM, OSTEST
    • knetnsh64_smp/defconfig enable ELF_EXECUTABLE, LIBM, OSTEST

Additions:

  • boards/risc-v/qemu-rv/rv-virt/scripts/gnu-elf.ld apps linker script

The ARCH_TEXT_VBASE of knsh32 is set to same as that of 64bit to reuse the apps linker script.
Enabling LIBM makes it convinient for users of toolchains lacking math library
Enableing OSTEST makes it conveinent to run ostest

Impact

Confgurations in kernel build: knsh32. knsh64, ksmp64. knetnsh64. knetnsh64_smp

Testing

Checked with all above configs using kernel build

Fully linked apps take less storage and are efficient to load. This
is to enable them for rv-vrit configurations in KERNEL build.

Changes:

- arch/risc-v/Kconfig       select BINFMT_ELF_EXECUTABLE for QEMU-RV
- boards/risc-v/qemu-rv/rv-virt/configs
  - knsh32/defconfig        enable ELF_EXECUTABLE, LIBM, OSTEST
  - knsh64/defconfig        enable ELF_EXECUTABLE, LIBM, OSTEST
  - ksmp64/defconfig        enable ELF_EXECUTABLE, LIBM, OSTEST
  - knetnsh64/defconfig     enable ELF_EXECUTABLE, LIBM, OSTEST
  - knetnsh64_smp/defconfig enable ELF_EXECUTABLE, LIBM, OSTEST

Additions:
- boards/risc-v/qemu-rv/rv-virt/scripts/
  - gnu-elf.ld              apps linker script

The ARCH_TEXT_VBASE of knsh32 is set to same as that of 64bit to reuse
the apps linker script.

Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
@xiaoxiang781216 xiaoxiang781216 merged commit a937262 into apache:master Jan 11, 2024
27 checks passed
@jerpelea jerpelea added this to To-Add in Release Notes - 12.5.0 Mar 26, 2024
@jerpelea jerpelea moved this from To-Add to Added in Release Notes - 12.5.0 Mar 28, 2024
@lupyuen lupyuen mentioned this pull request May 16, 2024
@yf13 yf13 changed the title risc-v/rv-virt: use fully linked apps for kernel build risc-v/qemu: use fully linked apps for kernel build May 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

4 participants