/srv/irclogs.ubuntu.com/2009/11/24/#ubuntu-arm.txt

=== pan1nx is now known as info
=== info is now known as help
=== asac_ is now known as asac
=== ali12341 is now known as ali1234
=== ogra_ is now known as ogra
* ogra takes his first look at http://qa.ubuntuwire.org/ftbfs/ in lucid and boggles11:37
ograchecking for C compiler default output file name...12:22
ograconfigure: error: in `/pulseaudio-0.9.20':12:22
ograconfigure: error: C compiler cannot create executables12:22
ograSee `config.log' for more details.12:22
ogramake: *** [config.status] Error 7712:22
ograroot@dove:/pulseaudio-0.9.20#12:22
ograGRRR !12:23
amitkogra: do you have ccache installed?12:32
ograamitk, nope12:32
ograthats a lucid chroot under karmic12:32
amitkok, I see that error with dkms packages and ccache installed12:32
ografreshly set up, only instaled build-essential and devscripts in it12:32
zumbiogra: is it amd64 platform?12:37
ograthats on an arm platform indeed12:37
ograwe dont cross build anything in ubuntu usually12:38
zumbiuhm.. ok, i need to go now12:39
=== ogra_ is now known as ogra
loologra: and what does config.log say?13:55
ogranothing special apart from: configure: exit 7713:56
ograNCommander, so about pulse ... afaik the macros are for ARMv7 which is why i added that --march setting when we still were building for v5 , can you try to disable thumb instead ?13:58
ogragenerally they should work for v6 and v7 builds13:59
ogra(they were added by the nokia community afaik, so should be for omap (i.e. v7))13:59
loologra: Can you upload the full config.log?14:00
ograsure, one sec14:00
* ogra wonders how to convince chrome to not show that ugly blue when highlighting stuff14:01
ogralool, http://people.canonical.com/~ogra/config.log14:02
loolcc1: internal compiler error: Illegal instruction14:04
ograyeah, just saw that too14:04
ograi guess i should upgrade my dove kernel first :)14:04
loolYeah that looks like a memory or stability issue -- Z0?14:05
loolHmm no Y0 for you*14:05
ograY0 but -204 kernel14:05
loolI mean you don't have Z014:05
ograright14:05
suihkulokkiwhile at pulseaudio, can someone tell me howto add a compiler flag for one file in a automakish sourcetree properly14:05
ograbut my kernel is outdated14:06
suihkulokki0.9.20-1 in debian did it wrong, so I it didn't work in 0.9.21-1 anymore14:06
loolsuihkulokki: Don't think you can override per .o; I guess you can create custom rules or use convenience libs?14:11
loolOh you can actually14:11
ograthats what my patch does in karmic :)14:12
loolSee 27.814:12
ogramake -C src libpulsecore_0.9.20_la-svolume_arm.lo CFLAGS+=-march=armv614:12
loollibfoo_a_CFLAGS14:12
ogra^^^ my karmic patch14:12
ograindeed yours is more elegant14:13
suihkulokkihow would libfoo_a_CFLAGS translate to the svolume_arm.o ?14:15
loolsuihkulokki: Depends what you're building14:16
* lool reads source14:16
loolsuihkulokki: libpulsecore_@PA_MAJORMINORMICRO@_la-pulsecore/svolume_arm.o I think14:18
loolNot sure how / is handled though14:18
loolFor the example of:14:19
lool     noinst_LIBRARIES = libfoo.a14:19
lool     libfoo_a_SOURCES = foo.c foo.h14:19
loolsuihkulokki: Actually nevermind, I can't read; they basically recommend using convenience libs or noinst libs14:20
loolI read it too quickly14:20
saeedbjeron-mobile:14:20
loolSo what you want is noinst_LIBRARIES = libsvolume_arm.a and libsvolume_arm_SOURCE = pulsecore/svolume_arm.c + libsvolume_arm_CFLAGS = whatever14:21
looland libpulsecore_@PA_MAJORMINORMICRO@_la_LDADD = libsvolume_arm.a14:22
NCommanderogra, I'm not quite sure how to turn off thumb14:41
ogra--nothumb ? :)14:42
ogra(gusessing, no idea if that exists :) )14:42
NCommanderogra, I'll have to read the manpage ;.;14:42
NCommanderogra, Dave Martin did however give quote a few flags in his talk. I might try some14:42
ograhmm, where is he ?14:43
ograi thought i saw him joining14:43
ograoh, that was on -meeting14:43
NCommanderogra, dmart is here as well :-)14:44
dmartHi14:44
ograah14:44
dmartTo turn off thumb, you should use -marm14:45
loolYeah14:45
ograah, right ...14:45
* ogra now remembers it from the talk14:45
loolToo bad it's not detailed in the man page, just listed14:45
NCommanderogra, I think we should still have a bug on this. Having pulse use thumb probably is a good thing.14:46
dmartAh, yes, pulseaudio14:46
ograyes14:46
ograand upstream should know about it14:46
NCommanderdmart, yeah, the issue is that there's some handwritten instructions in it that go bust in thumb2 mode14:46
ograthey did some effort to add v6/7 support14:46
NCommanderdmart, since it tries to use conditionals that aren't availble14:46
ograso will likely be intrested in thumb as well14:47
NCommanderaddcs/subcs14:47
ograyeah, that v6/7 patch is quite ugly14:47
ograbt nobody upstream has a clue about arm14:47
ograso lennart just accepted it blindly14:47
NCommanderogra, *shiver*14:48
NCommanderogra, if -marm works, lets push that, and then I'll asign a bug to myself on portng to Thumb2 mode14:48
ograi talked to him at the maemo summit and he said he just takes what people give him... but given he has no clue and neither HW he wont test it at all14:48
ograas long as it doesnt break x86 at least14:48
ograNCommander, cool14:48
NCommanderogra, I did some reading on thumb2 mode, but the documentation is a bit thick :-)14:49
armin76NCommander: i'm here too *g*14:49
NCommanderhey armin7614:49
NCommanderarmin76, how's your handwritten thumb2 ASM? :-)14:49
armin76NCommander: i suggest using -marm as well14:49
* armin76 runs14:49
NCommanderarmin76, ;-)14:50
armin76NCommander: i 'fixed' the sigbus on firefox on sparc, you slacker :)14:50
NCommanderarmin76, thats nice. Now fix upstart :-)14:50
NCommanderIts a bad thing when /init crashes14:50
NCommander*/sbin/init14:50
armin76on sparc?14:50
ograwhy should init crash ?14:50
NCommanderogra, it segfaults due to alignment issues on SPARC14:51
* ogra points to the channel name :P14:51
* NCommander points to armin76's last comment and leaves it at that14:51
armin76ok, staying on topic...14:52
* NCommander should probably poke his Y114:52
armin76NCommander: i'll fix it if you fix me not having an armv7 board :)14:52
NCommanderarmin76, you can buy imx51 hardware now :-P14:52
armin76NCommander: i get no profit from this, you do? :)14:52
NCommanderarmin76, or buy a motorola droid and find a way to get root on it ;-)14:53
ograyeah, just win the lottery and buy a babbage board :)14:53
armin76NCommander: can't i get your z0? :(14:53
ograits *only* $750 :)14:53
NCommanderarmin76, I never had a Z014:53
NCommanderarmin76, I have a Y0, and a y1 (which is having issues)14:53
armin76NCommander: can i get ogra's z0?14:53
NCommanderarmin76, I think you should ask ogra instead of me :-)14:54
armin76NCommander: but you can steal from him :)14:54
dmartOops... got distracted there14:54
NCommanderarmin76, I'm not flying to Germany to break into his house, hide from his dog, steal his Z0, and fly back in the cover of night14:54
armin76boo14:55
ograarmin76, you can get all Z0's i have atm ...14:55
dmartI took a look at the pulseaudio issue at the end of last week... there's an explicit CFLAGS+=-march=armv6 in debian/rules.  This is actually an architecture downgrade and turns off thumb2, when building for v714:55
NCommanderhrm14:55
armin76ogra: gimme!14:55
ograarmin76, dont have any :P14:55
armin76who has? :)14:55
NCommanderdmart, it should turn off thumb2, but it looked like it didn't actually turn off thumb214:55
NCommanderarmin76, lool and plars14:56
ogradmart, it was an upgrade (i added it when we still built for v5)14:56
dmartNCommander: how do you mean?14:56
ogradmart, it needs to be dropped now14:56
ograin later karmic it was actually a no-op14:56
dmartogra: yes, I see14:56
ograin early karmic it fixed the same code thumb chokes on now14:56
dmartDoes anyone know a list I can subscribe to to get a record of all the build failures...?  doko told me at UDS, but I failed to make a note of it.14:57
ograwhich is hardcoded oma assemble stuff iirc14:57
NCommanderdmart, it looked like to me it was trying to do thumb2 with armv6 instructions14:57
ogra*omap14:57
ogra*assembler14:57
* ogra needs a typing course14:57
NCommanderdmart, http://qa.ubuntuwire.com/ftbfs/14:57
dmartNCommander: did you need an explicit -Wa,-mimplicit-it=thumb to get it working?  I think my toolchain may be a bit out of sync, but I needed that14:58
NCommanderdmart, I'm still waiting for my lucid chroot to build14:58
ograNCommander, hmm ?14:58
NCommanderogra, ?14:58
ograhow did you do the testbuild that made you say it fails on thumb ?14:58
ograwithout having a lucid chroot14:59
dmartOK; doko was going to make gcc pass -Wa,-mimplicit-it=thumb to as by default, but this was a recent suggestion and I don't know if it's merged yet.14:59
NCommanderogra, I used a PPA during UDS14:59
ograa *lucid* PPA ???14:59
ograwhere did you get that ?14:59
NCommanderogra, some of us have native PPAs ;-)14:59
dmartOh, right-- I used the "proper" lucid toolchain :P14:59
ograyeah14:59
dmartWhere should I be looking?  doko's PPA?14:59
NCommanderdmart, for lucid toolchains?15:00
dmartre http://qa.ubuntuwire.com/ftbfs/, is there also a list I can subscribe to?   It might be easier to review failures as they occur.15:00
ograi dont think there is a list15:00
ograthe uploader is the only person getting build failure notifications atm15:00
dmartdoko pointer at ubuntu-buildd-admins or something like that, but I don't see that on lists.ubuntu.com15:01
armin76lool: gimme your z0!15:01
dmartNCommander: lucid toolchains, yes15:01
NCommanderdmart, well ... I think the answer is run lucid on ARM? :-)15:01
dmartNCommander: that's what I was doing :)15:02
NCommanderdmart, then you should already have the right toolchain15:02
ograthat should be fine15:02
dmartNCommander: OK, I'll update and retry.15:02
dmartNCommander: have we also tried -marm for the problem file, instead of letting it default to Thumb-2?  Because the hand-written code may have been manually optimised for ARM, this may give better performance than Thumb-2.15:03
NCommanderdmart, per-file CFLAGS scare me.15:04
dmartIn general, yes; but debian/rules already has that in this case.  Just a suggestion--- alternatively it might be a good idea to add a comment or raise a flag somehow reminding anyone maintaining the code later that porting to native Thumb-2 would be a good idea15:05
dmartbtw comparing .text sections, the overall code size does seem to reduce by just under 30%15:06
dmart...not a very comprehensive test, but it doesn't contradict our expectations.15:06
NCommanderdmart, its a different file that makes things go bust15:06
NCommanderdmart, is there a handy ARM to Thumb2 guide?15:07
NCommanderdmart, I think the CS conditional code isn't being allowed in the block, but I'm not sure how I'm supposed to work around that15:09
NCommanderogra, actually, I found documentation on how to properly Thumb2-ize this code15:20
NCommanderI'm going to try fixing it properly first, and then testing15:20
NCommanderMartyn, how's your thumb2 looking these days :-)?15:24
* Martyn looks at one hand, then the other..15:25
MartynLooks like I have both thumbs...15:25
Martyn*silly grin*15:25
Martyngood, although we really need to verify that thumb2 vs/ full ARM really /does/ save code space15:25
* NCommander whacks Martyn with an ARM reference manual15:25
* Martyn drops the ARM TRM for Cortex A9 on NCommander15:26
NCommanderMartyn, I just want a second set of eyes to make sure I'm not using IT correctly15:26
NCommanderACK15:26
* NCommander throws an execution error as I'm not TRM compatible (yet) :-)15:26
NCommanderMartyn, er, using IT correctly15:26
* NCommander has never had to use it15:26
NCommanderand ...15:26
MartynNCommander: Make sure you have thumb2 support compiled into your kernel flava of choice15:26
NCommanderugh15:26
NCommanderpulseaudio just uninstalled itself on dove15:26
NCommander\o/15:26
MartynWIN15:27
NCommanderMartyn, so if I have an addcs, and movcs instructions15:28
NCommanderI can do this:15:28
NCommanderITT CS15:28
NCommanderADDCS r0, %115:28
NCommandermovcs r6, 015:28
NCommanderto make the linker shutup about CS being in an IT block15:28
NCommanderSince IT takes CS as the condition, and then additional T to tell it that movcs should also be run as true15:29
Martynsure, but that's solving the problem by using a large brick, tied around a cricket bat, and shoved into the problem with a 10 foot ram15:29
NCommanderMartyn, huh?15:29
Martynit solves the symptom.. but I'm more curious why that code would get generated in the first place15:30
NCommanderMartyn, oh, this is handwritten ASM15:30
NCommanderMartyn, not auto-generated15:30
MartynAh, in which case you've given yourself all the rope in the world :)15:30
NCommanderMartyn, this is pulseaudios codebase :-P15:30
Martynoh.  ugh15:30
NCommanderI've never needed to use IT before because i've never coded in Thumb before15:30
NCommanderI just wanted a sanity check to make sure I'm reading the reference page right15:31
Martynyou are15:31
NCommanderMartyn, thanks15:31
NCommanderMartyn, ARM's reference manuals freaking rock15:31
MartynWant something that rocks harder?15:32
* NCommander is considering buying a dead-tree version for handy desk reference15:32
Martynhttp://infocenter.arm.com/help/topic/com.arm.doc.qrc0001l/QRC0001_UAL.pdf15:32
MartynTHAT is what is printed next to my desk15:32
NCommanderMartyn, OOOH, an updated version!15:33
ograNCommander, you should probably take a look at what angstrom does btw15:33
NCommanderMartyn, (I have the older one with ARM)15:33
MartynYep15:33
ograi can imagine they already have proper fixes15:33
NCommanderogra, for pulse?15:33
ograyes15:33
NCommanderogra, I didn't realize they used thumb2 compiling15:33
ograi thnk they use every optimization omap can do15:34
NCommander1 angstrom = 1.0 × 10-10 meters - that google search was useful :-P15:34
ograsearch for "angstrom beagle"15:34
ograor ask in #beagle15:34
dmartNCommander: dmart, I think the CS conditional code isn't being allowed in the block, but I'm not sure how I'm supposed to work around that: Building with v7+thumb2, you're effectively telling the assembler to pretend that that (ARM) inline assembler is unified assembler source (this is the new syntax that can be assembler to ARM and Thumb)15:37
dmart...however, it is actually the old ARM syntax, to it doesn't contains the IT block annotations needed for Thumb-215:37
dmartgcc -Wa,-mimplicit-it=thumb asks the assembler to guess what the IT blocks should have been instead of barfing15:37
dmartThis option should be in the toolchain by default; but I'm not sure if it's merged yet; that was my earlier query.15:38
NCommanderdmart, I rather just specify it properly */2 cents*15:38
dmartNCommander: specifying it properly is preferable, but you will need #ifdefs to allow the result to assmble when compiled as ARM (e.g., for the Debian folks)15:39
dmartMigrating over time would be good, but there might be a lot of bits of assembler to port if we try to do it all up front.15:39
dmartThe -mimplicit-it=thumb thing is used for Thumb-2 kernel builds, for example.15:40
NCommanderdmart, doesn't the assembler known what the IT instruction is?15:40
NCommander(I can put #ifdef (__thumb__) or whatever the correct ifdef is15:40
dmartNCommander: for historical reasons, GCC uses the traditional assembler syntax when compiling for ARM, and as does not understand IT blocks in this mode (unfortunately).15:42
NCommanderdmart, so ifdef's it is :-/15:42
ograon a sidenote using -marm works ... so we have a fallback if you dont manage15:42
* ogra just has it building15:43
NCommanderogra, thanks. I'm just dist-upgrading karmic to lucid so I can test the resulting binaries after I finish building15:43
dmartNCommander: Absolutely--- -marm is our friend if it looks like we're wasting time on any particular package... we can fix problem cases later.15:43
ograNCommander, given that pulse seems to block the livefses we should probably go with it as a quick fix so we have images asap15:43
NCommanderogra, just give me a few hours to see if we can fix it properly.15:44
dmartNCommander: feel free to throw me your code if you want me to sanity-check.15:44
ograyup15:44
NCommanderdmart, I'll take you up on that offer15:44
ograNCommander, just if you dont mamange it before your holiday15:44
NCommanderogra, right, of course.15:44
NCommanderogra, we probably should have a wiki page with problem packages15:45
ograNCommander, we have the ftbfs list15:45
ograand if you add a workaround you should simply keep it in mind15:45
ograand indeed note it in the changelog15:46
NCommanderogra, fair enough15:47
dmartCan anyone suggest a wiki page to track how we fixed packages.  We don't have to track everything, but it would serve as a FAQ for anyone faced with this task.15:47
* NCommander isn't looking forward to getting OOo building with Thumb215:47
ograi guess the angstrom ppl solved that already15:48
ogradmart, i dont think we have one yet15:48
NCommanderogra, angstorm isn't built for Thumb2 according to #beagle15:48
ogradmart, so feel free to create one in the /ARM namespace on te wiki15:48
ograok15:48
NCommanderfood time15:49
dmartOK... I'll create an empty page and we can stick stuff on there15:49
ograoki15:49
dmartNCommander: gcc defines a macro __thumb2__ which is probably what you want to check for in #ifdefs (maybe you could define a helper #ifdef __thumb2__ // #define THUMB2_ONLY(string) string // #else // #define THUMB2_ONLY(string) // #endif15:51
NCommanderdmart, with implicate-it though, aren't we masking the problem versus properly fixing it?16:12
NCommander^- ogra, asac16:15
ograNCommander, see -devel backlog16:16
ograadding IT is surely the best but likely produces a lot of work16:16
NCommanderogra, *grumble*16:17
ograNCommander, implicate-it is similar but needs to be done on a per file basis16:17
NCommanderogra, per-file basis? I thought you said the default was going to be changed to implicate-it16:18
ograwhich in case of pulse is moot because we already do it for that specific file16:18
ograright "going to be"16:18
NCommanderThat's the issue I have.16:18
* ogra just wants a livefs to check the images16:18
NCommanderI rather have the issues be flushed out16:18
NCommanderAnd then add it on a per-package basis after bugging upstreams16:19
NCommander^- asac - your opinion?16:21
ogragod ... the debhelper stuff in pulse takes nearly as long as the whole build16:22
* NCommander hands ogra a bottle of bleach for his eyes16:23
ograheh16:23
ograseems also that every module has an initscript nowadays16:24
NCommanderogra, my only issue with implicant-its, which will work, is we're plastering over an issue over properly fixing it. I have no objections on specifying it on a per package basis, as long as we keep note of those packages16:24
NCommanderoh wow16:25
NCommanderGCC ICE'ed on lucid here16:25
ograwell, go ahead and fix the code but i doubt you can do it as quick as just switching the hack we already have16:25
ograi'd really like to have testable images by end of the week or even earlier16:26
NCommander"cc1: internal compiler error: Illegal instruction"16:27
NCommanderUh oh16:27
armin76ricer16:28
ograNCommander, yes, i uploaded my config.log with the same error about 3h ago16:29
ograNCommander, though i thought its caused by using the -204 dove kernel ... intresting that it shows up on a recent one too16:29
NCommanderogra, lucid on dove doesn't even get to start X16:29
ograNCommander, it works flawless on the babbage16:30
NCommanderIt dumped me to the console16:30
NCommanderCONFIG_ARM_THUMB is set in config16:30
ograTHUMB or THUMB2 ?16:30
NCommanderTHUMB2 isn't even in the config file at all16:30
ograi doubt it has anything to do with kernel options though16:31
NCommanderogra, I'm getting a sinking feeling ATM.16:32
ogralike ... having to do more work on dove than expected ? :)16:32
NCommanderogra, like, are we sure dove supports Thumb2 properly?16:32
ograwell, marvell said so16:32
NCommanderand are we compiling for Thumb2 properly :-)?16:32
NCommanderdmart, ping?16:33
ograyou should ping marvell :)16:33
NCommanderdmart, do we need special kernel foo for Thumb216:33
NCommanderogra, I just want to make sure we don't need a special CONFIG_* something in the kernel16:33
* ogra doesnt think so ... only if you want the kernel binary itself to be thumb2 as i undrestood16:33
NCommanderogra, context switches and friends would have to be thumb2 aware though16:34
ograroot@babbage2:/pulseaudio-0.9.20# ls -l ../pulseaudio_0.9.20-0ubuntu2_armel.deb16:34
ogra-rw-r--r-- 1 root root 1081438 Nov 24 16:31 ../pulseaudio_0.9.20-0ubuntu2_armel.deb16:34
ograthere we go16:34
ograogra@babbage2:~$ grep -i thumb /boot/config-2.6.31-105-imx5116:34
ograCONFIG_ARM_THUMB=y16:34
ogra# CONFIG_ARM_THUMBEE is not set16:34
* NCommander takes his proposed patch and pops it into a PPA16:34
ograso as you can see, babbage doesnt have it set either16:35
ograTHUMB is there but no THUMB216:35
ograthe pulse build is done in a lucid chroot on a karmic install ...16:36
NCommanderogra, this is a pure lucid system here16:36
NCommanderthings are quite broken16:37
ograwell, we use jaunty on the buildds16:37
ograwith lucid chroots16:37
NCommanderogra, ugh16:37
NCommanderogra, I think there's an alignment fault in X16:37
armin76:D16:37
NCommandercat alignment says User: 9, and Skipped: (16:37
NCommander*916:37
NCommanderwhen I startx16:38
NCommanderthat goes to 10 and 1016:38
ograwell, works on the babbage16:38
NCommanderogra, whats /proc/cpu/alignment say?16:38
ograwhatever we defaulted to in karmic16:38
NCommanderogra, I'm curious if its skipping the alignment faults or not16:39
* ogra tries pulse with -mimplicit-it=thumb16:40
ogra-marm definately worked16:40
* NCommander has a patch that adds the itt line but can't test it16:40
ograNCommander, i'll care for X stuff once i have images ... i wont trash my test-build systems16:41
NCommanderrabeeh, ping?16:41
NCommanderogra, I think we set the default /proc/cpu/alignment to 2 (fixup) so alignment faults won't break the world16:43
NCommanderogra, for some reason, thumb2 seems to break alignment fixup on Dove16:43
zumbiogra: did you solve configure: error: C compiler cannot create executables ?16:43
ograNCommander, -Wa,-mimplicit-it=thumb works too ...16:44
NCommanderzumbi, no, but I can reproduce it16:44
ograzumbi, nope, i just use a board thats known to work :)16:44
NCommanderzumbi, cc1 is abending with alignement exception, and illegal instruction16:44
ograsince i want to get the stuff done16:44
ograthe CC error is definately hardware bound16:45
* NCommander can't get anything done now on lucid due to this bug16:45
NCommanderargh16:45
ograit wont work with karmic either16:45
zumbiwhen building cross compilers on amd64, I get similar errors, since today at my localhost it used to work, while at my remote host I got that error. I think there is something wrong on binutils16:46
NCommanderogra, which binutils you got installed?16:47
NCommanderbbiab16:47
ograNCommander, i can tell you in ~1h when pulse is done16:47
ograthe one thats default in lucid16:48
ograas i said, its a lucid chroot16:48
NCommanderogra, right, fully up-to-date then?16:48
* NCommander just wants to make sure16:48
ograNCommander, debootstrapped right before building, so yes16:49
ograunless doko uploaded something i missed within the last hour16:49
ojnNCommander/ogra: Once you're done doing the feasibility tests, I recommend giving the thumb2 userspace (and kernel) a good workout on babbage. Cortex-A8 has some bugs that your toolchain _has_ workarounds for (if enabled), but they're not 100% fool-proof.16:49
ojnDove doesn't have them, since it's a separate implementation16:49
ograah, that might be the cause for NCommanders probs then16:50
NCommanderojn, ogra Dove isn't Cortex A816:50
NCommanderIt's Marvell ARMADA16:50
ojnNCommander: right, which is what I said above16:50
ojnBabbage is16:50
ograright16:50
ojnI was going to bring it up at UDS but I saw there were patches in the toolchain for it, and figured it was worth to try it first. :)16:51
ograwe'll escalate it to marvell16:52
ograand talk to our toolchain maintainer16:52
ograthanks for the heads up16:52
zumbiNCommander: if you have some time, maybe could test with an older binutils (one from before august/september)16:55
MartynWhat is the name of the Canonical/Ubuntu service that monitors your servers for you?17:08
MartynIt's driving me mad that I can't remembe rit17:08
ogralandscape17:10
dmartall: gcc can be made to pass -mimplicit-it=thumb to the assembler, as a permanent default.17:17
dmartFor inline assembler, the effect may be slightly non-optimal code17:18
dmartFor all other code, there will be no effect, so it's safe to have it as default.17:18
ograyeah17:19
ograand i just confirmed pulse is fine with -mimplicit-it=thumb ....17:19
ograit just finishes rolling the package in my testbuild17:19
dmartIdeally, we would port everything to Thumb2, but I think that may be laborious and not so worthwhile.  Unless we actually reschedule and re-optimise the code, doing it by hand won't be significantly better than the implicit-it approximation anyway.17:20
NCommanderdmart, ogra, so for thumb2 on dove, the issue is at least partially alignment related. Setting alignment to nothing or warn causes a hang. Setting it to fixup causes an ABEND, and illegal instruction17:20
ograso if NCommander doesnt come up with a patch for the assembler code by tomorrow morning, i'll just upload that quick fix and drop it once the toochain uses it17:21
ograso we get a working pulse package17:21
NCommanderogra, I'm testing my fix in a PPA ATM since my board useless to compile stuff on17:21
dmartNCommander: Going back to your kernel question, the "Thumb userspace binaries" option (CONFIG_THUMB) is all you need to enable Thumb-2 support in the kernel.17:21
NCommanderdmart, bugger :-/17:22
ograah, wasnt there a THUMB2 option as well ?17:22
ojnTHUMBEE?17:22
ogra(though i dont see one i thought that was mentioned in one of the session notes)17:22
dmartThere is no separate "THUMB2" option because actually no extra support is needed in the kernel at all.17:23
ojnah, nevermind.17:23
ogragreat ... we're fine then17:23
ograCONFIG_THUMB is enabled in all our kernels already17:23
dmartTHUMBEE is something different; turn this on, since it's useful for JITs etc.; I know there's some openjdk work looking at this.17:23
* jhobbs pokes Martyn 17:24
dmartI don't think any kernel config change is needed17:24
NCommanderdmart, do you know anything about thumb2 and alignment issues?17:24
dmartMy lucid chroot seems to work OK17:24
NCommanderdmart, what hardware?17:24
ogradmart, do you have a dove board around ?17:24
ograseems it has issues17:24
ograthough i dont think its necessarily thumb related at all17:25
NCommanderogra, just for the record, are you using a Y0 or Y1?17:25
ograY017:25
NCommanderSame17:25
* NCommander tries his Y117:25
dmartNCommander: i.MX5117:25
ograand i had the issue with a lucid chroot on karmic17:25
ograwhile you had the same with a plain lucid install17:26
NCommanderogra, why do you think its isn't Thumb specific?17:26
ograwhy do you think it is ?17:27
=== jhobbs is now known as neonfreon
ograits just a compile ICE, it can be caused by anything17:27
ogra*compiler17:27
NCommanderogra, no, the binary is throwing illegal instruction17:27
NCommanderSame as X17:27
ograespecially i dont think the configure script of pulse checks anything related to thumb17:27
NCommanderogra, Try building hello world17:28
NCommanderIt goes boom.17:28
dmartApparently, alignment faulting is not enabled by default in the kernel on v6 and above, so I'm wondering why fixups are needed?17:28
ograright, and why does that point to thumb in your opinion ?17:28
Martynjhobbs : What?  I was on a call n stuff17:29
NCommanderogra, lets see here, We moved to Thumb2. Suddenly alignment always says Skipped: on Dove, Xorg and gcc are failing with Illegal instructions17:29
ograit points surely to the toolchain, but i dont see any specific pointer to thumb17:29
NCommanderAnd I have Alignement trap: not handling instruction in dmesg17:29
ograNCommander, we also moved to armv717:29
NCommanderogra, fair enough.17:29
NCommanderogra, at least its an easily reproduce test case :-)17:30
ograNCommander, and see ojn's comment above17:30
NCommanderogra, about Cortex-A8 quarks? I saw17:30
ograyes17:30
NCommanderIts irreveleant unless the workaround causes issues in non-Cortex A8 chips17:30
dmartNCommander: can you cat /proc/cpu/alignment17:31
NCommanderdmart, 2 (fixup)17:31
ograwell, we use -march=cortex-a8, no ?17:31
NCommanderdmart, if its set to not fix it, then the app just hangs17:31
NCommanderdmart, User: 8/Skipped: 817:31
ograand dove isnt 100% cortex-a817:31
NCommanderStarting X or running GCC causes that count to go up17:32
NCommanderogra, Dove isn't Cortex A8 at all17:32
dmartAll v6 processors and above support full unaligned access by default, excluding certain instructions.  Alignment faulting is optional17:32
ograNCommander, right, thats what i mean ...17:32
dmartNCommander: what happend if you change /proc/cpu/alingment to 1 (warn) ?17:32
NCommanderogra, (ah, English translation error :-))17:32
NCommanderdmart, apps just hang17:32
ograNCommander, which is why i think its rather an issue with the arch than with thumb17:32
ogras/arch/arch setting/17:33
dmartCan you do an unaligned access from ARM and see what happens?17:33
NCommanderdmart, uh ...17:33
* NCommander has nothing handy17:33
NCommanderdmart, got some test code for me?17:33
dmartHow about17:36
dmartvoid main(void) { unsigned long long dword = 0x123456789ABCDEF0; unsigned long result; asm ( "ldr %0, [%1, #3]" : "=r" (result) : "r" (&dword) ); printf("result = %lX\n", result); }17:36
dmartI will try this now... I think it should print result = 3456789A, without falling over17:37
NCommanderdmart, hrm ...17:39
NCommanderdmart, bit hard to compile it when the compiler is falling over :-)17:39
ograbuild it on karmic and run it in your chroot ?17:40
ograerr ...17:40
ograhrm, you upgraded the whole thing ... nm17:40
NCommanderdmart, ARM compiled it works17:41
NCommanderdmart, (User faults: 2 (fixup))17:41
NCommanderdmart, this is with an arm cross-compiler17:41
dmartHmmm, I can send you a couple of binaries?  What's the best way to do that?17:42
NCommanderdmart, email probably17:43
NCommanderdmart, the same binary compiled with -mtumb -march=cortex-a8 works as well on Dove17:43
dmartHang on a mo17:44
* ogra thinks we need a doko here ....17:46
=== bjf__ is now known as bjf
NCommanderdmart, both work on all alignment settings and don't trip an alignment fault17:58
dmartThat's what I was seeing on i.MX51... Weird...17:59
dmartI have to diasppear soon, but can you try triggering a signal when the problem happens and catch it in gdb?  It would be interesting to see what the problem code is.17:59
NCommanderdmart, I'll see what I can do17:59
dmartecho 4 >/proc/cpu/alignment enables a signal on alignment fault; though if you're getting SIGILL anyway, you might not need that18:00
NCommanderdmart, yeah, that changes SIGILL to SIGBUS18:00
NCommanderdmart, I need to install ddebs so I can give you decent gdb output18:00
saeedbNCommander: I didn't follow all the conversation, bug please note the armv6/7 cpus can handle unaligned access when bit 22 of the cp15 control register is set18:09
saeedbbug->but18:09
NCommandersaeedb, right, but we're seeing an unusual issue on Dove Yx boards which shows up as an alignment trap18:10
dmartIs the kernel config the same between these two kernels for CONFIG_ALIGNMENT (or CONFIG_ALIGNMENT_TRAP or whatever the name is)18:10
NCommanderdmart, its CONFIG_ALIGNMENT_TRAP=y on Dovce18:13
NCommander*dove18:13
dmartSame on imx5118:14
dmartsaeedb: You're right, but the control register U bit is legacy only: the armv7 architecture specifies that this bit always reads as one and you can't change it18:15
saeedbI see18:18
saeedbNCommander: what is the issue that causes alignment trap? is it thumb specific?18:18
NCommandersaeedb, we're not sure18:19
NCommandersaeedb, karmic to lucid moved the toolchain and compiled binaries to ARMv7+Thumb from ARMv618:19
NCommanderer, Thumb218:19
NCommandersaeedb, so it could either be Thumb2 causing the breakage, or something in the ARMv7 instruction set18:20
NCommandersaeedb, as far as I can tell, only X and GCC currently go boom18:20
NCommanderAs I can boot the resulting system18:20
NCommanderand xsplash seems to semi-work18:20
NCommanderso I'm unsure18:20
dmartThe ARMv7 instruction set doesn't contain much different from v6, for general purpose code, so Thumb-2 seems more likely.18:20
dmartI haven't tried to boot lucid yet; I've only been running a chroot.18:21
dmartI have to disappear now, but if you send gdb output I'll take a look.  If it's possible to send me a coredump, that would be useful to look at.18:22
NCommanderdmart, lucid does boot18:23
dmartNCommander: glad to hear it :)18:28
dmartCatch you tomorrow18:28
saeedbNcommander:  can you add some debug code in the do_aligment fucntion and check what is the instruction mode?18:32
NCommandersaeedb, I checked the preprocessor flag is set for thumb2 properly, but I'm not sure how to check the register flags to see if we're in thumb2 off the top of my head18:36
=== bjf is now known as bjf-afk
rcn-eehome for lunch and catching up on the irc backlog.  Just to let you know, I'm also seeing some of the same alignment/illegal instructions on my lucid chroot on the beagle...18:43
saeedbNCommander: the thumb mode enable when bit 5 of the cpsr is set. anyway, I think it's better to add some prints in the do_alignment, do you want me to send you a patch?18:53
NCommandersaeedb, that would be nice21:56
NCommander(sorry, didn't see your last message)21:56
saeedbNCommander: sent to your gmail22:36

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!