2015-10-31 17:27:57 +00:00
|
|
|
From 2db7b7cd826260180268077b7f22e7380d9b3390 Mon Sep 17 00:00:00 2001
|
2015-06-09 02:05:46 +00:00
|
|
|
From: Kevin Mihelich <kevin@archlinuxarm.org>
|
2015-10-31 17:27:57 +00:00
|
|
|
Date: Sat, 31 Oct 2015 10:05:29 -0600
|
2015-06-09 02:05:46 +00:00
|
|
|
Subject: [PATCH] arch linux arm modifications
|
|
|
|
|
|
|
|
Signed-off-by: Kevin Mihelich <kevin@archlinuxarm.org>
|
|
|
|
---
|
|
|
|
include/configs/mx23_olinuxino.h | 134 ++++++++++++++++++---------------------
|
|
|
|
1 file changed, 60 insertions(+), 74 deletions(-)
|
|
|
|
|
|
|
|
diff --git a/include/configs/mx23_olinuxino.h b/include/configs/mx23_olinuxino.h
|
2015-10-31 17:27:57 +00:00
|
|
|
index 529f73b..3b57a8a 100644
|
2015-06-09 02:05:46 +00:00
|
|
|
--- a/include/configs/mx23_olinuxino.h
|
|
|
|
+++ b/include/configs/mx23_olinuxino.h
|
2015-10-31 17:27:57 +00:00
|
|
|
@@ -24,6 +24,17 @@
|
|
|
|
#define CONFIG_CMD_MMC
|
2015-06-09 02:05:46 +00:00
|
|
|
#define CONFIG_CMD_USB
|
|
|
|
|
|
|
|
+/* Arch Linux ARM extras */
|
|
|
|
+#define CONFIG_IDENT_STRING " Arch Linux ARM"
|
|
|
|
+#define CONFIG_CMD_SETEXPR
|
|
|
|
+#define CONFIG_CMD_PART
|
|
|
|
+#define CONFIG_PARTITION_UUIDS
|
|
|
|
+#define CONFIG_CMD_FAT
|
|
|
|
+#define CONFIG_CMD_EXT4
|
|
|
|
+#define CONFIG_CMD_FS_GENERIC
|
|
|
|
+#define CONFIG_CMD_BOOTZ
|
|
|
|
+#define CONFIG_SUPPORT_RAW_INITRD
|
|
|
|
+
|
|
|
|
/* Memory configuration */
|
|
|
|
#define CONFIG_NR_DRAM_BANKS 1 /* 1 bank of DRAM */
|
|
|
|
#define PHYS_SDRAM_1 0x40000000 /* Base address */
|
2015-10-31 17:27:57 +00:00
|
|
|
@@ -64,92 +75,67 @@
|
2015-06-09 02:05:46 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
/* Booting Linux */
|
|
|
|
-#define CONFIG_BOOTDELAY 3
|
|
|
|
+#define CONFIG_BOOTDELAY 1
|
|
|
|
#define CONFIG_BOOTFILE "uImage"
|
|
|
|
#define CONFIG_LOADADDR 0x42000000
|
|
|
|
#define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR
|
|
|
|
|
|
|
|
/* Extra Environment */
|
|
|
|
#define CONFIG_EXTRA_ENV_SETTINGS \
|
|
|
|
- "update_sd_firmware_filename=u-boot.sd\0" \
|
|
|
|
- "update_sd_firmware=" /* Update the SD firmware partition */ \
|
|
|
|
- "if mmc rescan ; then " \
|
|
|
|
- "if tftp ${update_sd_firmware_filename} ; then " \
|
|
|
|
- "setexpr fw_sz ${filesize} / 0x200 ; " /* SD block size */ \
|
|
|
|
- "setexpr fw_sz ${fw_sz} + 1 ; " \
|
|
|
|
- "mmc write ${loadaddr} 0x800 ${fw_sz} ; " \
|
|
|
|
- "fi ; " \
|
|
|
|
- "fi\0" \
|
|
|
|
- "script=boot.scr\0" \
|
|
|
|
- "uimage=uImage\0" \
|
|
|
|
"console=ttyAMA0\0" \
|
|
|
|
- "fdt_file=imx23-olinuxino.dtb\0" \
|
|
|
|
- "fdt_addr=0x41000000\0" \
|
|
|
|
- "boot_fdt=try\0" \
|
|
|
|
- "ip_dyn=yes\0" \
|
|
|
|
- "mmcdev=0\0" \
|
|
|
|
- "mmcpart=2\0" \
|
|
|
|
- "mmcroot=/dev/mmcblk0p3 rw rootwait\0" \
|
|
|
|
+ "fdtfile=imx23-olinuxino.dtb\0" \
|
|
|
|
+ "fdtaddr=0x41000000\0" \
|
|
|
|
+ "rdfile=initramfs-linux.img\0" \
|
|
|
|
+ "rdaddr=0x42A00000\0" \
|
|
|
|
+ "bootdir=/boot\0" \
|
|
|
|
+ "fdtdir=/boot/dtbs\0" \
|
|
|
|
+ "bootfile=zImage\0" \
|
|
|
|
+ "optargs=\0" \
|
|
|
|
+ "cmdline=\0" \
|
|
|
|
"mmcargs=setenv bootargs console=${console},${baudrate} " \
|
|
|
|
- "root=${mmcroot}\0" \
|
|
|
|
- "loadbootscript=" \
|
|
|
|
- "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
|
|
|
|
- "bootscript=echo Running bootscript from mmc ...; " \
|
|
|
|
- "source\0" \
|
|
|
|
- "loaduimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${uimage}\0" \
|
|
|
|
- "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
|
|
|
|
- "mmcboot=echo Booting from mmc ...; " \
|
|
|
|
- "run mmcargs; " \
|
|
|
|
- "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
|
|
|
|
- "if run loadfdt; then " \
|
|
|
|
- "bootm ${loadaddr} - ${fdt_addr}; " \
|
|
|
|
- "else " \
|
|
|
|
- "if test ${boot_fdt} = try; then " \
|
|
|
|
- "bootm; " \
|
|
|
|
- "else " \
|
|
|
|
- "echo WARN: Cannot load the DT; " \
|
|
|
|
- "fi; " \
|
|
|
|
- "fi; " \
|
|
|
|
- "else " \
|
|
|
|
- "bootm; " \
|
|
|
|
- "fi;\0" \
|
|
|
|
- "netargs=setenv bootargs console=${console},${baudrate} " \
|
|
|
|
- "root=/dev/nfs " \
|
|
|
|
- "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
|
|
|
|
- "netboot=echo Booting from net ...; " \
|
|
|
|
- "usb start; " \
|
|
|
|
- "run netargs; " \
|
|
|
|
- "if test ${ip_dyn} = yes; then " \
|
|
|
|
- "setenv get_cmd dhcp; " \
|
|
|
|
- "else " \
|
|
|
|
- "setenv get_cmd tftp; " \
|
|
|
|
- "fi; " \
|
|
|
|
- "${get_cmd} ${uimage}; " \
|
|
|
|
- "if test ${boot_fdt} = yes; then " \
|
|
|
|
- "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \
|
|
|
|
- "bootm ${loadaddr} - ${fdt_addr}; " \
|
|
|
|
- "else " \
|
|
|
|
- "if test ${boot_fdt} = try; then " \
|
|
|
|
- "bootm; " \
|
|
|
|
+ "${optargs} " \
|
|
|
|
+ "root=${root} " \
|
|
|
|
+ "${cmdline}\0" \
|
|
|
|
+ "loadimage=load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/${bootfile}\0" \
|
|
|
|
+ "loadrd=load ${devtype} ${bootpart} ${rdaddr} ${bootdir}/${rdfile}\0" \
|
|
|
|
+ "loadfdt=echo loading ${fdtdir}/${fdtfile} ...; load ${devtype} ${bootpart} ${fdtaddr} ${fdtdir}/${fdtfile}\0" \
|
|
|
|
+ "mmcboot=usb start;" \
|
|
|
|
+ "for devtype in mmc usb; do " \
|
|
|
|
+ "setenv devnum 0;" \
|
|
|
|
+ "while ${devtype} dev ${devnum}; do " \
|
|
|
|
+ "echo ${devtype} found on device ${devnum};" \
|
|
|
|
+ "if test ${devtype} = mmc; then setenv bootpart ${devnum}:2; else setenv bootpart ${devnum}:1; fi;" \
|
|
|
|
+ "part uuid ${devtype} ${bootpart} uuid;" \
|
|
|
|
+ "setenv root PARTUUID=${uuid} rw rootwait fixrtc;" \
|
|
|
|
+ "echo Checking for: ${bootdir}/uEnv.txt ...;" \
|
|
|
|
+ "if test -e ${devtype} ${bootpart} ${bootdir}/uEnv.txt; then " \
|
|
|
|
+ "load ${devtype} ${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;" \
|
|
|
|
+ "fi;" \
|
|
|
|
+ "if run loadimage; then " \
|
|
|
|
+ "run mmcargs;" \
|
|
|
|
+ "if run loadfdt; then " \
|
|
|
|
+ "if run loadrd; then " \
|
|
|
|
+ "bootz ${loadaddr} ${rdaddr}:${filesize} ${fdtaddr};" \
|
|
|
|
+ "else " \
|
|
|
|
+ "bootz ${loadaddr} - ${fdtaddr};" \
|
|
|
|
+ "fi;" \
|
|
|
|
+ "fi;" \
|
|
|
|
"else " \
|
|
|
|
- "echo WARN: Cannot load the DT; " \
|
|
|
|
+ "echo No kernel found;" \
|
|
|
|
"fi;" \
|
|
|
|
- "fi; " \
|
|
|
|
- "else " \
|
|
|
|
- "bootm; " \
|
|
|
|
- "fi;\0"
|
|
|
|
+ "setexpr devnum ${devnum} + 1;" \
|
|
|
|
+ "done;" \
|
|
|
|
+ "done;\0"
|
|
|
|
|
|
|
|
#define CONFIG_BOOTCOMMAND \
|
|
|
|
- "mmc dev ${mmcdev}; if mmc rescan; then " \
|
|
|
|
- "if run loadbootscript; then " \
|
|
|
|
- "run bootscript; " \
|
|
|
|
- "else " \
|
|
|
|
- "if run loaduimage; then " \
|
|
|
|
- "run mmcboot; " \
|
|
|
|
- "else run netboot; " \
|
|
|
|
- "fi; " \
|
|
|
|
- "fi; " \
|
|
|
|
- "else run netboot; fi"
|
|
|
|
+ "run mmcboot;"
|
|
|
|
|
|
|
|
/* The rest of the configuration is shared */
|
|
|
|
#include <configs/mxs.h>
|
|
|
|
--
|
2015-10-31 17:27:57 +00:00
|
|
|
2.6.1
|
2015-06-09 02:05:46 +00:00
|
|
|
|