Posted tagged ‘Symbian^3’

Attempting to boot Symbian^3 on the TMDSEVM3530 : Take 2

August 1, 2011

I’ve just received the USB/RS-232 adapter (which is based around the FTDI FT232BM chipset, and supported under Linux without any additional work), and connected it to the board’s UART1/2 port and my laptop using the null modem cable supplied with the board.

For the curious, dmesg reports:
[ 177.992226] usb 2-2: new full speed USB device using ohci_hcd and address 3
[ 1090.655407] usb 2-2: USB disconnect, address 3
[ 1160.036191] usb 2-2: new full speed USB device using ohci_hcd and address 4
[ 1160.656891] usbcore: registered new interface driver usbserial
[ 1160.656938] USB Serial support registered for generic
[ 1160.659703] usbcore: registered new interface driver usbserial_generic
[ 1160.659709] usbserial: USB Serial Driver core
[ 1160.676061] USB Serial support registered for FTDI USB Serial Device
[ 1160.677502] ftdi_sio 2-2:1.0: FTDI USB Serial Device converter detected
[ 1160.677628] usb 2-2: Detected FT232BM
[ 1160.677632] usb 2-2: Number of endpoints 2
[ 1160.677635] usb 2-2: Endpoint 1 MaxPacketSize 64
[ 1160.677639] usb 2-2: Endpoint 2 MaxPacketSize 64
[ 1160.677642] usb 2-2: Setting MaxPacketSize 64
[ 1160.694632] usb 2-2: FTDI USB Serial Device converter now attached to ttyUSB0
[ 1160.696459] usbcore: registered new interface driver ftdi_sio
[ 1160.696466] ftdi_sio: v1.6.0:USB FTDI Serial Converters Driver

sudo lsusb -v reports:

Bus 002 Device 004: ID 0403:6001 Future Technology Devices
    International, Ltd FT232 USB-Serial (UART) IC
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.10
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0         8
  idVendor           0x0403 Future Technology Devices
     International, Ltd
  idProduct          0x6001 FT232 USB-Serial (UART) IC
  bcdDevice            4.00
  iManufacturer           1 FTDI
  iProduct                2 USB-to-Serial
  iSerial                 3 FTE2QSKA
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           32
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0xa0
      (Bus Powered)
      Remote Wakeup
    MaxPower               44mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass    255 Vendor Specific Subclass
      bInterfaceProtocol    255 Vendor Specific Protocol
      iInterface              2 USB-to-Serial
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               0
Device Status:     0x0000
(Bus Powered)

We can confirm that everything works by running cat /dev/ttyUSB0 from a BASH session, and powering on the board:

tyson@UmBongo:~$ cat /dev/ttyUSB0 

Texas Instruments X-Loader 1.47 (Jan 14 2011 - 15:43:28)
Starting X-loader on MMC
Reading boot sector

212836 Bytes Read from MMC
Starting OS Bootloader from MMC...
Starting OS Bootloader...

U-Boot 2010.06 (Jan 14 2011 - 15:43:45)

OMAP3430/3530-GP ES3.1, CPU-OPP2 L3-165MHz
OMAP3 EVM board + LPDDR/NAND
I2C:   ready
DRAM:  128 MiB
NAND:  256 MiB
*** Warning - bad CRC or NAND, using default environment

In:    serial
Out:   serial
Err:   serial
Read back SMSC id 0xffff0000
Die ID #2f7c000400000000040365fa1801900d
Net:   smc911x-0
Hit any key to stop autoboot:  0
mmc1 is available
reading boot.scr

421 bytes read
Running bootscript from mmc ...
## Executing script at 82000000
reading uImage

** Unable to read "uImage" from mmc 0:1 **
***** RootFS: /dev/mmcblk0p2 *****
Wrong Image Format for bootm command
ERROR: can't get kernel image!
OMAP3_EVM #

Obviously, since I renamed the uImage file on my Android SD card from earlier (to kuImage), the board fails to successfully boot Linux.

After downloading and installing CuteCom (a Qt-based serial console utility), and configuring it to communicate with the board at 115200 baud, using 8 data bits, and without parity or software/hardware handshaking, the help command command can be issued to the board’s bootloader – which results in:

OMAP3_EVM # help
?       - alias for 'help'
base    - print or set address offset
bdinfo  - print Board Info structure
boot    - boot default, i.e., run 'bootcmd'
bootd   - boot default, i.e., run 'bootcmd'
bootm   - boot application image from memory
bootp   - boot image via network using BOOTP/TFTP protocol
cmp     - memory compare
coninfo - print console devices and information
cp      - memory copy
crc32   - checksum calculation
dhcp    - boot image via network using DHCP/TFTP protocol
echo    - echo args to console
editenv - edit environment variable
exit    - exit script
ext2load- load binary file from a Ext2 filesystem
ext2ls  - list files in a directory (default /)
false   - do nothing, unsuccessfully
fastboot- fastboot- use USB Fastboot protocol

