<gordan>
Hmm... Just seen some weirdness with RTCs again.
<gordan>
On 4.3
<gordan>
Same behaviour as I'd seen on 4.1.12.
<gordan>
s3c was out but settable, but max wasn't working before or after setting the s3c.
<gordan>
Rebooted and the old behaviour returns (max works again, and seems to have remembered the correct time).
<gordan>
And I bet 4.1.12 behaves the same way (I only booted it a few times, could have been a fluke that it didn't work every time when I tried it).
<gordan>
So it could be an initialization race of some sort.
<gordan>
On a completely unrelated note, is there a way to get access to the u-boot variables from userspace?
<gordan>
Is there an MTD device driver I need to enable?
<gordan>
u-boot seems to indicate it's a SPI device, I compiled the MTD SPI chip support (including SPI NOR), but /dev/mtd* modes still don't show up.
<gordan>
Is the driver for the relevant chip not available in the Linux kernel even though it is in u-boot?
<gordan>
Or did I just not build the correct one?
<sjoerd>
gordan: if you chain load u-boot the u-boot vars would be just on mmc
<sjoerd>
you can't really tweak the mmc vars on spi in a standard way
<gordan>
Which MMC?
<gordan>
I'm chain loading u-boot on a uSD card.
<gordan>
And if I change the card to a different one, the u-boot variables stay the same.
<sjoerd>
the uSD then
<gordan>
So it's not kept on the uSD card even if u-boot is there.
<sjoerd>
that's odd, i would have sworn the standard u-boot config for the exynos crheombooks put the vars on the mmc it got booted from
<sjoerd>
check the u-boot config ? :)
<gordan>
When I do saveenv it says it's writing to SPI W25Q32DW, 4KB erase block size 4MB total size.
<gordan>
CONFIG_SPI_FLASH seems to be set in u-boot config.
<gordan>
As is CONFIG_CROS_EC_SPI
<sjoerd>
ah indeed
<sjoerd>
then yeah it's on the SPI flash, surprising
<gordan>
The question is, what driver do I need in the kernel to get access to it?
<sjoerd>
iirc there are outstanding pathes for the spi device
<sjoerd>
javier__ posted some, so he's the best to ask for the status
* gordan
will wait for a words of wisdom from javier__ on this subject ...
<gordan>
I just want fw_printenv to work, so I can dump it out without having to take a photo of printenv in u-boot and transcribe it for the image installation howto. :p
<sjoerd>
why do you need people to set u-boot variables?
<sjoerd>
that would be sad
<gordan>
Becsause I am positively hating how the standard boot process is set up.
<gordan>
I replaced it with something a quarter of the size and an order of magnitude better legibility.
<gordan>
The default u-boot process goes through a whole bunch of hoops, that eventually fails anyway if you deviate even slightly from the partitioning and boot process assumptions.
<gordan>
So on the whole I fail to see the purpose of an elaborate, complex process that is just as fragile as a simple one, and less debuggable to boot.
<sjoerd>
you have one bootable partition and put en extlinux.conf on it, that's it
<sjoerd>
not sure what's so hard about that
<gordan>
For example, my partitioning is: 1) ZFS pool, 2) u-boot binary, 3) squashfs partition, 4) /boot
<gordan>
So I want u-boot to go find zImage and dtb on /boot, set the bootargs including root=/dev/mmcblk1p3 (sqhashfs) and zfsroot=poolname/ROOT, and get on with it.
<gordan>
But that would make the u-boot process distillable even further, even smaller than what I use, which is already massively smaller than the u-boot default.
<sjoerd>
not sure if the, it looks for a partition with the boot flag, is documented
<sjoerd>
meh
<sjoerd>
just don't change it and it should just work
<sjoerd>
but your choice
<gordan>
Put it this way, I took one look at the default variables and I thought it was enough of a mess to nuke it all and start from scratch.
<sjoerd>
that just translates to "I didn't understand it, so i threw it away" :)
<sjoerd>
but yes the default stuff is quite flexible and it will take a while to understand, u-boots scripting is not that awesome in that respect
<sjoerd>
however for a user it should be quite convenient
<gordan>
It's true, it does translate to that. It also translates to: "it wasn't obvious enough"
<daniels>
one man's mess is another man's necessary complexity
<daniels>
it depends on whether your goal is to have things work easily and portably (the people who designed those variables), or if your goal is to understand literally everything first-principles from scratch (you)
<gordan>
True that. I'll take a look at the defaults again and into using either uEnv.txt or extlinuc.conf. If I can look for a partition with a boot flag and look for uEnv or extlinux, then I can probably make it both understandable from 1st principles and generic enough for same convenience as defaults.
<sjoerd>
the documentation i pointed to exlains how these bits work without having to reverse engineer them
<sjoerd>
daniels: there is that and it's essentially generated code from a bunch of macros, which makes it not be very optimised for reading in the first place
<javier__>
gordan: CONFIG_CROS_EC_SPI has nothing to do with the SPI flash but is the driver used by u-boot to talk wit the Embedded Controller over SPI
<javier__>
gordan: there are patches posted to access to the SPI, I posted some using spidev directly and other dev to use the mtd spi nor driver
<javier__>
gordan: but the SPI is write protected so it will not be convenient for users anyways
<javier__>
gordan: as sjoerd and daniels said, I suggest you take a lookt to the u-boot distro commands
EmilMedve has joined #linux-exynos
<gordan>
javier__ u-boot distro commands?
<gordan>
Oh, righti
<gordan>
I'll take another look at it.
dlan has quit [Ping timeout: 252 seconds]
dlan has joined #linux-exynos
EmilMedve has quit [Quit: Leaving.]
EmilMedve has joined #linux-exynos
afaerber_ has quit [Quit: Ex-Chat]
afaerber has joined #linux-exynos
afaerber has quit [Quit: Ex-Chat]
afaerber has joined #linux-exynos
amitk has quit [Quit: leaving]
EmilMedve has quit [Quit: Leaving.]
ssvb has joined #linux-exynos
liquidAcid has joined #linux-exynos
afaerber has quit [Quit: Ex-Chat]
gordan has left #linux-exynos ["Konversation terminated!"]