summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/uboot-extlinux-config.bbclass18
1 files changed, 18 insertions, 0 deletions
diff --git a/meta/classes/uboot-extlinux-config.bbclass b/meta/classes/uboot-extlinux-config.bbclass
index 904d5b3cfd..aae21713e3 100644
--- a/meta/classes/uboot-extlinux-config.bbclass
+++ b/meta/classes/uboot-extlinux-config.bbclass
@@ -16,6 +16,10 @@
16# concatenate and use as an initrd (optional). 16# concatenate and use as an initrd (optional).
17# UBOOT_EXTLINUX_MENU_DESCRIPTION - Name to use as description. 17# UBOOT_EXTLINUX_MENU_DESCRIPTION - Name to use as description.
18# UBOOT_EXTLINUX_ROOT - Root kernel cmdline. 18# UBOOT_EXTLINUX_ROOT - Root kernel cmdline.
19# UBOOT_EXTLINUX_TIMEOUT - Timeout before DEFAULT selection is made.
20# Measured in 1/10 of a second.
21# UBOOT_EXTLINUX_DEFAULT_LABEL - Target to be selected by default after
22# the timeout period
19# 23#
20# If there's only one label system will boot automatically and menu won't be 24# If there's only one label system will boot automatically and menu won't be
21# created. If you want to use more than one labels, e.g linux and alternate, 25# created. If you want to use more than one labels, e.g linux and alternate,
@@ -25,6 +29,9 @@
25# 29#
26# UBOOT_EXTLINUX_LABELS ??= "default fallback" 30# UBOOT_EXTLINUX_LABELS ??= "default fallback"
27# 31#
32# UBOOT_EXTLINUX_DEFAULT_LABEL ??= "Linux Default"
33# UBOOT_EXTLINUX_TIMEOUT ??= "30"
34#
28# UBOOT_EXTLINUX_KERNEL_IMAGE_default ??= "../zImage" 35# UBOOT_EXTLINUX_KERNEL_IMAGE_default ??= "../zImage"
29# UBOOT_EXTLINUX_MENU_DESCRIPTION_default ??= "Linux Default" 36# UBOOT_EXTLINUX_MENU_DESCRIPTION_default ??= "Linux Default"
30# 37#
@@ -34,6 +41,8 @@
34# Results: 41# Results:
35# 42#
36# menu title Select the boot mode 43# menu title Select the boot mode
44# TIMEOUT 30
45# DEFAULT Linux Default
37# LABEL Linux Default 46# LABEL Linux Default
38# KERNEL ../zImage 47# KERNEL ../zImage
39# FDTDIR ../ 48# FDTDIR ../
@@ -82,6 +91,15 @@ python create_extlinux_config() {
82 if len(labels.split()) > 1: 91 if len(labels.split()) > 1:
83 cfgfile.write('menu title Select the boot mode\n') 92 cfgfile.write('menu title Select the boot mode\n')
84 93
94 timeout = localdata.getVar('UBOOT_EXTLINUX_TIMEOUT')
95 if timeout:
96 cfgfile.write('TIMEOUT %s\n' % (timeout))
97
98 if len(labels.split()) > 1:
99 default = localdata.getVar('UBOOT_EXTLINUX_DEFAULT_LABEL')
100 if default:
101 cfgfile.write('DEFAULT %s\n' % (default))
102
85 for label in labels.split(): 103 for label in labels.split():
86 localdata = bb.data.createCopy(d) 104 localdata = bb.data.createCopy(d)
87 105