diff options
| author | Openmoko anonymizer key <devel@lists.openmoko.org> | 2007-10-10 10:17:41 +0000 |
|---|---|---|
| committer | Openmoko anonymizer key <devel@lists.openmoko.org> | 2007-10-10 10:17:41 +0000 |
| commit | 10873a2c35c9225f04853a323c8e01559e5a9034 (patch) | |
| tree | 5a087efe3a3709bce064466027b4a06c02dcbb3f | |
| parent | 9794ad6e78a6a7f5f6b26aaa0494558b7d73e81b (diff) | |
| parent | 2eb5a3d80018bcfb02586f03f22745d50e327547 (diff) | |
merge of '320ea19bc463d1bf9e280cbcadba04f87a928ede'
and 'fd564937a9d082f3ea9dd580636ab959f5d77258'
99 files changed, 28413 insertions, 5 deletions
diff --git a/conf/distro/include/moko-autorev.inc b/conf/distro/include/moko-autorev.inc index c4d478ccde..0cba28de58 100644 --- a/conf/distro/include/moko-autorev.inc +++ b/conf/distro/include/moko-autorev.inc @@ -61,3 +61,6 @@ SRCREV_pn-openocd ?= "${AUTOREV}" SRCREV_pn-openocd-native ?= "${AUTOREV}" SRCREV_pn-uboot-openmoko ?= "${AUTOREV}" +SRCREV_pn-dfu-util ?= "${AUTOREV}" +SRCREV_pn-dfu-util-native ?= "${AUTOREV}" + diff --git a/conf/machine/bd-neon.conf b/conf/machine/bd-neon.conf new file mode 100644 index 0000000000..63e3ac8269 --- /dev/null +++ b/conf/machine/bd-neon.conf @@ -0,0 +1,56 @@ +#@TYPE: Machine +#@NAME: Boundary Devices NEON +#@DESCRIPTION: Machine configuration for the Boundary Devices NEON board + +# +# Hardware-based properties +# +TARGET_ARCH = "arm" +PACKAGE_EXTRA_ARCHS = "armv4 armv4t armv5te" + +# Use tune-xscale per default. Machine independent feeds should be built with tune-strongarm. +require conf/machine/include/tune-xscale.conf + +# Uncomment this to use iwmmxt optimizations. Remove the above xscale stuff first +#require conf/machine/include/tune-iwmmxt.conf + +ROOT_FLASH_SIZE = "60" +VOLATILE_STORAGE_SIZE = "128" +GUI_MACHINE_CLASS = "bigscreen" +MACHINE_FEATURES = "kernel26 touchscreen apm alsa usbgadget screen uboot" + +# +# Software/packages selection +# +PREFERRED_PROVIDER_virtual/kernel = "linux-bd-neon-2.6" +MODUTILS = "26" +XSERVER = "xserver-kdrive-fbdev" +MACHINE_TASK_PROVIDER = "task-base" + +PREFERRED_VERSION_u-boot = "1.1.2" + +EXTRA_IMAGEDEPENDS =" mtd-utils" + +MACHINE_EXTRA_RDEPENDS = " mtd-utils" +MACHINE_EXTRA_RRECOMMENDS = " kernel-modules kernel-module-nls-cp437 \ + kernel-module-nls-iso8859-1 \ + kernel-module-nls-utf8 \ + kernel-module-af-key \ + kernel-module-i2c-pxa" + +EXTRA_IMAGECMD_jffs2 = "--little-endian --eraseblock=0x20000 -n" +EXTRA_IMAGECMD_jffs2 = "--little-endian --eraseblock=0x40000 --pad=32243712; sumtool -i ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.jffs2 \ + -o ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs-summary.jffs2 \ + -e 128KiB -p" + +# +# Modules autoload and other boot properties +# +module_autoload_evdev = "evdev" +module_autoload_mmc_block = "mmc_block" +module_autoload_snd-pcm-oss = "snd-pcm-oss" +module_autoload_snd-mixer-oss = "snd-mixer-oss" + +#module_autoload_g_ether = "g_ether" + +SERIAL_CONSOLE = "115200 ttyS0" diff --git a/conf/machine/cm-x270.conf b/conf/machine/cm-x270.conf index a77a85186f..db3fb9ba51 100644 --- a/conf/machine/cm-x270.conf +++ b/conf/machine/cm-x270.conf @@ -17,6 +17,13 @@ require conf/machine/include/tune-xscale.inc # the following line to your local.conf: # CMX270_CONSOLE_SERIAL_PORT = "ttyS0" +# NAND flash eraseblock size +# most of the older cm-x270 modules are populated with NAND flash +# that have 128KiB eraseblocks. Recently, a user encounted +# a device that has 16KiB eraseblocks. The following define +# can be overridden in local.conf if you have one of these devices. +CMX270_NAND_ERASEBLOCK_SIZE ?= "0x20000" + # the following is for the cm-x270 L module CMX270_CONSOLE_SERIAL_PORT ?= "ttyS1" @@ -32,10 +39,10 @@ SERIAL_CONSOLE ?= "38400 ${CMX270_CONSOLE_SERIAL_PORT}" ROOT_FLASH_SIZE ?= "32" # for NAND flash. -EXTRA_IMAGECMD_jffs2 = "--little-endian --eraseblock=0x20000 --pad --no-cleanmarkers;\ +EXTRA_IMAGECMD_jffs2 = "--little-endian --eraseblock=${CMX270_NAND_ERASEBLOCK_SIZE} --pad --no-cleanmarkers;\ sumtool -i ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.jffs2 \ -o ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs-summary.jffs2 \ - -e 0x20000 -p; \ + -e ${CMX270_NAND_ERASEBLOCK_SIZE} -p; \ cd ${DEPLOY_DIR_IMAGE}; \ rm -f ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.rootfs-summary.jffs2; \ ln -s ${IMAGE_NAME}.rootfs-summary.jffs2 ${IMAGE_LINK_NAME}.rootfs-summary.jffs2 \ diff --git a/contrib/armmon_xfer/.mtn2git_empty b/contrib/armmon_xfer/.mtn2git_empty new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/contrib/armmon_xfer/.mtn2git_empty diff --git a/contrib/armmon_xfer/armmon_xfer.py b/contrib/armmon_xfer/armmon_xfer.py new file mode 100755 index 0000000000..d7a9b7281d --- /dev/null +++ b/contrib/armmon_xfer/armmon_xfer.py @@ -0,0 +1,150 @@ +#!/usr/bin/python + +# Small utility to upload kernel and/or ramdisk to +# the compulab board through the ARMmon firmware. +# Requires pyserial : http://pyserial.sourceforge.net +# author: Tobias Pflug + +import sys, os, serial, getopt, atexit, re + +# regular expression to match valid IPv4 addresses +ipv4_regex = r"\b(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\b" + +def wait_flash_complete(): + while 1: + data = s.readline() + if quiet != 1: + print data, + if data.split(" ")[0] == "Finished": + break + +def test_armmon(): + # write some nonsense to the monitor and + # check if armmon replies accordingly + s.write("nonsense\n") + s.timeout=2 + s.read(len("nonsense\n")+1) + data = s.read(len("Illegal")) + if data.split(" ")[0] != "Illegal": + sys.exit("Error: ARMmon not responding. Linux running maybe?") + s.timeout=None + s.flushInput() + s.flushOutput() + + +def usage(): + sys.stderr.write("""USAGE: %s [options] <server ip> + armmon_xfer - data upload tool for cmx270/ARMmon + + options: + -p, --port=PORT: serial port, default='/dev/ttyUSB0' + -k, --kernel=KERNEL: upload and flash kernel image KERNEL + -r, --ramdisk=RAMDISK: upload and flash ramdisk image RAMDISK + -b, --bootos: boot Linux + -R, --reboot: reboot cmx270 + -q, --quiet be quiet, little output + -h, --help: print this help screen + +""" % (sys.argv[0],)) + +if __name__ == '__main__': + + port = "/dev/ttyUSB0" + baud = 38400 + kernel = None + ramdisk = None + boot = None + reboot = None + quiet = None + tftp_ip = None + + if len(sys.argv) < 2: + usage() + sys.exit(0) + + # parse command line + + try: + opts, args = getopt.getopt(sys.argv[1:], + "p:k:r:bRhq", + ["port=", "kernel=","ramdisk=","bootos","reboot","help","quiet"] + ) + except getopt.GetoptError: + usage() + sys.exit(2) + + for o, a in opts: + if o in ("-h","--help"): + usage() + sys.exit() + elif o in ("-k","--kernel"): + kernel = a + elif o in ("-r","--ramdisk"): + ramdisk = a + elif o in ("-b","--bootos"): + boot = 1 + elif o in ("-R","--reboot"): + reboot = 1 + elif o in ("-p","--port"): + port = o + elif o in ("-q","--quiet"): + quiet = 1 + + # check for arguments and validate IP address + # when required by commands + if len(args)>0 and re.match(ipv4_regex,args[0]): + tftp_ip = args[0] + else: + if kernel or ramdisk: + sys.exit("Error: invalid IP address!") + + try: < |
