Jump to content


Photo

does openpli support X16 nand access? (I dont think so)

nand x16 erasesize

  • Please log in to reply
13 replies to this topic

#1 charliebrown

  • Member
  • 13 posts

+1
Neutral

Posted 13 September 2015 - 16:03

Hi,

 

can I someone tell me, or give me developer contact to ask if OpenPLI supports X16 nand access?. It looks like many of the scripts are hardcoded for X8 nand access. I've replaced the nand in my box (see my other post) and it looks like my issues are down to the new nand being in X16 mode and not x8.

 

Anyone?

 



Re: does openpli support X16 nand access? (I dont think so) #2 Erik Slagter

  • PLi® Core member
  • 46,969 posts

+542
Excellent

Posted 13 September 2015 - 16:40

This is either a driver (closed source manufacturer) or kernel issue. OpenPLi takes no part in this issue.


* Wavefrontier T90 with 28E/23E/19E/13E via SCR switches 2 x 2 x 6 user bands
I don't read PM -> if you have something to ask or to report, do it in the forum so others can benefit. I don't take freelance jobs.
Ik lees geen PM -> als je iets te vragen of te melden hebt, doe het op het forum, zodat anderen er ook wat aan hebben.


Re: does openpli support X16 nand access? (I dont think so) #3 charliebrown

  • Member
  • 13 posts

+1
Neutral

Posted 13 September 2015 - 16:44

Thing is the build scripts for openPLI specifically mention block/erase size for the UBIFS, this is why I ask here. Are you saying openPLI is abstracted away from the specifics of the filesytem (on nand) layout and therefore no one can offer advice?.

 

Btw we are talking about UBIFS, nothing to do with closed source drivers. The drivers are all part of the Linux kernel, no propitiatory blobs involved. 


Edited by charliebrown, 13 September 2015 - 16:46.


Re: does openpli support X16 nand access? (I dont think so) #4 MiLo

  • PLi® Core member
  • 14,055 posts

+298
Excellent

Posted 13 September 2015 - 18:36

If you're talking about 16-bit connection to the chip, that's arranged by kernel and bootloader. Scripts and stuff are totally ignorant of the physical connection to the NAND chip.

