diff --git a/buildroot_patches/README.md b/buildroot_patches/README.md index 40bfdd4..340433f 100644 --- a/buildroot_patches/README.md +++ b/buildroot_patches/README.md @@ -1,5 +1,7 @@ # Buildroot patches +Every `.patch` file in this directory gets applied to build-root before anything else is done. + Ideally, this directory should be empty, and we should use only built-in Buildroot configuration mechanisms. But alas, life is sometimes not ideal. diff --git a/buildroot_patches/qemu_sdl.patch b/buildroot_patches/qemu_sdl.patch deleted file mode 100644 index e3fb42a..0000000 --- a/buildroot_patches/qemu_sdl.patch +++ /dev/null @@ -1,14 +0,0 @@ -https://bugs.busybox.net/show_bug.cgi?id=9936 - -diff --git a/package/qemu/qemu.mk b/package/qemu/qemu.mk -index 66efcba..1e09ea4 100644 ---- a/package/qemu/qemu.mk -+++ b/package/qemu/qemu.mk -@@ -74,6 +74,7 @@ HOST_QEMU_SYS_ARCH ?= $(HOST_QEMU_ARCH) - - ifeq ($(BR2_PACKAGE_HOST_QEMU_SYSTEM_MODE),y) - HOST_QEMU_TARGETS += $(HOST_QEMU_SYS_ARCH)-softmmu -+HOST_QEMU_OPTS += --enable-sdl --with-sdlabi=2.0 - HOST_QEMU_OPTS += --enable-system --enable-fdt - HOST_QEMU_DEPENDENCIES += host-dtc - else diff --git a/run b/run index 5e91113..551885d 100755 --- a/run +++ b/run @@ -19,15 +19,21 @@ case "$arch" in defconfig=qemu_arm_versatile_defconfig ;; esac -for p in ../buildroot_patches/*.patch; do - patch -N -r - -p 1 <"../buildroot_patches/${p}" || : +for p in "$(find '../buildroot_patches/' -maxdepth 1 -name '*.patch' -print)"; do + patch -N -r - -p 1 <"$p" || : done make BR2_EXTERNAL="$(pwd)/../kernel_module" "$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 >> .config -# TODO there is no make host_qemu-rebuild ? -rm -f output/build/host-qemu-2.7.0/.stamp_built -env -u LD_LIBRARY_PATH make BR2_JLEVEL="$(($(nproc) - 2))" kernel_module-rebuild all +env \ + -u LD_LIBRARY_PATH \ + make \ + BR2_JLEVEL="$(($(nproc) - 2))" \ + HOST_QEMU_OPTS="--enable-sdl --with-sdlabi=2.0" \ + host-qemu-rebuild \ + kernel_module-rebuild \ + all \ +; cd .. ./runqemu "$@"