2016-09-24 21:20:31 +00:00
|
|
|
From 446af39a88aa7a8f63a2e484df8bb828851e47ec Mon Sep 17 00:00:00 2001
|
2015-01-03 21:49:40 +00:00
|
|
|
From: Kevin Mihelich <kevin@archlinuxarm.org>
|
2016-09-24 21:20:31 +00:00
|
|
|
Date: Tue, 26 Jul 2016 21:28:27 -0600
|
2015-01-03 21:49:40 +00:00
|
|
|
Subject: [PATCH] arch linux arm modifications
|
|
|
|
|
|
|
|
---
|
2016-09-24 21:20:31 +00:00
|
|
|
include/configs/udoo.h | 103 +++++++++++++++++++++++--------------------------
|
|
|
|
1 file changed, 49 insertions(+), 54 deletions(-)
|
2015-01-03 21:49:40 +00:00
|
|
|
|
|
|
|
diff --git a/include/configs/udoo.h b/include/configs/udoo.h
|
2016-09-24 21:20:31 +00:00
|
|
|
index fba78d0..b96f490 100644
|
2015-01-03 21:49:40 +00:00
|
|
|
--- a/include/configs/udoo.h
|
|
|
|
+++ b/include/configs/udoo.h
|
2016-09-24 21:20:31 +00:00
|
|
|
@@ -18,6 +18,8 @@
|
|
|
|
#define MACH_TYPE_UDOO 4800
|
|
|
|
#define CONFIG_MACH_TYPE MACH_TYPE_UDOO
|
2015-01-03 21:49:40 +00:00
|
|
|
|
|
|
|
+#define CONFIG_IDENT_STRING " Arch Linux ARM"
|
|
|
|
+
|
2016-09-24 21:20:31 +00:00
|
|
|
/* Size of malloc() pool */
|
|
|
|
#define CONFIG_SYS_MALLOC_LEN (2 * SZ_1M)
|
|
|
|
|
|
|
|
@@ -63,7 +65,6 @@
|
|
|
|
#define CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG
|
2015-01-03 21:49:40 +00:00
|
|
|
|
|
|
|
#define CONFIG_EXTRA_ENV_SETTINGS \
|
|
|
|
- "script=boot.scr\0" \
|
2016-09-24 21:20:31 +00:00
|
|
|
"image=zImage\0" \
|
|
|
|
"console=ttymxc1\0" \
|
2015-01-03 21:49:40 +00:00
|
|
|
"splashpos=m,m\0" \
|
2016-09-24 21:20:31 +00:00
|
|
|
@@ -71,47 +72,50 @@
|
2015-01-03 21:49:40 +00:00
|
|
|
"initrd_high=0xffffffff\0" \
|
2016-09-24 21:20:31 +00:00
|
|
|
"fdt_file=undefined\0" \
|
|
|
|
"fdt_addr=0x18000000\0" \
|
2015-01-03 21:49:40 +00:00
|
|
|
- "boot_fdt=try\0" \
|
2016-09-24 21:20:31 +00:00
|
|
|
+ "rdaddr=0x12A00000\0" \
|
|
|
|
+ "rdfile=initramfs-linux.img\0" \
|
2015-01-03 21:49:40 +00:00
|
|
|
+ "optargs=\0" \
|
|
|
|
+ "video=\0" \
|
2016-09-24 21:20:31 +00:00
|
|
|
"ip_dyn=yes\0" \
|
2015-01-03 21:49:40 +00:00
|
|
|
"mmcdev=0\0" \
|
2016-09-24 21:20:31 +00:00
|
|
|
"mmcpart=1\0" \
|
2015-01-03 21:49:40 +00:00
|
|
|
- "mmcroot=/dev/mmcblk0p2 rootwait rw\0" \
|
|
|
|
- "update_sd_firmware_filename=u-boot.imx\0" \
|
|
|
|
- "update_sd_firmware=" \
|
|
|
|
- "if test ${ip_dyn} = yes; then " \
|
|
|
|
- "setenv get_cmd dhcp; " \
|
2016-09-24 21:20:31 +00:00
|
|
|
- "else " \
|
2015-01-03 21:49:40 +00:00
|
|
|
- "setenv get_cmd tftp; " \
|
2016-09-24 21:20:31 +00:00
|
|
|
- "fi; " \
|
2015-01-03 21:49:40 +00:00
|
|
|
- "if mmc dev ${mmcdev}; then " \
|
|
|
|
- "if ${get_cmd} ${update_sd_firmware_filename}; then " \
|
|
|
|
- "setexpr fw_sz ${filesize} / 0x200; " \
|
|
|
|
- "setexpr fw_sz ${fw_sz} + 1; " \
|
|
|
|
- "mmc write ${loadaddr} 0x2 ${fw_sz}; " \
|
|
|
|
- "fi; " \
|
|
|
|
- "fi\0" \
|
2016-09-24 21:20:31 +00:00
|
|
|
+ "mmcroot=/dev/mmcblk0p1 rootwait rw\0" \
|
|
|
|
"mmcargs=setenv bootargs console=${console},${baudrate} " \
|
2015-01-03 21:49:40 +00:00
|
|
|
- "root=${mmcroot}\0" \
|
|
|
|
- "loadbootscript=" \
|
2016-09-24 21:20:31 +00:00
|
|
|
- "load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
|
2015-01-03 21:49:40 +00:00
|
|
|
- "bootscript=echo Running bootscript from mmc ...; " \
|
|
|
|
- "source\0" \
|
2016-09-24 21:20:31 +00:00
|
|
|
- "loadimage=load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \
|
|
|
|
- "loadfdt=load mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
|
2015-01-03 21:49:40 +00:00
|
|
|
- "mmcboot=echo Booting from mmc ...; " \
|
|
|
|
- "run mmcargs; " \
|
|
|
|
- "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
|
|
|
|
- "if run loadfdt; then " \
|
|
|
|
- "bootz ${loadaddr} - ${fdt_addr}; " \
|
2016-09-24 21:20:31 +00:00
|
|
|
- "else " \
|
2015-01-03 21:49:40 +00:00
|
|
|
- "if test ${boot_fdt} = try; then " \
|
|
|
|
- "bootz; " \
|
|
|
|
- "else " \
|
|
|
|
- "echo WARN: Cannot load the DT; " \
|
|
|
|
- "fi; " \
|
2016-09-24 21:20:31 +00:00
|
|
|
+ "${optargs} " \
|
|
|
|
+ "root=${mmcroot} " \
|
|
|
|
+ "video=${video}\0" \
|
|
|
|
+ "loadimage=echo Loading /boot/${image}..; load mmc ${mmcdev}:${mmcpart} ${loadaddr} /boot/${image}\0" \
|
|
|
|
+ "loadfdt=echo Loading /boot/dtbs/${fdt_file}..; load mmc ${mmcdev}:${mmcpart} ${fdt_addr} /boot/dtbs/${fdt_file}\0" \
|
|
|
|
+ "loadrd=load mmc ${bootpart} ${rdaddr} /boot/${rdfile}\0" \
|
2015-01-03 21:49:40 +00:00
|
|
|
+ "mmcboot=mmc dev ${mmcdev}; " \
|
|
|
|
+ "if mmc rescan; then " \
|
|
|
|
+ "echo SD/MMC found on device ${mmcdev};" \
|
|
|
|
+ "setenv bootpart ${mmcdev}:1; " \
|
|
|
|
+ "echo Checking for: ${bootdir}/uEnv.txt ...;" \
|
|
|
|
+ "if test -e mmc ${bootpart} ${bootdir}/uEnv.txt; then " \
|
|
|
|
+ "load mmc ${bootpart} ${loadaddr} ${bootdir}/uEnv.txt;" \
|
|
|
|
+ "env import -t ${loadaddr} ${filesize};" \
|
|
|
|
+ "echo Loaded environment from ${bootdir}/uEnv.txt;" \
|
|
|
|
+ "echo Checking if uenvcmd is set ...;" \
|
|
|
|
+ "if test -n ${uenvcmd}; then " \
|
|
|
|
+ "echo Running uenvcmd ...;" \
|
|
|
|
+ "run uenvcmd;" \
|
|
|
|
+ "fi;" \
|
2016-09-24 21:20:31 +00:00
|
|
|
"fi; " \
|
|
|
|
- "else " \
|
|
|
|
- "bootz; " \
|
2015-01-03 21:49:40 +00:00
|
|
|
+ "if run loadimage; then " \
|
|
|
|
+ "if run loadfdt; then " \
|
|
|
|
+ "run mmcargs;" \
|
|
|
|
+ "if run loadrd; then " \
|
2016-09-24 21:20:31 +00:00
|
|
|
+ "bootz ${loadaddr} ${rdaddr}:${filesize} ${fdt_addr};" \
|
2015-01-03 21:49:40 +00:00
|
|
|
+ "else " \
|
2016-09-24 21:20:31 +00:00
|
|
|
+ "bootz ${loadaddr} - ${fdt_addr};" \
|
2015-01-03 21:49:40 +00:00
|
|
|
+ "fi;" \
|
|
|
|
+ "else " \
|
|
|
|
+ "echo Kernel found, but no device tree found;" \
|
|
|
|
+ "fi;" \
|
|
|
|
+ "else " \
|
|
|
|
+ "echo No kernel found;" \
|
|
|
|
+ "fi;" \
|
|
|
|
"fi;\0" \
|
|
|
|
"netargs=setenv bootargs console=${console},${baudrate} " \
|
|
|
|
"root=/dev/nfs " \
|
2016-09-24 21:20:31 +00:00
|
|
|
@@ -137,26 +141,17 @@
|
2015-01-03 21:49:40 +00:00
|
|
|
"else " \
|
2016-09-24 21:20:31 +00:00
|
|
|
"bootz; " \
|
|
|
|
"fi;\0" \
|
|
|
|
- "findfdt=" \
|
|
|
|
- "if test $board_rev = MX6Q ; then " \
|
|
|
|
- "setenv fdt_file imx6q-udoo.dtb; fi; " \
|
|
|
|
- "if test $board_rev = MX6DL ; then " \
|
|
|
|
- "setenv fdt_file imx6dl-udoo.dtb; fi; " \
|
|
|
|
- "if test $fdt_file = undefined; then " \
|
|
|
|
- "echo WARNING: Could not determine dtb to use; fi; \0"
|
|
|
|
+ "findfdt=" \
|
|
|
|
+ "if test $board_rev = MX6Q ; then " \
|
|
|
|
+ "setenv fdt_file imx6q-udoo.dtb; fi; " \
|
|
|
|
+ "if test $board_rev = MX6DL ; then " \
|
|
|
|
+ "setenv fdt_file imx6dl-udoo.dtb; fi; " \
|
|
|
|
+ "if test $fdt_file = undefined; then " \
|
|
|
|
+ "echo WARNING: Could not determine dtb to use; fi; \0"
|
2015-01-03 21:49:40 +00:00
|
|
|
|
|
|
|
#define CONFIG_BOOTCOMMAND \
|
2016-09-24 21:20:31 +00:00
|
|
|
"run findfdt; " \
|
2015-01-03 21:49:40 +00:00
|
|
|
- "mmc dev ${mmcdev}; if mmc rescan; then " \
|
|
|
|
- "if run loadbootscript; then " \
|
|
|
|
- "run bootscript; " \
|
|
|
|
- "else " \
|
|
|
|
- "if run loadimage; then " \
|
|
|
|
- "run mmcboot; " \
|
|
|
|
- "else run netboot; " \
|
|
|
|
- "fi; " \
|
|
|
|
- "fi; " \
|
|
|
|
- "else run netboot; fi"
|
2016-09-24 21:20:31 +00:00
|
|
|
+ "run mmcboot; "
|
2015-01-03 21:49:40 +00:00
|
|
|
|
2016-09-24 21:20:31 +00:00
|
|
|
/* Print Buffer Size */
|
|
|
|
#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
|
2015-01-03 21:49:40 +00:00
|
|
|
--
|
2016-09-24 21:20:31 +00:00
|
|
|
2.10.0
|
2015-01-03 21:49:40 +00:00
|
|
|
|