All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Yann E. MORIN" <yann.morin.1998@free.fr>
To: Andreas Dannenberg <dannenberg@ti.com>
Cc: buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH v9 09/11] package/ti-rogue-km: new package
Date: Sun, 25 Jun 2023 10:59:50 +0200	[thread overview]
Message-ID: <20230625085950.GJ24952@scaer> (raw)
In-Reply-To: <20230622160212.2063472-10-dannenberg@ti.com>

Andreas, All,

On 2023-06-22 11:02 -0500, Andreas Dannenberg via buildroot spake thusly:
> This package adds the kernel module for the Rogue graphics
> accelerator of the following Texas Instuments SoCs: AM62,
> J721E, J721S2, and J784S4.
> 
> Signed-off-by: Andreas Dannenberg <dannenberg@ti.com>
[--SNIP--]
> diff --git a/package/ti-rogue-km/Config.in b/package/ti-rogue-km/Config.in
> new file mode 100644
> index 0000000000..b1565929d5
> --- /dev/null
> +++ b/package/ti-rogue-km/Config.in
> @@ -0,0 +1,28 @@
> +comment "ti-rogue-km needs a Linux kernel to be built"
> +	depends on BR2_aarch64
> +	depends on !BR2_LINUX_KERNEL
> +
> +config BR2_PACKAGE_TI_ROGUE_KM
> +	bool "ti-rogue-km"
> +	depends on BR2_LINUX_KERNEL && BR2_aarch64
> +	select BR2_LINUX_NEEDS_MODULES
> +	help
> +	  Kernel modules for TI SoCs with Rogue GPU.
> +	  This package supports AM62, J721E, J721S2, and J784S4
> +	  SoCs only.
> +
> +	  Note: it needs a TI specific kernel to build properly.
> +
> +	  https://git.ti.com/cgit/graphics/ti-img-rogue-driver
> +
> +if BR2_PACKAGE_TI_ROGUE_KM
> +
> +config BR2_TARGET_TI_ROGUE_KM_TARGET_PRODUCT
> +	string "KM driver target product"
> +	default "am62_linux"
> +	help
> +	  Select target product to be used for KM driver. This needs to
> +	  match one of the SoC-specific folders within the build/linux
> +	  folder of the ti-img-rogue-driver Git repository.

If you go with the choice option I suggested in my review of patch 2,
then this is going to be trivial to implement without asking the user:

    config BR2_TARGET_TI_ROGUE_KM_TARGET_PRODUCT
        string
        default "am62_linux" if BR2_TARGET_TI_K3_IMAGE_GEN_SOC_AM62X
        default 

> +endif
> diff --git a/package/ti-rogue-km/ti-rogue-km.hash b/package/ti-rogue-km/ti-rogue-km.hash
> new file mode 100644
> index 0000000000..4a08efbb98
> --- /dev/null
> +++ b/package/ti-rogue-km/ti-rogue-km.hash
> @@ -0,0 +1,3 @@
> +# Locally calculated
> +sha256  ef50124b3e79fb1d28d3a2b4135032505abbb5c6b337b24a9bed7223d521dcc1  ti-rogue-km-1dd6291a5cad4f2b909fc2a14bd717a3bc5f0bb2-br1.tar.gz
> +sha256  c878f4e43e468329d3dcf4db09054e94472bfeee9f8ab2d69a122b978e9f773e  README
> diff --git a/package/ti-rogue-km/ti-rogue-km.mk b/package/ti-rogue-km/ti-rogue-km.mk
> new file mode 100644
> index 0000000000..7b0a595c71
> --- /dev/null
> +++ b/package/ti-rogue-km/ti-rogue-km.mk
> @@ -0,0 +1,37 @@
> +################################################################################
> +#
> +# ti-rogue-km
> +#
> +################################################################################
> +
> +# This corresponds to SDK 08.06.00
> +TI_ROGUE_KM_VERSION = 1dd6291a5cad4f2b909fc2a14bd717a3bc5f0bb2
> +TI_ROGUE_KM_SITE = https://git.ti.com/git/graphics/ti-img-rogue-driver.git
> +TI_ROGUE_KM_SITE_METHOD = git
> +TI_ROGUE_KM_LICENSE = MIT or GPL-2.0
> +TI_ROGUE_KM_LICENSE_FILES = README
> +
> +TI_ROGUE_KM_DEPENDENCIES = linux
> +
> +PVR_BUILD = "release"
> +PVR_WS = "wayland"
> +
> +TI_ROGUE_KM_MAKE_OPTS = \
> +	$(LINUX_MAKE_FLAGS) \
> +	KERNELDIR=$(LINUX_DIR) \
> +	BUILD=$(PVR_BUILD) \
> +	PVR_BUILD_DIR=$(BR2_TARGET_TI_ROGUE_KM_TARGET_PRODUCT) \
> +	WINDOW_SYSTEM=$(PVR_WS)
> +
> +define TI_ROGUE_KM_BUILD_CMDS
> +	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) $(TI_ROGUE_KM_MAKE_OPTS)
> +endef
> +
> +define TI_ROGUE_KM_INSTALL_TARGET_CMDS
> +	$(TARGET_MAKE_ENV) $(MAKE) -C $(LINUX_DIR) \
> +		M=$(@D)/binary_$(BR2_TARGET_TI_ROGUE_KM_TARGET_PRODUCT)_$(PVR_WS)_$(PVR_BUILD)/target_aarch64/kbuild \
> +		INSTALL_MOD_PATH=$(TARGET_DIR) \
> +		modules_install
> +endef

Can't we use the kernel-module infra instead?
    https://buildroot.org/downloads/manual/manual.html#_infrastructure_for_packages_building_kernel_modules

