2023-06-22 09:31:54

by Lee, Kah Jing

[permalink] [raw]
Subject: [PATCH 2/2] arch: arm64: configs: Enable UBI and UBIFS

From: Alif Zakuan Yuslaimi <[email protected]>

This patch is to enable UBI and UBIFS in Linux defconfig.

Signed-off-by: Alif Zakuan Yuslaimi <[email protected]>
Signed-off-by: Kah Jing Lee <[email protected]>
---
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
CONFIG_TCG_TPM=y
CONFIG_TCG_TIS=m
CONFIG_TCG_TIS_SPI=m
--
2.25.1



2023-06-22 09:57:10

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH 2/2] arch: arm64: configs: Enable UBI and UBIFS

On 22/06/2023 10:53, [email protected] wrote:
> From: Alif Zakuan Yuslaimi <[email protected]>
>
> 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 <[email protected]>
> Signed-off-by: Kah Jing Lee <[email protected]>
> ---
> 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


2023-06-22 12:59:41

by Lee, Kah Jing

[permalink] [raw]
Subject: Re: [PATCH 2/2] arch: arm64: configs: Enable UBI and UBIFS

From: Lee, Kah Jing <[email protected]>

>
> >
> > Signed-off-by: Alif Zakuan Yuslaimi <[email protected]>
> > Signed-off-by: Kah Jing Lee <[email protected]>
> > ---
> > 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

2023-06-22 13:15:56

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH 2/2] arch: arm64: configs: Enable UBI and UBIFS

On 22/06/2023 14:21, [email protected] wrote:
> From: Lee, Kah Jing <[email protected]>
>
>>

You missed my questions.

>>>
>>> Signed-off-by: Alif Zakuan Yuslaimi <[email protected]>
>>> Signed-off-by: Kah Jing Lee <[email protected]>
>>> ---
>>> 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


2023-06-23 10:06:05

by Lee, Kah Jing

[permalink] [raw]
Subject: RE: [PATCH 2/2] arch: arm64: configs: Enable UBI and UBIFS

> -----Original Message-----
> From: Krzysztof Kozlowski <[email protected]>
> Sent: Thursday, 22 June, 2023 8:49 PM
> To: Lee, Kah Jing <[email protected]>; Dinh Nguyen
> <[email protected]>; Rob Herring <[email protected]>; Krzysztof
> Kozlowski <[email protected]>; Conor Dooley
> <[email protected]>; Catalin Marinas <[email protected]>; Will
> Deacon <[email protected]>
> Cc: [email protected]
> Subject: Re: [PATCH 2/2] arch: arm64: configs: Enable UBI and UBIFS
>
> On 22/06/2023 14:21, [email protected] wrote:
> > From: Lee, Kah Jing <[email protected]>
> >
> >>
>
> You missed my questions.
Sorry, the reply got truncated.

> > On 22/06/2023 10:53, [email protected] wrote:
> > From: Alif Zakuan Yuslaimi <[email protected]>
> >
> > 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 <[email protected]>
> >>> Signed-off-by: Kah Jing Lee <[email protected]>
> >>> ---
> >>> 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



2023-06-23 10:29:22

by Krzysztof Kozlowski

[permalink] [raw]
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 <[email protected]>
>>>>> Signed-off-by: Kah Jing Lee <[email protected]>
>>>>> ---
>>>>> 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


2023-06-24 04:16:37

by Lee, Kah Jing

[permalink] [raw]
Subject: RE: [PATCH 2/2] arch: arm64: configs: Enable UBI and UBIFS

> -----Original Message-----
> From: Krzysztof Kozlowski <[email protected]>
> Sent: Friday, 23 June, 2023 6:18 PM
> To: Lee, Kah Jing <[email protected]>; Dinh Nguyen
> <[email protected]>; Rob Herring <[email protected]>; Krzysztof
> Kozlowski <[email protected]>; Conor Dooley
> <[email protected]>; Catalin Marinas <[email protected]>; Will
> Deacon <[email protected]>
> Cc: [email protected]
> 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
> >>>>> <[email protected]>
> >>>>> Signed-off-by: Kah Jing Lee <[email protected]>
> >>>>> ---
> >>>>> 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