fatinfo - print information about filesystem
fatload - load binary file from a dos filesystem
fatls   - list files in a directory (default /)
fsinfo  - print information about filesystems
fsload  - load binary file from a filesystem image
go      - start application at address 'addr'
help    - print command description/usage
i2c     - I2C sub-system
imxtract- extract a part of a multi-image
itest   - return true/false on integer compare
loadb   - load binary file over serial line (kermit mode)
loads   - load S-Record file over serial line
loady   - load binary file over serial line (ymodem mode)
loop    - infinite loop on address range
ls      - list files in a directory (default /)
md      - memory display
mm      - memory modify (auto-incrementing address)
mmc     - MMC sub-system
mtest   - simple RAM read/write test
mw      - memory write (fill)
nand    - NAND sub-system
nandecc - switch OMAP3 NAND ECC calculation algorithm
nboot   - boot from NAND device
nfs     - boot image via network using NFS protocol
nm      - memory modify (constant address)
ping    - send ICMP ECHO_REQUEST to network host
printenv- print environment variables
rarpboot- boot image via network using RARP/TFTP protocol
reset   - Perform RESET of the CPU
run     - run commands in an environment variable
saveenv - save environment variables to persistent storage
setenv  - set environment variables
showvar - print local hushshell variables
sleep   - delay execution for some time
source  - run script from memory
test    - minimal test like /bin/sh
tftpboot- boot image via network using TFTP protocol
true    - do nothing, successfully
version - print monitor version
OMAP3_EVM #

At this stage, it’s necessary to remove the SD card from the board, and attempt to copy a Symbian ROM image to it.

Unfortunately, after installing Android, it’s also necessary to resize the ~70MB primary partition in order to make it fit. The quickest way to do so would probably be to use GParted and a USB card reader, if you’re using Linux under a virtual machine (as opposed to rebooting into a Wubi installation, in order to use my laptop’s internal reader, which I was initially tempted to do).

An SD card prepared using the the tool from the aforementioned archive contains an x86 partition table, and 3 partitions (a 70.57MiB FAT32 boot partition, a 941.31MiB Ext3 root partition, and an 870.71MiB FAT32 data partition).

Since it is possible to reconstitute these partitions using that tool, and since they’re unnecessary for the Symbian Platform, we can remove the root and data partitions, and then resize the boot partition to be 512.97MiB in order to store the Symbian ROM with some allowances for future growth.

If that process fails with “GNU Parted cannot resize this partition to this size. We're working on it!“, then:

  • Mount the boot partition (usually sdb1)
  • Copy all of its contents to a convenient location
  • Unmount the partition
  • Remove the partition using GParted
  • Create a new 512.97MiB FAT32 partition with 0MiB free space preceding it
  • Mount the newly created boot partition
  • Copy the “boot.scr“, “MLO” and “u-boot.bin” files from earlier to said partition
  • Unmount the partition – if you’re using a VM, and want to copy the ROM using the host OS, instead of the guest OS

Now, we can attempt to copy “beagle.rom.img” from the “ROM Images” directory to the root of the boot partition as “uImage“, unmount the partition, and then insert the card back into the board.

Unfortunately, at this stage, although several LEDs on the board illuminate, I can’t see any output from it on the serial console – which leads me to suspect that the bootloader and firmware on the card isn’t being loaded. Testing using the Windows CE card lends credence to that thought.

Attempting to copy the x-load.bin.ift file from /OMAP35X/Boot_Images to the root of the boot partition also yields the same result.

After quickly making some raw sector dumps of both SD cards, I suspect that the structure of the x86 MBR/partition table, and the location of the boot partition is a factor in the ability to boot the board.

For comparison, file reports the following, for the Windows CE card:

dump: x86 boot sector, code offset 0x0, OEM-ID "MSDOS5.0", sectors/cluster 64, root entries 512, Media descriptor 0xf8, sectors/FAT 236, heads 64, hidden sectors 135, sectors 3858489 (volumes > 32 MB) , serial number 0x61636637, unlabeled, FAT (16 bit)

For the modified Android card, this is reported, instead:

dump2: x86 boot sector; partition 1: ID=0xb, starthead 32, startsector 2048, 1048576 sectors, code offset 0xb8

With that in mind, since I’ve got a complete raw backup of the Windows card that I can restore later; I’ll remove the EBOOTSD.NB0, MLO, and NK.BIN files, and copy over the Android boot files (modulo the Linux kernel binary), plus a Symbian ROM image.

