**** BEGIN LOGGING AT Thu Jun 14 03:00:04 2018 Jun 14 03:04:08 tlwoerner: igts possible that they are using -ffreestanding or some such option to ask gcc to ignore internal header search paths Jun 14 03:43:09 3 Jun 14 08:11:00 khem, I am bothering #gcc people and I got confirmation of my amateurish findings Jun 14 08:11:02 ant_work, it is indeed readdir causing the alignment fault Jun 14 08:11:10 although given the values in the trap information I can't see _why_ - the values given for the fault address are word aligned Jun 14 08:11:16 heh Jun 14 08:19:35 khem: he got it :) Jun 14 08:19:39 apmorton> ah, sorry - i missed the D at the end of those instructions Jun 14 08:19:49 Prior to ARMv6, doubleword (LDRD/STRD) accesses to memory, where the address is not doubleword-aligned, Jun 14 08:19:58 are UNPREDICTABLE Jun 14 08:20:07 the instruction its faulting at is an LDRD (doubleword load), and the address given in the trap is only 4 byte aligned Jun 14 08:23:29 apmorton> whatever compiled readdir is assuming some member of the DIR structure it gets passed is aligned to allow a LDRD instruction, and its not Jun 14 08:23:54 that, or the compiler is generating incorrect code Jun 14 09:29:13 khem, there have been binutils upgrades as well... Jun 14 13:32:46 ant_work: I can see the bug Jun 14 13:33:00 I am compiling gdb-cross-arm Jun 14 13:33:05 gm Jun 14 13:35:01 the problem seems to be that gcc is doing an optimization to combine an arrat of two longs into a single load Jun 14 13:35:11 Can you try somethin ? Jun 14 13:35:15 sure Jun 14 13:35:30 I have the device here with serial Jun 14 13:35:36 | ../../../../../../../../work-shared/gcc-7.3.0-r0/gcc-7.3.0/libgfortran/runtime/backtrace.c:36:10: fatal error: backtrace-supported.h: No such file or directory Jun 14 13:35:36 | #include "backtrace-supported.h" Jun 14 13:35:36 | ^~~~~~~~~~~~~~~~~~~~~~~ Jun 14 13:35:36 | compilation terminated. Jun 14 13:35:36 | make[1]: *** [Makefile:2310: backtrace.lo] Error 1 Jun 14 13:35:38 | make[1]: *** Waiting for unfinished jobs.... Jun 14 13:35:46 on rocko with pi bsp Jun 14 13:37:21 ant_work: what is -march/-mcpu value passed when compiling musl Jun 14 13:38:59 no thumb, is -march=armv5e -marm Jun 14 13:39:48 ant_work: OK do you know the part name ? Jun 14 13:40:10 Crofton|work: have you checked that you include the fortran fixes by ricardo? Jun 14 13:40:21 ant_work: can you add -fno-store-merging to CFLAGS in musl recipe Jun 14 13:40:39 ok Jun 14 13:40:51 ant_work: and then compile musl and dump libc.so and search for same patterns Jun 14 13:41:11 okay Jun 14 13:41:17 ant_work: I would like to understand why thumb is disabled in your case Jun 14 13:41:24 whats the board you have Jun 14 13:41:56 well, there are a few compiled w/out thumb, in core-image-bse I see Jun 14 13:41:58 LetoThe2nd, this is on rcoko, master is OK. Sounds liek there are some backports maybe Jun 14 13:42:14 glib-2.0 gmp icu musl Jun 14 13:42:21 * Crofton|work wonders why he always ends up in weird palces :) Jun 14 13:42:36 ant_work: as I said yesterday non t variant of v5 is going out of support in gcc Jun 14 13:42:45 under armv5e-oe- .. Jun 14 13:42:58 well, maybe is set in the recipe ? Jun 14 13:43:58 see glib.2 Jun 14 13:43:59 ARM_INSTRUCTION_SET_armv4 = "arm" Jun 14 13:43:59 ARM_INSTRUCTION_SET_armv5 = "arm" Jun 14 13:44:30 LetoThe2nd, feels like rocko has them Jun 14 13:44:56 khem, same for musl Jun 14 13:44:59 # thumb1 is unsupported Jun 14 13:44:59 ARM_INSTRUCTION_SET_armv5 = "arm" Jun 14 13:44:59 ARM_INSTRUCTION_SET_armv4 = "arm" Jun 14 13:46:05 ah, but not RP's Jun 14 13:46:31 khem, should I first try to build using thumb? Jun 14 13:47:12 or go with the -fno-store-merging ? Jun 14 13:47:14 Crofton|work: I think these patches are not in rocko yet Jun 14 13:47:40 ant_work: no try to build with that option -fno-store-merging Jun 14 13:47:44 and just build musl Jun 14 13:47:46 ok Jun 14 13:47:50 and see if it changes Jun 14 13:47:54 2c2f20a9756eccafac776e45e319af7666e6da96 is the one needed for rocko Jun 14 13:48:02 biulding now Jun 14 13:55:43 ant_work: does your build for musl shows up -mcpu used as well ? Jun 14 13:57:06 no Jun 14 14:05:51 khem, od https://filebin.net/g17niupvztps17d2 Jun 14 14:06:03 I am rebuilding the image to run-test meanwhile Jun 14 14:06:59 ant_work: whats your board CPU I would like to know I think we can avoid the bug Jun 14 14:07:07 I am not sure if someone will fix it for us Jun 14 14:07:15 pxa25x Jun 14 14:07:29 iirc same on pxa27x Jun 14 14:08:44 khem, the assembler didn't change, isn't :/ Jun 14 14:10:33 so you mean it is aligned for the shorter thumb instructions? Jun 14 14:12:16 abelloni, do you still have verstile around? Do you see align traps? Jun 14 14:19:43 I didn't see any report Jun 14 14:20:32 qemuarm does not show them, I see only on real hw Jun 14 14:21:16 so it is again som elittle diff between arm926j and pxa Jun 14 14:21:27 probably Jun 14 14:21:49 the armv5 socs from atmel are plain arm9ejs Jun 14 14:22:18 arm926ejs Jun 14 14:23:02 khem, I see suggestion for using -march=native and even -mcpu... Jun 14 14:23:55 I wouldn't do that now Jun 14 14:34:32 ant_work: ah pxa, pxa25x is lubbock and pxa27x is codename bulverde these are intel xscale+iwmmxt cpus Jun 14 14:35:21 there is still life in LAKML Jun 14 14:36:51 even for assabet/neponset, the sa100 toys of RMK Jun 14 14:36:53 ant_work: so you can avoid this issue by changing your defaulttune Jun 14 14:38:19 hmso avoid require conf/machine/include/tune-xscale.inc Jun 14 14:38:23 ant_work: in your machine conf include conf/machine/include/tune-xscale.inc Jun 14 14:38:45 ant_work: and set DEFAULTTUNE = "xscale" Jun 14 14:38:57 http://cgit.openembedded.org/meta-handheld/tree/conf/machine Jun 14 14:39:00 see c7x0 Jun 14 14:39:19 the inc forces ARM_INSTRUCTION_SET = "thumb" Jun 14 14:40:00 I added that a while ago Jun 14 14:40:10 ant_work: yeah the difference is now you set DEFAULTTUNE = "xscale" Jun 14 14:40:44 ant_work: yeah thumb1 is kind of pushed to corner but should work mostly Jun 14 14:41:45 ant_work: if at some point, you have 5 minutes, can you confirm that the RTC driver was broken in v4.3 ? :) Jun 14 14:41:54 so the tune-xscale.inc must be fixed? Jun 14 14:41:58 it is now DEFAULTTUNE ?= "armv5te" Jun 14 14:43:29 Iìll try that right now Jun 14 14:43:45 abelloni, no real rtc on Zaurus, just the sa1100 ip Jun 14 14:43:57 afair pxa just borrowed Jun 14 14:44:00 I'm interested in that one Jun 14 14:44:05 ok then Jun 14 14:44:21 the fact is that two drivers will be loaded for the same ip Jun 14 14:44:22 I have 4.4 as oldest ;) must summon the other kernels Jun 14 14:44:29 rtc-sa1100 and rtc-pxa Jun 14 14:44:44 at one point I did enable both on pxa27x Jun 14 14:44:53 then smthg broke in kernel Jun 14 14:45:07 I'll check, sure Jun 14 14:45:56 ant_work: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e4302aec8a0646828a701443e303eb5ef48b37f5 Jun 14 14:48:28 ant_work: although I think gcc should be fixed for this in the end, we might need a small reproducer Jun 14 14:49:01 I am pretty sure gcc7.2 was ok in this regard Jun 14 14:49:03 ant_work: other option is to try use armv5 ( without 'e') as defaulttune Jun 14 14:49:21 ant_work: its possible something regressed Jun 14 14:50:02 it was after the 0051-ARM-PR-82445-suppress-32-bit-aligned-ldrd-strd-peeph.patch Jun 14 14:50:15 there I could boot again \o/ Jun 14 14:51:58 and it was november, patch was in limbo for months Jun 14 14:52:13 http://lists.openembedded.org/pipermail/openembedded-core/2017-December/145293.html Jun 14 14:52:56 so I'd say the binaries were okay back then Jun 14 14:55:51 abelloni, fwiw 4.4.latest does not yet build with gcc8.1 so I doubt 4.3 will do any better Jun 14 15:01:40 ant_work: that patch is already in gcc8 Jun 14 15:03:21 ant_work: I suppose you are trying gcc8 here right ? Jun 14 15:05:36 8.1 Jun 14 15:05:41 master-next Jun 14 15:06:31 last year kernel moving from gcc6 to gcc7 kernel did not decompress until that patch was committed Jun 14 15:06:49 err.. yea Jun 14 15:07:10 on xscale Jun 14 15:21:43 khem, ok, is added to TUNE_FEATURES = "arm armv5 thumb dsp xscale" Jun 14 15:22:16 still building Jun 14 15:36:03 khem: assembler is slightly different https://filebin.net/2a3jbz7azrsk4coj Jun 14 15:36:12 image still cooking Jun 14 15:37:28 ant_work: well, you can try v4.17-rc1 vs linux-next Jun 14 15:37:52 yea, but last 'good' is 4.14 Jun 14 15:38:01 for these deevices Jun 14 15:39:58 ant_work: then 4.14 and 4.14 with the patch ;) Jun 14 15:40:10 * ant_work is cornered Jun 14 15:40:10 it's not like the rtc driver is moving a lot Jun 14 15:40:40 I remember at one point there have been issues after 4.2 Jun 14 15:40:48 but we moved to 4.4 Jun 14 15:42:07 I didn't see any complain though :) Jun 14 15:42:35 you see, we had a nice spi bug killing the lcd and backlight..all dark :) Jun 14 15:42:47 a bad backport to stable Jun 14 15:43:08 we have now gpio changes and keyboard mappings are wrong Jun 14 15:43:20 so rtc is the last of the pile :) Jun 14 15:44:19 we have fixed sound and partition parser at least Jun 14 15:44:43 I think support for these device will end someday Jun 14 15:44:54 will have to Jun 14 15:50:34 ouch gcc-runtime fails to build...I'll have to bother khem again Jun 14 15:52:09 I think boris and miquel were thinking about ripping the nand driver out of the kernel Jun 14 15:52:28 it is pretty difficult to find boards to test Jun 14 15:53:03 we actually bought one but the bootloader only want to boot windows ce Jun 14 15:53:06 so meh.. Jun 14 15:54:10 ouch -mcpu=xscale switch conflicts with -march=armv5te switch Jun 14 15:57:14 khem, now gcc-runtime fails to build, libstdc++/compatibility.cc Jun 14 15:58:21 undefines symbol _ZNSt13basic Jun 14 15:58:52 and expansion of _GLIBCXX_3_4_5_SYMVER Jun 14 15:59:48 and _GLIBCXX_APPLY_SYMVER Jun 14 16:00:36 doest it ring a bell? maybe the warning about conflicting switches? Jun 14 16:05:17 abelloni, you can still find some cheap NOR around Jun 14 16:05:30 but very small Jun 14 16:06:15 https://www.ebay-kleinanzeigen.de/s-anzeige/sharp-zaurus-5500-g/876684449-168-3467 Jun 14 16:06:19 10 euro Jun 14 16:08:43 bbl Jun 14 16:26:00 ah yes that march/mcpu mix I really hate Jun 14 16:26:14 we should just remove march when we know we want to use -mcpu Jun 14 16:26:18 atleast for arm Jun 14 17:02:12 khem, ok, I am guinea-pigging at home Jun 14 17:34:27 ant_home: it might be that you have to use DEFAULTTUNE = "armv5" Jun 14 17:34:41 ant_home: see if that works with everything else remaining same Jun 14 18:59:38 khem, okm then I comment out the ARM_INSTRUCTION:SET="thumb" Jun 14 19:45:12 ant_home: yes Jun 14 20:58:07 khem, then no alignment traps Jun 14 20:58:09 :) Jun 14 20:58:13 this is od https://filebin.net/p7y19db5nvxle5e8/zz2?t=h2fsyfzb Jun 14 20:58:54 TUNE_FEATURES = "arm armv5" Jun 14 20:59:06 so thumb and dsp are lost Jun 14 21:01:22 now trying with armv5e Jun 14 21:08:32 ok, this gives TUNE_FEATURES = "arm armv5 dsp" Jun 14 21:09:14 but I see readdir seems bad again: https://filebin.net/6tamgu3tsmda06f9/zz3?t=yjwgwhoq Jun 14 21:09:24 khem, so it is the 'e' Jun 14 21:47:49 yes, align trap Jun 14 21:50:46 trying now with TUNE_FEATURES = "arm armv5 thumb" and forcing instruction set to use thumb Jun 14 21:55:57 musl does not change, vaid readdir Jun 14 21:56:03 *valid Jun 15 02:23:15 ant_home: its a bug in gcc Jun 15 02:23:29 I think get along with workaround for now Jun 15 02:23:53 it only has to do with gcc being over enthusiastic about combining store/loads **** ENDING LOGGING AT Fri Jun 15 03:00:10 2018