From patchwork Thu Oct 12 08:42:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 1847315 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=ooz1WsjX; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=f8QShFTn; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=patchwork.ozlabs.org) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4S5jqt1Xnsz23jX for ; Thu, 12 Oct 2023 19:44:42 +1100 (AEDT) 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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:To:In-Reply-To:References:Message-Id: MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=UkO1ZvBkn9UB7ZPMUbGnK0Lnm2574NMpBZ7M9kezNCg=; b=ooz1WsjXjqQjTY bAqUW9m7r9P+g1ob3+CELXqR4aIiDKR25ufc2GulKyQiU61XbYhn92GhRfKHZlUJOkggrox4ju2KX LOybbtNSViy3JpWSb8SVVq1v1MpMyBjIY68GVnbJ2QYMnmc1jTgBbfxQ4X2csJw/6y0d5utRqKma7 t1mAAO3s2vqgqqm9RlAQEs2trVIbvPof4ugr0BpZsMPouDZHdrZcYB60QqdVGb00hmOt4ZsTzNCiW gBpkfy1ZYpa2sI8MU3XuYHBTpugryH9RXyRM0VvZYUa21BM5vPaCZivOy7VXrl8MDKLYVzO278C1G gdjPFNMhmJyYFQVk808g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qqrH6-000E25-2E; Thu, 12 Oct 2023 08:42:32 +0000 Received: from mail-lj1-x22a.google.com ([2a00:1450:4864:20::22a]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qqrGx-000Dte-2v for openwrt-devel@lists.openwrt.org; Thu, 12 Oct 2023 08:42:25 +0000 Received: by mail-lj1-x22a.google.com with SMTP id 38308e7fff4ca-2c186ea81c7so8909011fa.1 for ; Thu, 12 Oct 2023 01:42:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1697100140; x=1697704940; darn=lists.openwrt.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=GTwHDaNRmhBM3ZvGWs+t8LW+NYMOpeBSecebxx+DGps=; b=f8QShFTnmbxWf128vLTl8yCtTfURh/sPP75W/f8BmkveA9DP8Om+knCBj94ejOZ7i9 1KS/+ll8YJ4oZ+bgXBwj122OLkZOtzvHdb18kMkbfvOikmjjJcbCJ265Vi/7PhmIG3P9 4GCUFYwBp+ZBJdHnnkUFmOY4wmblnNtYxO4kdfxQgGPln9nwtjaAxOGmUDx8LQFihd2J L4HbyapbctWDbUfNQZcdeqa8jGZwWXWVU4ajrmBhRRbrXUydJ/WZ5TGUoW1o7j3UryiO oudOMe9/Co2hFBaulRO6mZw/NAdxKCW4eIr/tl9WVwuif1o2yE6gOqvWYCyyKzKMyrgO /B4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697100140; x=1697704940; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=GTwHDaNRmhBM3ZvGWs+t8LW+NYMOpeBSecebxx+DGps=; b=s0xik296nRinjSX7BjewfnQYfCpP/04ew+91/jFZatHeqPLQsn5vMydc5TsnREo5wn sVKFlSQNnULTFObm2wVT+22Abh4mC2Lg8iRaTEVkApLlg4XGkScBSYfdpmF5Tm0o3P/Z g4QGn6LhYVzYhHhUhMediIhh3VuaPwxDdtdRqIEKArWR6Aj7N+QFFtQMk2uzlMqQhjRL scdrVRKH9fFpMWJhf685aduAb7vGBjCf/jltudzpAJoqlcZfGFgzNRbXBO+ZpciYzGFW kVrJJ/BettsRm3sCQntZzZAUFPoR4q0F2aeXu92xcvgPTzHEJuo6bFqvtya3fASnbonY Suzg== X-Gm-Message-State: AOJu0YyuY+HSTmQHHBUWqsvtiNHhp0WEy388NuxYZE2ejeRld+CEmvgK sTNWphWKTe0sEA77WEC69NfU4ffVZdVItrk1kKo= X-Google-Smtp-Source: AGHT+IGz4szYpyLxHl9VIN2spGoqbnq//P3pc00f4pfHWRDcfoeRfXz27qMPIQUMWxQwKWfVIhJd2A== X-Received: by 2002:ac2:5e6f:0:b0:4ff:7046:984a with SMTP id a15-20020ac25e6f000000b004ff7046984amr19110619lfr.7.1697100139797; Thu, 12 Oct 2023 01:42:19 -0700 (PDT) Received: from [127.0.1.1] ([85.235.12.238]) by smtp.gmail.com with ESMTPSA id o9-20020a05651238a900b00501c8959f6asm2705043lft.98.2023.10.12.01.42.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Oct 2023 01:42:19 -0700 (PDT) From: Linus Walleij Date: Thu, 12 Oct 2023 10:42:16 +0200 Subject: [PATCH v3 01/10] boot/apex: Restore the APEX boot loader MIME-Version: 1.0 Message-Id: <20231012-ixp4xx-v3-1-e09c74712c0b@linaro.org> References: <20231012-ixp4xx-v3-0-e09c74712c0b@linaro.org> In-Reply-To: <20231012-ixp4xx-v3-0-e09c74712c0b@linaro.org> To: Imre Kaloz , Krzysztof Halasa , Howard Harte , openwrt-devel@lists.openwrt.org X-Mailer: b4 0.12.3 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231012_014224_022128_81098407 X-CRM114-Status: GOOD ( 16.22 ) X-Spam-Score: -0.2 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: This is a partial revert of the deletion of the IXP4xx target: we restore the APEX boot loader so we can use it for the NSLU2 and related targets. The APEX upstream is as dead as it gets so I have applied OpenWrts old patches on top of the never released v1.6.10 version and forked it into an OpenWrt variant on GitHub. If the upstream comes back [...] Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:22a listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Hauke Mehrtens , Linus Walleij , Raylynn Knight Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org This is a partial revert of the deletion of the IXP4xx target: we restore the APEX boot loader so we can use it for the NSLU2 and related targets. The APEX upstream is as dead as it gets so I have applied OpenWrts old patches on top of the never released v1.6.10 version and forked it into an OpenWrt variant on GitHub. If the upstream comes back alive I will happily switch over to it. The file refers to the external GitHub, I suppose when integrating this patch the file should be copied to OpenWrts file repository and the file link changed. Signed-off-by: Linus Walleij --- ChangeLog v2->v3: - Build APEX from git URL. - Use the Build/InstallDev makerule to build the binaries like all other boot loader do. - Add PKG_LICENSE and PKG_LICENSE_FILES - Add DEPENDS on !IN_SDK ChangeLog v1->v2: - Do not default to "y", instead make the device target select apex by default. - Do not package the boot loader into the rootfs image. Who wants that. --- package/boot/apex/Makefile | 61 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) diff --git a/package/boot/apex/Makefile b/package/boot/apex/Makefile new file mode 100644 index 000000000000..66a1b7667eb0 --- /dev/null +++ b/package/boot/apex/Makefile @@ -0,0 +1,61 @@ +# SPDX-License-Identifier: GPL-2.0-only +# +# Copyright (C) 2006-2023 OpenWrt.org + +include $(TOPDIR)/rules.mk +include $(INCLUDE_DIR)/kernel.mk + +PKG_NAME:=apex +# This version was created from the stalled and unreleased v1.6.10 +# with some patches on top. +PKG_VERSION:=1.6.10-openwrt +PKG_RELEASE:=1 + +PKG_SOURCE_PROTO:=git +PKG_SOURCE_URL:=https://github.com/linusw/apex.git +PKG_SOURCE_VERSION:=483e18aa133d5e25866570c29b124530b2d1e0d3 +PKG_MIRROR_HASH:=42230bb436f5590447ca55e8befb8927e6ea74c1e6953c043bbbef986c411704 + +PKG_TARGETS:=bin +PKG_FLAGS:=nonshared +PKG_LICENSE:=GPL-2.0 +PKG_LICENSE_FILES:=COPYING + +include $(INCLUDE_DIR)/package.mk + +export GCC_HONOUR_COPTS=s + +define Package/apex + SECTION:=boot + CATEGORY:=Boot Loaders + DEPENDS:=@TARGET_ixp4xx @!IN_SDK + DEFAULT:=y + TITLE:=Boot loader for NSLU2, FSG3, NAS100D and others +endef + +define build_apex + $(MAKE) -C $(PKG_BUILD_DIR) \ + ARCH=arm \ + $(1)_config + $(MAKE) -C $(PKG_BUILD_DIR) \ + $(TARGET_CONFIGURE_OPTS) \ + KBUILD_HAVE_NLS=no \ + ARCH=arm \ + clean all + $(INSTALL_BIN) $(PKG_BUILD_DIR)/apex.bin $(PKG_BUILD_DIR)/out/apex-$(2).bin +endef + +define Build/Compile + $(INSTALL_DIR) $(PKG_BUILD_DIR)/out + $(call build_apex,openwrt-nslu2-armeb,nslu2-armeb) + $(call build_apex,openwrt-nslu2-16mb-armeb,nslu2-16mb-armeb) + $(call build_apex,openwrt-fsg3-armeb,fsg3-armeb) + $(call build_apex,openwrt-nas100d-armeb,nas100d-armeb) +endef + +define Build/InstallDev + $(INSTALL_DIR) $(STAGING_DIR_IMAGE)/apex + $(CP) $(PKG_BUILD_DIR)/out/*.bin $(STAGING_DIR_IMAGE)/apex +endef + +$(eval $(call BuildPackage,apex))