The /dev/nand device is missing from rootfs install Jan 24th

This forum is for supported devices using an ARMv7 Allwinner SoC.

The /dev/nand device is missing from rootfs install Jan 24th

Postby starfry » Thu Jan 29, 2015 4:26 pm

I've noticed that the /dev/nand device is missing from the latest install image for the Cubieboard 2

I have just tried the one with MD5 "ee5c0bfc7f5539720585940f9ec63aa7" and filename "ArchLinuxARM-2015.01-sun7i-rootfs.tar.gz" or "ArchLinuxARM-sun7i-latest.tar.gz". There is no "/dev/nand". I followed the instructions here.

There are some kernel errors in the boot log

$this->bbcode_second_pass_code('', '
[ 1.552127] loop: module loaded
Division by zero in kernel.
[ 1.557846] Division by zero in kernel.
[<c0012eb4>] (unwind_backtrace+0x0/0xdc) from [<c01ed6f8>] (Ldiv0+0x8/0x10)
[ 1.568397] [<c0012eb4>] (unwind_backtrace+0x0/0xdc) from [<c01ed6f8>] (Ldiv0+0x8/0x10)
[<c01ed6f8>] (Ldiv0+0x8/0x10) from [<c026214c>] (get_cmu_clk+0x28/0x3c)
[ 1.582760] [<c01ed6f8>] (Ldiv0+0x8/0x10) from [<c026214c>] (get_cmu_clk+0x28/0x3c)
[<c026214c>] (get_cmu_clk+0x28/0x3c) from [<c026217c>] (set_nand_clock+0x1c/0x78)
[ 1.597634] [<c026214c>] (get_cmu_clk+0x28/0x3c) from [<c026217c>] (set_nand_clock+0x1c/0x78)
[<c026217c>] (set_nand_clock+0x1c/0x78) from [<c05e92ec>] (nand_init+0x4c/0x1a4)
[ 1.613304] [<c026217c>] (set_nand_clock+0x1c/0x78) from [<c05e92ec>] (nand_init+0x4c/0x1a4)
[<c05e92ec>] (nand_init+0x4c/0x1a4) from [<c0008638>] (do_one_initcall+0x8c/0x150)
[ 1.629044] [<c05e92ec>] (nand_init+0x4c/0x1a4) from [<c0008638>] (do_one_initcall+0x8c/0x150)
[<c0008638>] (do_one_initcall+0x8c/0x150) from [<c05d59d8>] (kernel_init+0x158/0x218)
[ 1.645219] [<c0008638>] (do_one_initcall+0x8c/0x150) from [<c05d59d8>] (kernel_init+0x158/0x218)
[<c05d59d8>] (kernel_init+0x158/0x218) from [<c000e3b4>] (kernel_thread_exit+0x0/0x8)
[ 1.661652] [<c05d59d8>] (kernel_init+0x158/0x218) from [<c000e3b4>] (kernel_thread_exit+0x0/0x8)
[NAND] nand driver version: 0x2 0x9
[ 1.673855] [NAND] nand driver version: 0x2 0x9
[SCAN_ERR] search nand physical architecture parameter failed!
[ 1.685265] [SCAN_ERR] search nand physical architecture parameter failed!
[NAND]init_blklayer fail
[ 1.694495] [NAND]init_blklayer fail
')

If I try the prior version, one with MD5 "291d118d2a06787aebd5749c01ade6bf" and filename "ArchLinuxARM-sun7i-latest.tar.gz", it works fine. The "/dev/nand" is there. I followed these instructions.

Is this a known problem or could I have done something wrong?
starfry
 
Posts: 24
Joined: Wed Jul 18, 2012 7:24 pm

Re: The /dev/nand device is missing from rootfs install Jan

Postby WarheadsSE » Thu Jan 29, 2015 4:29 pm

Compare kernel versions, and verify the source of the kernel in use.
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: The /dev/nand device is missing from rootfs install Jan

Postby starfry » Thu Jan 29, 2015 4:45 pm

This is striaght from the ArchLinuxARM downloads, no tinkering whatsoever.

$this->bbcode_second_pass_code('', '
$ uname -a
Linux alarm 3.4.103-5-ARCH #1 SMP PREEMPT Fri Jan 16 06:34:00 MST 2015 armv7l GNU/Linux
$ md5sum /boot/uImage
47f7efac3cc408e8614b778580e076ad /boot/uImage
$ md5sum ArchLinuxARM-2015.01-sun7i-rootfs/boot/uImage
47f7efac3cc408e8614b778580e076ad ArchLinuxARM-2015.01-sun7i-rootfs/boot/uImage
')
starfry
 
Posts: 24
Joined: Wed Jul 18, 2012 7:24 pm

Re: The /dev/nand device is missing from rootfs install Jan

Postby WarheadsSE » Thu Jan 29, 2015 7:58 pm

pacman -Qs linux-sun
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: The /dev/nand device is missing from rootfs install Jan

Postby ElwoodG » Fri Jan 30, 2015 5:01 pm

Hi,

it seems to me the issue is somehow u-boot related.
I have the same problem on my cubieTruck.
Exactly the same error message in the kernel.
Luckily I have an old boot installation on the nand.
So ejecting the mmc, starting to boot, then reinsert it works like a charm and 3.4.103-5 comes up.
Is it possible that the current uboot would need to initialise that nand and doesn't?
I also saw that there is no boot_nand besides mmc, tftp etc…

Konstantin
ElwoodG
 
Posts: 10
Joined: Sun Mar 23, 2014 6:11 pm

Re: The /dev/nand device is missing from rootfs install Jan

Postby starfry » Fri Jan 30, 2015 5:24 pm

$this->bbcode_second_pass_code('', '
[root@alarm ~]# pacman -Qs linux-sun
local/linux-sun7i 3.4.103-5
The Linux Kernel and modules - sun7i
[root@alarm ~]#
')
starfry
 
Posts: 24
Joined: Wed Jul 18, 2012 7:24 pm

Re: The /dev/nand device is missing from rootfs install Jan

Postby crashmaster » Mon Feb 02, 2015 1:06 am

I can only speak for Kernel 3.18.x with device trees.
Indeed it misses the /dev/nand partitions.

Older kernels have been configured for this with:
$this->bbcode_second_pass_code('', '
CONFIG_SUNXI_NAND_PARTITION=Y
')
This param is not available in the 3.18.x kernel config.

I guess the necessary code for A20 is not implemented in the latest 3.18.x kernel until now becuase it needs some changes first. But it's only a guess. ;)
crashmaster
 
Posts: 119
Joined: Wed Mar 13, 2013 1:00 am

Re: The /dev/nand device is missing from rootfs install Jan

Postby starfry » Mon Feb 02, 2015 10:22 am

I just checked my 3.4.103-5-ARCH system, the one with the NAND problem, and that has

$this->bbcode_second_pass_code('', '
$ zgrep SUNXI_NAND /proc/config.gz
CONFIG_SUNXI_NAND_PARTITION=y
CONFIG_SUNXI_NAND=y
CONFIG_SUNXI_NAND_COMPAT_DEV=y
# CONFIG_SUNXI_NAND_TEST is not set
')

The U-Boot version is
$this->bbcode_second_pass_code('', '
sun7i# version
U-Boot 2015.01-3 (Jan 24 2015 - 13:55:50) Arch Linux ARM
gcc (GCC) 4.9.2 20141224 (prerelease)
GNU ld (GNU Binutils) 2.25
')

The system that works has kernel 3.4.103-2-ARCH and its U-Boot version is
$this->bbcode_second_pass_code('', '
sun7i# version
U-Boot 2014.04 (Oct 04 2014 - 12:33:54) Arch Linux ARM
gcc (GCC) 4.8.2 20131219 (prerelease)
GNU ld (GNU Binutils) 2.24
')

If I replace U-Boot on the non-working image with the version from the working image then /dev/nand appears and works normally.
$this->bbcode_second_pass_code('', '
$ uname -a
$ fdisk -l /dev/nand
Linux alarm 3.4.103-5-ARCH #1 SMP PREEMPT Fri Jan 16 06:34:00 MST 2015 armv7l GNU/Linux
[root@alarm ~]# fdisk -l /dev/nand
Disk /dev/nand: 3.7 GiB, 3984588800 bytes, 7782400 sectors
')

(What I did was to copy "script.bin", "uEnv.txt" (albeit empty) into /boot and dd "u-boot-sunxi-with-spl.bin" onto the card)

So it looks like this is a U-Boot issue.
starfry
 
Posts: 24
Joined: Wed Jul 18, 2012 7:24 pm

Re: The /dev/nand device is missing from rootfs install Jan

Postby sehraf » Mon Feb 02, 2015 10:41 am

Linux kernel 3.19 will have partially NAND support - as far as i know u-boot has none
If u-boot needs to set up NAND to be accessible for Linux (old 3.8 kernel) then the new u-boot version might be the cause for the broken NAND
sehraf
 
Posts: 69
Joined: Mon Feb 03, 2014 10:06 pm

Re: The /dev/nand device is missing from rootfs install Jan

Postby valant » Tue Feb 10, 2015 11:10 pm

Great that you found out!

Do you have any link to the working version of u-boot? I can't find any..

Thanks!
valant
 
Posts: 1
Joined: Tue Feb 10, 2015 11:09 pm


Return to Allwinner

Who is online

Users browsing this forum: No registered users and 8 guests