IRC log of #cubox of Mon 27 May 2013. All times are in CEST < Back to index

04:40 DHowett to wire this bluetooth serial board up to the cubox or not. hmmm.
09:00 rabeeh DHowett: which BT is this?
09:01 rabeeh you have a 12 pin header beneath the lower board with easy access
09:01 rabeeh it shares same rs-232 with the usb to serial chip (Prolific or FTDI depending on your CuBox version)
09:44 DHowett rabeeh: RN-42; that was sorta my plan, but I don't know exactly how much I'd use serial anyway
09:45 DHowett I guess I got the thing without having a use for it, and now I'm making stuff up ;)
09:45 DHowett (the rn-42, not the cubox)
11:14 rabeeh _rmk_: when changing frequency of the processor; should jiffies be recalculated?
16:28 rabeeh tomlohave: ping
20:08 Hoof Dear all. Can't someone with knowlegde of flashing the SPI take a look at this: http://www.solid-run.com/phpbb/viewtopic.php?f=7&t=1307
20:08 Hoof It is so frustrating I can't get any further. The script for flashing fails with: "/dev/mtd0 (SPI flash) is invalid"
20:22 rabeeh Hoof: can you get into a point where you can 'sx' u-boot to CuBox?
20:23 Hoof Yes. I can boot the cubox via a serial connection and enter the menu from the usb stick
20:24 Hoof So I understand that this only loads the boot image to ddr ram, and the spi needs to be flashed - this is where things go wrong :/
20:24 Hoof I use the v3 installer and the designated menu entry to flash
20:24 rabeeh ok. hold on
20:24 rabeeh please send me a full dump of your u-boot when it loads
20:25 Hoof ok - ty for helping! :)
20:25 rabeeh (pastebin)
20:25 Hoof roger - will boot it right away
20:25 rabeeh and please stop it from counting down and booting :)
20:28 Hoof how ?
20:29 Hoof ok :)
20:29 Hoof there: http://pastebin.com/2gDRYPJS
20:35 rabeeh ok.
20:35 rabeeh now lets load u-boot (the spi flash version) to memory
20:36 Hoof alright; how? :)
20:36 rabeeh run 'loady 0x00200000 115200' on CuBox u-boot prompt
20:36 rabeeh and on your Linux machine run 'sb u-boot.bin > /dev/ttyUSB0 < /dev/ttyUSB0'
20:36 Hoof well
20:37 rabeeh where u-boot.bin is http://download.solid-run.com/pub/solidrun/cubox/u-boot/2009.08_5.4.4_SR1/apr-8-2013/u-boot-cubox_hynix_cubox_unified_spi.bin
20:37 Hoof i probably need a u-boot file then :)
20:37 Hoof roger
20:37 rabeeh and /dev/ttyUSB0 is your serial port
20:37 rabeeh are you still running on MAC?
20:37 Hoof yes
20:38 Hoof hm
20:38 Hoof permission denied
20:38 Hoof even with sudo
20:38 Hoof ah timeout
20:38 Hoof wait :)
20:38 rabeeh ?
20:38 rabeeh mac?
20:39 Hoof mac
20:39 Hoof yeah
20:39 rabeeh should probably be 'sb u-boot.bin > /dev/tty.usbserial < /dev/tty.usbserial '
20:39 Hoof yeah
20:39 rabeeh chmod 777 /dev/tty.usbserial ?
20:39 Hoof was about to suggest that :=
20:40 Hoof -bash: /dev/tty.usbserial: Resource busy
20:41 rabeeh close your terminal?
20:42 Hoof the same...
20:43 Hoof I have two terminals - one with the serial connection to the cubox (in a screen) and one newly opened one...
20:44 rabeeh you need to close screen
20:44 Hoof ok
20:44 rabeeh the terminal emulation software that is holding /dev/tty.usbserial
20:45 rabeeh but before doing that; just make sure that 'loady 0x00200000 115200' is still running and waiting for the image
20:45 Hoof yes, oc
20:45 rabeeh it typically times out in one minute
20:46 Hoof ok. that seemed to do the trick
20:46 Hoof so, just wait and hope? :)
20:48 rabeeh after it's done; reopen the terminal emulation
20:48 rabeeh (don't reset CuBox !!!)
20:48 rabeeh it is still wasn't flashed to the SPI flash
20:49 Hoof ok. "when its done" - meaning, the sb command finishes? :)
20:50 Hoof (how long should this take...?)
20:50 Hoof 4 mins by now...
20:52 rabeeh ?
20:52 rabeeh that's too long
20:52 rabeeh sb command should take ~20 seconds
20:52 Hoof ok
20:52 rabeeh isn't it doing any progress?
20:52 Hoof ill try again
20:52 Hoof no, it just "blinking" ...
20:52 rabeeh CuBox blinking?
20:53 Hoof nope - like a terminal command blinking...
20:53 rabeeh ok. so it's not doing anything.
20:53 rabeeh i suggest you close 'bs'; reopen the terminal emulation
20:53 rabeeh rerun the 'loady 0x00200000 115200' command
20:54 rabeeh and then quickly close the terminal emulation and run the 'bs' command
20:54 Hoof can I reopen the terminal without rebooting?
20:54 rabeeh sorry - 'sb' command and not 'bs'
20:54 rabeeh yes.
20:54 Hoof how?
20:55 rabeeh just click 'sb' and open the terminal emulation
20:55 Hoof screen /dev/tty.usbserial 115200 just gives me a blank screen
20:56 rabeeh click enter
20:56 rabeeh ?
20:56 rabeeh is cubox red light on?
20:56 rabeeh or ctrl-c
20:56 Hoof yes
20:56 Hoof cant do anything in the screen
20:56 rabeeh hmm...
20:56 rabeeh so it's probably stuck in the middle of ymodem transfer
20:57 Hoof can't even quit the screen
20:57 Hoof ill reboot and try again
20:57 rabeeh reboot the MAC?
20:57 rabeeh or CuBox?
20:57 Hoof cubox
20:57 rabeeh ok. so you will need to transfer the _uart image - right?
20:58 Hoof well wait
20:58 Hoof it seems screen is "hainging"
20:59 rabeeh maybe if you disconnect the micro USB cable and reconnect it will quit?
21:01 Hoof trying to kill it - its making my mac lay flat :P
21:03 Hoof need to reboot
21:03 Hoof brb
21:06 rabeeh k
21:08 Hoof rabeeh: can you please repost the y send command? :)
21:09 Hoof to give to cubox
21:09 rabeeh ok
21:09 Hoof receivce that is
21:09 rabeeh on CuBox -
21:09 rabeeh loady 0x00200000 115200
21:09 rabeeh then close the terminal emulation and send with the 'sb' command
21:09 Hoof so, ill type that. kill the screen. and start the transfer
21:10 Hoof yeah
21:10 rabeeh yes
21:10 rabeeh is your CuBox directly connected to the MAC?
21:10 Hoof the sb command does not need baud rate?
21:10 Hoof yes
21:10 rabeeh ok.
21:10 rabeeh hmm.. good question
21:10 rabeeh it should; but i think since it was previously opened with 115200 it will stick?
21:11 Hoof hmm.. but I havent used sb before.. I use "sx" to transfer...?
21:12 rabeeh those are the family :)
21:12 rabeeh sx is xmodem; sb is ymodem
21:12 rabeeh and there is 'sz' for zmodem
21:12 Hoof ok
21:12 Hoof ill try again :)
21:13 Hoof no progress when starting the sb command
21:14 rabeeh hmmm...
21:14 rabeeh the only thing I can think of is that 'hardware flow control' is set
21:14 rabeeh i don't know how to disable that on MAC
21:14 Hoof hm ok
21:15 Hoof ill google there is no other way to transfer this file to the cubox?
21:15 rabeeh don't you have a Linux machine around?
21:15 rabeeh or maybe a USB stick to boot from?
21:15 Hoof I have a usb stick to boot from
21:15 Hoof I booted into the menu, remember?
21:15 rabeeh i mean to boot the MAC from OSX to Linux :)
21:16 Hoof ah - lol :)
21:17 Hoof ill try to quickly figure something out...
21:19 Hoof screen is f**** me again - need to reboot
21:19 Hoof I think I have a live-cd somewhere - will that do?
21:21 rabeeh Hoof: it's not screen; it's MAC :)
21:26 Hoof rabeeh: I can go get my work-laptop. This will take 30 mins - will you be available then? :)
21:26 rabeeh probably yes.
21:26 Hoof Cool - ill go right away then :)
21:26 rabeeh any how; to complete you the story; after successfull 'sb'
21:26 rabeeh then u-boot will be at address 0x00200000 (2MB); then only reflashing is required -
21:27 rabeeh sf erase 0xf8000000 0x00080000
21:27 rabeeh sf write 0x00200000 0xf8000000 0x00080000
21:27 Hoof ok
21:27 Hoof sounds pretty simple
21:27 rabeeh you should run those commands on u-boot; after successful 'sb'; line by line
21:27 rabeeh the first one erases first 512KB of the SPI flash
21:27 rabeeh the second one copies the just loaded u-boot (address 0x00200000) to the beginning of the SPI flash (0xf8000000)
21:28 Hoof roger
21:28 Hoof Do I open the connection to the cubox in the same way as on osx?
21:28 Hoof screen /dev/tty.usbserial 115200
21:30 rabeeh on Linux it's /dev/ttyUSB0
21:30 rabeeh sb /srv/tftp/u-boot.bin > /dev/ttyUSB0 < /dev/ttyUSB0
21:30 rabeeh (that's in my case)
21:31 rabeeh once connected; first thing to do is 'chmod 777 /dev/ttyUSB0'
21:31 Hoof should i do this on osx as well probably? :)
21:34 rabeeh you can try
21:40 Hoof will do - this mac is screwing me over!
21:43 Hoof rahbeh: can you please post the cubox command for receiving again? :)
21:45 Hoof jeez, thats good spelling :) rabeeh might work better :)
21:46 rabeeh on CuBox -
21:46 rabeeh loady 0x00200000 115200
21:46 Hoof ty!
21:47 Hoof ... rebooting
21:47 rabeeh actually you can get all the logs from here -
21:47 rabeeh http://server.vijge.net/static/cubox/irclog/201305/cubox-20130527.html
21:48 Hoof perfect ty!