1/* SPDX-License-Identifier: GPL-2.0+ */ 2 3/* environment for Raspberry Pi boards */ 4 5dhcpuboot=usb start; dhcp u-boot.uimg; bootm 6 7/* Environment */ 8stdin=serial,usbkbd 9stdout=serial,vidconsole 10stderr=serial,vidconsole 11 12/* DFU over USB/UDC */ 13#ifdef CONFIG_CMD_DFU 14dfu_alt_info=u-boot.bin fat 0 1;uboot.env fat 0 1; 15 config.txt fat 0 1; 16#ifdef CONFIG_ARM64 17dfu_alt_info+=Image fat 0 1 18#else 19dfu_alt_info+=zImage fat 0 1 20#endif 21#endif /* CONFIG_CMD_DFU */ 22 23/* 24 * Memory layout for where various images get loaded by boot scripts: 25 * 26 * I suspect address 0 is used as the SMP pen on the RPi2, so avoid this. 27 * 28 * Older versions of the boot firmware place the firmware-loaded DTB at 0x100, 29 * newer versions place it in high memory. So prevent U-Boot from doing its own 30 * DTB + initrd relocation so that we won't accidentally relocate the initrd 31 * over the firmware-loaded DTB and generally try to lay out things starting 32 * from the bottom of RAM. 33 * 34 * kernel_addr_r has different constraints on ARM and Aarch64. For 32-bit ARM, 35 * it must be within the first 128M of RAM in order for the kernel's 36 * CONFIG_AUTO_ZRELADDR option to work. The kernel itself will be decompressed 37 * to 0x8000 but the decompressor clobbers 0x4000-0x8000 as well. The 38 * decompressor also likes to relocate itself to right past the end of the 39 * decompressed kernel, so in total the sum of the compressed and 40 * decompressed kernel needs to be reserved. 41 * 42 * For Aarch64, the kernel image is uncompressed and must be loaded at 43 * text_offset bytes (specified in the header of the Image) into a 2MB 44 * boundary. The 'booti' command relocates the image if necessary. Linux uses 45 * a default text_offset of 0x80000. In summary, loading at 0x80000 46 * satisfies all these constraints and reserving memory up to 0x02400000 47 * permits fairly large (roughly 36M) kernels. 48 * 49 * scriptaddr and pxefile_addr_r can be pretty much anywhere that doesn't 50 * conflict with something else. Reserving 1M for each of them at 51 * 0x05400000-0x05500000 and 0x05500000-0x05600000 should be plenty. 52 * 53 * On ARM, both the DTB and any possible initrd must be loaded such that they 54 * fit inside the lowmem mapping in Linux. In practice, this usually means not 55 * more than ~700M away from the start of the kernel image but this number can 56 * be larger OR smaller depending on e.g. the 'vmalloc=xxxM' command line 57 * parameter given to the kernel. So reserving memory from low to high 58 * satisfies this constraint again. Reserving 1M at 0x05600000-0x05700000 for 59 * the DTB leaves rest of the free RAM to the initrd starting at 0x05700000. 60 * This means that the board must have at least 128MB of RAM available to 61 * U-Boot, more if the initrd is large. 62 * 63 * For compressed kernels, the maximum size is just under 32MB, with an area for 64 * decompression at 0x02000000 with space for 52MB, which is plenty for current 65 * kernels. 66 * 67 * limit bootm_size to 512MB so that all boot images stay within the bottom 68 * 512MB of memory 69 */ 70bootm_size=0x20000000 71 72kernel_addr_r=0x00080000 73kernel_comp_addr_r=0x02000000 74kernel_comp_size=0x03400000 75scriptaddr=0x05400000 76pxefile_addr_r=0x05500000 77fdt_addr_r=0x05600000 78ramdisk_addr_r=0x05700000 79 80boot_targets=mmc usb pxe dhcp 81