diff options
| author | Nathan Rossi <nathan@nathanrossi.com> | 2016-11-04 21:56:53 +1000 |
|---|---|---|
| committer | Nathan Rossi <nathan@nathanrossi.com> | 2017-02-16 13:56:55 +1000 |
| commit | 064b144ca332942487a9ab6de0a892987b4307ef (patch) | |
| tree | dbd0cb54b95d1f43fd701ea610eca6157ed0ea2e /recipes-bsp/u-boot | |
| parent | 5032ae24c8337cca287cc1075515e3320e05fb4c (diff) | |
| download | meta-xilinx-064b144ca332942487a9ab6de0a892987b4307ef.tar.gz | |
u-boot-xlnx: For ZynqMP setup auto-boot for JTAG loading
When booting a ZynqMP machine configured to boot from JTAG, setup U-Boot
to attempt to automatically load the kernel, rootfs and device tree from
default memory locations.
This enables auto-booting for QEMU allowing for a completely automated
boot up when using qemu-xilinx.
Note the patch in this change is not acceptable for upstreaming in its
current form. The upstream maintainer would however accept a similar
change that uses FIT instead of individual components.
Signed-off-by: Nathan Rossi <nathan@nathanrossi.com>
Reviewed-by: Alistair Francis <alistair.francis@xilinx.com>
Diffstat (limited to 'recipes-bsp/u-boot')
| -rw-r--r-- | recipes-bsp/u-boot/u-boot-xlnx/arm-zynqmp-xilinx_zynqmp.h-Auto-boot-in-JTAG-if-imag.patch | 48 | ||||
| -rw-r--r-- | recipes-bsp/u-boot/u-boot-xlnx_2016.4.bb | 1 |
2 files changed, 49 insertions, 0 deletions
diff --git a/recipes-bsp/u-boot/u-boot-xlnx/arm-zynqmp-xilinx_zynqmp.h-Auto-boot-in-JTAG-if-imag.patch b/recipes-bsp/u-boot/u-boot-xlnx/arm-zynqmp-xilinx_zynqmp.h-Auto-boot-in-JTAG-if-imag.patch new file mode 100644 index 00000000..08a0a205 --- /dev/null +++ b/recipes-bsp/u-boot/u-boot-xlnx/arm-zynqmp-xilinx_zynqmp.h-Auto-boot-in-JTAG-if-imag.patch | |||
| @@ -0,0 +1,48 @@ | |||
| 1 | From 9d44bd18191a56331273beb7c26b18afe154c82c Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Nathan Rossi <nathan@nathanrossi.com> | ||
| 3 | Date: Fri, 4 Nov 2016 21:33:14 +1000 | ||
| 4 | Subject: [PATCH] arm: zynqmp: xilinx_zynqmp.h: Auto boot in JTAG if images in | ||
| 5 | memory | ||
| 6 | |||
| 7 | Add a command that checks if the Kernel image (in aarch64 Image format) | ||
| 8 | and optionally a rootfs is in memory and automatically boot these images | ||
| 9 | if in JTAG boot mode. | ||
| 10 | |||
| 11 | This allows for simpler boot automation in JTAG boot environments | ||
| 12 | (including QEMU) where manual interaction would otherwise be required. | ||
| 13 | |||
| 14 | Signed-off-by: Nathan Rossi <nathan@nathanrossi.com> | ||
| 15 | Upstream-Status: Denied [Upstream prefers FIT instead] | ||
| 16 | --- | ||
| 17 | include/configs/xilinx_zynqmp.h | 8 +++++--- | ||
| 18 | 1 file changed, 5 insertions(+), 3 deletions(-) | ||
| 19 | |||
| 20 | diff --git a/include/configs/xilinx_zynqmp.h b/include/configs/xilinx_zynqmp.h | ||
| 21 | index 4714b3317d..0441f3f24f 100644 | ||
| 22 | --- a/include/configs/xilinx_zynqmp.h | ||
| 23 | +++ b/include/configs/xilinx_zynqmp.h | ||
| 24 | @@ -246,8 +246,10 @@ | ||
| 25 | "run xen_prepare_dt_qemu && " \ | ||
| 26 | "tftpb 6000000 xen.ub && tftpb 0x1000000 image.ub && " \ | ||
| 27 | "bootm 6000000 0x1000000 $fdt_addr\0" \ | ||
| 28 | - "jtagboot=tftpboot 80000 Image && tftpboot $fdt_addr system.dtb && " \ | ||
| 29 | - "tftpboot 6000000 rootfs.cpio.ub && booti 80000 6000000 $fdt_addr\0" \ | ||
| 30 | + "jtagmemboot=if itest.w *0x80038 == 0x644d5241; then if iminfo 0x6000000; then booti 0x80000 0x6000000 $fdt_addr; else booti 0x80000 - $fdt_addr; fi; fi\0" \ | ||
| 31 | + "jtagboot=run jtagmemboot && " \ | ||
| 32 | + "tftpboot 80000 Image && tftpboot $fdt_addr system.dtb && " \ | ||
| 33 | + "tftpboot 6000000 rootfs.cpio.ub && booti 80000 6000000 $fdt_addr\0" \ | ||
| 34 | "nosmp=setenv bootargs $bootargs maxcpus=1\0" \ | ||
| 35 | "nfsroot=setenv bootargs $bootargs root=/dev/nfs nfsroot=$serverip:/mnt/sata,tcp ip=$ipaddr:$serverip:$serverip:255.255.255.0:zynqmp:eth0:off rw\0" \ | ||
| 36 | "sdroot0=setenv bootargs $bootargs root=/dev/mmcblk0p2 rw rootwait\0" \ | ||
| 37 | @@ -269,7 +271,7 @@ | ||
| 38 | |||
| 39 | /* Do not preserve environment */ | ||
| 40 | #define CONFIG_ENV_IS_NOWHERE 1 | ||
| 41 | -#define CONFIG_ENV_SIZE 0x1000 | ||
| 42 | +#define CONFIG_ENV_SIZE 0x2000 | ||
| 43 | |||
| 44 | /* Monitor Command Prompt */ | ||
| 45 | /* Console I/O Buffer Size */ | ||
| 46 | -- | ||
| 47 | 2.11.0 | ||
| 48 | |||
diff --git a/recipes-bsp/u-boot/u-boot-xlnx_2016.4.bb b/recipes-bsp/u-boot/u-boot-xlnx_2016.4.bb index fc5b45b1..5f385376 100644 --- a/recipes-bsp/u-boot/u-boot-xlnx_2016.4.bb +++ b/recipes-bsp/u-boot/u-boot-xlnx_2016.4.bb | |||
| @@ -12,6 +12,7 @@ SRC_URI_append = " \ | |||
| 12 | file://0001-fdt-add-memory-bank-decoding-functions-for-board-set.patch \ | 12 | file://0001-fdt-add-memory-bank-decoding-functions-for-board-set.patch \ |
| 13 | file://0002-ARM-zynq-Replace-board-specific-with-generic-memory-.patch \ | 13 | file://0002-ARM-zynq-Replace-board-specific-with-generic-memory-.patch \ |
| 14 | file://0003-ARM64-zynqmp-Replace-board-specific-with-generic-mem.patch \ | 14 | file://0003-ARM64-zynqmp-Replace-board-specific-with-generic-mem.patch \ |
| 15 | file://arm-zynqmp-xilinx_zynqmp.h-Auto-boot-in-JTAG-if-imag.patch \ | ||
| 15 | " | 16 | " |
| 16 | 17 | ||
| 17 | SRC_URI_append_kc705-microblazeel = " file://microblaze-kc705-Convert-microblaze-generic-to-k.patch" | 18 | SRC_URI_append_kc705-microblazeel = " file://microblaze-kc705-Convert-microblaze-generic-to-k.patch" |
