From: Kilian Zinnecker via buildroot <buildroot@buildroot.org>
To: buildroot@buildroot.org
Subject: [Buildroot] Interested in board support for BeagleV-Ahead
Date: Wed, 09 Aug 2023 15:57:21 +0200 [thread overview]
Message-ID: <2691942.mvXUDI8C0e@kilian-aisec> (raw)
Hello,
I am interested in adding board support for the BeagleV-Ahead.
I already started trying to setup the board support, but at the moment it does
not work yet, due to some gcc 12 and zicsr and zifencei RiscV extension issue
(see below).
My first question is: As long as it does not yet work: Shall I already send
(not yet working) patches to the mailing list, so that people can discuss
about it and potentially help me? Maybe marked as RFC? Or shall I describe
what I try as part of a normal email (like I do in this mail)?
Regarding board support, Yocto support already seems to exist:
https://git.beagleboard.org/beaglev-ahead/xuantie-yocto
Also a uboot and kernel:
https://git.beagleboard.org/beaglev-ahead/beaglev-ahead-u-boot
https://git.beagleboard.org/beaglev-ahead/beaglev-ahead-linux
I was able to successfully build the uboot, flash it onto an SD card and boot
uboot. I then started to write a defconfig for the BeagleV-Ahead, starting from
the already existing beaglev_defconfig. I used the following uboot settings:
BR2_TARGET_UBOOT=y
BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
BR2_TARGET_UBOOT_CUSTOM_GIT=y
BR2_TARGET_UBOOT_CUSTOM_REPO_URL="https://github.com/beagleboard/beaglev-ahead-u-boot.git"
BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="beaglev-v2020.01-1.1.2"
BR2_TARGET_UBOOT_BOARD_DEFCONFIG="light_beagle"
BR2_TARGET_UBOOT_CONFIG_FRAGMENT_FILES="board/beaglev-ahead/uboot.fragment"
The uboot fragment file overwrites a switch of the custom uboot defconfig, such
that the custom uboot generates u-boot.dtb (without it the build fails):
CONFIG_OF_EMBED=n
For the kernel I use:
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_10=y
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_GIT=y
BR2_LINUX_KERNEL_CUSTOM_TARBALL=y
BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://git.beagleboard.org/beaglev-ahead/beaglev-ahead-linux/-/archive/beaglev-v5.10.113-1.1.2/beaglev-ahead-linux-beaglev-v5.10.113-1.1.2.tar.gz"
BR2_LINUX_KERNEL_DEFCONFIG="light"
BR2_LINUX_KERNEL_DTS_SUPPORT=y
BR2_LINUX_KERNEL_INTREE_DTS_NAME="thead/light-beagle"
BR2_LINUX_KERNEL_INSTALL_TARGET=y
BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y
When trying to build, I currently encounter the following problems:
The SoC of the BeagleV-Ahead needs RiscV Vector Extension support enabled,
else the build fails, because it cannot deal with the assembly instructions in
some parts of the code. Hence, I believe one needs to activate support for
this:
BR2_RISCV_ISA_CUSTOM_RVV=y
However, this enforces that gcc 12 or higher is used, see Config.in.riscv:
https://gitlab.com/buildroot.org/buildroot/-/blob/
b10ceec75520fab80f76081f50daaaab9df890f5/arch/Config.in.riscv#L69-72
It seems that the RiscV ISA was reorganized at some point, regarding which
extension some microarch maintenance instructions belong to. Also it seems
that this change was adopted in gcc 12 and that this caused some issues in the
past, also within buildroot, see here:
https://lists.buildroot.org/pipermail/buildroot/2022-July/646795.html
The patch seems to be active in buildroot currently, see here:
https://gitlab.com/buildroot.org/buildroot/-/blob/
b10ceec75520fab80f76081f50daaaab9df890f5/arch/arch.mk.riscv#L38-39
However, when trying to build, I get lots of errors, that opcodes are not
recognised and the zicsr and zifencei extension are required, e.g.:
"arch/riscv/cpu/mtrap.S:68: Error: unrecognized opcode `csrr a0,mcause',
extension `zicsr' required"
I already tried using gcc 11 instead (omitting BR2_RISCV_ISA_CUSTOM_RVV and
setting BR2_GCC_VERSION_11_X=y), however, as expected I get errors that vector
instructions are unknown. Does anyone has an idea and can help me?
Best regards,
Kilian
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next reply other threads:[~2023-08-09 13:57 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-09 13:57 Kilian Zinnecker via buildroot [this message]
2023-08-09 17:38 ` [Buildroot] Interested in board support for BeagleV-Ahead Thomas Petazzoni via buildroot
2023-08-10 9:20 ` Kilian Zinnecker via buildroot
2023-08-10 11:02 ` Kilian Zinnecker via buildroot
2023-08-11 14:41 ` Thomas Petazzoni via buildroot
2023-08-11 21:30 ` Robert Nelson
2023-08-11 22:53 ` Robert Nelson
2023-08-12 9:51 ` Kilian Zinnecker via buildroot
2023-08-12 9:56 ` Thomas Petazzoni via buildroot
2023-08-18 17:18 ` Kilian Zinnecker via buildroot
2023-08-18 21:33 ` Robert Nelson
2023-08-18 21:35 ` Robert Nelson
2023-08-20 12:54 ` Kilian Zinnecker via buildroot
2023-08-21 21:43 ` Thomas Petazzoni via buildroot
2023-08-10 15:25 ` Kilian Zinnecker via buildroot
2023-08-11 14:48 ` Thomas Petazzoni via buildroot
2023-08-12 9:56 ` Kilian Zinnecker via buildroot
2023-08-12 10:19 ` Thomas Petazzoni via buildroot
2023-08-12 11:06 ` Kilian Zinnecker via buildroot
2023-08-11 14:40 ` Thomas Petazzoni via buildroot
2023-08-10 16:34 ` Robert Nelson
2023-08-10 17:03 ` Kilian Zinnecker via buildroot
2023-08-10 18:57 ` Robert Nelson
2023-08-10 19:05 ` Robert Nelson
2023-08-10 19:53 ` Kilian Zinnecker via buildroot
2023-08-10 20:45 ` Robert Nelson
2023-08-11 7:11 ` Kilian Zinnecker via buildroot
2023-08-10 20:38 ` Kilian Zinnecker via buildroot
2023-08-10 20:53 ` Robert Nelson
2023-08-11 7:07 ` Kilian Zinnecker via buildroot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2691942.mvXUDI8C0e@kilian-aisec \
--to=buildroot@buildroot.org \
--cc=kilian.zinnecker@mail.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.