diff options
| -rw-r--r-- | recipes-extended/xen/xen.inc | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/recipes-extended/xen/xen.inc b/recipes-extended/xen/xen.inc index ab699873..3ca38fba 100644 --- a/recipes-extended/xen/xen.inc +++ b/recipes-extended/xen/xen.inc | |||
| @@ -30,6 +30,7 @@ DEPENDS = " \ | |||
| 30 | flex-native \ | 30 | flex-native \ |
| 31 | file-native \ | 31 | file-native \ |
| 32 | iasl-native \ | 32 | iasl-native \ |
| 33 | ncurses-native \ | ||
| 33 | util-linux-native \ | 34 | util-linux-native \ |
| 34 | xz-native \ | 35 | xz-native \ |
| 35 | bridge-utils \ | 36 | bridge-utils \ |
| @@ -1006,3 +1007,37 @@ do_deploy() { | |||
| 1006 | } | 1007 | } |
| 1007 | 1008 | ||
| 1008 | addtask deploy after do_populate_sysroot | 1009 | addtask deploy after do_populate_sysroot |
| 1010 | |||
| 1011 | # Enable use of menuconfig directly from bitbake and also within the devshell | ||
| 1012 | OE_TERMINAL_EXPORTS += "HOST_EXTRACFLAGS HOSTLDFLAGS TERMINFO" | ||
| 1013 | HOST_EXTRACFLAGS = "${BUILD_CFLAGS} ${BUILD_LDFLAGS}" | ||
| 1014 | HOSTLDFLAGS = "${BUILD_LDFLAGS}" | ||
| 1015 | TERMINFO = "${STAGING_DATADIR_NATIVE}/terminfo" | ||
| 1016 | do_devshell[depends] += "ncurses-native:do_populate_sysroot" | ||
| 1017 | |||
| 1018 | KCONFIG_CONFIG_COMMAND ??= "menuconfig" | ||
| 1019 | python do_menuconfig() { | ||
| 1020 | import shutil | ||
| 1021 | |||
| 1022 | try: | ||
| 1023 | mtime = os.path.getmtime("xen/.config") | ||
| 1024 | shutil.copy("xen/.config", "xen/.config.orig") | ||
| 1025 | except OSError: | ||
| 1026 | mtime = 0 | ||
| 1027 | |||
| 1028 | oe_terminal("${SHELL} -c \"cd xen; XEN_CONFIG_EXPERT=y make %s; if [ \$? -ne 0 ]; then echo 'Command failed.'; printf 'Press any key to continue... '; read r; fi\"" % d.getVar('KCONFIG_CONFIG_COMMAND'), | ||
| 1029 | d.getVar('PN') + ' Configuration', d) | ||
| 1030 | |||
| 1031 | try: | ||
| 1032 | newmtime = os.path.getmtime("xen/.config") | ||
| 1033 | except OSError: | ||
| 1034 | newmtime = 0 | ||
| 1035 | |||
| 1036 | if newmtime > mtime: | ||
| 1037 | bb.note("Configuration changed, recompile will be forced") | ||
| 1038 | bb.build.write_taint('do_compile', d) | ||
| 1039 | } | ||
| 1040 | do_menuconfig[depends] += "ncurses-native:do_populate_sysroot" | ||
| 1041 | do_menuconfig[nostamp] = "1" | ||
| 1042 | do_menuconfig[dirs] = "${B}" | ||
| 1043 | addtask menuconfig after do_configure | ||