Lo and behold, we now have X-Loader and U-Boot, which attempt to boot our “Linux” kernel into 0x82000000, but seem to get stuck afterwards.

After getting this far, I’ll probably take a break, and see if manual intervention at the bootloader prompt gets us any further, later. 🙂

Advertisements

Attempting to boot Symbian^3 on the TMDSEVM3530 : Take 1

July 31, 2011

Given that I’ve recently obtained a Texas Instruments TMDSEVM3530 development board (which is supposedly a cousin of the slightly-more-popular BeagleBoard, from what I can gather), thanks to Andrew Back (and DesignSpark), I thought that it’d be interesting to see if I could get Symbian^3 running on it.

I’ve got another, more detailed post sitting in my WordPress drafts, but I thought that I’d share some rough notes that I managed to salvage from an unsaved document, prior to yet another ATI driver-induced BSOD moment, in the meantime.

Note: Everything mentioned here is the hypothetical product of “thinking out aloud”, and I can’t guarantee that anything mentioned here will actually work, or that your expensive development board won’t be reduced to a smouldering pile of rubble.

I also recommend obtaining a USB/RS-232 cable, if you haven’t either already got one, or you’re unfortunate enough to have a “modern”/”legacy-free” PC without RS-232 serial ports. Unfortunately, mine’s currently in Paris according to FedEx, so I’m working blindly for the moment.

It’s also probably a good idea to make either a copy of the individual files from the Windows CE demo SD card that ships with the board, or create a raw disk image of its sectors using WinImage, dd or a similar tool.

With that in mind:

  • Download and unpack the ROM Images.zip archive from DropBox
  • Rename or move the NK.BIN file in the root directory of the aforementioned SD card, so that it can be restored later
  • Copy either beagle.rom.img or wildducks_demo.rom.img from the ROM Images directory to the root directory of the card as NK.BIN
  • Unmount the card and insert it into the board’s SD card slot
  • Attempt to boot the board…

It’s probably also necessary to replace the MLO and/or EBOOTSD.NB0 files with new ones, although I haven’t got around to figuring out what to replace them with, yet.

Inserting the card into the board’s SD Card slot will cause it to display a splash screen containing 4 coloured squares during the boot process – but seemingly causes it to do little else (unsurprisingly).

At this stage, if you rely on using the Windows CE card to test booting from SD, it’d be a good idea to reinstate the original NK.BIN file.

Another approach would be to obtain another SD card, use the shell script contained within the “OMAP35x EVM” package from this page to install Android on it, and then replace the uImage file (after backing it up) with one of the files from ROM Images.

However, doing so results in the board’s LCD being blank during boot.

The chances are that at this stage, you’ve either:

  • Irreversibly damaged your board – unlikely, since booting the WinCE card works successfully
  • Got stuck in a bootloader loop somewhere – very likely, according to a wild guess
  • Successfully achieved a boot of the OMAP35x evaluation board using a ROM that obviously wasn’t intended for it – very unlikely

If you’re unable to debug the board using one of its serial ports afterwards, then the most that you can do is either stare at 4 LEDs, or replace the uImage file with the original version and play with an unstable build of Android.

With a serial cable, and the board’s bootloader console, you could probably attempt to try a modified version of the Quick Start instructions from the old Symbian Wiki.

If those don’t work, then attempting to load the ROM image at one of the memory locations mentioned in this QNX-related page, or at the Wild Ducks page might (if you’re lucky).

I’ll probably have another play, once my cable arrives…

Introducing the Symbian Bug Squad

March 16, 2010

For those that have been living under a rock for a while, or at least haven’t been following things in the Symbian community; the Bug Squad are a group of volunteers embarking on a mission to locate and fix bugs in the Symbian Platform, and otherwise make a series of small-yet-meaningful contributions.

That aside, our first meeting (via IRC as a back-channel for general discussion, and Skype for group conference calling) was held today, so that people could introduce themselves to each other, and get acquainted with the collaboration process and tools.

Other than some feedback issues with the generic USB microphone (that shipped with a Wii game, of all things) that I’d been using, this combo proved a success, and things generally worked out nicely.

During the conference call, folks were also encouraged to edit a table on a Symbian Wiki page to informally register their participation –  although there were a few issues along the way related to unfamiliarity with the MediaWiki code syntax that were quickly resolved.

We also planned to use WebEx for screen sharing, although that didn’t go down too well with the participants – initially, some of us couldn’t connect properly, and there were issues surrounding authentication.

I ended up having to use Internet Explorer 6, along with yet another ActiveX control, since the Java client wasn’t working properly with Chrome under the VirtualBox machine running Windows XP that I was using.

