templates/machine: remove unused test dirs
[AGL/meta-agl.git] / meta-agl-bsp / meta-boundary / recipes-bsp / u-boot / u-boot-script-boundary / 0001-6x_bootscript-Make-bootscript-compatible-with-WIC-an.patch
1 From 785f028c550e50904ca4bc7f399a21e8b5f6910c Mon Sep 17 00:00:00 2001
2 From: Mihail Grigorov <michael.grigorov@konsulko.com>
3 Date: Mon, 23 Oct 2017 14:26:12 +0300
4 Subject: [PATCH] 6x_bootscript: Make bootscript compatible with WIC and SDCARD
5  images
6
7 Get partition 2 UUID,
8 in case of error, points the boot directory to /boot
9 otherwise /
10
11 Signed-off-by: Mihail Grigorov <michael.grigorov@konsulko.com>
12 ---
13  .../boundary/nitrogen6x/6x_bootscript-yocto-3.14.txt  | 19 +++++++++++++++----
14  1 file changed, 15 insertions(+), 4 deletions(-)
15
16 diff --git a/board/boundary/nitrogen6x/6x_bootscript-yocto-3.14.txt b/board/boundary/nitrogen6x/6x_bootscript-yocto-3.14.txt
17 index f6bf2f5289..9b5946692d 100644
18 --- a/board/boundary/nitrogen6x/6x_bootscript-yocto-3.14.txt
19 +++ b/board/boundary/nitrogen6x/6x_bootscript-yocto-3.14.txt
20 @@ -48,6 +48,15 @@ if itest.s "x" == "x${dtbname}" ; then
21         fi
22  fi
23  
24 +setenv p2uuid 'x'
25 +part uuid ${dtype} ${disk}:2 p2uuid
26 +
27 +if itest.s ${p2uuid} == 'x'; then
28 +       bpart=1;
29 +else
30 +       bpart=2;
31 +fi
32 +
33  if itest.s x${bootpart} == x ; then
34         bootpart=1
35  fi
36 @@ -58,7 +67,11 @@ fi
37  setenv bootargs ${bootargs} console=${console},115200 vmalloc=400M consoleblank=0 rootwait fixrtc cpu=${cpu} board=${board}
38  
39  if itest.s x == x${bootdir} ; then
40 -       bootdir=/
41 +       bootdir=/;
42 +fi
43 +
44 +if itest.s ${bpart} == '1'; then
45 +       bootdir=/boot/;
46  fi
47  
48  if load ${dtype} ${disk}:${bootpart} ${a_fdt} ${bootdir}${dtbname} ; then
49 @@ -116,8 +129,6 @@ if itest.s "x" == "x${cmd_xxx_present}" ; then
50         echo "!!!!!!!!!!!!!!!!"
51  fi
52  
53 -bpart=2
54 -
55  if test "sata" = "${dtype}" ; then
56         setenv bootargs "${bootargs} root=/dev/sda${bpart}" ;
57  elif test "usb" = "${dtype}" ; then
58 @@ -167,7 +178,7 @@ if itest.s "x" != "x${show_env}" ; then
59         printenv
60  fi
61  
62 -if load ${dtype} ${disk}:${bootpart} ${a_zImage} /zImage ; then
63 +if load ${dtype} ${disk}:${bootpart} ${a_zImage} ${bootdir}/zImage ; then
64         bootz ${a_zImage} - ${a_fdt}
65  fi
66  echo "Error loading kernel image"
67 -- 
68 2.11.0
69