<ameel>
@Ke now that I have installed ubuntu on the eMMC, it's bypassing sdcard completely
hanetzer has quit [Ping timeout: 260 seconds]
Aussie_matt has joined #linux-rockchip
hanetzer has joined #linux-rockchip
<ccaione>
ameel: the bootrom code checks eMMC before SD, so the SD contains already a valid bootloader you wont't be able to boot from SD
yann|work has quit [Ping timeout: 256 seconds]
yann|work has joined #linux-rockchip
yann|work has quit [Ping timeout: 248 seconds]
<ameel>
[21:03] <ccaione> ameel: the bootrom code checks eMMC before SD, so the SD contains already a valid bootloader you wont't be able to boot from SD
<ameel>
i don't get it
<ameel>
if SD contains valid bootloader, it won't be able to boot from SD?
<Ke>
ameel: that is right, unless the bootloader on the eMMC chainloads it, mostly in these cases the only chainload protocol is EFI
<ccaione>
there is a valid bootloader also on the eMMC?
<ameel>
i don't know :(
<ameel>
i followd the instructions here
<Ke>
well I guess there are non-efi chainload options for at least u-boot
<ameel>
however, when i insert sd card, it just boots into ubuntu anyway (sd card is flashed with the debian image)
<ccaione>
I'm just saying that if there is a valid bootloader still present in the eMMC then that could explain why you are not able to boot from SD because (at least on the rk3288) the eMMC has higher priority
<ameel>
surely i can't do a full erase from ubuntu?
<ameel>
count i put =4
<ameel>
how do i determine count?
<Ke>
or blkdiscard /dev/mmcblk1
<ameel>
also, i don't think that's the problem, if the sdcard is telling the system to boot from eMMC?
<Ke>
where 1 is the eMMC
<Ke>
can't help you there, as I have no idea what is happening
<ameel>
hmmm
<Ke>
might be that the images contain filesystems that have the same UUID
<Ke>
mostly I would just kill the whole eMMC
<ameel>
doing it
<ameel>
finger scrossed
<ameel>
it's taking its sweet time
<Ke>
what are you doing then?
<ameel>
killing the whole eMMC
<ameel>
blkdiscard
<Ke>
good
<ameel>
does that usually take long?
<ameel>
does it matter that ubuntu is mounted on that while i'm trying to discar dit?
<Ke>
it depends on the device, not usually
yann|work has joined #linux-rockchip
<ameel>
oh lol
<ameel>
that worked
<ameel>
booted from sdcard
<Ke>
good thing with the blkdiscard is that it will leave your card to a state that is least harmful to the hw
<Ke>
though it's not guaranteed to work by the spec
<ameel>
hmm
<ameel>
kk
<ameel>
cheers for that
<ameel>
(y)
<ameel>
can you help me with something else?
<ameel>
i'm looking at a ST77335 display
<Ke>
no idea about that
<ameel>
haha, ok nw
<ameel>
thanks anyway
<Ke>
you can grep kernel sources for the compatible string for starters
<Ke>
probably under drivers/graphics or something
<Ke>
perhaps something like panel
<ameel>
mmm
<ameel>
kk
<ameel>
cheers
<ameel>
i guess it's still a little annoying
<ameel>
i'd like to be able to boot from eMMC
<ameel>
or sd card if that's connected
<ameel>
but doesn't seem to work that way :/
<Ke>
no and it's a hw thing so you can't fix it
<Ke>
you can use chainloading though or boot kernel from SD card using the bootloader of the eMMC
<ameel>
yeah
<ameel>
i saw there're are 2 sets of files actually
<ameel>
but installation guide for both eMMC and sdcard use the same one set of file
<ameel>
maybe the other will work properly? i'll try it out
<Ke>
I would urge you to stay clear of the eMMC, until you know, what you are doing
<ameel>
hmm kk
<Ke>
if you put the eMMC to a bad state, recovery may be hard
<Ke>
leaving it blank for now, may be a good idea
<ameel>
i see
<Ke>
SD you can always detach and restore to a known good state on another system
<ameel>
alright
afaerber has quit [Quit: Leaving]
afaerber has joined #linux-rockchip
lurchi_ is now known as lurchi__
yann|work has quit [Ping timeout: 256 seconds]
yann|work has joined #linux-rockchip
<ameel>
hmm actually it's not booting from sd card anymore :/
<ameel>
it's stuck on a black screen
<ameel>
like wayyyy back when i first tried to run off sdcard
<ameel>
ok so turns out debian can boot from sdcard when eMMC is empty
<ameel>
whereas ubuntu can't
<astralix>
isn't it that you can transfer the bootloader to eMMC? So you can add a script to first check the SD and if that is found, you boot from there. If not fall back to eMMC
<ameel>
yeah, i don't know how to do any of tha
<ameel>
that
<Ke>
astralix: yes, u-boot at least can do this
<Ke>
astralix: but not the first level bootloader though
<ameel>
that's in an extlinux.conf file i found when i extracted the boot.img
<ameel>
i've got serial console hooked up
<ameel>
i'll see what happens when i try booting ubuntu from sdcard
<astralix>
If you have a serial line running, are you able to see uboot or are you only get some cryptical messages and then linux is started right away?
<ameel>
** No partition table - mmc 0 ** switch to partitions #0, OK mmc1 is current device Scanning mmc 1:4...
<astralix>
Hmm... When I left the RK android hobby project, there where two loaders. One crypto uboot that had only fixed and limited options and one open source uboot that was not complete.
<astralix>
But the opne source uboot had scripting enabled and you could change parameters. In your case please test if you can modify root=/dev/mmcblkXpY to the right values, where X is the correct id of your SD Card (0 or 1) and Y is the right partition number on your SD (usually 0 or 1)
<ameel>
yup fair enough
<ameel>
same here
<ameel>
there are some stuff i can access
<ameel>
and others encrypted
<astralix>
If you can't do that, use gparted to shift the ubuntu partition to the end (may be shrink it a bit) and add another few partitions in front of it, so the index is 5
<ameel>
hmm
<ameel>
i think its the X that i need to force
<astralix>
Actually I am thinking about getting back to some linux and uboot dev for my RK based boards. However I need to finish some other stuff before.
<ameel>
cool
<astralix>
If you have the encrypted loader, there was a tool to fetch the script part of the uboot and you could modify it and upload it again
<ameel>
switch to partitions #0, OK mmc0(part 0) is current device Scanning mmc 0:4... Found /extlinux/extlinux.conf Retrieving file: /extlinux/extlinux.conf reading /extlinux/extlinux.conf
<ameel>
this is booting without sdcard on, and eMMC contains debian partition
<ameel>
i guess i could mount that partition (if at all possible) and edit extlinux.conf
<ameel>
how would i go about to make it boot from mmc1 and if not present, boot from mmc0