summaryrefslogtreecommitdiffstats
path: root/meta-agl-bsp
diff options
context:
space:
mode:
authorMihail Grigorov <michael.grigorov@konsulko.com>2017-10-26 14:22:47 +0300
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>2017-10-31 15:43:56 +0000
commit905637796f3db7d5992c9b8d11a59b30667221d2 (patch)
tree96f79842f460ed7be0993ca53eb0d4e2ca657d10 /meta-agl-bsp
parent4a2b05b3cfc12093b4ac0853f4a38593d067f7ef (diff)
meta-agl-bsp: imx6qsabrelite: Switch to WIC image
To produce a bootable WIC image, we needs to make some changes in 6x_bootscript for compatibility with WIC and SDCARD images. Because in case of WIC, we have one partition, and the kernel files are located in /boot directory. In case of SDCARD image, kernel files are in root directory of first partition. Bug-AGL: SPEC-899 Change-Id: Ie4b26a703cc468ff8c8405e957aacc2973ee289a Signed-off-by: Mihail Grigorov <michael.grigorov@konsulko.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-on: https://gerrit.automotivelinux.org/gerrit/11571 Tested-by: Jenkins Job builder account <agl-jobbuilder@automotivelinux.org> ci-image-build: Jenkins Job builder account <agl-jobbuilder@automotivelinux.org> ci-image-boot-test: Jenkins Job builder account <agl-jobbuilder@automotivelinux.org> Reviewed-by: Jan-Simon Moeller <jsmoeller@linuxfoundation.org> Reviewed-by: Matt Porter <mporter@konsulko.com>
Diffstat (limited to 'meta-agl-bsp')
-rw-r--r--meta-agl-bsp/conf/include/agl_imx6qsabrelite.inc10
-rw-r--r--meta-agl-bsp/meta-boundary/recipes-bsp/u-boot/u-boot-script-boundary/0001-6x_bootscript-Make-bootscript-compatible-with-WIC-an.patch69
-rw-r--r--meta-agl-bsp/meta-boundary/recipes-bsp/u-boot/u-boot-script-boundary_git.bbappend6
3 files changed, 82 insertions, 3 deletions
diff --git a/meta-agl-bsp/conf/include/agl_imx6qsabrelite.inc b/meta-agl-bsp/conf/include/agl_imx6qsabrelite.inc
index 2e3633ef4..5b86ba9a0 100644
--- a/meta-agl-bsp/conf/include/agl_imx6qsabrelite.inc
+++ b/meta-agl-bsp/conf/include/agl_imx6qsabrelite.inc
@@ -20,15 +20,19 @@ PREFERRED_PROVIDER_virtual/kernel = "linux-boundary"
PREFERRED_PROVIDER_u-boot = "u-boot-boundary"
PREFERRED_PROVIDER_virtual/bootloader = "u-boot-boundary"
PREFERRED_PROVIDER_u-boot-mxsboot-native = "u-boot-boundary"
-MACHINE_ESSENTIAL_EXTRA_RDEPENDS += " u-boot-boundary"
+MACHINE_ESSENTIAL_EXTRA_RDEPENDS += " \
+ u-boot-boundary \
+ u-boot-script-boundary \
+"
UBOOT_MACHINE = "nitrogen6q_config"
SPL_BINARY = ""
UBOOT_SUFFIX_SDCARD = "imx"
IMAGE_BOOTLOADER = "u-boot"
-# force generate sdcard image also
-AGL_DEFAULT_IMAGE_FSTYPES := "sdcard.xz"
+# generate WIC image also
+WKS_FILE = "imx-uboot.wks"
+AGL_EXTRA_IMAGE_FSTYPES = "wic.xz wic.bmap wic.xz.sha256sum"
AGL_DEFAULT_INITRAMFS_FSTYPES := ""
PREFERRED_VERSION_weston_mx6_forcevariable = "2.0.0"
diff --git a/meta-agl-bsp/meta-boundary/recipes-bsp/u-boot/u-boot-script-boundary/0001-6x_bootscript-Make-bootscript-compatible-with-WIC-an.patch b/meta-agl-bsp/meta-boundary/recipes-bsp/u-boot/u-boot-script-boundary/0001-6x_bootscript-Make-bootscript-compatible-with-WIC-an.patch
new file mode 100644
index 000000000..1bf301ac6
--- /dev/null
+++ b/meta-agl-bsp/meta-boundary/recipes-bsp/u-boot/u-boot-script-boundary/0001-6x_bootscript-Make-bootscript-compatible-with-WIC-an.patch
@@ -0,0 +1,69 @@
+From 785f028c550e50904ca4bc7f399a21e8b5f6910c Mon Sep 17 00:00:00 2001
+From: Mihail Grigorov <michael.grigorov@konsulko.com>
+Date: Mon, 23 Oct 2017 14:26:12 +0300
+Subject: [PATCH] 6x_bootscript: Make bootscript compatible with WIC and SDCARD
+ images
+
+Get partition 2 UUID,
+in case of error, points the boot directory to /boot
+otherwise /
+
+Signed-off-by: Mihail Grigorov <michael.grigorov@konsulko.com>
+---
+ .../boundary/nitrogen6x/6x_bootscript-yocto-3.14.txt | 19 +++++++++++++++----
+ 1 file changed, 15 insertions(+), 4 deletions(-)
+
+diff --git a/board/boundary/nitrogen6x/6x_bootscript-yocto-3.14.txt b/board/boundary/nitrogen6x/6x_bootscript-yocto-3.14.txt
+index f6bf2f5289..9b5946692d 100644
+--- a/board/boundary/nitrogen6x/6x_bootscript-yocto-3.14.txt
++++ b/board/boundary/nitrogen6x/6x_bootscript-yocto-3.14.txt
+@@ -48,6 +48,15 @@ if itest.s "x" == "x${dtbname}" ; then
+ fi
+ fi
+
++setenv p2uuid 'x'
++part uuid ${dtype} ${disk}:2 p2uuid
++
++if itest.s ${p2uuid} == 'x'; then
++ bpart=1;
++else
++ bpart=2;
++fi
++
+ if itest.s x${bootpart} == x ; then
+ bootpart=1
+ fi
+@@ -58,7 +67,11 @@ fi
+ setenv bootargs ${bootargs} console=${console},115200 vmalloc=400M consoleblank=0 rootwait fixrtc cpu=${cpu} board=${board}
+
+ if itest.s x == x${bootdir} ; then
+- bootdir=/
++ bootdir=/;
++fi
++
++if itest.s ${bpart} == '1'; then
++ bootdir=/boot/;
+ fi
+
+ if load ${dtype} ${disk}:${bootpart} ${a_fdt} ${bootdir}${dtbname} ; then
+@@ -116,8 +129,6 @@ if itest.s "x" == "x${cmd_xxx_present}" ; then
+ echo "!!!!!!!!!!!!!!!!"
+ fi
+
+-bpart=2
+-
+ if test "sata" = "${dtype}" ; then
+ setenv bootargs "${bootargs} root=/dev/sda${bpart}" ;
+ elif test "usb" = "${dtype}" ; then
+@@ -167,7 +178,7 @@ if itest.s "x" != "x${show_env}" ; then
+ printenv
+ fi
+
+-if load ${dtype} ${disk}:${bootpart} ${a_zImage} /zImage ; then
++if load ${dtype} ${disk}:${bootpart} ${a_zImage} ${bootdir}/zImage ; then
+ bootz ${a_zImage} - ${a_fdt}
+ fi
+ echo "Error loading kernel image"
+--
+2.11.0
+
diff --git a/meta-agl-bsp/meta-boundary/recipes-bsp/u-boot/u-boot-script-boundary_git.bbappend b/meta-agl-bsp/meta-boundary/recipes-bsp/u-boot/u-boot-script-boundary_git.bbappend
new file mode 100644
index 000000000..ca9cb4f94
--- /dev/null
+++ b/meta-agl-bsp/meta-boundary/recipes-bsp/u-boot/u-boot-script-boundary_git.bbappend
@@ -0,0 +1,6 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:"
+
+SRC_URI += " \
+ file://0001-6x_bootscript-Make-bootscript-compatible-with-WIC-an.patch \
+"
+