i.e. something like:

    TI_ROGUE_KM_MODULE_MAKE_OPTS = \
        PVR_BUILD_DIR=$(BR2_TARGET_TI_ROGUE_KM_TARGET_PRODUCT) \
        WINDOW_SYSTEM=wayland

I'm a bit concerned about the hoops the Makefile goes through to end up
with a path like:
    (@D)/binary_$(BR2_TARGET_TI_ROGUE_KM_TARGET_PRODUCT)_$(PVR_WS)_$(PVR_BUILD)/target_aarch64/kbuild

so maybe it is more complex than that... In any case, it would be good
to explain in the commit log why we can't use our kernel-module infra.

Regards,
Yann E. MORIN.

> +$(eval $(generic-package))
> -- 
> 2.34.1
> 
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  reply	other threads:[~2023-06-25  9:00 UTC|newest]

Thread overview: 54+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-22 16:02 [Buildroot] [PATCH v9 00/11] add support for TI's AM64x and AM62x boards Andreas Dannenberg via buildroot
2023-06-22 16:02 ` [Buildroot] [PATCH v9 01/11] boot/ti-k3-r5-loader: allow for full build source customization Andreas Dannenberg via buildroot
2023-06-24 21:23   ` Yann E. MORIN
2023-06-25 13:21     ` Arnout Vandecappelle via buildroot
2023-06-25 13:35       ` Yann E. MORIN
2023-06-26 19:44   ` Julien Olivain
2023-06-26 19:53   ` Julien Olivain
2023-06-22 16:02 ` [Buildroot] [PATCH v9 02/11] boot/ti-k3-image-gen: new package Andreas Dannenberg via buildroot
2023-06-24 22:28   ` Yann E. MORIN
2023-08-08 23:38   ` Bryce Johnson
2023-08-15  7:15     ` Andreas Dannenberg via buildroot
2023-08-15 22:54       ` Bryce Johnson
2023-06-22 16:02 ` [Buildroot] [PATCH v9 03/11] boot/uboot: add support for building the TI K3 DM into U-Boot Andreas Dannenberg via buildroot
2023-06-25  7:02   ` Yann E. MORIN
2023-06-25  7:08     ` Yann E. MORIN
2023-06-22 16:02 ` [Buildroot] [PATCH v9 04/11] board/ti/am64x_sk: add new board Andreas Dannenberg via buildroot
2023-06-25  5:41   ` François Perrad
2023-06-25 13:43   ` Yann E. MORIN
2023-06-22 16:02 ` [Buildroot] [PATCH v9 05/11] board/ti/am62x_sk: " Andreas Dannenberg via buildroot
2023-06-25  5:42   ` François Perrad
2023-08-15  7:21     ` Andreas Dannenberg via buildroot
2023-06-22 16:02 ` [Buildroot] [PATCH v9 06/11] board/ti/am62x_sk|am64x_sk: switch to TI SDK v8.6 sources Andreas Dannenberg via buildroot
2023-06-25 13:54   ` Yann E. MORIN
2023-06-25 14:33     ` Arnout Vandecappelle via buildroot
2023-06-25 15:22       ` Peter Korsgaard
2023-06-25 18:59         ` Arnout Vandecappelle via buildroot
2023-06-25 19:14           ` Peter Korsgaard
2023-06-25 19:36       ` Yann E. MORIN
2023-06-22 16:02 ` [Buildroot] [PATCH v9 07/11] package/ti-core-secdev-k3: new package Andreas Dannenberg via buildroot
2023-06-23  3:48   ` Patrick Oppenlander
2023-06-23 14:53     ` Andreas Dannenberg via buildroot
2023-06-24  0:32       ` Patrick Oppenlander
2023-06-24  1:11         ` Andreas Dannenberg via buildroot
2023-06-24  4:09           ` Patrick Oppenlander
2023-06-25  7:55       ` Yann E. MORIN
2023-06-25 13:26         ` Arnout Vandecappelle via buildroot
2023-06-22 16:02 ` [Buildroot] [PATCH v9 08/11] board/ti/am62x_sk|am64x_sk: switch to HS-FS device variants Andreas Dannenberg via buildroot
2023-06-22 16:02 ` [Buildroot] [PATCH v9 09/11] package/ti-rogue-km: new package Andreas Dannenberg via buildroot
2023-06-25  8:59   ` Yann E. MORIN [this message]
2023-08-18 17:30     ` Bryce Johnson
2023-06-22 16:02 ` [Buildroot] [PATCH v9 10/11] package/ti-rogue-um: " Andreas Dannenberg via buildroot
2023-06-23  7:30   ` François Perrad
2023-06-23 14:59     ` Andreas Dannenberg via buildroot
2023-06-25  5:37       ` François Perrad
2023-06-25 10:15         ` Yann E. MORIN
2023-06-27  2:02           ` Andreas Dannenberg via buildroot
2023-08-22 15:15           ` Thomas Petazzoni via buildroot
2023-06-27 22:48       ` Andreas Dannenberg via buildroot
2023-08-22 10:40     ` Thomas Petazzoni via buildroot
2023-06-22 16:02 ` [Buildroot] [PATCH v9 11/11] configs/am62x_sk_defconfig: enable IMG Rogue graphics driver Andreas Dannenberg via buildroot
2023-06-23  4:02 ` [Buildroot] [PATCH v9 00/11] add support for TI's AM64x and AM62x boards Patrick Oppenlander
2023-06-23 15:04   ` Andreas Dannenberg via buildroot
2023-08-22 10:14 ` Thomas Petazzoni via buildroot
2023-08-22 18:05   ` Thomas Petazzoni 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=20230625085950.GJ24952@scaer \
    --to=yann.morin.1998@free.fr \
    --cc=buildroot@buildroot.org \
    --cc=dannenberg@ti.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 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.