All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni via buildroot <buildroot@buildroot.org>
To: Neal Frager via buildroot <buildroot@buildroot.org>
Cc: michal.simek@amd.com, ibai.erkiaga-elorza@amd.com,
	luca.ceresoli@bootlin.com, Neal Frager <neal.frager@amd.com>
Subject: Re: [Buildroot] [PATCH v1 1/2] package/zynqmp-firmware: new package
Date: Sun, 26 Mar 2023 22:05:43 +0200	[thread overview]
Message-ID: <20230326220543.057f381d@windsurf> (raw)
In-Reply-To: <20230326140949.11262-1-neal.frager@amd.com>

Hello Neal,

On Sun, 26 Mar 2023 15:09:48 +0100
Neal Frager via buildroot <buildroot@buildroot.org> wrote:

> This patch adds a new package to buildroot for building the zynqmp pmufw
> with the requirement that the user must provide an external microblaze
> toolchain.

This is not really nice :-/ Was this the conclusion of the discussion
we had on this topic?

> +config BR2_PACKAGE_ZYNQMP_FIRMWARE_KRIA_K26
> +	bool "kria-k26"
> +	help
> +	  Adds additional CFLAGS for Kria K26 SOMs.

This doesn't look super extensible. Why are these CFLAGS needed in
particular for this platform? Is this a per-SoC or per-board
configuration? Do we expect more platforms to need custom CFLAGS?

> +ZYNQMP_FIRMWARE_VERSION = $(call qstrip,$(BR2_PACKAGE_ZYNQMP_FIRMWARE_VERSION))
> +ZYNQMP_FIRMWARE_SOURCE = xilinx_$(ZYNQMP_FIRMWARE_VERSION).tar.gz
> +ZYNQMP_FIRMWARE_SITE = https://github.com/Xilinx/embeddedsw/archive/refs/tags

Use $(call github,...) instead

> +ifeq ($(BR2_PACKAGE_ZYNQMP_FIRMWARE_KRIA_K26),y)
> +ZYNQMP_CFLAGS = "-Os -flto -ffat-lto-objects -DBOARD_SHUTDOWN_PIN=2 -DBOARD_SHUTDOWN_PIN_STATE=0 \
> +		-DENABLE_EM -DENABLE_MOD_OVERTEMP -DENABLE_DYNAMIC_MIO_CONFIG -DENABLE_IOCTL \
> +		-DCONNECT_PMU_GPO_2_VAL=0"

All these CFLAGS are really weird... why isn't this part of the
zynqmp-firmware build system itself?

> +else
> +ZYNQMP_CFLAGS = "-Os -flto -ffat-lto-objects"
> +endif

In any case, this should be:

ZYNQMP_CFLAGS = -Os -flto -ffat-lto-objects

ifeq ($(BR2_PACKAGE_ZYNQMP_FIRMWARE_KRIA_K26),y)
ZYNQMP_CFLAGS += \
	-DBOARD_SHUTDOWN_PIN=2 \
	-DBOARD_SHUTDOWN_PIN_STATE=0 \
	-DENABLE_EM \
	-DENABLE_MOD_OVERTEMP \
	-DENABLE_DYNAMIC_MIO_CONFIG \
	-DENABLE_IOCTL \
	-DCONNECT_PMU_GPO_2_VAL=0
endif

> +
> +define ZYNQMP_FIRMWARE_BUILD_CMDS
> +	cd $(@D)/lib/sw_apps/zynqmp_pmufw/src && make \
> +		COMPILER=$(ZYNQMP_FIRMWARE_TOOLCHAIN_PATH)/$(ZYNQMP_FIRMWARE_TOOLCHAIN_PREFIX)gcc \
> +		ARCHIVER=$(ZYNQMP_FIRMWARE_TOOLCHAIN_PATH)/$(ZYNQMP_FIRMWARE_TOOLCHAIN_PREFIX)gcc-ar \
> +		CC=$(ZYNQMP_FIRMWARE_TOOLCHAIN_PATH)/$(ZYNQMP_FIRMWARE_TOOLCHAIN_PREFIX)gcc \
> +		CFLAGS=$(ZYNQMP_CFLAGS)

Please use:

	$(MAKE) -C $(@D)/lib/sw_apps/zynqmp_pmufw/src \
		...

Thanks!

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

  parent reply	other threads:[~2023-03-26 20:05 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-26 14:09 [Buildroot] [PATCH v1 1/2] package/zynqmp-firmware: new package Neal Frager via buildroot
2023-03-26 14:09 ` [Buildroot] [PATCH v1 2/2] boot/uboot.mk: new BR2_TARGET_UBOOT_NEEDS_ZYNQMP_FIRMWARE Neal Frager via buildroot
2023-03-26 20:09   ` Thomas Petazzoni via buildroot
2023-03-27 11:08     ` Frager, Neal via buildroot
2023-03-26 20:05 ` Thomas Petazzoni via buildroot [this message]
2023-03-27  5:45   ` [Buildroot] [PATCH v1 1/2] package/zynqmp-firmware: new package Frager, Neal via buildroot
2023-03-27  7:42     ` Thomas Petazzoni via buildroot
2023-03-27  9:00       ` Frager, Neal via buildroot
2023-03-27 13:11     ` Luca Ceresoli via buildroot
2023-03-27 13:22       ` Frager, Neal via buildroot
2023-03-27 12:21   ` Frager, Neal via buildroot
     [not found]     ` <MN0PR12MB60041E824606160DF5277406A08B9@MN0PR12MB6004.namprd12.prod.outlook.com>
2023-03-27 12:47       ` Frager, Neal via buildroot
2023-03-27 12:57         ` Thomas Petazzoni via buildroot
2023-03-27 13:03           ` Frager, Neal 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=20230326220543.057f381d@windsurf \
    --to=buildroot@buildroot.org \
    --cc=ibai.erkiaga-elorza@amd.com \
    --cc=luca.ceresoli@bootlin.com \
    --cc=michal.simek@amd.com \
    --cc=neal.frager@amd.com \
    --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 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.