RE: [PATCH 2/2] arch: arm64: configs: Enable UBI and UBIFS
From: Lee, Kah Jing
Date: Fri Jun 23 2023 - 23:42:39 EST
> -----Original Message-----
> From: Krzysztof Kozlowski <krzysztof.kozlowski@xxxxxxxxxx>
> Sent: Friday, 23 June, 2023 6:18 PM
> To: Lee, Kah Jing <kah.jing.lee@xxxxxxxxx>; Dinh Nguyen
> <dinguyen@xxxxxxxxxx>; Rob Herring <robh+dt@xxxxxxxxxx>; Krzysztof
> Kozlowski <krzysztof.kozlowski+dt@xxxxxxxxxx>; Conor Dooley
> <conor+dt@xxxxxxxxxx>; Catalin Marinas <catalin.marinas@xxxxxxx>; Will
> Deacon <will@xxxxxxxxxx>
> Cc: linux-kernel@xxxxxxxxxxxxxxx
> 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@xxxxxxxxx>
> >>>>> Signed-off-by: Kah Jing Lee <kah.jing.lee@xxxxxxxxx>
> >>>>> ---
> >>>>> 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