Start sketching parsec buildroot package

This commit is contained in:
Ciro Santilli
2018-03-02 08:26:38 +00:00
parent c482a682d2
commit 6e15dcb60e
12 changed files with 93 additions and 27 deletions

29
build
View File

@@ -19,6 +19,9 @@ while getopts 'a:gj:lp:qSt:v' OPT; do
j)
j="$OPTARG"
;;
l)
extra_targets="$extra_args kernel_module-reconfigure"
;;
l)
extra_targets="$extra_args linux-reconfigure"
;;
@@ -64,14 +67,15 @@ if "$gem5"; then
post_script_args="$post_script_args -n"
fi
rootdir="$(pwd)"
cd kernel_module
./make-host.sh -j "$j" clean
cd ../buildroot
for p in $(find '../buildroot_patches/' -maxdepth 1 -name '*.patch' -print); do
cd "$rootdir/buildroot"
for p in $(find "${rootdir}/buildroot_patches/" -maxdepth 1 -name '*.patch' -print); do
patch -N -r - -p 1 <"$p" || :
done
outdir="output.${arch_dir}~"
make O="$outdir" BR2_EXTERNAL="$(pwd)/../kernel_module:$(pwd)/../gem5" "$defconfig"
make O="$outdir" BR2_EXTERNAL="${rootdir}/kernel_module:${rootdir}/gem5:${rootdir}/parsec" "$defconfig"
# TODO Can't get rid of this for now.
# http://stackoverflow.com/questions/44078245/is-it-possible-to-use-config-fragments-with-buildroots-config
cat ../buildroot_config_fragment >> "${outdir}/.config"
@@ -101,20 +105,21 @@ make O="$outdir" olddefconfig
#
# Even if were an autotools package, there is no general way currently to pass extra configs to it:
# https://stackoverflow.com/questions/44341188/how-to-pass-extra-custom-configure-autotools-options-to-a-buildroot-package/44341225#44341225
time \
cmd="time \
env \
-u LD_LIBRARY_PATH \
make \
O="$outdir" \
BR2_JLEVEL="$j" \
BR2_PACKAGE_GEM5="$("$gem5" && echo y || echo n)" \
BR2_ROOTFS_POST_SCRIPT_ARGS="$post_script_args" \
HOST_QEMU_OPTS="--enable-debug --extra-cflags='-DDEBUG_PL061=1' --enable-trace-backends=simple $qemu_sdl" \
V="$v" \
kernel_module-rebuild \
O='$outdir' \
BR2_JLEVEL='$j' \
BR2_PACKAGE_GEM5='$("$gem5" && echo y || echo n)' \
BR2_ROOTFS_POST_SCRIPT_ARGS='$post_script_args' \
HOST_QEMU_OPTS='--enable-debug --extra-cflags=-DDEBUG_PL061=1 --enable-trace-backends=simple $qemu_sdl' \
V='$v' \
$extra_targets \
all \
;
"
echo "$cmd" | tee "${rootdir}/build.log"
eval "$cmd"
cd ..
if "$gem5"; then
./build-gem5 -a "$arch"