From patchwork Wed Nov 14 22:24:31 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Sverdlin X-Patchwork-Id: 997885 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.136; helo=silver.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="o+D9Zs2X"; dkim-atps=neutral Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42wJvx08r0z9sDF for ; Thu, 15 Nov 2018 09:25:00 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 0E722227AD; Wed, 14 Nov 2018 22:24:58 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id NGLCjsFG9ARr; Wed, 14 Nov 2018 22:24:57 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 0951522777; Wed, 14 Nov 2018 22:24:57 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 3B9931BF2CA for ; Wed, 14 Nov 2018 22:24:55 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 395AE22777 for ; Wed, 14 Nov 2018 22:24:55 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id s3Lf0Ah36pCp for ; Wed, 14 Nov 2018 22:24:54 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wr1-f68.google.com (mail-wr1-f68.google.com [209.85.221.68]) by silver.osuosl.org (Postfix) with ESMTPS id 7A29E22749 for ; Wed, 14 Nov 2018 22:24:54 +0000 (UTC) Received: by mail-wr1-f68.google.com with SMTP id p4so9867716wrt.7 for ; Wed, 14 Nov 2018 14:24:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=R+ere6IFOjZihoHVTvpO11EwCw3LR2+NRrt5MWYba4A=; b=o+D9Zs2Xpn3E/Sjn7u47LBapd9H+zg7l/VrHUVcxNAmuPhpfQotFQWBnRVN6EuYDB+ 72i3/vTO1s/kbpkDZqWYKqZ3M+ev4UIyx8aAee+G8p9DSd9MKoIVMJxM1lnLWXXoW+aa J4LG6shkH2Pi8yX8/eR08D1dkitUi3d5C5BWk/VUYFv/a9VcyXD1JbQ2DFiuWiQ0cl0l oJhz5hlWOGL4GEEfRxL1joD2KsUSM+GEFx4CoCaF5kkM0GBI+4Yk7zXLYJ3sztWDxCeU S4Xd8Rxaywsz6OP7MQhfwi1aoxqxpACpRnCRgBh1wbjLry2XxJkjC2tv8ikXP9mbOC/O VGbA== 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:mime-version :content-transfer-encoding; bh=R+ere6IFOjZihoHVTvpO11EwCw3LR2+NRrt5MWYba4A=; b=lEp9yJgZY7Du5gb8TSNtIna+AyoXJAqW1Zq9fkrS4AQCnShMFSibH22PfV+kGDqyBt j55S3aWkEN9r00I8jtdVwsWM1rxGsbJ2pFmKyknYPhFAAfu72cGfzfwsnuZj5lXgc89B LwNu/qKB09RF4yR9YaZAcMyWuqxncse/N8lcIw0I6hRXCpA8zrzPQ7R7YAiEPv+WEtz2 SlhAEYtFLNHGFfY90hoxLXsIZf99EZDilTYkqbBAmc8P04okV1v4sfLIvM21evpUNzy5 ioUMN3+uIbcmcVhHEl5mIbI39BcnmRLTehbE6onc8HfvX+wbQUr6qa9SNqItiwpGbzBA eo+g== X-Gm-Message-State: AGRZ1gLC5vZSCv4dLvUtUohge2Dk1R18RIl86K5JCeIqV7KVhdtqFkQY dndoBFU5ZoIVeLJkPyd3UOHMGMGmmbs= X-Google-Smtp-Source: AJdET5fD4zhoVl+BkB0wHRSaNtwwRModwRHEF3DB80ONkWErjpE1eE2SmcgNmvUOMwa8jKrd2t14Yg== X-Received: by 2002:adf:e543:: with SMTP id z3-v6mr3412429wrm.238.1542234292844; Wed, 14 Nov 2018 14:24:52 -0800 (PST) Received: from giga-mm.localdomain ([195.245.39.242]) by smtp.gmail.com with ESMTPSA id m69-v6sm22424557wmb.8.2018.11.14.14.24.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 14 Nov 2018 14:24:52 -0800 (PST) From: Alexander Sverdlin To: buildroot@buildroot.org Date: Wed, 14 Nov 2018 23:24:31 +0100 Message-Id: <20181114222431.10194-1-alexander.sverdlin@gmail.com> X-Mailer: git-send-email 2.19.1 MIME-Version: 1.0 Subject: [Buildroot] [PATCH v2] boot/syslinux: Add host installer X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alexander Sverdlin , Thomas Petazzoni Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Add host installer for syslinux bootloader which allows to pre-install syslinux in the generated firmware images. BR2_ROOTFS_POST_IMAGE_SCRIPT can do something like this: ${HOST_DIR}/usr/bin/syslinux -d /syslinux/ -i ${IMGFILE} if the rest of syslinux is installed under /syslinux inside the firmware image. Signed-off-by: Alexander Sverdlin --- Changelog: v2: - host package variant inside boot/syslinux instead of separate package/syslinux-installer - reworked commit title boot/syslinux/Config.in | 5 +++++ boot/syslinux/syslinux.mk | 13 +++++++++++++ 2 files changed, 18 insertions(+) diff --git a/boot/syslinux/Config.in b/boot/syslinux/Config.in index e969d53fd0..caec66d767 100644 --- a/boot/syslinux/Config.in +++ b/boot/syslinux/Config.in @@ -56,6 +56,11 @@ config BR2_TARGET_SYSLINUX_C32 Enter a space-separated list of .c32 modules to install. Leave empty to install no module. +config BR2_TARGET_HOST_SYSLINUX + bool "host syslinux installer" + help + Host installer for syslinux bootloader + endif # BR2_TARGET_SYSLINUX_LEGACY_BIOS endif # BR2_TARGET_SYSLINUX diff --git a/boot/syslinux/syslinux.mk b/boot/syslinux/syslinux.mk index 67bc69254e..72d7f62672 100644 --- a/boot/syslinux/syslinux.mk +++ b/boot/syslinux/syslinux.mk @@ -102,4 +102,17 @@ define SYSLINUX_INSTALL_IMAGES_CMDS done endef +# See SYSLINUX_POST_INSTALL_CLEANUP +HOST_SYSLINUX_DEPENDENCIES = syslinux + +define HOST_SYSLINUX_BUILD_CMDS + $(HOST_MAKE_ENV) $(MAKE) \ + -C $(@D) installer +endef + +define HOST_SYSLINUX_INSTALL_CMDS + $(INSTALL) -D -m 0755 $(@D)/bios/mtools/syslinux $(HOST_DIR)/usr/bin/syslinux +endef + $(eval $(generic-package)) +$(eval $(host-generic-package))