ChanServ changed the topic of #linux-sunxi to: Allwinner/sunxi development - Did you try looking at our wiki? https://linux-sunxi.org - Don't ask to ask. Just ask and wait for an answer! - This channel is logged at https://oftc.irclog.whitequark.org/linux-sunxi
cnxsoft has joined #linux-sunxi
Mangy_Dog has quit [Ping timeout: 480 seconds]
chewitt has quit [Quit: Zzz..]
vagrantc has joined #linux-sunxi
vagrantc has quit [Quit: leaving]
ftg has quit [Read error: Connection reset by peer]
swiftgeek has quit [Ping timeout: 480 seconds]
JohnDoe_71Rus has joined #linux-sunxi
JohnDoe_71Rus has quit [charon.oftc.net liquid.oftc.net]
PPA has quit [charon.oftc.net liquid.oftc.net]
oliv3r[m] has quit [charon.oftc.net liquid.oftc.net]
dittid[m] has quit [charon.oftc.net liquid.oftc.net]
kmaincent has quit [charon.oftc.net liquid.oftc.net]
vpeter has quit [charon.oftc.net liquid.oftc.net]
kprasadvnsi[m] has quit [charon.oftc.net liquid.oftc.net]
arti has quit [charon.oftc.net liquid.oftc.net]
Nemo_bis has quit [charon.oftc.net liquid.oftc.net]
mps has quit [charon.oftc.net liquid.oftc.net]
kayterina[m] has quit [charon.oftc.net liquid.oftc.net]
ServerStatsDiscoverertraveler4 has quit [charon.oftc.net liquid.oftc.net]
jelly has quit [charon.oftc.net liquid.oftc.net]
zumbi has quit [charon.oftc.net liquid.oftc.net]
juri_ has quit [charon.oftc.net liquid.oftc.net]
megi has quit [charon.oftc.net liquid.oftc.net]
cnxsoft has quit [Ping timeout: 480 seconds]
Bkacjios has quit [Remote host closed the connection]
mps has joined #linux-sunxi
JohnDoe_71Rus has joined #linux-sunxi
arti has joined #linux-sunxi
vpeter has joined #linux-sunxi
kmaincent has joined #linux-sunxi
megi has joined #linux-sunxi
Nemo_bis has joined #linux-sunxi
zumbi has joined #linux-sunxi
kprasadvnsi[m] has joined #linux-sunxi
juri_ has joined #linux-sunxi
jelly has joined #linux-sunxi
dittid[m] has joined #linux-sunxi
ServerStatsDiscoverertraveler4 has joined #linux-sunxi
oliv3r[m] has joined #linux-sunxi
PPA has joined #linux-sunxi
kayterina[m] has joined #linux-sunxi
gamiee has joined #linux-sunxi
Danct12 has joined #linux-sunxi
Danct12 has quit []
Danct12 has joined #linux-sunxi
swiftgeek has joined #linux-sunxi
Daanct12 has joined #linux-sunxi
Daanct12 has quit []
Danct12 has quit [Ping timeout: 480 seconds]
Danct12 has joined #linux-sunxi
cmeerw_ has joined #linux-sunxi
Danct12 has quit [Quit: Quitting]
<Pinchiukas> To have a meaningful chance of creating a dts file for my device I need the fex file?
<gamiee> depends on what device with which SoC you have, but yeah, fex can help you a lot
<Pinchiukas> I don't really have a way to reach FEL mode. But I do have the possibility to boot into linux from an SD card and run sunxi-tools.
<Pinchiukas> Mine is a https://linux-sunxi.org/Ditter_U20
<gamiee> Pinchiukas: there is mentoined that it's possible to get into the FEL mode with on-board button, why don't use it? Also still, you can use SD card image which will automatically trigger FEL
<Pinchiukas> I mean I guess I can trigger FEL mode but I don't have an OTG cable to talk to the device. :D
<Pinchiukas> Maybe there is a way to get the fex file with sunxi-tools that I just didn't see?
<gamiee> If your box still have android inside, it might be easier for you to dump it from the OS
<Pinchiukas> I guess you're implying building a binary for the correct architecture, uploading it to the device and running it?
<gamiee> No no, if your Ditter have still working Android OS inside, you can boot it, get into the terminal, get root access (very easy, only one command), and dump it to sdcard
<Pinchiukas> Hmm... I can get to the terminal but what is the command you mean? 'su' doesn't really work in my case.
<gamiee> Write echo "rootmydevice" > /proc/sunxi_debug/sunxi_debug
<Pinchiukas> You have GOT to be kidding me. :D
<jernej> this one trick is pretty well know for past few years
<jernej> but it doesn't work on newer devices anymore
<Pinchiukas> Jesus christ! Alright, give me a few minutes to try this.
<jernej> anyway, one thing you can be certain of, is that if kernel is locked down, there will be custom interfaces, most probably in /sys, to get similar functionality
<jernej> for example, newer Android doesn't provide /dev/mem anymore, but there are custom drivers, which expose same functionality via sysfs
<gamiee> lol, good to know
<jernej> you need to be root to use them, but I didn't meet any of the shelf TV box, where su wouldn't work
<clever> is it possible to (in device tree) to bind an existing clock (from /sys/kernel/debug/clk/clk_summary) to a set of cpu's for cpufreq control?
<gamiee> Pinchiukas: after you will gain root access, you can dump the FEX from the NAND/eMMC, although, I absolutely don't know in which address is the script.bin (compiled FEX) placed
<jernej> gamiee: script.bin is usually part of U-Boot binary
<jernej> usually you dump whole U-Boot and search for signature and trim file to that address
<jernej> bintofex will ignore any extra data at the end
<jernej> *bin2fex
<gamiee> jernej: oh, good to know, thanks :)
<jernej> FYI, another trick when analyzing Android behaviour - several busybox applets don't have soft link to expose them as standalone programs
<jernej> devmem is usually one of those
<jernej> so run busybox and it will list all supported applets
<jernej> tftp is another one
<gamiee> btw, about the SID in mainline kernel, there isn't any way to write into it atm, right? (at least with nvram driver)
<jernej> no
<jernej> you shouldn't write it unless you absolutely know what are you doing
<jernej> but in that case, you'll be able to collect enough info from github to do it yourself
<gamiee> Yeah, atm, I'm not playing with security features, just want to burn my own serial number to OEM_PROGRAM part of efuse
<Pinchiukas> Looks like there is no /proc/sunxi* on my Android...
<jernej> gamiee: is there anything already?
<gamiee> Pinchiukas: I read somewhere that this root ability was introduced only in some kernel version starting since H3 (if I remember correctly?), so that's probably why. Anyway, you still can use devmem or any exploit for old kernel to get root
<jernej> gamiee: afaik, you can only turn 1 -> 0 (EPROM concept) so writing over already set fuses can be additionally dangerous
<Pinchiukas> Hmm I can do 'su' but apparently that just changes the prompt. I believe I'm still in some sort of sandbox.
<jernej> why?
<gamiee> jernej: oh, there is already some data in OEM_PROGRAM, then probably I would use NV1 part, which is all zeroes, so there shouldn't be a problem to burn anything.
<Pinchiukas> 'id' shows me I'm not uid 0.
<jernej> gamiee: only 1 -> 0
<Pinchiukas> Anyway, maybe I should just try dumping uboot or whatever contains the fex file?
<gamiee> jernej: on linux-sunxi wiki, it's written here that only 0 => 1
<gamiee> (90% of the eFuse is 0)
<jernej> ah, ok
<jernej> maybe it's inverted logic
<jernej> anyway, smaeul can help you here, I know only bits and pieces
<gamiee> Pinchiukas: you can try, but if you're not root, probably it will not work. But I remember that my friend used some exploit for 3.4 kernel to get root
<Pinchiukas> I'm not even sure any more. I can't even find the device file from which I guess I'd try to get uboot.
cnxsoft has joined #linux-sunxi
<Pinchiukas> Can anyone suggest how I could try to get the fex file? :)
<gamiee> jernej: thanks, I found some code which someone used for writing to eFuse and it worked, but it uses kernel functions, so I probably might try to rework that to use /dev/mem , but it's still quite risky
warpme_ has joined #linux-sunxi
<MoeIcenowy> jernej: did you try to implement the scaler on DE2?
<jernej> MoeIcenowy: Scaler works fine for quite some time
<jernej> also on DE3
<jernej> however, I have problem with YUV scaler on DE3.3 (H616)
<MoeIcenowy> sorry
<MoeIcenowy> my sight seem to be broken
<MoeIcenowy> I say sun8i_[uv]i_scaler
<jernej> no problem :)
<Pinchiukas> Can anyone help me extract the fex data so that I can hopefully write a devicetree for my device?
<jernej> Pinchiukas: extract about first 15 MiB from eMMC and then we can talk further
<jernej> I have no idea about NAND procedure
<Pinchiukas> That's cool but maybe you can give me pointers on how to find the eMMC block device? :D
<jernej> one of the /dev/mmcblk
<jernej> just remove SD card and the only one that remains is eMMC
<Pinchiukas> jernej: there is no /dev/mmc* :)
<jernej> well, then you probably don't have eMMC
<jernej> do you have photo of PCB?
<Pinchiukas> I uploaded a couple to https://linux-sunxi.org/Ditter_U20 but can make more if neccessary.
<Pinchiukas> My 'mount' output: https://pastebin.com/raw/4djx24UV
<jernej> ok, your board has raw NAND chip - I don't board with that, so I can't help you here
Mangy_Dog has joined #linux-sunxi
<gamiee> smaeul: hi, I'm trying to burn efuses on my H3. I'm successfully reading them with registers method. But writing is not working. I created my own function but also used the same code that Allwinner's BSP u-boot uses for writing, no success. I'm trying to write into NV1 (0x14). Any guess where can be an issue? I noticed there is function named "set_efuse_voltage" before writing, also I read some mailing list about that some voltage needs to be s
cnxsoft has quit []
cnxsoft has joined #linux-sunxi
cnxsoft has quit []
cnxsoft has joined #linux-sunxi
<gamiee> update: I have confirmed that flashing of fuses works, since I can flash OEM_PROGRAM, but I can't flash NV1 :(
<gamiee> On H3, there is pin named "VDD_EFUSEEBP" which is grounded, maybe this pin needs to be pulled high to be able to burn into NV1?
<MoeIcenowy> Pinchiukas: you can try to read the physical memory (if /dev/mem exists) starting at 0x43000000
<MoeIcenowy> there should be script.bin
<gamiee> another update: NV2 is possible to burn
sunshavi_ has quit [Remote host closed the connection]
<Pinchiukas> MoeIcenowy: there is no "script.bin" anywhere in the filesystem. How exactly do I read the memory? Maybe there's a better way of doing it? Maybe some of the block device refers to storage? Here is the contents of my /dev: https://pastebin.com/raw/wK4UZ0Ub
cnxsoft has quit [Ping timeout: 480 seconds]
uwu has joined #linux-sunxi
ats has quit [Ping timeout: 480 seconds]
megi has quit [Ping timeout: 480 seconds]
megi has joined #linux-sunxi
jernej has quit [Remote host closed the connection]
jernej has joined #linux-sunxi
ftg has joined #linux-sunxi
<gamiee> https://gist.github.com/gamelaster/c34c70261692694904dc84df1c496879 if anyone want to burn fuses, use it at your own risk.
JohnDoe_71Rus has quit []
uwu has quit [Ping timeout: 480 seconds]
vagrantc has joined #linux-sunxi
cmeerw_ has quit [Ping timeout: 480 seconds]
apritzel has joined #linux-sunxi
sunshavi has joined #linux-sunxi
sunshavi has quit [Remote host closed the connection]
sunshavi has joined #linux-sunxi
apritzel has quit [Ping timeout: 480 seconds]