diff options
author | Anton Gerasimov <anton@advancedtelematic.com> | 2016-12-28 17:40:14 +0100 |
---|---|---|
committer | Anton Gerasimov <anton@advancedtelematic.com> | 2016-12-28 17:40:14 +0100 |
commit | c60ed2eaabd0dc81ab9084d64e64ccbc462c6a2a (patch) | |
tree | c49e50e850bdc65b06f0fd27b7bf629ac0e8332b | |
parent | 9a33370f3529c147d2ce3c3d9a8d007a95b5970e (diff) | |
download | meta-updater-c60ed2eaabd0dc81ab9084d64e64ccbc462c6a2a.tar.gz |
Add u-boot environment for OSTree
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 @@ | |||
1 | bootkaddr=0x01000000 | ||
2 | bootiaddr=0x04000000 | ||
3 | |||
4 | bootargs_console=console=ttyS0,115200 | ||
5 | bootargs_extra=rw rootfstype=ext4 rootwait rootdelay=2 | ||
6 | |||
7 | bootargs_root=ostree_root=/dev/mmcblk0p2 root=/dev/ram0 ramdisk_size=16384 | ||
8 | |||
9 | bootmmc=1:2 | ||
10 | |||
11 | booteload_sd=ext4load mmc ${bootmmc} ${bootkaddr} boot/loader/uEnv.txt; env import -t ${bootkaddr} ${filesize} | ||
12 | |||
13 | bootkload_sd=ext4load mmc ${bootmmc} ${bootkaddr} boot/${kernel_image} | ||
14 | bootiload_sd=ext4load mmc ${bootmmc} ${bootiaddr} boot/${ramdisk_image} | ||
15 | |||
16 | bootcmd=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 @@ | |||
1 | DESCRIPTION = "Boot files (bootscripts etc.) for Minnowboard Max/Turbot" | ||
2 | LICENSE = "MIT" | ||
3 | LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" | ||
4 | |||
5 | inherit deploy | ||
6 | |||
7 | COMPATIBLE_MACHINE = "intel-corei7-64" | ||
8 | |||
9 | S = "${WORKDIR}" | ||
10 | |||
11 | SRC_URI_append_sota = "file://uEnv-ota.txt" | ||
12 | |||
13 | do_deploy() { | ||
14 | install -d ${DEPLOYDIR}/${PN} | ||
15 | } | ||
16 | |||
17 | do_deploy_append_sota() { | ||
18 | install -m 0755 ${WORKDIR}/uEnv-ota.txt ${DEPLOYDIR}/${PN}/uEnv.txt | ||
19 | } | ||
20 | |||
21 | addtask deploy before do_package after do_install | ||
22 | do_deploy[dirs] += "${DEPLOYDIR}/${PN}" | ||
23 | |||
24 | PACKAGE_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 @@ | |||
1 | From 0161adf28590d95eaf234acc97156bc7dd989c8c Mon Sep 17 00:00:00 2001 | ||
2 | From: Anton Gerasimov <anton@advancedtelematic.com> | ||
3 | Date: Wed, 28 Dec 2016 16:53:35 +0100 | ||
4 | Subject: [PATCH] Load environment from the boot partition | ||
5 | |||
6 | --- | ||
7 | include/configs/minnowmax.h | 3 +++ | ||
8 | 1 file changed, 3 insertions(+) | ||
9 | |||
10 | diff --git a/include/configs/minnowmax.h b/include/configs/minnowmax.h | ||
11 | index 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 | -- | ||
23 | 2.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 |
10 | SRCREV = "29e0cfb4f77f7aa369136302cee14a91e22dca71" | 10 | SRCREV = "29e0cfb4f77f7aa369136302cee14a91e22dca71" |
11 | 11 | ||
12 | SRC_URI += "file://0002-Replace-wraps-with-built-in-code-to-remove-dependenc.patch \ | 12 | SRC_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 | ||