reset meta-xilinx subtree on master HEAD(874b9cee5e)

Change-Id: Ic0716e95ff53e7d63c54dc5fce6ee42fc99ed424
diff --git a/meta-xilinx/meta-xilinx-bsp/recipes-bsp/u-boot/u-boot-zynq-uenv.bb b/meta-xilinx/meta-xilinx-bsp/recipes-bsp/u-boot/u-boot-zynq-uenv.bb
index 952077d..6e4c3c0 100644
--- a/meta-xilinx/meta-xilinx-bsp/recipes-bsp/u-boot/u-boot-zynq-uenv.bb
+++ b/meta-xilinx/meta-xilinx-bsp/recipes-bsp/u-boot/u-boot-zynq-uenv.bb
@@ -37,6 +37,12 @@
         return "booti"
     raise bb.parse.SkipRecipe("Unsupport kernel image type")
 
+def get_sdbootdev(d):
+    if d.getVar("SOC_FAMILY") in ["zynqmp"]:
+        return "${sdbootdev}"
+    else:
+        return "0"
+
 def uenv_populate(d):
     # populate the environment values
     env = {}
@@ -51,10 +57,13 @@
 
     env["bootargs"] = d.getVar("KERNEL_BOOTARGS")
 
-    env["loadkernel"] = "fatload mmc 0 ${kernel_load_address} ${kernel_image}"
-    env["loaddtb"] = "fatload mmc 0 ${devicetree_load_address} ${devicetree_image}"
+    env["loadkernel"] = "fatload mmc " + get_sdbootdev(d) + " ${kernel_load_address} ${kernel_image}"
+    env["loaddtb"] = "fatload mmc  " + get_sdbootdev(d) + " ${devicetree_load_address} ${devicetree_image}"
     env["bootkernel"] = "run loadkernel && run loaddtb && " + uboot_boot_cmd(d) + " ${kernel_load_address} - ${devicetree_load_address}"
 
+    if d.getVar("SOC_FAMILY") in ["zynqmp"]:
+        env["bootkernel"] = "setenv bootargs " +  d.getVar("KERNEL_BOOTARGS") + " ; " + env["bootkernel"]
+
     # default uenvcmd does not load bitstream
     env["uenvcmd"] = "run bootkernel"
 
@@ -67,14 +76,14 @@
         env["bitstream_type"] = "loadb" if bitstreamtype else "load"
 
         # load bitstream first with loadfpa
-        env["loadfpga"] = "fatload mmc 0 ${bitstream_load_address} ${bitstream_image} && fpga ${bitstream_type} 0 ${bitstream_load_address} ${filesize}"
+        env["loadfpga"] = "fatload mmc " + get_sdbootdev(d) + " ${bitstream_load_address} ${bitstream_image} && fpga ${bitstream_type} 0 ${bitstream_load_address} ${filesize}"
         env["uenvcmd"] = "run loadfpga && run bootkernel"
 
     return env
 
-# bootargs, default to booting with the rootfs device being partition 2 of the first mmc device
+# bootargs, default to booting with the rootfs device being partition 2
 KERNEL_BOOTARGS_zynq = "earlyprintk console=ttyPS0,115200 root=/dev/mmcblk0p2 rw rootwait"
-KERNEL_BOOTARGS_zynqmp = "earlycon clk_ignore_unused root=/dev/mmcblk0p2 rw rootwait"
+KERNEL_BOOTARGS_zynqmp = "earlycon clk_ignore_unused root=/dev/mmcblk${sdbootdev}p2 rw rootwait"
 
 KERNEL_LOAD_ADDRESS_zynq = "0x2080000"
 KERNEL_LOAD_ADDRESS_zynqmp = "0x80000"