Make X11 optional

This commit is contained in:
Ciro Santilli
2017-11-01 14:18:31 +00:00
parent bb10d0e914
commit fa5c64a0b0
5 changed files with 35 additions and 21 deletions

View File

@@ -75,22 +75,3 @@ BR2_PACKAGE_HOST_DTC=y
# which for our pci_min device fires interrupts. # which for our pci_min device fires interrupts.
# #
BR2_PACKAGE_PCIUTILS=y 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

View File

@@ -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

7
run
View File

@@ -2,6 +2,7 @@
set -e set -e
arch='x86_64' arch='x86_64'
extra_targets='' extra_targets=''
x11=false
while getopts a:t: OPT > /dev/null 2>&1; do while getopts a:t: OPT > /dev/null 2>&1; do
case "$OPT" in case "$OPT" in
'a') 'a')
@@ -10,6 +11,9 @@ while getopts a:t: OPT > /dev/null 2>&1; do
't') 't')
extra_targets="$extra_args $OPTARG" extra_targets="$extra_args $OPTARG"
;; ;;
'x')
x11=true
;;
esac esac
done done
case "$arch" in 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. # TODO Can't get rid of this for now.
# http://stackoverflow.com/questions/44078245/is-it-possible-to-use-config-fragments-with-buildroots-config # http://stackoverflow.com/questions/44078245/is-it-possible-to-use-config-fragments-with-buildroots-config
cat ../buildroot_config_fragment >> "${outdir}/.config" cat ../buildroot_config_fragment >> "${outdir}/.config"
if $x11; then
cat ../buildroot_config_fragment_x11 >> "${outdir}/.config"
fi
make O="$outdir" olddefconfig make O="$outdir" olddefconfig
# HOST_QEMU_OPTS is a hack that happens to work because the QEMU package luckly uses += at all times. # 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 # It shouldn't be necessary in the first place: https://bugs.busybox.net/show_bug.cgi?id=9936

View File

@@ -12,7 +12,7 @@ nographic=false
# printk.time=y: log in format: "[time ] msg" for all printk messages. # printk.time=y: log in format: "[time ] msg" for all printk messages.
extra_append='norandmaps printk.devkmsg=on printk.time=y' extra_append='norandmaps printk.devkmsg=on printk.time=y'
extra_flags='' extra_flags=''
while getopts a:de:knqt: OPT; do while getopts a:de:knqt:x OPT; do
case "$OPT" in case "$OPT" in
a) a)
arch="$OPTARG" arch="$OPTARG"

10
x11.md
View File

@@ -1,6 +1,14 @@
# X11 # 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 startx