Commit 6b79f71c8ee970635ac71d7a452d6b39a3db0e99

Authored by Christopher Spinrath
Committed by Stefano Babic
1 parent af104ae5b8

ARM: imx: cm_fx6: env: use standard variables

In preparation for supporting the distro boot command, introduce the
standard variables for specifying load addresses, which are documented
in README and doc/README.distro, and replace the custom variables
used so far with them.

Since the current address layout disregards an address for an initramfs,
also switch to the load addresses used and proven by other imx6 boards
(e.g. the wandboard and nitrogen6x), instead of going on with our own
way.

Signed-off-by: Christopher Spinrath <christopher.spinrath@rwth-aachen.de>
Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>

Showing 1 changed file with 16 additions and 12 deletions Side-by-side Diff

include/configs/cm_fx6.h
... ... @@ -63,6 +63,13 @@
63 63 #define CONFIG_ENV_OFFSET (768 * 1024)
64 64  
65 65 #define CONFIG_EXTRA_ENV_SETTINGS \
  66 + "fdt_high=0xffffffff\0" \
  67 + "initrd_high=0xffffffff\0" \
  68 + "fdt_addr_r=0x18000000\0" \
  69 + "ramdisk_addr_r=0x13000000\0" \
  70 + "kernel_addr_r=" __stringify(CONFIG_LOADADDR) "\0" \
  71 + "pxefile_addr_r=" __stringify(CONFIG_LOADADDR) "\0" \
  72 + "scriptaddr=" __stringify(CONFIG_LOADADDR) "\0" \
66 73 "stdin=serial,usbkbd\0" \
67 74 "stdout=serial,vga\0" \
68 75 "stderr=serial,vga\0" \
69 76  
70 77  
71 78  
... ... @@ -73,22 +80,19 @@
73 80 "kernel=uImage-cm-fx6\0" \
74 81 "script=boot.scr\0" \
75 82 "dtb=cm-fx6.dtb\0" \
76   - "bootm_low=18000000\0" \
77   - "loadaddr=0x10800000\0" \
78   - "fdtaddr=0x11000000\0" \
79 83 "console=ttymxc3,115200\0" \
80 84 "ethprime=FEC0\0" \
81 85 "video_hdmi=mxcfb0:dev=hdmi,1920x1080M-32@50,if=RGB32\0" \
82 86 "video_dvi=mxcfb0:dev=dvi,1280x800M-32@50,if=RGB32\0" \
83   - "doboot=bootm ${loadaddr}r}\0" \" \
  87 + "doboot=bootm ${kernel_addr_r}r}\0" \" \
84 88 "doloadfdt=false\0" \
85 89 "mtdids=" CONFIG_MTDIDS_DEFAULT "\0" \
86 90 "mtdparts=" CONFIG_MTDPARTS_DEFAULT "\0" \
87 91 "setboottypez=setenv kernel ${zImage};" \
88   - "setenv doboot bootz ${loadaddr} - ${fdtaddr};" \
  92 + "setenv doboot bootz ${kernel_addr_r} - ${fdt_addr_r};" \
89 93 "setenv doloadfdt true;\0" \
90 94 "setboottypem=setenv kernel ${uImage};" \
91   - "setenv doboot bootm ${loadaddr};" \
  95 + "setenv doboot bootm ${kernel_addr_r};" \
92 96 "setenv doloadfdt false;\0"\
93 97 "mmcroot=/dev/mmcblk0p2 rw rootwait\0" \
94 98 "sataroot=/dev/sda2 rw rootwait\0" \
95 99  
... ... @@ -112,13 +116,13 @@
112 116 "run_eboot=echo Starting EBOOT ...; "\
113 117 "mmc dev 2 && " \
114 118 "mmc rescan && mmc read 10042000 a 400 && go 10042000\0" \
115   - "loadscript=load ${storagetype} ${storagedev} ${loadaddr} ${script};\0"\
116   - "loadkernel=load ${storagetype} ${storagedev} ${loadaddr} ${kernel};\0"\
117   - "loadfdt=load ${storagetype} ${storagedev} ${fdtaddr} ${dtb};\0" \
  119 + "loadscript=load ${storagetype} ${storagedev} ${scriptaddr} ${script};\0"\
  120 + "loadkernel=load ${storagetype} ${storagedev} ${kernel_addr_r} ${kernel};\0"\
  121 + "loadfdt=load ${storagetype} ${storagedev} ${fdt_addr_r} ${dtb};\0" \
118 122 "bootscript=echo Running bootscript from ${storagetype} ...;" \
119   - "source ${loadaddr};\0" \
120   - "nandloadkernel=nand read ${loadaddr} 0 780000;\0" \
121   - "nandloadfdt=nand read ${fdtaddr} 780000 80000;\0" \
  123 + "source ${scriptaddr};\0" \
  124 + "nandloadkernel=nand read ${kernel_addr_r} 0 780000;\0" \
  125 + "nandloadfdt=nand read ${fdt_addr_r} 780000 80000;\0" \
122 126 "setupmmcboot=setenv storagetype mmc; setenv storagedev 2;\0" \
123 127 "setupsataboot=setenv storagetype sata; setenv storagedev 0;\0" \
124 128 "setupnandboot=setenv storagetype nand;\0" \