linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vincent Mailhol <mailhol@kernel.org>
To: Helge Deller <deller@gmx.de>,
	 Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	 Yoshinori Sato <ysato@users.sourceforge.jp>,
	Rich Felker <dalias@libc.org>,
	 John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Cc: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org,
	 linux-kernel@vger.kernel.org, linux-sh@vger.kernel.org,
	 Vincent Mailhol <mailhol@kernel.org>
Subject: [PATCH v2 2/6] video/logo: add a type parameter to the logo makefile function
Date: Thu, 01 Jan 2026 16:25:16 +0100	[thread overview]
Message-ID: <20260101-custom-logo-v2-2-8eec06dfbf85@kernel.org> (raw)
In-Reply-To: <20260101-custom-logo-v2-0-8eec06dfbf85@kernel.org>

When translating a portable pixmap file into a .c file, the pnmtologo
tool expects to receive the image type (either mono, vga16 or clut224)
as an argument under the -t option.

Currently, this information is stored in the file name. Because we
will allow for custom logo in an upcoming change, it is preferable to
decouple the image name from its type.

Add a new $2 parameter to the Makefile logo function which contains
the image type.

Update all the individual targets to provide this new argument.

Signed-off-by: Vincent Mailhol <mailhol@kernel.org>
---
 drivers/video/logo/Makefile | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/drivers/video/logo/Makefile b/drivers/video/logo/Makefile
index 8b67c4941a4c..3f249e9dcf37 100644
--- a/drivers/video/logo/Makefile
+++ b/drivers/video/logo/Makefile
@@ -22,13 +22,16 @@ hostprogs := pnmtologo
 
 # Create commands like "pnmtologo -t mono -n logo_mac_mono -o ..."
 quiet_cmd_logo = LOGO    $@
-      cmd_logo = $(obj)/pnmtologo -t $(lastword $(subst _, ,$*)) -n $* -o $@ $<
+      cmd_logo = $(obj)/pnmtologo -t $2 -n $* -o $@ $<
 
 $(obj)/%.c: $(src)/%.pbm $(obj)/pnmtologo FORCE
-	$(call if_changed,logo)
+	$(call if_changed,logo,mono)
 
-$(obj)/%.c: $(src)/%.ppm $(obj)/pnmtologo FORCE
-	$(call if_changed,logo)
+$(obj)/%_vga16.c: $(src)/%_vga16.ppm $(obj)/pnmtologo FORCE
+	$(call if_changed,logo,vga16)
+
+$(obj)/%_clut224.c: $(src)/%_clut224.ppm $(obj)/pnmtologo FORCE
+	$(call if_changed,logo,clut224)
 
 # generated C files
 targets += *_mono.c *_vga16.c *_clut224.c

-- 
2.52.0


  parent reply	other threads:[~2026-01-01 15:25 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-01 15:25 [PATCH v2 0/6] video/logo: allow custom boot logo and simplify logic Vincent Mailhol
2026-01-01 15:25 ` [PATCH v2 1/6] video/logo: remove orphan .pgm Makefile rule Vincent Mailhol
2026-01-01 15:25 ` Vincent Mailhol [this message]
2026-01-01 15:25 ` [PATCH v2 3/6] video/logo: allow custom logo Vincent Mailhol
2026-01-01 15:25 ` [PATCH v2 4/6] newport_con: depend on LOGO_LINUX_CLUT224 instead of LOGO_SGI_CLUT224 Vincent Mailhol
2026-01-01 15:25 ` [PATCH v2 5/6] sh: defconfig: remove CONFIG_LOGO_SUPERH_* Vincent Mailhol
2026-01-01 15:25 ` [PATCH v2 6/6] video/logo: move logo selection logic to Kconfig Vincent Mailhol

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=20260101-custom-logo-v2-2-8eec06dfbf85@kernel.org \
    --to=mailhol@kernel.org \
    --cc=dalias@libc.org \
    --cc=deller@gmx.de \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=glaubitz@physik.fu-berlin.de \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sh@vger.kernel.org \
    --cc=ysato@users.sourceforge.jp \
    /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;
as well as URLs for NNTP newsgroup(s).