mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-23 02:05:57 +01:00
Start sketching parsec buildroot package
This commit is contained in:
29
build
29
build
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user