From: Thomas Petazzoni via buildroot <buildroot@buildroot.org>
To: Kilian Zinnecker <kilian.zinnecker@mail.de>
Cc: Thomas Petazzoni via buildroot <buildroot@buildroot.org>
Subject: Re: [Buildroot] Interested in board support for BeagleV-Ahead
Date: Fri, 11 Aug 2023 16:48:58 +0200 [thread overview]
Message-ID: <20230811164858.36987e01@windsurf> (raw)
In-Reply-To: <2160318.Mh6RI2rZIc@kilian-aisec>
Hello Kilian,
On Thu, 10 Aug 2023 17:25:00 +0200
Kilian Zinnecker <kilian.zinnecker@mail.de> wrote:
> It actually was not my own fault regarding the errors about unknown vector
> instructions. It seems that the core of the TH1520 SoC - the Xuantie C910 -
> implements a now obsolete version of the RiscV vector extension, namely
> version 0.7.1 (see [1]). However, only past gcc version seem to have supported
> this vector extension version. Recent gcc versions seem to not support it.
> Regarding the Xuantie C906 core, I found out that there now exists some -
> mcpu=thead-c906 option (see [2]). However, I was not able to successfully
> compile a dummy example with one of the v0.7.1 vector instructions myself,
> using that option.
From the gcc documentation, it seems like there is no -mcpu=thead-c906,
but only a -mtune=thead-c906, which only changes optimization
"details", I don't think it will do anything in terms of supporting a
non-standard vector extension. However, I'm not an expert in RISC-V
extensions, so maybe I'm wrong on this.
> Then I also found a RiscV toolchain, which has some "rvv-0.7.1" branch
> (https://github.com/brucehoult/riscv-gnu-toolchain). However, I was not able
> to build it (may be my own fault). But anyway the branch seems very old and I
> am afraid, if I try to use it, I may run into other issues.
I also don't think this is a path worth pursuing.
> So I decided to accept that I currently have a gcc which does not support the
> old 0.7.1 version of the vector extension. Therefore, I disabled vector
> extension support in the kernel config. This is part of my current
> beaglev_ahead_defconfig:
>
> BR2_GCC_VERSION_13_X=y
> BR2_GLOBAL_PATCH_DIR="board/beaglev-ahead/patches"
> BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/beaglev-ahead/linux.fragment"
>
> The linux.fragment file overwrites the vector extension settings:
>
> CONFIG_VECTOR=n
> CONFIG_VECTOR_0_7=n
This seems like the right thing to do, at least in a first step.
> Now, there was one more error in the custom kernel code: One function's
> prototype and its implementation did not match, causing a -Werror=enum-int-
> mismatch:
>
> https://git.beagleboard.org/beaglev-ahead/beaglev-ahead-linux/-/blob/beaglev-v5.10.113-1.1.2/drivers/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_linux.h#L338
>
> https://git.beagleboard.org/beaglev-ahead/beaglev-ahead-linux/-/blob/beaglev-v5.10.113-1.1.2/drivers/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.c#L6144
>
> I changed the prototype accordingly and put a patch for this in my board/
> beaglev-ahead/patches/linux directory. After all this, it continued building
> till the end.
The Vivante mess, meh.
> Now I don't know, whether the compiled uboot, kernel and rootfs would
> function. I would have to test this. But to do so, I guess I would have to
> figure out how to assemble these parts into an image and how to flash it into
> the eMMC of the board.
I only briefly started looking into this. Let me know if you want me to
summarize my findings.
Best regards,
Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next prev parent reply other threads:[~2023-08-11 14:49 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-09 13:57 [Buildroot] Interested in board support for BeagleV-Ahead Kilian Zinnecker via buildroot
2023-08-09 17:38 ` 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 [this message]
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=20230811164858.36987e01@windsurf \
--to=buildroot@buildroot.org \
--cc=kilian.zinnecker@mail.de \
--cc=thomas.petazzoni@bootlin.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox