Introduction to firmware

From Pandora Wiki
Jump to: navigation, search

This page is an extension to the un-official users guide, and discusses the system software which comes pre-loaded with the Pandora

The firmware is all of the software that is supplied with a device, so does include the applications which are provided as standard. The vast majority of the firmware is open source (meaning that OpenPandora provides the source code, often as a requirement of the GNU GPL). A small quantity of the firmware is provided as binary files, which OpenPandora may not be at liberty to disclose the full details of. An example of closed source firmware is for the analogue nubs, which are shipped with small micro-controllers pre-programmed by the nub manufacturer.

Contents

Updating The Firmware

Given working firmware, you might wish to patch it with official Open Pandora patches; you might also wish to just grab an application from the Angstrom repository, say.

In both of these cases, an ipk file will be made available. (In the future, an automated system may offer to patch up your device or auto-download patches. TBD. for now, do not do an opkg upgrade - this will fail and require you to reflash)

An ipk file is a compressed installable package.

Official updates to the firmware are currently provided as Hotfix packages, in PND format. Check the OpenPandora official support page for the latest status. This will update any parts of the system which need to be updated. A more flexible system is planned, using a pandora specific repository which will be similar to the process used by the well known linux distributions.

Once you have downloaded a hotfix, copy it to the pandora/apps directory on your SD card (/media/CARDNAME/pandora/apps on pandora, F:/pandora/apps in windows) and then check the 'system' menu. When you run the hotfix, it will ask for your password, and also confirm that you want to update your system)

It is also possible to install applications from the Angstrom distribution repository using the following commands

opkg list
opkg install <name of package>

from the terminal as super-user. Note that by default, this will install to the NAND, and there is not much free space to install more than a few small packages. Filling up the NAND is bad, since it will prevent the system from working properly. Also note that there is no guarantee that packages from the angstrom repository will be compatible with the versions of other software included in the firmware. See Introduction to apps for more details about installing applications. These update processes should work equally well if you have booted from a copy of the Pandora OS on SD card.

Replacing the Firmware (Un-bricking)

Rather than patch the firmware, the firmware may be replaced wholesale with a freshly downloaded firmware. This ought to be regarded as a last resort in the case of problems, there is almost certainly a simpler way to fix most problems.

The process for reinstalling the firmware is as follows: [1]

  1. Extract the contents of the zip to root (main) directory (folder) of your SD card. Fat32 and ext2 filesystems are supported.
  2. Make sure the pandora is turned off (remove the battery in case it crashes or doesn't turn off by using normal means).
  3. Insert that SD card into pandora's left slot (it's the first one, closer to headphone jack).
  4. Press and hold the right trigger ('R'), then turn the power on (if you have battery removed, insert it while holding R).
  5. A menu should appear on screen. Select "boot from SD1" using the d-pad by pressing B or X.
  6. Wait for flash process to finish. Connect the charger to be sure the battery doesn't run out while flashing. Press enter when asked to do so.
  7. The device should turn off, press power (without holding R) to turn it back on.
  8. It should then start it's first boot process which might take up to 15 minutes, be sure to wait for it to finish, otherwise firmware corruption might happen again.

The first firmware release (with patches already applied) can be found on the OpenPandora support |page or in an emergency, there is an older version here (Version: 2010-05-01-Zaxxon)

Remember that you will need to re-install the codec pack after replacing the firmware.

Booting the Pandora OS from SD

The hardware is capable of booting entirely from SD (as is used for the section above); if the device is bricked or otherwise has a blank NAND, this could be an option. Furthermore you're able to try out alternative operating systems without needing to reinstall your primary operating system and boot your system regularly from one of the SD cards.

There are several possible approaches:

  • Boot entirely from SD card, with a single partition (which must support linux permissions, ext2, ext3 etc)
  • Boot from SD, but with multiple partitions for boot, root and even swap. It used to be the case that this was necessary, to permit a FAT32 boot partition to exist.
  • Setting things up to boot from NAND, but use the SD as a root partition
  • More complex mounting strategies, extending a single filesystem across SD and NAND.

Some strategies will require that you keep one SD permanently mounted, and could result in a non-functioning setup if that card is lost. PND files make it easier to swap in and out applications, but any permanent storage required by the application will generally be kept in a separate location.

See Running Linux from an SD card for some basic instructions.

Debugging broken firmware

If you have a problem booting the firmware, and want to investigate before just replacing (or need to try and rescue some data from the NAND) you can boot into a console by doing the following: Make a file named boot.txt in root of SD with this[2]:

setenv bootargs ubi.mtd=4 ubi.mtd=3 root=ubi0:rootfs rootfstype=ubifs rw rootflags=bulk_read console=tty0 vram=6272K omapfb.vram=0:3000K init=/bin/bash
ubi part boot && ubifsmount boot && ubifsload 0x80300000 uImage && bootm 0x80300000 && boot

then holding down the right shoulder button on boot and booting from the SD card. (It doesn't require an operating system on the SD card, but it will use the boot configuration specified there). This is a text mode boot to the shell, using the kernel from the NAND. This should provide a way of bypassing any broken startup scripts, adding in logging for a normal boot, etc. It does not start the full OS, just a basic shell.

Personal tools
community