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
akaize___ is now known as akaizen
<akaizen> naobsd: Ah ok. Then that makes sense :)
<akaizen> sjoerd: Any tips on converting the kernel image into something that can bet served via tftp?
<akaizen> Or maybe I'm having tftp server issues on OSX...
<akaizen> cat arch/arm/boot/zImage arch/arm/boot/dts/rk3288-firefly.dtb > zImage-dtb && ./u-boot-sjoerd/u-boot/firefly/tools/mkimage -A arm -O linux -T kernel -d zImage-dtb uImage-dtb
<akaizen> sjoerd: hmm ping doesnt seem to be working on this u-boot
<akaizen> maybe i need to set a mac addr or something?
<akaizen> still no dice :/
<karlp> akaizen: what's "b2g" ?
<akaizen> karlp: boot2gecko
<akaizen> Ah open-wrt on my router might not work correctly with a cross-over .. plugging into my switch seems to work fine
akaizen has quit [Ping timeout: 244 seconds]
akaizen_ has joined #linux-rockchip
akaizen_ has quit [Ping timeout: 250 seconds]
akaizen has joined #linux-rockchip
akaizen has quit [Read error: Connection reset by peer]
akaizen has joined #linux-rockchip
akaizen has quit [Read error: Connection reset by peer]
akaizen has joined #linux-rockchip
akaizen_ has joined #linux-rockchip
akaizen has quit [Ping timeout: 244 seconds]
<akaizen_> Cool got TFTP working... was router issues
<akaizen_> Kernel image @ 0x800800 [ 0x000000 - 0x523d60 ] \n FDT and ATAGS support not compiled in - hanging \n ### ERROR ### Please RESET the board ###
<akaizen_> oooh
<akaizen_> sending zImage+dtb
<akaizen_> then go to address that it loads it works !! :)
<akaizen_> kernelpanic becuase no rootfs
akaizen_ is now known as akaizen
_vaibhav_ has joined #linux-rockchip
_vaibhav_ has quit [Ping timeout: 265 seconds]
akaizen__ has joined #linux-rockchip
akaizen has quit [Ping timeout: 244 seconds]
naobsd has joined #linux-rockchip
<akaizen__> anyone around?
akaizen__ is now known as akaizen
<lautriv_> akaizen, what is the exact output of that panic ?
<akaizen> end Kernel panic - not syncing: VFS: Unable to mount too fs on unknown-block(0,0)
<akaizen> I need to use a initramfs
<akaizen> and then partiton the emmc and then copy the kernel and stuff over
<akaizen> Right now I'm trying to figure out how to boot with rootfs over NFS
<akaizen> since I'm TFTP'ing kernel with nfs
<lautriv_> unknown-nlock(0,0) tells you miss the driver for the drive. i do root over nfs since decades, you must tell the kernel to allow that, have client built-in and use a pseudo blockdevice /dev/nfs
<akaizen> is that a bootarg or do i need to recompile?
<akaizen> Also I'm doing direct ethernet connection between my machine and firefly -- I can ping host, but TFTP no longer finds the files
<lautriv_> the bootarg is root=/dev/nfs nfsroot=server:/path/to/nfsroot but /dev/nfs has to exist in your ramdisk by mknode /dev/nfs b 0 255
<akaizen> ah i dont have a ramdisk
<akaizen> just zImage+dtb
<akaizen> I tried to create a uImage but that failed
<lautriv_> for NFS you need one, kernel has the option to set a source-dir which will embed it to the kernel, dtb can still be attached.
<akaizen> Is there a wiki or manual you recommend for all this?
<lautriv_> not really but i can guide you
<lautriv_> what distro ?
<akaizen> i was thinking gentoo or debian
<lautriv_> akaizen, debian has better tool to generate initramfs , genkernel is lame and defunctional
<lautriv_> these days, i would rather use devuan ( no systemd) but that doesn't matter for the initrd
<akaizen> sure lets do debian then
<lautriv_> ok. what kernel did you build ?
<lautriv_> hehe, afair that is the same i hust cloned :o)
<akaizen> :)
<lautriv_> so i assume you have no debian-arm running now ?
nighty^ has joined #linux-rockchip
<akaizen> nope just u-boot
<akaizen> I have a SD card with me tho
<lautriv_> ok, i guess that kernel failing with panic is somewhat prepared for this machine, please do a tar.bz2 of the whole sources including all modules, *.o and .config. put it on some filebin and i chroot into the right env, then i'll create a modified initrd which you embed on your side, do not change any config in the meantime.
<rperier> hi all
<lautriv_> moin
<lautriv_> akaizen, beside the kernel, what target is that ?
ssvb has quit [Ping timeout: 272 seconds]
<akaizen> arm7a hardfloat (firefly-rk3288)
<lautriv_> i'm working with cortex-a9 machines, not sure if there is a major difference to your a12 ?
<akaizen> pretty much a9
<akaizen> same ISA
<akaizen> just a different GPU
<lautriv_> ok, upload your kernel.tar.bz2 and i'll prepare something. if your debian is up, i can provide some scripts to automate it ;)
<akaizen> Will initramfs be easier
<akaizen> Then I can partition eMMC via gparted
<lautriv_> these days, all is initramfs but still called initrd.img (automated check for backwards-compat)
<lautriv_> ok, i will test something where i have to boot winblows in qemu, in the opposite of other devices the OTG to flash can't be handover by a issue on libusb. did anyone solve this somehow ?
<akaizen> OK so basically I can either do NFS or create a initramfs image to use as root fs
<akaizen> with busybox and parte
<akaizen> d
<akaizen> then I can parition emmc generate a new kernel and boot to debian
<lautriv_> akaizen, that is both the same. you can add initramfs which includes the ability to boot from NFS AND contains that tools but when you are on NFS you can use native tools anyway ( emmc visible from nfseoot )
<lautriv_> *nfsroot
<akaizen> ok rebuild the kernel is fairly easy
lautriv__ has joined #linux-rockchip
<akaizen> now how do I build it so it can boot with u-boot and accept the command line args?
<akaizen> curenntly I'm only having success with a zImage
lautriv_ has quit [Ping timeout: 250 seconds]
<akaizen> how do you decide what addresses to laod the kernel into and what not
nighty^ has quit [Remote host closed the connection]
nighty^ has joined #linux-rockchip
akaizen has quit [Remote host closed the connection]
markm_ has quit [Ping timeout: 272 seconds]
markm_ has joined #linux-rockchip
<lautriv__> akaizen, most of my arm aren't rockchip but the load-address of the kernel is not that important because it is used to be relocated. on non-rockchip i create images with mkimage (u-boot tools) where load and entry-point is given.
akaizen has joined #linux-rockchip
<lautriv__> akaizen, just found you was offline when i told you, lemme repeat ...
<lautriv__> akaizen, most of my arm aren't rockchip but the load-address of the kernel is not that important because it is used to be relocated. on non-rockchip i create images with mkimage (u-boot tools) where load and entry-point is given.
<akaizen> Its aobut 1am had to go home ;)
<akaizen> Let me check logs
<lautriv__> about 1AM is somewhere in russia ?
<sjoerd> akaizen: http://git.denx.de/?p=u-boot.git;a=blob_plain;f=doc/README.distro;hb=HEAD
<sjoerd> akaizen: for the kernel & initramfs & fdt load address just use the ones in the now stnadard variables
<akaizen> 1:30a in Pacific Time zone : California
<sjoerd> and tbh i consider bothering with uimages something from the past by now
naobsd has quit [Ping timeout: 244 seconds]
apritzel has joined #linux-rockchip
<akaizen> sjoerd: thanks for the link but I dont see any address specified in the standard vars
<lautriv__> make -j48
<lautriv__> err, mot here :o)
<sjoerd> akaizen: kernel_addr_r ramdisk_addr_r and fdt_addr_r
<lautriv__> akaizen, 0x8000 works for me.
<sjoerd> lautriv__: make: *** No targets specified and no makefile found. Stop.
<akaizen> oh jeez its too late
<lautriv__> sjoerd, ;)
<akaizen> I must sleep,
<akaizen> Well I see 0x8000 for kernel
<akaizen> No address for the other two
<akaizen> Is it preferred to just cat teh dtb to the end of the kernel?
<lautriv__> mkimage takes -a 0x8000 -e 0x8000 there is nothing else
<akaizen> sjoerd: if you dont use uImage what do you use then?
<sjoerd> akaizen: appended dtb is legacy for backwards compatibility with older loaders
<sjoerd> akaizen: just the zImage and the dtb
<akaizen> then you bootz
<sjoerd> indeed
<akaizen> cool
<sjoerd> though i mostly let pxe boot handle it
<akaizen> hehe im not at that level yet
<sjoerd> https://paste.debian.net/310332/ is what i have on my tftp server
<sjoerd> if you set your fdt_file to the one needed for your board it will get that from the given fdtdir (so i just dump all my dtb's zImage in the / of my tftp server after building)
<akaizen> awesome
<lautriv__> anyone used to run winblows in qemu for flashing ?
<apritzel> lautriv__: if it is about USB passthrough, you are probably better off with VirtualBox
<lautriv__> apritzel, i can pass any but the rk3188
naobsd has joined #linux-rockchip
<akaizen> I use parallels and allows you to chose usb passthrough
<akaizen> I think virtualbox offers the same
<akaizen> off to sleep now
<akaizen> good night
<mmind00> yay the rockchip patches are now in the main uboot
<sjoerd> oh did sjg do a PR
<mmind00> yep yesterday evening it seems
<sjoerd> awesome
<sjoerd> My inbox was filled with mails syaing it got applied to the rockchip tree, didn't see it moving into master
<naobsd> wow great
<sjoerd> mmind00: an extra push to finalize my network support and send it in as well
* sjoerd was quite worried that would all keep hanging as there wasn't much progress onteh rockchip side lately
<mmind00> sjoerd: looks like Simon was waiting for some pinctrl-basics to land
<sjoerd> yeah
<naobsd> README.rockchip should be fixed a little
<naobsd> where is my spare time :(
<naobsd> ah, well
<naobsd> sjoerd "rksd.c produces an image consisting of 32KB of empty space," you forgot to remove this part :)
<sjoerd> in the readme?
* sjoerd makes a note
<naobsd> yes, in README.rockchip
<naobsd> my note: "(perhaps) holding the recovery button when you boot the board" should be replaced with "try rkflashtool b 3" (need confirmation)
steev_ has quit [Ping timeout: 244 seconds]
<naobsd> and I think we can boot "load SPL from OTG" && "u-boot-dtb.img on SD" without erasing eMMC
steev_ has joined #linux-rockchip
<sjoerd> tbh i haven't tried the SPL from OTG bit at all
<sjoerd> but if you can do that you might as well also put the SPL on an SD card no ?
<naobsd> I think SPL on SD will not be loaded if eMMC is bootable
<sjoerd> that's true on rk3288 indeed
<naobsd> well, I believe all developer doesn't care about erasing eMMC (it can be restored easily with stock firmware) ;) but it might be better to tell the way to avoid it
<naobsd> I'm sure "rkflashtool b 3" goes mask rom mode with RK loader, but it might be different to cold start case
<sjoerd> naobsd: I've been prodding the board with tweezers quite a bit while doing development on this ;)
<naobsd> (return to home)
naobsd has quit [Quit: naobsd]
naobsd has joined #linux-rockchip
naobsd has quit [Quit: naobsd]
<lautriv__> bah whenever i see something from M$ i know why i left it decades ago. will never get why any FOSS related stuff is done on winblows.
<lautriv__> any alternative driver which is bright enought to see rk3188 on winshit 7 ?
<lautriv__> nvm >/dev/null
<rperier> I saw Simon's post about uboot this morning, I really need to test it
ssvb has joined #linux-rockchip
ganbold has quit [Ping timeout: 255 seconds]
rory096 has quit [Ping timeout: 240 seconds]
ganbold has joined #linux-rockchip
apritzel has quit [Read error: Connection reset by peer]
apritzel has joined #linux-rockchip
* lautriv__ learned a new lession. arm derivates from rockchip aren't named because they work rock-solid but because the only thing you can do with it is throw a rock ON it.
<sjoerd> (not they're not deriviates)
<lautriv__> counting ants in my garden would be less waste of time ...
JohnDoe_71Rus has joined #linux-rockchip
_vaibhav_ has joined #linux-rockchip
apritzel has quit [Ping timeout: 264 seconds]
_vaibhav_ has quit [Remote host closed the connection]
rory096 has joined #linux-rockchip
cristian_c has joined #linux-rockchip
robogoat has quit [Ping timeout: 252 seconds]
GriefNorth has joined #linux-rockchip
robogoat has joined #linux-rockchip
<amstan> akaizen: so, there's no fbdev-turbo package on arch
robogoat has quit [Ping timeout: 264 seconds]
cristian_c has quit [Quit: Bye]
robogoat has joined #linux-rockchip
<akaizen> amstan: once I get my system up and running I'll probably have to port it over.. I
<akaizen> I'll let you know when I do!
cristian_c has joined #linux-rockchip
pizthewiz has joined #linux-rockchip
Helle has joined #linux-rockchip
<akaizen> sjoerd: are you able to saveenv in u-boot on fiefly?
JohnDoe_71Rus has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
akaizen has quit [Remote host closed the connection]
newbi has joined #linux-rockchip
<newbi> hi all
<newbi> i try to find the datasheet for Rk2928
akaizen_ has joined #linux-rockchip
rory096 has quit [Ping timeout: 240 seconds]
akaizen_ has quit [Remote host closed the connection]
<Helle> *sigh* and now I can't get back into bootflash mode
<Helle> But it looks like a .img can be dropped on a SD card and be booted from there ?
<Helle> mmmm, worse, it disables the microUSB port entirely when booted with a working firmware
<lautriv__> Helle, probably because the firmware was not meant for your device.
<Helle> lautriv__: no, this is the right firmware
<Helle> I can't even force it into bootloader flash mode now by shorting the correct pins....
<Helle> which makes sort of sense, the only time I got it in the bootloader was when it thought it's flash was zero'ed when I tried to read it
<lautriv__> Helle, i flashed a firmware for the exact device, including date-code and it differed by WiFi-chip anyway. Never assume chinese manufactors doing something right.
<Helle> yes, yes, yes
<Helle> lautriv__: this is the exact correct firmware
<Helle> it's just a stupid device
<Helle> so I am hoping I can get another firmware on it via SD booting
<lautriv__> Helle, read again what i just wrote ...
<Helle> lautriv__: stop assuming I haven't checked those things
<lautriv__> ok, you won't get it ...
<Helle> lautriv__: even the original firmware before I started tinkering didn't have a working USB port
<Helle> they just disabled it for some reason
<lautriv__> more likely they changed the layout but not the software.
<Helle> possibly, anyway, when it was properly hosed, it did manage to USB boot
<Helle> err, USB recovery
<Helle> but hoping for a way around with SD card booting
<Helle> because causing it to purposefully misread flash is trickier then it looks
<lautriv__> misread flash is easy, just pulldown second CS
<Helle> BGA....
<lautriv__> pallel wired to that other pins
<lautriv__> *ra
akaizen_ has joined #linux-rockchip
rory096 has joined #linux-rockchip
rory096 has joined #linux-rockchip
karlp has quit [Remote host closed the connection]
GriefNorth has quit [Ping timeout: 256 seconds]
johnnyr has quit [Ping timeout: 252 seconds]
johnnyr has joined #linux-rockchip
nighty^ has quit [Quit: Disappears in a puff of smoke]
nighty^ has joined #linux-rockchip
newbi has quit [Quit: Page closed]
<sjoerd> akaizen_: yes
<sjoerd> akaizen_: don't know if i put the config for that in my wip patch though
<akaizen_> sjoerd: ah that might explain why im unable to
<akaizen_> I guess I need a working system first to reflash the SPL and u-boot
<sjoerd> hmm should be there
<sjoerd> akaizen_: did you boot from emmc instead of SD ?
<akaizen_> yea
<sjoerd> https://git.collabora.com/cgit/user/sjoerd/u-boot.git/diff/include/configs/firefly-rk3288.h?h=wip/rockchip-mmc-ethernet&id=ba2a9d06212fec518e65d8de2e199cb81248beee has the config
<sjoerd> but it's for storing on SD (mmc dev 0)
<sjoerd> so if you tweak CONFIG_SYS_MMC_ENV_DEV to be 1 instead of 0 it should just work
<akaizen_> cool
<sjoerd> the SPL/u-boot not knowing what device it booted from is definately one of the outstanding annoying things
<akaizen_> Just work (TM)
<akaizen_> sjoerd: Have you used direct ethernet connection for TFTP?
akaizen_ is now known as akaizen
xcasex has quit [Read error: Connection reset by peer]
xcasex has joined #linux-rockchip
<sjoerd> yeah
<akaizen> Im testing direct connection. I can ping my host machine but cannot TFTP
<akaizen> Host: IP: 10.0.0.10 / 255.255.255.0 (no gateway), target IP: 10.0.0.20 / 255.255.255.0 (no gateway)
nighty^ has quit [Ping timeout: 246 seconds]
<sjoerd> oh there is a tftp issue in u-boot master atm
<sjoerd> what's the error you're getting ?
<akaizen> timeout
<sjoerd> try reverting 620776d734e4b126c407f636bda825a594a17723 just in case, toherwise i don't know
<sjoerd> you'd haveto check with e.g. tcpdump what's happening on the line
<akaizen> *plugs ethernet back into switch*
pizthewiz has left #linux-rockchip ["
<sjoerd> akaizen: oh ooi what rate does the phy get set at in both cases?
* sjoerd has only tested gigabit
akaize___ has joined #linux-rockchip
akaizen has quit [Ping timeout: 246 seconds]
<akaize___> 1000 full duplex
akaize___ is now known as akaizen
<akaizen> my router is 100 full duplex and it doesnt work
<akaizen> also dhcp doesnt work for somereason
<akaizen> our corporate switch is 1000 and dhcp works
rory096 has quit [Ping timeout: 255 seconds]
<sjoerd> if dhcp works then the only thing i can think of is reverting the patch i mentioned
<sjoerd> good to know 100mbit/s is giving you issues, will need to test them and add something to adjust the clock based on the phy speed
<akaizen> Hmm when I try to bootz : Bad Linux ARM zImage magic!
<sjoerd> then your zImage isn't a zimage or you're not booting it from the location you loaded it into
<akaizen> do I need to run the zImage from the kernel compile throught the u-boot/firefly mkimage
<sjoerd> no
<sjoerd> for bootz you should just use the zImage the kernel builds and not use mkimage or anything else on it
<akaizen> ok
<akaizen> well got it to work but completely blank screen :(
<akaizen> oops forgot printearlyk
<akaizen> I disabled append_DTB in my kernel config
<sjoerd> did you load the dtb via tftp ? :)
<akaizen> that should be fine if I specify bootz to where the dtb is in memory right?
<akaizen> yep
<akaizen> tftp 0xb000 rk3288-firefly.dtb
<akaizen> tftp 0x8000 zImage-nfs
<akaizen> set bootargs console=tty0 console=ttyS2,115200n8 root=/dev/nfs rw nfsroot=192.168.100.65:/ earlyprintk
<akaizen> bootz 0x8000 - 0xb000
<sjoerd> you really want to use the predefined addresses
<akaizen> ah is it a preset var?
<akaizen> OOO
<akaizen> this make so much more sense :)
<akaizen> You can override them but u-boot sets them :))
<sjoerd> tftp ${kernel_addr_r} <your kernel> ; tftp ${fdt_addr_r} <your dtb> ; bootz ${kernel_addr_r} - ${fdt_addr_r}
karlp has joined #linux-rockchip
<akaizen> there we go :) back to kernel panic for no rootfs :)
<akaizen> now I need to fix my rootfs
<sjoerd> akaizen: fwiw 0x8000 and 0xb000 are far too close together anyway, those will overlap give the size of your zImage
<akaizen> my hex is bad
* sjoerd wants to get people to stop using magic numbers and use predefined varialbes like that
<sjoerd> or better use pxe
<akaizen> my dtb would overwrite art of my kernel lol
<sjoerd> nod
<akaizen> yes I learned not to use magics
<akaizen> not to fix my nfs
<akaizen> then we can get somewhere
<karlp> pxe is one o fthose things that sounds totally awesome, but everyone ends up just hackking together some tftp pile of bandaids
<sjoerd> akaizen: fwiw it's a common mistake, even a lot of product u-boots out there will have say the kernel overwrite the initramfs if you have a somewht too big kernle image
<karlp> _maybe_ they throw some nfs at it, but it's still a fragile custom local mess.
<akaizen> sidenote: OSX 10.10 is a such a pain for development
<akaizen> all the good builtin bsd tools have weird behavior
<akaizen> rather they used to work nicely
cristian_c has quit [Excess Flood]
cristian_c has joined #linux-rockchip
cristian_c has quit [Client Quit]
gb_master has joined #linux-rockchip
<akaizen> Hm... I can connect to my NFS via osx NFS share but still cant mount rootfs
<akaizen> [ 5.930315] ---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,255)
<akaizen> Kernel command line: console=tty0 console=ttyS2,115200n8 root=/dev/nfs rw nfsroot=192.168.100.65:/srv/nfs-root ip=192.168.100.70:192.168.100.65:192.168.100.1:255.255.255.0:firefly:eth0:off earlyprintk
<akaizen> any ideas on what could be the issue?
<akaizen> might soon be time to throw in the towel and just use SDCARD T_T
<akaizen> VFS: Cannot open root device "nfs" or unknown-block(0,255): error -6
pietrushnic has quit [Ping timeout: 240 seconds]
<akaizen> hmm does 4.2 kernel not support CONFIG_BOOT_NFS ?
gb_master has quit [Remote host closed the connection]