<rz2k>
seems like I finally figured nand out, it only ECC errors on two problems: hardreset while ubi didnt dump the RAM buffer; usage of last 4 blocks in nand
<rz2k>
I limited my ubi partition to not to use last 500MB of nand and now it survived 4 reboots without ECCing
<rz2k>
(500mb is just countermeasure to test if it is really last blocks of the nand)
mdfe has quit [Remote host closed the connection]
<rz2k>
by ecc errors I mean ecc errors on ubiattach/mount -t ubifs
<hno>
and return is wrong. Should be return i, not return size.
<oliv3r>
hmm, i'm sure i had that; but i think i reverted that when I changed some things around
<oliv3r>
i + 1 though, no?
<hno>
no, it's already +1 from the for.
<oliv3r>
ah it is
<mripard>
oliv3r: the sid_key multiple allocations in read_byte looks weird too
<oliv3r>
what i had before was size = i + 1;
<oliv3r>
mripard: what do you mean?
<mripard>
well, you have
<mripard>
u32 sid_key
<mripard>
sid_key = 0
<mripard>
if () {
<mripard>
sid_key = 0
<oliv3r>
ah yeah
<oliv3r>
it is weird and wrong
<mripard>
you want to be extra sure it's 0 + :)
<oliv3r>
well of course :)
<oliv3r>
nah, it's sloppy cleanup
<mripard>
I guess you could just do u32 sid_key = 0
<oliv3r>
i made the if only goto
<oliv3r>
yeah i once read thath that is bad practise though
<oliv3r>
i think it had to do with that C guarantees everything is initizlized to 0
<oliv3r>
and, you shouldn't put assignments in declration bits
<oliv3r>
but if you think that looks prettier; i'll change it. I do think it makes it look smaller
<mripard>
no, it doesn't
<mripard>
except for static variables
<oliv3r>
ah ok
<n01>
and everything in .data and .bss
<hno>
n01, that.s globals and static.
<n01>
yep
paulk-desktop has joined #linux-sunxi
<n01>
btw mripard once you told me that accessing register wrapping the register with a struct is a bad practice but i don't remember why
<oliv3r>
hno: mripard pushed to github; ok should be good to go then?
<mripard>
yeah, there's still the "return vs goto" thing you had comments on, but it's your call on this one. Both are fine for me
<mripard>
n01: yes, but oliv3r doesn't do it here
<oliv3r>
mripard: yeah, if you are really strongly for either/or; of course i'll change it. I personally like the use of goto for error handling, it fits well. I know it's personal and I know you can't please them all :)
<n01>
yeah I know, but it is something aw does in the newer rtc driver
<oliv3r>
mripard: allwinner does it in their RTC driver
<oliv3r>
n01: allwinner did it with ALL their registers
<oliv3r>
i think a lot was cleaned up
<n01>
yes, now I'm seeing it with their RTC
<hno>
oliv3r, looks reasonable to me.
<hno>
n01, their copy-pasted RTC? Or their A10 RTC?
<mripard>
oliv3r: yeah, honestly, for such a small driver, I don't care. But I'm not the one that will merge your patch :)
tkoskine has quit [Ping timeout: 240 seconds]
<oliv3r>
ok i'll make note of it in the cover-letter that i've used goto instead of return :)
<oliv3r>
hno: thank you very much
tkoskine has joined #linux-sunxi
<n01>
hno: uhm I'm not aware of the copy-paster RTC ... the only rtc driver I know is rtc-sun[47]i.c
<oliv3r>
mripard: who will merge it? do I have to CC him? :)
<mripard>
Arnd and GKH
<oliv3r>
ah arnd responded; gkh not so much
<n01>
ah ok ... then in sun7i :) they use structers to wrap the registers
<n01>
*structures
<oliv3r>
n01: yeah AW always did that with their stuff
<n01>
I don't remember why it is bad practice
<hno>
n01, there is also an rtc-sun5i.c from Allwinner... but there is no RTC inside sun5i.
<n01>
yes, atm I'm working on the sun[47]i rtc driver
<oliv3r>
hno: rtc-sun5i.c is a wrapper around a philips i2c driver
<mripard>
n01: for two things actually
<oliv3r>
hno: it was brought up on the ML :)
<mripard>
the first one is that you have to do the barriers/endianness conversions yourself
<oliv3r>
mripard: btw, you merged that marvel driver rather quickly :)
<mripard>
oliv3r: I started working on it before receiving his mail saying he didn't want my own driver :)
hansg has quit [Remote host closed the connection]
<hno>
oliv3r, it's no wrapper.. but you are correct on the rest.
<mripard>
but yeah, it went pretty well, in like an hour or so, it was working, it could have been way worse :)
<n01>
the second one? O_O
<oliv3r>
mripard: oh very cool; makes things a lot easier :)
<oliv3r>
n01: barriers, endianness; 2? :)
<oliv3r>
oh no, there'll be more!
tzafrir has joined #linux-sunxi
<mripard>
n01: ah yes, I got interrupted, sorry
<mripard>
the second one is that whenever you have a register layout that keeps repeating itself, it's not very convenient to use structures
<oliv3r>
my fault :p
<hno>
mripard, what do you mean?
<mripard>
hno: well, for the PIO for example, you have exactly the same register set, to configure the pins, set the pins values, etc. that repeats itself in memory for the different banks
<mripard>
I'd find it very cumbersome to use a structure with the same layout to access the registers.
<hno>
Yes.. but don't really see why it becomes harder. It's just one struct reused.
<hno>
But implementations usin mostly the same register layout is a good argument.
leowt has joined #linux-sunxi
<n01>
mripard: thanks :)
n01 has quit [Read error: Connection reset by peer]
jemk has joined #linux-sunxi
n01 has joined #linux-sunxi
<Turl>
oliv3r: 'sup? :)
<oliv3r>
i forgot
<oliv3r>
wait
<oliv3r>
oh yeah, you asked at 3 am if i was still here
<oliv3r>
so Turl pong :)
<Turl>
oliv3r: ah right, I was going to ask what you meant by separate namespaces or sth like that on your email
<Turl>
oliv3r: "Even that hint didn't trigger me as to why this could cause problems. Userspace guy here, every driver has its own memory space right? So I've added a guard that we only load this driver once and only if p_sid_reg_base is NULL. "
gzamboni has joined #linux-sunxi
<oliv3r>
Turl: ohh yeah well
<oliv3r>
in userspace, every process has it's own 4 gigs of address space
<oliv3r>
so if you load something twice, it doesn't matter, whether the variable is global or not
<oliv3r>
appearantly in the kernel world, things are different
<oliv3r>
everything operates in the same memory space
<leowt>
i see that android puts all modules in the same dir
<leowt>
how do i compile a kernel like that
<Turl>
leowt: normally and then find -name "*.ko" -exec cp {} directory/where/you/want/modules \;
<Turl>
:p
<oliv3r>
leowt: copy :p
<Turl>
oliv3r: hm yeah but the kernel is a single process you could say
<oliv3r>
or what turl said
<leowt>
copying them out?
<leowt>
ook
<leowt>
xD
<oliv3r>
Turl: yeah, i suppose so :)
<leowt>
is there any way to tell make to put them like that
<leowt>
?
<oliv3r>
leowt: not that I know of
<leowt>
scripts provided by allwinner sdk do that
<leowt>
going to take a look
<oliv3r>
leowt: it's really nothing fancy; just copy the stuffs and it'll be fine
<leowt>
oliv3r: ook, so then i will try to get the asop building the kernel instead of the nasty copy scripts allwinner has
Amirkasra has joined #linux-sunxi
Amirkasra has quit [Client Quit]
<hno>
leowt, android does everthing by NIH method.
<leowt>
NIH?
<oliv3r>
Not Invented Here
<leowt>
lolol
<oliv3r>
well what else would you call 'repo' etc :)
<leowt>
oliv3r: allwinner has an external dir called "linchee" where you build kernel and then when you later call extract-bsp on androis source
<leowt>
it copies kernel and modules from that dir to the device dir
<leowt>
so i am just saying that is not cool
<leowt>
=)
<hramrach_>
yes, android system has much NIH
<hramrach_>
and it does not work
<leowt>
i am confused
<hramrach_>
how the hell are you supposed to check out an android repo?
<leowt>
doesnt the android build system compile a kernel for the device?
<leowt>
so the 'device'_defconfig is there
<leowt>
and the insults when you try to bypass that xD
<hramrach_>
that does not mean that AW cannot build yuet another kernel
<leowt>
hramrach_: so you are saying that android build is not supposed to build kernel, but it can do it
<leowt>
?
<hramrach_>
I don't know what android build does. I cannot even check out any android repo
<hramrach_>
it always fails with github asking for password during repo sync or just saying that sync failed without specific reason
<leowt>
hramrach_: dude, you are confusing me hah xD
<hramrach_>
all I see andriod build system is a big kludge
<hramrach_>
and I would not be surprised if AW put yet another kludge on top of that
<leowt>
for what i can see now
<leowt>
i can agree to that
<hramrach_>
seems it fails somewhat deterministically so maybe the sync failing is not so much problem of the repo tool as the repo config being broken
<hramrach_>
but there is absurdly no diagnostic nor help nor anyhing
<leowt>
hramrach_: i dont understand what you are describing, so far it never failed sync
<leowt>
to me
<hramrach_>
it 100% fails for me
Quarx has quit [Read error: Connection reset by peer]
Quarx|2 has joined #linux-sunxi
<hramrach_>
and you need to init a repo to get repo help, soo awesome
LoCoZeNoz_ZUE has joined #linux-sunxi
<hramrach_>
sync is the only command available for update and does not seem exactly bandwidth-consuming
<Turl>
hramrach_: if there's specific repos failing but you want to tell repo to keep crusading and syncing the rest use -f
<hramrach_>
is that of any use with missing repos?
<Turl>
hramrach_: how do you plan to sync them if they're missing? :)
<LoCoZeNoz_ZUE>
I didnt succed in setting up ft5x_ts.ko
<LoCoZeNoz_ZUE>
Module seems working
<hramrach_>
they will be missing locally because they failed to sync
<LoCoZeNoz_ZUE>
Compiled with all the patches and stuff, loaded....
<LoCoZeNoz_ZUE>
Yet, Xorg doesnt want me to have a linux tablet
<hramrach_>
X log?
<LoCoZeNoz_ZUE>
uno momento
<hramrach_>
Turl: I can't pastebin the sync log because it's > 150k
<Turl>
hramrach_: sync -f a couple of times and get the last error log
<hramrach_>
but it fails with request to supply a github username and passworg
<Turl>
hramrach_: over what protocol?
<hramrach_>
https
<Turl>
are the repos private?
<hramrach_>
how do I tell?
<hramrach_>
it only prints the repo name *after* it syncs
<hno>
oliv3r, and the DMA gate is already defined.
<leowt>
that boot is from a13_nuclear_defconfig
<hno>
#define AHB_GATE_OFFSET_DMA 6
<hramrach_>
incompatible libs on single-arch system ..
<hno>
hramrach_, Probably it builds with -m32...
<hramrach_>
incompatible libs on single-arch system .. /o\
<hno>
hramrach_, x86 != x86_64.
gzamboni has quit [Ping timeout: 276 seconds]
<hramrach_>
but why does it build x86 binaries on x86_64?
<oliv3r>
hno: yeah i assumed as much
gzamboni has joined #linux-sunxi
<oliv3r>
hno: i'll try and see if I have time to work those registers in
<oliv3r>
defines > magicvalues
<hno>
hramrach_, because they try to be pleasing the binary blob fanatics?
<oliv3r>
hramrach_: android is horrible to build; i got stuck too :) there's a bug i think, where it wants libz.so (32bit) and it doesn't use its own packaged version. If you have a 32bit libz.so no problem, it uses that instead; i tried adding libz.so and got segfaults to gave up
<oliv3r>
hramrach_: android build chain is fully 32 bit in mind, 64bit is broken
<oliv3r>
BUT if you want to try ...
<hramrach_>
:s
<hramrach_>
it also does not find ccache. you have to supply your own
<leowt>
i am building it with ubuntu 12.04
<leowt>
and it is ok
<leowt>
64bit
<hramrach_>
after you fix all the bugs it is buildable I assume
<oliv3r>
hramrach_: i have no issues not using CCACHE
<hramrach_>
that would work too I guess
<hramrach_>
but when you enable it build fails
<oliv3r>
but i ran to a bug with aapt/png's so if you bump into that too;
<oliv3r>
confirming that 64 bit builds are broken
<hramrach_>
you just need 32 bit libs
<hramrach_>
but would be easier to use 32bit system to start with then
<hramrach_>
export BUILD_HOST_64bit=1 , hmm
<hramrach_>
maybe try that for start
<oliv3r>
hramrach_: yeah please do
<oliv3r>
and see if you fail at the same spot
<oliv3r>
if so, its' worth investigating why
<oliv3r>
if not; i'll fix my 32bit build
mturquette has quit [Ping timeout: 240 seconds]
Yaku321 has joined #linux-sunxi
<hramrach_>
yes, need lib32z1
<hramrach_>
lots of output with BUILD_HOST_64bit=1
mdp has joined #linux-sunxi
mdp has quit [Client Quit]
mturquet1e has joined #linux-sunxi
mdp has joined #linux-sunxi
mturquet1e is now known as mturquette
mturquette has quit [Changing host]
mturquette has joined #linux-sunxi
Yaku321 has quit [Read error: Operation timed out]
mturquette has quit [Quit: leaving]
mturquette has joined #linux-sunxi
Yaku321 has joined #linux-sunxi
hramrach_ has quit [Ping timeout: 240 seconds]
BJfreeman has quit [Ping timeout: 252 seconds]
<drachensun>
I setup an ubuntu virtual machine to build Android, I even got the old 10.04 version it likes. That seemed to work pretty well, I didn't have to mess with anything
hramrach_ has joined #linux-sunxi
leowt has quit [Quit: leowt]
<hramrach_>
but fails the same way
<hramrach_>
they insist on making acp 32 bit but no libs for that
<drachensun>
hramrach_ : Replay of my last comment, I setup an ubuntu virtual machine to build Android, I even got the old 10.04 version it likes. That seemed to work pretty well, I didn't have to mess with anything
<drachensun>
I used that to build turl's CM
<hramrach_>
I am building a different repo
<hramrach_>
and this suckas about android. You don't add/replace just the changed bits when making a mod. You just build the whole thing, tens of gigabytes of same junk
<hramrach_>
how much of Turl's CM is actually different from openbox? nobody even knows. It's not like diffing repos with compiler binaries included makes sense
leowt has joined #linux-sunxi
_BJfreeman has joined #linux-sunxi
jemk has quit [Ping timeout: 252 seconds]
_BJfreeman has quit [Client Quit]
_BJfreeman has joined #linux-sunxi
_BJfreeman is now known as BJfreeman
<hramrach_>
they use gcc to compile C++, not g++ /o\
<hramrach_>
and that does not work because g++ is g++-4.4 and gcc is gcc-4.7.2 an you *need* 4.7 to get libc headers
<hramrach_>
and android does not buld with g++-4.7, of course
<oliv3r>
hramrach_: can you paste your failures? I did have libz64.so so it did work there; so if you have no libz at all; yeah it'll fail i guess; their preload doesn't really work
<oliv3r>
hramrach_: i wanted to build android CM for my galaxy2; with experience learned from there, integrate it into our BSP
<hramrach_>
java failure so far
<oliv3r>
hramrach_: i had a javac somewhere (for openbricks incidentally) so just exported the javac as such
<Turl>
leowt: no, they have nothing to do with the kernel build
<leowt>
then how do i make them match
<leowt>
?
<Turl>
leowt: mali has a kernel module (mali.ko and ump.ko) and a userspace side (these libs I mentioned)
<Turl>
linux-sunxi has a newer mali kernel module than lichee
<Turl>
so you need to upgrade the userspace side too
<Turl>
just download the libs from the repo I linked and replace on your android and it should do the trick
<leowt>
Turl: so, those are userspace blobs, and the version you mention that must match is the version of those blobs with something with mali in the kernel right?
<Turl>
leowt: yes, the version is r3p0 or something like that
<leowt>
Turl: hmm i see
<leowt>
tnks
<leowt>
=)
leowt has quit [Quit: leowt]
* oliv3r
wonders, building with an extra harddisk, fully dedicated to a VM, or over NFS