alarm/uboot-sunxi to 2014.04-3

This commit is contained in:
Kevin Mihelich 2014-06-09 02:41:34 +00:00
parent 2964c5fde2
commit 3f3060e7e2
2 changed files with 170 additions and 78 deletions

View file

@ -7,7 +7,7 @@ pkgbase=uboot-sunxi
pkgname=('uboot-cubieboard2' 'uboot-cubietruck' 'uboot-iteaduino_plus_a10' 'uboot-iteaduino_plus_a20'
'uboot-hackberry')
pkgver=2014.04
pkgrel=2
pkgrel=3
arch=('armv7h')
url="https://github.com/linux-sunxi/u-boot-sunxi/tree/sunxi-current"
license=('GPL')
@ -22,7 +22,7 @@ source=("https://github.com/linux-sunxi/u-boot-sunxi/archive/${_commit}.tar.gz"
'iteaduino_plus_a20.fex' 'iteaduino_plus_a20.env'
'hackberry.fex' 'hackberry.env')
md5sums=('8e4f2a2c1384f31eca5d3864b86e8351'
'9e9f1cb9c1b069b8ad9c0e522fb139aa'
'e1a60073a996b95f3e3f3fd07239e2e6'
'36c04988cecd53151f3f5ff5c48d76a9'
'd41d8cd98f00b204e9800998ecf8427e'
'c898ab1b57f474d620f5704b2a53d87c'
@ -30,6 +30,8 @@ md5sums=('8e4f2a2c1384f31eca5d3864b86e8351'
'1bd3355ad6c6c6976c664223958db3f4'
'd41d8cd98f00b204e9800998ecf8427e'
'4b85ce18f33c9b4a6338fa973df44f54'
'd41d8cd98f00b204e9800998ecf8427e'
'd19b25217059a2594c53ffe0eb1e0a12'
'd41d8cd98f00b204e9800998ecf8427e')
prepare() {
@ -112,15 +114,3 @@ package_uboot-hackberry() {
fex2bin hackberry.fex "${pkgdir}"/boot/script.bin
cp hackberry.env "${pkgdir}"/boot/uEnv.txt
}
md5sums=('8e4f2a2c1384f31eca5d3864b86e8351'
'9e9f1cb9c1b069b8ad9c0e522fb139aa'
'36c04988cecd53151f3f5ff5c48d76a9'
'd41d8cd98f00b204e9800998ecf8427e'
'c898ab1b57f474d620f5704b2a53d87c'
'd41d8cd98f00b204e9800998ecf8427e'
'1bd3355ad6c6c6976c664223958db3f4'
'd41d8cd98f00b204e9800998ecf8427e'
'4b85ce18f33c9b4a6338fa973df44f54'
'd41d8cd98f00b204e9800998ecf8427e'
'd19b25217059a2594c53ffe0eb1e0a12'
'd41d8cd98f00b204e9800998ecf8427e')

View file

@ -1,67 +1,6 @@
diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h
index a0c41ac..e9a94f6 100644
--- a/include/configs/sunxi-common.h
+++ b/include/configs/sunxi-common.h
@@ -157,7 +157,7 @@
#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 */
@@ -215,38 +215,28 @@
"bootscr=boot.scr\0" \
"script=script.bin\0" \
"loadbootscr=" \
- "fatload $device $partition $scriptaddr ${bootscr}" \
- " || " \
- "ext2load $device $partition $scriptaddr boot/${bootscr}" \
+ "load $device $partition $scriptaddr boot/${bootscr}" \
" ||" \
- "ext2load $device $partition $scriptaddr ${bootscr}" \
+ "load $device $partition $scriptaddr ${bootscr}" \
"\0" \
"loadbootenv=" \
- "fatload $device $partition $scriptaddr ${bootenv}" \
- " || " \
- "ext2load $device $partition $scriptaddr boot/${bootenv}" \
+ "load $device $partition $scriptaddr boot/${bootenv}" \
" || " \
- "ext2load $device $partition $scriptaddr ${bootenv}" \
+ "load $device $partition $scriptaddr ${bootenv}" \
"\0" \
"loadkernel=" \
"if "\
"bootpath=/boot/" \
" && " \
- "ext2load $device $partition 0x43000000 ${bootpath}${script}" \
- " && " \
- "ext2load $device $partition 0x48000000 ${bootpath}${kernel}" \
- ";then true; elif " \
- "bootpath=/" \
- " && " \
- "fatload $device $partition 0x43000000 ${script}" \
+ "load $device $partition 0x43000000 ${bootpath}${script}" \
" && " \
- "fatload $device $partition 0x48000000 ${kernel}" \
+ "load $device $partition 0x48000000 ${bootpath}${kernel}" \
";then true; elif " \
"bootpath=/" \
" && " \
- "ext2load $device $partition 0x43000000 ${bootpath}${script}" \
+ "load $device $partition 0x43000000 ${bootpath}${script}" \
" && " \
- "ext2load $device $partition 0x48000000 ${bootpath}${kernel}" \
+ "load $device $partition 0x48000000 ${bootpath}${kernel}" \
";then true; else "\
"false" \
";fi" \
diff --git a/include/config_distro_defaults.h b/include/config_distro_defaults.h
index 5d18a4b..11e655c 100644
--- a/include/config_distro_defaults.h
+++ b/include/config_distro_defaults.h
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
+++ b/include/config_distro_defaults.h 2014-06-08 19:19:11.970699422 -0600
@@ -45,7 +45,7 @@
#define CONFIG_CMDLINE_EDITING
@ -71,3 +10,166 @@ index 5d18a4b..11e655c 100644
#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
+++ b/include/configs/sunxi-common.h 2014-06-08 20:29:05.034915060 -0600
@@ -126,7 +126,7 @@
#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 */
@@ -137,23 +137,6 @@
#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
@@ -162,74 +145,27 @@
#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=" \
- "fatload $device $partition $scriptaddr ${bootscr}" \
- " || " \
- "ext2load $device $partition $scriptaddr boot/${bootscr}" \
- " ||" \
- "ext2load $device $partition $scriptaddr ${bootscr}" \
- "\0" \
- "loadbootenv=" \
- "fatload $device $partition $scriptaddr ${bootenv}" \
- " || " \
- "ext2load $device $partition $scriptaddr boot/${bootenv}" \
- " || " \
- "ext2load $device $partition $scriptaddr ${bootenv}" \
- "\0" \
- "loadkernel=" \
- "if "\
- "bootpath=/boot/" \
- " && " \
- "ext2load $device $partition 0x43000000 ${bootpath}${script}" \
- " && " \
- "ext2load $device $partition 0x48000000 ${bootpath}${kernel}" \
- ";then true; elif " \
- "bootpath=/" \
- " && " \
- "fatload $device $partition 0x43000000 ${script}" \
- " && " \
- "fatload $device $partition 0x48000000 ${kernel}" \
- ";then true; elif " \
- "bootpath=/" \
- " && " \
- "ext2load $device $partition 0x43000000 ${bootpath}${script}" \
- " && " \
- "ext2load $device $partition 0x48000000 ${bootpath}${kernel}" \
- ";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" \
+ "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" \
+ "mmcbootm=echo Booting from mmc ...; " \
+ "run mmcargs; " \
+ RESET_WATCHDOG ";" \
+ "bootm ${loadaddr};\0" \
"boot_ram=" \
"saved_stdout=$stdout;setenv stdout nc;"\
"if iminfo 0x41000000; then" \
@@ -238,9 +174,27 @@
" 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;" \
+ "fi;"
#define CONFIG_SYS_BOOT_GET_CMDLINE