From ff573490833587ad9b78d56bb17ac596584e7d39 Mon Sep 17 00:00:00 2001 From: Kevin Mihelich Date: Sat, 31 Oct 2015 10:05:29 -0600 Subject: [PATCH] arch linux arm modifications Signed-off-by: Kevin Mihelich --- include/configs/mx23_olinuxino.h | 131 +++++++++++++++++---------------------- 1 file changed, 58 insertions(+), 73 deletions(-) diff --git a/include/configs/mx23_olinuxino.h b/include/configs/mx23_olinuxino.h index 7747258..7bfbd24 100644 --- a/include/configs/mx23_olinuxino.h +++ b/include/configs/mx23_olinuxino.h @@ -17,6 +17,16 @@ #define CONFIG_CMD_LED +/* 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_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 */ @@ -63,85 +73,60 @@ /* 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 -- 2.9.3