diff options
-rwxr-xr-x | bitbake/bin/bitbake-setup | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/bitbake/bin/bitbake-setup b/bitbake/bin/bitbake-setup index 51d9503c4a..36a1bbd91a 100755 --- a/bitbake/bin/bitbake-setup +++ b/bitbake/bin/bitbake-setup | |||
@@ -101,13 +101,13 @@ def checkout_layers(layers, layerdir, d): | |||
101 | 101 | ||
102 | if os.path.exists(os.path.join(layerdir, repodir, 'scripts/oe-setup-build')): | 102 | if os.path.exists(os.path.join(layerdir, repodir, 'scripts/oe-setup-build')): |
103 | oesetupbuild = os.path.join(layerdir, repodir, 'scripts/oe-setup-build') | 103 | oesetupbuild = os.path.join(layerdir, repodir, 'scripts/oe-setup-build') |
104 | oeinitbuildenv = os.path.join(layerdir, repodir, 'oe-init-build-env') | 104 | oeinitbuildenvdir = os.path.join(layerdir, repodir) |
105 | 105 | ||
106 | print(" ") | 106 | print(" ") |
107 | _write_layer_list(layerdir, repodirs) | 107 | _write_layer_list(layerdir, repodirs) |
108 | 108 | ||
109 | if oesetupbuild: | 109 | if oesetupbuild: |
110 | links = {'setup-build': oesetupbuild, 'oe-scripts': os.path.dirname(oesetupbuild), 'init-build-env': oeinitbuildenv} | 110 | links = {'setup-build': oesetupbuild, 'oe-scripts': os.path.dirname(oesetupbuild), 'oe-init-build-env-dir': oeinitbuildenvdir} |
111 | for l,t in links.items(): | 111 | for l,t in links.items(): |
112 | symlink = os.path.join(layerdir, l) | 112 | symlink = os.path.join(layerdir, l) |
113 | if os.path.lexists(symlink): | 113 | if os.path.lexists(symlink): |
@@ -145,8 +145,9 @@ def setup_bitbake_build(bitbake_config, layerdir, builddir): | |||
145 | with open(os.path.join(build_conf_dir, "conf-notes.txt"), 'w') as f: | 145 | with open(os.path.join(build_conf_dir, "conf-notes.txt"), 'w') as f: |
146 | f.write("") | 146 | f.write("") |
147 | 147 | ||
148 | def _make_init_build_env(builddir, initbuildenv): | 148 | def _make_init_build_env(builddir, oeinitbuildenvdir): |
149 | cmd = ". {} {}".format(initbuildenv, builddir) | 149 | builddir = os.path.realpath(builddir) |
150 | cmd = "cd {}\nset {}\n. ./oe-init-build-env\n".format(oeinitbuildenvdir, builddir) | ||
150 | initbuild_in_builddir = os.path.join(builddir, 'init-build-env') | 151 | initbuild_in_builddir = os.path.join(builddir, 'init-build-env') |
151 | with open(initbuild_in_builddir, 'w') as f: | 152 | with open(initbuild_in_builddir, 'w') as f: |
152 | f.write(cmd) | 153 | f.write(cmd) |
@@ -174,11 +175,11 @@ def setup_bitbake_build(bitbake_config, layerdir, builddir): | |||
174 | if template: | 175 | if template: |
175 | bb.process.run("{} setup -c {} -b {} --no-shell".format(oesetupbuild, template, bitbake_builddir)) | 176 | bb.process.run("{} setup -c {} -b {} --no-shell".format(oesetupbuild, template, bitbake_builddir)) |
176 | else: | 177 | else: |
177 | initbuildenv = os.path.join(layerdir, 'init-build-env') | 178 | oeinitbuildenvdir = os.path.join(layerdir, 'oe-init-build-env-dir') |
178 | if not os.path.exists(initbuildenv): | 179 | if not os.path.exists(os.path.join(oeinitbuildenvdir, "oe-init-build-env")): |
179 | print("Could not find oe-init-build-env in any of the layers; please use another mechanism to initialize the bitbake environment") | 180 | print("Could not find oe-init-build-env in any of the layers; please use another mechanism to initialize the bitbake environment") |
180 | return | 181 | return |
181 | _make_init_build_env(bitbake_builddir, os.path.realpath(initbuildenv)) | 182 | _make_init_build_env(bitbake_builddir, os.path.realpath(oeinitbuildenvdir)) |
182 | 183 | ||
183 | siteconf_symlink = os.path.join(bitbake_confdir, "site.conf") | 184 | siteconf_symlink = os.path.join(bitbake_confdir, "site.conf") |
184 | siteconf = os.path.normpath(os.path.join(builddir, '..', "site.conf")) | 185 | siteconf = os.path.normpath(os.path.join(builddir, '..', "site.conf")) |