Commit 7bf038ec21968eb3081529f257b7cd30474e6d62

Authored by Tom Rini
Committed by Albert ARIBAUD
1 parent a438c756b6

am335x_evm: Update config for common usage

- Add default commands
- Add HUSH parser
- Make environment, malloc areas larger
- Add ATAGS and OF_LIBFDT
- Add defaults to boot ramdisk and MMC, use uEnv.txt

Signed-off-by: Tom Rini <trini@ti.com>

Showing 1 changed file with 60 additions and 10 deletions Side-by-side Diff

include/configs/am335x_evm.h
... ... @@ -17,10 +17,6 @@
17 17 #define __CONFIG_AM335X_EVM_H
18 18  
19 19 #define CONFIG_AM33XX
20   -#define CONFIG_CMD_MEMORY /* for mtest */
21   -#undef CONFIG_GZIP
22   -#undef CONFIG_ZLIB
23   -#undef CONFIG_SYS_HUSH_PARSER
24 20  
25 21 #include <asm/arch/cpu.h>
26 22 #include <asm/arch/hardware.h>
27 23  
28 24  
29 25  
... ... @@ -28,23 +24,77 @@
28 24 #define CONFIG_DMA_COHERENT
29 25 #define CONFIG_DMA_COHERENT_SIZE (1 << 20)
30 26  
31   -#define CONFIG_ENV_SIZE 0x400
32   -#define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + (8 * 1024))
  27 +#define CONFIG_ENV_SIZE (128 << 10) /* 128 KiB */
  28 +#define CONFIG_SYS_MALLOC_LEN (1024 << 10)
  29 +#define CONFIG_SYS_LONGHELP /* undef to save memory */
  30 +#define CONFIG_SYS_HUSH_PARSER /* use "hush" command parser */
33 31 #define CONFIG_SYS_PROMPT "U-Boot# "
34 32 #define CONFIG_SYS_NO_FLASH
35 33 #define MACH_TYPE_TIAM335EVM 3589 /* Until the next sync */
36 34 #define CONFIG_MACH_TYPE MACH_TYPE_TIAM335EVM
37 35  
  36 +#define CONFIG_OF_LIBFDT
  37 +#define CONFIG_CMDLINE_TAG /* enable passing of ATAGs */
  38 +#define CONFIG_SETUP_MEMORY_TAGS
  39 +#define CONFIG_INITRD_TAG
  40 +
  41 +/* commands to include */
  42 +#include <config_cmd_default.h>
  43 +
38 44 #define CONFIG_CMD_ASKENV
39 45 #define CONFIG_VERSION_VARIABLE
40 46  
41 47 /* set to negative value for no autoboot */
42 48 #define CONFIG_BOOTDELAY 3
43   -#define CONFIG_SYS_AUTOLOAD "no"
44   -#define CONFIG_BOOTFILE "uImage"
45 49 #define CONFIG_EXTRA_ENV_SETTINGS \
46   - "verify=yes\0" \
47   - "ramdisk_file=ramdisk.gz\0" \
  50 + "loadaddr=0x80200000\0" \
  51 + "fdtaddr=0x80F80000\0" \
  52 + "rdaddr=0x81000000\0" \
  53 + "bootfile=/boot/uImage\0" \
  54 + "console=ttyO0,115200n8\0" \
  55 + "optargs=\0" \
  56 + "mmcdev=0\0" \
  57 + "mmcroot=/dev/mmcblk0p2 rw\0" \
  58 + "mmcrootfstype=ext4 rootwait\0" \
  59 + "ramroot=/dev/ram0 rw ramdisk_size=65536 initrd=${rdaddr},64M\0" \
  60 + "ramrootfstype=ext2\0" \
  61 + "mmcargs=setenv bootargs console=${console} " \
  62 + "${optargs} " \
  63 + "root=${mmcroot} " \
  64 + "rootfstype=${mmcrootfstype}\0" \
  65 + "bootenv=uEnv.txt\0" \
  66 + "loadbootenv=fatload mmc ${mmcdev} ${loadaddr} ${bootenv}\0" \
  67 + "importbootenv=echo Importing environment from mmc ...; " \
  68 + "env import -t $loadaddr $filesize\0" \
  69 + "ramargs=setenv bootargs console=${console} " \
  70 + "${optargs} " \
  71 + "root=${ramroot} " \
  72 + "rootfstype=${ramrootfstype}\0" \
  73 + "loadramdisk=fatload mmc ${mmcdev} ${rdaddr} ramdisk.gz\0" \
  74 + "loaduimagefat=fatload mmc ${mmcdev} ${loadaddr} ${bootfile}\0" \
  75 + "loaduimage=ext2load mmc ${mmcdev}:2 ${loadaddr} ${bootfile}\0" \
  76 + "mmcboot=echo Booting from mmc ...; " \
  77 + "run mmcargs; " \
  78 + "bootm ${loadaddr}\0" \
  79 + "ramboot=echo Booting from ramdisk ...; " \
  80 + "run ramargs; " \
  81 + "bootm ${loadaddr}\0" \
  82 +
  83 +#define CONFIG_BOOTCOMMAND \
  84 + "if mmc rescan ${mmcdev}; then " \
  85 + "echo SD/MMC found on device ${mmcdev};" \
  86 + "if run loadbootenv; then " \
  87 + "echo Loaded environment from ${bootenv};" \
  88 + "run importbootenv;" \
  89 + "fi;" \
  90 + "if test -n $uenvcmd; then " \
  91 + "echo Running uenvcmd ...;" \
  92 + "run uenvcmd;" \
  93 + "fi;" \
  94 + "if run loaduimage; then " \
  95 + "run mmcboot;" \
  96 + "fi;" \
  97 + "fi;" \
48 98  
49 99 /* Clock Defines */
50 100 #define V_OSCK 24000000 /* Clock output from T2 */