Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/1637235/?format=api
{ "id": 1637235, "url": "http://patchwork.ozlabs.org/api/patches/1637235/?format=api", "web_url": "http://patchwork.ozlabs.org/project/uboot/patch/20220531083236.18968-1-pali@kernel.org/", "project": { "id": 18, "url": "http://patchwork.ozlabs.org/api/projects/18/?format=api", "name": "U-Boot", "link_name": "uboot", "list_id": "u-boot.lists.denx.de", "list_email": "u-boot@lists.denx.de", "web_url": null, "scm_url": null, "webscm_url": null, "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20220531083236.18968-1-pali@kernel.org>", "list_archive_url": null, "date": "2022-05-31T08:32:36", "name": "distroboot: Fix ubifs", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "9de31495e4e69ed613b61d09ee9f40ccaaf6881e", "submitter": { "id": 78810, "url": "http://patchwork.ozlabs.org/api/people/78810/?format=api", "name": "Pali Rohár", "email": "pali@kernel.org" }, "delegate": { "id": 3651, "url": "http://patchwork.ozlabs.org/api/users/3651/?format=api", "username": "trini", "first_name": "Tom", "last_name": "Rini", "email": "trini@ti.com" }, "mbox": "http://patchwork.ozlabs.org/project/uboot/patch/20220531083236.18968-1-pali@kernel.org/mbox/", "series": [ { "id": 302618, "url": "http://patchwork.ozlabs.org/api/series/302618/?format=api", "web_url": "http://patchwork.ozlabs.org/project/uboot/list/?series=302618", "date": "2022-05-31T08:32:36", "name": "distroboot: Fix ubifs", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/302618/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/1637235/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/1637235/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<u-boot-bounces@lists.denx.de>", "X-Original-To": "incoming@patchwork.ozlabs.org", "Delivered-To": "patchwork-incoming@bilbo.ozlabs.org", "Authentication-Results": [ "bilbo.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256\n header.s=k20201202 header.b=lEO0ndr+;\n\tdkim-atps=neutral", "ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de\n (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de;\n envelope-from=u-boot-bounces@lists.denx.de; receiver=<UNKNOWN>)", "phobos.denx.de;\n dmarc=pass (p=none dis=none) header.from=kernel.org", "phobos.denx.de;\n spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de", "phobos.denx.de;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=kernel.org header.i=@kernel.org header.b=\"lEO0ndr+\";\n\tdkim-atps=neutral", "phobos.denx.de;\n dmarc=pass (p=none dis=none) header.from=kernel.org", "phobos.denx.de; spf=pass smtp.mailfrom=pali@kernel.org" ], "Received": [ "from phobos.denx.de (phobos.denx.de\n [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange X25519 server-signature RSA-PSS (2048 bits))\n\t(No client certificate requested)\n\tby bilbo.ozlabs.org (Postfix) with ESMTPS id 4LC5Bt3vYHz9s1l\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 31 May 2022 18:33:08 +1000 (AEST)", "from h2850616.stratoserver.net (localhost [IPv6:::1])\n\tby phobos.denx.de (Postfix) with ESMTP id E768683AB5;\n\tTue, 31 May 2022 10:32:55 +0200 (CEST)", "by phobos.denx.de (Postfix, from userid 109)\n id 215A4842C6; Tue, 31 May 2022 10:32:53 +0200 (CEST)", "from dfw.source.kernel.org (dfw.source.kernel.org\n [IPv6:2604:1380:4641:c500::1])\n (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))\n (No client certificate requested)\n by phobos.denx.de (Postfix) with ESMTPS id 6C03C83E3C\n for <u-boot@lists.denx.de>; Tue, 31 May 2022 10:32:49 +0200 (CEST)", "from smtp.kernel.org (relay.kernel.org [52.25.139.140])\n (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))\n (No client certificate requested)\n by dfw.source.kernel.org (Postfix) with ESMTPS id 0DAF861251;\n Tue, 31 May 2022 08:32:48 +0000 (UTC)", "by smtp.kernel.org (Postfix) with ESMTPSA id 26E3BC385A9;\n Tue, 31 May 2022 08:32:47 +0000 (UTC)", "by pali.im (Postfix)\n id 35C9980E; Tue, 31 May 2022 10:32:44 +0200 (CEST)" ], "X-Spam-Checker-Version": "SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de", "X-Spam-Level": "", "X-Spam-Status": "No, score=-2.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,\n DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,\n SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no\n version=3.4.2", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;\n s=k20201202; t=1653985967;\n bh=h55x/zP1FhP2aTVlEaNEQmw8MBGN1Uegthx1AYW7V88=;\n h=From:To:Cc:Subject:Date:From;\n b=lEO0ndr+W1DkjqyccsIItWlc4SSZR3A3xYvNhE3Gm60i4WigF5ty0GLnO/PHFcN/Y\n ZKHa6cqRe4XBw+IpZZNJWPBoU9zELvfvtjubEyT4U88ci+VOCJ7FsWblvSJKKzUuXI\n kBBELQz0Uhq1eEpmthgW3G+W/J5LJm6YMJEFDtn27yBCbeMqbIfYhGvFlcAgVikd5E\n 1OkDv0NEve2hKGy1/saAKh80YqD5QIHUb75F5o9ARF0PCUUA1/JRJXFcb29as6paT8\n KwAvLwNJSOW43tAX4vVGTzL7ZIrunFVNSuTJBGxRyI5CEac3LNOEL3Et8bkrZ+t8iV\n 5uUZi7+DS69Tg==", "From": "=?utf-8?q?Pali_Roh=C3=A1r?= <pali@kernel.org>", "To": "Simon Glass <sjg@chromium.org>,\n Sjoerd Simons <sjoerd.simons@collabora.co.uk>,\n Govindaraji Sivanantham <Govindaraji.Sivanantham@in.bosch.com>,\n Hiremath Gireesh <Gireesh.Hiremath@in.bosch.com>,\n Marcel Ziswiler <marcel.ziswiler@toradex.com>,\n Frieder Schrempf <frieder.schrempf@kontron.de>,\n Parthiban Nallathambi <parthiban@linumiz.com>,\n Navin Sankar Velliangiri <navin@linumiz.com>,\n \"Derald D. Woods\" <woods.technical@gmail.com>,\n Martyn Welch <martyn.welch@collabora.com>,\n Patrick Delaunay <patrick.delaunay@foss.st.com>,\n Patrice Chotard <patrice.chotard@foss.st.com>", "Cc": "u-boot@lists.denx.de", "Subject": "[PATCH] distroboot: Fix ubifs", "Date": "Tue, 31 May 2022 10:32:36 +0200", "Message-Id": "<20220531083236.18968-1-pali@kernel.org>", "X-Mailer": "git-send-email 2.20.1", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=UTF-8", "Content-Transfer-Encoding": "8bit", "X-BeenThere": "u-boot@lists.denx.de", "X-Mailman-Version": "2.1.39", "Precedence": "list", "List-Id": "U-Boot discussion <u-boot.lists.denx.de>", "List-Unsubscribe": "<https://lists.denx.de/options/u-boot>,\n <mailto:u-boot-request@lists.denx.de?subject=unsubscribe>", "List-Archive": "<https://lists.denx.de/pipermail/u-boot/>", "List-Post": "<mailto:u-boot@lists.denx.de>", "List-Help": "<mailto:u-boot-request@lists.denx.de?subject=help>", "List-Subscribe": "<https://lists.denx.de/listinfo/u-boot>,\n <mailto:u-boot-request@lists.denx.de?subject=subscribe>", "Errors-To": "u-boot-bounces@lists.denx.de", "Sender": "\"U-Boot\" <u-boot-bounces@lists.denx.de>", "X-Virus-Scanned": "clamav-milter 0.103.5 at phobos.denx.de", "X-Virus-Status": "Clean" }, "content": "Fix multiple issues in ubifs distroboot code:\n\nU-Boot supports attaching only one MTD device as UBI at the time. So\nalways call 'ubifsmount ubi0:${bootubivol}' for mounting UBI volume\n${bootubivol}. Usage of 'ubi${devnum}' is incorrect as 'ubi part'\ncommand attach MTD device always as UBI device ubi0.\n\nSet distroboot ${bootfstype} variable to ubifs in ubifs_boot command.\nDistroboot scripts require ${bootfstype} variable to be properly set and it\nis already set for all other boot types.\n\nSet distroboot ${distro_bootpart} variable to ${bootubivol} value. UBI\ndevice does not have partitions, but has volumes. Distroboot scripts\nrequire something to be set in ${distro_bootpart} variable, so set it to\nthe UBI volume which is currently mounted by ubifs.\n\nSet distroboot ${devnum} variable to fixed string \"ubi0\". ubifs code\ndiffers from the other partition code that it requires \"ubi\" prefix before\nnumber.\n\nExplicitly unmount ubifs volume after loading all data from it. This allows\nto detach UBI device from MTD device.\n\nMove definition of MTD device with UBI and UBI volume with ubifs filesystem\nfrom global env variables ${bootubipart} and ${bootubivol} into the\ndistroboot \"func\" macro, defined in board include config files. UBIFS\ndistroboot macros then set ${bootubipart} and ${bootubivol} local variables\nfor compatibility with existing distroboot scripts.\n\nThis last change allows to define more UBIFS target devices and make it\nclear what is boot MTD/UBI device.\n\nAll board include config files are adjusted to use this new scheme of\nspecifying boot MTD/UBI device.\n\nSigned-off-by: Pali Rohár <pali@kernel.org>\n---\nCI test passed on https://github.com/u-boot/u-boot/pull/179\n---\n include/config_distro_bootcmd.h | 27 ++++++++++++++++-----------\n include/configs/am335x_guardian.h | 3 +--\n include/configs/colibri-imx6ull.h | 1 -\n include/configs/colibri_imx7.h | 1 -\n include/configs/kontron-sl-mx6ul.h | 2 +-\n include/configs/mys_6ulx.h | 2 +-\n include/configs/npi_imx6ull.h | 2 +-\n include/configs/omap3_beagle.h | 4 +---\n include/configs/omap3_evm.h | 4 +---\n include/configs/pcl063.h | 2 +-\n include/configs/stm32mp15_common.h | 2 +-\n include/configs/uniphier.h | 2 +-\n 12 files changed, 25 insertions(+), 27 deletions(-)", "diff": "diff --git a/include/config_distro_bootcmd.h b/include/config_distro_bootcmd.h\nindex c55023889cab..c6e9c497413d 100644\n--- a/include/config_distro_bootcmd.h\n+++ b/include/config_distro_bootcmd.h\n@@ -70,18 +70,23 @@\n #ifdef CONFIG_CMD_UBIFS\n #define BOOTENV_SHARED_UBIFS \\\n \t\"ubifs_boot=\" \\\n-\t\t\"env exists bootubipart || \" \\\n-\t\t\t\"env set bootubipart UBI; \" \\\n-\t\t\"env exists bootubivol || \" \\\n-\t\t\t\"env set bootubivol boot; \" \\\n \t\t\"if ubi part ${bootubipart} && \" \\\n-\t\t\t\"ubifsmount ubi${devnum}:${bootubivol}; \" \\\n+\t\t\t\"ubifsmount ubi0:${bootubivol}; \" \\\n \t\t\"then \" \\\n \t\t\t\"devtype=ubi; \" \\\n+\t\t\t\"devnum=ubi0; \" \\\n+\t\t\t\"bootfstype=ubifs; \" \\\n+\t\t\t\"distro_bootpart=${bootubivol}; \" \\\n \t\t\t\"run scan_dev_for_boot; \" \\\n+\t\t\t\"ubifsumount; \" \\\n \t\t\"fi\\0\"\n-#define BOOTENV_DEV_UBIFS\tBOOTENV_DEV_BLKDEV\n-#define BOOTENV_DEV_NAME_UBIFS\tBOOTENV_DEV_NAME_BLKDEV\n+#define BOOTENV_DEV_UBIFS(devtypeu, devtypel, instance, bootubipart, bootubivol) \\\n+\t\"bootcmd_ubifs\" #instance \"=\" \\\n+\t\t\"bootubipart=\" #bootubipart \"; \" \\\n+\t\t\"bootubivol=\" #bootubivol \"; \" \\\n+\t\t\"run ubifs_boot\\0\"\n+#define BOOTENV_DEV_NAME_UBIFS(devtypeu, devtypel, instance, bootubipart, bootubivol) \\\n+\t#devtypel #instance \" \"\n #else\n #define BOOTENV_SHARED_UBIFS\n #define BOOTENV_DEV_UBIFS \\\n@@ -411,13 +416,13 @@\n \tBOOT_TARGET_DEVICES_references_PXE_without_CONFIG_CMD_DHCP_or_PXE\n #endif\n \n-#define BOOTENV_DEV_NAME(devtypeu, devtypel, instance) \\\n-\tBOOTENV_DEV_NAME_##devtypeu(devtypeu, devtypel, instance)\n+#define BOOTENV_DEV_NAME(devtypeu, devtypel, instance, ...) \\\n+\tBOOTENV_DEV_NAME_##devtypeu(devtypeu, devtypel, instance, ## __VA_ARGS__)\n #define BOOTENV_BOOT_TARGETS \\\n \t\"boot_targets=\" BOOT_TARGET_DEVICES(BOOTENV_DEV_NAME) \"\\0\"\n \n-#define BOOTENV_DEV(devtypeu, devtypel, instance) \\\n-\tBOOTENV_DEV_##devtypeu(devtypeu, devtypel, instance)\n+#define BOOTENV_DEV(devtypeu, devtypel, instance, ...) \\\n+\tBOOTENV_DEV_##devtypeu(devtypeu, devtypel, instance, ## __VA_ARGS__)\n #define BOOTENV \\\n \tBOOTENV_SHARED_HOST \\\n \tBOOTENV_SHARED_MMC \\\ndiff --git a/include/configs/am335x_guardian.h b/include/configs/am335x_guardian.h\nindex b92703205cde..340715dad5c6 100644\n--- a/include/configs/am335x_guardian.h\n+++ b/include/configs/am335x_guardian.h\n@@ -29,7 +29,7 @@\n \t\"ramdisk_addr_r=0x88080000\\0\" \\\n \n #define BOOT_TARGET_DEVICES(func) \\\n-\tfunc(UBIFS, ubifs, 0)\n+\tfunc(UBIFS, ubifs, 0, UBI, rootfs)\n \n #define AM335XX_BOARD_FDTFILE \"fdtfile=\" CONFIG_DEFAULT_DEVICE_TREE \".dtb\\0\"\n \n@@ -54,7 +54,6 @@\n \tGUARDIAN_DEFAULT_PROD_ENV \\\n \t\"autoload=no\\0\" \\\n \t\"backlight_brightness=50\\0\" \\\n-\t\"bootubivol=rootfs\\0\" \\\n \t\"distro_bootcmd=\" \\\n \t\t\"setenv rootflags \\\"bulk_read,chk_data_crc\\\"; \" \\\n \t\t\"setenv ethact usb_ether; \" \\\ndiff --git a/include/configs/colibri-imx6ull.h b/include/configs/colibri-imx6ull.h\nindex 9e5212acb2ee..a0a0e1767fe0 100644\n--- a/include/configs/colibri-imx6ull.h\n+++ b/include/configs/colibri-imx6ull.h\n@@ -91,7 +91,6 @@\n \tUBI_BOOTCMD \\\n \tUBOOT_UPDATE \\\n \t\"boot_script_dhcp=boot.scr\\0\" \\\n-\t\"bootubipart=ubi\\0\" \\\n \t\"console=ttymxc0\\0\" \\\n \t\"defargs=user_debug=30\\0\" \\\n \t\"fdt_board=eval-v3\\0\" \\\ndiff --git a/include/configs/colibri_imx7.h b/include/configs/colibri_imx7.h\nindex 3dba7bcef258..3cad17777975 100644\n--- a/include/configs/colibri_imx7.h\n+++ b/include/configs/colibri_imx7.h\n@@ -131,7 +131,6 @@\n \tUBOOT_UPDATE \\\n \t\"boot_file=zImage\\0\" \\\n \t\"boot_script_dhcp=boot.scr\\0\" \\\n-\t\"bootubipart=ubi\\0\" \\\n \t\"console=ttymxc0\\0\" \\\n \t\"defargs=\\0\" \\\n \t\"fdt_board=eval-v3\\0\" \\\ndiff --git a/include/configs/kontron-sl-mx6ul.h b/include/configs/kontron-sl-mx6ul.h\nindex 7bc402d578e8..b4808d2bbf75 100644\n--- a/include/configs/kontron-sl-mx6ul.h\n+++ b/include/configs/kontron-sl-mx6ul.h\n@@ -45,7 +45,7 @@\n #define BOOT_TARGET_DEVICES(func) \\\n \tfunc(MMC, mmc, 1) \\\n \tfunc(MMC, mmc, 0) \\\n-\tfunc(UBIFS, ubifs, 0) \\\n+\tfunc(UBIFS, ubifs, 0, UBI, boot) \\\n \tfunc(USB, usb, 0) \\\n \tfunc(PXE, pxe, na) \\\n \tfunc(DHCP, dhcp, na)\ndiff --git a/include/configs/mys_6ulx.h b/include/configs/mys_6ulx.h\nindex 6801fc109eae..663820177a3e 100644\n--- a/include/configs/mys_6ulx.h\n+++ b/include/configs/mys_6ulx.h\n@@ -59,7 +59,7 @@\n \n #define BOOT_TARGET_DEVICES(func) \\\n \tfunc(MMC, mmc, 0) \\\n-\tfunc(UBIFS, ubifs, 0) \\\n+\tfunc(UBIFS, ubifs, 0, UBI, boot) \\\n \tfunc(PXE, pxe, na) \\\n \tfunc(DHCP, dhcp, na)\n \ndiff --git a/include/configs/npi_imx6ull.h b/include/configs/npi_imx6ull.h\nindex c250fa650603..ebb887544e08 100644\n--- a/include/configs/npi_imx6ull.h\n+++ b/include/configs/npi_imx6ull.h\n@@ -67,7 +67,7 @@\n \n #define BOOT_TARGET_DEVICES(func) \\\n \tfunc(MMC, mmc, 0) \\\n-\tfunc(UBIFS, ubifs, 0) \\\n+\tfunc(UBIFS, ubifs, 0, UBI, boot) \\\n \tfunc(PXE, pxe, na) \\\n \tfunc(DHCP, dhcp, na)\n \ndiff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h\nindex 158773acedb9..f5da08cf3359 100644\n--- a/include/configs/omap3_beagle.h\n+++ b/include/configs/omap3_beagle.h\n@@ -65,7 +65,7 @@\n #define BOOT_TARGET_DEVICES(func) \\\n \tfunc(MMC, mmc, 0) \\\n \tfunc(LEGACY_MMC, legacy_mmc, 0) \\\n-\tfunc(UBIFS, ubifs, 0) \\\n+\tfunc(UBIFS, ubifs, 0, rootfs, rootfs) \\\n \tfunc(NAND, nand, 0)\n \n #else /* !CONFIG_MTD_RAW_NAND */\n@@ -87,8 +87,6 @@\n \t\"bootenv=uEnv.txt\\0\" \\\n \t\"bootfile=zImage\\0\" \\\n \t\"bootpart=0:2\\0\" \\\n-\t\"bootubivol=rootfs\\0\" \\\n-\t\"bootubipart=rootfs\\0\" \\\n \t\"usbtty=cdc_acm\\0\" \\\n \t\"mpurate=auto\\0\" \\\n \t\"buddy=none\\0\" \\\ndiff --git a/include/configs/omap3_evm.h b/include/configs/omap3_evm.h\nindex eeb9ef8c741a..cc98e03096ab 100644\n--- a/include/configs/omap3_evm.h\n+++ b/include/configs/omap3_evm.h\n@@ -60,7 +60,7 @@\n #define BOOT_TARGET_DEVICES(func) \\\n \tfunc(MMC, mmc, 0) \\\n \tfunc(LEGACY_MMC, legacy_mmc, 0) \\\n-\tfunc(UBIFS, ubifs, 0) \\\n+\tfunc(UBIFS, ubifs, 0, rootfs, rootfs) \\\n \tfunc(NAND, nand, 0)\n \n #else /* !CONFIG_MTD_RAW_NAND */\n@@ -88,8 +88,6 @@\n \t\"bootenv=uEnv.txt\\0\" \\\n \t\"bootfile=zImage\\0\" \\\n \t\"bootpart=0:2\\0\" \\\n-\t\"bootubivol=rootfs\\0\" \\\n-\t\"bootubipart=rootfs\\0\" \\\n \t\"optargs=\\0\" \\\n \t\"nandroot=ubi0:rootfs ubi.mtd=rootfs rw noinitrd\\0\" \\\n \t\"nandrootfstype=ubifs rootwait\\0\" \\\ndiff --git a/include/configs/pcl063.h b/include/configs/pcl063.h\nindex 31b7d07a24cd..c3f7e7eb2c4b 100644\n--- a/include/configs/pcl063.h\n+++ b/include/configs/pcl063.h\n@@ -71,7 +71,7 @@\n \n #define BOOT_TARGET_DEVICES(func) \\\n \tfunc(MMC, mmc, 0) \\\n-\tfunc(UBIFS, ubifs, 0) \\\n+\tfunc(UBIFS, ubifs, 0, UBI, boot) \\\n \tfunc(PXE, pxe, na) \\\n \tfunc(DHCP, dhcp, na)\n \ndiff --git a/include/configs/stm32mp15_common.h b/include/configs/stm32mp15_common.h\nindex 6b40cdb01779..68ea56e69c98 100644\n--- a/include/configs/stm32mp15_common.h\n+++ b/include/configs/stm32mp15_common.h\n@@ -77,7 +77,7 @@\n #endif\n \n #ifdef CONFIG_CMD_UBIFS\n-#define BOOT_TARGET_UBIFS(func)\tfunc(UBIFS, ubifs, 0)\n+#define BOOT_TARGET_UBIFS(func)\tfunc(UBIFS, ubifs, 0, UBI, boot)\n #else\n #define BOOT_TARGET_UBIFS(func)\n #endif\ndiff --git a/include/configs/uniphier.h b/include/configs/uniphier.h\nindex f813f88cdd7a..640a29067d85 100644\n--- a/include/configs/uniphier.h\n+++ b/include/configs/uniphier.h\n@@ -20,7 +20,7 @@\n #endif\n \n #ifdef CONFIG_CMD_UBIFS\n-#define BOOT_TARGET_DEVICE_UBIFS(func)\tfunc(UBIFS, ubifs, 0)\n+#define BOOT_TARGET_DEVICE_UBIFS(func)\tfunc(UBIFS, ubifs, 0, UBI, boot)\n #else\n #define BOOT_TARGET_DEVICE_UBIFS(func)\n #endif\n", "prefixes": [] }