(Sounds more like a hardware issue - to use x16 NAND you'll need 8 extra wires routed to it. Many chips can run in both modes though.)

Anyway, you have full access to everything. No secrets, if it isn't in the repositories, we don't have it.
Real musicians never die - they just decompose

Re: does openpli support X16 nand access? (I dont think so) #5 charliebrown

  • Member
  • 13 posts

+1
Neutral

Posted 15 September 2015 - 13:15

If you're talking about 16-bit connection to the chip, that's arranged by kernel and bootloader. Scripts and stuff are totally ignorant of the physical connection to the NAND chip.

(Sounds more like a hardware issue - to use x16 NAND you'll need 8 extra wires routed to it. Many chips can run in both modes though.)

Anyway, you have full access to everything. No secrets, if it isn't in the repositories, we don't have it.

 

Actually I was talking to an Engineer at spansion. The problem is the kernel is incorrectly identifying the blocksize. 

 

This is the line I see in the serial output

 

NAND Config: Reg=35142200, chipSize=128 MB, blockSize=512K, erase_shift=13
 
This is 100% wrong, because the chip I have is 100% x8 and not x16. The chip S34ML01G100TFI000 which is x8 , the x16 part is S34ML01G104TFI000 according to the datasheet page 71
 
 
 
I changed the file oe-alliance/builds/openvix/release/vuuno/tmp/work-shared/vuuno/kernel-source/drivers/mtd/brcmnand/brcmnand_base.c and hard coded values for x8 (128K pages) BUT compiling the image "MACHINE=vuuno DISTRO=openvix make image" did not affect the compiled kernel. Infact I put some debug messages in the .c file so that the above line SHOULD have printk as
 
DEBUGNAND Config: Reg=35142200, chipSize=128 MB, blockSize=512K, erase_shift=13
 
But nothing changed, so that tells me my changes are ignored and the file is either not used OR ignored?.
 
I'm not a C coder (Java) but I can hack the file so that its forced to use 128K pages by modifying function 
 
brcmnand_decode_config(struct brcmnand_chip* chip, uint32_t nand_config)
 
 
And changing lines that look like this
 
 
switch ((nand_config & BCHP_NAND_CONFIG_BLOCK_SIZE_MASK)
                        >> BCHP_NAND_CONFIG_BLOCK_SIZE_SHIFT) {
                case BCHP_NAND_CONFIG_BLOCK_SIZE_BK_SIZE_512KB:
                        chip->blockSize = 512 << 10;
                        break;
                case BCHP_NAND_CONFIG_BLOCK_SIZE_BK_SIZE_8KB:
                        chip->blockSize = 8 << 10;
                        break;
                case BCHP_NAND_CONFIG_BLOCK_SIZE_BK_SIZE_128KB:
                        chip->blockSize = 128 << 10;
                        break;
                case BCHP_NAND_CONFIG_BLOCK_SIZE_BK_SIZE_16KB:
                        chip->blockSize = 16 << 10;
                        break;
        }
 
 

To look like this (hard coding 128K values where 512K is set). I dont care for 512K as I will never use it so its a dirty hack but i dont know how else to fix this :(

 

switch ((nand_config & BCHP_NAND_CONFIG_BLOCK_SIZE_MASK)
                        >> BCHP_NAND_CONFIG_BLOCK_SIZE_SHIFT) {
                case BCHP_NAND_CONFIG_BLOCK_SIZE_BK_SIZE_512KB:
                        chip->blockSize = 128 << 10;
                        break;
                case BCHP_NAND_CONFIG_BLOCK_SIZE_BK_SIZE_8KB:
                        chip->blockSize = 8 << 10;
                        break;
                case BCHP_NAND_CONFIG_BLOCK_SIZE_BK_SIZE_128KB:
                        chip->blockSize = 128 << 10;
                        break;
                case BCHP_NAND_CONFIG_BLOCK_SIZE_BK_SIZE_16KB:
                        chip->blockSize = 16 << 10;
                        break;
        }
 
Is that the right file to edit?, I'm unsure as if I change it and compile, my changes are not present, like its not using that file.


Re: does openpli support X16 nand access? (I dont think so) #6 charliebrown

  • Member
  • 13 posts

+1
Neutral

Posted 15 September 2015 - 13:21

I dont have permission to edit the above post (dont know why?) 

 

This is the page from the datasheet

 

ha5WpSe.png



Re: does openpli support X16 nand access? (I dont think so) #7 Erik Slagter

  • PLi® Core member
  • 46,969 posts

+542
Excellent

Posted 15 September 2015 - 14:57

And now what are we supposed to do?


* Wavefrontier T90 with 28E/23E/19E/13E via SCR switches 2 x 2 x 6 user bands
I don't read PM -> if you have something to ask or to report, do it in the forum so others can benefit. I don't take freelance jobs.
Ik lees geen PM -> als je iets te vragen of te melden hebt, doe het op het forum, zodat anderen er ook wat aan hebben.


Re: does openpli support X16 nand access? (I dont think so) #8 charliebrown

  • Member
  • 13 posts

+1
Neutral

Posted 15 September 2015 - 16:22

And now what are we supposed to do?

 

I'm simply looking for advice as to where the config for the nand comes from. I'm not demanding you to do anything, just after some advice from devs who are more familiar with the build environment than I am  :(



Re: does openpli support X16 nand access? (I dont think so) #9 betacentauri

  • PLi® Core member
  • 7,185 posts

+323
Excellent

Posted 15 September 2015 - 16:51

Try this
cd oe-alliance/builds/openvix/release/vuuno
MACHINE=vuuno
MACHINEBUILD=vuuno
DISTRO=openvix
source env.source
bitbake -c cleansstate virtual/kernel
bitbake -c patch virtual/kernel
Now change the file in the tmp/work/.... directory. I don't think its in tmp/work-shared, but I'm not 100% sure.
Then execute
bitbake virtual/kernel
This should build new kernel Ipk with the changed sources.
Xtrend ET-9200, ET-8000, ET-10000, OpenPliPC on Ubuntu 12.04

Re: does openpli support X16 nand access? (I dont think so) #10 charliebrown

  • Member
  • 13 posts

+1
Neutral

Posted 15 September 2015 - 17:14

Try this
cd oe-alliance/builds/openvix/release/vuuno
MACHINE=vuuno
MACHINEBUILD=vuuno
DISTRO=openvix
source env.source
bitbake -c cleansstate virtual/kernel
bitbake -c patch virtual/kernel
Now change the file in the tmp/work/.... directory. I don't think its in tmp/work-shared, but I'm not 100% sure.
Then execute
bitbake virtual/kernel
This should build new kernel Ipk with the changed sources.

 

Thank you, i;ll give it a whirl.



Re: does openpli support X16 nand access? (I dont think so) #11 athoik

  • PLi® Core member
  • 8,458 posts

+327
Excellent

Posted 15 September 2015 - 19:41

I suggest to create a bbappend file and add the extra patch to SRC_URI. Then build will contain the patch for sure.

Edited by athoik, 15 September 2015 - 19:41.

Wavefield T90: 0.8W - 1.9E - 4.8E - 13E - 16E - 19.2E - 23.5E - 26E - 33E - 39E - 42E - 45E on EMP Centauri DiseqC 16/1
Unamed: 13E Quattro - 9E Quattro on IKUSI MS-0916

Re: does openpli support X16 nand access? (I dont think so) #12 charliebrown

  • Member
  • 13 posts

+1
Neutral

Posted 15 September 2015 - 22:45

Try this
cd oe-alliance/builds/openvix/release/vuuno
MACHINE=vuuno
MACHINEBUILD=vuuno
DISTRO=openvix
source env.source
bitbake -c cleansstate virtual/kernel
bitbake -c patch virtual/kernel
Now change the file in the tmp/work/.... directory. I don't think its in tmp/work-shared, but I'm not 100% sure.
Then execute
bitbake virtual/kernel
This should build new kernel Ipk with the changed sources.

 

SUCCESS!!... previously I had the box boot but it would corrupt the filesystem if I wrote one byte. now that's not happening and i can use the box like it came from factory.

 

YOU ARE THE MAN!... One dead Vu Uno to one revived Uno with a new NAND :)

 

I suggest to create a bbappend file and add the extra patch to SRC_URI. Then build will contain the patch for sure.

 

Its a one line change, I would love to know how to do what you say so the "fix" is automated.



Re: does openpli support X16 nand access? (I dont think so) #13 athoik

  • PLi® Core member
  • 8,458 posts

+327
Excellent

Posted 16 September 2015 - 11:51

Its a one line change, I would love to know how to do what you say so the "fix" is automated.


Create a file named linux-vuuno_3.9.6.bbappend and place it under meta-local (eg meta-local/recipes-local/images or create folder meta-local/recipes-local/ovverides etc).

The file linux-vuuno_3.9.6.bbappend should contain the following:

FILESEXTRAPATHS_prepend := "${THISDIR}:"
SRC_URI += "file://nand-blocksize.patch"
The nand-blocksize patch is the "hack" you already have and this should be at the same folder where bbappend exists.

The advantage of bbappend is that you can create your customized builds without making "meta-(oe|openpli|vu|...)" dirty..
Wavefield T90: 0.8W - 1.9E - 4.8E - 13E - 16E - 19.2E - 23.5E - 26E - 33E - 39E - 42E - 45E on EMP Centauri DiseqC 16/1
Unamed: 13E Quattro - 9E Quattro on IKUSI MS-0916

Re: does openpli support X16 nand access? (I dont think so) #14 charliebrown

  • Member
  • 13 posts

+1
Neutral

Posted 16 September 2015 - 12:02

Thank you very much. Going to have a go with this as its much easier (and cleaner) to apply the patch than to do it by hand every time. 




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users