From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Wed, 23 Jun 2021 07:18:18 +0200 Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by lore.white.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1lvvHG-0005F6-FD for lore@lore.pengutronix.de; Wed, 23 Jun 2021 07:18:18 +0200 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lvvHE-0007NE-Gd for lore@pengutronix.de; Wed, 23 Jun 2021 07:18:18 +0200 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Cc:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=mKgI+dLSmtFggkAxIFpVBIzX4YU/UzvbJUbm1IJKuIQ=; b=Xtcc+BEs4MPAPj IdqopqGMneCYqi5RHDPa3u3UCkjw5n27zezdFlXrlG94bOhFvzRaZqG+25W6DaixWm8p2HE05b/B/ R1TXFTQw5ArlRTlsGumY2KcJID/WRypzlUwu0KYGrQi5Ex880ZqF+uuluh2TS/I7//bRtpO/RnFVd rjbc+XS8H+9cm9vP6kGT9rL4Fmv/AhTTSwnGlaDgv6BOy+ltUbcBHtXGJ0sxmUhD1gczM3VrOHDFn JFSSWaMxQWBz4Nmt/0loX7uVErosdAyb/8AUHu12yqzVf6ZOeI7ZSjxLrtryO4q2fK3nPI/26r6yU Melym0si+NkRsW4o5a1A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lvvG4-009Mc8-4x; Wed, 23 Jun 2021 05:17:04 +0000 Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lvvFd-009MQD-EH for barebox@lists.infradead.org; Wed, 23 Jun 2021 05:16:41 +0000 Received: from dude02.hi.pengutronix.de ([2001:67c:670:100:1d::28]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lvvFc-0006rP-7s; Wed, 23 Jun 2021 07:16:36 +0200 Received: from sha by dude02.hi.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1lvvFa-0000V0-W4; Wed, 23 Jun 2021 07:16:34 +0200 From: Sascha Hauer To: Barebox List Date: Wed, 23 Jun 2021 07:16:29 +0200 Message-Id: <20210623051632.30253-15-s.hauer@pengutronix.de> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210623051632.30253-1-s.hauer@pengutronix.de> References: <20210623051632.30253-1-s.hauer@pengutronix.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210622_221637_663019_51838C5F X-CRM114-Status: GOOD ( 11.61 ) X-BeenThere: barebox@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "barebox" X-SA-Exim-Connect-IP: 2607:7c80:54:e::133 X-SA-Exim-Mail-From: barebox-bounces+lore=pengutronix.de@lists.infradead.org X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on metis.ext.pengutronix.de X-Spam-Level: X-Spam-Status: No, score=-4.8 required=4.0 tests=AWL,BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.2 Subject: [PATCH 14/17] blspec: Apply overlays from rootfs X-SA-Exim-Version: 4.2.1 (built Wed, 08 May 2019 21:11:16 +0000) X-SA-Exim-Scanned: Yes (on metis.ext.pengutronix.de) This sets the overlay search path to $BOOT/overlays during starting an bootloader spec entry with the effect that overlays from there can be applied. Signed-off-by: Sascha Hauer --- common/blspec.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/common/blspec.c b/common/blspec.c index ca96a45487..07ad309814 100644 --- a/common/blspec.c +++ b/common/blspec.c @@ -75,8 +75,8 @@ static int blspec_boot(struct bootentry *be, int verbose, int dryrun) const char *abspath, *devicetree, *options, *initrd, *linuximage; const char *overlays; const char *appendroot; - const char *old_fws; - char *fws; + const char *old_fws, *old_ovld; + char *fws, *ovld; struct bootm_data data = { .dryrun = dryrun, }; @@ -139,6 +139,11 @@ static int blspec_boot(struct bootentry *be, int verbose, int dryrun) (entry->cdev && entry->cdev->dev) ? dev_name(entry->cdev->dev) : "none"); + old_ovld = of_overlay_get_dir(); + ovld = basprintf("%s/overlays", abspath); + of_overlay_set_dir(ovld); + free(ovld); + old_fws = firmware_get_searchpath(); if (old_fws && *old_fws) fws = basprintf("%s/lib/firmware:%s", abspath, old_fws); @@ -154,6 +159,7 @@ static int blspec_boot(struct bootentry *be, int verbose, int dryrun) if (overlays) of_unregister_fixup(blspec_overlay_fixup, entry); + of_overlay_set_dir(old_ovld); firmware_set_searchpath(old_fws); err_out: -- 2.29.2 _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox