blackfin: fix undefined reference to srand and rand
PATCH 1/1 blackfin: fix undefined reference to srand and rand
Commit 9ba9e85f3f1c (net: Fix NET_RANDOM_ETHADDR dependencies) accidentally dropped CONFIG_LIB_RAND defines for 14 Blackfin boards.
Prior to that commit, those boards defined CONFIG_LIB_RAND, but not CONFIG_NET_RANDOM_ETHADDR. So, commit 9ba9e85f3f1c should not have touched them, but in fact it ripped CONFIG_LIB_RAND off from all the header files, which caused undefined reference to srand and rand. CONFIG_LIB_RAND=y must be revived for such boards.
BTW, this commit indeed makes it better, but even with this fix, three boards (bf533-stamp, bf538f-ezkit, cm-bf548) still can not build due to region 'ram' overflowed error. This was cause by commit 6eed3786c68c (net: Move the CMD_NET config to defconfigs) because CMD_NET selects NET, and NET selects REGEX. Eventually, some boards were newly enabled with CONFIG_REGEX, increasing the memory footprint. A patch is expected to fix the build error.
---
configs/bf527-ezkit-v2_defconfig | 1 + configs/bf533-ezkit_defconfig | 1 + configs/bf533-stamp_defconfig | 1 + configs/bf538f-ezkit_defconfig | 1 + configs/bf548-ezkit_defconfig | 1 + configs/bf561-acvilon_defconfig | 1 + configs/bf561-ezkit_defconfig | 1 + configs/bf609-ezkit_defconfig | 1 + configs/br4_defconfig | 1 + configs/cm-bf533_defconfig | 1 + configs/cm-bf548_defconfig | 1 + configs/cm-bf561_defconfig | 1 + configs/ibf-dsp561_defconfig | 1 + configs/pr1_defconfig | 1 + lib/Kconfig | 4 +++- 15 files changed, 17 insertions(+), 1 deletion(-)
configs/bf527-ezkit-v2_defconfig +1 -0
@@ -3,3 +3,4 @@ CONFIG_TARGET_BF527_EZKIT=y CONFIG_SYS_EXTRA_OPTIONS="BF527_EZKIT_REV_2_1" CONFIG_CMD_NET=y CONFIG_CC_OPTIMIZE_LIBS_FOR_SPEED=y +CONFIG_LIB_RAND=y
configs/bf533-ezkit_defconfig +1 -0
@@ -2,3 +2,4 @@ CONFIG_BLACKFIN=y CONFIG_TARGET_BF533_EZKIT=y CONFIG_CMD_NET=y CONFIG_CC_OPTIMIZE_LIBS_FOR_SPEED=y +CONFIG_LIB_RAND=y
configs/bf533-stamp_defconfig +1 -0
@@ -2,3 +2,4 @@ CONFIG_BLACKFIN=y CONFIG_TARGET_BF533_STAMP=y CONFIG_CMD_NET=y CONFIG_CC_OPTIMIZE_LIBS_FOR_SPEED=y +CONFIG_LIB_RAND=y
configs/bf538f-ezkit_defconfig +1 -0
@@ -2,3 +2,4 @@ CONFIG_BLACKFIN=y CONFIG_TARGET_BF538F_EZKIT=y CONFIG_CMD_NET=y CONFIG_CC_OPTIMIZE_LIBS_FOR_SPEED=y +CONFIG_LIB_RAND=y
configs/bf548-ezkit_defconfig +1 -0
@@ -2,3 +2,4 @@ CONFIG_BLACKFIN=y CONFIG_TARGET_BF548_EZKIT=y CONFIG_CMD_NET=y CONFIG_CC_OPTIMIZE_LIBS_FOR_SPEED=y +CONFIG_LIB_RAND=y
configs/bf561-acvilon_defconfig +1 -0
@@ -2,3 +2,4 @@ CONFIG_BLACKFIN=y CONFIG_TARGET_BF561_ACVILON=y CONFIG_CMD_NET=y CONFIG_CC_OPTIMIZE_LIBS_FOR_SPEED=y +CONFIG_LIB_RAND=y
configs/bf561-ezkit_defconfig +1 -0
@@ -2,3 +2,4 @@ CONFIG_BLACKFIN=y CONFIG_TARGET_BF561_EZKIT=y CONFIG_CMD_NET=y CONFIG_CC_OPTIMIZE_LIBS_FOR_SPEED=y +CONFIG_LIB_RAND=y
configs/bf609-ezkit_defconfig +1 -0
@@ -3,3 +3,4 @@ CONFIG_NETDEVICES=y CONFIG_TARGET_BF609_EZKIT=y CONFIG_CMD_NET=y CONFIG_ETH_DESIGNWARE=y +CONFIG_LIB_RAND=y
configs/br4_defconfig +1 -0
@@ -2,3 +2,4 @@ CONFIG_BLACKFIN=y CONFIG_TARGET_BR4=y CONFIG_CMD_NET=y CONFIG_CC_OPTIMIZE_LIBS_FOR_SPEED=y +CONFIG_LIB_RAND=y
configs/cm-bf533_defconfig +1 -0
@@ -2,3 +2,4 @@ CONFIG_BLACKFIN=y CONFIG_TARGET_CM_BF533=y CONFIG_CMD_NET=y CONFIG_CC_OPTIMIZE_LIBS_FOR_SPEED=y +CONFIG_LIB_RAND=y
configs/cm-bf548_defconfig +1 -0
@@ -2,3 +2,4 @@ CONFIG_BLACKFIN=y CONFIG_TARGET_CM_BF548=y CONFIG_CMD_NET=y CONFIG_CC_OPTIMIZE_LIBS_FOR_SPEED=y +CONFIG_LIB_RAND=y
configs/cm-bf561_defconfig +1 -0
@@ -2,3 +2,4 @@ CONFIG_BLACKFIN=y CONFIG_TARGET_CM_BF561=y CONFIG_CMD_NET=y CONFIG_CC_OPTIMIZE_LIBS_FOR_SPEED=y +CONFIG_LIB_RAND=y
configs/ibf-dsp561_defconfig +1 -0
@@ -1,3 +1,4 @@ CONFIG_BLACKFIN=y CONFIG_TARGET_IBF_DSP561=y CONFIG_CMD_NET=y +CONFIG_LIB_RAND=y
configs/pr1_defconfig +1 -0
@@ -2,3 +2,4 @@ CONFIG_BLACKFIN=y CONFIG_TARGET_PR1=y CONFIG_CMD_NET=y CONFIG_CC_OPTIMIZE_LIBS_FOR_SPEED=y +CONFIG_LIB_RAND=y
lib/Kconfig +3 -1
@@ -45,7 +45,9 @@ config REGEX "setexpr". config LIB_RAND - bool + bool "Pseudo-random library support " + help + This library provides pseudo-random number generator functions. source lib/rsa/Kconfig
Signature · 1 line
1.9.1
PATCH 1/1 blackfin: fix undefined reference to srand and rand
Hi Masahiro-san,
Quoted 17 lines · Masahiro Yamada
Commit
9ba9e85f3f1c(net: FixNET_RANDOM_ETHADDRdependencies) accidentally droppedCONFIG_LIB_RANDdefines for 14 Blackfin boards.Prior to that commit, those boards defined
CONFIG_LIB_RAND, but notCONFIG_NET_RANDOM_ETHADDR. So, commit9ba9e85f3f1cshould not have touched them, but in fact it rippedCONFIG_LIB_RANDoff from all the header files, which caused undefined reference to srand and rand.CONFIG_LIB_RAND=ymust be revived for such boards.BTW, this commit indeed makes it better, but even with this fix, three boards (bf533-stamp, bf538f-ezkit, cm-bf548) still can not build due to region 'ram' overflowed error. This was cause by commit
6eed3786c68c(net: Move theCMD_NETconfig to defconfigs) becauseCMD_NETselects NET, and NET selects REGEX. Eventually, some boards were newly enabled withCONFIG_REGEX, increasing the memory footprint. A patch is expected to fix the build error.
Quoted 2 lines
Signed-off-by Masahiro Yamada <[email protected]>---
This is surprising. I would have expected moveconfig.py to take care of this... but I guess since the LIB_RAND option was not selectable it only dropped the headers and did not add it to the defconfigs. I guess there's a lesson to learn there about how to use the tool... making sure to make the option selectable when running it, and only making it hidden if nothing selects it. I should have have thought of that when cleaning up Michal's patch. Apologies.
Thanks,
-Joe
PATCH 1/1 blackfin: fix undefined reference to srand and rand
2015-06-11 23:25 GMT+09:00 Joe Hershberger <[email protected]>:
Quoted 24 lines
Hi Masahiro-san,
Quoted 17 lines · Masahiro Yamada
Commit
9ba9e85f3f1c(net: FixNET_RANDOM_ETHADDRdependencies) accidentally droppedCONFIG_LIB_RANDdefines for 14 Blackfin boards.Prior to that commit, those boards defined
CONFIG_LIB_RAND, but notCONFIG_NET_RANDOM_ETHADDR. So, commit9ba9e85f3f1cshould not have touched them, but in fact it rippedCONFIG_LIB_RANDoff from all the header files, which caused undefined reference to srand and rand.CONFIG_LIB_RAND=ymust be revived for such boards.BTW, this commit indeed makes it better, but even with this fix, three boards (bf533-stamp, bf538f-ezkit, cm-bf548) still can not build due to region 'ram' overflowed error. This was cause by commit
6eed3786c68c(net: Move theCMD_NETconfig to defconfigs) becauseCMD_NETselects NET, and NET selects REGEX. Eventually, some boards were newly enabled withCONFIG_REGEX, increasing the memory footprint. A patch is expected to fix the build error.Quoted 2 lines
Signed-off-by Masahiro Yamada <[email protected]>---
Quoted 7 lines
This is surprising. I would have expected
moveconfig.pyto take care of this... but I guess since theLIB_RANDoption was not selectable it only dropped the headers and did not add it to the defconfigs. I guess there's a lesson to learn there about how to use the tool... making sure to make the option selectable when running it, and only making it hidden if nothing selects it. I should have have thought of that when cleaning up Michal's patch. Apologies.
Another lesson to learn:
Please do build test before sending/applying a patch.
Signature · 2 lines
Best Regards Masahiro Yamada
PATCH 1/1 blackfin: fix undefined reference to srand and rand
In reply to Masahiro YamadaQuoted 17 lines · Masahiro Yamada
Commit
9ba9e85f3f1c(net: FixNET_RANDOM_ETHADDRdependencies) accidentally droppedCONFIG_LIB_RANDdefines for 14 Blackfin boards.Prior to that commit, those boards defined
CONFIG_LIB_RAND, but notCONFIG_NET_RANDOM_ETHADDR. So, commit9ba9e85f3f1cshould not have touched them, but in fact it rippedCONFIG_LIB_RANDoff from all the header files, which caused undefined reference to srand and rand.CONFIG_LIB_RAND=ymust be revived for such boards.BTW, this commit indeed makes it better, but even with this fix, three boards (bf533-stamp, bf538f-ezkit, cm-bf548) still can not build due to region 'ram' overflowed error. This was cause by commit
6eed3786c68c(net: Move theCMD_NETconfig to defconfigs) becauseCMD_NETselects NET, and NET selects REGEX. Eventually, some boards were newly enabled withCONFIG_REGEX, increasing the memory footprint. A patch is expected to fix the build error.
Quoted 1 line
Signed-off-by Masahiro Yamada <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150612/26437c25/attachment.sig>