I use the fallback and the normal mode, if my chip has a size 256*1024, what size of FALLBACK_SIZE and ROM_IMAGE_SIZE I can choose, I have some difficulty to define the role of the ROM_IMAGE_SIZE, the ROM_SIZE define the size of the chip, the FALLBACK_SIZE define the size of the fallback mode, but the ROM_IMAGE_SIZE ??? I don't understand the goal of ROM_IMAGE_SIZE, if you have an better explaination that on the Web site, I would appreciate much.
Just to make sure first, after changing anything in the config'lb or options.lb files, you have to re-run ./buildtarget to recreate the make files with the new values.
If I understand it right, this is pretty much how it works, and some reasonable values for a 256k flash part:
ROM_IMAGE_SIZE determines the amount of space for lb's fallback image to take up, 64kb (64*1024, or 0x10000). The minimum size of this is dependent on the code, I don't know how you'd find it out other than trial-and-error, but there must be a way.
FALLBACK_SIZE determines the space for the fallback lb image + the payload for the "fallback.rom", 128kb (128*1024, or 0x20000). This means 64kb for lb+64kb for the payload. This at minimum needs to be (obviously) the size of your built code + the size of your payload. Also, make sure your Options.lb contains "default HAVE_FALLBACK_BOOT=1".
ROM_IMAGE_SIZE again determines the size for the normal image's code, 64kb
ROM_SIZE determines the size of the whole chip, 256kb. LB then computes ROM_SIZE - FALLBACK_SIZE to get the size for the "normal.rom", which is the normal lb code + the payload again.
At the end, lb merges the fallback.rom(128k) and normal.rom (128k) to give you linuxbios.rom (256k).
There are some other options, like PAYLOAD_SIZE and ROM_SECTION_SIZE, these should be computed by your src/../Config.lb based on the other values. If you still have problems, grab the config.lb's and options.lb from the asus p2b and use the values in those, they build a 256k flash part for me just fine.
-Corey
Thank's for all of your explaination, now have a better vision of the things, thanks again ;)
regards
Ccases