Welcome! Log In Create A New Profile

Advanced

No mtd block devices under Linux Kernel 5.17.4 Kirkwood

Posted by schnee 
No mtd block devices under Linux Kernel 5.17.4 Kirkwood
June 11, 2022 11:48AM
Hi,

Yesterday I upgraded one of my Pogo V4 box to the latest 5.17.4 kernel. When i tried to mount the mtd block devices i received an error, that it does not exists. Looking into the dev list they are indeed missing:

root@server:~# uname -r
5.17.4-kirkwood-tld-1
root@server:~# ls /dev/m*
/dev/mem  /dev/mtd0  /dev/mtd0ro  /dev/mtd1  /dev/mtd1ro

When i downgrade the kernel to 5.15.5 everything works as expected
root@server:~# uname -r
5.15.5-kirkwood-tld-1
root@server:~# ls /dev/m*
/dev/mem  /dev/mtd0  /dev/mtd0ro  /dev/mtd1  /dev/mtd1ro  /dev/mtdblock0  /dev/mtdblock1

I did not try kernel 5.16.5 due to the mentioned USB issues.

What can cause this issue?

The box is on Debian 10:
root@server:~# cat /etc/debian_version 
10.12

Thanks

Schnee



Edited 2 time(s). Last edit at 06/11/2022 11:50AM by schnee.
Re: No mtd block devices under Linux Kernel 5.17.4 Kirkwood
June 11, 2022 03:14PM
Hi Schnee,

The MTD block was reconfigured to loadable module. It has been giving misleading scary messages for some boxes, so I decided to change it to loadable module.

Quote

Kernel linux-5.16.5-kirkwood-tld-1 package has been uploaded. The following features were added/updated:

- General kernel upgrade
- Add supports for CTera C200 V1 box.
- Move MTD block devices to loadable module.

So load it as a test:
modprobe mtdblock

And later add it to /etc/initramfs-tools/modules to load it when booting.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)



Edited 2 time(s). Last edit at 06/11/2022 03:21PM by bodhi.
Re: No mtd block devices under Linux Kernel 5.17.4 Kirkwood
June 11, 2022 07:11PM
I guess i should read the release notes next time more carefully.... I just read the red USB warning

I added the module to /etc/initramfs-tools/modules, then regenerated the initrd file:
cd boot
update-initramfs -u
mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initramfs-5.17.4-kirkwood-tld-1 -d initrd.img-5.17.4-kirkwood-tld-1 uInitrd

Now everything works fine.

I see a notice during boot
[  T159] mtdblock: MTD device 'u-boot' is NAND, please consider using UBI block devices instead.
[  T159] mtdblock: MTD device 'data' is NAND, please consider using UBI block devices instead.
but otherwise everything is clean.

Thanks

Schnee
Re: No mtd block devices under Linux Kernel 5.17.4 Kirkwood
June 11, 2022 08:03PM
Hi Schnee,

[  T159] mtdblock: MTD device 'u-boot' is NAND, please consider using UBI block devices instead.

That's OK. Only a warning to recommend people to move on to UBIFS, instead of JFFS2 (the old default).

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: