On Fri, 12 Aug 2016, Wookey wrote: > > Thanks, I downloaded it and patched 4.7 seamlessly. I have some problems > > compiling the kernel, but it might be related to my old gcc (3.4.5). > > Debian has packaged arm-none-eabi-gcc 4.8.4, should it work? I want to > > avoid building my own toolchain... > > You mean your native gcc on the old arm machine is 3.4.5?
Nope, I don't have a native gcc there, I grabbed some old toolchain from the net. > targets. You want gcc-*-arm-linux-gnueabi > > Info on installing cross-toolchains is here: > https://wiki.debian.org/CrossToolchains Thanks, I installed it: $ arm-linux-gnueabi-gcc-4.9 --version arm-linux-gnueabi-gcc-4.9 ( 4.9.2-10) 4.9.2 I tested it with a small test program and it generates code with BX instruction (and other BXxx instructions, which - judging from the code - don't seem to be emulated by patch - aren't they needed?). $ cat test.c int main() { return 0; } $ arm-linux-gnueabi-gcc-4.9 -S -o test.S test.c $ arm-linux-gnueabi-gcc-4.9 -c -o test.o test.c $ arm-linux-gnueabi-gcc-4.9 -o test.elf test.c $ grep bx test.S bx lr $ arm-linux-gnueabi-objdump -d test.o|grep 12fff1 18: e12fff1e bx lr $ arm-linux-gnueabi-objdump -d test.elf|grep 12fff1 10280: e12fff1e bx lr 1030c: 012fff1e bxeq lr 1032c: 912fff1e bxls lr 10338: 012fff1e bxeq lr 1033c: e12fff13 bx r3 10364: 012fff1e bxeq lr 10370: 012fff1e bxeq lr 10374: e12fff13 bx r3 103a8: e12fff1e bx lr 103dc: e12fff13 bx r3 10404: e12fff1e bx lr 10458: e12fff13 bx r3 10468: e12fff1e bx lr 10474: e12fff1e bx lr 10480: e12fff1e bx lr Shouldn't it generate code without these instructions? Anyway, I compiled the kernel (4.7): $ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- menuconfig zImage and it seems that resulting image doesn't contain BX instructions, but it doesn't boot - the screen is blank with one horizontal line (probably because CPU doesn't control display refreshing as it normally does) and the serial port doesn't work - I tested with earlyprintk= and console= kernel parameters and all I get is the jlinexec.exe (bootloader for WinCE that loads Linux) "logo" line on the serial port... Maybe I configured the kernel wrong, but I enabled everything that should probably be enabled (SA1100 console, SA1100 serial port, CPU type etc)... $ grep SA1100 .config CONFIG_ARCH_SA1100=y # CONFIG_SA1100_ASSABET is not set # CONFIG_SA1100_CERF is not set # CONFIG_SA1100_COLLIE is not set # CONFIG_SA1100_H3100 is not set # CONFIG_SA1100_H3600 is not set # CONFIG_SA1100_BADGE4 is not set CONFIG_SA1100_JORNADA720=y CONFIG_SA1100_JORNADA720_SSP=y # CONFIG_SA1100_HACKKIT is not set # CONFIG_SA1100_LART is not set # CONFIG_SA1100_NANOENGINE is not set # CONFIG_SA1100_PLEB is not set # CONFIG_SA1100_SHANNON is not set # CONFIG_SA1100_SIMPAD is not set CONFIG_SA1100_SSP=y CONFIG_CPU_SA1100=y CONFIG_PCMCIA_SA1100=m CONFIG_SA1100_FIR=y CONFIG_SERIAL_SA1100=y CONFIG_SERIAL_SA1100_CONSOLE=y CONFIG_SA1100_WATCHDOG=y CONFIG_FB_SA1100=y CONFIG_RTC_DRV_SA1100=y I'll try to revise the kernel config tomorrow. -- Adam Wysocki http://www.chmurka.net/

