From fa5c64a0b0ece4299ff4287048dcefa3b14f37d8 Mon Sep 17 00:00:00 2001 From: Ciro Santilli Date: Wed, 1 Nov 2017 14:18:31 +0000 Subject: [PATCH] Make X11 optional --- buildroot_config_fragment | 19 ------------------- buildroot_config_fragment_x11 | 18 ++++++++++++++++++ run | 7 +++++++ runqemu | 2 +- x11.md | 10 +++++++++- 5 files changed, 35 insertions(+), 21 deletions(-) create mode 100644 buildroot_config_fragment_x11 diff --git a/buildroot_config_fragment b/buildroot_config_fragment index 1d09ab9..c3525bd 100644 --- a/buildroot_config_fragment +++ b/buildroot_config_fragment @@ -75,22 +75,3 @@ BR2_PACKAGE_HOST_DTC=y # which for our pci_min device fires interrupts. # BR2_PACKAGE_PCIUTILS=y - -# X11 -# https://unix.stackexchange.com/questions/70931/how-to-install-x11-on-my-own-linux-buildroot-system/306116#306116 -BR2_PACKAGE_XAPP_TWM=y -BR2_PACKAGE_XAPP_XCALC=y -BR2_PACKAGE_XAPP_XCLOCK=y -BR2_PACKAGE_XAPP_XEYES=y -BR2_PACKAGE_XAPP_XINIT=y -BR2_PACKAGE_XDRIVER_XF86_INPUT_KEYBOARD=y -BR2_PACKAGE_XDRIVER_XF86_INPUT_MOUSE=y -BR2_PACKAGE_XDRIVER_XF86_VIDEO_CIRRUS=y -BR2_PACKAGE_XDRIVER_XF86_VIDEO_FBDEV=y -BR2_PACKAGE_XDRIVER_XF86_VIDEO_VESA=y -BR2_PACKAGE_XORG7=y -BR2_PACKAGE_XSERVER_XORG_SERVER=y -BR2_PACKAGE_XTERM=y -BR2_TOOLCHAIN_BUILDROOT_CXX=y -BR2_TOOLCHAIN_BUILDROOT_WCHAR=y -BR2_USE_WCHAR=y diff --git a/buildroot_config_fragment_x11 b/buildroot_config_fragment_x11 new file mode 100644 index 0000000..7ecfcdf --- /dev/null +++ b/buildroot_config_fragment_x11 @@ -0,0 +1,18 @@ +# X11 +# https://unix.stackexchange.com/questions/70931/how-to-install-x11-on-my-own-linux-buildroot-system/306116#306116 +BR2_PACKAGE_XAPP_TWM=y +BR2_PACKAGE_XAPP_XCALC=y +BR2_PACKAGE_XAPP_XCLOCK=y +BR2_PACKAGE_XAPP_XEYES=y +BR2_PACKAGE_XAPP_XINIT=y +BR2_PACKAGE_XDRIVER_XF86_INPUT_KEYBOARD=y +BR2_PACKAGE_XDRIVER_XF86_INPUT_MOUSE=y +BR2_PACKAGE_XDRIVER_XF86_VIDEO_CIRRUS=y +BR2_PACKAGE_XDRIVER_XF86_VIDEO_FBDEV=y +BR2_PACKAGE_XDRIVER_XF86_VIDEO_VESA=y +BR2_PACKAGE_XORG7=y +BR2_PACKAGE_XSERVER_XORG_SERVER=y +BR2_PACKAGE_XTERM=y +BR2_TOOLCHAIN_BUILDROOT_CXX=y +BR2_TOOLCHAIN_BUILDROOT_WCHAR=y +BR2_USE_WCHAR=y diff --git a/run b/run index 0be754b..2941678 100755 --- a/run +++ b/run @@ -2,6 +2,7 @@ set -e arch='x86_64' extra_targets='' +x11=false while getopts a:t: OPT > /dev/null 2>&1; do case "$OPT" in 'a') @@ -10,6 +11,9 @@ while getopts a:t: OPT > /dev/null 2>&1; do 't') extra_targets="$extra_args $OPTARG" ;; + 'x') + x11=true + ;; esac done case "$arch" in @@ -40,6 +44,9 @@ make O="$outdir" 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 >> "${outdir}/.config" +if $x11; then + cat ../buildroot_config_fragment_x11 >> "${outdir}/.config" +fi make O="$outdir" olddefconfig # HOST_QEMU_OPTS is a hack that happens to work because the QEMU package luckly uses += at all times. # It shouldn't be necessary in the first place: https://bugs.busybox.net/show_bug.cgi?id=9936 diff --git a/runqemu b/runqemu index d1b8346..5f1dc0f 100755 --- a/runqemu +++ b/runqemu @@ -12,7 +12,7 @@ nographic=false # printk.time=y: log in format: "[time ] msg" for all printk messages. extra_append='norandmaps printk.devkmsg=on printk.time=y' extra_flags='' -while getopts a:de:knqt: OPT; do +while getopts a:de:knqt:x OPT; do case "$OPT" in a) arch="$OPTARG" diff --git a/x11.md b/x11.md index ffa6bd8..537fae7 100644 --- a/x11.md +++ b/x11.md @@ -1,6 +1,14 @@ # X11 -Only tested successfully in `x86_64`: +Only tested successfully in `x86_64`. + +Build: + + ./run -x + +We don't build X11 by default because it takes a considerable amount of time, and is not expected to be used by most users. + +Inside QEMU: startx