2014-06-09 02:41:34 +00:00
|
|
|
diff -urN a/include/config_distro_defaults.h b/include/config_distro_defaults.h
|
|
|
|
--- a/include/config_distro_defaults.h 2014-06-03 11:30:04.000000000 -0600
|
2014-06-12 02:29:05 +00:00
|
|
|
+++ b/include/config_distro_defaults.h 2014-06-11 20:20:44.881069479 -0600
|
2014-06-09 02:41:34 +00:00
|
|
|
@@ -45,7 +45,7 @@
|
|
|
|
|
|
|
|
#define CONFIG_CMDLINE_EDITING
|
|
|
|
#define CONFIG_AUTO_COMPLETE
|
|
|
|
-#define CONFIG_BOOTDELAY 2
|
|
|
|
+#define CONFIG_BOOTDELAY 1
|
|
|
|
#define CONFIG_SYS_LONGHELP
|
|
|
|
#define CONFIG_MENU
|
|
|
|
#define CONFIG_DOS_PARTITION
|
|
|
|
diff -urN a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h
|
|
|
|
--- a/include/configs/sunxi-common.h 2014-06-03 11:30:04.000000000 -0600
|
2014-06-12 02:29:05 +00:00
|
|
|
+++ b/include/configs/sunxi-common.h 2014-06-11 20:21:15.295967969 -0600
|
2014-06-09 02:41:34 +00:00
|
|
|
@@ -126,7 +126,7 @@
|
2013-07-31 03:56:28 +00:00
|
|
|
#define CONFIG_SYS_NO_FLASH
|
|
|
|
|
|
|
|
#define CONFIG_SYS_MONITOR_LEN (512 << 10) /* 512 KiB */
|
|
|
|
-#define CONFIG_IDENT_STRING " Allwinner Technology"
|
|
|
|
+#define CONFIG_IDENT_STRING " Arch Linux ARM"
|
|
|
|
|
|
|
|
#define CONFIG_ENV_OFFSET (544 << 10) /* (8 + 24 + 512) KiB */
|
|
|
|
#define CONFIG_ENV_SIZE (128 << 10) /* 128 KiB */
|
2014-06-12 02:29:05 +00:00
|
|
|
@@ -137,99 +137,55 @@
|
2014-06-09 02:41:34 +00:00
|
|
|
#define RUN_BOOT_RAM ""
|
|
|
|
#endif
|
|
|
|
|
|
|
|
-#define CONFIG_BOOTCOMMAND \
|
|
|
|
- RUN_BOOT_RAM \
|
|
|
|
- "if run loadbootenv; then " \
|
|
|
|
- "echo Loaded environment from ${bootenv};" \
|
|
|
|
- "env import -t ${scriptaddr} ${filesize};" \
|
|
|
|
- "fi;" \
|
|
|
|
- "if test -n \\\"${uenvcmd}\\\"; then " \
|
|
|
|
- "echo Running uenvcmd ...;" \
|
|
|
|
- "run uenvcmd;" \
|
|
|
|
- "fi;" \
|
|
|
|
- "if run loadbootscr; then "\
|
|
|
|
- "echo Jumping to ${bootscr};" \
|
|
|
|
- "source ${scriptaddr};" \
|
|
|
|
- "fi;" \
|
|
|
|
- "run autoboot;" \
|
|
|
|
- ""
|
|
|
|
-
|
|
|
|
#ifdef CONFIG_CMD_WATCHDOG
|
|
|
|
#define RESET_WATCHDOG "watchdog 0"
|
|
|
|
#else
|
2014-06-12 02:07:36 +00:00
|
|
|
#define RESET_WATCHDOG "true"
|
|
|
|
#endif
|
2014-06-09 02:41:34 +00:00
|
|
|
|
2014-06-12 02:07:36 +00:00
|
|
|
+#if defined(CONFIG_CUBIEBOARD2)
|
2014-06-13 00:29:47 +00:00
|
|
|
+ #define CONFIG_DEFAULT_FDT_FILE "sun7i-a20-cubieboard2.dtb"
|
2014-06-12 02:07:36 +00:00
|
|
|
+#elif defined(CONFIG_CUBIETRUCK)
|
2014-06-13 00:29:47 +00:00
|
|
|
+ #define CONFIG_DEFAULT_FDT_FILE "sun7i-a20-cubietruck.dtb"
|
2014-06-12 02:07:36 +00:00
|
|
|
+#elif defined(CONFIG_A20_OLINUXINO_M)
|
2014-06-13 00:29:47 +00:00
|
|
|
+ #define CONFIG_DEFAULT_FDT_FILE "sun7i-a20-olinuxino-micro.dtb"
|
2014-06-12 02:07:36 +00:00
|
|
|
+#elif defined(CONFIG_HACKBERRY)
|
2014-06-13 00:29:47 +00:00
|
|
|
+ #define CONFIG_DEFAULT_FDT_FILE "sun4i-a10-hackberry.dtb"
|
2014-06-12 02:29:05 +00:00
|
|
|
+#else
|
|
|
|
+ #define CONFIG_DEFAULT_FDT_FILE ""
|
2014-06-12 02:07:36 +00:00
|
|
|
+#endif
|
|
|
|
+
|
2014-06-09 02:41:34 +00:00
|
|
|
#define CONFIG_EXTRA_ENV_SETTINGS \
|
|
|
|
"bootm_size=0x10000000\0" \
|
|
|
|
- "console=ttyS0,115200\0" \
|
|
|
|
- "panicarg=panic=10\0" \
|
|
|
|
- "extraargs=\0" \
|
|
|
|
- "loglevel=8\0" \
|
|
|
|
- "scriptaddr=0x44000000\0" \
|
|
|
|
- "device=mmc\0" \
|
|
|
|
- "partition=0:1\0" \
|
|
|
|
- "setargs=" \
|
|
|
|
- "if test -z \\\\\"$root\\\\\"; then"\
|
|
|
|
- " if test \\\\\"$bootpath\\\\\" = \"/boot/\"; then"\
|
|
|
|
- " root=\"/dev/mmcblk0p1 rootwait\";"\
|
|
|
|
- " else" \
|
|
|
|
- " root=\"/dev/mmcblk0p2 rootwait\";"\
|
|
|
|
- " fi;"\
|
|
|
|
- " fi;"\
|
|
|
|
- " setenv bootargs console=${console} root=${root}" \
|
|
|
|
- " loglevel=${loglevel} ${panicarg} ${extraargs}" \
|
|
|
|
- "\0" \
|
|
|
|
- "kernel=uImage\0" \
|
|
|
|
- "bootenv=uEnv.txt\0" \
|
|
|
|
- "bootscr=boot.scr\0" \
|
|
|
|
- "script=script.bin\0" \
|
|
|
|
- "loadbootscr=" \
|
2013-07-31 03:56:28 +00:00
|
|
|
- "fatload $device $partition $scriptaddr ${bootscr}" \
|
2014-03-15 12:19:48 +00:00
|
|
|
- " || " \
|
2013-07-31 03:56:28 +00:00
|
|
|
- "ext2load $device $partition $scriptaddr boot/${bootscr}" \
|
2014-06-09 02:41:34 +00:00
|
|
|
- " ||" \
|
2013-07-31 03:56:28 +00:00
|
|
|
- "ext2load $device $partition $scriptaddr ${bootscr}" \
|
2014-06-09 02:41:34 +00:00
|
|
|
- "\0" \
|
|
|
|
- "loadbootenv=" \
|
2013-07-31 03:56:28 +00:00
|
|
|
- "fatload $device $partition $scriptaddr ${bootenv}" \
|
2014-03-15 12:19:48 +00:00
|
|
|
- " || " \
|
|
|
|
- "ext2load $device $partition $scriptaddr boot/${bootenv}" \
|
2014-06-09 02:41:34 +00:00
|
|
|
- " || " \
|
2013-07-31 03:56:28 +00:00
|
|
|
- "ext2load $device $partition $scriptaddr ${bootenv}" \
|
2014-06-09 02:41:34 +00:00
|
|
|
- "\0" \
|
|
|
|
- "loadkernel=" \
|
|
|
|
- "if "\
|
|
|
|
- "bootpath=/boot/" \
|
|
|
|
- " && " \
|
2014-03-15 12:19:48 +00:00
|
|
|
- "ext2load $device $partition 0x43000000 ${bootpath}${script}" \
|
2013-07-31 03:56:28 +00:00
|
|
|
- " && " \
|
|
|
|
- "ext2load $device $partition 0x48000000 ${bootpath}${kernel}" \
|
|
|
|
- ";then true; elif " \
|
|
|
|
- "bootpath=/" \
|
|
|
|
- " && " \
|
2014-03-15 12:19:48 +00:00
|
|
|
- "fatload $device $partition 0x43000000 ${script}" \
|
2014-06-09 02:41:34 +00:00
|
|
|
- " && " \
|
2013-07-31 03:56:28 +00:00
|
|
|
- "fatload $device $partition 0x48000000 ${kernel}" \
|
2014-06-09 02:41:34 +00:00
|
|
|
- ";then true; elif " \
|
|
|
|
- "bootpath=/" \
|
|
|
|
- " && " \
|
2014-03-15 12:19:48 +00:00
|
|
|
- "ext2load $device $partition 0x43000000 ${bootpath}${script}" \
|
2014-06-09 02:41:34 +00:00
|
|
|
- " && " \
|
2013-07-31 03:56:28 +00:00
|
|
|
- "ext2load $device $partition 0x48000000 ${bootpath}${kernel}" \
|
2014-06-09 02:41:34 +00:00
|
|
|
- ";then true; else "\
|
|
|
|
- "false" \
|
|
|
|
- ";fi" \
|
|
|
|
- "\0" \
|
|
|
|
- "autoboot=" \
|
|
|
|
- "run loadkernel" \
|
|
|
|
- " && " \
|
|
|
|
- "run setargs" \
|
|
|
|
- " && " \
|
|
|
|
- RESET_WATCHDOG \
|
|
|
|
- " && " \
|
|
|
|
- "bootm 0x48000000" \
|
|
|
|
- "\0" \
|
|
|
|
+ "console=ttyS0\0" \
|
|
|
|
+ "loadaddr=0x48000000\0" \
|
|
|
|
+ "scriptaddr=0x43000000\0" \
|
2014-06-12 02:07:36 +00:00
|
|
|
+ "fdt_addr=0x44000000\0" \
|
|
|
|
+ "fdt_file=" CONFIG_DEFAULT_FDT_FILE "\0" \
|
2014-06-09 02:41:34 +00:00
|
|
|
+ "optargs=\0" \
|
|
|
|
+ "video=\0" \
|
|
|
|
+ "mmcdev=0\0" \
|
|
|
|
+ "mmcpart=1\0" \
|
|
|
|
+ "mmcroot=/dev/mmcblk0p1 rw rootwait\0" \
|
|
|
|
+ "mmcargs=setenv bootargs console=${console},${baudrate} " \
|
|
|
|
+ "${optargs} " \
|
|
|
|
+ "root=${mmcroot} " \
|
|
|
|
+ "video=${video}\0" \
|
|
|
|
+ "loadbootenv=load mmc ${mmcdev}:${mmcpart} ${loadaddr} /boot/uEnv.txt\0" \
|
|
|
|
+ "importbootenv=echo Importing environment from mmc (uEnv.txt)...; " \
|
|
|
|
+ "env import -t $loadaddr $filesize\0" \
|
|
|
|
+ "loadscript=load mmc ${mmcdev}:${mmcpart} ${scriptaddr} /boot/script.bin\0" \
|
|
|
|
+ "loaduimage=load mmc ${mmcdev}:${mmcpart} ${loadaddr} /boot/uImage\0" \
|
2014-06-12 02:07:36 +00:00
|
|
|
+ "loadzimage=load mmc ${mmcdev}:${mmcpart} ${loadaddr} /boot/zImage\0" \
|
|
|
|
+ "loadfdt=load mmc ${mmcdev}:${mmcpart} ${fdt_addr} /boot/dtbs/${fdt_file}\0" \
|
2014-06-09 02:41:34 +00:00
|
|
|
+ "mmcbootm=echo Booting from mmc ...; " \
|
|
|
|
+ "run mmcargs; " \
|
|
|
|
+ RESET_WATCHDOG ";" \
|
|
|
|
+ "bootm ${loadaddr};\0" \
|
2014-06-12 02:07:36 +00:00
|
|
|
+ "mmcbootz=echo Booting from mmc ...; " \
|
|
|
|
+ "run mmcargs; " \
|
|
|
|
+ RESET_WATCHDOG ";" \
|
|
|
|
+ "bootz ${loadaddr} - ${fdt_addr};\0" \
|
2014-06-09 02:41:34 +00:00
|
|
|
"boot_ram=" \
|
|
|
|
"saved_stdout=$stdout;setenv stdout nc;"\
|
|
|
|
"if iminfo 0x41000000; then" \
|
2014-06-12 02:29:05 +00:00
|
|
|
@@ -238,9 +194,33 @@
|
2014-06-09 02:41:34 +00:00
|
|
|
" source 0x41000000;" \
|
|
|
|
"else" \
|
|
|
|
" setenv stdout $saved_stdout;" \
|
|
|
|
- "fi" \
|
|
|
|
- "\0" \
|
|
|
|
- ""
|
|
|
|
+ "fi;\0"
|
|
|
|
+
|
|
|
|
+#define CONFIG_BOOTCOMMAND \
|
|
|
|
+ "run boot_ram;" \
|
|
|
|
+ "mmc dev ${mmcdev};" \
|
|
|
|
+ "if mmc rescan; then " \
|
|
|
|
+ "echo SD/MMC found on device ${mmcdev};" \
|
|
|
|
+ "if run loadbootenv; then " \
|
|
|
|
+ "run importbootenv;" \
|
|
|
|
+ "fi;" \
|
|
|
|
+ "echo Checking if uenvcmd is set ...;" \
|
|
|
|
+ "if test -n $uenvcmd; then " \
|
|
|
|
+ "echo Running uenvcmd ...;" \
|
|
|
|
+ "run uenvcmd;" \
|
|
|
|
+ "fi;" \
|
|
|
|
+ "echo Running default loaduimage ...;" \
|
|
|
|
+ "if run loaduimage; then " \
|
|
|
|
+ "run loadscript;" \
|
|
|
|
+ "run mmcbootm;" \
|
|
|
|
+ "fi;" \
|
2014-06-12 02:07:36 +00:00
|
|
|
+ "echo Running default loadzimage ...;" \
|
|
|
|
+ "if run loadzimage; then " \
|
|
|
|
+ "if run loadfdt; then " \
|
|
|
|
+ "run mmcbootz;" \
|
|
|
|
+ "fi;" \
|
|
|
|
+ "fi;" \
|
2014-06-09 02:41:34 +00:00
|
|
|
+ "fi;"
|
|
|
|
|
|
|
|
#define CONFIG_SYS_BOOT_GET_CMDLINE
|
2014-06-07 20:40:28 +00:00
|
|
|
|