Message ID | 20230622085349.573942-1-kah.jing.lee@intel.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp4937171vqr; Thu, 22 Jun 2023 02:32:45 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ56oCnSW9tWF283y0kNHXrfy+v6I/j6FGQTyZQa/5EtD3kR1aNj3DLOmazdSCe/P6C1feFb X-Received: by 2002:a17:90a:6f43:b0:25e:fb6d:ce68 with SMTP id d61-20020a17090a6f4300b0025efb6dce68mr17309635pjk.6.1687426365212; Thu, 22 Jun 2023 02:32:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687426365; cv=none; d=google.com; s=arc-20160816; b=SadLdEQ8DZ3Zq9GGy6RPhMnPCvq/SSWfpYbpbJrcATemWFZt2J3nOCzCltfx5Z5pA3 vtmh2phy6OyK9fQrgzgtYR8Rbyr/edpPKe3Gnq+gAzsmQqgf2l5vNkLkRENwSop3cpsm lGwiTy2WQTMRJe0x3Chafq9jhmbUMS4D+jczoLaTAyN05iKYlOSkXKR3Y8VxlGsTVyQY vffy4pAd2jtcSC2M2uTesyKcDOx6dS9j1jVOrJIf22lYYTiyRkWIbNuHvWuhn9MxIU8m YnPqyn0DXMJOEESqu+e02ukgkwLPQCZdHtuSoEpOfVZOTEk54rQIrRfiAikj73urNvFZ UlAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=yeNUTOQ+k25VaQ4BfYSt6MMOEpprPfCNSM729OXf7i8=; b=Yujysjmd4om1ANpfDzjGxZQd3ZrprP0arJgaBO+R+nOOqfzkCZL2zgdqiac5H52N+p UVgtIu4KEOJ5pzF1A9m/YvauFA7o7Zslfa6iQnJdAywoKMpOXSrxVkQecrkhpim/wwYF hQIkZZLeySt5N9gJIb7Z+XR1n/YztknpJU1YpfVS/sC8CrAh0px2v4oQ6qvaBkZX+tSg W1/YOd9mERV5MNDzmz13u3kB5ibopI8AU49dz3LXTzfxD1QCSSIEh4+5URNeUviYyKE/ ozHfSLrk4MiQo+gSR4qFMZuTLQG7TlcSNG/KL546MBVyhPqyHYyJSG+jhc4S/P5h81MB q9lw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=oDxYDEox; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a8-20020a17090ad80800b0024bccf6609dsi14124613pjv.114.2023.06.22.02.32.30; Thu, 22 Jun 2023 02:32:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=oDxYDEox; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231466AbjFVIzR (ORCPT <rfc822;maxin.john@gmail.com> + 99 others); Thu, 22 Jun 2023 04:55:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38280 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231483AbjFVIyn (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 22 Jun 2023 04:54:43 -0400 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9564D2126 for <linux-kernel@vger.kernel.org>; Thu, 22 Jun 2023 01:54:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1687424078; x=1718960078; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=Zx7iUd56gjTFG6wuRYinNxSOIWG+aGygrZmK9b7NGDg=; b=oDxYDEox2QTLRzYIw4E5p2IbOZwFtv+6MVoJpip7tqRN+xDVeNbsjzZ5 i7B66Y81vLxHR/MZr5EV9gSlLBzsWRbNnyUXewEOnn0Q+fij6AUKFBcsB w49hf/h6y8dLqLh3W6zUUNr0YwBANtdbBLfawbAJwuhNA6VPI+Noxba+L 5ZUsGMLwS1E0/fPUxMYI/JwcgHpaBVq7MmdTNhcj08jAHK11d3RYkfuCO UNObr0ltJtrPOsiwAeK5sRamVVSWHQTrQEkHpdxH4g9HMDuwpaQbNwyK+ /kRP8jIzXUoFMzQ+d9Jl2QiduZe4+oobxk3RnBDYdA6Ni+mWaOd6X0ekC w==; X-IronPort-AV: E=McAfee;i="6600,9927,10748"; a="446804338" X-IronPort-AV: E=Sophos;i="6.00,263,1681196400"; d="scan'208";a="446804338" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Jun 2023 01:54:36 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10748"; a="804704449" X-IronPort-AV: E=Sophos;i="6.00,263,1681196400"; d="scan'208";a="804704449" Received: from unknown (HELO localhost.localdomain) ([10.226.216.117]) by FMSMGA003.fm.intel.com with ESMTP; 22 Jun 2023 01:54:34 -0700 From: kah.jing.lee@intel.com To: Dinh Nguyen <dinguyen@kernel.org>, Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Conor Dooley <conor+dt@kernel.org>, Catalin Marinas <catalin.marinas@arm.com>, Will Deacon <will@kernel.org> Cc: linux-kernel@vger.kernel.org, Alif Zakuan Yuslaimi <alif.zakuan.yuslaimi@intel.com>, Kah Jing Lee <kah.jing.lee@intel.com> Subject: [PATCH 2/2] arch: arm64: configs: Enable UBI and UBIFS Date: Thu, 22 Jun 2023 16:53:49 +0800 Message-Id: <20230622085349.573942-1-kah.jing.lee@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1769394788131916226?= X-GMAIL-MSGID: =?utf-8?q?1769394788131916226?= |
Series |
[1/2] arch: arm64: boot: dts: Updated QSPI Flash layout for UBIFS
|
|
Commit Message
Lee, Kah Jing
June 22, 2023, 8:53 a.m. UTC
From: Alif Zakuan Yuslaimi <alif.zakuan.yuslaimi@intel.com> This patch is to enable UBI and UBIFS in Linux defconfig. Signed-off-by: Alif Zakuan Yuslaimi <alif.zakuan.yuslaimi@intel.com> Signed-off-by: Kah Jing Lee <kah.jing.lee@intel.com> --- arch/arm64/configs/defconfig | 2 ++ 1 file changed, 2 insertions(+)
Comments
On 22/06/2023 10:53, kah.jing.lee@intel.com wrote: > From: Alif Zakuan Yuslaimi <alif.zakuan.yuslaimi@intel.com> > > This patch is to enable UBI and UBIFS in Linux defconfig. Why? Which board needs it? It's quite unusual to have this on arm64... > > Signed-off-by: Alif Zakuan Yuslaimi <alif.zakuan.yuslaimi@intel.com> > Signed-off-by: Kah Jing Lee <kah.jing.lee@intel.com> > --- > arch/arm64/configs/defconfig | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig > index a24609e14d50..23a6ebcb1a9e 100644 > --- a/arch/arm64/configs/defconfig > +++ b/arch/arm64/configs/defconfig > @@ -470,6 +470,8 @@ CONFIG_IPMI_DEVICE_INTERFACE=m > CONFIG_IPMI_SI=m > CONFIG_HW_RANDOM=y > CONFIG_HW_RANDOM_VIRTIO=y > +CONFIG_MTD_UBI=y > +CONFIG_UBIFS_FS=y Not modules? Are you sure you added the lines in appropriate place (matching savedefconfig)? Best regards, Krzysztof
From: Lee, Kah Jing <kah.jing.lee@intel.com> > > > > > Signed-off-by: Alif Zakuan Yuslaimi <alif.zakuan.yuslaimi@intel.com> > > Signed-off-by: Kah Jing Lee <kah.jing.lee@intel.com> > > --- > > arch/arm64/configs/defconfig | 2 ++ > > 1 file changed, 2 insertions(+) > > > > diff --git a/arch/arm64/configs/defconfig > > b/arch/arm64/configs/defconfig index a24609e14d50..23a6ebcb1a9e > 100644 > > --- a/arch/arm64/configs/defconfig > > +++ b/arch/arm64/configs/defconfig > > @@ -470,6 +470,8 @@ CONFIG_IPMI_DEVICE_INTERFACE=m > CONFIG_IPMI_SI=m > > CONFIG_HW_RANDOM=y CONFIG_HW_RANDOM_VIRTIO=y > > +CONFIG_MTD_UBI=y > > +CONFIG_UBIFS_FS=y > > Not modules? Yes, we need to boot with rootfs with UBIFS. > > Are you sure you added the lines in appropriate place (matching > savedefconfig)? Updated in v2. > > > Best regards, > Krzysztof Thanks. Regards, Kah Jing
On 22/06/2023 14:21, kah.jing.lee@intel.com wrote: > From: Lee, Kah Jing <kah.jing.lee@intel.com> > >> You missed my questions. >>> >>> Signed-off-by: Alif Zakuan Yuslaimi <alif.zakuan.yuslaimi@intel.com> >>> Signed-off-by: Kah Jing Lee <kah.jing.lee@intel.com> >>> --- >>> arch/arm64/configs/defconfig | 2 ++ >>> 1 file changed, 2 insertions(+) >>> >>> diff --git a/arch/arm64/configs/defconfig >>> b/arch/arm64/configs/defconfig index a24609e14d50..23a6ebcb1a9e >> 100644 >>> --- a/arch/arm64/configs/defconfig >>> +++ b/arch/arm64/configs/defconfig >>> @@ -470,6 +470,8 @@ CONFIG_IPMI_DEVICE_INTERFACE=m >> CONFIG_IPMI_SI=m >>> CONFIG_HW_RANDOM=y CONFIG_HW_RANDOM_VIRTIO=y >>> +CONFIG_MTD_UBI=y >>> +CONFIG_UBIFS_FS=y >> >> Not modules? > Yes, we need to boot with rootfs with UBIFS. So you miss init ramdisk. Best regards, Krzysztof
> -----Original Message----- > From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> > Sent: Thursday, 22 June, 2023 8:49 PM > To: Lee, Kah Jing <kah.jing.lee@intel.com>; Dinh Nguyen > <dinguyen@kernel.org>; Rob Herring <robh+dt@kernel.org>; Krzysztof > Kozlowski <krzysztof.kozlowski+dt@linaro.org>; Conor Dooley > <conor+dt@kernel.org>; Catalin Marinas <catalin.marinas@arm.com>; Will > Deacon <will@kernel.org> > Cc: linux-kernel@vger.kernel.org > Subject: Re: [PATCH 2/2] arch: arm64: configs: Enable UBI and UBIFS > > On 22/06/2023 14:21, kah.jing.lee@intel.com wrote: > > From: Lee, Kah Jing <kah.jing.lee@intel.com> > > > >> > > You missed my questions. Sorry, the reply got truncated. > > On 22/06/2023 10:53, kah.jing.lee@intel.com wrote: > > From: Alif Zakuan Yuslaimi <alif.zakuan.yuslaimi@intel.com> > > > > This patch is to enable UBI and UBIFS in Linux defconfig. > Why? Which board needs it? It's quite unusual to have this on arm64... The ubifs settings is enabled for Agilex and Stratix10 socfpga platform with rootfs mounted from QSPI NOR. > >>> > >>> Signed-off-by: Alif Zakuan Yuslaimi <alif.zakuan.yuslaimi@intel.com> > >>> Signed-off-by: Kah Jing Lee <kah.jing.lee@intel.com> > >>> --- > >>> arch/arm64/configs/defconfig | 2 ++ > >>> 1 file changed, 2 insertions(+) > >>> > >>> diff --git a/arch/arm64/configs/defconfig > >>> b/arch/arm64/configs/defconfig index a24609e14d50..23a6ebcb1a9e > >> 100644 > >>> --- a/arch/arm64/configs/defconfig > >>> +++ b/arch/arm64/configs/defconfig > >>> @@ -470,6 +470,8 @@ CONFIG_IPMI_DEVICE_INTERFACE=m > >> CONFIG_IPMI_SI=m > >>> CONFIG_HW_RANDOM=y CONFIG_HW_RANDOM_VIRTIO=y > >>> +CONFIG_MTD_UBI=y > >>> +CONFIG_UBIFS_FS=y > >> > >> Not modules? > > Yes, we need to boot with rootfs with UBIFS. > > So you miss init ramdisk. Currently we are using the bootargs to mount the rootfs from QSPI NOR flash: [ 0.000000] Kernel command line: earlycon panic=-1 ubi.mtd=1 root=ubi0:rootfs rootfstype=ubifs rw rootwait Is it possible to mount the ubifs rootfs with the ubifs=m config during boot? Thanks. > > > > Best regards, > Krzysztof Thanks. Regards, Lee, Kah Jing
On 23/06/2023 12:03, Lee, Kah Jing wrote: >>>>> >>>>> Signed-off-by: Alif Zakuan Yuslaimi <alif.zakuan.yuslaimi@intel.com> >>>>> Signed-off-by: Kah Jing Lee <kah.jing.lee@intel.com> >>>>> --- >>>>> arch/arm64/configs/defconfig | 2 ++ >>>>> 1 file changed, 2 insertions(+) >>>>> >>>>> diff --git a/arch/arm64/configs/defconfig >>>>> b/arch/arm64/configs/defconfig index a24609e14d50..23a6ebcb1a9e >>>> 100644 >>>>> --- a/arch/arm64/configs/defconfig >>>>> +++ b/arch/arm64/configs/defconfig >>>>> @@ -470,6 +470,8 @@ CONFIG_IPMI_DEVICE_INTERFACE=m >>>> CONFIG_IPMI_SI=m >>>>> CONFIG_HW_RANDOM=y CONFIG_HW_RANDOM_VIRTIO=y >>>>> +CONFIG_MTD_UBI=y >>>>> +CONFIG_UBIFS_FS=y >>>> >>>> Not modules? >>> Yes, we need to boot with rootfs with UBIFS. >> >> So you miss init ramdisk. > Currently we are using the bootargs to mount the rootfs from QSPI NOR flash: > [ 0.000000] Kernel command line: earlycon panic=-1 ubi.mtd=1 root=ubi0:rootfs rootfstype=ubifs rw rootwait > Is it possible to mount the ubifs rootfs with the ubifs=m config during boot? I think yes. rootfs devices are for example modules, so filesystem can be as well. Best regards, Krzysztof
> -----Original Message----- > From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> > Sent: Friday, 23 June, 2023 6:18 PM > To: Lee, Kah Jing <kah.jing.lee@intel.com>; Dinh Nguyen > <dinguyen@kernel.org>; Rob Herring <robh+dt@kernel.org>; Krzysztof > Kozlowski <krzysztof.kozlowski+dt@linaro.org>; Conor Dooley > <conor+dt@kernel.org>; Catalin Marinas <catalin.marinas@arm.com>; Will > Deacon <will@kernel.org> > Cc: linux-kernel@vger.kernel.org > Subject: Re: [PATCH 2/2] arch: arm64: configs: Enable UBI and UBIFS > > On 23/06/2023 12:03, Lee, Kah Jing wrote: > >>>>> > >>>>> Signed-off-by: Alif Zakuan Yuslaimi > >>>>> <alif.zakuan.yuslaimi@intel.com> > >>>>> Signed-off-by: Kah Jing Lee <kah.jing.lee@intel.com> > >>>>> --- > >>>>> arch/arm64/configs/defconfig | 2 ++ > >>>>> 1 file changed, 2 insertions(+) > >>>>> > >>>>> diff --git a/arch/arm64/configs/defconfig > >>>>> b/arch/arm64/configs/defconfig index a24609e14d50..23a6ebcb1a9e > >>>> 100644 > >>>>> --- a/arch/arm64/configs/defconfig > >>>>> +++ b/arch/arm64/configs/defconfig > >>>>> @@ -470,6 +470,8 @@ CONFIG_IPMI_DEVICE_INTERFACE=m > >>>> CONFIG_IPMI_SI=m > >>>>> CONFIG_HW_RANDOM=y CONFIG_HW_RANDOM_VIRTIO=y > >>>>> +CONFIG_MTD_UBI=y > >>>>> +CONFIG_UBIFS_FS=y > >>>> > >>>> Not modules? > >>> Yes, we need to boot with rootfs with UBIFS. > >> > >> So you miss init ramdisk. > > Currently we are using the bootargs to mount the rootfs from QSPI NOR > flash: > > [ 0.000000] Kernel command line: earlycon panic=-1 ubi.mtd=1 > root=ubi0:rootfs rootfstype=ubifs rw rootwait > > Is it possible to mount the ubifs rootfs with the ubifs=m config during boot? > > I think yes. rootfs devices are for example modules, so filesystem can be as > well. Was going through mtd ubifs page - http://www.linux-mtd.infradead.org/faq/ubifs.html Quoted: 'In order to mount UBIFS as the root file system, you have to compile UBIFS into the kernel (instead of compiling it as a kernel module) and specify proper kernel boot arguments and make the kernel mount UBIFS on boot.' It seems like we need UBIFS config to be compiled as kernel built-in. The kernel module would work if we mounted UBIFS as filesystem device after rootfs mounted, but not as rootfs. Let me know if that understanding is correct. Thanks. > > > Best regards, > Krzysztof Regards, Lee, Kah Jing
On 24/06/2023 05:42, Lee, Kah Jing wrote: >>>> So you miss init ramdisk. >>> Currently we are using the bootargs to mount the rootfs from QSPI NOR >> flash: >>> [ 0.000000] Kernel command line: earlycon panic=-1 ubi.mtd=1 >> root=ubi0:rootfs rootfstype=ubifs rw rootwait >>> Is it possible to mount the ubifs rootfs with the ubifs=m config during boot? >> >> I think yes. rootfs devices are for example modules, so filesystem can be as >> well. > Was going through mtd ubifs page - http://www.linux-mtd.infradead.org/faq/ubifs.html > Quoted: 'In order to mount UBIFS as the root file system, you have to compile > UBIFS into the kernel (instead of compiling it as a kernel module) and specify > proper kernel boot arguments and make the kernel mount UBIFS on boot.' Why? Module loaded by initramfs would also understand cmdline arguments, right? Best regards, Krzysztof
> -----Original Message----- > From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> > Sent: Saturday, 24 June, 2023 3:30 PM > To: Lee, Kah Jing <kah.jing.lee@intel.com>; Dinh Nguyen > <dinguyen@kernel.org>; Rob Herring <robh+dt@kernel.org>; Krzysztof > Kozlowski <krzysztof.kozlowski+dt@linaro.org>; Conor Dooley > <conor+dt@kernel.org>; Catalin Marinas <catalin.marinas@arm.com>; Will > Deacon <will@kernel.org> > Cc: linux-kernel@vger.kernel.org > Subject: Re: [PATCH 2/2] arch: arm64: configs: Enable UBI and UBIFS > > On 24/06/2023 05:42, Lee, Kah Jing wrote: > >>>> So you miss init ramdisk. > >>> Currently we are using the bootargs to mount the rootfs from QSPI > >>> NOR > >> flash: > >>> [ 0.000000] Kernel command line: earlycon panic=-1 ubi.mtd=1 > >> root=ubi0:rootfs rootfstype=ubifs rw rootwait > >>> Is it possible to mount the ubifs rootfs with the ubifs=m config during > boot? > >> > >> I think yes. rootfs devices are for example modules, so filesystem > >> can be as well. > > Was going through mtd ubifs page - > > http://www.linux-mtd.infradead.org/faq/ubifs.html > > Quoted: 'In order to mount UBIFS as the root file system, you have to > > compile UBIFS into the kernel (instead of compiling it as a kernel > > module) and specify proper kernel boot arguments and make the kernel > mount UBIFS on boot.' > > Why? Module loaded by initramfs would also understand cmdline arguments, > right? The suggestion is to use initramfs for rootfs -> remount UBIFS as chroot? The concern is additional initrd image and steps to store in the limited NOR flash (256MB, Boot data + Uboot - ~66MB, UBIFS image - ~88MB, kernel.itb - ~10MB = 164MB). With the mounting Rootfs from UBIFS volume, we can skip the initrd step, and save some space for the user operations. Let me know if I understands that correctly. > > Best regards, > Krzysztof Thanks. Regards, Lee, Kah Jing
On 26/06/2023 06:16, Lee, Kah Jing wrote: >> -----Original Message----- >> From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> >> Sent: Saturday, 24 June, 2023 3:30 PM >> To: Lee, Kah Jing <kah.jing.lee@intel.com>; Dinh Nguyen >> <dinguyen@kernel.org>; Rob Herring <robh+dt@kernel.org>; Krzysztof >> Kozlowski <krzysztof.kozlowski+dt@linaro.org>; Conor Dooley >> <conor+dt@kernel.org>; Catalin Marinas <catalin.marinas@arm.com>; Will >> Deacon <will@kernel.org> >> Cc: linux-kernel@vger.kernel.org >> Subject: Re: [PATCH 2/2] arch: arm64: configs: Enable UBI and UBIFS >> >> On 24/06/2023 05:42, Lee, Kah Jing wrote: >>>>>> So you miss init ramdisk. >>>>> Currently we are using the bootargs to mount the rootfs from QSPI >>>>> NOR >>>> flash: >>>>> [ 0.000000] Kernel command line: earlycon panic=-1 ubi.mtd=1 >>>> root=ubi0:rootfs rootfstype=ubifs rw rootwait >>>>> Is it possible to mount the ubifs rootfs with the ubifs=m config during >> boot? >>>> >>>> I think yes. rootfs devices are for example modules, so filesystem >>>> can be as well. >>> Was going through mtd ubifs page - >>> http://www.linux-mtd.infradead.org/faq/ubifs.html >>> Quoted: 'In order to mount UBIFS as the root file system, you have to >>> compile UBIFS into the kernel (instead of compiling it as a kernel >>> module) and specify proper kernel boot arguments and make the kernel >> mount UBIFS on boot.' >> >> Why? Module loaded by initramfs would also understand cmdline arguments, >> right? > The suggestion is to use initramfs for rootfs -> remount UBIFS as chroot? > The concern is additional initrd image and steps to store in the > limited NOR flash (256MB, Boot data + Uboot - ~66MB, UBIFS image - ~88MB, > kernel.itb - ~10MB = 164MB). > With the mounting Rootfs from UBIFS volume, we can skip the initrd step, and > save some space for the user operations. > Let me know if I understands that correctly. arm64 defconfig creates huge development config for all platforms, so why would you ever use it in resource-constrained system? It would barely fit. defconfig modules take 50 MB alone and you don't need most of them. I think you misunderstood the purpose of this defconfig and now try to apply some arguments for different use cases. Best regards, Krzysztof
> -----Original Message----- > From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> > Sent: Monday, 26 June, 2023 4:39 PM > To: Lee, Kah Jing <kah.jing.lee@intel.com>; Dinh Nguyen > <dinguyen@kernel.org>; Rob Herring <robh+dt@kernel.org>; Krzysztof > Kozlowski <krzysztof.kozlowski+dt@linaro.org>; Conor Dooley > <conor+dt@kernel.org>; Catalin Marinas <catalin.marinas@arm.com>; Will > Deacon <will@kernel.org> > Cc: linux-kernel@vger.kernel.org > Subject: Re: [PATCH 2/2] arch: arm64: configs: Enable UBI and UBIFS > > On 26/06/2023 06:16, Lee, Kah Jing wrote: > >> -----Original Message----- > >> From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> > >> Sent: Saturday, 24 June, 2023 3:30 PM > >> To: Lee, Kah Jing <kah.jing.lee@intel.com>; Dinh Nguyen > >> <dinguyen@kernel.org>; Rob Herring <robh+dt@kernel.org>; Krzysztof > >> Kozlowski <krzysztof.kozlowski+dt@linaro.org>; Conor Dooley > >> <conor+dt@kernel.org>; Catalin Marinas <catalin.marinas@arm.com>; > >> Will Deacon <will@kernel.org> > >> Cc: linux-kernel@vger.kernel.org > >> Subject: Re: [PATCH 2/2] arch: arm64: configs: Enable UBI and UBIFS > >> > >> On 24/06/2023 05:42, Lee, Kah Jing wrote: > >>>>>> So you miss init ramdisk. > >>>>> Currently we are using the bootargs to mount the rootfs from QSPI > >>>>> NOR > >>>> flash: > >>>>> [ 0.000000] Kernel command line: earlycon panic=-1 ubi.mtd=1 > >>>> root=ubi0:rootfs rootfstype=ubifs rw rootwait > >>>>> Is it possible to mount the ubifs rootfs with the ubifs=m config > >>>>> during > >> boot? > >>>> > >>>> I think yes. rootfs devices are for example modules, so filesystem > >>>> can be as well. > >>> Was going through mtd ubifs page - > >>> http://www.linux-mtd.infradead.org/faq/ubifs.html > >>> Quoted: 'In order to mount UBIFS as the root file system, you have > >>> to compile UBIFS into the kernel (instead of compiling it as a > >>> kernel > >>> module) and specify proper kernel boot arguments and make the kernel > >> mount UBIFS on boot.' > >> > >> Why? Module loaded by initramfs would also understand cmdline > >> arguments, right? > > The suggestion is to use initramfs for rootfs -> remount UBIFS as chroot? > > The concern is additional initrd image and steps to store in the > > limited NOR flash (256MB, Boot data + Uboot - ~66MB, UBIFS image - > > ~88MB, kernel.itb - ~10MB = 164MB). > > With the mounting Rootfs from UBIFS volume, we can skip the initrd > > step, and save some space for the user operations. > > Let me know if I understands that correctly. > > arm64 defconfig creates huge development config for all platforms, so why > would you ever use it in resource-constrained system? It would barely fit. > defconfig modules take 50 MB alone and you don't need most of them. > > I think you misunderstood the purpose of this defconfig and now try to apply > some arguments for different use cases. Understood the point. In this case, I would drop this defconfig patch, and document it for customers to enable through menuconfig. Will proceed to send the v3 for only dts changes. Thanks for the time. > > Best regards, > Krzysztof Regards, Lee, Kah Jing
On 6/26/23 22:40, Lee, Kah Jing wrote: >> -----Original Message----- >> From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> >> Sent: Monday, 26 June, 2023 4:39 PM >> To: Lee, Kah Jing <kah.jing.lee@intel.com>; Dinh Nguyen >> <dinguyen@kernel.org>; Rob Herring <robh+dt@kernel.org>; Krzysztof >> Kozlowski <krzysztof.kozlowski+dt@linaro.org>; Conor Dooley >> <conor+dt@kernel.org>; Catalin Marinas <catalin.marinas@arm.com>; Will >> Deacon <will@kernel.org> >> Cc: linux-kernel@vger.kernel.org >> Subject: Re: [PATCH 2/2] arch: arm64: configs: Enable UBI and UBIFS >> >> On 26/06/2023 06:16, Lee, Kah Jing wrote: >>>> -----Original Message----- >>>> From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> >>>> Sent: Saturday, 24 June, 2023 3:30 PM >>>> To: Lee, Kah Jing <kah.jing.lee@intel.com>; Dinh Nguyen >>>> <dinguyen@kernel.org>; Rob Herring <robh+dt@kernel.org>; Krzysztof >>>> Kozlowski <krzysztof.kozlowski+dt@linaro.org>; Conor Dooley >>>> <conor+dt@kernel.org>; Catalin Marinas <catalin.marinas@arm.com>; >>>> Will Deacon <will@kernel.org> >>>> Cc: linux-kernel@vger.kernel.org >>>> Subject: Re: [PATCH 2/2] arch: arm64: configs: Enable UBI and UBIFS >>>> >>>> On 24/06/2023 05:42, Lee, Kah Jing wrote: >>>>>>>> So you miss init ramdisk. >>>>>>> Currently we are using the bootargs to mount the rootfs from QSPI >>>>>>> NOR >>>>>> flash: >>>>>>> [ 0.000000] Kernel command line: earlycon panic=-1 ubi.mtd=1 >>>>>> root=ubi0:rootfs rootfstype=ubifs rw rootwait >>>>>>> Is it possible to mount the ubifs rootfs with the ubifs=m config >>>>>>> during >>>> boot? >>>>>> >>>>>> I think yes. rootfs devices are for example modules, so filesystem >>>>>> can be as well. >>>>> Was going through mtd ubifs page - >>>>> http://www.linux-mtd.infradead.org/faq/ubifs.html >>>>> Quoted: 'In order to mount UBIFS as the root file system, you have >>>>> to compile UBIFS into the kernel (instead of compiling it as a >>>>> kernel >>>>> module) and specify proper kernel boot arguments and make the kernel >>>> mount UBIFS on boot.' >>>> >>>> Why? Module loaded by initramfs would also understand cmdline >>>> arguments, right? >>> The suggestion is to use initramfs for rootfs -> remount UBIFS as chroot? >>> The concern is additional initrd image and steps to store in the >>> limited NOR flash (256MB, Boot data + Uboot - ~66MB, UBIFS image - >>> ~88MB, kernel.itb - ~10MB = 164MB). >>> With the mounting Rootfs from UBIFS volume, we can skip the initrd >>> step, and save some space for the user operations. >>> Let me know if I understands that correctly. >> >> arm64 defconfig creates huge development config for all platforms, so why >> would you ever use it in resource-constrained system? It would barely fit. >> defconfig modules take 50 MB alone and you don't need most of them. >> >> I think you misunderstood the purpose of this defconfig and now try to apply >> some arguments for different use cases. > Understood the point. In this case, I would drop this defconfig patch, and > document it for customers to enable through menuconfig. > > Will proceed to send the v3 for only dts changes. > Thanks for the time. >> You can still have the defconfig build them as modules. Then you can include them in your initramfs. Dinh
> >>>> On 24/06/2023 05:42, Lee, Kah Jing wrote: > >>>>>>>> So you miss init ramdisk. > >>>>>>> Currently we are using the bootargs to mount the rootfs from > >>>>>>> QSPI NOR > >>>>>> flash: > >>>>>>> [ 0.000000] Kernel command line: earlycon panic=-1 ubi.mtd=1 > >>>>>> root=ubi0:rootfs rootfstype=ubifs rw rootwait > >>>>>>> Is it possible to mount the ubifs rootfs with the ubifs=m config > >>>>>>> during > >>>> boot? > >>>>>> > >>>>>> I think yes. rootfs devices are for example modules, so > >>>>>> filesystem can be as well. > >>>>> Was going through mtd ubifs page - > >>>>> http://www.linux-mtd.infradead.org/faq/ubifs.html > >>>>> Quoted: 'In order to mount UBIFS as the root file system, you have > >>>>> to compile UBIFS into the kernel (instead of compiling it as a > >>>>> kernel > >>>>> module) and specify proper kernel boot arguments and make the > >>>>> kernel > >>>> mount UBIFS on boot.' > >>>> > >>>> Why? Module loaded by initramfs would also understand cmdline > >>>> arguments, right? > >>> The suggestion is to use initramfs for rootfs -> remount UBIFS as chroot? > >>> The concern is additional initrd image and steps to store in the > >>> limited NOR flash (256MB, Boot data + Uboot - ~66MB, UBIFS image - > >>> ~88MB, kernel.itb - ~10MB = 164MB). > >>> With the mounting Rootfs from UBIFS volume, we can skip the initrd > >>> step, and save some space for the user operations. > >>> Let me know if I understands that correctly. > >> > >> arm64 defconfig creates huge development config for all platforms, so > >> why would you ever use it in resource-constrained system? It would > barely fit. > >> defconfig modules take 50 MB alone and you don't need most of them. > >> > >> I think you misunderstood the purpose of this defconfig and now try > >> to apply some arguments for different use cases. > > Understood the point. In this case, I would drop this defconfig patch, > > and document it for customers to enable through menuconfig. > > > > Will proceed to send the v3 for only dts changes. > > Thanks for the time. > >> > > You can still have the defconfig build them as modules. Then you can include > them in your initramfs. Understood, but we can maintain it as the wiki steps since previously for JFFS2 is part of the rocketboard page for users to follow to enable from menuconfig. Thanks. > > Dinh Regards, Lee, Kah Jing
diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig index a24609e14d50..23a6ebcb1a9e 100644 --- a/arch/arm64/configs/defconfig +++ b/arch/arm64/configs/defconfig @@ -470,6 +470,8 @@ CONFIG_IPMI_DEVICE_INTERFACE=m CONFIG_IPMI_SI=m CONFIG_HW_RANDOM=y CONFIG_HW_RANDOM_VIRTIO=y +CONFIG_MTD_UBI=y +CONFIG_UBIFS_FS=y CONFIG_TCG_TPM=y CONFIG_TCG_TIS=m CONFIG_TCG_TIS_SPI=m