<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
<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
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
<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
<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