Build gem5 through buildroot

Oh, btw, also make it work, since the build was completely broken since
the recent -K refactoring :0)
This commit is contained in:
Ciro Santilli
2018-03-12 03:46:53 +00:00
parent 7b08433840
commit b8413532a5
6 changed files with 45 additions and 31 deletions

15
build
View File

@@ -100,13 +100,13 @@ BR2_JLEVEL=$j
BR2_ROOTFS_POST_SCRIPT_ARGS=\"$post_script_args\"
" >> "${config_file}"
if "$gem5"; then
printf "BR2_PACKAGE_GEM5=y\n" >> "${config_file}"
if [ -z "$linux_kernel_custom_config_file" ]; then
printf "BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE=\"../kernel_config_${arch_dir}\"" >> "${config_file}"
printf "BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE=\"../kernel_config_${arch_dir}\"\n" >> "${config_file}"
fi
printf "BR2_PACKAGE_GEM5=\"../kernel_config_${arch_dir}\"" >> "${config_file}"
else
if [ -z "$linux_kernel_custom_config_file" ]; then
printf "BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES=\"../kernel_config_fragment\"" >> "${config_file}"
printf "BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES=\"../kernel_config_fragment\"\n" >> "${config_file}"
fi
fi
if [ "$arch" = 'mips64' ]; then
@@ -114,11 +114,8 @@ BR2_ROOTFS_POST_SCRIPT_ARGS=\"$post_script_args\"
# http://lists.busybox.net/pipermail/buildroot/2017-August/201053.html
sed -Ei 's/^BR2_PACKAGE_LINUX_TOOLS_GPIO/BR2_PACKAGE_LINUX_TOOLS_GPIO=n/' "${config_file}"
fi
# TODO why is this needed. Otherwise kernel .config does not change, even though Buildroot
# .config did due to -K. even if we are running linux-kernel-reconfigure!
rm -f "${out_dir}/build/linux-custom/.config"
if [ -n "$linux_kernel_custom_config_file" ]; then
printf "BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE=\"../${linux_kernel_custom_config_file}\"" >> "${config_file}"
printf "BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE=\"../${linux_kernel_custom_config_file}\"\n" >> "${config_file}"
fi
make O="$out_dir" olddefconfig
fi
@@ -147,7 +144,3 @@ cmd="time \
"
echo "$cmd" | tee "${root_dir}/build.log"
eval "$cmd"
if "$gem5"; then
cd "${root_dir}"
./build-gem5 -a "$arch"
fi