From patchwork Thu Apr 16 16:56:51 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 2197 Return-Path: X-Original-To: u-boot-concept@u-boot.org Delivered-To: u-boot-concept@u-boot.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1776358732; bh=iJiyg5mzeCQxTbfWUAu7ppQci0wb/g6Aqzf2jY9U/LA=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=nSQXQPlk3peHzd7LcaNwDIEUqx0+mjwkJViXnzy3dcElb0zYub3Tj9/cbRmiUVFwZ 9CyWb/8bHNiFiwprLI4Dl8gsZtnYCljU5/sjeHNyJPEvSBCn2pUKOyoOgr+otqGkpO 1Ixq1nWNmaiQD5RTTeRWfhoW67BHf2AHVwNW2ehk= Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 129F66A4DC for ; Thu, 16 Apr 2026 10:58:52 -0600 (MDT) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id hWA1gYauUaM6 for ; Thu, 16 Apr 2026 10:58:52 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1776358732; bh=iJiyg5mzeCQxTbfWUAu7ppQci0wb/g6Aqzf2jY9U/LA=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=nSQXQPlk3peHzd7LcaNwDIEUqx0+mjwkJViXnzy3dcElb0zYub3Tj9/cbRmiUVFwZ 9CyWb/8bHNiFiwprLI4Dl8gsZtnYCljU5/sjeHNyJPEvSBCn2pUKOyoOgr+otqGkpO 1Ixq1nWNmaiQD5RTTeRWfhoW67BHf2AHVwNW2ehk= Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 028266A4D8 for ; Thu, 16 Apr 2026 10:58:52 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1776358729; bh=RQ/Egvugw1nBWhFnrpQkHB4YkSIjEDUmHnO62xGce8w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SRrEnRSER3h40H4JZYQpqzJiXOftT2m2YRSLA0PsOWpyZoU7VzktJaZk+FzKaby6Z CV0MhWJJWyHt604DY55qCTbPdbUpJGRUVFlKvCoTYFNOIEoFg5vevgnoUPGvHUiD9o DGr/z4dUTQYiWFxFVWTmyueK3VPJpIESmrmRP6PE= Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id E350E6A4A5; Thu, 16 Apr 2026 10:58:49 -0600 (MDT) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10026) with ESMTP id 4ftxDjwj79Ms; Thu, 16 Apr 2026 10:58:49 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1776358727; bh=AJt8aeiNhkPk6824jFWQ950nEmsDxkBMimZR5hwv6qo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=C/uPoHODst2ZJBc2f6PN/dZUwrGb1fQnc/n8HJifmvWmWuZPT4PmBX1EkUhxiADUw IbNQw/QkvQHuB0vEm0tjkcR0+AW0lrvfCU32xm8eDghEj2gO7HWIyRDnjAYVf9c4wG vIoaIE9f4tCmnYG6QKJtkfGD8ehuH+Wmpx0nh+YA= Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 988346A4DD; Thu, 16 Apr 2026 10:58:47 -0600 (MDT) From: Simon Glass To: U-Boot Concept Date: Thu, 16 Apr 2026 10:56:51 -0600 Message-ID: <20260416165733.2923423-2-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260416165733.2923423-1-sjg@u-boot.org> References: <20260416165733.2923423-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: BFCBB3ESFYZAW4ELGMH5X2H2OP6YOUN2 X-Message-ID-Hash: BFCBB3ESFYZAW4ELGMH5X2H2OP6YOUN2 X-MailFrom: sjg@u-boot.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Simon Glass X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 01/21] linux: Add magic.h with filesystem magic numbers List-Id: Discussion and patches related to U-Boot Concept Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Simon Glass The Linux kernel defines filesystem magic numbers in U-Boot's linux/iso_fs.h needs ISOFS_SUPER_MAGIC from this header. Add a minimal magic.h with EXT4_SUPER_MAGIC and ISOFS_SUPER_MAGIC for use by Linux-ported filesystem drivers. Also remove the duplicate EXT4_SUPER_MAGIC definition from ext4_uboot.h replacing it with an include of Signed-off-by: Simon Glass --- fs/ext4l/ext4_uboot.h | 2 +- include/linux/magic.h | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 include/linux/magic.h diff --git a/fs/ext4l/ext4_uboot.h b/fs/ext4l/ext4_uboot.h index 01868087ec4..8face975101 100644 --- a/fs/ext4l/ext4_uboot.h +++ b/fs/ext4l/ext4_uboot.h @@ -112,6 +112,7 @@ #include #include #include +#include #include #include #include @@ -174,7 +175,6 @@ /* ext4-specific constants */ #define EXT4_FIEMAP_EXTENT_HOLE 0x08000000 -#define EXT4_SUPER_MAGIC 0xEF53 #define EXT4_GOING_FLAGS_DEFAULT 0 #define EXT4_GOING_FLAGS_LOGFLUSH 1 diff --git a/include/linux/magic.h b/include/linux/magic.h new file mode 100644 index 00000000000..65e85114a6e --- /dev/null +++ b/include/linux/magic.h @@ -0,0 +1,8 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef _LINUX_MAGIC_H +#define _LINUX_MAGIC_H + +#define EXT4_SUPER_MAGIC 0xef53 +#define ISOFS_SUPER_MAGIC 0x9660 + +#endif /* _LINUX_MAGIC_H */