Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp1588392pxb; Thu, 28 Oct 2021 06:33:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwMUCAltbhgc0avzeIjdvM4/cV38C5tT6C9YW+YLW4U3DXhTPdidYk0iPyq9qS2mJz1v0u7 X-Received: by 2002:a17:903:124d:b0:13f:d148:ed70 with SMTP id u13-20020a170903124d00b0013fd148ed70mr3957777plh.42.1635428032408; Thu, 28 Oct 2021 06:33:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635428032; cv=none; d=google.com; s=arc-20160816; b=T6qIXzGrr9De9m4C9x5m/qxgAFfHulCuBJiMrBmTkkejaYMZb5zYOOaf5JPyYKsnKw Sig1xMKKEcvHLq0x1Gqr0bHRLup3QOWsXXtgqt+S87QdI5r8BOckV+e3BXi52ZQhNmPh h3I9mWBd9VRf0Xj3RfNfzFcgxyG8GeA1iLPrMJ4ZTbTtDtdiVFRSzAszZwnSSBt++ecv ADwQcpzNTReeZGajS+R8XNYUxFx4n2RMPeTHOhehK4bjq4ya0da8/xrtiDUzzqmV5UGy CFJVm+blYhKUBhdzFSN3WZ92p46IpsGaxtS3gRCXl8bBPf3ZQxPT2v7t8yG1Pnfgv2KV S7+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=Vtcm+cVDOBMQDVtuIHnCW+Jxhn6Pk4wSFgRiWHBeVNY=; b=XExIZ5b2fyEsFspAQsDBkenlYeP7iPxT8ngjPdA31XNjRz95tDAGMbuknD51Y0Qis/ hEJDw5TXilAktLaa5P2z7bPSFwsI83jwkqrZIedwKusDSvokjsbEMIT2PLy+uxnkftV9 /VlSRp+Y3sdLrswOe3ajSAJqifG1WqXp8S9a0vCJ48sO7Yl7uIsKNIWIZPJ1hkCHilky aZ7HTkTC8+j7ID6+g0VeQDkqEwWhoo4SGzNpRD96urCAG3q822tsJlTbb9SLeQ0tViUF FMDdZ0MZ3q2EkNThdNNJjp17aokG/KxXP1PcdiOW36QxoQ+2t/RBxZjn0N7RzrfMvn53 zhdw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=HO1OOsaS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j16si4375233pfj.155.2021.10.28.06.33.39; Thu, 28 Oct 2021 06:33:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=HO1OOsaS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230369AbhJ1Ndv (ORCPT + 99 others); Thu, 28 Oct 2021 09:33:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46192 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230017AbhJ1Ndu (ORCPT ); Thu, 28 Oct 2021 09:33:50 -0400 Received: from mail-qv1-xf2b.google.com (mail-qv1-xf2b.google.com [IPv6:2607:f8b0:4864:20::f2b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C4E60C061570 for ; Thu, 28 Oct 2021 06:31:23 -0700 (PDT) Received: by mail-qv1-xf2b.google.com with SMTP id g25so3005355qvf.13 for ; Thu, 28 Oct 2021 06:31:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=Vtcm+cVDOBMQDVtuIHnCW+Jxhn6Pk4wSFgRiWHBeVNY=; b=HO1OOsaSM0hufdukw2ilon9Xex9Jnv9qQ+IkBO+hVTz0fyLoFM0rnwnCdx84Zun6X6 h15QuMuah7hHrp23BSPVXN7de8q581aTq3W2Z5uNyyts8fJzcPcRa1r+W8iBDhW/EK6f e7o6UpIWkOc6Hl6ls+zqgIHIPNRRUwU+o1lc15FrsCjbtjyuXQpTWIjhcqRquDi3/CtM zoFm+HxUbjFHIU8F6Gi4c1JHZlVZGvpCDdG4io4Chqn64NDEGwvFspPyNVHMSqnQ9JEi 4Uw5M8eOLidcPorLFl1iRvJFkbxCZXk9IDoThkNk/dZQZvBJoagsMjEQv8hSaQk2Zi+o 2J6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=Vtcm+cVDOBMQDVtuIHnCW+Jxhn6Pk4wSFgRiWHBeVNY=; b=ljT8VF0b0YfoQjMcFxzswWTM9oSe7bsfYme0eB5l/+Bv9o4sWI/fX7hgSquu+UwiMi X1EiY5XGwggmpNwnlx5iEgrk/KCd6/trMSbznVnD+PzHFC/gaRsNYq3aCz84JiQQ0UOy j3ZeGcwttSmsbsIV/R4K1sjU7gWid1uiIdU9Nym55Sk/Ux53NQfZe4kJ0bPakkdKw+sd AujkmV1ixd58Jc8GGMA/8IBlRw/+B+8EIg92xpSWbEWE327dGOk5g6VjLGs14oYqqe9V N1JOEoI1gAGov9YOA9BJPlcu4C2YnYUWvtjC4UWZ0bUYLpPOnp8mhKoB7nLOHHDBqkz1 AOdQ== X-Gm-Message-State: AOAM532az5bT19eN3znMdLLA205B3zN5ZZSo+gzWnvxmOXcjSjU7+iTN Shzm03oAYETKoiFlLalGrWw= X-Received: by 2002:a05:6214:1786:: with SMTP id ct6mr4022776qvb.58.1635427882948; Thu, 28 Oct 2021 06:31:22 -0700 (PDT) Received: from localhost (pppoe-209-91-167-254.vianet.ca. [209.91.167.254]) by smtp.gmail.com with ESMTPSA id bs33sm1955780qkb.130.2021.10.28.06.31.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Oct 2021 06:31:22 -0700 (PDT) Date: Thu, 28 Oct 2021 09:31:19 -0400 From: Trevor Woerner To: Richard Weinberger Cc: Ezequiel Garcia , linux-mtd , linux-kernel , Miquel Raynal , Vignesh Raghavendra Subject: Re: [PATCH 0/3] mtdblock: Advertise about UBI and UBI block Message-ID: <20211028133119.GA21237@localhost> References: <20210801234509.18774-1-ezequiel@collabora.com> <20211026150350.GA5136@localhost> <876982414.38679.1635274892099.JavaMail.zimbra@nod.at> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <876982414.38679.1635274892099.JavaMail.zimbra@nod.at> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue 2021-10-26 @ 09:01:32 PM, Richard Weinberger wrote: > Trevor, > > ----- Ursprüngliche Mail ----- > > Von: "Trevor Woerner" > > An: "Ezequiel Garcia" > > CC: "linux-mtd" , "linux-kernel" , "richard" > > , "Miquel Raynal" , "Vignesh Raghavendra" > > Gesendet: Dienstag, 26. Oktober 2021 17:03:50 > > Betreff: Re: [PATCH 0/3] mtdblock: Advertise about UBI and UBI block > > > On Sun 2021-08-01 @ 08:45:02 PM, Ezequiel Garcia wrote: > >> Hi Richard, and everyone else: > >> > >> Browsing the internet for "JFFS2 mtd" results in tutorials, articles > >> and github.gists0 that point to mtdblock. > >> > >> In fact, even the MTD wiki mentions that JFFS2 > >> needs mtdblock to mount a rootfs: > >> > >> http://www.linux-mtd.infradead.org/faq/jffs2.html > >> > >> Moreover, I suspect there may be lots of users > >> that still believe mtdblock is somehow needed to > >> mount SquashFS. > >> > >> I've taken a verbose route and added a pr_warn > >> warning if the devices are NAND. I don't think using > >> NAND without UBI is too wise, and given the amount > >> of outdated tutorials I believe some advertising > >> will help. > > > > Not all NAND partitions on a device will contain linux root filesystems. For a > > linux root filesystem perhaps using UBI/UBIFS is preferred, yet these messages > > print out for each and every NAND partition: > > > > [ 0.900827] Creating 8 MTD partitions on "nxp_lpc3220_slc": > > [ 0.906431] 0x000000000000-0x000000020000 : "bootrom" > > [ 0.913523] mtdblock: MTD device 'bootrom' is NAND, please consider using UBI > > block devices instead. > > [ 0.933334] 0x000000020000-0x000000080000 : "uboot" > > [ 0.940439] mtdblock: MTD device 'uboot' is NAND, please consider using UBI > > block devices instead. > > [ 0.963322] 0x000000080000-0x000000440000 : "fbkernel" > > [ 0.970655] mtdblock: MTD device 'fbkernel' is NAND, please consider using > > UBI block devices instead. > > [ 0.993361] 0x000000440000-0x000000920000 : "fbrootfs" > > [ 1.000725] mtdblock: MTD device 'fbrootfs' is NAND, please consider using > > UBI block devices instead. > > [ 1.023315] 0x000000920000-0x000000ce0000 : "c_kernel" > > [ 1.030722] mtdblock: MTD device 'c_kernel' is NAND, please consider using > > UBI block devices instead. > > [ 1.053444] 0x000000ce0000-0x000000d00000 : "c__atags" > > [ 1.060742] mtdblock: MTD device 'c__atags' is NAND, please consider using > > UBI block devices instead. > > [ 1.083349] 0x000000d00000-0x000001000000 : "c_rootfs" > > [ 1.090702] mtdblock: MTD device 'c_rootfs' is NAND, please consider using > > UBI block devices instead. > > [ 1.113335] 0x000001000000-0x000020000000 : "mender" > > [ 1.131627] mtdblock: MTD device 'mender' is NAND, please consider using UBI > > block devices instead. > > > > NAND tends to be something found on older devices, the firmware/bootloaders > > of older devices couldn't possibly understand UBI/UBIFS so many of these > > partitions need be "raw" partitions, or use something that predates UBI. > > > > Ironically my "mender" partition contains a UBI (with multiple UBIFSes inside) > > yet I got the same "please use UBI" message as all the others (lol) > > > > I'm specifying my partitions in DT with: > > > > partitions { > > compatible = "fixed-partitions"; > > #address-cells = <1>; > > #size-cells = <1>; > > > > mtd0@0 { label = "bootrom"; reg = <0x00000000 0x00020000>; }; > > mtd1@20000 { label = "uboot"; reg = <0x00020000 0x00060000>; }; > > mtd2@80000 { label = "fbkernel"; reg = <0x00080000 0x003c0000>; }; > > mtd3@440000 { label = "fbrootfs"; reg = <0x00440000 0x004e0000>; }; > > mtd4@920000 { label = "c_kernel"; reg = <0x00920000 0x003c0000>; }; > > mtd5@ce0000 { label = "c__atags"; reg = <0x00ce0000 0x00020000>; }; > > mtd6@d00000 { label = "c_rootfs"; reg = <0x00d00000 0x00300000>; }; > > mtd7@1000000 { label = "mender"; reg = <0x01000000 0x1f000000>; }; > > }; > > > > which is why, I assume, I'm getting these messages. Is there a UBI-friendly > > way to define them to avoid these messages? > > Hmm, maybe it makes sense to advertise it only once and not for each mtdblock device. Are there known bugs or issues using ubi/jffs2/squashfs on top of mtdblock? Is mtdblock being deprecated? If so I could certainly understand warning users of the situation. Is there a safe/easy way to update an older device in a way that wipes the entire flash while running from flash? If not then having the kernel perpetually advertising that I'm not using my flash a certain way isn't very useful, especially if there aren't any underlying reasons why my usage isn't valid.