Только после смены кросс-компилятора на инженерный, "самопальное" ядро соизволило запуститься Код:
<5>Linux version 3.0.8+ (alex@Hosstia-Ubuntu) (gcc version 4.5.1 (Sourcery G++ Lite 2010.09-51) ) #1 PREEMPT Sun Dec 22 18:36:45 MSK 2013
<4>CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c53c7f
<4>CPU: VIPT nonaliasing data cache, VIPT aliasing instruction cache
<4>Machine: sun5i так что про prebuilts из SDK и gcc из установки Ubuntu придется забыть до лучших времен,
, но теперь потребовал доработки собравшийся с ним nand.ko Код:
<4>[NAND]nand driver, init.
<4>[NAND] nand gpio_request
<4>[NAND] nand driver version: 0x2 0x9
<4>nand interrupte register ok
<4>ret of NFC_ChangMode is 0
<4>dma_hdle is 0
<4>dma_hdle is 10000008
<4>[SCAN_ERR] search nand physical architecture parameter failed!
<4>[NAND]init_blklayer fail , надеюсь достигнуть взаимопонимания и этом пункте в ближайшие дни. ---------- Сообщение добавлено 23.12.2013 в 11:23 ---------- В стоковом ядре действительно используется другая версия драйвера NAND, Код:
<4>hello:init_nand_libmodule,21
<4>hello:init_nand_libmodule,22
<4>nand_init,line:1364
<4>[NAND]nand driver, init.
<4>[NAND] nand driver(b) version: 0x2, 0x12, data: 20130325
<4>[NAND] nand clk request start
<4>[NAND] nand clk request ok!
<4>[NAND] nand gpio_request
<4>[NAND] nand gpio_request fail
<4>[NAND] nand driver version: 0x2 0x12
<4>nand interrupte register ok
<4>[NAND] set nand_good_block_ratio 912
<6> nanda:
<6> nandb: unknown partition table
<6> nandc: unknown partition table
<6> nandd: unknown partition table
<6> nande: unknown partition table
<6> nandf: unknown partition table
<6> nandg: unknown partition table
<6> nandh: unknown partition table
<6> nandi: unknown partition table
<6> nandj:
<6> nandk:
<6>benn: nand probe enter
<4>[NAND]nand driver, ok. ---------- Сообщение добавлено 23.12.2013 в 11:57 ---------- Версия используемого драйвера указана в исходном коде linux, в файле drivers/block/sun5i_nand/src/include/nand_drv_cfg.h Код:
#define NAND_VERSION_0 0x02
#define NAND_VERSION_1 0x09 В основном репозитории GitHub, на первый взгляд, циркулирует только эта версия. Но, в исходниках "немецкого" A13 SDK 1.5 обнаружились Код:
#define NAND_VERSION_0 0x02
#define NAND_VERSION_1 0x10
#define NAND_DRV_DATE 0x20120610 , а также некоторые патчи к ним до 0х12 После прочтения съесть! http://jwrdegoede.fedorapeople.org/sunxi-nand-diff
Should add to linux-sunxi-3.4:
-changes to only move data from erase block to free block
on else condition, see diff line 3830 - 3921
-changes for read-retry for different vendors staring diff line 4137 - 4652,
5093 - 6015
-new nand id-s at diff line 6178 - 6256, 6404 - 6423
Not really necessary:
-page size hack at diff line 4825, only needed for initial programming
-lots of changes to make sector bitmap 64 bits,
only needed with really big nand-s
---------- Сообщение добавлено 23.12.2013 в 12:51 ---------- Патч, на удивление, наложился без замечаний: После прочтения съесть! alex@Hosstia-Ubuntu:~/PMP3670B/tmp$ patch -p0 < sunxi-nand-diff
patching file a13_source_1.5-nand/Makefile
patching file a13_source_1.5-nand/nandtest/Makefile
patching file a13_source_1.5-nand/nandtest/nand_test.c
patching file a13_source_1.5-nand/nandtest/nand_test.h
patching file a13_source_1.5-nand/nfd/mbr.c
patching file a13_source_1.5-nand/nfd/mbr.h
patching file a13_source_1.5-nand/nfd/nand_blk.c
patching file a13_source_1.5-nand/nfd/nand_blk.h
patching file a13_source_1.5-nand/nfd/nand_osal_for_linux.c
patching file a13_source_1.5-nand/osal/nand_osal.h
patching file a13_source_1.5-nand/src/format/nand_format.c
patching file a13_source_1.5-nand/src/include/nand_drv_cfg.h
patching file a13_source_1.5-nand/src/include/nand_format.h
patching file a13_source_1.5-nand/src/include/nand_logic.h
patching file a13_source_1.5-nand/src/include/nand_physic.h
patching file a13_source_1.5-nand/src/include/nand_scan.h
patching file a13_source_1.5-nand/src/include/nand_simple.h
patching file a13_source_1.5-nand/src/include/nand_type.h
patching file a13_source_1.5-nand/src/include/nfc.h
patching file a13_source_1.5-nand/src/logic/bad_manage.c
patching file a13_source_1.5-nand/src/logic/logic_cache.c
patching file a13_source_1.5-nand/src/logic/logic_ctl.c
patching file a13_source_1.5-nand/src/logic/mapping.c
patching file a13_source_1.5-nand/src/logic/mapping_base.c
patching file a13_source_1.5-nand/src/logic/merge.c
patching file a13_source_1.5-nand/src/logic/read_reclaim.c
patching file a13_source_1.5-nand/src/logic/wear_levelling.c
patching file a13_source_1.5-nand/src/nfc/nfc_r.c
patching file a13_source_1.5-nand/src/nfc/nfc_w.c
patching file a13_source_1.5-nand/src/physic/nand_phy.c
patching file a13_source_1.5-nand/src/physic/nand_simple_r.c
patching file a13_source_1.5-nand/src/physic/nand_simple_w.c
patching file a13_source_1.5-nand/src/scan/nand_id.c
patching file a13_source_1.5-nand/src/scan/nand_scan.c
На всякий случай, выложу все три имеющиеся версии драйвера sun5i_nand: sun5i_nand_0x02_0x09.tar.gz sun5i_nand_0x02_0x10.tar.gz sun5i_nand_0x02_0x12.tar.gz
Недостающий nand_lib.h и модуль 0x2 0x12 "в сборе" найден в кастомизации linux-3.3 для платформы CubieBoard2: , для семейства процессоров sun7i Allwinner A20
Социальные закладки