By Bill » Wednesday, January 20 2010, 14:48
After what seems like forever, trying to resolve a problem getting consistently working images and kernels, I've finally figured out the problem.
The problem was with me not reading directions properly. But I'm not all to blame, you assume certain things sometimes that should in all rights, be ok to assume, but end up just being wrong.
I've learned as of writing this that the current Openembedded project doesn't work as is from their own website. You need a "special" version by the guy I mentioned in a previous post named buserror. Here are the links for his stuff...
http://bliterness.blogspot.com/ - His blog
http://code.google.com/p/mini2440/ ... - His Google code page.
http://repo.or.cz/w/openembedded/mi... - Git repository for the modified Openembedded
http://repo.or.cz/w/u-boot-openmoko... - Git repository for u-boot
You'll need to read over the blog, and google code pages thoroughly. It's full of information that's very very easy to overlook and isn't very well laid out. You'll have to use the openembedded from his git repo above otherwise you'll end up with weird stuff. The part above about me not being fully responsible for the failures I've had in making working images consistently, well my assumptions came from there being actual Mini2440 support in the main Openembedded project. So being new to this, I assumed that meant it worked and was tested. Obviously not. And again we come back to that same old thing of half written, half maintained, mostly broken crap that Linux consists of and how it just goes to prove that you get better software from commercial companies than from groups of people in open source projects where nobody seems to worth together smoothly to actually FINISH a product that works in the end.
You'll need to modify Buserror's code a little in openembedded. If you've looked at the tree layout for the real openembedded and the tree that is Buserror's.... They look different. I'm assuming this is an older version of Openembedded that he's based his mods on.
You'll need to edit:
and change the following line
EXTRA_IMAGECMD_jffs2 = "--pad --little-endian --squash -s 0x200 -n -e 16KiB"
EXTRA_IMAGECMD_jffs2 = "--pad --little-endian --squash -s 0x800 -n -e 128KiB"
This changes how the images are made with mkfs.jffs2 ... If you have a micro2440 SDK board with 128MB NAND, your erase block size is 128k and your sector size or page size is 2048bytes (2k, or 0x800 in hex)
Now you should be able to bitbake all you want. It should be known that it is very important that when you're using the NAND on your board, that your erase size and sector size are correct in the jffs2 image otherwise you'll end up with a screen full of errors, and your system won't boot. If your system does some how make it through the error and boot you could have dataloss, or it could take several minutes to get through those warnings and errors making your device slower. You must know your erase and sector size. U-Boot has a nifty command for helping with that.
In U-Boot type:
MINI2440 # nand info
And it'll report the sector size and the block size.
So, to summarize... you need to get most of your stuff from Buserror in order for things to work. He has a lot of work to do before it's perfect but he seems to be the only person actually smart enough and English speaking enough, to sit down and work on it. It's also a good idea to come back here often and check things. I'm trying really hard to keep everything I'm doing posted here so others who might be new to this type of thing, don't run in to the same problems I've had.