ildar has left #linux-rockchip ["PING 1416158151"]
<Astralix>
naobsd? Are you there?
<lautriv>
anyone used to the uart output of rockchips ?
<Astralix>
What is the problem with it?
<lautriv>
Astralix, i got a MK809/3 in "bricked" state and all i see is "In Err" probably from mask-rom, now i try to find what err.
<Astralix>
?? No, if it is a RK3188 based stick you get a continuous stream of "RK3188" printed on the serial port.
<Astralix>
If you just get a "In Err" and nothing else, you got a dead Loader.
<lautriv>
only when triggering a pin on the PCB to get the USB up.
<Astralix>
The MASK ROM Loader sees the token of the NAND Loader and loads / starts it, but then the Loader is defective and crashes
<lautriv>
assumed somthing like that but can't switch to flash mode :(
<Astralix>
You need to short two pins of the NAND and wait until you get this continous stream of "RK3188RK3188RK3188..." on the serial port. Then you can use factory tool or upgrade_tool to flash a new loader
<Astralix>
This often happens if people flash yust another image without checking the Loader for compatibility.
<Astralix>
Or if they upgrade from Loader 1 to Loader 2 without taking some precautions
<lautriv>
was there, shorting on NAND does nothing (PIN 8+9) but i get that stream by a pin on the PCB, called "CLE"
<lautriv>
i guess the one who sold me this thingie did a bad flas, i have proper images but it won't go that far to let me even clear the NAND
<Astralix>
There are multiple ways of getting into MASK-ROM
<lautriv>
it may happen the RXD got killed, very low level (0.24V) maybe the Mask-Rom does a check ?
<Astralix>
The MASK ROM must be tricked to not see any valid bootable thing on the NAND. So either you hit the correct data line to scramble the data or you short Command Latch Enable line, so the nand doesn't get correct commands to show the MASK ROM the right values
<Astralix>
MASK ROM can boot from serial port
<lautriv>
i will retry the nand-pins, maybe i had no proper contact.
<Astralix>
You must be careful, without furthe protection the pins are ssensitive for ESD. And your serial port adapter should not use 5V on the output...
<lautriv>
serial is 3v3, using the well known CA-42 ;) ESD is no deal i'm used to electronics.
<lautriv>
didn't check the datasheet, can you confitm pin 8+9 ?
<Astralix>
I guess so... wait, need to look on the notebook
<Astralix>
8+9 are /CE and /RE (Chip Enable and Read Enable)
<lautriv>
works like that "CLE" pin, i get device 2207:310b but rkflashkit said LIBUSB_ERROR_IO [-1]
<Astralix>
16/17 are ALE and CLE
<Astralix>
I am not sure if rkflashkit can work with MASK ROM Loader
<Astralix>
The Factory-Tool (Batch Tool) can flash upgrade.img too.
<Astralix>
and understands MASK ROM Loader commands
FreezingCold has quit [Ping timeout: 258 seconds]
<lautriv>
right now i have just hacked images (rooted) with their own loader, will see what it gives.
<Astralix>
It is important to know that the rknand_ko.ko should match the Loader().bin used.
<Astralix>
Especially Loader 1 and Loader 2 files must not be mixed.
<lautriv>
the loader in question is called RK3188LoaderV2.13.bin but since it was a brick on start i can't mess that much.
<Astralix>
Mixing loader 1 bin and Loader 1 compatible rknand_ko.ko should not give too much problems... but it was never really verified to the last detail
<Astralix>
Loader 2 uses a different FTL and Bad sector handling so you must use a matching rknand_ko.ko
<lautriv>
i guess the other parts bundled with it are aware of that but it appears to not flash anything
<Astralix>
Even I ever really tried to start a loader 1 nand driver on a loader 2 binary, it is imagineable that it will give a mess on the NAND, resulting in anything but stable data.
<Astralix>
That is why I requested you to use a known to work image first to recover your system.
<Astralix>
Then you can try again whatever you tried before
<Astralix>
Do you have linux or windows as a host?
<lautriv>
Read flash ID Fail!
<lautriv>
i prefer linux for anything but even using win-tools doesn't change
<lautriv>
appears to error out on a very low level hence not even ready to go that far.
<Astralix>
ok, wait
<Astralix>
use the upgrade_tool and startit while the serial port shows "RK3188RK3188RK3188..."
<Astralix>
It then asks you to select the available devices and it shows a list of your devices
<lautriv>
i have to mention my config.ini is empty but the delivered explanations are unhelpful while chinese.
<Astralix>
just forget about this config
<lautriv>
did so, gotDevNo=1Vid=0x2207,Pid=0x310b,LocationID=20eMaskrom
bengal has joined #linux-rockchip
<Astralix>
cool
<Astralix>
so you abort
<Astralix>
change into the directory where you have the know to work upgrade.img
<lautriv>
i have none, just some split system/misc etc.
<Astralix>
that is not enough
<Astralix>
you need a full working system
<Astralix>
go to tronsmart or wherever you stick is coming from and download an image from there
<lautriv>
who is the original vendor for MK809III ?
<Astralix>
hmm...
<Astralix>
Tronsmart is MK908... Rikohmagic is MK802... who is MK809?
<Astralix>
May be it is tronsmart too?
<Astralix>
Hmpf... Tronsmart download center is 404...
<lautriv>
i found some more details on linux-rockchip.info where older versions have RTL8188 and newer have AP6210 Wifi. mine has actually RTL8723BS
<Astralix>
Ok, but even with a running loader you still would have the problem of a missing kernel, boot, recovery and such... So where do you get these if you only have system and misc
<lautriv>
bah, i have here boot/kernel/misc/recovery/system but no all-in-one.img
<Astralix>
hmm... so you miss parameter Loader and matching rknand_ko.ko
<Astralix>
to install a new loader you can use any of the images that merily match you stick. So 2.1x loader and rk3188
<lautriv>
i guess the parameter-loader is that RK3188LoaderV2.13.bin and i have several parameter-files differing on the amount of NAND-Space where mine has 8G
<Astralix>
so in that case, you have everything you need
<Astralix>
so change into the directory containing RK3188Loader...bin
<Astralix>
Does the loader have this name with brackets?
<Astralix>
RK3188Loader(L)_v2.13.bin
<lautriv>
indeed
<Astralix>
so follow me:
<Astralix>
upgrade_tool EF "RK3188<tab>"
<Astralix>
Use " to get around the () problem in the command line, use <tab> to auto-complete the filename correctly
<Astralix>
did it work?
<lautriv>
Loading loader...
<lautriv>
Download Boot Start
<lautriv>
and created a log-dir
<Astralix>
ok
<Astralix>
now on the serial there has been some output, but now it is back into MASK ROM mode, I guess?
<Astralix>
If that is true, wen go to the next command needed
FreezingCold has joined #linux-rockchip
<lautriv>
serial did nothing, still waiting
<Astralix>
upgrade_tool UL "RK3188<tab>"
<lautriv>
it'll take forever ...
<Astralix>
Then there is something wrong
<Astralix>
did you call it as sudo?
<lautriv>
initial reason for my question ;)
<lautriv>
i do as root
<Astralix>
If you put the right lines into /etc/udev/rules.d/... you do not need to be root
<Astralix>
but if not, you need to be root.
<lautriv>
i assume the "In Err" right after power-up indicates a serious problem.
<Astralix>
not ultimative
<lautriv>
let me re-power-up. maybe the serial will tell more then ...
<Astralix>
So try again. disconnect USB, reconnect, hold the CLE pin tied to ground until the continous stream of RK3188 is aapearing on serial
<Astralix>
:)
gb_master has quit [Remote host closed the connection]
<lautriv>
ok. actual output is that repeating RK310N with 2 unprinteavle chars (inverted questionmarks) will invoke the first command again ...
<lautriv>
right after sendind, "In Err" again.
<lautriv>
seems the mask-rom fails on early checks.
<Astralix>
This EF just uploads the Loader. Then this Loader is started and the NAND is erased.
<Astralix>
So if your system doesn not give more info than just the In Err, there must be something else
<Astralix>
In Err looks a bit like a USB error, not a flash error
<Astralix>
can you please add a file to your /etc/udev/rules.d
<lautriv>
maybe it was my own fault, on the beginning i had some "loading kernel <somenumber>" but in the meantime i guess the Uart was plugged wrong with RXD and GND swapped where that pin was killed and fails on early init from mask-rom.
<Astralix>
rxd and gnd can be swapped with no further damage possible, caus both are inputs
<Astralix>
tx is the one sending
<lautriv>
that may actually be another reason, when it was reporting some kernel, it was just power and no USB.
<lautriv>
what rule ?
<Astralix>
but even then it should ave some R in series and should not breaj
<lautriv>
this machine is infected by systemd, retrigger fails
<lautriv>
(reinstalling gentoo + eudev soon )
<lautriv>
ok, next try ...
<lautriv>
HAHA, greetings from the poettershit multi-opaque world-domination-service including NSA Backdoors .................... the entire usb-subsys stalls.
<Astralix>
what?
<lautriv>
will need a reboot, this takes about 10 minutes ( Big server with several RAID and onboard thingies )
lautriv has quit [Quit: Leaving]
<Astralix>
hmmm... I never will understand why people do coding and such on a server system...
lautriv has joined #linux-rockchip
<lautriv>
ok, back
<lautriv>
./upgrade_tool EF "RK3188LoaderV2.13(L).bin" gives the same "In Err" where i did not see any special with that new rule.
<lautriv>
Astralix, there is something to mention ..... does the flashtool need any special driver/kernel-module on the host ?
FreezingCold has quit [Remote host closed the connection]
<Astralix>
no
<Astralix>
try that one:
<Astralix>
ah, first try again as sudo
<lautriv>
i'm still root
bengal has joined #linux-rockchip
<Astralix>
try ./upgrade_tool DB "RK3188LoaderV2.13(L).bin"
<lautriv>
wait, sice it hangs i need a re-plug ...
<lautriv>
same
<lautriv>
also, the hanging lsusb was caused by that device
<Astralix>
There is something really damaged cause this USB hangs are not normal
<lautriv>
is there anything different on the usual wiring ?
<Astralix>
I don't know what kind of machin you have there but you probably will have much more success on a small ubuntu image running in virtual box eith the personal extentions installed on you notebook
<Astralix>
Running such experiments on a server is generally a bad idea as well as working as always root on any kind of system.
<Astralix>
Tha wiring is normally not needed at all
<Astralix>
What you need is a Micro-USB Cable to connected to the OTG Port of that stick
<Astralix>
some sticks have TWO MicroUSB ports, use the correct one.
<lautriv>
this is a IBM System x3655 running debian and there is nothing a clone does any better . i asked about the wiring because certain samsungs are used to trick aroubd with resistors.
<Astralix>
One is labeled DC, the other is labled OTG
<Astralix>
Not for RK
<lautriv>
it is also the right port ( on the side) because the other is only power and doesn't even send a vid:did
<Astralix>
Ok
<Astralix>
So to find out if the device has connected in any kind of loader mode, only lsusb is needed. It must show a device with VID 2202
<Astralix>
For this you do not need serial port
<Astralix>
But if you have serial port, you can more easy see that it is in loader mode or if it has hanged somewhere else
<lautriv>
2207:310b on the device, that tool aLready found device 1 in mask-mode
<Astralix>
But if your USB is failing that easy, you probably run some old linux as I almost forgot the times when I had these problems with USB
<Astralix>
But it should never crash when sending data to this port
<lautriv>
debian sid on 3.17 ain't old
<Astralix>
Do you use the upgrade_tool I sent you?
<lautriv>
yep
<Astralix>
So I never hanged my machine using it
<lautriv>
does the mask have some alternative to read from sd-card ?
<Astralix>
There might some USB related problems when using a USB2.0 device on a USB3.0 port or USB3.0 HUB
<Astralix>
RK3188 can boot from SD, yes
<lautriv>
host-port is 2.0
<lautriv>
can you point me to some reading or image ?
mkrentovskiy has joined #linux-rockchip
<lautriv>
out of curiousity i changed the port to power-only and UART still insisting on "In Err" so that's most likely "no media to boot from"
<lautriv>
In that case, why is it crying before someone said " go into mask or flash mode" ..... will take a measure on that switch, could be always be pressed o.O
<Astralix>
??
<Astralix>
You mean, the reset switch or the recovery switch is pushed and locked?
<lautriv>
ar least a thing i have to check
cosm has quit [Ping timeout: 240 seconds]
<lautriv>
button is fine, will try that mininoot ...
mkrentovskiy has quit [Ping timeout: 246 seconds]
FreezingCold has joined #linux-rockchip
cosm has joined #linux-rockchip
<lautriv>
ok, i guess that thingie is just toast,, error is right after powerup doesn't care about anything.
<Astralix>
You have measured the RX voltage, probably you can measure the voltage across the reset or bootloader button too?
<Astralix>
Just to clear that it is not stuck
FreezingCold has quit [Remote host closed the connection]
<lautriv>
both are used to be put down to gnd, so i suspect some pulled up value which appears to be correct with 1V78 on the button and 2V96 on the CLE pad.
<AstralixNB1>
right
<lautriv>
rockchip -> roastchip
<AstralixNB1>
so please try another machine these days and see if this If Err is still coming
<lautriv>
actually i'm working on wondermedia-chips which take much time due to the lack of datasheets but at least, they boot.
<lautriv>
thisone was a future plan to replace a htpc
<AstralixNB1>
Don't know that system
<lautriv>
basically another arm-soc and vendors give a shit on endusers but i dislike android for a bunch of reasons ;)
<AstralixNB1>
I am a bit lost now... You did not use a normal AMD/Intel based PC to run that tools to connect to your dead stick?
<lautriv>
i used a quad x86_64. the other mentioned thingies are actual projects which have a higher precedence over a burned rockchip.
<lautriv>
in other words, it is likely i have some kernel-drivers for wondermedia written before there is some time for another rk30 experiment.
<AstralixNB1>
ah, ok.
<AstralixNB1>
understood that
<lautriv>
still curious, if it can send anything on serial, it should be able to react on one or the other way :(
<lautriv>
maybe the "in Err" fails on Uart0 before USB is even touched ?
<AstralixNB1>
hmmm... you could try to ty up your rx by 2k resistor to 3.3V
<AstralixNB1>
warte
<AstralixNB1>
ups, sory
<lautriv>
braucht keine entschuldigung ;)
<AstralixNB1>
lol
<lautriv>
that appears to be a bit dangerous since i need to solder in the middle ... will see where i get it.
<lautriv>
hm, while i'm on it i may even try to see if some R broke.
<AstralixNB1>
Ah... I forgot... the RX input of the Stick should be fine at low level
<AstralixNB1>
wait... too much signals...
<AstralixNB1>
:)
<lautriv>
found an additional USB port inside ...
<AstralixNB1>
No, it should stay high and bits are low-active
<lautriv>
yes, rs-232/TTL is open-collector and nothing wrong with that but i suspect a muxed GPIO on that pin.
<lautriv>
can grab only 5V on a reasonable pin, will build a divider in between. heating solder-iron up ......
<lautriv>
ok, pulled up, measured 1V52 which is ok to be recognized to "high" still "InErr"
<lautriv>
i may mention the very first line is "DR Version 1.04 20130517" but that doesn't solve anything.
<Astralix>
DDR Version 1.04 20130517
<Astralix>
This is the NAND Bootloader, the part of it that starts the DDRRAM
<Astralix>
DDR Version 1.04 20130517
<Astralix>
In
<Astralix>
DDR3
<Astralix>
300MHz
<Astralix>
Bus Width=32 Col=10 Bank=8 Row=15 CS=2 Die Bus-Width=16 Size=2048MB
<Astralix>
Memory OK
<Astralix>
OUT
<Astralix>
BUILD=====2
<Astralix>
SdmmcInit=0 0
<Astralix>
FwPartOffset=2000 , 0
<Astralix>
run on sd0
<Astralix>
OK! 27962
<Astralix>
unsigned!
<Astralix>
ups
<Astralix>
however it looks similar to this
<Astralix>
I cannot switch to Bootloader now as I am installing an Android...
<lautriv>
i've see that before i accidentally swapped the uart-pins
cosm has quit [Read error: Connection reset by peer]
<Astralix>
So this or a part of it is the Loader if it works.
<Astralix>
In this case, it boots from an SD
<Astralix>
So even you killed tha flash by whatever reason, you can buy a fast SD and boot anything you like from that card
<lautriv>
i got that thing in a bricked state and can't tell what exactly happend. most likely someone not used to flash ;) however i tried that sdboot_rk3188_miniroot.zip withot success. after that "In Err" is no sign of live (mentioning booting from something or whatever)
<lautriv>
still one thing left, said sd-loader assumes to have kernel.img from other sources where i don't know if the one i have is ok.
<lautriv>
but then, at least sdmmc-init shoulöd be sent
<Astralix>
yes, if you boot via SD you should see at least the first lines till "run on sd0"
<lautriv>
that is the point, seems to be stuck because of this error.
cosm has joined #linux-rockchip
<Astralix>
If you only see the DDR Line and nothing more, it could be a dead DRAM
<Astralix>
These stick remind me of the very old days, where I always had a Commodore 64 to play with, even I never bought one myself...
<Astralix>
I always had to repair them after friends or guys from school just bricked theirs
<Astralix>
I guess I still have spare parts around here :)
<lautriv>
me too :P
<lautriv>
even an accelerator based on 65SC816P4, beating it to 4MHz and 16 bit.
<lautriv>
will get another one, maybe i will put that sandisk with 8G somewhere else ...
<Astralix>
lol
<Astralix>
Nope. after repairing them, I gave them all back, so only my personal Apple ][ is left
<Astralix>
Have not tried to start it for years...
<lautriv>
could still run linux......i have somewhere a quadra
<lautriv>
not to forget certain legendary Amiga's
<Astralix>
I had to repeir several of them, but never owned one. I went straight from Apple ][ to PC XT
<lautriv>
compatibles are the worst arch ever. in the past i owned some machines who was used to be called "mainframe" but that is decades ago.
<Astralix>
I had a PDP11/730 and a 11/720
<lautriv>
i had the former including 3 Winchester drives and a hammer-printer. also a PCS-Cadmus already running X11 and 256 ttyS
<Astralix>
X11? wow, no I had an IBM ballhead typewriter as terminal
<lautriv>
those ballheads were rather fast that time.
antoinemaillard has joined #linux-rockchip
Celia is now known as FergusL
<AstralixNB1>
yes, for sure.
<lautriv>
and the funny "delete" ribbon ...
<AstralixNB1>
I spent the machines to museums
<Astralix>
btw. I have here a radxa that doesn't give any output via serial port anymore. But it still boots fine and works with anything I flash to it
<lautriv>
the uart is just a guess because nothing else happend. maybe there are different mask-roms and your radxa can't boot from serial or at least can ignore that.
<naobsd>
oh, I should remove my 3.10 page quickly...
antoinemaillard has quit [Quit: antoinemaillard]
<lautriv>
bedtime, laters ....
<AstralixNB1>
gn8
antoinemaillard has joined #linux-rockchip
<naobsd>
"In Err" sounds like error at "In" on DDR init
<naobsd>
(just guessing)
<Astralix>
Yes, we thought about that
<Astralix>
Right before DDR3 is sent, it is stuck
<Astralix>
I first thought about USB Endpoint In Error
<Astralix>
And as the USB system hangs when you connect this dead stick
<naobsd>
USB(RK side) is initialized at very late...
<Astralix>
Yes
<Astralix>
But I do have a radxa that only gives few to nothing on the serial port but initializes fine on USB
<naobsd>
lsusb (on PC side) will hang if there is some bad USB device which doesn't respond properly
<Astralix>
So anything is possible.
<Astralix>
hmm... only on older kernels... Ah... I run kernel 3.17 on a 14.04 ubuntu... And there was a lot improvement since the original 3.13+
<Astralix>
However, either the DRAM is bad or the Loader has been flashed for a wrong device with DRAM support missing
<naobsd>
I don't doubt that it can be improved :)
<naobsd>
but it's PC side issue
<Astralix>
Yes, that is one reason I updated ubuntu kernel to 3.17 instead of using the old one from 14.04
<Astralix>
There here some reconnect bugs and some interrupt issues. Now it looks like running fine.
<Astralix>
Only problem left is if you connect 2.0 devices to a 3.0 port. This can sometimes give some trouble
<naobsd>
DDR can be initialized by loader on SD or via USB(mask rom protocol) and if it gives "In Err", DDR is bad. if "In Err" only happens with loader on NAND, NAND is bad
<Astralix>
naobsd, I need some info from you about the image generation for SD, but it is too late for today here. Hopefully I can catch you tomorrow.. er.. in some hours
<naobsd>
I see
<naobsd>
just leave message here when whitelogger is working
<naobsd>
or you may use google groups
<Astralix>
Ah, I always forget about this way...
<naobsd>
I'll update my sdboot page soon, it's little old
<Astralix>
naobsd, using mask-rom mode we used upgrade_tool to upload the loader directly to DDR but it failed too.
<Astralix>
It works fine for me with linux
<Astralix>
but I'd like to understand the android image thing too
<Astralix>
lol...
<naobsd>
then I think it's DDR issue. (btw upgrade_tool does some things at once, so exact "which point" may be missed if only "it failed" is given)
<Astralix>
yes
<Astralix>
but in this case, the simple upload of loader to dram should exclude any other issue
<naobsd>
I wonder why people don't put _all_ output
<Astralix>
No NAND involved and USB mask rom should have worked
<naobsd>
they only talks what he thought/assumed about problem
<Astralix>
I presented the output that is expected to be there and he remarked that only the first lines are coming
<naobsd>
I think upgrade_tool try to "reset to mask rom" at first (on some case? not sure)
<naobsd>
not only "load DDR blob"
<Astralix>
nope, some features are only available in mask rom mode, some only in loader mode
<Astralix>
And loading the loader to dram without doing anything to flash is only possible in mask-rom mode.
<naobsd>
if it's mask rom mode, upgrade_tool will try to load DDR blob at first
<Astralix>
Some of the lower commands regarding flash tests are only available in mask rom mode too
<Astralix>
yes
<Astralix>
and then it ends at "In Err"
<naobsd>
but upgrade_tool can handle loader mode too. in this case, it will do "reset to maskrom" at first to go mask rom mode
bengal has quit [Remote host closed the connection]
<naobsd>
I'm not talking about lautriv's case now
<Astralix>
yes, you can switch forth and back
<naobsd>
I'm just talking about upgrade_tool.
<naobsd>
= explanation just like "upgrade_tool got failed" may not explain what's the problem
<Astralix>
and for functions that include work on any loader flash sections, it does switch to maskrom and download the loader to ddr. Then it executes the needed work and reboots to the loader mode again
<Astralix>
I am with you.
<naobsd>
btw I have no idea how to fix DDR ;)
<naobsd>
bake it? ;)
<Astralix>
format doesn't help...
<Astralix>
Depends how it was killed
<Astralix>
ESD: no chance
<Astralix>
Overheated due to overclocking experiements: No chance
<Astralix>
Latchup due to wrong serial port adapter: no chance
<Astralix>
But nevertheless you can try to bake it at 210° for 8min in the preheated oven