kernel-temp 1.1 KB

123456789101112131415161718192021222324252627282930313233
  1. diff --git a/classes/kernel.bbclass b/classes/kernel.bbclass
  2. index d94930b..2a0f3da 100644
  3. --- a/classes/kernel.bbclass
  4. +++ b/classes/kernel.bbclass
  5. @@ -220,6 +196,9 @@ kernel_do_configure() {
  6. kernel_do_configure[depends] += "${INITRAMFS_TASK}"
  7. do_menuconfig() {
  8. + export DISPLAY='${DISPLAY}'
  9. + export DBUS_SESSION_BUS_ADDRESS='${DBUS_SESSION_BUS_ADDRESS}'
  10. + export XAUTHORITY='${XAUTHORITY}'
  11. export TERMWINDOWTITLE="${PN} Kernel Configuration"
  12. export SHELLCMDS="make menuconfig"
  13. ${TERMCMDRUN}
  14. @@ -318,13 +297,16 @@ module_conf_rfcomm = "alias bt-proto-3 rfcomm"
  15. python populate_packages_prepend () {
  16. def extract_modinfo(file):
  17. - import re
  18. - tmpfile = os.tmpnam()
  19. + import tempfile, re
  20. + tempfile.tempdir = bb.data.getVar("WORKDIR", d, 1)
  21. + tf = tempfile.mkstemp()
  22. + tmpfile = tf[1]
  23. cmd = "PATH=\"%s\" %sobjcopy -j .modinfo -O binary %s %s" % (bb.data.getVar("PATH", d, 1), bb.data.getVar("HOST_PREFIX", d, 1) or "", file, tmpfile)
  24. os.system(cmd)
  25. f = open(tmpfile)
  26. l = f.read().split("\000")
  27. f.close()
  28. + os.close(tf[0])
  29. os.unlink(tmpfile)
  30. exp = re.compile("([^=]+)=(.*)")
  31. vals = {}