<naobsd>
tlwoerner: code for "loader mode", bootloader sits on flash storage such as eMMC, NAND, SD card. you can flash bootloader with Rockchip's flash tool, it means you can flash garbage as bootloader.
cosm has joined #linux-rockchip
<amstan>
rperier: right, so which device do you have?
<naobsd>
tlwoerner: partitions are defined in "parameter" file which is stored on "parameter" partition.
<naobsd>
tlwoerner: I guess you are the person who asked about erasing bootloader on google group.
<tlwoerner>
naobsd: yes, that was me who asked :-) thanks for the link to the u-boot README commit
<naobsd>
tlwoerner: what is your goal? using upstream u-boot? I think "erasing bootloader" is just the way for it
<tlwoerner>
naobsd: right now my goal is to understand how this all works
Bludot has quit [Quit: Connection closed for inactivity]
<tlwoerner>
naobsd: i have since found the unofficial rockchip wiki and have been reading through the boot sequence information, which has been quite helpful
<naobsd>
wiki has some error, and some person will say I'm the person who broke wiki ;)
<naobsd>
I can answer questions if you don't assume I'm bad :)
<naobsd>
there is Rockchip official tool set to unpack/repack images. I know some open source tools work well, but I think it's good to know official one
<tlwoerner>
my ability to flash those two images relied on the fact that i could hold the RECOVERY button while hitting RESET which would put me into "loader mode" so i could use the upgrade_tool
<tlwoerner>
but if i asked the right questions and understood the answers, the ability to get into "loader mode" by that button procedure depends on each image having the right code in a "boot" and/or "resource" partition?
<tlwoerner>
so if i created my own image from scratch and forgot to add the right code to the right partitions, i would lose my ability to use that button trick to get into "loader mode"?
<naobsd>
tlwoerner: it's for rk3066 based devices, please don't use images in zip. but there are tools for unpack/repack images,
<naobsd>
tlwoerner: put firefly image as "update.img" and run unpack.sh
<naobsd>
then you can see files in output/ directory
<naobsd>
then,
<naobsd>
"loader mode" is implemented in RK3288 loader bin. loader is part of update.img which is flashed to your device. it means you have a chance to flash invalid loader and lose "loader mode".
<naobsd>
if loader is "erased", board will be booted into "mask rom mode". you can upload loader binary via USB from PC, and you can reflash valid loader binary into on-board flash.
<tlwoerner>
i see... RKLoader.bin
<tlwoerner>
and it resides in the magical area below 0x00002000 (which is the reserved area)
<naobsd>
if loader is "flashed but not working properly", you'll lose both "mask rom mode" and "loader mode", i.e. you cannot reflash loader and you cannot run anything. in this case, you have to short some pins/test points to enforce mask rom mode
<naobsd>
tlwoerner: "please don't assume wiki is right"
<naobsd>
tlwoerner: on SD card and eMMC, magical area "ID Block" is started at sector 64
<naobsd>
oops
<naobsd>
if you can please forget about whole "boot sequences" page ;)
<naobsd>
I cannot explain which part is right, which part is wrong :(
<tlwoerner>
ouch! that bad? ok
<naobsd>
(well, I can explain which is wrong _if I have time_, but I don't have it)
<tlwoerner>
if my math is right: sector 64, sectors of 512 = 0x8000
<naobsd>
mask rom loads sector 64 which describes 2 blocks of code(loader)
<naobsd>
well, ... which describes 2 set of offset/size of code
<naobsd>
Rockchip official loader binary has 2 code, one for DRAM init, another for rest of "loader" function
<naobsd>
usually sector 68 has DRAM init code and sector 92 has loader code
<naobsd>
(sector number might be different, it' defined by header in sector 64)
<naobsd>
then loader loads parameter from sector 8192 (this depends on how loader is coded, I'm talking general behavior of official rockchip loader)
<naobsd>
"parameter" has info about logical partition (and some other info)
<naobsd>
logical partition start at sector 8192 (=logical sector 0)
<naobsd>
loader loads partition info from "parameter", then try to load kernel, ramdisk, and dtb data from "boot" partition
<naobsd>
all partition defined in "parameter" is placed on "logical" space i.e. sector 8192 and after. "parameter" partition is at logical sector 0x0, start of logical partition.
<naobsd>
tlwoerner: can you unpack firmware image? there is "parameter" file.. file name might be different
<tlwoerner>
yes
<tlwoerner>
it's interesting how different the results are of unpacking the same image using your tool versus the (official) linux-rockchip tool
<naobsd>
tlwoerner: "package-file" explains which file will be flashed to which partition. (left side is partition mame, right side is file name)
<naobsd>
and unpack.sh delete output/boot.bin and output/firmware.img at last, which are same as BOOT and embedded-update.img by rkunpack
<naobsd>
boot.img can have "kernel and ramdisk and dtb", but this form is very latest form
<naobsd>
older boot.img form was "kernel and ramdisk". dtb is stored in resource.img(resource partition)
<tlwoerner>
is "ramdisk" the same as "root filesystem"?
<bashintosh>
Hi folks, I see that T-Chip is actively releasing Android 5.x SDKs here -> https://bitbucket.org/T-Firefly/firenow-lollipop Does that mean that Rockchip has released the official SDK for Lollipop or that's something exclusive to T-Chip and their boards?
<tlwoerner>
naobsd: oops, i should have googled first ;-)
<naobsd>
oldest boot.img form was "ramdisk"(only). kernel is stored in kernel.img
<naobsd>
tlwoerner: yes and no, ramdisk is root file system on android image
<tlwoerner>
i assume there are (official?) tools to help someone put together an image? and if so, do they include thinks like the RKLoader.bin implicitly, or does it have to be supplied explicitly?
<naobsd>
linux-rockchip "community" is not "official rockchip"
<tlwoerner>
ah... haha
<tlwoerner>
oops, my bad
<naobsd>
tools under rockdev/ in zip is "official rockchip"
<tlwoerner>
the zip you sent me earlier? rockdev-rk3066?
<naobsd>
tlwoerner: about ramdisk, it can be root file system, but you can switch or use another place as root file system as same as linux
<naobsd>
just a matter of configuration
<tlwoerner>
excellent :-)
<mrueg>
btw. naobsd are you going to do another release for rkflashtool?
<naobsd>
and if you need you can change loader behavior such as "loading XXX from YYY" by modifying loader
<mrueg>
assuming you're upstream now :)
<naobsd>
mrueg: sorry, I don't contact original author on sf.net yet
<mrueg>
naobsd: if you got time, it would be great to see a new release :) sf.net development seems to have stalled in dec 2013
<naobsd>
tlwoerner: you cannot change "mask rom" code, i.e. header must be placed at sector 64 on SD/eMMC, loader code must be placed at sector 68(or somewhere, defined in header)
<naobsd>
mrueg: I see, probably I have to increment ver. and write some docs ;)
<tlwoerner>
naobsd: ok, i assume it's a first-stage bootloader that is part of the SoC's ROM
cheetahw26_ has joined #linux-rockchip
<naobsd>
bashintosh: repo on bitbucket is maintained by firefly team, not by rockchip.
cosm has quit [Ping timeout: 246 seconds]
<naobsd>
bashintosh: firefly team got SDK from Rockchip. I guess anyone who paid enough money can get SDK from rockchip.
cheetahw26 has quit [Ping timeout: 248 seconds]
khilman has left #linux-rockchip [#linux-rockchip]
<naobsd>
tlwoerner: it's "mask rom mode/code", you cannot change it
cheetahw26_ is now known as cheetahw26
<naobsd>
you cannot change "mask rom code load sector 64 ...", but you can change code loaded from mask rom
<tlwoerner>
naobsd: ah, ok
<naobsd>
you can supply code via USB if it's in "mask rom mode"
<tlwoerner>
have you tried that? are there tools available for that procedure?
cosm has joined #linux-rockchip
<naobsd>
"rkflashtool l/L" does it
<tlwoerner>
naobsd: i'm exceedingly grateful to you for taking the time to chat and answer my questions!
<tlwoerner>
i'm going to spend some time with the sdk and the various tools and see what i can get from them
<naobsd>
you're welcome!
<tlwoerner>
i guess my primary goal was to make sure i couldn't do something that would cause me to brick my device
<tlwoerner>
but now i see i don't need to be too concerned ;-)
<bashintosh>
naobsd: Thanks! What a bummer - I have been in touch with Rockchip for both RK3288 TRM and Android 5.x SDK. No way, even by signing an NDA it's almost impossible to get anything from them. A bit of a downside if you're basing a project on one of their products :( I guess we shall wait!
<naobsd>
tlwoerner: if you flashed valid form but non-working loader, your device will half-bricked. you have to disable eMMC at boot to enforce mask rom mode
<naobsd>
bashintosh: I have no idea how to buy SDK from Rockchip, but firefly is not only one who make RK3288 based product.
<naobsd>
anyway firefly user can get SDK from firefly
<tlwoerner>
on the SDK site, what's the "R-BOX"?
<naobsd>
R-BOX is for box/stick form product
<naobsd>
there is SDK for tablet too
<naobsd>
if my memory is correct, "pad" branch for firefly is based from tablet version
<rperier>
amstan: I did a "cat /proc/device-tree/compatible" , that's the speedy one :/
<rperier>
yeah but you have an uart on your chromebook right ? (I mean, you find an uart and you probably added wires)
<rperier>
no?
<rperier>
because the first entry of dmesg is "[ 0.000000] Booting Linux on physical CPU 0x500" for me :)
<rperier>
I will check things this noon, because I have not my chromebook right now
<rperier>
wait... I have this error too "wifi_regulator: could not add device link mmc2 err -2"
<rperier>
:/
<naobsd>
where is my chromebook...
<naobsd>
(amazon)
markm has joined #linux-rockchip
mrueg has quit [Ping timeout: 252 seconds]
mrueg has joined #linux-rockchip
cristian_c has joined #linux-rockchip
<rperier>
tlwoerner: you're welcome, don't hesitate if you have others questions ;)
<rperier>
steev: I did just read your suggestion about "kick start bluetooth to get wifi working", I will test that very soon. Thanks
nighty^ has joined #linux-rockchip
<steev>
naobsd: apparently amazon hates you, i've had mine since saturday :(
<naobsd>
steev: if I click "buy" button on amazon kindly, amazon gives me chromebook...? ;)
<steev>
naobsd: dunno... my boss bought mine :P
<naobsd>
ah, what I need is kind boss!
<steev>
it's definitely nice to not have to pay out of pocket
<rperier>
you're lucky , I would need a boss like him too :p
<steev>
i do try not to abuse the privilege though
<steev>
which is probably why they are more willing
<rperier>
fortunately, we have nice privilege in the rockchip community too (some of us got free dev boards from firefly or radxa for example)
<rperier>
that's cool too :)
<naobsd>
definitely :)
<rperier>
that's not a chromebook but cool anyway
<rperier>
amstan: oh, I did not know that you're a chromium dev :)
<steev>
rperier: yeah, some companies hook me up for my gentoo work, most don't. some (looking at you APM) tell me to f right off since there's no corporate backing for gentoo
<cristian_c>
ok, apart this, I've found some troubles with rk3066 and rk3188
hipboi has quit [Read error: Connection reset by peer]
<rperier>
naobsd: which one did you order btw ?
<cristian_c>
I've investigated much more but it's not easy to solve them
<cristian_c>
1
<cristian_c>
sorry I've typed enter, my bad
<cristian_c>
1) I'd like to enable bt properly in ap6210
<cristian_c>
2) I'd like to access to mount user readable/writable nand partition (i.e. /sdcard)
<cristian_c>
this is related to rk3188
<cristian_c>
1) I've found some strange behaviours, if I type rfkill list, I can see ap6210 bt interface in the output
<cristian_c>
I can block/unblock the software switch (not hardware one)
<naobsd>
rperier: I'm waiting boss ;)
<cristian_c>
some months ago, I tried the patchram plus method
<cristian_c>
but it's difficult to say why it doesnt'work
<cristian_c>
so, I'd like to know if there is a method to set it properly either how I can collect useful info from commands/files. Any ideas?
hipboi has joined #linux-rockchip
<cristian_c>
2) I think loop* block files are related to mtd partitions
<cristian_c>
and I think I could mount /system or /sdcard
naobsd has quit [Quit: naobsd]
<cristian_c>
mtdblock8 and mtdblock9, respectively (they are ext4 the first one and vfat the second one)
<cristian_c>
so, I'd like to know if maybe I've to enable some CONFIG options in the kernel configuration file or to something else. Any ideas?
<karlp>
what is an fdt/its wrt to device tree? I know what dtsi and dts and dtb are, but rperier and amstan were talking about .its?
<cristian_c>
karlp: anyway, I think that +0x2000 in the seek option for dd command is due to parameter file offset
<cristian_c>
so, partition flashed into sdcard for sd booting are all shifted by 8192 sectors
<cristian_c>
+partitions
<mmind00>
karlp: fdt is the flattened devicetree ... the file based devicetree implementation used on arm and others
<mmind00>
karlp: the original devicetree/openfirmware on powerpc uses some other form
<mmind00>
karlp: the its a devicetree-ish description of boot-image+devicetree combinations, which is used by the uboot tools to build a "FIT"-bootimage from
<cristian_c>
and I should flash only the boot.img file containing kernel+ramdisk in place of kernel.img + boot.img (rootfs only)
hipboi has quit [Read error: Connection timed out]
hipboi has joined #linux-rockchip
<rperier>
do you... build directly from your chromebook or you cross-build usually ? I just ask because there are no fans... (at least I did not find one)
<karlp>
cristian_c: please feel extremely free to update the wiki,
<karlp>
I wrote that mostly based naobsd's irc logs, I never got a lot of time to experiement with it as much as I wanted.
<karlp>
mmind00: so the regular .dtb built when you're building a kernel is an FDT?
<cristian_c>
karlp: these things are explained in Bootsequence wiki page
<cristian_c>
I 've read it carefully a week ago, and a bit more today, so I think what I've made wrong last time (about booting)
<cristian_c>
karlp: anyway, I used a different method /not sd booting) for rk3\88
<cristian_c>
I used the classic method (I flashed recovery.img in recovery partition: kernel + initramfs)
<karlp>
cristian_c: please, if you have any thing that you have confirmed, that's not on the wiki, please just add it youself.
<cristian_c>
I've used the same method for flashing in rk3066, too
<cristian_c>
karlp: I don't know if I've got the permission
<karlp>
it's self service to create a wiki user, iirc
<cristian_c>
before editing the wiki, i should test the sdbooting, when I'll install into sd card the next time
cosm has quit [Ping timeout: 248 seconds]
cristian_c has quit [Quit: Bye]
cosm has joined #linux-rockchip
cosm has quit [Ping timeout: 244 seconds]
hipboi has quit [Ping timeout: 276 seconds]
hipboi has joined #linux-rockchip
cosm has joined #linux-rockchip
_whitelogger has joined #linux-rockchip
architekt has joined #linux-rockchip
<tlwoerner>
rperier: looking more closely through meta-rockchip, it appears that the upload_tools-flashable image is not created if MACHINE is firefly, rockchip-update-image is only invoked with radxa-rock, rk3188, and mars-board
GriefNorth has quit [Quit: Konversation terminated!]
<tlwoerner>
rperier: is there any reason such an image couldn't be created for the firefly?
irsol has quit [Ping timeout: 244 seconds]
cheetahw26_ is now known as cheetahw26
root has joined #linux-rockchip
root is now known as Guest2783
<rperier>
tlwoerner: the class (used to create the image) is bugged, and the generated image is an image for NAND flash on rk3066/rk3188 (that's not supported on mainline), for rk3288 the NAND flash is replaced by an eMMc which is supported in mainline, but I never tested yet
<rperier>
usually I fully work from sdcard and with mainline kernel
<rperier>
however, I opened to suggestions, feel free to propose patches or improvements :)
<rperier>
normally the produced image is flashable with upgrade_tool uf (the same command used to flash ubuntu on your firefly)
<Guest2783>
Does the RK3188 support LVDS?
irsol has joined #linux-rockchip
<rperier>
steev: I tested with the udev rules... it changes nothing... :/
<rperier>
the module is mwifiex right ?
<rperier>
(anyway mwifiex or brcmfmac don't work)
<rperier>
it is loaded but I have no wifi interface
Guest2783 has quit [Read error: Connection reset by peer]
patrick has joined #linux-rockchip
patrick is now known as Guest79141
Guest79141 has quit [Client Quit]
wildea01 has quit [Quit: leaving]
cosm has quit [Ping timeout: 276 seconds]
<steev>
rperier: on the rk chromebooks it's brcmfmac
<steev>
rperier: using the chromeos kernel? make sure you're building it with WIFIVERSION="-3.8"
<steev>
they use the wifi stack from 3.8 and patch that, not the one from 3.14
cosm has joined #linux-rockchip
<mmind00>
steev: I would disagree :-) ... meaning not all are broadcom
<mmind00>
steev: at least my jerry and pinky do report marvell modules
<steev>
mmind00: ah, well that's good to know
<tlwoerner>
rperier: ping?
nighty^ has quit [Quit: Disappears in a puff of smoke]
<rperier>
steev: mhhh so I REALLY needs the revision -4 because the kernel is built with WIFIVERSION="-3.8" too. I only tested with -3. until it works I use the dongle wifi which I received with my marsboard-rk3066
<steev>
rperier: hm, i'm not sure what the revision things are
<rperier>
3.14.0-4 the distro revision
<steev>
arch?
<rperier>
because the last commit from today which bumps this revision (yes for arch) includes various fixes for wifi
<steev>
i dunno, i build my own kernel
<steev>
but yeah probably
<steev>
leming would know better than me :)
<rperier>
I will build my mainline kernel later, I just want to test my chromebook and see what I can do with it for now
<rperier>
(I will switch to yocto and mainline later, I just want a working distro for now)
<leming>
yes, -4 switched to wireless-3.8
<rperier>
np :)
<rperier>
bbl
<leming>
but that kernel isn't in the repos yet, and it's not what is in the tarball you would download
Bludot has joined #linux-rockchip
<steev>
aha
cosm has quit [Ping timeout: 276 seconds]
nashpa has quit [Ping timeout: 250 seconds]
nashpa has joined #linux-rockchip
Astralix|away has joined #linux-rockchip
Astralix|away has quit [Ping timeout: 264 seconds]
Astralix|away has joined #linux-rockchip
Astralix|away has quit [Read error: Connection reset by peer]
Astralix` has joined #linux-rockchip
bamvor_ has joined #linux-rockchip
bamvor has quit [Read error: Connection reset by peer]
lerc has quit [Quit: No Ping reply in 180 seconds.]
bamvor_ is now known as bamvor
lerc has joined #linux-rockchip
Astralix` has quit [Ping timeout: 264 seconds]
Astralix|away has joined #linux-rockchip
Astralix|away has quit [Ping timeout: 264 seconds]
Bludot has quit [Quit: Connection closed for inactivity]