diff --git a/common/env_common.c b/common/env_common.c index 77f9944..21ed124 100644 --- a/common/env_common.c +++ b/common/env_common.c @@ -257,6 +257,10 @@ void env_relocate (void) else { env_relocate_spec (); } +#ifdef CONFIG_OVERRIDE_BOOTENV + puts ("Using default environment\n\n"); + set_default_env(); +#endif gd->env_addr = (ulong)&(env_ptr->data); #ifdef CONFIG_AMIGAONEG3SE diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h index 01b3b0e..fe86686 100644 --- a/include/configs/omap3_beagle.h +++ b/include/configs/omap3_beagle.h @@ -148,15 +148,21 @@ #define CONFIG_JFFS2_PART_SIZE 0xf980000 /* size of jffs2 partition */ /* Environment information */ -#define CONFIG_BOOTDELAY 10 +#define CONFIG_BOOTDELAY 1 -#define CONFIG_BOOTCOMMAND "nand read 80200000 280000 400000 ; bootm 80200000" +/* Ignores BOOTCMD in saved environment and runs u-boot.cmd from SD card */ +#define CONFIG_CMD_AUTOSCRIPT +#define CONFIG_OVERRIDE_BOOTENV +#define CONFIG_BOOTCOMMAND "\ +mmcinit;\ +fatload mmc 0 801F0000 u-boot.img;\ +autoscr 801F0000" -#define CONFIG_BOOTARGS "setenv bootargs console=ttyS2,115200n8 noinitrd root=/dev/mtdblock4 rw rootfstype=jffs2" +#define CONFIG_BOOTARGS "console=ttyS2,115200n8 console=tty0 root=/dev/mtdblock4 rw rootfstype=jffs2 nohz=off" -#define CONFIG_NETMASK 255.255.254.0 -#define CONFIG_IPADDR 128.247.77.90 -#define CONFIG_SERVERIP 128.247.77.158 +#define CONFIG_NETMASK 255.255.255.0 +#define CONFIG_IPADDR 192.168.0.2 +#define CONFIG_SERVERIP 192.168.0.1 #define CONFIG_BOOTFILE "uImage" #define CONFIG_AUTO_COMPLETE 1 /* @@ -166,7 +172,7 @@ #define CFG_LONGHELP /* undef to save memory */ #define CFG_PROMPT V_PROMPT -#define CFG_CBSIZE 256 /* Console I/O Buffer Size */ +#define CFG_CBSIZE 512 /* Console I/O Buffer Size */ /* Print Buffer Size */ #define CFG_PBSIZE (CFG_CBSIZE+sizeof(CFG_PROMPT)+16) #define CFG_MAXARGS 16 /* max number of command args */ diff --git a/mkubootcmd b/mkubootcmd new file mode 100755 index 0000000..8743028 --- /dev/null +++ b/mkubootcmd @@ -0,0 +1,41 @@ +#!/bin/sh +cat < u-boot2.cmd +mmcinit +fatload mmc 0 80200000 uImage +nand unlock +nand ecc sw +nand erase 280000 400000 +nand write 80200000 280000 400000 +fatload mmc 0 81600000 ramdisk.gz +setenv bootcmd 'nand read 80200000 280000 400000;bootm 80200000' +setenv bootargs 'console=ttyS2,115200n8 console=tty0 root=/dev/mtdblock4 rw rootfstype=jffs2 nohz=off' +saveenv +setenv bootargs 'console=ttyS2,115200n8 console=tty0 root=/dev/ram0 rw ramdisk_size=32768 initrd=0x81600000,32M nohz=off' +bootm 80200000 +EOF_FLASH + +mkimage -A arm -O linux -T script -C none -a 0 -e 0 -n 'mmc0p1+rd -> mtd3+mtd4' -d u-boot2.cmd u-boot2.img + +cat < u-boot.cmd +mmcinit +fatload mmc 0 80200000 uImage +fatload mmc 0 81600000 ramdisk.gz +setenv bootcmd 'mmcinit;fatload mmc 0 80200000 uImage;bootm 80200000' +setenv bootargs 'console=ttyS2,115200n8 console=tty0 root=/dev/mmcblk0p2 rw rootwait rootdelay=1 nohz=off' +saveenv +setenv bootargs 'console=ttyS2,115200n8 console=tty0 root=/dev/ram0 rw ramdisk_size=32768 initrd=0x81600000,32M nohz=off' +bootm 80200000 +EOF_SD + +mkimage -A arm -O linux -T script -C none -a 0 -e 0 -n 'mmc0p1+rd -> mmc0p1+mmc0p2' -d u-boot.cmd u-boot.img + +cat < u-boot3.cmd +mmcinit +fatload mmc 0 80200000 uImage +setenv bootcmd 'mmcinit;fatload mmc 0 80200000 uImage;bootm 80200000' +setenv bootargs 'console=ttyS2,115200n8 console=tty0 root=/dev/mmcblk0p2 rw rootwait rootdelay=1 nohz=off' +bootm 80200000 +EOF_SD2 + +mkimage -A arm -O linux -T script -C none -a 0 -e 0 -n 'mmc0p1+mmc0p2' -d u-boot3.cmd u-boot3.img +