From: Peter Seiderer <ps.report@gmx.net>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 2/2] board/raspberrypi: add post-image option for VC4 overlay.
Date: Tue, 10 Mar 2020 13:58:25 +0100 [thread overview]
Message-ID: <20200310135825.1f3caf9b@gmx.net> (raw)
In-Reply-To: <20200310112227.16175-2-cturner@igalia.com>
Hello Charlie,
On Tue, 10 Mar 2020 11:22:27 +0000, Charlie Turner <cturner@igalia.com> wrote:
> It is often necessary to add a device tree overlay for the VC4 V3D
> driver. On a Raspberry Pi 4 for example, if you enable the Gallium VC4
> Mesa driver, you must add dtoverlay=vc4-fkms-v3d to the kernel command
> line for it to work correctly. There are times when adding vc4-kms-v3d
> is also required. This option allows post-image scripts to add either
> option conveniently depending on their specific configuration.
There where already some attempts for this (or similar) feature enhancement
(see [1], [2]), but maybe it is more stuff for an real custom setup (to keep
the buildroot minimal approach)?
>
> Signed-off-by: Charlie Turner <cturner@igalia.com>
> ---
> board/raspberrypi/post-image.sh | 14 +++++++++++++-
> 1 file changed, 13 insertions(+), 1 deletion(-)
>
> diff --git a/board/raspberrypi/post-image.sh b/board/raspberrypi/post-image.sh
> index 9dbd98ef9b..4ffda4bf49 100755
> --- a/board/raspberrypi/post-image.sh
> +++ b/board/raspberrypi/post-image.sh
> @@ -11,7 +11,7 @@ for arg in "$@"
> do
> case "${arg}" in
> --add-miniuart-bt-overlay)
> - if ! grep -qE '^dtoverlay=' "${BINARIES_DIR}/rpi-firmware/config.txt"; then
> + if ! grep -qE '^dtoverlay=miniuart-bt' "${BINARIES_DIR}/rpi-firmware/config.txt"; then
> echo "Adding 'dtoverlay=miniuart-bt' to config.txt (fixes ttyAMA0 serial console)."
> cat << __EOF__ >> "${BINARIES_DIR}/rpi-firmware/config.txt"
>
> @@ -36,6 +36,18 @@ __EOF__
> gpu_mem="${arg:2}"
> sed -e "/^${gpu_mem%=*}=/s,=.*,=${gpu_mem##*=}," -i "${BINARIES_DIR}/rpi-firmware/config.txt"
> ;;
> + --vc4-modesetting-overlay=*)
Call the option simple add-vc4-fkms-v3d-overlay for 'vc4-fkms-v3d.dtb', or make
it completely generic?
> + overlay=${arg##*=}
> + if ! grep -qE "^dtoverlay=vc4-.*-v3d" "${BINARIES_DIR}/rpi-firmware/config.txt"; then
> + echo "Adding 'dtoverlay=vc4-${overlay}-v3d' to config.txt."
> + cat << __EOF__ >> "${BINARIES_DIR}/rpi-firmware/config.txt"
> +
> +dtoverlay=vc4-${overlay}-v3d
> +__EOF__
> + else
> + sed -e "/^dtoverlay=vc4-.*-v3d/s,=.*,=vc4-${overlay}-v3d," -i "${BINARIES_DIR}/rpi-firmware/config.txt"
> + fi
> + ;;
> esac
>
> done
Regards,
Peter
[1] https://patchwork.ozlabs.org/patch/1007728
[2] http://lists.busybox.net/pipermail/buildroot/2019-February/243941.html
next prev parent reply other threads:[~2020-03-10 12:58 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-10 11:22 [Buildroot] [PATCH 1/2] package/cog: add option for platform DRM Charlie Turner
2020-03-10 11:22 ` [Buildroot] [PATCH 2/2] board/raspberrypi: add post-image option for VC4 overlay Charlie Turner
2020-03-10 12:58 ` Peter Seiderer [this message]
2020-03-10 13:42 ` Charles Turner
2020-03-10 12:36 ` [Buildroot] [PATCH 1/2] package/cog: add option for platform DRM Peter Seiderer
2020-03-10 13:49 ` Charles Turner
2020-03-10 14:23 ` Peter Seiderer
2020-03-11 10:30 ` [Buildroot] [PATCH v2 1/1] " Charlie Turner
2020-03-11 12:49 ` Adrian Perez de Castro
2020-03-12 11:03 ` Thomas Petazzoni
2020-03-12 13:11 ` Charles Turner
2020-03-12 13:36 ` Thomas Petazzoni
2020-03-12 19:36 ` Charles Turner
2020-03-12 19:47 ` [Buildroot] [PATCH v3 " Charlie Turner
2020-03-23 13:30 ` Charles Turner
2020-03-31 21:57 ` Adrian Perez de Castro
2020-04-02 11:34 ` [Buildroot] [PATCH v4] " Charlie Turner
2020-04-04 21:46 ` Thomas Petazzoni
2020-04-04 22:49 ` Adrian Perez de Castro
2020-04-06 5:29 ` Thomas Petazzoni
2020-04-06 17:04 ` Charles Turner
2020-04-06 17:18 ` Baruch Siach
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=20200310135825.1f3caf9b@gmx.net \
--to=ps.report@gmx.net \
--cc=buildroot@busybox.net \
/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