Thankfully, everything worked out, although there was some indecision as to whether or not WebEx would be suitable for future meetings.

That aside, a lot of stuff also happened on the technical front, which will be elaborated on in this post.

In the meantime, I invite other interested folks to join me in this effort.

A day with the Symbian Bug Squad

March 16, 2010

In my previous post, I briefly introduced the Symbian Bug Squad project, and alluded to more interesting stuff coming.

During that introductory event, the focus was mostly on testing the improved Active Standby application (AKA the Home Screen) and task switcher that will feature in Symbian^3, using the legacy emulator supplied with PDK 3.0.h (which will hopefully be replaced by the Symbian Virtual Platform soon); although a reasonable amount of light work was done in other areas, too.

Keep in mind that this isn’t supposed to be a review – it’s more of a late-night parsed braindump with an occasional graphical annotation, so it might not have a coherent flow, or even make sense.

Some of the highlights (and lowlights) include:

  • Discovering that ZSH is fully functional under the legacy emulator (although certain commands – e.g. uname are unavailable)
  • Discovering an overall regression in the ability to play audio content – which I filed the first “official” bug against
  • Most of the team verifying that the Active Standby application builds with 0 errors, and minimal warnings for WINSCW (although others are still working on trying to build it with GCCE)
  • Discovering that Web and Internet connectivity didn’t work out of the box (although I wasn’t expecting it to, somehow), but the browser itself works nicely
  • Experiencing the new Active Standby screen and task switcher for the first time, and seeing it flake out in various ways
  • Playing with the kinetic scrolling implementation, which is a nice, subtle enhancement to several aspects of the UI
  • Discovering that installation of the iType font rasteriser from Agfa MonoType also improves overall stability somewhat, in addition to adding fonts with the “Mute” and “Music Note” glyphs, and generally making things look nicer
  • Discovering that installing the Samsung and Objective Systems components either makes no discernible difference to the performance of the Music Player application, or causes it to randomly crash
  • Finding that the Music Player application will sometimes also crash if I select an album corresponding to a track, even without the 2 aforementioned components installed

Of course, no Symbian-related discussion is complete without griping about the legacy emulator (WINSCW/EPOC.exe), so we’ve came up with the following (in addition to those mentioned in my SVP post):

  • It crashes and hangs an awful lot (at least in my case) – especially when using the display orientation switching button
  • It’s extremely voracious with RAM (consuming anything from 120MB to 222MB+)
  • The application window is vertically huge when the default display orientation is utilised – which makes it a pain to use on widescreen displays, and in small VirtualBox display canvas windows
  • There’s a good chance that if the emulator doesn’t crash when using the rotation button, the contents of the display canvas will be in a state of limbo for an indeterminate period of time

Now, let’s have a look at the new task switching feature, which of course supports (sideways!) kinetic scrolling for browsing the contents of the task list:

As a nice touch, it displays previews of each application’s active window, instead of just icons, and it even sort-of works in horizontal orientation mode.

Unfortunately, it also has a habit of refusing to function under the emulator, and bailing out with a random error – usually either “qtn_debug_pe_failed_at_startup” or “Application closed: Task Switcher ViewSrv 11” like so:

It seems that it also sometimes refuses to accept single or double taps to select a task (which is supposed to work), so it becomes necessary to use the “hardware” button that corresponds with the “Options” softkey.

I also attempted to play an MP3 audio file using the Music Player application,  after copying it into “C:\Symbian\S3PDK\epoc32\winscw\c\data\Sounds” on the host; before installing the R&D codec packs from Aricent and RealNetworks, without much success.

It seems that I can persuade Music Player to load the aforementioned MP3 file, and parse the ID3 tags contained within, if I invoke it through the File Manager application – although no audio is passed through into the host OS’s audio stack.  The result of which looks like this, when it works:

When file playback doesn’t work, I either receive a note from MMF or another component, or the Music Player application unceremoniously crashes and returns me to either the Active Standby screen, the parent process, or the Menu application:

Of course, since multimedia playback support is a exemplar use case for Symbian^3,  I consider this to be a regression – especially since it supposedly worked previously on Symbian^2.

It’s possible to scan for audio files within Music Player itself, without issues:

On a lighter note, I’ll close with various screenshots that didn’t fit in elsewhere…

Here’s the good old screensaver, that’s served us well from at least S60 2nd Edition onwards:

Here’s a mysterious “DRMEncryptor” application:

Here’s a brief ZSH session:

Finally, here’s a working Menu application:

At last, but not least, I’d like to thank everyone else involved in the project, and in the community in general. I’ll probably upload the remaining screenshots that I have to Picasa Web Albums later, but for now, I must sleep…