From patchwork Sun Sep 15 08:51:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Heimpold X-Patchwork-Id: 1985846 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=f5StPpck; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=heimpold.de header.i=@heimpold.de header.a=rsa-sha256 header.s=strato-dkim-0002 header.b=c8LnA2Tf; dkim=fail reason="signature verification failed" header.d=heimpold.de header.i=@heimpold.de header.a=ed25519-sha256 header.s=strato-dkim-0003 header.b=gl/gCTXp; 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 4X61zb3kBfz1y2N for ; Sun, 15 Sep 2024 18:53:30 +1000 (AEST) 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:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=lVjFqtrcEMramC3KxcrGxpZqufAHyM+mGYhFUVIjJdk=; b=f5StPpckfwbFev T4emsJ3Bug4XfhGoXK4/A1+lYqF78o3HQdLP6O9OOUqFyhzRRUnjF3HfLxDXx2UWUzmGTK0iESDjv aR44biyVjtVua6gv79x6hFBLLF+k2FcvE0uONkoyPCg8yvU5wTyu49HyIAbdbARr9u9khbkuzZDEL tqmbQaynjL5VBkO3Qv8jLpW6MEmmdSVgHcx+XjHGDnKh4vXulLUyRBqYkln6oPyBMqB62hqXyXJi8 JxZjX56+SyhUl9UfBdsKfROtMjSH8IsO5AWAWT9CyQ8zF+z1JY2yIB8Y848fMQAjvldCZQfZmr5B2 1yNnJfjLXHavN6CTSEWg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1spkz8-00000001rBY-3JJr; Sun, 15 Sep 2024 08:51:58 +0000 Received: from mo4-p00-ob.smtp.rzone.de ([81.169.146.220]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1spkz2-00000001r95-3Hic for openwrt-devel@lists.openwrt.org; Sun, 15 Sep 2024 08:51:56 +0000 ARC-Seal: i=1; a=rsa-sha256; t=1726390301; cv=none; d=strato.com; s=strato-dkim-0002; b=ZmTarhHOV0J6uqJu2zlqQ+2U9yDgetZu39wbrj1dEvxLuwuux+aYZbawSCWBd2QcEj aKjQ82jKBvLxfm9pYJwnakjpN6moCiZwtzFCY6ffzJ5JCCsv9NkNJVu2FA1jV9Ax4sHq v4oS9w/3zYbgpfAqQfvwUK6l+CWxRYCwWjBEPNvwlU5FxG2coDcZW19UllA7ZwVYgO5q HaUW3XRUJqowqBqsIKXFOdsY9zvKkk9wcTr55ATalpIecNdM3v07hyaxjwzxqJjlP/1E M2nh6l21OD1S1y2UBFe63944sH4LlA6yMsK9IGeEISa+1Gpxq1EgpKYNu3pGy+M7w+oS BEGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1726390301; s=strato-dkim-0002; d=strato.com; h=Message-Id:Date:Subject:Cc:To:From:Cc:Date:From:Subject:Sender; bh=qE88wqc4C49deJ9ND4F2opl8OuV58Pl6okYTQI1vOQI=; b=kLu5MWil0tVeeACBuWpB+Vxvc7Lf/7dZNxSeZ8jDFI822MDl1gMq+E1KA0fF87MaE2 ENU7YEoYFmOiYN0NZuNY2wC+hUyICcA/svGWeWdT45ZgGBW00n0wgEcma5LrZzlXsmkN ob6UQIh6VeGjiNw3RboZMhJuBVArvw2TP68DDmNj7CbErGsRrdMhYb/efYPW/GUAJkLX +UUTsKI5ohW+zX6h7/3ZQ9UgrIcbRM0bac0lO94th/nK1/b3UL+mhFpuusV13q9IhkKO BxHURqxL3ytYiiq+B/MpOzAYSbjwbleYLFhuc4ADrlB9LcJ7+vi3fpZRnwY1R/JycjFM /wWA== ARC-Authentication-Results: i=1; strato.com; arc=none; dkim=none X-RZG-CLASS-ID: mo00 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1726390301; s=strato-dkim-0002; d=heimpold.de; h=Message-Id:Date:Subject:Cc:To:From:Cc:Date:From:Subject:Sender; bh=qE88wqc4C49deJ9ND4F2opl8OuV58Pl6okYTQI1vOQI=; b=c8LnA2Tf2V4WVclMihhHBOnMKXWKAiOeJEEq5SB/oyIZJORasRQlNIbTvare8yUGkX U334zci9sg9lHuEaShRvn74JEaKE5D4YK4D6BkK7hs27B0NjLY+7Ya/0Z0yVQ41hIhGl f+KOG1QYAK3WRwa9yeX0qnDIB6SPRzJfrrcbn65ryPaOcB06iM4iYi4rdh5TFWNslTQi ZYAH0JXbv+PhZ+cbps7UAnaFZJzsilN5C5LBxH561SM9ojIgtxEcV1REfP+ce+1TORRy //ng/HUZortOn1hBgvSEvQ07Eqac/9FG1Bx+YSwApePs/TgaqoHKwvGAVV39CO6svkN2 /pQA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1726390301; s=strato-dkim-0003; d=heimpold.de; h=Message-Id:Date:Subject:Cc:To:From:Cc:Date:From:Subject:Sender; bh=qE88wqc4C49deJ9ND4F2opl8OuV58Pl6okYTQI1vOQI=; b=gl/gCTXpBWZ9/Zr6TUDUwtBdoKLKRwp7od4meHaXwOlqtyeXRhYGBMnzN40yg/PsXG 7pFWUz/7NNcMUvFZheBg== X-RZG-AUTH: ":O2kGeEG7b/pS1EW8QnKjhhg/vO4pzqdNytq77N6ZKUSN7PfdWTGQORRBv+hBJ4HuTjY3tS0qFDMDqYZTtzbXNZbnUk+LVueRVXGX" Received: from tonne.mhei.heimpold.itr by smtp.strato.de (RZmta 51.2.3 AUTH) with ESMTPSA id 9ebf8908F8pfWGE (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (curve X9_62_prime256v1 with 256 ECDH bits, eq. 3072 bits RSA)) (Client did not present a certificate); Sun, 15 Sep 2024 10:51:41 +0200 (CEST) Received: from kerker.mhei.heimpold.itr (kerker.mhei.heimpold.itr [192.168.8.1]) by tonne.mhei.heimpold.itr (Postfix) with ESMTP id EBE881578F0; Sun, 15 Sep 2024 10:52:13 +0200 (CEST) From: Michael Heimpold To: openwrt-devel@lists.openwrt.org Cc: wigyori@uid0.hu, Michael Heimpold Subject: [PATCH] mxs: fix image generation for I2SE Duckbills Date: Sun, 15 Sep 2024 10:51:27 +0200 Message-Id: <20240915085127.2842412-1-mhei@heimpold.de> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240915_015153_220633_483A6F2D X-CRM114-Status: UNSURE ( 9.42 ) X-CRM114-Notice: Please train this message. X-Spam-Note: SpamAssassin invocation failed 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: , Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org The standard U-Boot boot scripts for Duckbills expect the Linux kernel and device tree files installed below /boot within the (ext4) root filesystem. Also a raw zImage is expected instead of uImage. Extend the SD card generation accordingly and while at, install all possible Duckbill DT blobs there. Signed-off-by: Michael Heimpold --- target/linux/mxs/image/Makefile | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/target/linux/mxs/image/Makefile b/target/linux/mxs/image/Makefile index fff7e7ca3325..468eca324879 100644 --- a/target/linux/mxs/image/Makefile +++ b/target/linux/mxs/image/Makefile @@ -10,11 +10,33 @@ FAT32_BLOCKS=$(shell echo $$(($(CONFIG_MXS_SD_BOOT_PARTSIZE)*1024*1024/$(FAT32_B KERNEL_LOADADDR:=0x40008000 +define Build/mxs-ext4-rootfs-with-boot + rm -rf $(call mkfs_target_dir,$(1))/boot + mkdir -p $(call mkfs_target_dir,$(1))/boot + $(CP) --no-preserve=mode $(KDIR)/$(KERNEL_NAME) $(call mkfs_target_dir,$(1))/boot/ + $(foreach dts,$(DEVICE_DTS), \ + $(CP) \ + $(DTS_DIR)/$(dts).dtb \ + $(call mkfs_target_dir,$(1))/boot/; \ + ) + + rm -rf $@.rootfs + $(STAGING_DIR_HOST)/bin/make_ext4fs -L rootfs \ + -l $(ROOTFS_PARTSIZE) -b $(CONFIG_TARGET_EXT4_BLOCKSIZE) \ + $(if $(CONFIG_TARGET_EXT4_RESERVED_PCT),-m $(CONFIG_TARGET_EXT4_RESERVED_PCT)) \ + $(if $(CONFIG_TARGET_EXT4_JOURNAL),,-J) \ + $(if $(SOURCE_DATE_EPOCH),-T $(SOURCE_DATE_EPOCH)) \ + $@.rootfs $(call mkfs_target_dir,$(1))/ + mv $@.rootfs $@ +endef + define Build/mxs-sdcard-ext4-ext4 + mv $@ $@.rootfs + ./gen_sdcard_ext4_ext4.sh \ $@ \ $(STAGING_DIR_IMAGE)/$(DEVICE_NAME)/u-boot.sb \ - $(IMAGE_ROOTFS) \ + $@.rootfs \ $(CONFIG_TARGET_ROOTFS_PARTSIZE) endef @@ -50,8 +72,9 @@ define Device/i2se_duckbill uboot-envtools kmod-leds-gpio -kmod-ipt-nathelper SUPPORTED_DEVICES:=i2se,duckbill SOC:=imx28 - DEVICE_DTS:=imx28-duckbill - IMAGE/sdcard.img.gz = mxs-sdcard-ext4-ext4 | append-metadata | gzip + KERNEL := kernel-bin + DEVICE_DTS:=imx28-duckbill imx28-duckbill-2 imx28-duckbill-2-485 imx28-duckbill-2-spi + IMAGE/sdcard.img.gz = mxs-ext4-rootfs-with-boot | mxs-sdcard-ext4-ext4 | append-metadata | gzip endef TARGET_DEVICES += i2se_duckbill