Ok, I figured it out, now the nand driver is being compiled, this is my kernel patch
userpatches/kernel/sun8i-default/z-add-nand-driver.patch
diff --git a/Makefile b/Makefile
index 3ab904e..1c4435a 100644
--- a/Makefile
+++ b/Makefile
@@ -508,7 +508,7 @@ scripts: scripts_basic include/config/auto.conf include/config/tristate.conf
# Objects we will link into vmlinux / subdirs we need to visit
init-y := init/
-drivers-y := drivers/ sound/ firmware/
+drivers-y := drivers/ sound/ firmware/ modules/nand/
net-y := net/
libs-y := lib/
core-y := usr/
diff --git a/modules/nand/sun8iw7p1/Makefile b/modules/nand/sun8iw7p1/Makefile
index 2104465..0f419f8 100755
--- a/modules/nand/sun8iw7p1/Makefile
+++ b/modules/nand/sun8iw7p1/Makefile
@@ -8,4 +8,4 @@ nand-objs += nand_interface.o \
nfd/nand_dev.o \
nfd/nand_class.o \
nfd/nand_osal_for_linux.o \
- libnand_sun8iw7p1.a
\ No newline at end of file
+ libnand_sun8iw7p1
At first boot I saw in the dmesg:
[ 132.629629] [NAND]nand init start, nand0_used_flag is 0
[ 132.629731] [NAND]nand driver is disabled
It is expected because I have to change the script.bin and reboot the board as I mentioned before.
I see now the nand partitions and I'm able to mount the nandd which is the rootfs in that image.
root@orangepipc:~# modprobe nand
[ 485.103973] [NAND]nand init start, nand0_used_flag is 1
[ 485.104059] kernel:nand version: 2 23 20150521 929
[ 485.106882] NAND_ReadPhyArch: get old physic arch ok, use old cfg, now:0x2 0x40788 - old:0x2 0x4078c!
[ 485.106925] kernel:nand info: 4b44642c ffffffa9 4078c 400a01 5
[ 485.825265] nanda:
[ 485.829003] nandb: unknown partition table
[ 485.833665] nandc: unknown partition table
[ 485.847641] nandd: unknown partition table
[ 485.906417] nande: unknown partition table
[ 485.906845] [NAND]nand init end
root@orangepipc:~# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
nanda 93:0 0 16M 0 disk
nandb 93:8 0 16M 0 disk
nandc 93:16 0 16M 0 disk
nandd 93:24 0 6.5G 0 disk
nande 93:32 0 808M 0 disk
mmcblk0 179:0 0 1.9G 0 disk
`-mmcblk0p1 179:1 0 1.7G 0 part /
root@orangepipc:~# ls -al /dev/nand*
brw-rw---- 1 root disk 93, 0 Aug 24 18:22 /dev/nanda
brw-rw---- 1 root disk 93, 8 Aug 24 18:22 /dev/nandb
brw-rw---- 1 root disk 93, 16 Aug 24 18:22 /dev/nandc
brw-rw---- 1 root disk 93, 24 Aug 24 18:22 /dev/nandd
brw-rw---- 1 root disk 93, 32 Aug 24 18:22 /dev/nande
I'm not able to use nand-sata-install script because the /dev/nand is not present, any suggestions?