From fd90dcb6f99bd3f60ffde2778d76210f04f96bc5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ciro=20Santilli=20=E5=85=AD=E5=9B=9B=E4=BA=8B=E4=BB=B6=20?= =?UTF-8?q?=E6=B3=95=E8=BD=AE=E5=8A=9F?= Date: Tue, 22 Jan 2019 00:00:00 +0000 Subject: [PATCH] bak --- README.adoc | 8 ++++---- bench-all | 2 +- build | 20 +++++++++----------- release | 3 +-- 4 files changed, 15 insertions(+), 18 deletions(-) diff --git a/README.adoc b/README.adoc index 2dee3b3..83afd05 100644 --- a/README.adoc +++ b/README.adoc @@ -2918,9 +2918,7 @@ The target Linux kernel of the executable is a GCC toolchain build-time configur First let's run a dynamically linked executable built with the Buildroot toolchain: .... -./build-qemu --arch aarch64 --user-mode -./build-userland --arch aarch64 -./build-buildroot --arch aarch64 +./build --arch aarch64 user-mode-qemu ./run \ --arch aarch64 \ --userland print_argv \ @@ -2935,7 +2933,9 @@ asdf qw er .... -This runs link:userland/print_argv.c[]. `--user-mode` path resolution is analogous to <>. +This runs link:userland/print_argv.c[]. + +`./run --userland` path resolution is analogous to <>. `./build-userland` is further documented at: <>. diff --git a/bench-all b/bench-all index 1abf801..1abd40f 100755 --- a/bench-all +++ b/bench-all @@ -116,7 +116,7 @@ fi if "$bench_linux_boot"; then cd "${root_dir}" - "${root_dir}/build" --all + "${root_dir}/build" --all-archs all "${root_dir}/bench-boot" --size 3 cp "$(${root_dir}/getvar bench_boot)" "$new_dir" fi diff --git a/build b/build index ef65c18..b311b59 100755 --- a/build +++ b/build @@ -103,6 +103,7 @@ This is equivalent to: }, ) buildroot_overlay_qemu_component = copy.copy(buildroot_component) + # We need to build QEMU before the final Buildroot to get qemu-img. buildroot_overlay_qemu_component.dependencies = ['overlay', 'qemu'] buildroot_overlay_gem5_component = copy.copy(buildroot_component) buildroot_overlay_gem5_component.dependencies = ['overlay-gem5'] @@ -167,6 +168,9 @@ This is equivalent to: dependencies=['crosstool-ng'], ), 'buildroot': buildroot_component, + # We need those to avoid cirtulcar dependencies, since we need to run Buildroot + # twice: once to get the toolchain, and a second time to put the overlay into + # the root filesystem. 'buildroot-overlay-qemu': buildroot_overlay_qemu_component, 'buildroot-overlay-gem5': buildroot_overlay_gem5_component, 'copy-overlay': _Component( @@ -279,6 +283,9 @@ This is equivalent to: ], supported_archs=common.consts['crosstool_ng_supported_archs'], ), + 'user-mode-qemu': _Component( + dependencies=['qemu-user', 'userland'], + ), 'userland': _Component( self._build_file('build-userland'), dependencies=['buildroot'], @@ -286,13 +293,6 @@ This is equivalent to: } self.component_to_name_map = {self.name_to_component_map[key]:key for key in self.name_to_component_map} - self.add_argument( - '--all', - default=False, - help='''\ -Build absolutely everything for all archs. -''' - ) self.add_argument( '--download-dependencies', default=False, @@ -342,9 +342,7 @@ Which components to build. Default: qemu-buildroot # Decide components. components = self.env['components'] - if self.env['all']: - components = ['all'] - elif components == []: + if components == []: components = ['qemu-buildroot'] selected_components = [] for component_name in components: @@ -356,7 +354,7 @@ Which components to build. Default: qemu-buildroot todo.extend(component.dependencies) # Remove duplicates, keep only the first one of each. # https://stackoverflow.com/questions/7961363/removing-duplicates-in-lists/7961390#7961390 - collections.OrderedDict.fromkeys(selected_components) + selected_components = collections.OrderedDict.fromkeys(selected_components) if self.env['download_dependencies']: apt_get_pkgs = { diff --git a/release b/release index 2c8d4de..2b6cc31 100755 --- a/release +++ b/release @@ -23,8 +23,7 @@ start_time = time.time() # installed in random experiments. And with EXT2: we can't easily # know what the smallest root filesystem size is and use it either... # https://stackoverflow.com/questions/47320800/how-to-clean-only-target-in-buildroot -subprocess.check_call([os.path.join(kwargs['root_dir'], 'configure'), '--all']) -subprocess.check_call([os.path.join(kwargs['root_dir'], 'build'), '--all-archs', 'release']) +subprocess.check_call([os.path.join(kwargs['root_dir'], 'build'), '--all-archs', '--download-dependencies', 'release']) release_zip.main() subprocess.check_call(['git', 'push']) release_upload.main()