summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Gerasimov <anton@advancedtelematic.com>2016-12-28 17:40:14 +0100
committerAnton Gerasimov <anton@advancedtelematic.com>2016-12-28 17:40:14 +0100
commitc60ed2eaabd0dc81ab9084d64e64ccbc462c6a2a (patch)
treec49e50e850bdc65b06f0fd27b7bf629ac0e8332b
parent9a33370f3529c147d2ce3c3d9a8d007a95b5970e (diff)
downloadmeta-updater-c60ed2eaabd0dc81ab9084d64e64ccbc462c6a2a.tar.gz
Add u-boot environment for OSTree
-rw-r--r--meta-sota-minnowboard/recipes-bsp/bootfiles/files/uEnv-ota.txt17
-rw-r--r--meta-sota-minnowboard/recipes-bsp/bootfiles/minnowboard-bootfiles.bb25
-rw-r--r--meta-sota-minnowboard/recipes-bsp/u-boot/u-boot-ota/0001-Load-environment-from-the-boot-partition.patch24
-rw-r--r--meta-sota-minnowboard/recipes-bsp/u-boot/u-boot-ota_2016.11.bb3
4 files changed, 68 insertions, 1 deletions
diff --git a/meta-sota-minnowboard/recipes-bsp/bootfiles/files/uEnv-ota.txt b/meta-sota-minnowboard/recipes-bsp/bootfiles/files/uEnv-ota.txt
new file mode 100644
index 0000000..2b0f293
--- /dev/null
+++ b/meta-sota-minnowboard/recipes-bsp/bootfiles/files/uEnv-ota.txt
@@ -0,0 +1,17 @@
1bootkaddr=0x01000000
2bootiaddr=0x04000000
3
4bootargs_console=console=ttyS0,115200
5bootargs_extra=rw rootfstype=ext4 rootwait rootdelay=2
6
7bootargs_root=ostree_root=/dev/mmcblk0p2 root=/dev/ram0 ramdisk_size=16384
8
9bootmmc=1:2
10
11booteload_sd=ext4load mmc ${bootmmc} ${bootkaddr} boot/loader/uEnv.txt; env import -t ${bootkaddr} ${filesize}
12
13bootkload_sd=ext4load mmc ${bootmmc} ${bootkaddr} boot/${kernel_image}
14bootiload_sd=ext4load mmc ${bootmmc} ${bootiaddr} boot/${ramdisk_image}
15
16bootcmd=run booteload_sd; setenv bootargs ${bootargs} ${bootargs_console} ${bootargs_root} ${bootargs_extra}; run bootkload_sd; run bootiload_sd; zboot ${bootkaddr} - ${bootiaddr} ${filesize}
17
diff --git a/meta-sota-minnowboard/recipes-bsp/bootfiles/minnowboard-bootfiles.bb b/meta-sota-minnowboard/recipes-bsp/bootfiles/minnowboard-bootfiles.bb
new file mode 100644
index 0000000..74d1f18
--- /dev/null
+++ b/meta-sota-minnowboard/recipes-bsp/bootfiles/minnowboard-bootfiles.bb
@@ -0,0 +1,25 @@
1DESCRIPTION = "Boot files (bootscripts etc.) for Minnowboard Max/Turbot"
2LICENSE = "MIT"
3LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
4
5inherit deploy
6
7COMPATIBLE_MACHINE = "intel-corei7-64"
8
9S = "${WORKDIR}"
10
11SRC_URI_append_sota = "file://uEnv-ota.txt"
12
13do_deploy() {
14 install -d ${DEPLOYDIR}/${PN}
15}
16
17do_deploy_append_sota() {
18 install -m 0755 ${WORKDIR}/uEnv-ota.txt ${DEPLOYDIR}/${PN}/uEnv.txt
19}
20
21addtask deploy before do_package after do_install
22do_deploy[dirs] += "${DEPLOYDIR}/${PN}"
23
24PACKAGE_ARCH = "${MACHINE_ARCH}"
25
diff --git a/meta-sota-minnowboard/recipes-bsp/u-boot/u-boot-ota/0001-Load-environment-from-the-boot-partition.patch b/meta-sota-minnowboard/recipes-bsp/u-boot/u-boot-ota/0001-Load-environment-from-the-boot-partition.patch
new file mode 100644
index 0000000..02d0e4c
--- /dev/null
+++ b/meta-sota-minnowboard/recipes-bsp/u-boot/u-boot-ota/0001-Load-environment-from-the-boot-partition.patch
@@ -0,0 +1,24 @@
1From 0161adf28590d95eaf234acc97156bc7dd989c8c Mon Sep 17 00:00:00 2001
2From: Anton Gerasimov <anton@advancedtelematic.com>
3Date: Wed, 28 Dec 2016 16:53:35 +0100
4Subject: [PATCH] Load environment from the boot partition
5
6---
7 include/configs/minnowmax.h | 3 +++
8 1 file changed, 3 insertions(+)
9
10diff --git a/include/configs/minnowmax.h b/include/configs/minnowmax.h
11index 3aa22d2..02f6980 100644
12--- a/include/configs/minnowmax.h
13+++ b/include/configs/minnowmax.h
14@@ -41,4 +41,7 @@
15 #define CONFIG_ENV_SECT_SIZE 0x1000
16 #define CONFIG_ENV_OFFSET 0x006ef000
17
18+#undef CONFIG_BOOTCOMMAND
19+#define CONFIG_BOOTCOMMAND "fatload mmc 1:1 0x01000000 uEnv.txt; env import -t 0x01000000 ${filesize}; run bootcmd"
20+
21 #endif /* __CONFIG_H */
22--
232.9.3
24
diff --git a/meta-sota-minnowboard/recipes-bsp/u-boot/u-boot-ota_2016.11.bb b/meta-sota-minnowboard/recipes-bsp/u-boot/u-boot-ota_2016.11.bb
index fe60489..c0603f0 100644
--- a/meta-sota-minnowboard/recipes-bsp/u-boot/u-boot-ota_2016.11.bb
+++ b/meta-sota-minnowboard/recipes-bsp/u-boot/u-boot-ota_2016.11.bb
@@ -9,7 +9,8 @@ LIC_FILES_CHKSUM = "file://Licenses/README;md5=a2c678cfd4a4d97135585cad908541c6"
9# repo during parse 9# repo during parse
10SRCREV = "29e0cfb4f77f7aa369136302cee14a91e22dca71" 10SRCREV = "29e0cfb4f77f7aa369136302cee14a91e22dca71"
11 11
12SRC_URI += "file://0002-Replace-wraps-with-built-in-code-to-remove-dependenc.patch \ 12SRC_URI += "file://0001-Load-environment-from-the-boot-partition.patch \
13 file://0002-Replace-wraps-with-built-in-code-to-remove-dependenc.patch \
13 http://firmware.intel.com/sites/default/files/MinnowBoard.MAX_.X64.92.R01.zip \ 14 http://firmware.intel.com/sites/default/files/MinnowBoard.MAX_.X64.92.R01.zip \
14 " 15 "
15 16