From a3a17a9657df47134885e9ea6dbdf0574fd46766 Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Mon, 2 Jul 2007 16:55:08 +0000 Subject: angstrom legacy: fix include --- conf/distro/angstrom-2007.1-legacy.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/distro/angstrom-2007.1-legacy.conf b/conf/distro/angstrom-2007.1-legacy.conf index a22a35d204..298c8589e3 100644 --- a/conf/distro/angstrom-2007.1-legacy.conf +++ b/conf/distro/angstrom-2007.1-legacy.conf @@ -4,6 +4,6 @@ # * no sysfs # * no EABI for ARM -require conf/distro/angstrom-2007.1-oabi.conf +require conf/distro/angstrom-2007.1.conf # We'll have to fill this in as we go. -- cgit v1.2.3 From 24db8cd534091a85a26472b80fd0f2eb613c7be4 Mon Sep 17 00:00:00 2001 From: Mike Westerhof Date: Mon, 2 Jul 2007 17:05:02 +0000 Subject: SlugOS init files: fixed network boot code for dsmg600 and added delay to ifup (fix dhcp timeout before link negotiation complete) for network boot. Added kexec boot script (no turnup support yet, manual only). --- packages/slugos-init/files/boot/kexec | 159 +++++++++++++++++++++++++++++ packages/slugos-init/files/boot/network | 5 + packages/slugos-init/files/functions | 2 + packages/slugos-init/files/modulefunctions | 9 +- packages/slugos-init/slugos-init_0.10.bb | 5 +- 5 files changed, 177 insertions(+), 3 deletions(-) create mode 100644 packages/slugos-init/files/boot/kexec diff --git a/packages/slugos-init/files/boot/kexec b/packages/slugos-init/files/boot/kexec new file mode 100644 index 0000000000..c5b428cd07 --- /dev/null +++ b/packages/slugos-init/files/boot/kexec @@ -0,0 +1,159 @@ +#!/bin/sh +# +# Loads the specified kernel and kexecs it. +# +# The access method and path from which to fetch the kernel +# is specified in "$1" and "$2": +# +# flash /boot/zImage-ixp4xxbe +# nfs spike:/home/slug/vmlinuz +# wget http://devserv/kernels/vmlinuzbe +# wget ftp://ftpserv/pub/zImage +# /dev/sda1 /kernels/zImage-test +# UUID /kernels/zImage-test +# +# Command-line options for the new kernel are in "$3". + +# Use the standard init path (see /etc/init.d/rcS) +export PATH=/sbin:/bin:/usr/sbin:/usr/bin + +# Wait at least a short while for the disks... +if [ ! "$sleep" -gt 0 ] ; then + sleep=1 +fi + +# Load the helper functions +. /etc/default/functions +. /etc/default/modulefunctions + +leds boot system + +if [ -n "$1" -a -n "$2" ] ; then + + method="$1" + shift + kpath="$1" + shift + if [ -n "$1" ] ; then + kcmdline="$1" + shift + fi + kexec_image= + need_umount=0 + do_kexec=0 + + mount -t proc proc /proc + + case "$method" in + + flash ) + echo "Loading kexec kernel directly from \"$kpath\"..." + kexec_image="$kpath" + ;; + + wget ) + if /boot/network ; then + echo "mounting tmpfs partition..." + if mount -t tmpfs tmpfs /mnt ; then + need_umount=1 + echo "Loading kexec kernel using wget \"$kpath\"..." + wget -P /mnt "$kpath" + t=`basename "$kpath"` + kexec_image="/mnt/$t" + fi + fi + ;; + + nfs ) + if /boot/network ; then + echo "Loading kexec kernel using nfs \"$kpath\"..." + echo "mounting nfs partition..." + if mount -o ro,nolock -t nfs `dirname "$kpath"` /mnt ; then + need_umount=1 + t=`basename "$kpath"` + kexec_image="/mnt/$t" + fi + fi + ;; + + /dev/* ) + echo "Loading kexec kernel using disk \"$kpath\"..." + loaddiskmods + sleep "$sleep" + echo "mounting partition \"$method\"..." + if mount -o ro "$method" /mnt ; then + need_umount=1 + kexec_image="/mnt/$kpath" + fi + ;; + + UUID ) + echo "Loading kexec kernel using disk UUID \"$kpath\"..." + loaddiskmods + sleep "$sleep" + if [ -n "$UUID" ] ; then + echo "mounting partition UUID \"$UUID\"..." + if mount -o ro -U "$UUID" /mnt ; then + need_umount=1 + kexec_image="/mnt/$kpath" + fi + fi + ;; + + * ) + echo "Unrecognized method: \"$method\"" + ;; + + esac + + if [ -n "$kexec_image" -a -f "$kexec_image" ] ; then + if kexec -l "$kexec_image" ; then + do_kexec=1 + fi + else + echo "Unable to load \"$kexec_image\"" + fi + + if [ $do_kexec -eq 1 -a -n "$kcmdline" ] ; then + echo "Attempting to mount /sys (sysfs)..." + if mount -t sysfs sysfs /sys ; then + echo "Setting command line:" + echo " \"$kcmdline\"" + echo "$kcmdline" > /sys/kernel/kexec_cmdline + echo "unmounting /sys..." + umount /sys + else + do_kexec=0 + fi + fi + + if [ $need_umount -eq 1 ] ; then + echo "unmounting /mnt..." + umount /mnt + fi + + if [ $do_kexec -eq 1 ] ; then + echo "Remounting root as read-only..." + mount -o remount,ro / + echo "Invoking \"kexec -f -e\" ..." + kexec -f -e + echo "ERROR!" + # We should never return here! At this point, things are not + # too well. Remount the root as rw, and fallback. + echo "Remounting root as read-write..." + mount -o remount,rw / + fi +else + echo "Usage: $0 flash|nfs|wget|UUID|/dev/ [cmdline]" +fi + +# fallback - use the flash boot +echo "Falling back to flash boot..." +leds beep -f 1000 -r 2 +exec /boot/flash + +# fallback to the fallback +leds boot system panic +exec <>/dev/console >&0 2>&0 +test -x /bin/sh && exec /bin/sh +exit 1 \ No newline at end of file diff --git a/packages/slugos-init/files/boot/network b/packages/slugos-init/files/boot/network index 599250e744..9aa295e43d 100644 --- a/packages/slugos-init/files/boot/network +++ b/packages/slugos-init/files/boot/network @@ -8,6 +8,11 @@ # function! . /etc/default/functions # +# We may need to load the network driver modules here +. /etc/default/modulefunctions +loadnetmods +# +# # Now all the information for booting should be in the configuration # file. Config the loopback and network interfaces. ifconfig lo 127.0.0.1 up diff --git a/packages/slugos-init/files/functions b/packages/slugos-init/files/functions index c329171128..18f4009ee7 100644 --- a/packages/slugos-init/files/functions +++ b/packages/slugos-init/files/functions @@ -274,6 +274,8 @@ ifup(){ if test "$(config boot)" != static then test -n "$hostname" && HOSTNAME="-H $hostname" + # Pause a moment in case link negotiation takes a while + sleep 3 # The script writes the required shell variable assignments # to file descriptor 9 eval $(udhcpc -i "$iface" -n -q -r "$ip" $HOSTNAME -s /boot/udhcpc.script 9>&1 >/dev/null) diff --git a/packages/slugos-init/files/modulefunctions b/packages/slugos-init/files/modulefunctions index dbb9ab51d3..784f6ef662 100644 --- a/packages/slugos-init/files/modulefunctions +++ b/packages/slugos-init/files/modulefunctions @@ -21,7 +21,14 @@ loaddiskmods(){ } loadnetmods(){ - true + case "$(machine)" in + dsmg600) + modprobe via-velocity + ;; + *) + true + ;; + esac } loadmiscmods(){ diff --git a/packages/slugos-init/slugos-init_0.10.bb b/packages/slugos-init/slugos-init_0.10.bb index 8e08a3d755..9748f13ec9 100644 --- a/packages/slugos-init/slugos-init_0.10.bb +++ b/packages/slugos-init/slugos-init_0.10.bb @@ -4,12 +4,13 @@ PRIORITY = "required" LICENSE = "GPL" DEPENDS = "base-files devio" RDEPENDS = "busybox devio" -PR = "r86" +PR = "r87" SRC_URI = "file://boot/flash \ file://boot/disk \ file://boot/nfs \ file://boot/ram \ + file://boot/kexec \ file://boot/network \ file://boot/udhcpc.script \ file://initscripts/fixfstab \ @@ -35,7 +36,7 @@ SBINPROGS = "" USRSBINPROGS = "" CPROGS = "${USRSBINPROGS} ${SBINPROGS}" SCRIPTS = "turnup reflash leds sysconf" -BOOTSCRIPTS = "flash disk nfs ram network udhcpc.script" +BOOTSCRIPTS = "flash disk nfs ram kexec network udhcpc.script" INITSCRIPTS = "syslog.buffer syslog.file syslog.network zleds\ leds_startup rmrecovery sysconfsetup umountinitrd.sh\ fixfstab loadmodules.sh" -- cgit v1.2.3 From 41d0c2bd998e71229466ff0899ac1f6930d97ab1 Mon Sep 17 00:00:00 2001 From: Mike Westerhof Date: Mon, 2 Jul 2007 17:44:55 +0000 Subject: task-slugos: add wireless-tools to the base firmware image --- packages/tasks/task-slugos.bb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/tasks/task-slugos.bb b/packages/tasks/task-slugos.bb index 138c23a4f4..d2281bca17 100644 --- a/packages/tasks/task-slugos.bb +++ b/packages/tasks/task-slugos.bb @@ -6,7 +6,7 @@ DESCRIPTION = "Task packages for the SlugOS distribution" HOMEPAGE = "http://www.nslu2-linux.org" LICENSE = "MIT" -PR = "r11" +PR = "r12" PACKAGE_ARCH = "${MACHINE_ARCH}" ALLOW_EMPTY = "1" @@ -97,12 +97,12 @@ kernel-module-via-velocity \ # Add modules required for Wifi support SLUGOS_STANDARD_RRECOMMENDS += "\ -madwifi-ng-modules madwifi-ng-tools \ +madwifi-ng-modules madwifi-ng-tools wireless-tools \ " ## Other wireless tools that should be considered ## should space be available in the rootfs -# wireless-tools wpa-supplicant \ +# wpa-supplicant \ # zd1211-firmware kernel-module-zd1211rw \ # Add kexec tools for rebooting alternate kernels -- cgit v1.2.3 From 28dc0d5abba1eede8b5cb32d4135a52399c7bb65 Mon Sep 17 00:00:00 2001 From: Rod Whitby Date: Tue, 3 Jul 2007 08:01:32 +0000 Subject: arm-kernel-shim: Updated the FSG-3 configuration to allow the bootloader cmdline to pass through. --- packages/arm-kernel-shim/arm-kernel-shim_1.5.bb | 5 ++--- packages/arm-kernel-shim/files/config-fsg3.h | 2 -- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/packages/arm-kernel-shim/arm-kernel-shim_1.5.bb b/packages/arm-kernel-shim/arm-kernel-shim_1.5.bb index 0788f81609..9e2b6fd912 100644 --- a/packages/arm-kernel-shim/arm-kernel-shim_1.5.bb +++ b/packages/arm-kernel-shim/arm-kernel-shim_1.5.bb @@ -3,7 +3,7 @@ SECTION = "" PRIORITY = "optional" HOMEPAGE = "http://wiki.buici.com/twiki/bin/view/Main/ApexBootloader" LICENSE = "GPL" -PR = "r1" +PR = "r2" COMPATIBLE_MACHINE = "(ixp4xx|nslu2)" @@ -20,7 +20,7 @@ CMDLINE_CONSOLE = "console=${@bb.data.getVar("KERNEL_CONSOLE",d,1) or "ttyS0"}" CMDLINE_ROOT_DSMG600 = "root=/dev/mtdblock2 rootfstype=jffs2 rw init=/linuxrc" CMDLINE_ROOT_NAS100D = "root=/dev/mtdblock2 rootfstype=jffs2 rw init=/linuxrc" CMDLINE_ROOT_NSLU2 = "root=/dev/mtdblock4 rootfstype=jffs2 rw init=/linuxrc" -CMDLINE_ROOT_FSG3 = "root=/dev/mtdblock2 rootfstype=jffs2 rw init=/linuxrc" +# CMDLINE is passed correctly on the Freecom FSG-3 from the bootloader. EXTRA_OEMAKE_append = " CROSS_COMPILE=${CROSS_DIR}/bin/${HOST_PREFIX}" @@ -70,7 +70,6 @@ oe_runmake() { sed -e 's|//#define FORCE_LITTLEENDIAN|#define FORCE_LITTLEENDIAN|' \ ${WORKDIR}/config-fsg3.h > ${S}/config.h fi - echo "#define COMMANDLINE \"${CMDLINE_CONSOLE} ${CMDLINE_ROOT_FSG3} ${CMDLINE_DEBUG}\"" >> ${S}/config.h rm -f ${S}/main.o oenote make ${PARALLEL_MAKE} CROSS_COMPILE=${CROSS_DIR}/bin/${TARGET_PREFIX} PACKAGE=arm-kernel-shim-fsg3 make ${PARALLEL_MAKE} CROSS_COMPILE=${CROSS_DIR}/bin/${TARGET_PREFIX} PACKAGE=arm-kernel-shim-fsg3 || die "oe_runmake failed" diff --git a/packages/arm-kernel-shim/files/config-fsg3.h b/packages/arm-kernel-shim/files/config-fsg3.h index 9b88462e89..fa894e89ac 100644 --- a/packages/arm-kernel-shim/files/config-fsg3.h +++ b/packages/arm-kernel-shim/files/config-fsg3.h @@ -21,8 +21,6 @@ #define MACH_TYPE 1091 -#define CREATE_ATAGS - /* Uncomment one of these to switch the CPU into a specific mode. */ //#define FORCE_LITTLEENDIAN //#define FORCE_BIGENDIAN -- cgit v1.2.3 From d32c98e0ee9477afad8ff4eaa072c2caa0f05742 Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Tue, 3 Jul 2007 08:08:32 +0000 Subject: motorola ezx phones: add an include that sets the basic stuff, remove killswitch from a1200, e680 because the machines need different defconfigs --- conf/machine/a1200.conf | 7 ++++-- conf/machine/a780.conf | 34 +----------------------------- conf/machine/e680.conf | 7 ++++-- conf/machine/include/motorola-ezx-base.inc | 33 +++++++++++++++++++++++++++++ conf/machine/rokr-e2.conf | 28 ++---------------------- 5 files changed, 46 insertions(+), 63 deletions(-) create mode 100644 conf/machine/include/motorola-ezx-base.inc diff --git a/conf/machine/a1200.conf b/conf/machine/a1200.conf index 3914d0e8f4..f2ce2b6bf5 100644 --- a/conf/machine/a1200.conf +++ b/conf/machine/a1200.conf @@ -1,2 +1,5 @@ -WARNING:="${@bb.fatal('\n*\n*\n* Sorry, There is no dedicated configuration for the Motorola EZX A1200,\n* because \ -of the similarities between A780 and A1200 series. Use MACHINE = \"a780\".\n*\n*\n')}" +#@TYPE: Machine +#@NAME: Motorola EZX A1200, Motorola EZX A780, Motorola EZX E680, Motorola EZX E680i +#@DESCRIPTION: Machine configuration for the Motorola GSM phones A1200, A780, E680, and E680i + +require conf/machine/include/motorola-ezx-base.inc diff --git a/conf/machine/a780.conf b/conf/machine/a780.conf index 1820569c2b..f2ce2b6bf5 100644 --- a/conf/machine/a780.conf +++ b/conf/machine/a780.conf @@ -2,36 +2,4 @@ #@NAME: Motorola EZX A1200, Motorola EZX A780, Motorola EZX E680, Motorola EZX E680i #@DESCRIPTION: Machine configuration for the Motorola GSM phones A1200, A780, E680, and E680i - -TARGET_ARCH = "arm" -PACKAGE_EXTRA_ARCHS = "armv4 armv4t armv5te iwmmxt" - -PREFERRED_PROVIDER_xserver = "xserver-kdrive" -PREFERRED_PROVIDER_virtual/kernel = "linux-ezx" - -EXTRA_IMAGECMD_jffs2 = "--pad=14680064 --little-endian --eraseblock=0x20000 -n" - -#cat /proc/mtd -#dev: size erasesize name -#mtd0: 00020000 00008000 "Bootloader" -#mtd1: 000e0000 00020000 "Kernel" -#mtd2: 00580000 00020000 "VFM_Filesystem" -#mtd3: 00020000 00020000 "Logo" - -MACHINE_FEATURES = "kernel26 touchscreen apm alsa bluetooth usbgadget usbhost keyboard screen" - -#the EZX phones need a userspace daemon to stop the BP from shutting down the phone -MACHINE_EXTRA_RDEPENDS += "opentapi" - -ROOT_FLASH_SIZE = "24" - -EXTRA_IMAGEDEPENDS += "ezx-boot-usb-native" - -# Opentapi needs to be started very early so we need the mux devices in static /dev -IMAGE_DEVICE_TABLES = "files/device_table-minimal.txt \ - files/device_table-ezx.txt" - -# Use tune-xscale per default. Machine independent feeds should be built with tune-strongarm. -require conf/machine/include/tune-xscale.conf - -SERIAL_CONSOLE = "115200 ttyS0" +require conf/machine/include/motorola-ezx-base.inc diff --git a/conf/machine/e680.conf b/conf/machine/e680.conf index c1cb10ca2a..f2ce2b6bf5 100644 --- a/conf/machine/e680.conf +++ b/conf/machine/e680.conf @@ -1,2 +1,5 @@ -WARNING:="${@bb.fatal('\n*\n*\n* Sorry, There is no dedicated configuration for the Motorola EZX E680,\n* because \ -of the similarities between A780 and E680-clamshell series. Use MACHINE = \"a780\".\n*\n*\n')}" +#@TYPE: Machine +#@NAME: Motorola EZX A1200, Motorola EZX A780, Motorola EZX E680, Motorola EZX E680i +#@DESCRIPTION: Machine configuration for the Motorola GSM phones A1200, A780, E680, and E680i + +require conf/machine/include/motorola-ezx-base.inc diff --git a/conf/machine/include/motorola-ezx-base.inc b/conf/machine/include/motorola-ezx-base.inc new file mode 100644 index 0000000000..c1eac82e3b --- /dev/null +++ b/conf/machine/include/motorola-ezx-base.inc @@ -0,0 +1,33 @@ + +TARGET_ARCH = "arm" +PACKAGE_EXTRA_ARCHS = "armv4 armv4t armv5te iwmmxt" + +PREFERRED_PROVIDER_xserver = "xserver-kdrive" +PREFERRED_PROVIDER_virtual/kernel = "linux-ezx" + +EXTRA_IMAGECMD_jffs2 = "--pad=14680064 --little-endian --eraseblock=0x20000 -n" + +#cat /proc/mtd +#dev: size erasesize name +#mtd0: 00020000 00008000 "Bootloader" +#mtd1: 000e0000 00020000 "Kernel" +#mtd2: 00580000 00020000 "VFM_Filesystem" +#mtd3: 00020000 00020000 "Logo" + +MACHINE_FEATURES = "kernel26 touchscreen apm alsa bluetooth usbgadget usbhost keyboard screen" + +#the EZX phones need a userspace daemon to stop the BP from shutting down the phone +MACHINE_EXTRA_RDEPENDS += "opentapi" + +ROOT_FLASH_SIZE = "24" + +EXTRA_IMAGEDEPENDS += "ezx-boot-usb-native" + +# Opentapi needs to be started very early so we need the mux devices in static /dev +IMAGE_DEVICE_TABLES = "files/device_table-minimal.txt \ + files/device_table-ezx.txt" + +# Use tune-xscale per default. Machine independent feeds should be built with tune-strongarm. +require conf/machine/include/tune-xscale.conf + +SERIAL_CONSOLE = "115200 ttyS0" diff --git a/conf/machine/rokr-e2.conf b/conf/machine/rokr-e2.conf index 53be3506af..ccd496c03d 100644 --- a/conf/machine/rokr-e2.conf +++ b/conf/machine/rokr-e2.conf @@ -2,32 +2,8 @@ #@NAME: Motorola EZX rokr e2 #@DESCRIPTION: Machine configuration for the Motorola GSM phones rokr e2 +require conf/machine/include/motorola-ezx-base.inc -TARGET_ARCH = "arm" -PACKAGE_EXTRA_ARCHS = "armv4 armv4t armv5te iwmmxt" - -PREFERRED_PROVIDER_xserver = "xserver-kdrive" -PREFERRED_PROVIDER_virtual/kernel = "linux-ezx" - -EXTRA_IMAGECMD_jffs2 = "--pad=14680064 --little-endian --eraseblock=0x20000 -n" - -#cat /proc/mtd -#dev: size erasesize name -#mtd0: 00020000 00008000 "Bootloader" -#mtd1: 000e0000 00020000 "Kernel" -#mtd2: 00580000 00020000 "VFM_Filesystem" -#mtd3: 00020000 00020000 "Logo" - +#no touchscreen MACHINE_FEATURES = "kernel26 touchscreen apm alsa bluetooth usbgadget usbhost keyboard screen" -#the a780 needs a userspace daemon to stop the BP from shutting down the phone -MACHINE_EXTRA_RDEPENDS += "opentapi" - -ROOT_FLASH_SIZE = "24" - -EXTRA_IMAGEDEPENDS += "ezx-boot-usb-native" - -# Use tune-xscale per default. Machine independent feeds should be built with tune-strongarm. -require conf/machine/include/tune-xscale.conf - -SERIAL_CONSOLE = "115200 ttyS0" -- cgit v1.2.3 From a5a80e85898ba2672b1f68f2e1c202f377659503 Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Tue, 3 Jul 2007 08:47:38 +0000 Subject: kazehakase: add cvs version --- packages/kazehakase/kazehakase_0.4.5.bb | 2 -- packages/kazehakase/kazehakase_0.4.7.bb | 2 -- packages/kazehakase/kazehakase_cvs.bb | 18 ++++++++++++++++++ 3 files changed, 18 insertions(+), 4 deletions(-) create mode 100644 packages/kazehakase/kazehakase_cvs.bb diff --git a/packages/kazehakase/kazehakase_0.4.5.bb b/packages/kazehakase/kazehakase_0.4.5.bb index 494e19bad9..927699318e 100644 --- a/packages/kazehakase/kazehakase_0.4.5.bb +++ b/packages/kazehakase/kazehakase_0.4.5.bb @@ -7,5 +7,3 @@ SRC_URI = "http://osdn.dl.sourceforge.jp/kazehakase/24791/kazehakase-${PV}.tar.g inherit autotools pkgconfig -DEFAULT_PREFERENCE = "-1" - diff --git a/packages/kazehakase/kazehakase_0.4.7.bb b/packages/kazehakase/kazehakase_0.4.7.bb index 70e99a40fb..9b30ce918d 100644 --- a/packages/kazehakase/kazehakase_0.4.7.bb +++ b/packages/kazehakase/kazehakase_0.4.7.bb @@ -7,5 +7,3 @@ SRC_URI = "http://iij.dl.sourceforge.jp/kazehakase/25610/kazehakase-${PV}.tar.gz inherit autotools pkgconfig -DEFAULT_PREFERENCE = "-1" - diff --git a/packages/kazehakase/kazehakase_cvs.bb b/packages/kazehakase/kazehakase_cvs.bb new file mode 100644 index 0000000000..c0a26d01ea --- /dev/null +++ b/packages/kazehakase/kazehakase_cvs.bb @@ -0,0 +1,18 @@ +DESCRIPTION = "A gtk-webcore based browser" +HOMEPAGE = "http://kazehakase.sourceforge.jp/" +SECTION = "x11/network" +LICENSE = "GPLv2" +DEPENDS = "osb-nrcit glib-2.0" + +SRC_URI = "cvs://anonymous@cvs.sourceforge.jp/cvsroot/kazehakase;module=kazehakase" +S = "${WORKDIR}/kazehakase" + + +PV = "0.4.7+cvs${SRCDATE}" + +inherit autotools pkgconfig + +EXTRA_OECONF = " --disable-gtkmozembed " + +DEFAULT_PREFERENCE = "-1" + -- cgit v1.2.3 From 15e40995fabf649293ab1564547fb20c0d441f46 Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Tue, 3 Jul 2007 08:55:16 +0000 Subject: angstrom: add support for htcwallaby and htctornado --- conf/distro/angstrom-2007.1.conf | 4 +++- conf/distro/include/angstrom-glibc.inc | 2 +- conf/distro/include/angstrom-uclibc.inc | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/conf/distro/angstrom-2007.1.conf b/conf/distro/angstrom-2007.1.conf index 39783154db..5f7e78962b 100644 --- a/conf/distro/angstrom-2007.1.conf +++ b/conf/distro/angstrom-2007.1.conf @@ -13,7 +13,7 @@ DISTRO_REVISION = "46" require conf/distro/include/sane-srcdates.inc #This is needed to get a correct PACKAGE_ARCH for packages that have PACKAGE_ARCH = ${MACHINE_ARCH} -ARM_ABI = "${@['','oabi'][bb.data.getVar('MACHINE',d) in ['collie','h3600', 'h3800', 'simpad']]}" +ARM_ABI ?= "${@['','oabi'][bb.data.getVar('MACHINE',d) in ['collie','h3600', 'h3800', 'simpad', 'htcwallaby']]}" require conf/distro/include/angstrom${ARM_ABI}.inc #Images built can have to modes: @@ -54,6 +54,7 @@ FEED_ARCH_h2200 = "armv5te" FEED_ARCH_h3900 = "armv5te" FEED_ARCH_h4000 = "armv5te" FEED_ARCH_h5000 = "armv5te" +FEED_ARCH_htctornado = "armv5te" FEED_ARCH_htcuniversal = "armv5te" FEED_ARCH_hx2000 = "armv5te" FEED_ARCH_hx4700 = "armv5te" @@ -88,6 +89,7 @@ FEED_ARCH_collie = "arm-oabi" FEED_ARCH_h3600 = "arm-oabi" FEED_ARCH_h3800 = "arm-oabi" FEED_ARCH_simpad = "arm-oabi" +FEED_ARCH_htcwallaby = "arm-oabi" #Tweak packaging for strongarm machines since they can't use EABI diff --git a/conf/distro/include/angstrom-glibc.inc b/conf/distro/include/angstrom-glibc.inc index fdc814c49c..957042d7e4 100644 --- a/conf/distro/include/angstrom-glibc.inc +++ b/conf/distro/include/angstrom-glibc.inc @@ -3,7 +3,7 @@ PREFERRED_PROVIDER_virtual/libiconv ?= "glibc" PREFERRED_PROVIDER_virtual/libintl ?= "glibc" PREFERRED_PROVIDER_virtual/libc ?= "glibc" -TARGET_OS = "linux${@['','-gnueabi'][bb.data.getVar('TARGET_ARCH',d,1) in ['arm', 'armeb'] and bb.data.getVar('MACHINE',d) not in ['collie','h3600', 'h3800', 'simpad']]}" +TARGET_OS = "linux${@['','-gnueabi'][bb.data.getVar('TARGET_ARCH',d,1) in ['arm', 'armeb'] and bb.data.getVar('MACHINE',d) not in ['collie','h3600', 'h3800', 'simpad', 'htcwallaby']]}" #mess with compiler flags to use -Os instead of -O2 #Please see http://free-electrons.com/doc/embedded_linux_optimizations/img47.html for some more info diff --git a/conf/distro/include/angstrom-uclibc.inc b/conf/distro/include/angstrom-uclibc.inc index 0f20e9c29d..59d40957d5 100644 --- a/conf/distro/include/angstrom-uclibc.inc +++ b/conf/distro/include/angstrom-uclibc.inc @@ -7,7 +7,7 @@ PREFERRED_PROVIDER_virtual/libintl ?= "gettext" USE_NLS ?= "no" USE_NLS_glib-2.0 = "yes" -TARGET_OS_UC = "linux${@['-uclibc','-uclibcgnueabi'][bb.data.getVar('TARGET_ARCH',d,1) in ['arm', 'armeb'] and bb.data.getVar('MACHINE',d) not in ['collie','h3600', 'h3800', 'simpad']]}" +TARGET_OS_UC = "linux${@['-uclibc','-uclibcgnueabi'][bb.data.getVar('TARGET_ARCH',d,1) in ['arm', 'armeb'] and bb.data.getVar('MACHINE',d) not in ['collie','h3600', 'h3800', 'simpad', 'htcwallaby']]}" TARGET_OS = "${@['${TARGET_OS_UC}', 'uclinux-uclibc'][bb.data.getVar('TARGET_ARCH',d) in ['bfin']]}" #mess with compiler flags to use -Os instead of -O2 -- cgit v1.2.3 From 5f61eb5253c25e2612ad736140194ff4f423433c Mon Sep 17 00:00:00 2001 From: Florian Boor Date: Tue, 3 Jul 2007 10:04:30 +0000 Subject: sane-srcdates.inc: Update gpesyncd srcdate to become compatible with latest libraries. Fixes #2491 --- conf/distro/include/sane-srcdates.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/distro/include/sane-srcdates.inc b/conf/distro/include/sane-srcdates.inc index 75e8b86e4d..6409263830 100644 --- a/conf/distro/include/sane-srcdates.inc +++ b/conf/distro/include/sane-srcdates.inc @@ -43,7 +43,7 @@ SRCDATE_zaurusd ?= "20060628" # GPE SRCDATE_dasher-gpe ?= "20060814" SRCDATE_rosetta ?= "20060804" -SRCDATE_gpesyncd ?= "20061128" +SRCDATE_gpesyncd ?= "20070701" # GNOME SRCDATE_gconf-dbus ?= "20070512" -- cgit v1.2.3 From da08d964df3d8670e4a296b77960442b71a02dfa Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Tue, 3 Jul 2007 12:08:20 +0000 Subject: angstrom: add FEED_ARCH for compulab-pxa270 --- conf/distro/angstrom-2007.1.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/conf/distro/angstrom-2007.1.conf b/conf/distro/angstrom-2007.1.conf index 5f7e78962b..32aab045ad 100644 --- a/conf/distro/angstrom-2007.1.conf +++ b/conf/distro/angstrom-2007.1.conf @@ -50,6 +50,7 @@ FEED_ARCH_aximx50 = "armv5te" FEED_ARCH_akita = "armv5te" FEED_ARCH_at91sam9263ek = "armv5te" FEED_ARCH_c7x0 = "armv5te" +FEED_ARCH_compulab-pxa270 = "armv5te" FEED_ARCH_h2200 = "armv5te" FEED_ARCH_h3900 = "armv5te" FEED_ARCH_h4000 = "armv5te" -- cgit v1.2.3 From c5e2f09064aaf830f30a0bcfd2b15da13d977404 Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Tue, 3 Jul 2007 13:43:22 +0000 Subject: php: depend on virtual/iconv --- packages/php/php_5.1.4.bb | 2 +- packages/php/php_5.2.0.bb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/php/php_5.1.4.bb b/packages/php/php_5.1.4.bb index 34d6ea677d..a9ea9d2ed6 100644 --- a/packages/php/php_5.1.4.bb +++ b/packages/php/php_5.1.4.bb @@ -1,7 +1,7 @@ SECTION = "console/network" DESCRIPTION = "A server-side, HTML-embedded scripting language. This package provides the CGI." LICENSE = "PHP" -DEPENDS = "zlib libxml2 mysql libiconv" +DEPENDS = "zlib libxml2 mysql virtual/libiconv" SRC_URI = "http://us2.php.net/distributions/php-${PV}.tar.bz2\ file://autotools.patch;patch=1 \ diff --git a/packages/php/php_5.2.0.bb b/packages/php/php_5.2.0.bb index a4674f08ef..e1ce34b8e6 100644 --- a/packages/php/php_5.2.0.bb +++ b/packages/php/php_5.2.0.bb @@ -1,7 +1,7 @@ SECTION = "console/network" DESCRIPTION = "A server-side, HTML-embedded scripting language. This package provides the CGI." LICENSE = "PHP" -DEPENDS = "zlib libxml2 mysql libiconv php-native" +DEPENDS = "zlib libxml2 mysql virtual/libiconv php-native" SRC_URI = "http://us2.php.net/distributions/php-${PV}.tar.bz2\ file://autotools.patch;patch=1 \ -- cgit v1.2.3 From 6b53879bce3f8883577e8b38dd43c2ec25f31d8c Mon Sep 17 00:00:00 2001 From: Marcin Juszkiewicz Date: Tue, 3 Jul 2007 14:08:54 +0000 Subject: sarge_at91: added AT91RM9200 board from Black Mesa East project --- conf/machine/sarge_at91.conf | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 conf/machine/sarge_at91.conf diff --git a/conf/machine/sarge_at91.conf b/conf/machine/sarge_at91.conf new file mode 100644 index 0000000000..9f936a68a4 --- /dev/null +++ b/conf/machine/sarge_at91.conf @@ -0,0 +1,19 @@ +#@TYPE: Machine +#@Name: Sarge AT91RM9200 blackmesaeast dev boards +#@DESCRIPTION: Machine configuration for sarge_at91 dev boards +# +#Homepage: http://blackmesaeast.com.pl/projects/electronics/sarge-single-board-computer/ + +TARGET_ARCH = "arm" +PACKAGE_EXTRA_ARCHS = "armv4t" + +# used by sysvinit_2 +SERIAL_CONSOLE = "115200 ttyS0" + +IMAGE_FSTYPES = "tar.gz" + +MACHINE_FEATURES = "kernel26" + +require conf/machine/include/tune-arm920t.conf + +PREFERRED_PROVIDER_virtual/kernel = "linux-sarge" -- cgit v1.2.3 From dc7403b7abb7365dcdba06dfd6a4efd94f1dd763 Mon Sep 17 00:00:00 2001 From: Marcin Juszkiewicz Date: Tue, 3 Jul 2007 14:19:05 +0000 Subject: sarge-at91: renamed to not conflict with overrides --- conf/machine/sarge-at91.conf | 19 +++++++++++++++++++ conf/machine/sarge_at91.conf | 19 ------------------- 2 files changed, 19 insertions(+), 19 deletions(-) create mode 100644 conf/machine/sarge-at91.conf delete mode 100644 conf/machine/sarge_at91.conf diff --git a/conf/machine/sarge-at91.conf b/conf/machine/sarge-at91.conf new file mode 100644 index 0000000000..9f936a68a4 --- /dev/null +++ b/conf/machine/sarge-at91.conf @@ -0,0 +1,19 @@ +#@TYPE: Machine +#@Name: Sarge AT91RM9200 blackmesaeast dev boards +#@DESCRIPTION: Machine configuration for sarge_at91 dev boards +# +#Homepage: http://blackmesaeast.com.pl/projects/electronics/sarge-single-board-computer/ + +TARGET_ARCH = "arm" +PACKAGE_EXTRA_ARCHS = "armv4t" + +# used by sysvinit_2 +SERIAL_CONSOLE = "115200 ttyS0" + +IMAGE_FSTYPES = "tar.gz" + +MACHINE_FEATURES = "kernel26" + +require conf/machine/include/tune-arm920t.conf + +PREFERRED_PROVIDER_virtual/kernel = "linux-sarge" diff --git a/conf/machine/sarge_at91.conf b/conf/machine/sarge_at91.conf deleted file mode 100644 index 9f936a68a4..0000000000 --- a/conf/machine/sarge_at91.conf +++ /dev/null @@ -1,19 +0,0 @@ -#@TYPE: Machine -#@Name: Sarge AT91RM9200 blackmesaeast dev boards -#@DESCRIPTION: Machine configuration for sarge_at91 dev boards -# -#Homepage: http://blackmesaeast.com.pl/projects/electronics/sarge-single-board-computer/ - -TARGET_ARCH = "arm" -PACKAGE_EXTRA_ARCHS = "armv4t" - -# used by sysvinit_2 -SERIAL_CONSOLE = "115200 ttyS0" - -IMAGE_FSTYPES = "tar.gz" - -MACHINE_FEATURES = "kernel26" - -require conf/machine/include/tune-arm920t.conf - -PREFERRED_PROVIDER_virtual/kernel = "linux-sarge" -- cgit v1.2.3 From c9c7cd865a29b3bb1f503b4a9f56975aacba6cb9 Mon Sep 17 00:00:00 2001 From: Marcin Juszkiewicz Date: Tue, 3 Jul 2007 14:37:21 +0000 Subject: sarge-at91: use u-boot 1.1.6 and linux 2.6.21 --- conf/machine/sarge-at91.conf | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/conf/machine/sarge-at91.conf b/conf/machine/sarge-at91.conf index 9f936a68a4..6001e69cf7 100644 --- a/conf/machine/sarge-at91.conf +++ b/conf/machine/sarge-at91.conf @@ -16,4 +16,8 @@ MACHINE_FEATURES = "kernel26" require conf/machine/include/tune-arm920t.conf -PREFERRED_PROVIDER_virtual/kernel = "linux-sarge" +PREFERRED_PROVIDER_virtual/kernel = "linux" + +# device has own patchset for u-boot 1.1.6 +PREFERRED_VERSION_u-boot = "1.1.6" +PREFERRED_VERSION_linux = "2.6.21" -- cgit v1.2.3 From db1f0b4eee16506860278466f9618d4186be024f Mon Sep 17 00:00:00 2001 From: Grzegorz Ratajczak Date: Tue, 3 Jul 2007 14:39:54 +0000 Subject: u-boot 1.1.6: added Sarge-AT91 support --- packages/uboot/u-boot-1.1.6/sarge-uboot.patch | 3375 +++++++++++++++++++++++++ packages/uboot/u-boot_1.1.6.bb | 4 +- 2 files changed, 3378 insertions(+), 1 deletion(-) create mode 100644 packages/uboot/u-boot-1.1.6/sarge-uboot.patch diff --git a/packages/uboot/u-boot-1.1.6/sarge-uboot.patch b/packages/uboot/u-boot-1.1.6/sarge-uboot.patch new file mode 100644 index 0000000000..affc3d38cd --- /dev/null +++ b/packages/uboot/u-boot-1.1.6/sarge-uboot.patch @@ -0,0 +1,3375 @@ +diff -Nurp ../u-boot-1.1.6/arm_config.mk ./arm_config.mk +--- ../u-boot-1.1.6/arm_config.mk 2006-11-02 15:15:01.000000000 +0100 ++++ ./arm_config.mk 2007-04-23 18:07:47.000000000 +0200 +@@ -21,4 +21,6 @@ + # MA 02111-1307 USA + # + ++#PLATFORM_RELFLAGS += -fno-strict-aliasing -fno-common -ffixed-r8 -msoft-float ++PLATFORM_CPPFLAGS += -march=armv4t -mtune=arm920t + PLATFORM_CPPFLAGS += -DCONFIG_ARM -D__ARM__ +diff -Nurp ../u-boot-1.1.6/board/sarge/config.mk ./board/sarge/config.mk +--- ../u-boot-1.1.6/board/sarge/config.mk 1970-01-01 01:00:00.000000000 +0100 ++++ ./board/sarge/config.mk 2007-03-21 00:31:33.000000000 +0100 +@@ -0,0 +1 @@ ++TEXT_BASE = 0x21F00000 +diff -Nurp ../u-boot-1.1.6/board/sarge/flash.c ./board/sarge/flash.c +--- ../u-boot-1.1.6/board/sarge/flash.c 1970-01-01 01:00:00.000000000 +0100 ++++ ./board/sarge/flash.c 2007-03-09 01:25:41.000000000 +0100 +@@ -0,0 +1,504 @@ ++/* ++ * (C) Copyright 2002 ++ * Lineo, Inc. ++ * Bernhard Kuhn ++ * ++ * (C) Copyright 2002 ++ * Sysgo Real-Time Solutions, GmbH ++ * Alex Zuepke ++ * ++ * See file CREDITS for list of people who contributed to this ++ * project. ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License as ++ * published by the Free Software Foundation; either version 2 of ++ * the License, or (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, ++ * MA 02111-1307 USA ++ */ ++ ++#include ++ ++ulong myflush(void); ++ ++ ++/* Flash Organization Structure */ ++typedef struct OrgDef ++{ ++ unsigned int sector_number; ++ unsigned int sector_size; ++} OrgDef; ++ ++ ++/* Flash Organizations */ ++OrgDef OrgAT49BV16x4[] = ++{ ++ { 8, 8*1024 }, /* 8 * 8 kBytes sectors */ ++ { 2, 32*1024 }, /* 2 * 32 kBytes sectors */ ++ { 30, 64*1024 }, /* 30 * 64 kBytes sectors */ ++}; ++ ++OrgDef OrgAT49BV16x4A[] = ++{ ++ { 8, 8*1024 }, /* 8 * 8 kBytes sectors */ ++ { 31, 64*1024 }, /* 31 * 64 kBytes sectors */ ++}; ++ ++OrgDef OrgAT49BV6416[] = ++{ ++ { 8, 8*1024 }, /* 8 * 8 kBytes sectors */ ++ { 127, 64*1024 }, /* 127 * 64 kBytes sectors */ ++}; ++ ++flash_info_t flash_info[CFG_MAX_FLASH_BANKS]; ++ ++/* AT49BV1614A Codes */ ++#define FLASH_CODE1 0xAA ++#define FLASH_CODE2 0x55 ++#define ID_IN_CODE 0x90 ++#define ID_OUT_CODE 0xF0 ++ ++ ++#define CMD_READ_ARRAY 0x00F0 ++#define CMD_UNLOCK1 0x00AA ++#define CMD_UNLOCK2 0x0055 ++#define CMD_ERASE_SETUP 0x0080 ++#define CMD_ERASE_CONFIRM 0x0030 ++#define CMD_PROGRAM 0x00A0 ++#define CMD_UNLOCK_BYPASS 0x0020 ++#define CMD_SECTOR_UNLOCK 0x0070 ++ ++#define MEM_FLASH_ADDR1 (*(volatile u16 *)(CFG_FLASH_BASE + (0x00005555<<1))) ++#define MEM_FLASH_ADDR2 (*(volatile u16 *)(CFG_FLASH_BASE + (0x00002AAA<<1))) ++ ++#define BIT_ERASE_DONE 0x0080 ++#define BIT_RDY_MASK 0x0080 ++#define BIT_PROGRAM_ERROR 0x0020 ++#define BIT_TIMEOUT 0x80000000 /* our flag */ ++ ++#define READY 1 ++#define ERR 2 ++#define TMO 4 ++ ++/*----------------------------------------------------------------------- ++ */ ++void flash_identification (flash_info_t * info) ++{ ++ volatile u16 manuf_code, device_code, add_device_code; ++ ++ MEM_FLASH_ADDR1 = FLASH_CODE1; ++ MEM_FLASH_ADDR2 = FLASH_CODE2; ++ MEM_FLASH_ADDR1 = ID_IN_CODE; ++ ++ manuf_code = *(volatile u16 *) CFG_FLASH_BASE; ++ device_code = *(volatile u16 *) (CFG_FLASH_BASE + 2); ++ add_device_code = *(volatile u16 *) (CFG_FLASH_BASE + (3 << 1)); ++ ++ MEM_FLASH_ADDR1 = FLASH_CODE1; ++ MEM_FLASH_ADDR2 = FLASH_CODE2; ++ MEM_FLASH_ADDR1 = ID_OUT_CODE; ++ ++ /* Vendor type */ ++ info->flash_id = ATM_MANUFACT & FLASH_VENDMASK; ++ printf ("Atmel: "); ++ ++ if ((device_code & FLASH_TYPEMASK) == (ATM_ID_BV1614 & FLASH_TYPEMASK)) { ++ ++ if ((add_device_code & FLASH_TYPEMASK) == ++ (ATM_ID_BV1614A & FLASH_TYPEMASK)) { ++ info->flash_id |= ATM_ID_BV1614A & FLASH_TYPEMASK; ++ printf ("AT49BV1614A (16Mbit)\n"); ++ } else { /* AT49BV1614 Flash */ ++ info->flash_id |= ATM_ID_BV1614 & FLASH_TYPEMASK; ++ printf ("AT49BV1614 (16Mbit)\n"); ++ } ++ ++ } else if ((device_code & FLASH_TYPEMASK) == (ATM_ID_BV6416 & FLASH_TYPEMASK)) { ++ info->flash_id |= ATM_ID_BV6416 & FLASH_TYPEMASK; ++ printf ("AT49BV6416 (64Mbit)\n"); ++ } ++} ++ ++ushort flash_number_sector(OrgDef *pOrgDef, unsigned int nb_blocks) ++{ ++ int i, nb_sectors = 0; ++ ++ for (i=0; istart[sector]); ++ ++ MEM_FLASH_ADDR1 = CMD_UNLOCK1; ++ *addr = CMD_SECTOR_UNLOCK; ++} ++ ++ ++ulong flash_init (void) ++{ ++ int i, j, k; ++ unsigned int flash_nb_blocks, sector; ++ unsigned int start_address; ++ OrgDef *pOrgDef; ++ ++ ulong size = 0; ++ ++ for (i = 0; i < CFG_MAX_FLASH_BANKS; i++) { ++ ulong flashbase = 0; ++ ++ flash_identification (&flash_info[i]); ++ ++ if ((flash_info[i].flash_id & FLASH_TYPEMASK) == ++ (ATM_ID_BV1614 & FLASH_TYPEMASK)) { ++ ++ pOrgDef = OrgAT49BV16x4; ++ flash_nb_blocks = sizeof (OrgAT49BV16x4) / sizeof (OrgDef); ++ } else if ((flash_info[i].flash_id & FLASH_TYPEMASK) == ++ (ATM_ID_BV1614A & FLASH_TYPEMASK)){ /* AT49BV1614A Flash */ ++ ++ pOrgDef = OrgAT49BV16x4A; ++ flash_nb_blocks = sizeof (OrgAT49BV16x4A) / sizeof (OrgDef); ++ } else if ((flash_info[i].flash_id & FLASH_TYPEMASK) == ++ (ATM_ID_BV6416 & FLASH_TYPEMASK)){ /* AT49BV6416 Flash */ ++ ++ pOrgDef = OrgAT49BV6416; ++ flash_nb_blocks = sizeof (OrgAT49BV6416) / sizeof (OrgDef); ++ } else { ++ flash_nb_blocks = 0; ++ pOrgDef = OrgAT49BV16x4; ++ } ++ ++ flash_info[i].sector_count = flash_number_sector(pOrgDef, flash_nb_blocks); ++ memset (flash_info[i].protect, 0, flash_info[i].sector_count); ++ ++ if (i == 0) ++ flashbase = PHYS_FLASH_1; ++ else ++ panic ("configured too many flash banks!\n"); ++ ++ sector = 0; ++ start_address = flashbase; ++ flash_info[i].size = 0; ++ ++ for (j = 0; j < flash_nb_blocks; j++) { ++ for (k = 0; k < pOrgDef[j].sector_number; k++) { ++ flash_info[i].start[sector++] = start_address; ++ start_address += pOrgDef[j].sector_size; ++ flash_info[i].size += pOrgDef[j].sector_size; ++ } ++ } ++ ++ size += flash_info[i].size; ++ ++ if ((flash_info[i].flash_id & FLASH_TYPEMASK) == ++ (ATM_ID_BV6416 & FLASH_TYPEMASK)){ /* AT49BV6416 Flash */ ++ ++ /* Unlock all sectors at reset */ ++ for (j=0; jflash_id & FLASH_VENDMASK) { ++ case (ATM_MANUFACT & FLASH_VENDMASK): ++ printf ("Atmel: "); ++ break; ++ default: ++ printf ("Unknown Vendor "); ++ break; ++ } ++ ++ switch (info->flash_id & FLASH_TYPEMASK) { ++ case (ATM_ID_BV1614 & FLASH_TYPEMASK): ++ printf ("AT49BV1614 (16Mbit)\n"); ++ break; ++ case (ATM_ID_BV1614A & FLASH_TYPEMASK): ++ printf ("AT49BV1614A (16Mbit)\n"); ++ break; ++ case (ATM_ID_BV6416 & FLASH_TYPEMASK): ++ printf ("AT49BV6416 (64Mbit)\n"); ++ break; ++ default: ++ printf ("Unknown Chip Type\n"); ++ return; ++ } ++ ++ printf (" Size: %ld MB in %d Sectors\n", ++ info->size >> 20, info->sector_count); ++ ++ printf (" Sector Start Addresses:"); ++ for (i = 0; i < info->sector_count; i++) { ++ if ((i % 5) == 0) { ++ printf ("\n "); ++ } ++ printf (" %08lX%s", info->start[i], ++ info->protect[i] ? " (RO)" : " "); ++ } ++ printf ("\n"); ++} ++ ++/*----------------------------------------------------------------------- ++ */ ++ ++int flash_erase (flash_info_t * info, int s_first, int s_last) ++{ ++ ulong result; ++ int iflag, cflag, prot, sect; ++ int rc = ERR_OK; ++ int chip1; ++ ++ /* first look for protection bits */ ++ ++ if (info->flash_id == FLASH_UNKNOWN) ++ return ERR_UNKNOWN_FLASH_TYPE; ++ ++ if ((s_first < 0) || (s_first > s_last)) { ++ return ERR_INVAL; ++ } ++ ++ if ((info->flash_id & FLASH_VENDMASK) != ++ (ATM_MANUFACT & FLASH_VENDMASK)) { ++ return ERR_UNKNOWN_FLASH_VENDOR; ++ } ++ ++ prot = 0; ++ for (sect = s_first; sect <= s_last; ++sect) { ++ if (info->protect[sect]) { ++ prot++; ++ } ++ } ++ if (prot) ++ return ERR_PROTECTED; ++ ++ /* ++ * Disable interrupts which might cause a timeout ++ * here. Remember that our exception vectors are ++ * at address 0 in the flash, and we don't want a ++ * (ticker) exception to happen while the flash ++ * chip is in programming mode. ++ */ ++ cflag = icache_status (); ++ icache_disable (); ++ iflag = disable_interrupts (); ++ ++ /* Start erase on unprotected sectors */ ++ for (sect = s_first; sect <= s_last && !ctrlc (); sect++) { ++ printf ("Erasing sector %2d ... ", sect); ++ ++ /* arm simple, non interrupt dependent timer */ ++ reset_timer_masked (); ++ ++ if (info->protect[sect] == 0) { /* not protected */ ++ volatile u16 *addr = (volatile u16 *) (info->start[sect]); ++ ++ MEM_FLASH_ADDR1 = CMD_UNLOCK1; ++ MEM_FLASH_ADDR2 = CMD_UNLOCK2; ++ MEM_FLASH_ADDR1 = CMD_ERASE_SETUP; ++ ++ MEM_FLASH_ADDR1 = CMD_UNLOCK1; ++ MEM_FLASH_ADDR2 = CMD_UNLOCK2; ++ *addr = CMD_ERASE_CONFIRM; ++ ++ /* wait until flash is ready */ ++ chip1 = 0; ++ ++ do { ++ result = *addr; ++ ++ /* check timeout */ ++ if (get_timer_masked () > CFG_FLASH_ERASE_TOUT) { ++ MEM_FLASH_ADDR1 = CMD_READ_ARRAY; ++ chip1 = TMO; ++ break; ++ } ++ ++ if (!chip1 && (result & 0xFFFF) & BIT_ERASE_DONE) ++ chip1 = READY; ++ ++ } while (!chip1); ++ ++ MEM_FLASH_ADDR1 = CMD_READ_ARRAY; ++ ++ if (chip1 == ERR) { ++ rc = ERR_PROG_ERROR; ++ goto outahere; ++ } ++ if (chip1 == TMO) { ++ rc = ERR_TIMOUT; ++ goto outahere; ++ } ++ ++ printf ("ok.\n"); ++ } else { /* it was protected */ ++ printf ("protected!\n"); ++ } ++ } ++ ++ if (ctrlc ()) ++ printf ("User Interrupt!\n"); ++ ++outahere: ++ /* allow flash to settle - wait 10 ms */ ++ udelay_masked (10000); ++ ++ if (iflag) ++ enable_interrupts (); ++ ++ if (cflag) ++ icache_enable (); ++ ++ return rc; ++} ++ ++/*----------------------------------------------------------------------- ++ * Copy memory to flash ++ */ ++ ++volatile static int write_word (flash_info_t * info, ulong dest, ++ ulong data) ++{ ++ volatile u16 *addr = (volatile u16 *) dest; ++ ulong result; ++ int rc = ERR_OK; ++ int cflag, iflag; ++ int chip1; ++ ++ /* ++ * Check if Flash is (sufficiently) erased ++ */ ++ result = *addr; ++ if ((result & data) != data) ++ return ERR_NOT_ERASED; ++ ++ ++ /* ++ * Disable interrupts which might cause a timeout ++ * here. Remember that our exception vectors are ++ * at address 0 in the flash, and we don't want a ++ * (ticker) exception to happen while the flash ++ * chip is in programming mode. ++ */ ++ cflag = icache_status (); ++ icache_disable (); ++ iflag = disable_interrupts (); ++ ++ MEM_FLASH_ADDR1 = CMD_UNLOCK1; ++ MEM_FLASH_ADDR2 = CMD_UNLOCK2; ++ MEM_FLASH_ADDR1 = CMD_PROGRAM; ++ *addr = data; ++ ++ /* arm simple, non interrupt dependent timer */ ++ reset_timer_masked (); ++ ++ /* wait until flash is ready */ ++ chip1 = 0; ++ do { ++ result = *addr; ++ ++ /* check timeout */ ++ if (get_timer_masked () > CFG_FLASH_ERASE_TOUT) { ++ chip1 = ERR | TMO; ++ break; ++ } ++ if (!chip1 && ((result & 0x80) == (data & 0x80))) ++ chip1 = READY; ++ ++ } while (!chip1); ++ ++ *addr = CMD_READ_ARRAY; ++ ++ if (chip1 == ERR || *addr != data) ++ rc = ERR_PROG_ERROR; ++ ++ if (iflag) ++ enable_interrupts (); ++ ++ if (cflag) ++ icache_enable (); ++ ++ return rc; ++} ++ ++/*----------------------------------------------------------------------- ++ * Copy memory to flash. ++ */ ++ ++int write_buff (flash_info_t * info, uchar * src, ulong addr, ulong cnt) ++{ ++ ulong wp, data; ++ int rc; ++ ++ if (addr & 1) { ++ printf ("unaligned destination not supported\n"); ++ return ERR_ALIGN; ++ }; ++ ++ if ((int) src & 1) { ++ printf ("unaligned source not supported\n"); ++ return ERR_ALIGN; ++ }; ++ ++ wp = addr; ++ ++ while (cnt >= 2) { ++ data = *((volatile u16 *) src); ++ if ((rc = write_word (info, wp, data)) != 0) { ++ return (rc); ++ } ++ src += 2; ++ wp += 2; ++ cnt -= 2; ++ } ++ ++ if (cnt == 1) { ++ data = (*((volatile u8 *) src)) | (*((volatile u8 *) (wp + 1)) << ++ 8); ++ if ((rc = write_word (info, wp, data)) != 0) { ++ return (rc); ++ } ++ src += 1; ++ wp += 1; ++ cnt -= 1; ++ }; ++ ++ return ERR_OK; ++} +diff -Nurp ../u-boot-1.1.6/board/sarge/Makefile ./board/sarge/Makefile +--- ../u-boot-1.1.6/board/sarge/Makefile 1970-01-01 01:00:00.000000000 +0100 ++++ ./board/sarge/Makefile 2007-03-14 01:05:48.000000000 +0100 +@@ -0,0 +1,46 @@ ++# ++# (C) Copyright 2007 ++# Grzegorz Rajtar, mcgregor@blackmesaeast.com.pl. ++# ++# See file CREDITS for list of people who contributed to this ++# project. ++# ++# This program is free software; you can redistribute it and/or ++# modify it under the terms of the GNU General Public License as ++# published by the Free Software Foundation; either version 2 of ++# the License, or (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program; if not, write to the Free Software ++# Foundation, Inc., 59 Temple Place, Suite 330, Boston, ++# MA 02111-1307 USA ++# ++ ++include $(TOPDIR)/config.mk ++ ++LIB = lib$(BOARD).a ++ ++OBJS := sarge_board.o at45.o flash.o ++ ++$(LIB): $(OBJS) $(SOBJS) ++ $(AR) crv $@ $(OBJS) $(SOBJS) ++ ++clean: ++ rm -f $(SOBJS) $(OBJS) ++ ++distclean: clean ++ rm -f $(LIB) core *.bak .depend ++ ++######################################################################### ++ ++.depend: Makefile $(SOBJS:.o=.S) $(OBJS:.o=.c) ++ $(CC) -M $(CPPFLAGS) $(SOBJS:.o=.S) $(OBJS:.o=.c) > $@ ++ ++-include .depend ++ ++######################################################################### +diff -Nurp ../u-boot-1.1.6/board/sarge/sarge_board.c ./board/sarge/sarge_board.c +--- ../u-boot-1.1.6/board/sarge/sarge_board.c 1970-01-01 01:00:00.000000000 +0100 ++++ ./board/sarge/sarge_board.c 2007-05-11 23:45:25.000000000 +0200 +@@ -0,0 +1,363 @@ ++/* ++ * (C) Copyright 2007 ++ * Grzegorz Rajtar ++ * ++ * See file CREDITS for list of people who contributed to this ++ * project. ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License as ++ * published by the Free Software Foundation; either version 2 of ++ * the License, or (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, ++ * MA 02111-1307 USA ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++/* ------------------------------------------------------------------------- */ ++/* ++ * Miscelaneous platform dependent initialisations ++ */ ++ ++void lowlevel_init(void) ++{ ++} ++/* ------------------------------------------------------------------------- */ ++ ++void cs_init(int enable) ++{ ++ unsigned long flag = ++ AT91C_PIO_PA0 | AT91C_PIO_PA1 | AT91C_PIO_PA2 | ++ AT91C_PIO_PA4 | AT91C_PIO_PA5 | AT91C_PIO_PA6; ++ //MISO, MOSI, SPCK, NPCS1, NPCS2, NPCS3; ++ if (enable) ++ { ++ ((AT91PS_PIO) AT91C_BASE_PIOA)->PIO_PDR = flag; ++ ((AT91PS_PIO) AT91C_BASE_PIOA)->PIO_ASR = flag; ++ } ++ else ++ ((AT91PS_PIO) AT91C_BASE_PIOA)->PIO_PER = flag; ++} ++ ++void mac_init(int enable) ++{ ++ unsigned long flag = ++ // ETXCK, ETXEN, ETX0, ETX1, EXRS, ++ // ERX0, ERX1, ERXER, EMDC, EMDIO ++ AT91C_PIO_PA7 | AT91C_PIO_PA8 | AT91C_PIO_PA9 | AT91C_PIO_PA10 | ++ AT91C_PIO_PA11 | AT91C_PIO_PA12 | AT91C_PIO_PA13 | AT91C_PIO_PA14 | ++ AT91C_PIO_PA13 | AT91C_PIO_PA16; ++ if (enable) ++ { ++ ((AT91PS_PIO) AT91C_BASE_PIOA)->PIO_PDR = flag; ++ ((AT91PS_PIO) AT91C_BASE_PIOA)->PIO_ASR = flag; ++ } ++ else ++ ((AT91PS_PIO) AT91C_BASE_PIOA)->PIO_PER = flag; ++ ++ //ERXCK, ECOL, ERXDV, ERX3, ERX2, ETXER, ETX3, ETX2 ++ flag = AT91C_PIO_PB19 | AT91C_PIO_PB18 | AT91C_PIO_PB17 | AT91C_PIO_PB16 | ++ AT91C_PIO_PB15 | AT91C_PIO_PB14 | AT91C_PIO_PB13 | AT91C_PIO_PB12; ++ ++ if (enable) ++ { ++ ((AT91PS_PIO) AT91C_BASE_PIOB)->PIO_PDR = flag; ++ ((AT91PS_PIO) AT91C_BASE_PIOB)->PIO_BSR = flag; ++ } ++ else ++ ((AT91PS_PIO) AT91C_BASE_PIOB)->PIO_PER = flag; ++ // EMDINT - ++ flag = AT91C_PIO_PB1; ++ if (enable) ++ { ++ ((AT91PS_PIO) AT91C_BASE_PIOB)->PIO_PER = flag; ++ ((AT91PS_PIO) AT91C_BASE_PIOB)->PIO_IER = flag; ++ } ++ else ++ { ++ ((AT91PS_PIO) AT91C_BASE_PIOB)->PIO_PDR = flag; ++ ((AT91PS_PIO) AT91C_BASE_PIOB)->PIO_IDR = flag; ++ } ++} ++ ++void peripheral_init(int enable) ++{ ++ unsigned long flag = ++ // A - TXD0, RXD0, SCK0, RXD2, TXD2, I2C_SCL. I2C_SDA ++ AT91C_PIO_PA17 | AT91C_PIO_PA18 | AT91C_PIO_PA19 | ++ AT91C_PIO_PA20 | AT91C_PIO_PA21 | AT91C_PIO_PA22 | ++ AT91C_PIO_PA23 | AT91C_PA25_TWD | AT91C_PA26_TWCK; ++ ++ if (enable) ++ { ++ ((AT91PS_PIO) AT91C_BASE_PIOA)->PIO_PDR = flag; ++ ((AT91PS_PIO) AT91C_BASE_PIOA)->PIO_ASR = flag; ++ } ++ else ++ ((AT91PS_PIO) AT91C_BASE_PIOA)->PIO_PER = flag; ++ ++ //B - PCK1 ++ flag = AT91C_PIO_PA24; ++ ++ if (enable) ++ { ++ ((AT91PS_PIO) AT91C_BASE_PIOA)->PIO_PDR = flag; ++ ((AT91PS_PIO) AT91C_BASE_PIOA)->PIO_BSR = flag; ++ } ++ else ++ ((AT91PS_PIO) AT91C_BASE_PIOA)->PIO_PER = flag; ++ ++ ++ // PA20, PA21 - I/O ++ flag = AT91C_PIO_PA20 | AT91C_PIO_PA21; ++ if (enable) ++ ((AT91PS_PIO) AT91C_BASE_PIOA)->PIO_PER = flag; ++ else ++ ((AT91PS_PIO) AT91C_BASE_PIOA)->PIO_PDR = flag; ++ ++ // A - PCK0, RXD1, TXD1,RF1,RK1, RD1, TD1, TK1, TF1 ++ flag = AT91C_PIO_PB27 | AT91C_PIO_PB21 | AT91C_PIO_PB20 | ++ AT91C_PIO_PB11 | AT91C_PIO_PB10 | AT91C_PIO_PB9 | ++ AT91C_PIO_PB8 | AT91C_PIO_PB7 | AT91C_PIO_PB6; ++ if (enable) ++ { ++ ((AT91PS_PIO) AT91C_BASE_PIOB)->PIO_PDR = flag; ++ ((AT91PS_PIO) AT91C_BASE_PIOB)->PIO_ASR = flag; ++ } ++ else ++ ((AT91PS_PIO) AT91C_BASE_PIOB)->PIO_PER = flag; ++ // I/O PB26 - PB22 ++ flag = AT91C_PIO_PB22 | AT91C_PIO_PB23 | AT91C_PIO_PB24 | ++ AT91C_PIO_PB25 | AT91C_PIO_PB26; ++ if (enable) ++ ((AT91PS_PIO) AT91C_BASE_PIOB)->PIO_PER = flag; ++ else ++ ((AT91PS_PIO) AT91C_BASE_PIOB)->PIO_PDR = flag; ++} ++ ++void mmc_init(int enable) ++{ ++ // MCCK, MCCDA, MCDA0 ++ unsigned long flag = ++ AT91C_PIO_PA27 | AT91C_PIO_PA28 | AT91C_PIO_PA29; ++ if (enable) ++ { ++ ((AT91PS_PIO) AT91C_BASE_PIOA)->PIO_PDR = flag; ++ ((AT91PS_PIO) AT91C_BASE_PIOA)->PIO_ASR = flag; ++ } ++ else ++ ((AT91PS_PIO) AT91C_BASE_PIOA)->PIO_PER = flag; ++ // MCDA3, MCDA2, MCDA1 ++ flag = AT91C_PIO_PB5 | AT91C_PIO_PB4 | AT91C_PIO_PB3; ++ if (enable) ++ { ++ ((AT91PS_PIO) AT91C_BASE_PIOB)->PIO_PDR = flag; ++ ((AT91PS_PIO) AT91C_BASE_PIOB)->PIO_BSR = flag; ++ } ++ else ++ ((AT91PS_PIO) AT91C_BASE_PIOB)->PIO_PER = flag; ++ //MCWP, MCCD ++ flag = AT91C_PIO_PB2 | AT91C_PIO_PB0; ++ ++ if (enable) ++ { ++ ((AT91PS_PIO) AT91C_BASE_PIOB)->PIO_PER = flag; ++ ((AT91PS_PIO) AT91C_BASE_PIOB)->PIO_IER = AT91C_PIO_PB0; ++ } ++ else ++ { ++ ((AT91PS_PIO) AT91C_BASE_PIOB)->PIO_PDR = flag; ++ ((AT91PS_PIO) AT91C_BASE_PIOB)->PIO_IDR = AT91C_PIO_PB0; ++ } ++} ++ ++void irq_init(int enable) ++{ ++ // IRQ, FIQ ++ unsigned long flag = ++ AT91C_PIO_PB29 | AT91C_PIO_PB28; ++ if (enable) ++ { ++ ((AT91PS_PIO) AT91C_BASE_PIOB)->PIO_PDR = flag; ++ ((AT91PS_PIO) AT91C_BASE_PIOB)->PIO_ASR = flag; ++ } ++ else ++ ((AT91PS_PIO) AT91C_BASE_PIOB)->PIO_PER = flag; ++} ++ ++int board_init (void) ++{ ++ DECLARE_GLOBAL_DATA_PTR; ++ long flag; ++ ++ /* Enable Ctrlc */ ++ console_init_f (); ++ ++ /* sarge board specific */ ++ /* ++ cs_init(1); ++ mac_init(1); ++ peripheral_init(1); ++ mmc_init(1); ++ irq_init(1); ++ */ ++ ++ /* PIOB and PIOA clock enabling */ ++ ++ *AT91C_PMC_PCER = 1 << AT91C_ID_PIOA; ++ *AT91C_PMC_PCER = 1 << AT91C_ID_PIOB; ++ ++ ++ //miiphy_init(); ++ /* memory and cpu-speed are setup before relocation */ ++ /* so we do _nothing_ here */ ++ ++ /* Correct IRDA resistor problem */ ++ /* Set PA23_TXD in Output */ ++ ((AT91PS_PIO) AT91C_BASE_PIOA)->PIO_OER = AT91C_PA23_TXD2; ++ ++ /* arch number of AT91RM9200-Board */ ++ gd->bd->bi_arch_number = MACH_TYPE_AT91RM9200; ++ ++ /* adress of boot parameters */ ++ gd->bd->bi_boot_params = PHYS_SDRAM + 0x100; ++ ++ return 0; ++} ++ ++int dram_init (void) ++{ ++ DECLARE_GLOBAL_DATA_PTR; ++ ++ gd->bd->bi_dram[0].start = PHYS_SDRAM; ++ gd->bd->bi_dram[0].size = PHYS_SDRAM_SIZE; ++ return 0; ++} ++ ++ ++int sarge_before_linux(void) ++{ ++ DECLARE_GLOBAL_DATA_PTR; ++ AT91PS_EMAC mac = AT91C_BASE_EMAC; ++ char* isolate_str = getenv("phy_isolate"); ++ if (strlen(isolate_str) && strcmp(isolate_str, "yes") == 0) ++ { ++ printf("\nisolating PHY\n"); ++ eth_init(gd->bd); ++ ste100p_DisableInterrupts(mac); ++ ste100p_Isolate(mac); ++ } ++} ++ ++#ifdef CONFIG_DRIVER_ETHER ++#if (CONFIG_COMMANDS & CFG_CMD_NET) ++ ++/* ++ * Name: ++ * at91rm9200_GetPhyInterface ++ * Description: ++ * Initialise the interface functions to the PHY ++ * Arguments: ++ * None ++ * Return value: ++ * None ++ */ ++void at91rm9200_GetPhyInterface(AT91PS_PhyOps p_phyops) ++{ ++#ifdef DM9161_ETH ++ p_phyops->Init = dm9161_InitPhy; ++ p_phyops->IsPhyConnected = dm9161_IsPhyConnected; ++ p_phyops->GetLinkSpeed = dm9161_GetLinkSpeed; ++ p_phyops->AutoNegotiate = dm9161_AutoNegotiate; ++#endif ++ ++#ifdef RTL8201BL_ETH ++ p_phyops->Init = rtl8201bl_InitPhy; ++ p_phyops->IsPhyConnected = rtl8201bl_IsPhyConnected; ++ p_phyops->GetLinkSpeed = rtl8201bl_GetLinkSpeed; ++ p_phyops->AutoNegotiate = rtl8201bl_AutoNegotiate; ++ ++#endif ++#ifdef STE100P_ETH ++ p_phyops->Init = ste100p_InitPhy; ++ p_phyops->IsPhyConnected = ste100p_IsPhyConnected; ++ p_phyops->GetLinkSpeed = ste100p_GetLinkSpeed; ++ p_phyops->AutoNegotiate = ste100p_AutoNegotiate; ++ p_phyops->Isolate = ste100p_Isolate; ++ ++#endif ++ ++} ++ ++#endif /* CONFIG_COMMANDS & CFG_CMD_NET */ ++#endif /* CONFIG_DRIVER_ETHER */ ++ ++/* ++ * Disk On Chip (NAND) Millenium initialization. ++ * The NAND lives in the CS2* space ++ */ ++#if (CONFIG_COMMANDS & CFG_CMD_NAND) ++extern ulong nand_probe (ulong physadr); ++ ++#define AT91_SMARTMEDIA_BASE 0x40000000 /* physical address to access memory on NCS3 */ ++void nand_init (void) ++{ ++ /* Setup Smart Media, fitst enable the address range of CS3 */ ++ *AT91C_EBI_CSA |= AT91C_EBI_CS3A_SMC_SmartMedia; ++ /* set the bus interface characteristics based on ++ tDS Data Set up Time 30 - ns ++ tDH Data Hold Time 20 - ns ++ tALS ALE Set up Time 20 - ns ++ 16ns at 60 MHz ~= 3 */ ++/*memory mapping structures */ ++#define SM_ID_RWH (5 << 28) ++#define SM_RWH (1 << 28) ++#define SM_RWS (0 << 24) ++#define SM_TDF (1 << 8) ++#define SM_NWS (3) ++ AT91C_BASE_SMC2->SMC2_CSR[3] = (SM_RWH | SM_RWS | ++ AT91C_SMC2_ACSS_STANDARD | AT91C_SMC2_DBW_8 | ++ SM_TDF | AT91C_SMC2_WSEN | SM_NWS); ++ ++ /* enable the SMOE line PC0=SMCE, A21=CLE, A22=ALE */ ++ *AT91C_PIOC_ASR = AT91C_PC0_BFCK | AT91C_PC1_BFRDY_SMOE | ++ AT91C_PC3_BFBAA_SMWE; ++ *AT91C_PIOC_PDR = AT91C_PC0_BFCK | AT91C_PC1_BFRDY_SMOE | ++ AT91C_PC3_BFBAA_SMWE; ++ ++ /* Configure PC2 as input (signal READY of the SmartMedia) */ ++ *AT91C_PIOC_PER = AT91C_PC2_BFAVD; /* enable direct output enable */ ++ *AT91C_PIOC_ODR = AT91C_PC2_BFAVD; /* disable output */ ++ ++ /* Configure PB1 as input (signal Card Detect of the SmartMedia) */ ++ *AT91C_PIOB_PER = AT91C_PIO_PB1; /* enable direct output enable */ ++ *AT91C_PIOB_ODR = AT91C_PIO_PB1; /* disable output */ ++ ++ /* PIOB and PIOC clock enabling */ ++ *AT91C_PMC_PCER = 1 << AT91C_ID_PIOB; ++ *AT91C_PMC_PCER = 1 << AT91C_ID_PIOC; ++ ++ if (*AT91C_PIOB_PDSR & AT91C_PIO_PB1) ++ printf (" No SmartMedia card inserted\n"); ++#ifdef DEBUG ++ printf (" SmartMedia card inserted\n"); ++ ++ printf ("Probing at 0x%.8x\n", AT91_SMARTMEDIA_BASE); ++#endif ++ printf ("%4lu MB\n", nand_probe(AT91_SMARTMEDIA_BASE) >> 20); ++} ++#endif +diff -Nurp ../u-boot-1.1.6/board/sarge/u-boot.lds ./board/sarge/u-boot.lds +--- ../u-boot-1.1.6/board/sarge/u-boot.lds 1970-01-01 01:00:00.000000000 +0100 ++++ ./board/sarge/u-boot.lds 2007-03-09 01:25:41.000000000 +0100 +@@ -0,0 +1,57 @@ ++/* ++ * (C) Copyright 2002 ++ * Gary Jennejohn, DENX Software Engineering, ++ * ++ * See file CREDITS for list of people who contributed to this ++ * project. ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License as ++ * published by the Free Software Foundation; either version 2 of ++ * the License, or (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, ++ * MA 02111-1307 USA ++ */ ++ ++OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm") ++/*OUTPUT_FORMAT("elf32-arm", "elf32-arm", "elf32-arm")*/ ++OUTPUT_ARCH(arm) ++ENTRY(_start) ++SECTIONS ++{ ++ . = 0x00000000; ++ ++ . = ALIGN(4); ++ .text : ++ { ++ cpu/arm920t/start.o (.text) ++ *(.text) ++ } ++ ++ . = ALIGN(4); ++ .rodata : { *(.rodata) } ++ ++ . = ALIGN(4); ++ .data : { *(.data) } ++ ++ . = ALIGN(4); ++ .got : { *(.got) } ++ ++ . = .; ++ __u_boot_cmd_start = .; ++ .u_boot_cmd : { *(.u_boot_cmd) } ++ __u_boot_cmd_end = .; ++ ++ . = ALIGN(4); ++ __bss_start = .; ++ .bss : { *(.bss) } ++ _end = .; ++} +diff -Nurp ../u-boot-1.1.6/common/cmd_bootm.c ./common/cmd_bootm.c +--- ../u-boot-1.1.6/common/cmd_bootm.c 2006-11-02 15:15:01.000000000 +0100 ++++ ./common/cmd_bootm.c 2007-03-27 02:55:11.000000000 +0200 +@@ -79,7 +79,10 @@ DECLARE_GLOBAL_DATA_PTR; + # define CHUNKSZ (64 * 1024) + #endif + +-int gunzip (void *, int, unsigned char *, unsigned long *); ++ ++//int gunzip(void *dst, int dstlen, unsigned char *src, unsigned long *lenp); ++int gunzip(unsigned char *inbuf, unsigned long *insize, unsigned char *outbuf, unsigned long *outsize); ++ + + static void *zalloc(void *, unsigned, unsigned); + static void zfree(void *, void *, unsigned); +@@ -94,6 +97,12 @@ extern flash_info_t flash_info[]; /* inf + static int do_imls (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]); + #endif + ++ ++#ifdef CONFIG_HAS_DATAFLASH ++extern int AT91F_DataflashInit(void); ++#endif ++ ++ + static void print_type (image_header_t *hdr); + + #ifdef __I386__ +@@ -176,8 +185,9 @@ int do_bootm (cmd_tbl_t *cmdtp, int flag + + /* Copy header so we can blank CRC field for re-calculation */ + #ifdef CONFIG_HAS_DATAFLASH ++ AT91F_DataflashInit(); + if (addr_dataflash(addr)){ +- read_dataflash(addr, sizeof(image_header_t), (char *)&header); ++ read_dataflash(addr, sizeof(image_header_t), (char *)&header); + } else + #endif + memmove (&header, (char *)addr, sizeof(image_header_t)); +@@ -194,7 +204,7 @@ int do_bootm (cmd_tbl_t *cmdtp, int flag + } else + #endif /* __I386__ */ + { +- puts ("Bad Magic Number\n"); ++ printf ("Bad Magic Number, got 0x%x, should be: 0x%x\n", hdr->ih_magic, IH_MAGIC); + SHOW_BOOT_PROGRESS (-1); + return 1; + } +@@ -216,9 +226,14 @@ int do_bootm (cmd_tbl_t *cmdtp, int flag + + #ifdef CONFIG_HAS_DATAFLASH + if (addr_dataflash(addr)){ +- len = ntohl(hdr->ih_size) + sizeof(image_header_t); +- read_dataflash(addr, len, (char *)CFG_LOAD_ADDR); +- addr = CFG_LOAD_ADDR; ++ len = ntohl(hdr->ih_size) + sizeof(image_header_t); ++ char* env_loadaddr = getenv("loadaddr"); ++ unsigned long load_addr = CFG_LOAD_ADDR; ++ if (env_loadaddr) ++ load_addr = simple_strtoul(env_loadaddr, NULL, 16); ++ read_dataflash(addr, len, (char *)load_addr); ++ addr = load_addr; ++ + } + #endif + +@@ -227,6 +242,7 @@ int do_bootm (cmd_tbl_t *cmdtp, int flag + print_image_hdr ((image_header_t *)addr); + + data = addr + sizeof(image_header_t); ++ + len = ntohl(hdr->ih_size); + + if (verify) { +@@ -343,12 +359,24 @@ int do_bootm (cmd_tbl_t *cmdtp, int flag + break; + case IH_COMP_GZIP: + printf (" Uncompressing %s ... ", name); +- if (gunzip ((void *)ntohl(hdr->ih_load), unc_len, +- (uchar *)data, &len) != 0) { +- puts ("GUNZIP ERROR - must RESET board to recover\n"); ++ int res; ++ if ((res = gunzip ((uchar *)data, &len, (void *)ntohl(hdr->ih_load), &unc_len ++ )) != 0) { ++ printf ("GUNZIP ERROR (code %d)- must RESET board to recover\n", res); + SHOW_BOOT_PROGRESS (-6); ++ + do_reset (cmdtp, flag, argc, argv); + } ++ //addr = ntohl(hdr->ih_load); ++ //old gunzip switched parameters list ++ ++/* if ((res = gunzip ((void *)ntohl(hdr->ih_load), unc_len, ++ (uchar *)data, &len)) != 0) { ++ printf ("GUNZIP ERROR (code %d)- must RESET board to recover\n", res); ++ SHOW_BOOT_PROGRESS (-6); ++ do_reset (cmdtp, flag, argc, argv); ++ } */ ++ + break; + #ifdef CONFIG_BZIP2 + case IH_COMP_BZIP2: +@@ -413,7 +441,7 @@ int do_bootm (cmd_tbl_t *cmdtp, int flag + default: /* handled by (original) Linux case */ + case IH_OS_LINUX: + #ifdef CONFIG_SILENT_CONSOLE +- fixup_silent_linux(); ++// fixup_silent_linux(); + #endif + do_bootm_linux (cmdtp, flag, argc, argv, + addr, len_ptr, verify); +@@ -1429,12 +1457,13 @@ static void zfree(void *x, void *addr, u + + #define DEFLATED 8 + ++/* + int gunzip(void *dst, int dstlen, unsigned char *src, unsigned long *lenp) + { + z_stream s; + int r, i, flags; + +- /* skip header */ ++ // skip header + i = 10; + flags = src[3]; + if (src[2] != DEFLATED || (flags & RESERVED) != 0) { +@@ -1462,9 +1491,10 @@ int gunzip(void *dst, int dstlen, unsign + s.outcb = (cb_func)WATCHDOG_RESET; + #else + s.outcb = Z_NULL; +-#endif /* CONFIG_HW_WATCHDOG */ +- ++#endif // CONFIG_HW_WATCHDOG // ++ + r = inflateInit2(&s, -MAX_WBITS); ++ // gunzip(void *dst, int dstlen, unsigned char *src, unsigned long *lenp) + if (r != Z_OK) { + printf ("Error: inflateInit2() returned %d\n", r); + return (-1); +@@ -1480,9 +1510,8 @@ int gunzip(void *dst, int dstlen, unsign + } + *lenp = s.next_out - (unsigned char *) dst; + inflateEnd(&s); +- + return (0); +-} ++}*/ + + #ifdef CONFIG_BZIP2 + void bz_internal_error(int errcode) +diff -Nurp ../u-boot-1.1.6/cpu/arm920t/at91rm9200/Makefile ./cpu/arm920t/at91rm9200/Makefile +--- ../u-boot-1.1.6/cpu/arm920t/at91rm9200/Makefile 2006-11-02 15:15:01.000000000 +0100 ++++ ./cpu/arm920t/at91rm9200/Makefile 2007-05-13 20:19:07.000000000 +0200 +@@ -26,7 +26,7 @@ include $(TOPDIR)/config.mk + LIB = $(obj)lib$(SOC).a + + COBJS = bcm5221.o dm9161.o ether.o i2c.o interrupts.o \ +- lxt972.o serial.o usb_ohci.o ++ lxt972.o serial.o usb_ohci.o ste100p.o + SOBJS = lowlevel_init.o + + SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) +diff -Nurp ../u-boot-1.1.6/cpu/arm920t/at91rm9200/ste100p.c ./cpu/arm920t/at91rm9200/ste100p.c +--- ../u-boot-1.1.6/cpu/arm920t/at91rm9200/ste100p.c 1970-01-01 01:00:00.000000000 +0100 ++++ ./cpu/arm920t/at91rm9200/ste100p.c 2007-05-10 02:02:34.000000000 +0200 +@@ -0,0 +1,517 @@ ++/* ++ * (C) Copyright 2007 ++ * Author : Grzegorz Rajtar (McGregor) (mcgregor@blackmesaeast.com.pl) ++ * ++ * See file CREDITS for list of people who contributed to this ++ * project. ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License as ++ * published by the Free Software Foundation; either version 2 of ++ * the License, or (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, ++ * MA 02111-1307 USA ++ */ ++ ++#include ++#include ++#include ++ ++#ifdef CONFIG_DRIVER_ETHER ++ ++#if (CONFIG_COMMANDS & CFG_CMD_NET) ++ ++void PhyReset(AT91PS_EMAC p_mac) ++{ ++ static long init_wait = 0; ++ unsigned short IntValue; ++ unsigne