summaryrefslogtreecommitdiffstats
path: root/external/meta-updater-qemux86-64/recipes-bsp/u-boot/files/0001-Set-up-environment-for-OSTree-integration.patch
blob: 8e155d30086f2ba4873290eadf854225e1d62506 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
From 6c1f0bd556ce99b5eb2bab9093daa5276f275ee2 Mon Sep 17 00:00:00 2001
From: Laurent Bonnans <laurent.bonnans@here.com>
Date: Fri, 20 Jul 2018 16:09:20 +0200
Subject: [PATCH] qemu-x86.h: Set up environment for OSTree integration

Setup environment for QEMU OSTree integration

Includes fix for u-boot 2018.07 (explicit IDE initialization)

Co-Authored-By: Anton Gerasimov <anton@advancedtelematic.com>
Co-Authored-By: Leon Anavi <leon.anavi@konsulko.com>
Signed-off-by: Laurent Bonnans <laurent.bonnans@here.com>
---
 include/configs/qemu-x86.h | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/include/configs/qemu-x86.h b/include/configs/qemu-x86.h
index 4b9ddd6f25..ff4b1d14d6 100644
--- a/include/configs/qemu-x86.h
+++ b/include/configs/qemu-x86.h
@@ -42,4 +42,25 @@
 #define CONFIG_SPL_BOARD_LOAD_IMAGE
 #define BOOT_DEVICE_BOARD		11
 
+#undef CONFIG_BOOTARGS
+
+#define CONFIG_BOOTARGS "root=/dev/hda2 console=ttyS0"
+
+#undef CONFIG_BOOTDELAY
+#define CONFIG_BOOTDELAY 3
+
+#undef CONFIG_BOOTCOMMAND
+#define CONFIG_BOOTCOMMAND "ide reset; run loadenv;" \
+			   "setenv bootargs $bootargs\" console=ttyS0 root=/dev/ram0 rw rootfstype=ext4 rootwait rootdelay=2 ostree_root=/dev/hda ramdisk_size=16384 \";" \
+			   "ext2load ide 0 $loadaddr \"/boot\"$kernel_image;" \
+			   "ext2load ide 0 $ramdiskaddr \"/boot\"$ramdisk_image;" \
+			   "zboot $loadaddr - $ramdiskaddr $filesize"
+
+#undef CONFIG_EXTRA_ENV_SETTINGS
+#define CONFIG_EXTRA_ENV_SETTINGS "kernel_image=/bzImage\0" \
+				  "ramdisk_image=/initrd\0" \
+				  "ramdiskaddr=0x4000000\0" \
+				  "bootdelay=3\0" \
+				  "loadenv=if ext2load ide 0 $loadaddr /boot/loader/uEnv.txt; then env import -t $loadaddr $filesize; fi;"
+
 #endif	/* __CONFIG_H */
-- 
2.18.0