mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-23 02:05:57 +01:00
crosstool-ng: update to crosstool-ng-1.24.0
Fix https://github.com/cirosantilli/linux-kernel-module-cheat/issues/68 Copy source tree into build dir since ./ctng started failing out of tree. I give up.
This commit is contained in:
@@ -16,20 +16,27 @@ Build crosstool-NG with Newlib for bare metal compilation
|
||||
|
||||
def build(self):
|
||||
build_dir = self.get_build_dir()
|
||||
defconfig_dest = os.path.join(self.env['crosstool_ng_util_dir'], 'defconfig')
|
||||
os.makedirs(self.env['crosstool_ng_util_dir'], exist_ok=True)
|
||||
defconfig_dest = os.path.join(self.env['crosstool_ng_source_copy_dir'], 'defconfig')
|
||||
os.makedirs(self.env['crosstool_ng_download_dir'], exist_ok=True)
|
||||
|
||||
# Bootstrap out-ot-tree WONTFIX. I've tried.
|
||||
# https://github.com/crosstool-ng/crosstool-ng/issues/1021
|
||||
os.chdir(self.env['crosstool_ng_source_dir'])
|
||||
self.sh.run_cmd(
|
||||
[os.path.join(self.env['crosstool_ng_source_dir'], 'bootstrap'), LF],
|
||||
#
|
||||
# Then out-of-tree ./ctng usage also started to fail in 1.24.0.
|
||||
#
|
||||
# So instead of fighting upstream, I'll just take the Buildroot approach
|
||||
# to life and rsync the entire source tree into the build tree. Fun times.
|
||||
self.sh.copy_dir_if_update(
|
||||
self.env['crosstool_ng_source_dir'],
|
||||
self.env['crosstool_ng_source_copy_dir'],
|
||||
)
|
||||
os.chdir(self.env['crosstool_ng_source_copy_dir'])
|
||||
self.sh.run_cmd(
|
||||
[os.path.join(self.env['crosstool_ng_source_copy_dir'], 'bootstrap'), LF],
|
||||
)
|
||||
os.chdir(self.env['crosstool_ng_util_dir'])
|
||||
self.sh.run_cmd(
|
||||
[
|
||||
os.path.join(self.env['crosstool_ng_source_dir'], 'configure'), LF,
|
||||
os.path.join(self.env['crosstool_ng_source_copy_dir'], 'configure'), LF,
|
||||
'--enable-local', LF,
|
||||
],
|
||||
)
|
||||
|
||||
@@ -779,10 +779,10 @@ Incompatible archs are skipped.
|
||||
env['crosstool_ng_buildid_dir'] = join(env['crosstool_ng_out_dir'], 'build', env['crosstool_ng_build_id'])
|
||||
env['crosstool_ng_install_dir'] = join(env['crosstool_ng_buildid_dir'], 'install', env['arch'])
|
||||
env['crosstool_ng_bin_dir'] = join(env['crosstool_ng_install_dir'], 'bin')
|
||||
env['crosstool_ng_util_dir'] = join(env['crosstool_ng_buildid_dir'], 'util')
|
||||
env['crosstool_ng_config'] = join(env['crosstool_ng_util_dir'], '.config')
|
||||
env['crosstool_ng_defconfig'] = join(env['crosstool_ng_util_dir'], 'defconfig')
|
||||
env['crosstool_ng_executable'] = join(env['crosstool_ng_util_dir'], 'ct-ng')
|
||||
env['crosstool_ng_source_copy_dir'] = join(env['crosstool_ng_buildid_dir'], 'source')
|
||||
env['crosstool_ng_config'] = join(env['crosstool_ng_source_copy_dir'], '.config')
|
||||
env['crosstool_ng_defconfig'] = join(env['crosstool_ng_source_copy_dir'], 'defconfig')
|
||||
env['crosstool_ng_executable'] = join(env['crosstool_ng_source_copy_dir'], 'ct-ng')
|
||||
env['crosstool_ng_build_dir'] = join(env['crosstool_ng_buildid_dir'], 'build')
|
||||
env['crosstool_ng_download_dir'] = join(env['crosstool_ng_out_dir'], 'download')
|
||||
|
||||
|
||||
@@ -139,7 +139,12 @@ class ShellHelpers:
|
||||
ending = last_newline + ';'
|
||||
return newline_separator.join(out) + ending
|
||||
|
||||
def copy_dir_if_update_non_recursive(self, srcdir, destdir, filter_ext=None):
|
||||
def copy_dir_if_update_non_recursive(
|
||||
self,
|
||||
srcdir,
|
||||
destdir,
|
||||
filter_ext=None
|
||||
):
|
||||
# TODO print rsync equivalent.
|
||||
os.makedirs(destdir, exist_ok=True)
|
||||
for basename in sorted(os.listdir(srcdir)):
|
||||
@@ -153,7 +158,12 @@ class ShellHelpers:
|
||||
):
|
||||
self.cp(src, dest)
|
||||
|
||||
def copy_dir_if_update(self, srcdir, destdir, filter_ext=None):
|
||||
def copy_dir_if_update(
|
||||
self,
|
||||
srcdir,
|
||||
destdir,
|
||||
filter_ext=None
|
||||
):
|
||||
self.copy_dir_if_update_non_recursive(srcdir, destdir, filter_ext)
|
||||
srcdir_abs = os.path.abspath(srcdir)
|
||||
srcdir_abs_len = len(srcdir_abs)
|
||||
|
||||
Submodule submodules/crosstool-ng updated: d5900debd3...b2151f1dba
Reference in New Issue
Block a user