
25 Mar
2008
25 Mar
'08
8:13 a.m.
Hi Dirk,
Thanks for the information. i looked at he nand_util.c and used the same do_div in my code and was able to compile without any issues.
Regards Gururaja
Don't do this. Compiler/Linker then tries to use math from libraries
coming with your tool chain. Normally, U-Boot should be completely independent of any external libraries.
Option is to modify your code that compiler/linker doesn't need
external libraries:
Try to use shift operation instead of div. E.g. "c = c >> x"
If this doesn't work, have a look to U-Boot's lib_arm directory and
use only math available there. E.g (nand_util.c): do_div(n, opts->length);
Cheers
Dirk