From patchwork Tue Feb 13 08:39:36 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Angelo Compagnucci X-Patchwork-Id: 872638 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.133; helo=hemlock.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=amarulasolutions-com.20150623.gappssmtp.com header.i=@amarulasolutions-com.20150623.gappssmtp.com header.b="M1YLPIA9"; dkim-atps=neutral Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zgbZQ2ZLfz9t5w for ; Tue, 13 Feb 2018 19:39:57 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 2CED388DE5; Tue, 13 Feb 2018 08:39:52 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Qw7REom4yuPt; Tue, 13 Feb 2018 08:39:50 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 6FE5D88C4A; Tue, 13 Feb 2018 08:39:50 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 5156E1C0DE1 for ; Tue, 13 Feb 2018 08:39:49 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 4DBA786574 for ; Tue, 13 Feb 2018 08:39:49 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 2-ZYiD9kJDBf for ; Tue, 13 Feb 2018 08:39:48 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wm0-f65.google.com (mail-wm0-f65.google.com [74.125.82.65]) by whitealder.osuosl.org (Postfix) with ESMTPS id D4F318651D for ; Tue, 13 Feb 2018 08:39:47 +0000 (UTC) Received: by mail-wm0-f65.google.com with SMTP id 141so14455613wme.3 for ; Tue, 13 Feb 2018 00:39:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=kY4xKlArooPuy5G2yRxBbUMsBx9iZvhb/JTP3rxp0xg=; b=M1YLPIA94+0vBBnQlYkpOKMqtwz+RVcYReQ2ZK5ReOAXwT5khS3fNOYEQ6dFfPoUst cY5FkKPyDz4ZegQvKlk7PVVDiek2dYlrECw/vikJ1N1kx6Jw/bYTa07d5uqRp0EH5uPA q0FYe8X8XzAmlWgEnK2zQlo4xhTy5Ars19w3/cG0d1PxoCOo95JV5ku5zmLbfUgkbBhw 54CO98FT+xSDD7FSAQ9sTXUfEsUeHn5SuOzNncK5LF3HZizDQeFp7L/Ilm4gnEglyYWD /mJUls/i02y2Mxjd++2J1bThKpRTiPVVFIQZQNDf4U7xVMN5ykzEtPfhy328W2fooOfv Qe/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=kY4xKlArooPuy5G2yRxBbUMsBx9iZvhb/JTP3rxp0xg=; b=SyHDBeioVb6DxKQQi+zuchpis2agUJSUBbLwbB+c9aNVbs5xUWC2PzoZRab+GZmTZ+ lsuuxf8eYNU40gc1uCDU2H4dWZaIiqperwTbZmMlvhavyR+7DcWAcPIRTxHQs3PVnH2K gO/0/8ea7RUlLL4ShuRlUYRtkMl9awgcuf7sCQut+gRjzrJMU8hNtUay4M7R92uw/4+C WJK4qHgGcV8ww85PN7LSwcGBxQgaqYVDM5GXoTtNZpjUyfvKHBAMzW/DRXY3k906vBU3 8RL7JE6ygFs8H1nutwzfo83ixnrKeqxTeRQoP8LHpHfQ6C8GH7gH5OHBzhmx4V1xjgSN dzcQ== X-Gm-Message-State: APf1xPAU5h7OKNH7Xe6+zypYSoUdADE7rEBed7UWc8Ah/QJdkbbjgRIu 7o1n9iT5/Neuvp9fBdvruiBs8sKxAlc= X-Google-Smtp-Source: AH8x225vygJJ14yvCytaHQmKC6P5UCQjTc7U/2KSv/4pBO/PPTrBFvW0oYhihnQjJYg1zXei60eq9g== X-Received: by 10.28.122.12 with SMTP id v12mr529176wmc.66.1518511185095; Tue, 13 Feb 2018 00:39:45 -0800 (PST) Received: from localhost.localdomain ([89.202.204.147]) by smtp.gmail.com with ESMTPSA id r64sm7045785wma.15.2018.02.13.00.39.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 13 Feb 2018 00:39:44 -0800 (PST) From: Angelo Compagnucci To: buildroot@buildroot.org Date: Tue, 13 Feb 2018 09:39:36 +0100 Message-Id: <1518511178-28623-2-git-send-email-angelo@amarulasolutions.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1518511178-28623-1-git-send-email-angelo@amarulasolutions.com> References: <1518511178-28623-1-git-send-email-angelo@amarulasolutions.com> Subject: [Buildroot] [PATCH v2 2/4] linux: add custom linux logo X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.24 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Angelo Compagnucci MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" From: Angelo Compagnucci This patch adds a simple way to change the linux bootup logo. The patch was kept purposely simple to support only the use cause where a user needs a color linux boot up logo. Signed-off-by: Angelo Compagnucci --- Changelog: v1 -> v2: * removed most of the options (Suggested by Thomas Petazzoni) * reworked logic to manage the BR2_LINUX_KERNEL_CUSTOM_LOGO_PATH string variable linux/Config.in | 8 ++++++++ linux/linux.mk | 15 +++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/linux/Config.in b/linux/Config.in index c920416..0edf9eb 100644 --- a/linux/Config.in +++ b/linux/Config.in @@ -183,6 +183,14 @@ config BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES A space-separated list of kernel configuration fragment files, that will be merged to the main kernel configuration file. +config BR2_LINUX_KERNEL_CUSTOM_LOGO_PATH + string "Custom logo file path" + help + Change the linux boot logo with your own graphics, + it can be used as an early bootsplash. + Custom logo should be in png or jpg and it will be + converted to the linux kernel format (224 colors only). + # # Binary format # diff --git a/linux/linux.mk b/linux/linux.mk index 5300b9c..ae065a9 100644 --- a/linux/linux.mk +++ b/linux/linux.mk @@ -221,6 +221,18 @@ define LINUX_TRY_PATCH_TIMECONST endef LINUX_POST_PATCH_HOOKS += LINUX_TRY_PATCH_TIMECONST +LINUX_KERNEL_CUSTOM_LOGO_PATH = $(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_LOGO_PATH)) +ifneq ($(LINUX_KERNEL_CUSTOM_LOGO_PATH),) +LINUX_DEPENDENCIES += host-imagemagick +LINUX_KERNEL_CUSTOM_LOGO = y +define LINUX_KERNEL_CUSTOM_LOGO_PREPARE + $(HOST_DIR)/usr/bin/convert $(LINUX_KERNEL_CUSTOM_LOGO_PATH) \ + -dither None -colors 224 -compress none \ + $(LINUX_DIR)/drivers/video/logo/logo_linux_clut224.ppm +endef +LINUX_PRE_BUILD_HOOKS += LINUX_KERNEL_CUSTOM_LOGO_PREPARE +endif + ifeq ($(BR2_LINUX_KERNEL_USE_DEFCONFIG),y) LINUX_KCONFIG_DEFCONFIG = $(call qstrip,$(BR2_LINUX_KERNEL_DEFCONFIG))_defconfig else ifeq ($(BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG),y) @@ -310,6 +322,9 @@ define LINUX_KCONFIG_FIXUP_CMDS $(call KCONFIG_ENABLE_OPT,CONFIG_ARM_APPENDED_DTB,$(@D)/.config)) $(if $(BR2_PACKAGE_KERNEL_MODULE_IMX_GPU_VIV), $(call KCONFIG_DISABLE_OPT,CONFIG_MXC_GPU_VIV,$(@D)/.config)) + $(if $(LINUX_KERNEL_CUSTOM_LOGO), + $(call KCONFIG_ENABLE_OPT,CONFIG_LOGO,$(@D)/.config) + $(call KCONFIG_ENABLE_OPT,CONFIG_LOGO_LINUX_CLUT224,$(@D)/.config)) endef ifeq ($(BR2_LINUX_KERNEL_DTS_SUPPORT),y)