Jump to content

Recommended Posts

Posted

Hi,

I'm wondering if there is any environment variable to enable the compilation and of the mali and nand drivers for orangepipc board.

./compile.sh docker KERNEL_CONFIGURE=no BUILD_DESKTOP=no KERNEL_ONLY=no INSTALL_HEADERS=no BOARD=orangepipc BRANCH=default RELEASE=xenial

In the cache folder, I see those drivers at linux-sun8i/sun8i/modules/

 

Also, there is a script apparently to build those drivers -> linux-sun8i/sun8i/scripts/build_sun8iw8p1.sh

 

I appreciate any help, thank you!

Posted

Thanks zabor.

 

 

I have a board with nand and it is very similar to the cubierboard2, the reference is 29F64G08CBABA, I need to modify the script.bin because the wifi was not recognized, I got it from an android image (sys_config.fex). Based on this path add-mali-r3p0-fixed.patch I'm trying to add the nand driver to the build process.

20170817_113553.jpg

sys_config.fex

Posted

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?

Posted
3 minutes ago, jjescof said:

I'm not able to use nand-sata-install script because the /dev/nand is not present, any suggestions?

It was tested only with A10/A20 legacy NAND implementation and it uses precompiled u-boot binaries that won't be compatible with any other SoC anyway. You may be able to transfer the system to NAND manually but it's probably not something that can be done easily.

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines