Quick jump:  What's new

 
Go to:
 
Weblog: openmoko   
in Dobrica Pavlinušić's random unstructured stuff
OpenMoko


u-boot

Recover from bad blocks procedure

x200:/virtual/openmoko# ./neocon/neocon /dev/ttyACM*
[Open /dev/ttyACM3]
In:    usbtty
Out:   usbtty
Err:   usbtty
DEVICE_CONFIGURED: 1
Enabling automatic fast charge

GTA01Bv4 # nand bad

Device 0 bad blocks:
  00070000
  00ab0000
  00f00000
  03ff0000
  03ff4000
  03ff8000
  03ffc000

GTA01Bv4 # nand scrub

NAND scrub: device 0 whole chip
Warning: scrub option will erase all factory set bad blocks!
         There is no reliable way to recover them.
         Use this command only for testing purposes if you
         are sure of what you are doing!

Really scrub this NAND flash? <y/N>

NAND 64MiB 3,3V 8-bit: MTD Erase failure: -5

NAND 64MiB 3,3V 8-bit: MTD Erase failure: -5

NAND 64MiB 3,3V 8-bit: MTD Erase failure: -5
Bad block table not found for chip 0
Bad block table not found for chip 0
OK


GTA01Bv4 # nand createbbt
Create BBT and erase everything ? <y/N>
Skipping bad block at  0x00070000                                            
Skipping bad block at  0x00ab0000                                            
Skipping bad block at  0x00f00000                                            
Skipping bad block at  0x03ff0000                                            
Skipping bad block at  0x03ff4000                                            
Skipping bad block at  0x03ff8000                                            
Skipping bad block at  0x03ffc000                                            

Creating BBT. Please wait ...Bad block table not found for chip 0
Bad block table not found for chip 0
Bad block table written to 0x03ffc000, version 0x01
Bad block table written to 0x03ff8000, version 0x01


GTA01Bv4 # dynpart
mtdparts mtdparts=neo1973-nand:0x00040000(u-boot),0x00004000(u-boot_env),0x00204000(kernel),0x000a0000(splash),0x03d18000(rootfs)


GTA01Bv4 # dynenv set u-boot_env
device 0 offset 0x40000, size 0x4000
45 4e 56 30 - 00 00 04 00


GTA01Bv4 # saveenv
Saving Environment to NAND...
Saving ESaving EnvironmnvironmWriting to Nand... done

Info

GTA01Bv4 # bdinfo
arch_number = 0x0000049E
env_t       = 0x00000000
boot_params = 0x30000100
DRAM bank   = 0x00000000
-> start    = 0x30000000
-> size     = 0x08000000
ethaddr     = 00:00:00:00:00:00

ip_addr     = 0.0.0.0
baudrate    = 115200 bps


GTA01Bv4 # printenv
baudrate=115200
bootcmd=setenv bootargs ${bootargs_base} ${mtdparts}; nand read.e 0x32000000 kernel; bootm 0x32000000
bootdelay=1
menu_1=Set console to USB: setenv stdin usbtty; setenv stdout usbtty; setenv stderr usbtty
menu_2=Set console to serial: setenv stdin serial; setenv stdout serial; setenv stderr serial
menu_3=Power off: neo1973 power-off
menu_4=Boot from SD: setenv bootargs root=/dev/mmcblk0p1 rootdelay=5 console=ttySAC0,115200 console=tty0 loglevel=8 ${mtdparts} ro; mmcinit; ext2load mmc 0 0x32000000 /boot/${sd_image_name}; bootm 0x32000000
mtdids=nand0=neo1973-nand
quiet=1
sd_image_name=uImage
splashimage=nand read.e 0x32000000 splash 0x5000; unzip 0x32000000 0x33d00000 0x96000
stderr=usbtty
stdin=usbtty
stdout=usbtty
usbtty=cdc_acm
bootargs_base=rootfstype=jffs2 root=/dev/mtdblock4 console=tty0 loglevel=8
mtdparts=mtdparts=neo1973-nand:0x00040000(u-boot),0x00004000(u-boot_env),0x00204000(kernel),0x000a0000(splash),0x03d18000(rootfs)
mtdparts=mtdparts=nmtddevnum=0
mtddevname=u-boot
pcf50606_int1=0x4a

Environment size: 1028/16380 bytes


GTA01Bv4 # mtd

device nand0 <neo1973-nand>, # parts = 5
 #: name                        size            offset          mask_flags
 0: u-boot              0x00040000      0x00000000      0
 1: u-boot_env          0x00004000      0x00040000      0
 2: kernel              0x00204000      0x00044000      0
 3: splash              0x000a0000      0x00248000      0
 4: rootfs              0x03d18000      0x002e8000      0

active partition: nand0,0 - (u-boot) 0x00040000 @ 0x00000000

defaults:
mtdids  : nand0=neo1973-nand
mtdparts: <NULL>


dfu-util

Disable bluetooth which also responds to dfu:

x200:/home/dpavlin# echo disable > /proc/acpi/ibm/bluetooth

Boot moko by pressing AUX (top-left smooth button) and power (on the right below usb cable)

x200:/virtual/openmoko# dfu-util --list
dfu-util - (C) 2007-2008 by OpenMoko Inc.
This program is Free Software and has ABSOLUTELY NO WARRANTY

dfu-util does currently only support DFU version 1.0

Found Runtime: [0x1457:0x5119] devnum=38, cfg=0, intf=2, alt=0, name="USB Device Firmware Upgrade"


Hm. We need to reset device in DFU mode

x200:/virtual/openmoko# dfu-util --device 0x1457:0x5119 --download xx
dfu-util - (C) 2007-2008 by OpenMoko Inc.
This program is Free Software and has ABSOLUTELY NO WARRANTY

dfu-util does currently only support DFU version 1.0

Opening USB Device 0x1457:0x5119...
Claiming USB DFU Runtime Interface...
Determining device status: state = appIDLE, status = 0
Device really in Runtime Mode, send DFU detach request...
Resetting USB...
Opening USB Device...
Found Runtime: [0x1457:0x5119] devnum=39, cfg=0, intf=0, alt=0, name="RAM 0x32000000"
We have 6 DFU Interfaces/Altsettings, you have to specify one via --intf / --alt options

x200:/virtual/openmoko# dfu-util --device 0x1457:0x5119 --list
dfu-util - (C) 2007-2008 by OpenMoko Inc.
This program is Free Software and has ABSOLUTELY NO WARRANTY

dfu-util does currently only support DFU version 1.0

Found DFU: [0x1457:0x5119] devnum=39, cfg=0, intf=0, alt=0, name="RAM 0x32000000"
Found DFU: [0x1457:0x5119] devnum=39, cfg=0, intf=0, alt=1, name="u-boot"
Found DFU: [0x1457:0x5119] devnum=39, cfg=0, intf=0, alt=2, name="u-boot_env"
Found DFU: [0x1457:0x5119] devnum=39, cfg=0, intf=0, alt=3, name="kernel"
Found DFU: [0x1457:0x5119] devnum=39, cfg=0, intf=0, alt=4, name="splash"
Found DFU: [0x1457:0x5119] devnum=39, cfg=0, intf=0, alt=5, name="rootfs"


flash kernel

x200:/virtual/openmoko/fso# dfu-util -a kernel -R -D uImage-2.6.24-oe5+gitrfb42ce6724576fc173faf8abfb04aa2c36d213b7-r1-om-gta01.bin 
dfu-util- (C) 2007-2008 by OpenMoko Inc.
This program is Free Software and has ABSOLUTELY NO WARRANTY

dfu-util does currently only support DFU version 1.0

Opening USB Device 0x0000:0x0000...
Found Runtime: [0x1457:0x5119] devnum=39, cfg=0, intf=0, alt=3, name="kernel"
Claiming USB DFU Interface...
Setting Alternate Setting #3 ...
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
Transfer Size = 0x1000
bytes_per_hash=38298
Starting download: [##################################################] finished!
state(2) = dfuIDLE, status(0) = No error condition is present
Done!
Resetting USB to switch back to runtime mode


flash rootfs

x200:/virtual/openmoko/fso# dfu-util -a rootfs -R -D openmoko-fso-console-image-glibc-ipk--20090223-om-gta01.rootfs.jffs2 
dfu-util- (C) 2007-2008 by OpenMoko Inc.
This program is Free Software and has ABSOLUTELY NO WARRANTY

dfu-util does currently only support DFU version 1.0

Opening USB Device 0x0000:0x0000...
Found Runtime: [0x1457:0x5119] devnum=41, cfg=0, intf=0, alt=5, name="rootfs"
Claiming USB DFU Interface...
Setting Alternate Setting #5 ...
Determining device status: state = dfuERROR, status = 14
dfuERROR, clearing status
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
Transfer Size = 0x1000
bytes_per_hash=452853
Starting download: [##################################################dfu_download: usb_control_msg returned -110: error sending control message: Connection timed out] finished!
unable to read DFU status


No worky

openocd

x200:/virtual/openmoko# openocd 
Open On-Chip Debugger 0.4.0 (2010-02-23-17:04)
Licensed under GNU GPL v2
For bug reports, read
        http://openocd.berlios.de/doc/doxygen/bugs.html
trst_and_srst separate srst_gates_jtag trst_push_pull srst_open_drain
trst_and_srst separate srst_gates_jtag trst_push_pull srst_open_drain
Info : clock speed 6000 kHz
Info : JTAG tap: s3c2440.cpu tap/device found: 0x0032409d (mfg: 0x04e, part: 0x0324, ver: 0x0)
Info : Embedded ICE version 2
Info : s3c2440.cpu: hardware has 2 breakpoint/watchpoint units
Info : JTAG tap: s3c2440.cpu tap/device found: 0x0032409d (mfg: 0x04e, part: 0x0324, ver: 0x0)
Warn : NOTE! DCC downloads have not been enabled, defaulting to slow memory writes. Type 'help dcc'.
Warn : NOTE! Severe performance degradation without fast memory access enabled. Type 'help fast'.
target state: halted
target halted in ARM state due to debug-request, current mode: Supervisor
cpsr: 0x20000053 pc: 0x33f966d8
MMU: disabled, D-Cache: enabled, I-Cache: enabled
Info : accepting 'telnet' connection from 0
Runtime error, file "command.c", line 650:
    invalid command name "run"
Info : JTAG tap: s3c2440.cpu tap/device found: 0x0032409d (mfg: 0x04e, part: 0x0324, ver: 0x0)
Warn : NOTE! DCC downloads have not been enabled, defaulting to slow memory writes. Type 'help dcc'.
Warn : NOTE! Severe performance degradation without fast memory access enabled. Type 'help fast'.



Scratch pad for my notes about OpenMoko

Android

dpavlin@llin:/rest/cvs/qemu-neo1973/openmoko/android$ wget -r -np -m http://people.openmoko.org/sean_mcneil/


Open Issues

Pending issues

Resolved issues

  • correct time -- ipkg install ntpdate

Qemu

Alternative way to build qemu with Neo 1973 emulation:

# checkout source

svn co https://svn.openmoko.org/trunk/src/host/qemu-neo1973
cd qemu-neo1973

# run configure

./configure --target-list=arm-softmmu --enable-gadgetfs

# needed for gadgetfs to work

ln -s /usr/src/linux/include/linux

# build it

make


See also

Other pages on this wiki about OpenMoko



My blog posts about OpenMoko

fetchrss: http://blog.rot13.org/mt/mt-search.cgi?tag=openmoko&Template=feed&IncludeBlogs=1
  • There was an error: 500 read failed: error:14094410:SSL routines:SSL3_READ_BYTES:sslv3 alert handshake failure | error:140940E5:SSL routines:SSL3_READ_BYTES:ssl handshake failure

.pre
permalink
OpenMoko as a phone

For quite a long time I was complaining (in person) how nice and half-usable my OpenMoko is. However, thanks to few great hints I'm now make a dial out and dial in.

First, you will really want to install cu package. It contains old UUCP serial tool which will be much more unseful than you might think! Think of cu as cat for console.

Turn on your OpenMoko (while holding AUX button) and type following:

chown uucp:uucp /dev/ttyACM0 ; cu -l /dev/ttyACM0

You might try to just run cu as root, but it still doesn't work (for me) without chown first. If someone could say me to make this automatic, I would be grateful. So, dear lazyweb, I'm quite sure that there is some udev option for that, and if you know what, drop me a note. If not, this might become topic for another post.

Then, change boot parametars:

GTA01Bv4 # setenv bootargs_base rootfstype=jffs2 root=/dev/mtdblock4 console=tty0 loglevel=8
GTA01Bv4 # saveenv
Saving Environment to NAND...
Erasing Nand...Writing to Nand... done
GTA01Bv4 # boot


NAND read: device 0 offset 0x44000, size 0x1fc000
 2080768 bytes read: OK
 ## Booting image at 32000000 ...
 Image Name: OpenMoko Kernel Image Neo1973(GT
 Created: 2007-08-31 11:29:10 UTC
 Image Type: ARM Linux Kernel Image (gzip compressed)
 Data Size: 1637653 Bytes = 1.6 MB
 Load Address: 30008000
 Entry Point: 30008000
 Verifying Checksum ... OK

This will disable output on serial console which in interfering with gsmd that tries to open serial port to communicate with GSM part.

This is my journey so far... Now I have to wait for my poor old desktop to compile all packages to get freshest copies on my Neo...

permalink
OpenMoko arrived

After four (4) weeks of waiting from the moment credit card has been charged, it finally arrived. It seems that shipping GSM-like devices to Croatia as person (as opposed to company) isn't something envisioned by Hrvatske agencije za telekomunikacije so we had to get additional papers (most of which I don't have) and in the end they settled with hardware specification of Neo1973 from OpenMoko wiki.

I must say that people all over the process where helpful and nice: we had to communicate much more with them then I hoped, but in the end it worked out o.k.

And now several obligatory pictures (hopefully not redundant :-)

http://blog.rot13.org/2007/08/24/openmoko-goodies.jpghttp://blog.rot13.org/2007/08/24/openmoko-size.jpghttp://blog.rot13.org/2007/08/24/openmoko-assembly_required.jpg

After that I got rootfs flashed and I now have new (semi-functional) phone :-)


root@fic-gta01:~$ cat /proc/cpuinfo
Processor       : ARM920T rev 0 (v4l)
BogoMIPS        : 132.71
Features        : swp half thumb
CPU implementer : 0x41
CPU architecture: 4T
CPU variant     : 0x1
CPU part        : 0x920
CPU revision    : 0
Cache type      : write-back
Cache clean     : cp15 c7 ops
Cache lockdown  : format A
Cache format    : Harvard
I size          : 16384
I assoc         : 64
I line length   : 32
I sets          : 8
D size          : 16384
D assoc         : 64
D line length   : 32
D sets          : 8


Hardware : GTA01
 Revision : 0240
 Serial : 0000000000000000
 root@fic-gta01:~$ free
 total used free shared buffers cached
 Mem: 126644 52604 74040 0 84 39100
 -/+ buffers/cache: 13420 113224
 Swap: 0 0 0
 root@fic-gta01:~$ df
 Filesystem 1k-blocks Used Available Use% Mounted on
 /dev/mtdblock4 62576 42572 20004 68% /
 tmpfs 40 0 40 0% /mnt/.psplash
 /dev/mtdblock4 62576 42572 20004 68% /dev/.static/dev
 tmpfs 2048 64 1984 3% /dev
 tmpfs 63320 4 63316 0% /tmp
 tmpfs 63320 116 63204 0% /var/volatile
 tmpfs 63320 16 63304 0% /dev/shm
 tmpfs 63320 0 63320 0% /media/ram
 /dev/mmcblk0p1 495168 0 495168 0% /media/card

permalink
Weblog Navigation
Loading...
Weblog Archives
  • Loading...