AnsweredAssumed Answered

kobs-ng with 4.4+ kernels on imx6 processors

Question asked by Pushpal Sidhu on Jun 23, 2016
Latest reply on Jun 30, 2016 by Tim Harvey

Hi All,

 

I am having a difficult time getting kobs-ng (5.4, latest version or any version before) to work with a 4.4 mainline kernel. At first, I was seeing the following:

# Before kobs-ng (good)

00000000  00 00 92 fb ff ff 46 43  42 20 00 00 00 01 50 3c  |......FCB ....P<|

00000010  19 06 00 00 00 00 00 08  00 00 40 08 00 00 40 00  |..........@...@.|

# After kobs-ng (bad)

00000000  00 00 00 00 00 00 00 00  00 00 00 00 92 fb ff ff  |................|

00000010  46 43 42 20 00 00 00 01  50 3c 19 06 00 00 00 00  |FCB ....P<......|

00000020  00 08 00 00 40 08 00 00  40 00 00 00 00 00 00 00  |....@...@.......|

As you can see, there is a 10 byte padding that was added which causes no serial on boot (or boot to even occur). I then looked into the source code of kobs-ng and saw two separate modes that mtd could use to access nand.

 

By default, kobs-ng was using "legacy raw access mode". I forced kobs-ng to then use the "new bch layout raw access mode", which seemed to improve things, but still cause failures (can't boot). Please see below:

# Before kobs-ng (good)

00000000  00 00 92 fb ff ff 46 43  42 20 00 00 00 01 50 3c  |......FCB ....P<|

00000010  19 06 00 00 00 00 00 08  00 00 40 08 00 00 40 00  |..........@...@.|

00000020  00 00 00 00 00 00 00 00  00 00 00 00 00 00 04 00  |................|

00000030  00 00 00 02 00 00 00 02  00 00 04 00 00 00 0a 00  |................|

# After kobs-ng (bad)

00000000  00 00 94 fb ff ff 46 43  42 20 00 00 00 01 50 3c  |......FCB ....P<|

00000010  19 06 00 00 00 00 00 08  00 00 40 08 00 00 40 00  |..........@...@.|

00000020  00 00 00 00 00 00 00 00  00 00 00 00 00 00 04 00  |................|

00000030  00 00 00 00 00 00 00 02  00 00 04 00 00 00 0a 00  |................|

On close inspection of the two, you can see that there are very slight byte differences, namely the third byte (92 to 94 shown). This also causes boot failures in the same way.

 

My question is: will kobs-ng be updated for mainline kernel support? I do not want to replace the gpmi-nand driver to the 3.14 version as I've seen other forum postings say to do as a workaround nor do I want to use a older kernel than this. Is there a patch I can apply to kobs-ng to fix this behavior? Thanks.


Wong

Andy Chen

Outcomes