aboutsummaryrefslogtreecommitdiff
path: root/meta-bigendian
AgeCommit message (Collapse)Author
2013-08-20meta-bigendian: fix strace patchRiku Voipio
2013-08-20python libffi: fix arm trampoline to work on arm v7 big endian (be8) caseVictor Kamensky
Since python source base has its own copy of libffi, it fixes the issue here. Note similar fix is committed into separate libffi library. cffi code creates trampoline for python callback function, which is supposed to be called from another C function and it does not take into account that in ARMv7a in big endian mode instructions are still in little endian. Since written by big endian code they have to be byteswapped. Proposed fix uses byteswap codes for instructions. Here is python code snippet that will fail when libffi is used by ctypes in python code (func1 and func2 are C functions): from ctypes import * mylib = CDLL("libmytest.so") func1 = mylib.func1 print func1(1, 2) CBFUNC = CFUNCTYPE(c_int, c_int, c_int) def myfunc2(a, b): return a * a + b * b cb_func = CBFUNC(myfunc2) func2 = mylib.func2 print func2(cb_func, 1, 2) code will produce illegal instruction when func2 will call myfunc2 through trampoline Signed-off-by: Victor Kamensky <victor.kamensky@linaro.org> Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
2013-08-20libffi: fix arm trampoline to work on arm v7 big endian (be8) caseVictor Kamensky
cffi code creates trampoline for python callback function, which is supposed to be called from another C function and it does not take into account that in ARMv7a in big endian mode instructions are still in little endian. Since written by big endian code they have to be byteswapped. Proposed fix uses byteswap codes for instructions. Here is python code snippet that will fail when libffi is used by ctypes in python code (func1 and func2 are C functions): from ctypes import * mylib = CDLL("libmytest.so") func1 = mylib.func1 print func1(1, 2) CBFUNC = CFUNCTYPE(c_int, c_int, c_int) def myfunc2(a, b): return a * a + b * b cb_func = CBFUNC(myfunc2) func2 = mylib.func2 print func2(cb_func, 1, 2) code will produce illegal instruction when func2 will call myfunc2 through trampoline Signed-off-by: Victor Kamensky <victor.kamensky@linaro.org> Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
2013-08-19strace: fix system call matching code in get_scno for be8 armVictor Kamensky
on ARM V7 operating in big endian mode strace does not work: root@genericarmv7ab:~# strace ls pid 1356 unknown syscall trap 0x000000ef it happens because ARM V7 when runs as big endian operates in be8 mode, where instruction are still in little endian form. Strace get_scno reads instructions and matches it to certain pattern, but in armeb case it needs to byteswap it before that. Signed-off-by: Victor Kamensky <victor.kamensky@linaro.org> Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
2013-08-19sysprof: armeb need to have similar patches as arm cpu typeVictor Kamensky
dds the same patches into SRC_URI_append_armeb as SRC_URI_append_arm does. Signed-off-by: Victor Kamensky <victor.kamensky@linaro.org> Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
2013-08-19initscripts: armeb need to have similar patches as arm cpu typeVictor Kamensky
Adds the same patches into SRC_URI_append_armeb as SRC_URI_append_arm does. Signed-off-by: Victor Kamensky <victor.kamensky@linaro.org> Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
2013-08-19create meta-linaro/meta-bigendian layer for be changesVictor Kamensky
Create meta-linaro/meta-bigendian meta layer that holds oe changes to build ARM big endian images Signed-off-by: Victor Kamensky <victor.kamensky@linaro.org> Signed-off-by: Riku Voipio <riku.voipio@linaro.org>