Flash programming on CC9P9360 calculate Spare Area

I have problems with calculate Spare Area
of the Flash Samsung K9F5608U0D on the CC9P9360 - module.
We use NET+OS 7.4.
We want calculate the Spare Area outside NET+OS 7.4.
to programm the Flash over JTAG.

Could everyone explain me how I calculate the:

LSN : Logical Sector Number Bits
S_ECC0,S_ECC1 : ECC code for LSN data Bits
BI : Bad block Information Bit


Normally people use U-Boot to program flash. However, you might be able to get some information from the U-Boot recovery guideā€™s scripts:


I hope this helps.