r1336 - trunk/src/host/devirginator
werner at sita.openmoko.org
werner at sita.openmoko.org
Tue Mar 13 07:07:25 CET 2007
Author: werner
Date: 2007-03-13 07:07:18 +0100 (Tue, 13 Mar 2007)
New Revision: 1336
Modified:
trunk/src/host/devirginator/envedit.pl
trunk/src/host/devirginator/environment.in
trunk/src/host/devirginator/setup.sh
Log:
envedit.pl (readenv): make it an error to load an environment smaller than 6
bytes
setup.sh: use partition names for dfu-util
environment.in: added "Boot from microSD" menu option (untested)
environment.in: added "regular_boot" to bootargs_base
setup.sh: just do a "reset halt" after the DFU upload, no complicated and buggy
experiment with breakpoint
Modified: trunk/src/host/devirginator/envedit.pl
===================================================================
--- trunk/src/host/devirginator/envedit.pl 2007-03-13 06:05:35 UTC (rev 1335)
+++ trunk/src/host/devirginator/envedit.pl 2007-03-13 06:07:18 UTC (rev 1336)
@@ -50,6 +50,11 @@
open(FILE, $file) || die "$file: $!";
$env = join("", <FILE>);
close FILE;
+ if (length $env < 6) { # CRC plus \0\0
+ print STDERR sprintf("Environment is too small (%d bytes < 6)\n",
+ length $env);
+ exit(1);
+ }
if (length $env != $ENV_SIZE) {
print STDERR sprintf("warning: environment is %d bytes, expected %d\n",
length $env, $ENV_SIZE);
Modified: trunk/src/host/devirginator/environment.in
===================================================================
--- trunk/src/host/devirginator/environment.in 2007-03-13 06:05:35 UTC (rev 1335)
+++ trunk/src/host/devirginator/environment.in 2007-03-13 06:07:18 UTC (rev 1336)
@@ -8,6 +8,7 @@
console=ttySAC0,115200
console=tty0
loglevel=8
+ regular_boot
bootcmd=
setenv bootargs ${bootargs_base} ${mtdparts};
@@ -26,25 +27,26 @@
stderr=usbtty
stdin=usbtty
-#menu_1=
-# Boot from microSD:
-# setenv bootargs rootfstype=
-# mmcinit;
-# ext2load mmc 0 0x32000000 uImage;
-# bootm 0x32000000
+menu_1=
+ Boot from microSD:
+ setenv bootargs
+ ${bootargs_base} rootfstype=ext2 rootfs=/dev/mmcblk0p1 rootdelay=5;
+ mmcinit;
+ ext2load mmc 0 0x32000000 uImage;
+ bootm 0x32000000
-menu_1=
+menu_2=
Set console to USB:
setenv stdin usbtty;
setenv stdout usbtty;
setenv stderr usbtty
-menu_2=
+menu_3=
Set console to serial:
setenv stdin serial;
setenv stdout serial;
setenv stderr serial
-menu_3=
+menu_4=
Power off:
neo1973 power-off
Modified: trunk/src/host/devirginator/setup.sh
===================================================================
--- trunk/src/host/devirginator/setup.sh 2007-03-13 06:05:35 UTC (rev 1335)
+++ trunk/src/host/devirginator/setup.sh 2007-03-13 06:07:18 UTC (rev 1336)
@@ -342,15 +342,15 @@
if \$stage2; then
echo === STAGE 2: DFU upload
sleep 5
- $DFU_UTIL -a 3 -D $UIMAGE
- $DFU_UTIL -a 5 -D $ROOTFS
- $DFU_UTIL -a 4 -D tmp/splash.gz
- $DFU_UTIL -a 2 -U tmp/env.old
+ $DFU_UTIL -a kernel -D $UIMAGE
+ $DFU_UTIL -a rootfs -D $ROOTFS
+ $DFU_UTIL -a splash -D tmp/splash.gz
+ $DFU_UTIL -a u-boot_env -U tmp/env.old
./openocdcmd.pl $OPENOCD_HOST $OPENOCD_PORT \
- "bp 0x33f80000 4 hw" reset wait_halt "rbp 0x33f80000" resume exit
+ "reset halt" wait_halt resume exit
sleep 5
./envedit.pl -i tmp/env.old -o tmp/env.new -f tmp/environment
- $DFU_UTIL -a 2 -D tmp/env.new
+ $DFU_UTIL -a u-boot_env -D tmp/env.new
./openocdcmd.pl $OPENOCD_HOST $OPENOCD_PORT "reset run" exit
fi
More information about the commitlog
mailing list