ChanServ changed the topic of #linux-rockchip to: Rockchip development discussion | Wiki at http://linux-rockchip.info | Logs at http://irclog.whitequark.org/linux-rockchip | ML at http://groups.google.com/group/linux-rockchip
markm has quit [Ping timeout: 260 seconds]
markm has joined #linux-rockchip
Danukeru has quit [Ping timeout: 246 seconds]
Danukeru has joined #linux-rockchip
robogoat has quit [Ping timeout: 260 seconds]
robogoat has joined #linux-rockchip
hipboi has joined #linux-rockchip
hipboi has quit [Ping timeout: 240 seconds]
hipboi has joined #linux-rockchip
cnxsoft has joined #linux-rockchip
Ueno_Otoko has joined #linux-rockchip
Ueno_Otoko has quit [Ping timeout: 240 seconds]
dlezcano has quit [Ping timeout: 240 seconds]
naobsd has joined #linux-rockchip
hipboi has quit [Remote host closed the connection]
hipboi has joined #linux-rockchip
Ueno_Otoko has joined #linux-rockchip
Ueno_Otoko has quit [Quit: Quit]
robogoat has quit [Ping timeout: 250 seconds]
robogoat has joined #linux-rockchip
nighty-_ has joined #linux-rockchip
dlezcano has joined #linux-rockchip
nighty-_ has quit [Quit: Disappears in a puff of smoke]
robogoat has quit [Ping timeout: 244 seconds]
dlezcano has quit [Ping timeout: 250 seconds]
robogoat has joined #linux-rockchip
<naobsd> sjoerd: why "rockchip: Also load the initrd below 512M" is not merged? is it rare case?
dlezcano has joined #linux-rockchip
Luke-Jr has quit [Excess Flood]
Luke-Jr has joined #linux-rockchip
Luke-Jr has quit [Excess Flood]
<sjoerd> naobsd: it's been merged recently
<naobsd> oh sorry
<sjoerd> naobsd: is it not in master yet ? iirc it's in the u-boot-rockchip tree now at least
<naobsd> sjoerd: yes, initrd patch and saveenv patch are in u-boot-rockchip, and I couldn't find them in mainline master
<naobsd> I think my master is up-to-date...
<ganbold> does anyone have new u-boot (with ethernet support) for RK3288 (firefly board)?
<sjoerd> naobsd: they get merged in every so often, so should be in master soonish
<naobsd> sjoerd: I see. I misunderstood rk3036 patches are already merged ;)
<sjoerd> ganbold: you can try my wip branch, https://git.collabora.com/cgit/user/sjoerd/u-boot.git/log/?h=topic/rockchip-network
<sjoerd> ganbold: which should work nicely on firefly, those patches need some updates before they'll land upstream though
<ganbold> sjoerd: do you have binary?
<sjoerd> only if i build one :)
<naobsd> I'm thinking to prepare u-boot for rk3066/rk3188 w/o spl...
<naobsd> (use binary blob as spl and mainline u-boot as loader)
<sjoerd> naobsd: fwwi i tried that yesterday for rk3288 to check some differences, ahd that failed early in upstream u-boot
<sjoerd> upstream u-boot was also confused about the memory setup
<ganbold> sjoerd: let me try to build your wip, need to start linux vm
<sjoerd> naobsd: nothing unfixable though :) but that did surprise me
<naobsd> hmm
<sjoerd> ofcouse behaviour on 3188 might well be different
<ganbold> cc1: error: bad value (armv5) for -march= switch
<ganbold> sjoerd: ok, I have u-boot.bin now, how to flash it?
<naobsd> ganbold: some instructions in doc/README.rockchip
<naobsd> tools/mkimage -T rksd -d spl/spl/u-boot-spl-dtb.bin u-boot-spl-dtb.img
<naobsd> then write u-boot-spl-dtb.img at sector 64, u-boot-dtb.img at sector 256
<ganbold> Warning: SPL image is too large (size 0x8261) and will not boot
<naobsd> ganbold ah... which gcc version are you using?
<ganbold> arm-eabi-gcc (GCC) 4.6.x-google 20120106 (prerelease)
<naobsd> ganbold: currently it needs newer gcc or disable something in SPL
<naobsd> to reduce size...
<ganbold> 4.7?
maz has quit [Remote host closed the connection]
<naobsd> probably 4.9 or later...
<sjoerd> afaik 5.x
<xming> FWIW 4.9 and 5.2 gave me comparable sizes
<ganbold> with 4.9 same
<ganbold> Warning: SPL image is too large (size 0x8019) and will not boot
<ganbold> arm-linux-gnueabihf-gcc (Linaro GCC 2014.11) 4.9.3 20141031 (prerelease)
<xming> just compile with 5.2 -> 32489 Nov 23 09:34 u-boot-spl-dtb.bin
<xming> it's just under 32KB :D
<ganbold> 5.2 :) need to know command to install that, I'm not a regular linux person, anyhow
<xming> depends on your distro
<xming> the distro I use (Gentoo) is pretty easy to have multiple and any versions cross-compilers
<ganbold> ubuntu 14.04
<xming> ganbold: if you trust me I can give you u-boot-spl-dtb.bin
<naobsd> xming: ganbold needs sjoerd's topic/rockchip-network
<xming> naobsd: I have that
<naobsd> ah
<naobsd> good :)
<xming> $ git branch
<xming> * (HEAD detached at sjoerd/wip/rockchip-mmc-ethernet)
<ganbold> please give me RK3288UbootLoader_V2.19.01.bin :) so I can use upgrade_tool
<xming> what is that? RK3288UbootLoader_V2.19.01.bin
<ganbold> or similar
<naobsd> it's Android SDK thing
<ganbold> ah
<ganbold> ok
<naobsd> there should be a way to make it with mainline u-boot, but not documented for now
<naobsd> and I have to go out very soon
<ganbold> so no gcc 5.2 for ubuntu? strange, apt-get can't find
naobsd has quit [Remote host closed the connection]
naobsd has joined #linux-rockchip
naobsd has quit [Client Quit]
<xming> ganbold: you can always boostrap/compile the toolchain
<ganbold> yeah, but binary package would be nice and easy
<xming> oops wrong branch
<xming> 32669 Nov 23 09:55 u-boot-spl-dtb.bin
<xming> with topic/rockchip-network
<xming> that's just a few bytes shy from 32KB
<sjoerd> ganbold: debian has a package now, but not with networking support as that's not upstream yet
* xming goes dd his sd card
maz has joined #linux-rockchip
<ganbold> ok, got 4.9 and now it is not complaining
<ganbold> 34816 Нох 29 17:15 u-boot-spl-dtb.img
<xming> okay my board is booting from SD, probably going through eMMC uboot and then SD?
<xming> my serial<->USB adaptor hasn't arrived yet, is there any other way to see any output?
<xming> how do I tell uboot where to find the kernel?
<ganbold> write u-boot-spl-dtb.img at sector 64, u-boot-dtb.img at sector 256 using rkflashtool?
<xming> ganbold: yes
<ganbold> any guide available?
<xming> ganbold: http://git.denx.de/?p=u-boot.git;a=blob;f=doc/README.rockchip
<xming> ganbold: I am just one step ahead of you :D
<ganbold> I need to flash nand
<ganbold> that doc says SD
<xming> nand on firefly?
<xming> I thought it's emmc
<sjoerd> mmind00: btw does the debug uart thing work for you? i tried enabling it to see if i could debug where the kernel blows up after loading it from a usb loaded u-boot, but doing so makes the kernel unbootable alltoghetehr
<xming> ganbold: ^^ it's writing to the board
<mmind00> sjoerd: I'm not sure I understand ... you have the usb-uart connected to the same port you loaded the kernel from
<mmind00> sjoerd: and yes it was working on my rk3288 chromebooks :-)
<xming> oh it's so cool, just like on x86, marking a partition bootable
<sjoerd> mmind00: normal serial
<sjoerd> mmind00: ignore the usb bits they're not relevant ;)
<mmind00> sjoerd: ok ... can you paste the log somewhere?
Luke-Jr has joined #linux-rockchip
<sjoerd> mmind00: just multi_v7 + CONFIG_DEBUG_RK32_UART2=y seemed unhappy
<sjoerd> mmind00: there was no log which was exactly the issue :)
<ganbold> xming: only write that 32K file?
<mmind00> sjoerd: aaaaah ... you wrote debug-uart ... not usb-uart, like I for read for some reason :-)
<xming> ganbold: if only says about spl, but I suppose uboot too
<mmind00> sjoerd: ah, maybe a problem similar to coreboot has ... you're using probably mainline uboot ... does it keep uart clocks etc running?
<sjoerd> xming, ganbold: yes you need both spl + u-boot
<xming> sjoerd: so I only need to mark a partition bootable, mkdir /boot and create a proper /boot/extlinux.conf
<sjoerd> mmind00: i would expect so but i'm not entirely sure
<mmind00> sjoerd: i.e. the debug-uart is still debug_ll based so clocks, pins etc need be set up by the loader
<sjoerd> xming: /boot/extlinux/extlinux.conf or /extlinux/extlinux.conf (so you can mout the partition with it in /boot) yes
<sjoerd> mmind00: well u-boot does turn on the uart for sure given there is output on it
<mmind00> sjoerd: coreboot on the chromebooks has a similar issue and does not start if debug_ll stuff is enabled, as coreboot does not setup the clocks
<xming> ah in a subdir extlinux/ thanks
<sjoerd> mmind00: right i'll check if u-boot does something with the clocks
<sjoerd> mmind00: hw wise ti's the same uart block that drives all the serial output on uart2 right ? or is there something special?
<xming> the otg usb port can't be used for serial output? As I am flying blind ATM
<mmind00> sjoerd: it's the same except it doesn't have rts/cts pins, but that shouldn't really matter here
<sjoerd> right those aren't used anyway "normally"
<sjoerd> thanks
wadim_ has joined #linux-rockchip
<xming> sjoerd: will my SD be /dev/mmcblk1 or /dev/sda
<sjoerd> mmcblk0 typically
<sjoerd> i'd recommend using root=UUID or somesuch so you don't get tircked by device naming
<xming> yes that makes sense
<xming> is SD card access slow with firefly/rk3288? Got +/- 20MB/s read, while sandisk rates it at 80MB/s
<sjoerd> i'd call that fast for an SD card
<sjoerd> but there is some tunning stuff that's not yet upstream to enable higher rates
<xming> I should sue them :D
<sjoerd> fwiw those 80MB/s are typically for linear rates not your normal access patterns
<xming> dd if=/dev/mmcblk1 is linear
<xming> I am not complaining, just curious, good to know that it might get faster
<xming> sjoerd: which kernel is best? 4.3 , 4.4-rc ot linux-next?
<xming> going for 4.4-rc2
<sjoerd> latest and greated :)
<xming> always :D
<xming> by the time I get things sorted out, 4.4 will be EOL :p
<xming> -next is too adventurous
dlezcano has quit [Ping timeout: 240 seconds]
ssvb has quit [Ping timeout: 260 seconds]
<sjoerd> multi_v7 should work in 4.4 iirc
<sjoerd> i think my patches landed there
<xming> I suppose I can disablle all other SoCs
hipboi_ has joined #linux-rockchip
hipboi has quit [Ping timeout: 272 seconds]
<xming> sjoerd: can I just use the resulting bzImage in extlinux.conf? Or do I need DT appeneded
<sjoerd> xming: the zImage should work
<sjoerd> but you'll need an fdt entry as well ofcourse for loading the dtb
<xming> so the kernel can us the dts from uboot?
<sjoerd> no u-boot loads teh dts seperately
<xming> so I need a seperate dtb file in /boot?
<xming> and pass that as boot arg to the kernel?
<sjoerd> xming: your extlinux.conf should have fdt <path to fdt>
<xming> sjoerd: ah ok, then where do I get that fdt file?
<xming> from uboot?
<sjoerd> no the kernel
<xming> linux/arch/arm/boot/dts/rk3288-firefly.dtb
<xming> that one? or linux/arch/arm/boot/dts/rk3288-firefly.*
<ganbold> so can firefly load u-boot from sd card and then load kernel from emmc?
<xming> I don't know but I suppose you can do that if you have the extlinux.conf on sd
<sjoerd> ganbold: yes
<sjoerd> ganbold: upsteram uboot should scan both media for a valid boot partition
<xming> ah even better
<xming> sjoerd: is this what I need? linux/arch/arm/boot/dts/rk3288-firefly.dtb
naobsd has joined #linux-rockchip
<ganbold> sjoerd: Are following correct sequence of commands to make u-boot image? dd if=/dev/zero of=rk3288-uboot.img bs=500K count=1
<ganbold> dd if=u-boot-spl-dtb.img of=rk3288-uboot.img bs=1K seek=64 conv=notrunc
<ganbold> dd if=u-boot-dtb.img of=rk3288-uboot.img bs=1K seek=256 conv=notrunc
<ganbold> or
<ganbold> dd if=/dev/zero of=rk3288-uboot.img bs=1M count=1
<ganbold> dd if=u-boot-spl-dtb.img of=rk3288-uboot.img bs=1K seek=64 conv=notrunc
<ganbold> dd if=u-boot-dtb.img of=rk3288-uboot.img bs=1K seek=256 conv=notrunc
<xming> I think bs=1k is wrong sould be 512
<xming> and why do you need the 1st one
hipboi_ has quit [Remote host closed the connection]
<ganbold> no need?
hipboi has joined #linux-rockchip
<sjoerd> ganbold: what's rk3288-uboot.img ?
<sjoerd> ganbold: and yeah bs=512 (so good old sector size) not 1k
<ganbold> creating first with dd if=/dev/zero of=rk3288-uboot.img bs=1M count=1
<sjoerd> i don't know what that does or why you'd need it so.. :)
<ganbold> so just 2 commands are enough?
<ganbold> with bs=512
<ganbold> naobsd: ping
<naobsd> ganbold: why do you want to write to file not block device?
<ganbold> I want to write to emmc
<naobsd> how?
<ganbold> create uboot image then rkcrc then rkflashtool to uboot partition
<naobsd> you can make concat'ed file but there is no strong reason to make it
<naobsd> "then rkcrc" is wrong
<naobsd> what you need is 2 image, spl.img converted by mkimage -T rksd from spl.bin, and u-boot-dtb.img
<naobsd> that's all
<ganbold> ok, but is my understanding correct?
<ganbold> so I have 2 files
<ganbold> where to write those files? I understand I can write them to SD
<naobsd> that's all == do not do any modification
<naobsd> you can write 2 images to SD
<ganbold> to be safe not to destroy uboot on emmc?
<naobsd> for eMMC you need 1 modification in code
<naobsd> well
<naobsd> you want to keep eMMC?
<naobsd> you can choose, destroy data on eMMC or not
<ganbold> naobsd: yes, but seems no information how to create SD then, with uboot and plus rootfs
<naobsd> we are talking about bootloader, there is no rootfs for it
<naobsd> and doc is doc/README.rockchip
<naobsd> well
<naobsd> talking about how to write/boot bootloader, not about how to configure bootloader for kernel/rootfs/etc
hipboi has quit [Read error: Connection reset by peer]
hipboi_ has joined #linux-rockchip
<naobsd> ganbold: then, you want to write them to eMMC, right?
<naobsd> if my memory is correct SPL knows where does it load u-boot from, default is SD
<naobsd> it needs to be changed
<naobsd> it needs to be changed if you want to use eMMC
<ganbold> naobsd: I would like to have rootfs on SD. if u-boot is on SD too, then rootfs partition should start after u-boot on SD, anyhow not a good question maybe
<naobsd> ganbold: then, you want write u-boot on SD?
<naobsd> you can choose SD or eMMC to store kernel/rootfs/etc. it's matter of configuration of u-boot, which is not talking now (at least for me)
<ganbold> naobsd: well, maybe I didn't quite well formulated my question. Simply I don't want to destroy rootfs that is on SD now, but want new u-boot and I thought new u-boot can be in emmc
<naobsd> I'm talking about how to boot u-boot(from power on to load u-boot)
dlezcano has joined #linux-rockchip
<ganbold> ok, let me try u-boot on sd
<naobsd> when you have u-boot on SD, you can put rootfs on SD too unless you make partition overlapped
<naobsd> well
<naobsd> if you already have rootfs on SD and you don't want to destroy it,
<naobsd> you need to calculate size of u-boot
<naobsd> probably u-boot is 256kb or so
<naobsd> I don't know where your rootfs is placed
<ganbold> well destroyed already
<ganbold> but doesn't work
<naobsd> how it doesn't work? both spl and u-boot say something on uart2
<ganbold> so tried these 2 commands
<ganbold> dd if=u-boot-spl-dtb.img of=/dev/mmcsd0 bs=512 seek=64 conv=notrunc
<ganbold> dd if=u-boot-dtb.img of=/dev/mmcsd0 bs=512 seek=256 conv=notrunc
<ganbold> and put sd and powered on
<naobsd> you have bootloader on emmc which is prior
<naobsd> try rkflashtool b 3
<naobsd> loader on emmc will be ignored and sd will be used
<xming> naobsd: is that permanent?
dlezcano has quit [Ping timeout: 240 seconds]
<naobsd> xming: rkflashtool b 3? no
<xming> naobsd: I don't serial<->USB yet (on its way), but when I made my sd bootable (w/o kernel) it hangs, which suggest it's boot from SD, is that going through spl/uboot on emmc then spl/uboot on sd?
<naobsd> proprietary loader on emmc will check SD and try to load (probably) parameter etc from SD
<naobsd> which is not "boot from SD" we are talking here
dlezcano has joined #linux-rockchip
<xming> so all those boot blahblah from SD for firefly are not really booting from SD? It merely loads parameter files and load kernel from SD?
<xming> that makes an other thing clearer to me thanks
<ganbold> naobsd: nice
<ganbold> U-Boot 2015.10-rc4-05976-geab7122-dirty (Nov 29 2015 - 19:06:46 +0800)
<ganbold> u-boot loads from SD
<naobsd> xming: sorry, which you are talking, "boot from SD" or not "boot from SD"? "boot from SD" is boot from SD of course.
<ganbold> so works :)
<xming> that's not really booting from SD, just loading kernel from SD, am I right?
<naobsd> xming: no, both. if there is loader in emmc, it recognize SD have images and load them. if there is no loader in emmc, everything on SD is used.
<naobsd> it depends how loader in emmc is implemented. there is no single answer.
<xming> naobsd: so if I want to make boot from SD permanent, then I should just dd few block of eMMC?
<naobsd> xming: as far as I know, yes for RK3288
<xming> after that if I want to go back to factory sertting, I can just use OTG and flash?
<naobsd> any SoCs which try eMMC before SD
<xming> I have firefly BTW
<naobsd> loader can be flashed even if there is no loader(empty) on eMMC
<xming> good to know
<xming> any equivelent to do "rkflashtool b 3" on the device itself? W/o using otg
<naobsd> "rkflashtool b 3" just kicks some code in proprietary loader
<naobsd> you can do same
<ganbold> nice, now I can load kernel from SD via fatload & go
<ganbold> sjoerd: does ethernet work on your topic/rockchip-network u-boot branch?
<ganbold> sjoerd: I'm trying to tftpboot
<sjoerd> it should yes
<sjoerd> i'm tftp booting all the time during development ;)
<ganbold> strange
<ganbold> can't even ping
<ganbold> so something like:
<ganbold> setenv ipaddr 192.168.1.77
<ganbold> setenv serverip 192.168.1.7
<ganbold> tftpboot 0x60400000 kernel-firefly.bin; go 0x60400000
maz has quit [Ping timeout: 250 seconds]
<ganbold> not working
<sjoerd> what's your output ?
<sjoerd> as in u-boot output
<sjoerd> is it not finding a carrier or ?
<sjoerd> that way of tftp booting is od though
<naobsd> "rkflashtool b 3" might make something different
<ganbold> sjoerd: http://pastebin.ca/3270022
<naobsd> ganbold: is "Speed: 100, full duplex" right?
<sjoerd> ganbold: heh that looks like it ddin't retry and then jumped into the kernel and failed
<ganbold> yes
<sjoerd> curious
<sjoerd> i did test with 100mbit/s at some point and that worked fine
<sjoerd> but i mostly have it hooked up to gigabit
<sjoerd> maybe some bug left wrt. changing the clock speed
hipboi_ has quit [Remote host closed the connection]
hipboi has joined #linux-rockchip
ssvb has joined #linux-rockchip
<xming> I suppose I can't connect rs232 (5v) to firefly (3v) or am I wrong?
<xming> where is uart2 on firefly?
<sjoerd> xming: there is a change the 5v level will damage yoru firefly
<xming> then I am stuck, nor serial debug, wainting for my adaptor
<xming> ah found it, it's called "debug"
hipboi has quit [Remote host closed the connection]
maz has joined #linux-rockchip
jkstrick has joined #linux-rockchip
jkstrick has quit [Ping timeout: 260 seconds]
cnxsoft has quit [Quit: cnxsoft]
jkstrick has joined #linux-rockchip
<ganbold> sjoerd: maybe, receive side is working in FreeBSD, but no transmit, maybe it is totally unrelated
dlezcano has quit [Ping timeout: 250 seconds]
GriefNorth has joined #linux-rockchip
wadim_ has quit [Remote host closed the connection]
markm has quit [Quit: Leaving]
markm has joined #linux-rockchip
dlezcano has joined #linux-rockchip
dlezcano has quit [Ping timeout: 240 seconds]
GriefNorth has quit [Remote host closed the connection]
dlezcano has joined #linux-rockchip
GriefNorth has joined #linux-rockchip
dlezcano has quit [Ping timeout: 250 seconds]
dlezcano has joined #linux-rockchip
dlezcano has quit [Ping timeout: 250 seconds]
dlezcano has joined #linux-rockchip
cristian_c has joined #linux-rockchip
maz has quit [Ping timeout: 246 seconds]
jas-hacks has joined #linux-rockchip
arield has joined #linux-rockchip
dlezcano has quit [Ping timeout: 240 seconds]
dlezcano has joined #linux-rockchip
hipboi has joined #linux-rockchip
hipboi has quit [Ping timeout: 244 seconds]
jas-hacks has left #linux-rockchip [#linux-rockchip]
jas-hacks has joined #linux-rockchip
jkstrick has quit [Read error: No route to host]
jkstrick_ has joined #linux-rockchip
gb_master has joined #linux-rockchip
gb_master has quit [Remote host closed the connection]
gb_master has joined #linux-rockchip
gb_master has quit [Remote host closed the connection]
xcasex has quit [Quit: WeeChat 1.0.1]
case1 has joined #linux-rockchip
case1 has quit [Quit: WeeChat 1.0.1]
case1 has joined #linux-rockchip
jkstrick has joined #linux-rockchip
case1 is now known as xcasex
jkstrick_ has quit [Ping timeout: 240 seconds]
jkstrick has quit [Remote host closed the connection]
jkstrick has joined #linux-rockchip
ssvb has quit [Ping timeout: 250 seconds]
jas-hacks has left #linux-rockchip [#linux-rockchip]
ssvb has joined #linux-rockchip
tnn has quit [Ping timeout: 246 seconds]
GriefNorth has quit [Ping timeout: 260 seconds]
markm has quit [Ping timeout: 250 seconds]
markm has joined #linux-rockchip
c0d3z3r0 has quit [Ping timeout: 250 seconds]
c0d3z3r0 has joined #linux-rockchip
cristian_c has quit [Quit: Bye]
naobsd has quit [Quit: naobsd]
robogoat has quit [Ping timeout: 260 seconds]
robogoat has joined #linux-rockchip