summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Gerasimov <anton@advancedtelematic.com>2017-04-10 17:04:13 +0200
committerAnton Gerasimov <anton@advancedtelematic.com>2017-04-11 17:37:48 +0200
commit58e7b90e392c911fa3df2d17fda34441ea509675 (patch)
tree0058130c325d502fd7e70530514a8fa8dd8a63aa
parent77e701b94ed91762df51ddae3743c3bde4ca9f8f (diff)
downloadmeta-updater-58e7b90e392c911fa3df2d17fda34441ea509675.tar.gz
Add configuration for grub-efi on Minnowboard
-rw-r--r--classes/image_types_ota.bbclass2
-rw-r--r--conf/include/local/sota_minnowboard.inc10
-rw-r--r--conf/include/local/sota_minnowboard_uboot.inc10
-rw-r--r--recipes-bsp/grub/grub-efi_%.bbappend2
-rw-r--r--scripts/lib/wic/canned-wks/efiimage-sota.wks8
-rw-r--r--scripts/lib/wic/canned-wks/grub-ota.cfg2
6 files changed, 28 insertions, 6 deletions
diff --git a/classes/image_types_ota.bbclass b/classes/image_types_ota.bbclass
index 74533dd..b275930 100644
--- a/classes/image_types_ota.bbclass
+++ b/classes/image_types_ota.bbclass
@@ -115,7 +115,7 @@ IMAGE_CMD_otaimg () {
115 rm -rf ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.otaimg 115 rm -rf ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.otaimg
116 sync 116 sync
117 dd if=/dev/zero of=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.otaimg seek=$OTA_ROOTFS_SIZE count=$COUNT bs=1024 117 dd if=/dev/zero of=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.otaimg seek=$OTA_ROOTFS_SIZE count=$COUNT bs=1024
118 mkfs.ext4 -O ^64bit ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.otaimg -d ${PHYS_SYSROOT} 118 mkfs.ext4 -O ^64bit ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.otaimg -L otaroot -d ${PHYS_SYSROOT}
119 rm -rf ${PHYS_SYSROOT} 119 rm -rf ${PHYS_SYSROOT}
120 120
121 rm -f ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.otaimg 121 rm -f ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.otaimg
diff --git a/conf/include/local/sota_minnowboard.inc b/conf/include/local/sota_minnowboard.inc
index 5a5b3f4..d39f4d3 100644
--- a/conf/include/local/sota_minnowboard.inc
+++ b/conf/include/local/sota_minnowboard.inc
@@ -1,9 +1,9 @@
1MACHINE = "intel-corei7-64" 1MACHINE = "intel-corei7-64"
2 2
3PREFERRED_PROVIDER_virtual/bootloader_sota = "u-boot-ota" 3OSTREE_BOOTLOADER ?= "grub"
4UBOOT_MACHINE_sota = "minnowmax_defconfig" 4EFI_PROVIDER = "grub-efi"
5 5
6EXTRA_IMAGEDEPENDS_append_sota = " minnowboard-bootfiles" 6WKS_FILE = "efiimage-sota.wks"
7IMAGE_BOOT_FILES_sota += "minnowboard-bootfiles/*" 7IMAGE_BOOT_FILES = ""
8 8
9OSTREE_BOOTLOADER ?= "u-boot" 9OSTREE_KERNEL_ARGS ?= "ramdisk_size=16384 rw rootfstype=ext4 rootwait rootdelay=2 ostree_root=/dev/mmcblk2p2 console=ttyS0,115200 console=tty0"
diff --git a/conf/include/local/sota_minnowboard_uboot.inc b/conf/include/local/sota_minnowboard_uboot.inc
new file mode 100644
index 0000000..e64f7eb
--- /dev/null
+++ b/conf/include/local/sota_minnowboard_uboot.inc
@@ -0,0 +1,10 @@
1MACHINE = "intel-corei7-64"
2
3PREFERRED_PROVIDER_virtual/bootloader = "u-boot-ota"
4UBOOT_MACHINE = "minnowmax_defconfig"
5
6EXTRA_IMAGEDEPENDS_append = " minnowboard-bootfiles"
7IMAGE_BOOT_FILES = "minnowboard-bootfiles/*"
8
9OSTREE_KERNEL_ARGS ?= "ramdisk_size=16384 rw rootfstype=ext4 rootwait rootdelay=2 ostree_root=/dev/hda console=ttyS0,115200 console=tty0"
10
diff --git a/recipes-bsp/grub/grub-efi_%.bbappend b/recipes-bsp/grub/grub-efi_%.bbappend
new file mode 100644
index 0000000..545e806
--- /dev/null
+++ b/recipes-bsp/grub/grub-efi_%.bbappend
@@ -0,0 +1,2 @@
1
2GRUB_BUILDIN += "configfile"
diff --git a/scripts/lib/wic/canned-wks/efiimage-sota.wks b/scripts/lib/wic/canned-wks/efiimage-sota.wks
new file mode 100644
index 0000000..1e37d96
--- /dev/null
+++ b/scripts/lib/wic/canned-wks/efiimage-sota.wks
@@ -0,0 +1,8 @@
1# short-description: Create an OTA-enabled EFI disk image
2# long-description: Creates an OTA-enabled EFI disk image that the user
3# can directly dd to boot media.
4
5part /boot --source bootimg-efi --sourceparams="loader=grub-efi" --ondisk hda --label msdos --active --align 1024
6part / --source otaimage --ondisk hda --fstype=ext4 --align 1024 --use-uuid
7
8bootloader --ptable gpt --timeout=5 --append="rootfstype=ext4 console=ttyS0,115200 console=tty0" --configfile="grub-ota.cfg"
diff --git a/scripts/lib/wic/canned-wks/grub-ota.cfg b/scripts/lib/wic/canned-wks/grub-ota.cfg
new file mode 100644
index 0000000..fcd8d70
--- /dev/null
+++ b/scripts/lib/wic/canned-wks/grub-ota.cfg
@@ -0,0 +1,2 @@
1search.fs_label otaroot root
2configfile /boot/loader/grub.cfg