2023-06-24 07:50:59

by Krzysztof Kozlowski

[permalink] [raw]
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?

Best regards,
Krzysztof


2023-06-26 04:27:36

by Lee, Kah Jing

[permalink] [raw]
Subject: RE: [PATCH 2/2] arch: arm64: configs: Enable UBI and UBIFS

> -----Original Message-----
> From: Krzysztof Kozlowski <[email protected]>
> Sent: Saturday, 24 June, 2023 3:30 PM
> To: Lee, Kah Jing <[email protected]>; Dinh Nguyen
> <[email protected]>; Rob Herring <[email protected]>; Krzysztof
> Kozlowski <[email protected]>; Conor Dooley
> <[email protected]>; Catalin Marinas <[email protected]>; Will
> Deacon <[email protected]>
> Cc: [email protected]
> 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


2023-06-26 09:02:11

by Krzysztof Kozlowski

[permalink] [raw]
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 <[email protected]>
>> Sent: Saturday, 24 June, 2023 3:30 PM
>> To: Lee, Kah Jing <[email protected]>; Dinh Nguyen
>> <[email protected]>; Rob Herring <[email protected]>; Krzysztof
>> Kozlowski <[email protected]>; Conor Dooley
>> <[email protected]>; Catalin Marinas <[email protected]>; Will
>> Deacon <[email protected]>
>> Cc: [email protected]
>> 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


2023-06-27 04:16:37

by Lee, Kah Jing

[permalink] [raw]
Subject: RE: [PATCH 2/2] arch: arm64: configs: Enable UBI and UBIFS

> -----Original Message-----
> From: Krzysztof Kozlowski <[email protected]>
> Sent: Monday, 26 June, 2023 4:39 PM
> To: Lee, Kah Jing <[email protected]>; Dinh Nguyen
> <[email protected]>; Rob Herring <[email protected]>; Krzysztof
> Kozlowski <[email protected]>; Conor Dooley
> <[email protected]>; Catalin Marinas <[email protected]>; Will
> Deacon <[email protected]>
> Cc: [email protected]
> 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 <[email protected]>
> >> Sent: Saturday, 24 June, 2023 3:30 PM
> >> To: Lee, Kah Jing <[email protected]>; Dinh Nguyen
> >> <[email protected]>; Rob Herring <[email protected]>; Krzysztof
> >> Kozlowski <[email protected]>; Conor Dooley
> >> <[email protected]>; Catalin Marinas <[email protected]>;
> >> Will Deacon <[email protected]>
> >> Cc: [email protected]
> >> 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

2023-06-27 05:53:47

by Dinh Nguyen

[permalink] [raw]
Subject: Re: [PATCH 2/2] arch: arm64: configs: Enable UBI and UBIFS



On 6/26/23 22:40, Lee, Kah Jing wrote:
>> -----Original Message-----
>> From: Krzysztof Kozlowski <[email protected]>
>> Sent: Monday, 26 June, 2023 4:39 PM
>> To: Lee, Kah Jing <[email protected]>; Dinh Nguyen
>> <[email protected]>; Rob Herring <[email protected]>; Krzysztof
>> Kozlowski <[email protected]>; Conor Dooley
>> <[email protected]>; Catalin Marinas <[email protected]>; Will
>> Deacon <[email protected]>
>> Cc: [email protected]
>> 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 <[email protected]>
>>>> Sent: Saturday, 24 June, 2023 3:30 PM
>>>> To: Lee, Kah Jing <[email protected]>; Dinh Nguyen
>>>> <[email protected]>; Rob Herring <[email protected]>; Krzysztof
>>>> Kozlowski <[email protected]>; Conor Dooley
>>>> <[email protected]>; Catalin Marinas <[email protected]>;
>>>> Will Deacon <[email protected]>
>>>> Cc: [email protected]
>>>> 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

2023-07-03 04:10:47

by Lee, Kah Jing

[permalink] [raw]
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.
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