From patchwork Mon Aug 15 17:17:53 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Tremer X-Patchwork-Id: 5878 Return-Path: Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4M61Ff0DScz3wfV for ; Mon, 15 Aug 2022 17:18:14 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail02.haj.ipfire.org", Issuer "R3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4M61FT47XXz5YC; Mon, 15 Aug 2022 17:18:05 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4M61FS3Rg8z330j; Mon, 15 Aug 2022 17:18:04 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4M61FQ67qRz2xR4 for ; Mon, 15 Aug 2022 17:18:02 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by mail01.ipfire.org (Postfix) with ESMTPSA id 4M61FP3X1tz5Xb; Mon, 15 Aug 2022 17:18:01 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1660583881; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=pA964B+WyDqVb8IUqn50ksxiutiWSHqi54zTS1N5Q2Q=; b=/fl9WBDmo/XTzRpzrlpST/8Y6md8KO+1/jLJKLPhJfrFmYUiW7WpoSOMB9zTQs9zz5HfWk is1vbV9wbBAc8lDA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1660583881; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=pA964B+WyDqVb8IUqn50ksxiutiWSHqi54zTS1N5Q2Q=; b=bBLcxFZKT4pt5cG/B440y4gByWFmkWwzXb5g+ty7At9X8b77NYozXunyU5cywY/ZORhKzI EUNZQt9pi15sy+U4yvXLQmfAks8DAErNaUUPNr7MtVOOAjDp9cgSekXbnyrbIvWiITg9v6 QIilnfZh6K0shgTxDCQNkwfh974/vKzDzr0vHWnB3BTnEXVbYX2q7TthYeHUuhGXVON+t8 p8SVVF1hYilQgNpb3+ogbHUluq6KWj6QYwJKeT91LA1obnYCCg48U6y0DBX91Wl5Tf3zXg P4L3rLi+4IVPSW64qLXBRyAjaIPJ167P0sG9clf8gyRLuO6UwpXCfpEBs47XvA== From: Michael Tremer To: development@lists.ipfire.org Subject: [PATCH 15/15] u-boot: Ignore LOAD segments with RWX permissions Date: Mon, 15 Aug 2022 17:17:53 +0000 Message-Id: <20220815171753.1858688-15-michael.tremer@ipfire.org> In-Reply-To: <20220815171753.1858688-1-michael.tremer@ipfire.org> References: <20220815171753.1858688-1-michael.tremer@ipfire.org> MIME-Version: 1.0 X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: IPFire development talk List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Michael Tremer Errors-To: development-bounces@lists.ipfire.org Sender: "Development" This is a new check in binutils which has to be disabled for some legacy bootloaders. Signed-off-by: Michael Tremer --- lfs/u-boot | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lfs/u-boot b/lfs/u-boot index f7341675d..3488204ee 100644 --- a/lfs/u-boot +++ b/lfs/u-boot @@ -34,6 +34,7 @@ TARGET = $(DIR_INFO)/$(THISAPP)-$(MKIMAGE) SUP_ARCH = armv6l aarch64 CFLAGS := $(patsubst -fstack-protector-strong,,$(CFLAGS)) +LDFLAGS += --no-warn-rwx-segments ATF_VER = 2.6 @@ -189,7 +190,7 @@ else # OrangePi Zero Plus cd $(DIR_APP) && rm -rf arm-trusted-firmware-$(ATF_VER) cd $(DIR_APP) && tar axf $(DIR_DL)/arm-trusted-firmware-$(ATF_VER).tar.gz - cd $(DIR_APP)/arm-trusted-firmware-$(ATF_VER) && make PLAT=sun50i_a64 DEBUG=0 bl31 + cd $(DIR_APP)/arm-trusted-firmware-$(ATF_VER) && make PLAT=sun50i_a64 DEBUG=0 bl31 LDFLAGS="$(LDFLAGS)" cd $(DIR_APP) && cp arm-trusted-firmware-$(ATF_VER)/build/sun50i_a64/release/bl31.bin bl31.bin cd $(DIR_APP) && rm -rf arm-trusted-firmware-$(ATF_VER) -mkdir -pv /usr/share/u-boot/orangepi_zero_plus @@ -204,7 +205,7 @@ else # Nanopi R2S cd $(DIR_APP) && rm -rf arm-trusted-firmware-$(ATF_VER) cd $(DIR_APP) && tar axf $(DIR_DL)/arm-trusted-firmware-$(ATF_VER).tar.gz - cd $(DIR_APP)/arm-trusted-firmware-$(ATF_VER) && make PLAT=rk3328 ARCH=aarch64 DEBUG=0 bl31 + cd $(DIR_APP)/arm-trusted-firmware-$(ATF_VER) && make PLAT=rk3328 ARCH=aarch64 DEBUG=0 bl31 LDFLAGS="$(LDFLAGS)" cd $(DIR_APP) && cp arm-trusted-firmware-$(ATF_VER)/build/rk3328/release/bl31/bl31.elf bl31.elf cd $(DIR_APP) && rm -rf arm-trusted-firmware-$(ATF_VER) -mkdir -pv /usr/share/u-boot/nanopi_r2s