This commit is contained in:
Ciro Santilli 六四事件 法轮功
2019-01-22 00:00:00 +00:00
parent d41f7d9d23
commit fd90dcb6f9
4 changed files with 15 additions and 18 deletions

View File

@@ -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 <<baremetal-setup-getting-started,that of `./run --baremetal`>>.
This runs link:userland/print_argv.c[].
`./run --userland` path resolution is analogous to <<baremetal-setup-getting-started,that of `./run --baremetal`>>.
`./build-userland` is further documented at: <<userland-directory>>.

View File

@@ -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

20
build
View File

@@ -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 = {

View File

@@ -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()