* [Buildroot] [PATCH 20/27] package/qemu: add support for USB redirection
From: Yann E. MORIN @ 2012-12-16 17:01 UTC (permalink / raw)
To: buildroot
In-Reply-To: <cover.1355677144.git.yann.morin.1998@free.fr>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
---
package/qemu/Config.in | 9 +++++++++
package/qemu/qemu.mk | 8 +++++++-
2 files changed, 16 insertions(+), 1 deletions(-)
diff --git a/package/qemu/Config.in b/package/qemu/Config.in
index a10abb1..322066b 100644
--- a/package/qemu/Config.in
+++ b/package/qemu/Config.in
@@ -155,6 +155,15 @@ config BR2_PACKAGE_QEMU_ISCSI
help
Say 'y' here to have QEMU use iSCSI targets as block-devices.
+config BR2_PACKAGE_QEMU_USBREDIR
+ bool "Enable USB redirection"
+ depends on BR2_PACKAGE_USBREDIR
+ help
+ Say 'y' here to have QEMU support USB redirection over the network.
+
+comment "USB redirection requires usbredir"
+ depends on !BR2_PACKAGE_USBREDIR
+
config BR2_PACKAGE_QEMU_AIO
bool "Enable AIO"
depends on BR2_PACKAGE_LIBAIO
diff --git a/package/qemu/qemu.mk b/package/qemu/qemu.mk
index 4920e12..3186624 100644
--- a/package/qemu/qemu.mk
+++ b/package/qemu/qemu.mk
@@ -176,6 +176,13 @@ else
QEMU_OPTS += --disable-libiscsi
endif
+ifeq ($(BR2_PACKAGE_QEMU_USBREDIR),y)
+QEMU_OPTS += --enable-usb-redir
+QEMU_DEPENDENCIES += usbredir
+else
+QEMU_OPTS += --disable-usb-redir
+endif
+
ifeq ($(BR2_PACKAGE_QEMU_AIO),y)
QEMU_OPTS += --enable-linux-aio
QEMU_DEPENDENCIES += libaio
@@ -308,7 +315,6 @@ define QEMU_CONFIGURE_CMDS
--disable-docs \
--disable-spice \
--disable-rbd \
- --disable-usb-redir \
--disable-smartcard \
--disable-strip \
--disable-seccomp \
--
1.7.2.5
^ permalink raw reply related
* [Buildroot] [PATCH 19/27] package/qemu: add iSCSI support
From: Yann E. MORIN @ 2012-12-16 17:01 UTC (permalink / raw)
To: buildroot
In-Reply-To: <cover.1355677144.git.yann.morin.1998@free.fr>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
---
package/qemu/Config.in | 6 ++++++
package/qemu/qemu.mk | 8 +++++++-
2 files changed, 13 insertions(+), 1 deletions(-)
diff --git a/package/qemu/Config.in b/package/qemu/Config.in
index 38bb290..a10abb1 100644
--- a/package/qemu/Config.in
+++ b/package/qemu/Config.in
@@ -149,6 +149,12 @@ config BR2_PACKAGE_QEMU_CURL
comment "cURL support is not possible with static linking"
depends on BR2_PREFER_STATIC_LIB
+config BR2_PACKAGE_QEMU_ISCSI
+ bool "Enable remote block-devices using iSCSI"
+ select BR2_PACKAGE_LIBISCSI
+ help
+ Say 'y' here to have QEMU use iSCSI targets as block-devices.
+
config BR2_PACKAGE_QEMU_AIO
bool "Enable AIO"
depends on BR2_PACKAGE_LIBAIO
diff --git a/package/qemu/qemu.mk b/package/qemu/qemu.mk
index b84473b..4920e12 100644
--- a/package/qemu/qemu.mk
+++ b/package/qemu/qemu.mk
@@ -169,6 +169,13 @@ else
QEMU_OPTS += --disable-curl
endif
+ifeq ($(BR2_PACKAGE_QEMU_ISCSI),y)
+QEMU_OPTS += --enable-libiscsi
+QEMU_DEPENDENCIES += libiscsi
+else
+QEMU_OPTS += --disable-libiscsi
+endif
+
ifeq ($(BR2_PACKAGE_QEMU_AIO),y)
QEMU_OPTS += --enable-linux-aio
QEMU_DEPENDENCIES += libaio
@@ -301,7 +308,6 @@ define QEMU_CONFIGURE_CMDS
--disable-docs \
--disable-spice \
--disable-rbd \
- --disable-libiscsi \
--disable-usb-redir \
--disable-smartcard \
--disable-strip \
--
1.7.2.5
^ permalink raw reply related
* [Buildroot] [PATCH 18/27] package/qemu: add support for VDE switches
From: Yann E. MORIN @ 2012-12-16 17:01 UTC (permalink / raw)
To: buildroot
In-Reply-To: <cover.1355677144.git.yann.morin.1998@free.fr>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
---
package/qemu/Config.in | 7 +++++++
package/qemu/qemu.mk | 8 +++++++-
2 files changed, 14 insertions(+), 1 deletions(-)
diff --git a/package/qemu/Config.in b/package/qemu/Config.in
index c91ce33..38bb290 100644
--- a/package/qemu/Config.in
+++ b/package/qemu/Config.in
@@ -169,6 +169,13 @@ config BR2_PACKAGE_QEMU_BLUEZ
comment "BlueZ connectivity depends on bluez-utils"
depends on !BR2_PACKAGE_BLUEZ_UTILS
+config BR2_PACKAGE_QEMU_VDE
+ bool "Enable VDE"
+ select BR2_PACKAGE_VDE2
+ help
+ Say 'y' here to have QEMU connect to VDE (Virtual Distributed
+ Ethernet) switches.
+
comment "Misc. features"
config BR2_PACKAGE_QEMU_UUID
diff --git a/package/qemu/qemu.mk b/package/qemu/qemu.mk
index 2a39ae0..b84473b 100644
--- a/package/qemu/qemu.mk
+++ b/package/qemu/qemu.mk
@@ -183,6 +183,13 @@ else
QEMU_OPTS += --disable-bluez
endif
+ifeq ($(BR2_PACKAGE_QEMU_VDE),y)
+QEMU_OPTS += --enable-vde
+QEMU_DEPENDENCIES += vde2
+else
+QEMU_OPTS += --disable-vde
+endif
+
ifeq ($(BR2_PACKAGE_QEMU_UUID),y)
QEMU_OPTS += --enable-uuid
QEMU_DEPENDENCIES += util-linux
@@ -291,7 +298,6 @@ define QEMU_CONFIGURE_CMDS
--disable-brlapi \
--disable-fdt \
--disable-guest-base \
- --disable-vde \
--disable-docs \
--disable-spice \
--disable-rbd \
--
1.7.2.5
^ permalink raw reply related
* [Buildroot] [PATCH 17/27] package/qemu: add AIO support
From: Yann E. MORIN @ 2012-12-16 17:01 UTC (permalink / raw)
To: buildroot
In-Reply-To: <cover.1355677144.git.yann.morin.1998@free.fr>
Add support for Asynchronous Input/Ouput (AIO).
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
---
package/qemu/Config.in | 9 +++++++++
package/qemu/qemu.mk | 8 +++++++-
2 files changed, 16 insertions(+), 1 deletions(-)
diff --git a/package/qemu/Config.in b/package/qemu/Config.in
index d912036..c91ce33 100644
--- a/package/qemu/Config.in
+++ b/package/qemu/Config.in
@@ -149,6 +149,15 @@ config BR2_PACKAGE_QEMU_CURL
comment "cURL support is not possible with static linking"
depends on BR2_PREFER_STATIC_LIB
+config BR2_PACKAGE_QEMU_AIO
+ bool "Enable AIO"
+ depends on BR2_PACKAGE_LIBAIO
+ help
+ Say 'y' here to enable Asynchronous Input/Output (AIO).
+
+comment "AIO support depends on libaio"
+ depends on !BR2_PACKAGE_LIBAIO
+
comment "Networking"
config BR2_PACKAGE_QEMU_BLUEZ
diff --git a/package/qemu/qemu.mk b/package/qemu/qemu.mk
index 7603158..2a39ae0 100644
--- a/package/qemu/qemu.mk
+++ b/package/qemu/qemu.mk
@@ -169,6 +169,13 @@ else
QEMU_OPTS += --disable-curl
endif
+ifeq ($(BR2_PACKAGE_QEMU_AIO),y)
+QEMU_OPTS += --enable-linux-aio
+QEMU_DEPENDENCIES += libaio
+else
+QEMU_OPTS += --disable-linux-aio
+endif
+
ifeq ($(BR2_PACKAGE_QEMU_BLUEZ),y)
QEMU_OPTS += --enable-bluez
QEMU_DEPENDENCIES += bluez_utils
@@ -285,7 +292,6 @@ define QEMU_CONFIGURE_CMDS
--disable-fdt \
--disable-guest-base \
--disable-vde \
- --disable-linux-aio \
--disable-docs \
--disable-spice \
--disable-rbd \
--
1.7.2.5
^ permalink raw reply related
* [Buildroot] [PATCH 16/27] package/qemu: add BlueZ connectivity
From: Yann E. MORIN @ 2012-12-16 17:01 UTC (permalink / raw)
To: buildroot
In-Reply-To: <cover.1355677144.git.yann.morin.1998@free.fr>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
---
package/qemu/Config.in | 11 +++++++++++
package/qemu/qemu.mk | 8 +++++++-
2 files changed, 18 insertions(+), 1 deletions(-)
diff --git a/package/qemu/Config.in b/package/qemu/Config.in
index 15239a7..d912036 100644
--- a/package/qemu/Config.in
+++ b/package/qemu/Config.in
@@ -149,6 +149,17 @@ config BR2_PACKAGE_QEMU_CURL
comment "cURL support is not possible with static linking"
depends on BR2_PREFER_STATIC_LIB
+comment "Networking"
+
+config BR2_PACKAGE_QEMU_BLUEZ
+ bool "Enable BlueZ connectivity"
+ depends on BR2_PACKAGE_BLUEZ_UTILS
+ help
+ Say 'y' here to enable BlueZ (bluetooth) connectivity in QEMU.
+
+comment "BlueZ connectivity depends on bluez-utils"
+ depends on !BR2_PACKAGE_BLUEZ_UTILS
+
comment "Misc. features"
config BR2_PACKAGE_QEMU_UUID
diff --git a/package/qemu/qemu.mk b/package/qemu/qemu.mk
index 0db3b70..7603158 100644
--- a/package/qemu/qemu.mk
+++ b/package/qemu/qemu.mk
@@ -169,6 +169,13 @@ else
QEMU_OPTS += --disable-curl
endif
+ifeq ($(BR2_PACKAGE_QEMU_BLUEZ),y)
+QEMU_OPTS += --enable-bluez
+QEMU_DEPENDENCIES += bluez_utils
+else
+QEMU_OPTS += --disable-bluez
+endif
+
ifeq ($(BR2_PACKAGE_QEMU_UUID),y)
QEMU_OPTS += --enable-uuid
QEMU_DEPENDENCIES += util-linux
@@ -276,7 +283,6 @@ define QEMU_CONFIGURE_CMDS
--disable-vnc-sasl \
--disable-brlapi \
--disable-fdt \
- --disable-bluez \
--disable-guest-base \
--disable-vde \
--disable-linux-aio \
--
1.7.2.5
^ permalink raw reply related
* [Buildroot] [PATCH 15/27] package/qemu: enable use of the curses frontend
From: Yann E. MORIN @ 2012-12-16 17:01 UTC (permalink / raw)
To: buildroot
In-Reply-To: <cover.1355677144.git.yann.morin.1998@free.fr>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
---
package/qemu/Config.in | 11 +++++++++++
package/qemu/qemu.mk | 8 +++++++-
2 files changed, 18 insertions(+), 1 deletions(-)
diff --git a/package/qemu/Config.in b/package/qemu/Config.in
index 47857ec..15239a7 100644
--- a/package/qemu/Config.in
+++ b/package/qemu/Config.in
@@ -112,6 +112,17 @@ config BR2_PACKAGE_QEMU_SDL
Say 'y' to enable the SDL frontend, that is, a graphical window
presenting the VM's display.
+config BR2_PACKAGE_QEMU_CURSES
+ bool "Enable the curses frontend"
+ select BR2_PACKAGE_NCURSES
+ help
+ Say 'y' to use curses to display the text-mode of VGA outpout.
+
+ If the VM's graphic adapter does not support VGA text-mode, or it
+ is in graphical mode, then nothing will be displayed with this
+ frontend (although you can still use the SDL or VNC frontends to
+ display the graphical output).
+
comment "Block backends"
config BR2_PACKAGE_QEMU_VIRTFS
diff --git a/package/qemu/qemu.mk b/package/qemu/qemu.mk
index 5064ab8..0db3b70 100644
--- a/package/qemu/qemu.mk
+++ b/package/qemu/qemu.mk
@@ -149,6 +149,13 @@ else
QEMU_OPTS += --disable-sdl
endif
+ifeq ($(BR2_PACKAGE_QEMU_CURSES),y)
+QEMU_OPTS += --enable-curses
+QEMU_DEPENDENCIES += ncurses
+else
+QEMU_OPTS += --disable-curses
+endif
+
ifeq ($(BR2_PACKAGE_QEMU_VIRTFS),y)
QEMU_OPTS += --enable-virtfs
else
@@ -268,7 +275,6 @@ define QEMU_CONFIGURE_CMDS
--disable-slirp \
--disable-vnc-sasl \
--disable-brlapi \
- --disable-curses \
--disable-fdt \
--disable-bluez \
--disable-guest-base \
--
1.7.2.5
^ permalink raw reply related
* [Buildroot] [PATCH 14/27] package/qemu: add support for cURL
From: Yann E. MORIN @ 2012-12-16 17:01 UTC (permalink / raw)
To: buildroot
In-Reply-To: <cover.1355677144.git.yann.morin.1998@free.fr>
QEMU can use libcurl as a block backend, to access remote block devices.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
---
package/qemu/Config.in | 10 ++++++++++
package/qemu/qemu.mk | 8 +++++++-
2 files changed, 17 insertions(+), 1 deletions(-)
diff --git a/package/qemu/Config.in b/package/qemu/Config.in
index 237fb7b..47857ec 100644
--- a/package/qemu/Config.in
+++ b/package/qemu/Config.in
@@ -128,6 +128,16 @@ config BR2_PACKAGE_QEMU_VIRTFS
file-system called 9p, and can be accelerated by using the 9p
virtio).
+config BR2_PACKAGE_QEMU_CURL
+ bool "Enable remote block-devices using cURL"
+ depends on !BR2_PREFER_STATIC_LIB
+ select BR2_PACKAGE_LIBCURL
+ help
+ Say 'y' to access remote block-devices using libcurl.
+
+comment "cURL support is not possible with static linking"
+ depends on BR2_PREFER_STATIC_LIB
+
comment "Misc. features"
config BR2_PACKAGE_QEMU_UUID
diff --git a/package/qemu/qemu.mk b/package/qemu/qemu.mk
index 0eda434..5064ab8 100644
--- a/package/qemu/qemu.mk
+++ b/package/qemu/qemu.mk
@@ -155,6 +155,13 @@ else
QEMU_OPTS += --disable-virtfs
endif
+ifeq ($(BR2_PACKAGE_QEMU_CURL),y)
+QEMU_OPTS += --enable-curl
+QEMU_DEPENDENCIES += libcurl
+else
+QEMU_OPTS += --disable-curl
+endif
+
ifeq ($(BR2_PACKAGE_QEMU_UUID),y)
QEMU_OPTS += --enable-uuid
QEMU_DEPENDENCIES += util-linux
@@ -262,7 +269,6 @@ define QEMU_CONFIGURE_CMDS
--disable-vnc-sasl \
--disable-brlapi \
--disable-curses \
- --disable-curl \
--disable-fdt \
--disable-bluez \
--disable-guest-base \
--
1.7.2.5
^ permalink raw reply related
* [Buildroot] [PATCH 13/27] package/qemu: add support for virtfs
From: Yann E. MORIN @ 2012-12-16 17:01 UTC (permalink / raw)
To: buildroot
In-Reply-To: <cover.1355677144.git.yann.morin.1998@free.fr>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
---
package/qemu/Config.in | 16 ++++++++++++++++
package/qemu/qemu.mk | 7 ++++++-
2 files changed, 22 insertions(+), 1 deletions(-)
diff --git a/package/qemu/Config.in b/package/qemu/Config.in
index 138949c..237fb7b 100644
--- a/package/qemu/Config.in
+++ b/package/qemu/Config.in
@@ -112,6 +112,22 @@ config BR2_PACKAGE_QEMU_SDL
Say 'y' to enable the SDL frontend, that is, a graphical window
presenting the VM's display.
+comment "Block backends"
+
+config BR2_PACKAGE_QEMU_VIRTFS
+ bool "Enable plan9 ressources using VirtFS"
+ select BR2_PACKAGE_QEMU_CAP
+ select BR2_PACKAGE_QEMU_ATTR
+ help
+ Say 'y' here if you want QEMU to provide a plan9 virtual "share"
+ accessible from the guest OS for relatively fast access to host
+ files.
+
+ This requires that the guest OS is capable of accessing plan9
+ ressources (typically, in Linux, this is done by a network
+ file-system called 9p, and can be accelerated by using the 9p
+ virtio).
+
comment "Misc. features"
config BR2_PACKAGE_QEMU_UUID
diff --git a/package/qemu/qemu.mk b/package/qemu/qemu.mk
index 00f90b7..0eda434 100644
--- a/package/qemu/qemu.mk
+++ b/package/qemu/qemu.mk
@@ -149,6 +149,12 @@ else
QEMU_OPTS += --disable-sdl
endif
+ifeq ($(BR2_PACKAGE_QEMU_VIRTFS),y)
+QEMU_OPTS += --enable-virtfs
+else
+QEMU_OPTS += --disable-virtfs
+endif
+
ifeq ($(BR2_PACKAGE_QEMU_UUID),y)
QEMU_OPTS += --enable-uuid
QEMU_DEPENDENCIES += util-linux
@@ -254,7 +260,6 @@ define QEMU_CONFIGURE_CMDS
--disable-xen \
--disable-slirp \
--disable-vnc-sasl \
- --disable-virtfs \
--disable-brlapi \
--disable-curses \
--disable-curl \
--
1.7.2.5
^ permalink raw reply related
* [Buildroot] [PATCH 12/27] package/qemu: add attr/xattr option
From: Yann E. MORIN @ 2012-12-16 17:01 UTC (permalink / raw)
To: buildroot
In-Reply-To: <cover.1355677144.git.yann.morin.1998@free.fr>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
---
package/qemu/Config.in | 6 ++++++
package/qemu/qemu.mk | 7 ++++++-
2 files changed, 12 insertions(+), 1 deletions(-)
diff --git a/package/qemu/Config.in b/package/qemu/Config.in
index 1ef6c25..138949c 100644
--- a/package/qemu/Config.in
+++ b/package/qemu/Config.in
@@ -131,6 +131,12 @@ config BR2_PACKAGE_QEMU_CAP
help
Say 'y' here if you want QEMU to support capabilities.
+config BR2_PACKAGE_QEMU_ATTR
+ bool "Enable attr and xattr"
+ help
+ Say 'y' here to have QEMU support attributes (attr) and eXtended
+ attibutes (xattr).
+
config BR2_PACKAGE_QEMU_BLOBS
bool "Install binary blobs"
default y
diff --git a/package/qemu/qemu.mk b/package/qemu/qemu.mk
index d64d476..00f90b7 100644
--- a/package/qemu/qemu.mk
+++ b/package/qemu/qemu.mk
@@ -166,6 +166,12 @@ QEMU_OPTS += --disable-cap-ng
QEMU_VARS += cap=no
endif
+ifeq ($(BR2_PACKAGE_QEMU_ATTR),y)
+QEMU_OPTS += --enable-attr
+else
+QEMU_OPTS += --disable-attr
+endif
+
ifeq ($(BR2_PACKAGE_QEMU_BLOBS),)
QEMU_OPTS += --disable-blobs
endif
@@ -243,7 +249,6 @@ define QEMU_CONFIGURE_CMDS
--audio-card-list= \
--enable-kvm \
--enable-nptl \
- --enable-attr \
--enable-vhost-net \
--disable-bsd-user \
--disable-xen \
--
1.7.2.5
^ permalink raw reply related
* [Buildroot] [PATCH 11/27] package/qemu: add support for capabilities
From: Yann E. MORIN @ 2012-12-16 17:01 UTC (permalink / raw)
To: buildroot
In-Reply-To: <cover.1355677144.git.yann.morin.1998@free.fr>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
---
package/qemu/Config.in | 7 +++++++
package/qemu/qemu.mk | 11 ++++++++++-
2 files changed, 17 insertions(+), 1 deletions(-)
diff --git a/package/qemu/Config.in b/package/qemu/Config.in
index 0c4aa0a..1ef6c25 100644
--- a/package/qemu/Config.in
+++ b/package/qemu/Config.in
@@ -124,6 +124,13 @@ config BR2_PACKAGE_QEMU_UUID
comment "UUID support requires util-linux (for libuuid)"
depends on !BR2_PACKAGE_UTIL_LINUX
+config BR2_PACKAGE_QEMU_CAP
+ bool "Enable capabilities"
+ select BR2_PACKAGE_LIBCAP
+ select BR2_PACKAGE_LIBCAP_NG
+ help
+ Say 'y' here if you want QEMU to support capabilities.
+
config BR2_PACKAGE_QEMU_BLOBS
bool "Install binary blobs"
default y
diff --git a/package/qemu/qemu.mk b/package/qemu/qemu.mk
index 41e71da..d64d476 100644
--- a/package/qemu/qemu.mk
+++ b/package/qemu/qemu.mk
@@ -156,6 +156,16 @@ else
QEMU_OPTS += --disable-uuid
endif
+# There's no configure flag to disable use of libcap
+# so we must use an environment variable
+ifeq ($(BR2_PACKAGE_QEMU_CAP),y)
+QEMU_OPTS += --enable-cap-ng
+QEMU_DEPENDENCIES += libcap libcap-ng
+else
+QEMU_OPTS += --disable-cap-ng
+QEMU_VARS += cap=no
+endif
+
ifeq ($(BR2_PACKAGE_QEMU_BLOBS),)
QEMU_OPTS += --disable-blobs
endif
@@ -248,7 +258,6 @@ define QEMU_CONFIGURE_CMDS
--disable-guest-base \
--disable-vde \
--disable-linux-aio \
- --disable-cap-ng \
--disable-docs \
--disable-spice \
--disable-rbd \
--
1.7.2.5
^ permalink raw reply related
* [Buildroot] [PATCH 10/27] package/qemu: add uuid support
From: Yann E. MORIN @ 2012-12-16 17:01 UTC (permalink / raw)
To: buildroot
In-Reply-To: <cover.1355677144.git.yann.morin.1998@free.fr>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
---
package/qemu/Config.in | 10 ++++++++++
package/qemu/qemu.mk | 8 +++++++-
2 files changed, 17 insertions(+), 1 deletions(-)
diff --git a/package/qemu/Config.in b/package/qemu/Config.in
index 5181fdc..0c4aa0a 100644
--- a/package/qemu/Config.in
+++ b/package/qemu/Config.in
@@ -114,6 +114,16 @@ config BR2_PACKAGE_QEMU_SDL
comment "Misc. features"
+config BR2_PACKAGE_QEMU_UUID
+ bool "Enable VMs UUID"
+ depends on BR2_PACKAGE_UTIL_LINUX
+ select BR2_PACKAGE_UTIL_LINUX_LIBUUID
+ help
+ Say 'y' here to have QEMU support UUIDs for VMs.
+
+comment "UUID support requires util-linux (for libuuid)"
+ depends on !BR2_PACKAGE_UTIL_LINUX
+
config BR2_PACKAGE_QEMU_BLOBS
bool "Install binary blobs"
default y
diff --git a/package/qemu/qemu.mk b/package/qemu/qemu.mk
index 8a92b67..41e71da 100644
--- a/package/qemu/qemu.mk
+++ b/package/qemu/qemu.mk
@@ -149,6 +149,13 @@ else
QEMU_OPTS += --disable-sdl
endif
+ifeq ($(BR2_PACKAGE_QEMU_UUID),y)
+QEMU_OPTS += --enable-uuid
+QEMU_DEPENDENCIES += util-linux
+else
+QEMU_OPTS += --disable-uuid
+endif
+
ifeq ($(BR2_PACKAGE_QEMU_BLOBS),)
QEMU_OPTS += --disable-blobs
endif
@@ -239,7 +246,6 @@ define QEMU_CONFIGURE_CMDS
--disable-fdt \
--disable-bluez \
--disable-guest-base \
- --disable-uuid \
--disable-vde \
--disable-linux-aio \
--disable-cap-ng \
--
1.7.2.5
^ permalink raw reply related
* [Buildroot] [PATCH 09/27] package/qemu: add option to remove unwanted keymaps
From: Yann E. MORIN @ 2012-12-16 17:01 UTC (permalink / raw)
To: buildroot
In-Reply-To: <cover.1355677144.git.yann.morin.1998@free.fr>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
---
package/qemu/Config.in | 12 ++++++++++
package/qemu/qemu.mk | 55 ++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 67 insertions(+), 0 deletions(-)
diff --git a/package/qemu/Config.in b/package/qemu/Config.in
index e530303..5181fdc 100644
--- a/package/qemu/Config.in
+++ b/package/qemu/Config.in
@@ -128,4 +128,16 @@ config BR2_PACKAGE_QEMU_BLOBS
Note2: This has nothing to do with the licensing of the blobs;
some (most?) even have a free and/or open source license.
+config BR2_PACKAGE_QEMU_KEYMAPS
+ string "Keymaps to keep"
+ default "all"
+ help
+ Enter the list of keymap(s) to keep. To keep many keymaps, you can
+ use shell globs, or you can enter a space-separated list of keymaps:
+ - empty to remove all keymaps
+ - 'all' to keep all keymaps
+ - 'fr*' to keep all french keymaps
+ - 'de fr* en-*' for german, french and english keymaps
+ - and so on (see the QEMU source for all supported keymaps)
+
endif # BR2_PACKAGE_QEMU
diff --git a/package/qemu/qemu.mk b/package/qemu/qemu.mk
index f2cde9d..8a92b67 100644
--- a/package/qemu/qemu.mk
+++ b/package/qemu/qemu.mk
@@ -153,6 +153,61 @@ ifeq ($(BR2_PACKAGE_QEMU_BLOBS),)
QEMU_OPTS += --disable-blobs
endif
+# Post-install removal of unwanted keymaps:
+# - if we want 'all', we do nothing;
+# - if we want none, we completely remove the keymap dir
+# - otherwise:
+# - we completely remove the keymap dir; and recreate it empty
+# - we recursively copy only those keymaps we want (as keymaps may include
+# some common files)
+#
+# NOTE-1: we need the un-quoted list of keymaps, so it is interpreted as a glob
+# by the shell.
+# NOTE-2: yes, all (current!) keymaps do include the 'common' keymap, which in
+# turn includes the 'modifiers' keymap, so we could unconditionally
+# copy those two, for a much simpler code. Doing it the way it's done
+# is more generic, and will adapt to any future keymaps which has
+# multiple includes, or none.
+# NOTE-3: we can't use $(SED), because it expands to include the '-i' option,
+# which we do *not* want here, because we are not munging a file, but
+# using sed as a enhanced grep.
+#
+QEMU_KEYMAPS = $(call qstrip,$(BR2_PACKAGE_QEMU_KEYMAPS))
+
+ifeq ($(QEMU_KEYMAPS),all) #--- Keep all keymaps ---#
+define QEMU_POST_INSTALL_KEYMAPS
+ @: Nothing
+endef
+
+else ifeq ($(QEMU_KEYMAPS),) #--- Remove all keymaps ---#
+define QEMU_POST_INSTALL_KEYMAPS
+ rm -rf "$(TARGET_DIR)/usr/share/qemu/keymaps"
+endef
+
+else #--- Keep selected keymaps ---#
+define QEMU_POST_INSTALL_KEYMAPS
+ rm -rf "$(TARGET_DIR)/usr/share/qemu/keymaps"
+ mkdir -p "$(TARGET_DIR)/usr/share/qemu/keymaps"
+ add_keymap() { \
+ local k="$${1}"; local dest="$${2}"; \
+ if [ -n "$${k}" -a ! -f "$${dest}/$${k}" ]; then \
+ cp -v "$${k}" "$${dest}"; \
+ for k in $$(sed -r -e '/^include[[:space:]]+(.*)$$/!d;' \
+ -e 's//\1/;' "$${k}" ); do \
+ add_keymap "$${k}" "$${dest}"; \
+ done; \
+ fi; \
+ }; \
+ cd $(@D)/pc-bios/keymaps; \
+ for k in $(QEMU_KEYMAPS); do \
+ add_keymap "$${k}" "$(TARGET_DIR)/usr/share/qemu/keymaps"; \
+ done
+endef
+
+endif # Keymaps to keep
+
+QEMU_POST_INSTALL_TARGET_HOOKS += QEMU_POST_INSTALL_KEYMAPS
+
# Note: although QEMU uses a ./configure script, it is not compatible with
# the traditional autotools options (eg. --target et al.), so we have
# to override the default provided by the autotools-package infra, and
--
1.7.2.5
^ permalink raw reply related
* [Buildroot] [PATCH 08/27] package/qemu: add option to not install blobs
From: Yann E. MORIN @ 2012-12-16 17:01 UTC (permalink / raw)
To: buildroot
In-Reply-To: <cover.1355677144.git.yann.morin.1998@free.fr>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
---
package/qemu/Config.in | 16 ++++++++++++++++
package/qemu/qemu.mk | 4 ++++
2 files changed, 20 insertions(+), 0 deletions(-)
diff --git a/package/qemu/Config.in b/package/qemu/Config.in
index 14c3704..e530303 100644
--- a/package/qemu/Config.in
+++ b/package/qemu/Config.in
@@ -112,4 +112,20 @@ config BR2_PACKAGE_QEMU_SDL
Say 'y' to enable the SDL frontend, that is, a graphical window
presenting the VM's display.
+comment "Misc. features"
+
+config BR2_PACKAGE_QEMU_BLOBS
+ bool "Install binary blobs"
+ default y
+ help
+ Say 'y' here (the default) to install binary blobs (such as BIOS
+ or firmwares for the different machines simulated by QEMU).
+ Say 'n' to not install those blobs.
+
+ Note: Some machines may be unbootable without those blobs.
+ If unsure, say 'y'.
+
+ Note2: This has nothing to do with the licensing of the blobs;
+ some (most?) even have a free and/or open source license.
+
endif # BR2_PACKAGE_QEMU
diff --git a/package/qemu/qemu.mk b/package/qemu/qemu.mk
index 8f3c0e9..f2cde9d 100644
--- a/package/qemu/qemu.mk
+++ b/package/qemu/qemu.mk
@@ -149,6 +149,10 @@ else
QEMU_OPTS += --disable-sdl
endif
+ifeq ($(BR2_PACKAGE_QEMU_BLOBS),)
+QEMU_OPTS += --disable-blobs
+endif
+
# Note: although QEMU uses a ./configure script, it is not compatible with
# the traditional autotools options (eg. --target et al.), so we have
# to override the default provided by the autotools-package infra, and
--
1.7.2.5
^ permalink raw reply related
* [Buildroot] [PATCH 07/27] package/qemu: add VNC TLS-encryption
From: Yann E. MORIN @ 2012-12-16 17:01 UTC (permalink / raw)
To: buildroot
In-Reply-To: <cover.1355677144.git.yann.morin.1998@free.fr>
Only TLS is supported, as buildroot has no package for the SASL library.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
---
package/qemu/Config.in | 11 +++++++++++
package/qemu/qemu.mk | 8 +++++++-
2 files changed, 18 insertions(+), 1 deletions(-)
diff --git a/package/qemu/Config.in b/package/qemu/Config.in
index 74d207c..14c3704 100644
--- a/package/qemu/Config.in
+++ b/package/qemu/Config.in
@@ -94,6 +94,17 @@ config BR2_PACKAGE_QEMU_VNC_JPEG
depends on BR2_PACKAGE_QEMU_VNC
select BR2_PACKAGE_JPEG
+# TLS does not work with static link, because the gnutls .pc is missing a
+# dependency on libintl... :-(
+config BR2_PACKAGE_QEMU_VNC_TLS
+ bool "TLS encryption"
+ depends on BR2_PACKAGE_QEMU_VNC
+ depends on !BR2_PREFER_STATIC_LIB
+ select BR2_PACKAGE_GNUTLS
+
+comment "VNC TLS encryption does not work for static link"
+ depends on BR2_PACKAGE_QEMU_VNC && BR2_PREFER_STATIC_LIB
+
config BR2_PACKAGE_QEMU_SDL
bool "Enable SDL frontend"
select BR2_PACKAGE_SDL
diff --git a/package/qemu/qemu.mk b/package/qemu/qemu.mk
index ca03069..8f3c0e9 100644
--- a/package/qemu/qemu.mk
+++ b/package/qemu/qemu.mk
@@ -134,6 +134,13 @@ else
QEMU_OPTS += --disable-vnc-jpeg
endif
+ifeq ($(BR2_PACKAGE_QEMU_VNC_TLS),y)
+QEMU_OPTS += --enable-vnc-tls
+QEMU_DEPENDENCIES += gnutls
+else
+QEMU_OPTS += --disable-vnc-tls
+endif
+
ifeq ($(BR2_PACKAGE_QEMU_SDL),y)
QEMU_OPTS += --enable-sdl
QEMU_DEPENDENCIES += sdl
@@ -165,7 +172,6 @@ define QEMU_CONFIGURE_CMDS
--disable-bsd-user \
--disable-xen \
--disable-slirp \
- --disable-vnc-tls \
--disable-vnc-sasl \
--disable-virtfs \
--disable-brlapi \
--
1.7.2.5
^ permalink raw reply related
* [Buildroot] [PATCH 06/27] package/qemu: add VNC jpeg and png compression
From: Yann E. MORIN @ 2012-12-16 17:01 UTC (permalink / raw)
To: buildroot
In-Reply-To: <cover.1355677144.git.yann.morin.1998@free.fr>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
---
package/qemu/Config.in | 10 ++++++++++
package/qemu/qemu.mk | 16 ++++++++++++++--
2 files changed, 24 insertions(+), 2 deletions(-)
diff --git a/package/qemu/Config.in b/package/qemu/Config.in
index 057c1d6..74d207c 100644
--- a/package/qemu/Config.in
+++ b/package/qemu/Config.in
@@ -84,6 +84,16 @@ config BR2_PACKAGE_QEMU_VNC
Say 'y' to enable the VNC frontend, that is, QEMU will act as a
VNC server presenting the VM's display.
+config BR2_PACKAGE_QEMU_VNC_PNG
+ bool "PNG compression"
+ depends on BR2_PACKAGE_QEMU_VNC
+ select BR2_PACKAGE_LIBPNG
+
+config BR2_PACKAGE_QEMU_VNC_JPEG
+ bool "JPEG compression"
+ depends on BR2_PACKAGE_QEMU_VNC
+ select BR2_PACKAGE_JPEG
+
config BR2_PACKAGE_QEMU_SDL
bool "Enable SDL frontend"
select BR2_PACKAGE_SDL
diff --git a/package/qemu/qemu.mk b/package/qemu/qemu.mk
index 011f176..ca03069 100644
--- a/package/qemu/qemu.mk
+++ b/package/qemu/qemu.mk
@@ -120,6 +120,20 @@ else
QEMU_OPTS += --disable-vnc
endif
+ifeq ($(BR2_PACKAGE_QEMU_VNC_PNG),y)
+QEMU_OPTS += --enable-vnc-png
+QEMU_DEPENDENCIES += libpng
+else
+QEMU_OPTS += --disable-vnc-png
+endif
+
+ifeq ($(BR2_PACKAGE_QEMU_VNC_JPEG),y)
+QEMU_OPTS += --enable-vnc-jpeg
+QEMU_DEPENDENCIES += jpeg
+else
+QEMU_OPTS += --disable-vnc-jpeg
+endif
+
ifeq ($(BR2_PACKAGE_QEMU_SDL),y)
QEMU_OPTS += --enable-sdl
QEMU_DEPENDENCIES += sdl
@@ -151,8 +165,6 @@ define QEMU_CONFIGURE_CMDS
--disable-bsd-user \
--disable-xen \
--disable-slirp \
- --disable-vnc-jpeg \
- --disable-vnc-png \
--disable-vnc-tls \
--disable-vnc-sasl \
--disable-virtfs \
--
1.7.2.5
^ permalink raw reply related
* [Buildroot] [PATCH 05/27] package/qemu: add option to enable/disable the VNC frontend
From: Yann E. MORIN @ 2012-12-16 17:01 UTC (permalink / raw)
To: buildroot
In-Reply-To: <cover.1355677144.git.yann.morin.1998@free.fr>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
---
package/qemu/Config.in | 7 +++++++
package/qemu/qemu.mk | 11 ++++++++++-
2 files changed, 17 insertions(+), 1 deletions(-)
diff --git a/package/qemu/Config.in b/package/qemu/Config.in
index a92ca00..057c1d6 100644
--- a/package/qemu/Config.in
+++ b/package/qemu/Config.in
@@ -77,6 +77,13 @@ endif # BR2_PACKAGE_QEMU_CUSTOM_TARGETS == ""
comment "Frontends"
+config BR2_PACKAGE_QEMU_VNC
+ bool "Enable VNC frontend"
+ select BR2_PACKAGE_VNC
+ help
+ Say 'y' to enable the VNC frontend, that is, QEMU will act as a
+ VNC server presenting the VM's display.
+
config BR2_PACKAGE_QEMU_SDL
bool "Enable SDL frontend"
select BR2_PACKAGE_SDL
diff --git a/package/qemu/qemu.mk b/package/qemu/qemu.mk
index f102637..011f176 100644
--- a/package/qemu/qemu.mk
+++ b/package/qemu/qemu.mk
@@ -114,6 +114,12 @@ ifneq ($(call qstrip,$(BR2_PACKAGE_QEMU_CUSTOM_TARGETS)),)
QEMU_OPTS += --target-list="$(call qstrip,$(BR2_PACKAGE_QEMU_CUSTOM_TARGETS))"
endif
+ifeq ($(BR2_PACKAGE_QEMU_VNC),y)
+QEMU_OPTS += --enable-vnc
+else
+QEMU_OPTS += --disable-vnc
+endif
+
ifeq ($(BR2_PACKAGE_QEMU_SDL),y)
QEMU_OPTS += --enable-sdl
QEMU_DEPENDENCIES += sdl
@@ -145,7 +151,10 @@ define QEMU_CONFIGURE_CMDS
--disable-bsd-user \
--disable-xen \
--disable-slirp \
- --disable-vnc \
+ --disable-vnc-jpeg \
+ --disable-vnc-png \
+ --disable-vnc-tls \
+ --disable-vnc-sasl \
--disable-virtfs \
--disable-brlapi \
--disable-curses \
--
1.7.2.5
^ permalink raw reply related
* [Buildroot] [PATCH 04/27] package/qemu: add SDL frontends
From: Yann E. MORIN @ 2012-12-16 17:01 UTC (permalink / raw)
To: buildroot
In-Reply-To: <cover.1355677144.git.yann.morin.1998@free.fr>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
---
package/qemu/Config.in | 9 +++++++++
package/qemu/qemu.mk | 10 +++++++++-
2 files changed, 18 insertions(+), 1 deletions(-)
diff --git a/package/qemu/Config.in b/package/qemu/Config.in
index f76b443..a92ca00 100644
--- a/package/qemu/Config.in
+++ b/package/qemu/Config.in
@@ -75,4 +75,13 @@ config BR2_PACKAGE_QEMU_LINUX_USER
endif # BR2_PACKAGE_QEMU_CUSTOM_TARGETS == ""
+comment "Frontends"
+
+config BR2_PACKAGE_QEMU_SDL
+ bool "Enable SDL frontend"
+ select BR2_PACKAGE_SDL
+ help
+ Say 'y' to enable the SDL frontend, that is, a graphical window
+ presenting the VM's display.
+
endif # BR2_PACKAGE_QEMU
diff --git a/package/qemu/qemu.mk b/package/qemu/qemu.mk
index caf3426..f102637 100644
--- a/package/qemu/qemu.mk
+++ b/package/qemu/qemu.mk
@@ -96,6 +96,7 @@ QEMU_OPTS =
QEMU_VARS = \
PYTHON=$(HOST_DIR)/usr/bin/python \
PYTHONPATH=$(TARGET_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages \
+ SDL_CONFIG=$(STAGING_DIR)/usr/bin/sdl-config \
ifeq ($(BR2_PACKAGE_QEMU_SYSTEM),y)
QEMU_OPTS += --enable-system
@@ -113,6 +114,14 @@ ifneq ($(call qstrip,$(BR2_PACKAGE_QEMU_CUSTOM_TARGETS)),)
QEMU_OPTS += --target-list="$(call qstrip,$(BR2_PACKAGE_QEMU_CUSTOM_TARGETS))"
endif
+ifeq ($(BR2_PACKAGE_QEMU_SDL),y)
+QEMU_OPTS += --enable-sdl
+QEMU_DEPENDENCIES += sdl
+QEMU_VARS += SDL_CONFIG=$(BR2_STAGING_DIR)/usr/bin/sdl-config
+else
+QEMU_OPTS += --disable-sdl
+endif
+
# Note: although QEMU uses a ./configure script, it is not compatible with
# the traditional autotools options (eg. --target et al.), so we have
# to override the default provided by the autotools-package infra, and
@@ -136,7 +145,6 @@ define QEMU_CONFIGURE_CMDS
--disable-bsd-user \
--disable-xen \
--disable-slirp \
- --disable-sdl \
--disable-vnc \
--disable-virtfs \
--disable-brlapi \
--
1.7.2.5
^ permalink raw reply related
* [Buildroot] [PATCH 03/27] package/qemu: add fine-grained target selection
From: Yann E. MORIN @ 2012-12-16 17:01 UTC (permalink / raw)
To: buildroot
In-Reply-To: <cover.1355677144.git.yann.morin.1998@free.fr>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
---
package/qemu/Config.in | 21 +++++++++++++++++++++
package/qemu/qemu.mk | 4 ++++
2 files changed, 25 insertions(+), 0 deletions(-)
diff --git a/package/qemu/Config.in b/package/qemu/Config.in
index ddf3665..f76b443 100644
--- a/package/qemu/Config.in
+++ b/package/qemu/Config.in
@@ -28,6 +28,25 @@ if BR2_PACKAGE_QEMU
comment "Emulators selection"
+config BR2_PACKAGE_QEMU_CUSTOM_TARGETS
+ string "Enable specific targets"
+ help
+ Enter here the list of QEMU targets you want to build. For example:
+
+ System emulation | User-land emulation
+ ----------------------+-----------------------
+ i386-softmmu | i386-linux-user
+ arm-softmmu | ppc-linux-user
+ x86_64-softmmu | sparc-bsd-user
+ ... | ...
+
+config QEMU_FOO
+ bool # To break the indentation
+
+if BR2_PACKAGE_QEMU_CUSTOM_TARGETS = ""
+
+comment "... or you can select emulator families to enable, below:"
+
# QEMU 1.2.x requires that at least one target emulation be selected, so
# we use the following two symbols to force systems emulation if user
# emulation is not selected. This limitation will be lifted when qemu-1.3.0
@@ -54,4 +73,6 @@ config BR2_PACKAGE_QEMU_LINUX_USER
# Note: bsd-user can not be build on Linux
+endif # BR2_PACKAGE_QEMU_CUSTOM_TARGETS == ""
+
endif # BR2_PACKAGE_QEMU
diff --git a/package/qemu/qemu.mk b/package/qemu/qemu.mk
index 6fd389b..caf3426 100644
--- a/package/qemu/qemu.mk
+++ b/package/qemu/qemu.mk
@@ -109,6 +109,10 @@ else
QEMU_OPTS += --disable-linux-user
endif
+ifneq ($(call qstrip,$(BR2_PACKAGE_QEMU_CUSTOM_TARGETS)),)
+QEMU_OPTS += --target-list="$(call qstrip,$(BR2_PACKAGE_QEMU_CUSTOM_TARGETS))"
+endif
+
# Note: although QEMU uses a ./configure script, it is not compatible with
# the traditional autotools options (eg. --target et al.), so we have
# to override the default provided by the autotools-package infra, and
--
1.7.2.5
^ permalink raw reply related
* [Buildroot] [PATCH 02/27] package/qemu: add basic target selection
From: Yann E. MORIN @ 2012-12-16 17:01 UTC (permalink / raw)
To: buildroot
In-Reply-To: <cover.1355677144.git.yann.morin.1998@free.fr>
qemu-1.2.1 requires that at least one target emulation be enabled, so
we use some kconfig-tricks to force at least the systems emulations to
be enabled if user emulation is not selected.
This limitation will be lifted in the upcoming qemu-1.3.x
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
---
package/qemu/Config.in | 32 ++++++++++++++++++++++++++++++++
package/qemu/qemu.mk | 14 ++++++++++++--
2 files changed, 44 insertions(+), 2 deletions(-)
diff --git a/package/qemu/Config.in b/package/qemu/Config.in
index 4b05e3d..ddf3665 100644
--- a/package/qemu/Config.in
+++ b/package/qemu/Config.in
@@ -23,3 +23,35 @@ config BR2_PACKAGE_QEMU
server and embedded PowerPC, and S390 guests.
http://qemu.org/
+
+if BR2_PACKAGE_QEMU
+
+comment "Emulators selection"
+
+# QEMU 1.2.x requires that at least one target emulation be selected, so
+# we use the following two symbols to force systems emulation if user
+# emulation is not selected. This limitation will be lifted when qemu-1.3.0
+# is out.
+config BR2_PACKAGE_QEMU_EMUL_SET
+ bool
+
+config BR2_PACKAGE_QEMU_FORCE_SYSTEM
+ bool
+ default n if BR2_PACKAGE_QEMU_EMUL_SET
+ default y if ! BR2_PACKAGE_QEMU_EMUL_SET
+ select BR2_PACKAGE_QEMU_SYSTEM
+
+config BR2_PACKAGE_QEMU_SYSTEM
+ bool "Enable all systems emulation"
+ help
+ Say 'y' to build all system emulators/virtualisers that QEMU supports.
+
+config BR2_PACKAGE_QEMU_LINUX_USER
+ bool "Enable all Linux user-land emulation"
+ select BR2_PACKAGE_QEMU_EMUL_SET
+ help
+ Say 'y' to build all Linux user-land emulators that QEMU supports.
+
+# Note: bsd-user can not be build on Linux
+
+endif # BR2_PACKAGE_QEMU
diff --git a/package/qemu/qemu.mk b/package/qemu/qemu.mk
index ddab4d0..6fd389b 100644
--- a/package/qemu/qemu.mk
+++ b/package/qemu/qemu.mk
@@ -97,6 +97,18 @@ QEMU_VARS =
PYTHON=$(HOST_DIR)/usr/bin/python \
PYTHONPATH=$(TARGET_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages \
+ifeq ($(BR2_PACKAGE_QEMU_SYSTEM),y)
+QEMU_OPTS += --enable-system
+else
+QEMU_OPTS += --disable-system
+endif
+
+ifeq ($(BR2_PACKAGE_QEMU_LINUX_USER),y)
+QEMU_OPTS += --enable-linux-user
+else
+QEMU_OPTS += --disable-linux-user
+endif
+
# Note: although QEMU uses a ./configure script, it is not compatible with
# the traditional autotools options (eg. --target et al.), so we have
# to override the default provided by the autotools-package infra, and
@@ -117,8 +129,6 @@ define QEMU_CONFIGURE_CMDS
--enable-nptl \
--enable-attr \
--enable-vhost-net \
- --enable-system \
- --enable-linux-user \
--disable-bsd-user \
--disable-xen \
--disable-slirp \
--
1.7.2.5
^ permalink raw reply related
* [Buildroot] [PATCH 01/27] package/qemu: build for the target (i386 or x86_64 only)
From: Yann E. MORIN @ 2012-12-16 17:01 UTC (permalink / raw)
To: buildroot
In-Reply-To: <cover.1355677144.git.yann.morin.1998@free.fr>
Untested for other architectures, so only enabled for known-working ones.
We explicitly disable all features that depends on other packages,
for now. Such features will be added one by one in the next patches.
Features that do not rely on external packages are explicitly enabled
to catch the dependencies on toolchain features early.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
---
package/Config.in | 1 +
package/qemu/Config.in | 25 ++++++++++++++++
package/qemu/qemu.mk | 73 ++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 99 insertions(+), 0 deletions(-)
create mode 100644 package/qemu/Config.in
diff --git a/package/Config.in b/package/Config.in
index 8612c7d..458c3c8 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -574,6 +574,7 @@ source "package/collectd/Config.in"
source "package/empty/Config.in"
source "package/googlefontdirectory/Config.in"
source "package/mobile-broadband-provider-info/Config.in"
+source "package/qemu/Config.in"
source "package/shared-mime-info/Config.in"
source "package/snowball-init/Config.in"
source "package/sound-theme-borealis/Config.in"
diff --git a/package/qemu/Config.in b/package/qemu/Config.in
new file mode 100644
index 0000000..4b05e3d
--- /dev/null
+++ b/package/qemu/Config.in
@@ -0,0 +1,25 @@
+comment "QEMU requires a toolchain with threads"
+ depends on !BR2_i386 && !BR2_x86_64
+ depends on !BR2_TOOLCHAIN_HAS_THREADS
+
+config BR2_PACKAGE_QEMU
+ bool "QEMU"
+ depends on BR2_i386 || BR2_x86_64
+ depends on BR2_TOOLCHAIN_HAS_THREADS
+ select BR2_PACKAGE_LIBGLIB2
+ select BR2_PACKAGE_ZLIB
+ help
+ QEMU is a generic and open source machine emulator and virtualizer.
+
+ When used as a machine emulator, QEMU can run OSes and programs made
+ for one machine (e.g. an ARM board) on a different machine (e.g.
+ your own PC). By using dynamic translation, it achieves very good
+ performance.
+
+ When used as a virtualizer, QEMU achieves near native performances
+ by executing the guest code directly on the host CPU. QEMU supports
+ virtualization when executing under the Xen hypervisor or using the
+ KVM kernel module in Linux. When using KVM, QEMU can virtualize x86,
+ server and embedded PowerPC, and S390 guests.
+
+ http://qemu.org/
diff --git a/package/qemu/qemu.mk b/package/qemu/qemu.mk
index bd42481..ddab4d0 100644
--- a/package/qemu/qemu.mk
+++ b/package/qemu/qemu.mk
@@ -81,3 +81,76 @@ $(eval $(host-autotools-package))
# variable used by other packages
QEMU_USER = $(HOST_DIR)/usr/bin/qemu-$(HOST_QEMU_ARCH)
+
+#-------------------------------------------------------------
+# Target-qemu
+
+QEMU_DEPENDENCIES = host-pkgconf host-python libglib2 zlib
+
+# Need the LIBS variable because librt and libm are
+# not automatically pulled. :-(
+QEMU_LIBS = -lrt -lm
+
+QEMU_OPTS =
+
+QEMU_VARS = \
+ PYTHON=$(HOST_DIR)/usr/bin/python \
+ PYTHONPATH=$(TARGET_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages \
+
+# Note: although QEMU uses a ./configure script, it is not compatible with
+# the traditional autotools options (eg. --target et al.), so we have
+# to override the default provided by the autotools-package infra, and
+# provide our own. Sigh... :-/
+
+define QEMU_CONFIGURE_CMDS
+ ( cd $(@D); \
+ LIBS='$(QEMU_LIBS)' \
+ $(TARGET_CONFIGURE_OPTS) \
+ $(TARGET_CONFIGURE_ARGS) \
+ $(QEMU_VARS) \
+ ./configure \
+ --prefix=/usr \
+ --cross-prefix=$(TARGET_CROSS) \
+ --audio-drv-list= \
+ --audio-card-list= \
+ --enable-kvm \
+ --enable-nptl \
+ --enable-attr \
+ --enable-vhost-net \
+ --enable-system \
+ --enable-linux-user \
+ --disable-bsd-user \
+ --disable-xen \
+ --disable-slirp \
+ --disable-sdl \
+ --disable-vnc \
+ --disable-virtfs \
+ --disable-brlapi \
+ --disable-curses \
+ --disable-curl \
+ --disable-fdt \
+ --disable-bluez \
+ --disable-guest-base \
+ --disable-uuid \
+ --disable-vde \
+ --disable-linux-aio \
+ --disable-cap-ng \
+ --disable-docs \
+ --disable-spice \
+ --disable-rbd \
+ --disable-libiscsi \
+ --disable-usb-redir \
+ --disable-smartcard \
+ --disable-strip \
+ --disable-seccomp \
+ --disable-sparse \
+ $(QEMU_OPTS) \
+ )
+endef
+
+# Need the LIBS_QGA because it does not 'inherit' the LIBS_TOOLS
+# we set at configure time, and there is no conrresponding LIBS_QGA
+# at configure time
+QEMU_MAKE_ENV += LIBS_TOOLS="$(QEMU_LIBS)" LIBS_QGA="$(QEMU_LIBS)" LIBS="$(QEMU_LIBS)"
+
+$(eval $(autotools-package))
--
1.7.2.5
^ permalink raw reply related
* [Buildroot] [pull request] Pull request for branch yem-target-qemu
From: Yann E. MORIN @ 2012-12-16 17:01 UTC (permalink / raw)
To: buildroot
Hello All!
This series is the last part required to build QEMU for the target.
It depends on the previous two series:
- git://gitorious.org/buildroot/buildroot.git yem-host-qemu-fixes
- git://gitorious.org/buildroot/buildroot.git yem-new-packages
The following changes since commit c89762fc711fda1836af3b7895a8760ffda66aa6:
Merge branches 'yem-new-packages' and 'yem-host-qemu-fixes' into yem-merge-for-target-qemu (2012-12-16 17:28:45 +0100)
are available in the git repository at:
git://gitorious.org/buildroot/buildroot.git yem-target-qemu
Yann E. MORIN (27):
package/qemu: build for the target (i386 or x86_64 only)
package/qemu: add basic target selection
package/qemu: add fine-grained target selection
package/qemu: add SDL frontends
package/qemu: add option to enable/disable the VNC frontend
package/qemu: add VNC jpeg and png compression
package/qemu: add VNC TLS-encryption
package/qemu: add option to not install blobs
package/qemu: add option to remove unwanted keymaps
package/qemu: add uuid support
package/qemu: add support for capabilities
package/qemu: add attr/xattr option
package/qemu: add support for virtfs
package/qemu: add support for cURL
package/qemu: enable use of the curses frontend
package/qemu: add BlueZ connectivity
package/qemu: add AIO support
package/qemu: add support for VDE switches
package/qemu: add iSCSI support
package/qemu: add support for USB redirection
package/qemu: add support for Spice
package/qemu: enable sound
package/qemu: add support for libseccomp
package/qemu: option to build the docs
package/qemu: move sub-options into a sub-menu
package/qemu: enable a static build
package/qemu: add support for FDT
package/Config.in | 1 +
package/qemu/Config.in | 338 +++++++++++++++++++++++++++++++++++
package/qemu/qemu-static-curl.patch | 72 ++++++++
package/qemu/qemu-static-sdl.patch | 54 ++++++
package/qemu/qemu.mk | 290 ++++++++++++++++++++++++++++++
5 files changed, 755 insertions(+), 0 deletions(-)
create mode 100644 package/qemu/Config.in
create mode 100644 package/qemu/qemu-static-curl.patch
create mode 100644 package/qemu/qemu-static-sdl.patch
Regards,
Yann E. MORIN
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply
* [Buildroot] [PATCH 19/19] package/dtc: add option to install programs
From: Yann E. MORIN @ 2012-12-16 16:56 UTC (permalink / raw)
To: buildroot
In-Reply-To: <cover.1355676845.git.yann.morin.1998@free.fr>
By default, we only install the libfdt library.
As suggested by Arnout, add an option that also
installs the few dtc programs.
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Arnout Vandecappelle <arnout@mind.be>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
---
dtdiff, a diff for device trees, requires bash.
I did not add a 'depends on bash' (or a 'select' either), because
requiring bash just for that is a bit far-fetched.
Instead, at dtc install time, if bash is selected, dtdiff is installed
as usual to the target rootfs; if bash is not selected, dtdiff is
removed from the target rootfs.
---
package/dtc/Config.in | 24 ++++++++++++++++++++++--
package/dtc/dtc.mk | 29 +++++++++++++++++++++++------
2 files changed, 45 insertions(+), 8 deletions(-)
diff --git a/package/dtc/Config.in b/package/dtc/Config.in
index 96225e3..1c65a10 100644
--- a/package/dtc/Config.in
+++ b/package/dtc/Config.in
@@ -1,9 +1,29 @@
config BR2_PACKAGE_DTC
- bool "dtc"
+ bool "dtc (libfdt)"
help
The Device Tree Compiler, dtc, takes as input a device-tree in
a given format and outputs a device-tree in another format.
- Note that only the library is installed for now.
+ Note that only the library is installed.
+ If you want the programs, say 'y' here, and to "dtc programs", below.
http://git.jdl.com/gitweb/?p=dtc.git (no home page)
+
+if BR2_PACKAGE_DTC
+
+config BR2_PACKAGE_DTC_PROGRAMS
+ bool "dtc programs"
+ help
+ Say 'y' here if you also want the programs on the target:
+ - convert-dtsv0 convert from version 0 to version 1
+ - dtc the device tree compiler
+ - dtdiff compare two device trees (needs bash)
+ - fdtdump print a readable version of a flat device tree
+ - fdtget read values from device tree
+ - fdtput write a property value to a device tree
+
+ Note: dtdiff requires bash, so if bash is not selected, dtdiff will
+ be removed from the target file system. Enable bash if you
+ need dtdiff on the target.
+
+endif
diff --git a/package/dtc/dtc.mk b/package/dtc/dtc.mk
index a0e1e35..42843d5 100644
--- a/package/dtc/dtc.mk
+++ b/package/dtc/dtc.mk
@@ -8,27 +8,44 @@ DTC_VERSION = e4b497f367a3b2ae99cc52089a14a221b13a76ef
DTC_SITE = git://git.jdl.com/software/dtc.git
DTC_LICENSE = GPLv2+/BSD-2c
DTC_LICENSE_FILES = README.license GPL
-# Note: the dual-license only applies to the library.
-# The DT compiler (dtc) is GPLv2+, but we do not install it.
DTC_INSTALL_STAGING = YES
+ifeq ($(BR2_PACKAGE_DTC_PROGRAMS),y)
+DTC_LICENSE += (for the library), GPLv2+ (for the executables)
+# Use default goal to build everything
+DTC_BUILD_GOAL =
+DTC_INSTALL_GOAL = install
+DTC_CLEAN_GOAL = clean
+else # $(BR2_PACKAGE_DTC_PROGRAMS) != y
+DTC_BUILD_GOAL = libfdt
+#?libfdt_install is our own install rule added by our patch
+DTC_INSTALL_GOAL = libfdt_install
+DTC_CLEAN_GOAL = libfdt_clean
+ifeq ($(BR2_PACKAGE_BASH),)
+DTC_POST_INSTALL_TARGET_HOOKS += DTC_POST_INSTALL_TARGET_RM_DTDIFF
+endif
+endif # $(BR2_PACKAGE_DTC_PROGRAMS) != y
+
define DTC_BUILD_CMDS
$(TARGET_CONFIGURE_OPTS) \
CFLAGS="$(TARGET_CFLAGS)" \
- $(MAKE) -C $(@D) PREFIX=/usr libfdt
+ $(MAKE) -C $(@D) PREFIX=/usr $(DTC_BUILD_GOAL)
endef
-#?libfdt_install is our own install rule added by our patch
+# For staging, only the library is needed
define DTC_INSTALL_STAGING_CMDS
$(MAKE) -C $(@D) DESTDIR=$(STAGING_DIR) PREFIX=/usr libfdt_install
endef
define DTC_INSTALL_TARGET_CMDS
- $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) PREFIX=/usr libfdt_install
+ $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) PREFIX=/usr $(DTC_INSTALL_GOAL)
+endef
+define DTC_POST_INSTALL_TARGET_RM_DTDIFF
+ rm -f $(TARGET_DIR)/usr/bin/dtdiff
endef
define DTC_CLEAN_CMDS
- $(MAKE) -C $(@D) libfdt_clean
+ $(MAKE) -C $(@D) $(DTC_CLEAN_GOAL)
endef
$(eval $(generic-package))
--
1.7.2.5
^ permalink raw reply related
* [Buildroot] [PATCH 18/19] package/dtc: new package
From: Yann E. MORIN @ 2012-12-16 16:56 UTC (permalink / raw)
To: buildroot
In-Reply-To: <cover.1355676845.git.yann.morin.1998@free.fr>
dtc is the Device Tree Compiler, and manipulates device trees.
Cc: Arnout Vandecappelle <arnout@mind.be>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
---
Although Arnout suggested to move it out of the libraries sub-menu,
I kept it there, as by default, only the library is installed, like
it is done for, eg., libcurl.
---
package/Config.in | 1 +
package/dtc/Config.in | 9 +++++++
| 27 ++++++++++++++++++++++
package/dtc/dtc-separate-lib-install.patch | 28 +++++++++++++++++++++++
package/dtc/dtc.mk | 34 ++++++++++++++++++++++++++++
5 files changed, 99 insertions(+), 0 deletions(-)
create mode 100644 package/dtc/Config.in
create mode 100644 package/dtc/dtc-extra_cflags.patch
create mode 100644 package/dtc/dtc-separate-lib-install.patch
create mode 100644 package/dtc/dtc.mk
diff --git a/package/Config.in b/package/Config.in
index 657f568..8612c7d 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -419,6 +419,7 @@ endmenu
menu "Hardware handling"
source "package/ccid/Config.in"
+source "package/dtc/Config.in"
source "package/lcdapi/Config.in"
source "package/libaio/Config.in"
source "package/libraw1394/Config.in"
diff --git a/package/dtc/Config.in b/package/dtc/Config.in
new file mode 100644
index 0000000..96225e3
--- /dev/null
+++ b/package/dtc/Config.in
@@ -0,0 +1,9 @@
+config BR2_PACKAGE_DTC
+ bool "dtc"
+ help
+ The Device Tree Compiler, dtc, takes as input a device-tree in
+ a given format and outputs a device-tree in another format.
+
+ Note that only the library is installed for now.
+
+ http://git.jdl.com/gitweb/?p=dtc.git (no home page)
--git a/package/dtc/dtc-extra_cflags.patch b/package/dtc/dtc-extra_cflags.patch
new file mode 100644
index 0000000..9d1882b
--- /dev/null
+++ b/package/dtc/dtc-extra_cflags.patch
@@ -0,0 +1,27 @@
+Makefile: append the CFLAGS to existing ones
+
+Allow the user to pass custom CFLAGS (eg. optimisation flags).
+
+Do not use EXTRA_CFLAGS, append to existing CFLAGS with += (Arnout)
+
+Cc: Arnout Vandecappelle <arnout@mind.be>
+Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
+
+---
+Patch not sent upstream.
+
+Although not specific to buildroot, I am not sure this is the best
+way to handle user-supplied CFLAGS.
+
+diff -durN dtc-e4b497f367a3b2ae99cc52089a14a221b13a76ef.orig/Makefile dtc-e4b497f367a3b2ae99cc52089a14a221b13a76ef/Makefile
+--- dtc-e4b497f367a3b2ae99cc52089a14a221b13a76ef.orig/Makefile 2012-10-22 22:02:47.541240846 +0200
++++ dtc-e4b497f367a3b2ae99cc52089a14a221b13a76ef/Makefile 2012-10-22 22:03:21.151047833 +0200
+@@ -18,7 +18,7 @@
+ CPPFLAGS = -I libfdt -I .
+ WARNINGS = -Werror -Wall -Wpointer-arith -Wcast-qual -Wnested-externs \
+ -Wstrict-prototypes -Wmissing-prototypes -Wredundant-decls
+-CFLAGS = -g -Os -fPIC -Werror $(WARNINGS)
++CFLAGS += -g -Os -fPIC -Werror $(WARNINGS)
+
+ BISON = bison
+ LEX = flex
diff --git a/package/dtc/dtc-separate-lib-install.patch b/package/dtc/dtc-separate-lib-install.patch
new file mode 100644
index 0000000..c86d587
--- /dev/null
+++ b/package/dtc/dtc-separate-lib-install.patch
@@ -0,0 +1,28 @@
+Makefile: add a rule to only install libfdt
+
+Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
+
+---
+Patch not sent upstream.
+
+It's really specific to buildroot, and is probably not
+good (aka generic) enough to be pushed upstream.
+
+diff --git a/Makefile b/Makefile
+index 1169e6c..39e7190 100644
+--- a/Makefile
++++ b/Makefile
+@@ -160,10 +160,12 @@ endif
+ # intermediate target and building them again "for real"
+ .SECONDARY: $(DTC_GEN_SRCS) $(CONVERT_GEN_SRCS)
+
+-install: all $(SCRIPTS)
++install: all $(SCRIPTS) libfdt_install
+ @$(VECHO) INSTALL
+ $(INSTALL) -d $(DESTDIR)$(BINDIR)
+ $(INSTALL) $(BIN) $(SCRIPTS) $(DESTDIR)$(BINDIR)
++
++libfdt_install: libfdt
+ $(INSTALL) -d $(DESTDIR)$(LIBDIR)
+ $(INSTALL) $(LIBFDT_lib) $(DESTDIR)$(LIBDIR)
+ ln -sf $(notdir $(LIBFDT_lib)) $(DESTDIR)$(LIBDIR)/$(LIBFDT_soname)
diff --git a/package/dtc/dtc.mk b/package/dtc/dtc.mk
new file mode 100644
index 0000000..a0e1e35
--- /dev/null
+++ b/package/dtc/dtc.mk
@@ -0,0 +1,34 @@
+#############################################################
+#
+# dtc
+#
+#############################################################
+
+DTC_VERSION = e4b497f367a3b2ae99cc52089a14a221b13a76ef
+DTC_SITE = git://git.jdl.com/software/dtc.git
+DTC_LICENSE = GPLv2+/BSD-2c
+DTC_LICENSE_FILES = README.license GPL
+# Note: the dual-license only applies to the library.
+# The DT compiler (dtc) is GPLv2+, but we do not install it.
+DTC_INSTALL_STAGING = YES
+
+define DTC_BUILD_CMDS
+ $(TARGET_CONFIGURE_OPTS) \
+ CFLAGS="$(TARGET_CFLAGS)" \
+ $(MAKE) -C $(@D) PREFIX=/usr libfdt
+endef
+
+#?libfdt_install is our own install rule added by our patch
+define DTC_INSTALL_STAGING_CMDS
+ $(MAKE) -C $(@D) DESTDIR=$(STAGING_DIR) PREFIX=/usr libfdt_install
+endef
+
+define DTC_INSTALL_TARGET_CMDS
+ $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) PREFIX=/usr libfdt_install
+endef
+
+define DTC_CLEAN_CMDS
+ $(MAKE) -C $(@D) libfdt_clean
+endef
+
+$(eval $(generic-package))
--
1.7.2.5
^ permalink raw reply related
* [Buildroot] [PATCH 17/19] package/ceph: new package
From: Yann E. MORIN @ 2012-12-16 16:56 UTC (permalink / raw)
To: buildroot
In-Reply-To: <cover.1355676845.git.yann.morin.1998@free.fr>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Peter Korsgaard <jacmet@uclibc.org>
---
package/Config.in | 1 +
package/ceph/Config.in | 21 +++++++++
package/ceph/ceph-no-envz.patch | 63 ++++++++++++++++++++++++++++
package/ceph/ceph-no-getloadavg.patch | 61 +++++++++++++++++++++++++++
package/ceph/ceph-no-posix_fallocate.patch | 50 ++++++++++++++++++++++
package/ceph/ceph.mk | 53 +++++++++++++++++++++++
6 files changed, 249 insertions(+), 0 deletions(-)
create mode 100644 package/ceph/Config.in
create mode 100644 package/ceph/ceph-no-envz.patch
create mode 100644 package/ceph/ceph-no-getloadavg.patch
create mode 100644 package/ceph/ceph-no-posix_fallocate.patch
create mode 100644 package/ceph/ceph.mk
diff --git a/package/Config.in b/package/Config.in
index 04aef11..657f568 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -590,6 +590,7 @@ source "package/bind/Config.in"
source "package/bmon/Config.in"
source "package/bridge-utils/Config.in"
source "package/can-utils/Config.in"
+source "package/ceph/Config.in"
source "package/connman/Config.in"
source "package/ctorrent/Config.in"
source "package/conntrack-tools/Config.in"
diff --git a/package/ceph/Config.in b/package/ceph/Config.in
new file mode 100644
index 0000000..61f1947
--- /dev/null
+++ b/package/ceph/Config.in
@@ -0,0 +1,21 @@
+comment "ceph requires C++, largefiles, threads, wide chars"
+ depends on !BR2_INSTALL_LIBSTDCPP || !BR2_LARGEFILE || !BR2_TOOLCHAIN_HAS_THREADS || !BR2_USE_WCHAR
+
+config BR2_PACKAGE_CEPH
+ bool "ceph"
+ depends on BR2_INSTALL_LIBSTDCPP # boost
+ depends on BR2_LARGEFILE # boost, libnss, util-linux
+ depends on BR2_TOOLCHAIN_HAS_THREADS # libnss
+ depends on BR2_USE_WCHAR # util-linux
+ select BR2_PACKAGE_BOOST
+ select BR2_PACKAGE_EXPAT
+ select BR2_PACKAGE_KEYUTILS
+ select BR2_PACKAGE_LIBEDIT2
+ select BR2_PACKAGE_LIBNSS
+ select BR2_PACKAGE_UTIL_LINUX
+ select BR2_PACKAGE_UTIL_LINUX_LIBUUID
+ help
+ Ceph is a distributed object store and file system designed to
+ provide excellent performance, reliability and scalability.
+
+ http://ceph.com/
diff --git a/package/ceph/ceph-no-envz.patch b/package/ceph/ceph-no-envz.patch
new file mode 100644
index 0000000..c0369ba
--- /dev/null
+++ b/package/ceph/ceph-no-envz.patch
@@ -0,0 +1,63 @@
+tools+base: do not include envz.h on uClibc
+
+uClibc does not have envz, and no envz function is in fact used.
+So, simply do not include it under uClibc.
+
+Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
+
+--- ceph-0.51.orig/src/tools/common.cc 2012-09-09 00:13:32.128838177 +0200
++++ ceph-0.51/src/tools/common.cc 2012-09-09 00:13:59.432064556 +0200
+@@ -17,9 +17,9 @@
+ #include <string>
+ using namespace std;
+
+-#if !defined(DARWIN) && !defined(__FreeBSD__)
++#if !defined(DARWIN) && !defined(__FreeBSD__) && !defined(__UCLIBC__)
+ #include <envz.h>
+-#endif // DARWIN
++#endif // DARWIN || __UCLIBC__
+
+ #include <memory>
+ #include <sys/types.h>
+--- ceph-0.51.orig/src/ceph_syn.cc 2012-09-09 00:25:23.302722032 +0200
++++ ceph-0.51/src/ceph_syn.cc 2012-09-09 00:24:39.702892463 +0200
+@@ -31,9 +31,9 @@
+ #include "common/ceph_argparse.h"
+ #include "common/pick_address.h"
+
+-#if !defined(DARWIN) && !defined(__FreeBSD__)
++#if !defined(DARWIN) && !defined(__FreeBSD__) && !defined(__UCLIBC__)
+ #include <envz.h>
+-#endif // DARWIN || __FreeBSD__
++#endif // DARWIN || __FreeBSD__ || __UCLIBC__
+
+ #include <sys/types.h>
+ #include <sys/stat.h>
+--- ceph-0.51.orig/src/ceph_fuse.cc 2012-09-09 00:43:46.875065556 +0200
++++ ceph-0.51/src/ceph_fuse.cc 2012-09-09 00:44:21.161597834 +0200
+@@ -32,9 +32,9 @@
+ #include "global/global_init.h"
+ #include "common/safe_io.h"
+
+-#ifndef DARWIN
++#if !defined(DARWIN) && !defined(__UCLIBC__)
+ #include <envz.h>
+-#endif // DARWIN
++#endif // DARWIN || __UCLIBC__
+
+ #include <sys/types.h>
+ #include <sys/stat.h>
+--- ceph-0.51.orig/src/testmsgr.cc 2012-09-09 00:44:48.108158886 +0200
++++ ceph-0.51/src/testmsgr.cc 2012-09-09 00:45:18.218040882 +0200
+@@ -28,9 +28,9 @@
+ #include "global/global_init.h"
+ #include "common/ceph_argparse.h"
+
+-#ifndef DARWIN
++#if !defined(DARWIN) && !defined(__UCLIBC__)
+ #include <envz.h>
+-#endif // DARWIN
++#endif // DARWIN || __UCLIBC__
+
+ #include <sys/types.h>
+ #include <sys/stat.h>
diff --git a/package/ceph/ceph-no-getloadavg.patch b/package/ceph/ceph-no-getloadavg.patch
new file mode 100644
index 0000000..7e887df
--- /dev/null
+++ b/package/ceph/ceph-no-getloadavg.patch
@@ -0,0 +1,61 @@
+OSD: do not use getloadavg(3) on uClibc
+
+getloadavg(3) is not available on uClibc, so do not use it.
+
+getloadavg is used in two places:
+ - once to log the loadavg in the heartbeat logs: we simply remove this;
+ - once to decide whether to schedule scrub (whatever it is) or not: we
+ simply use the existing coin-flip random choice in this case.
+
+The second change will probably have an impact on performances... :-(
+
+Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
+
+diff -durN ceph-0.51.orig/src/osd/OSD.cc ceph-0.51/src/osd/OSD.cc
+--- ceph-0.51.orig/src/osd/OSD.cc 2012-08-26 00:58:06.000000000 +0200
++++ ceph-0.51/src/osd/OSD.cc 2012-09-08 23:56:31.396177885 +0200
+@@ -15,6 +15,7 @@
+ #include <fstream>
+ #include <iostream>
+ #include <errno.h>
++#include <features.h> /* For __ULIBC__ */
+ #include <sys/stat.h>
+ #include <signal.h>
+ #include <boost/scoped_ptr.hpp>
+@@ -1942,10 +1943,12 @@
+ {
+ dout(30) << "heartbeat" << dendl;
+
++#ifndef __UCLIBC__
+ // get CPU load avg
+ double loadavgs[1];
+ if (getloadavg(loadavgs, 1) == 1)
+ logger->fset(l_osd_loadavg, loadavgs[0]);
++#endif
+
+ dout(30) << "heartbeat checking stats" << dendl;
+
+@@ -3216,6 +3219,7 @@
+
+ bool OSDService::scrub_should_schedule()
+ {
++#ifndef __UCLIBC__
+ double loadavgs[1];
+
+ // TODOSAM: is_active should be conveyed to OSDService
+@@ -3249,6 +3253,15 @@
+ << " < max " << g_conf->osd_scrub_load_threshold
+ << " = yes" << dendl;
+ return loadavgs[0] < g_conf->osd_scrub_load_threshold;
++#else // ! defined __UCLIBC__
++ bool coin_flip = (rand() % 3) == whoami % 3;
++ if (coin_flip) {
++ dout(20) << "scrub_should_schedule randomly yes" << dendl;
++ } else {
++ dout(20) << "scrub_should_schedule randomly backing off" << dendl;
++ }
++ return coin_flip;
++#endif // ! defined __UCLIBC__
+ }
+
+ void OSD::sched_scrub()
diff --git a/package/ceph/ceph-no-posix_fallocate.patch b/package/ceph/ceph-no-posix_fallocate.patch
new file mode 100644
index 0000000..479705d
--- /dev/null
+++ b/package/ceph/ceph-no-posix_fallocate.patch
@@ -0,0 +1,50 @@
+Do not call posix_fallocate() on uClibc
+
+Based on a patch by Thomas, for lttng-babeltrace, in which he states:
+
+ uClibc does not implement posix_fallocate(), and posix_fallocate() is
+ mostly only an hint to the kernel that we will need such or such
+ amount of space inside a file. So we just don't call posix_fallocate()
+ when building against uClibc.
+
+Just do the same here.
+
+NOTE! IMHO, this patch is not correct, because overcommit (eg. for sparse
+files) on the underlying filesystem may cause allocation failures later on,
+which is exactly the situation that posix_fallocate is supposed to avoid.
+But, as uClibc still lacks posix_fallocate, we have no choice.
+
+If you really are concerned about this issue, there exists a posix_fallocate
+patch that is not upstream, but is used by the AlpineLinux distribution:
+ http://git.alpinelinux.org/cgit/aports/tree/main/libc0.9.32/posix_fallocate.patch?id=98a000b8e92b3aa1e0b7a5f94a74910bb0993c4d
+ http://git.alpinelinux.org/cgit/aports/tree/main/libc0.9.32/posix_fallocate-fix.patch?id=98a000b8e92b3aa1e0b7a5f94a74910bb0993c4d
+
+Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
+
+diff -durN ceph-0.50.orig/src/os/FileJournal.cc ceph-0.50/src/os/FileJournal.cc
+--- ceph-0.50.orig/src/os/FileJournal.cc 2012-08-13 18:43:14.000000000 +0200
++++ ceph-0.50/src/os/FileJournal.cc 2012-09-08 23:07:12.597910027 +0200
+@@ -23,6 +23,7 @@
+ #include "include/compat.h"
+
+ #include <fcntl.h>
++#include <features.h>
+ #include <sstream>
+ #include <stdio.h>
+ #include <sys/types.h>
+@@ -303,6 +304,7 @@
+ << newsize << " bytes: " << cpp_strerror(err) << dendl;
+ return -err;
+ }
++#ifndef __UCLIBC__
+ ret = ::posix_fallocate(fd, 0, newsize);
+ if (ret < 0) {
+ int err = errno;
+@@ -310,6 +312,7 @@
+ << newsize << " bytes: " << cpp_strerror(err) << dendl;
+ return -err;
+ }
++#endif
+ max_size = newsize;
+ }
+ else {
diff --git a/package/ceph/ceph.mk b/package/ceph/ceph.mk
new file mode 100644
index 0000000..0849837
--- /dev/null
+++ b/package/ceph/ceph.mk
@@ -0,0 +1,53 @@
+#############################################################
+#
+# ceph
+#
+#############################################################
+
+CEPH_VERSION = 0.51
+CEPH_SOURCE = ceph-$(CEPH_VERSION).tar.bz2
+CEPH_SITE = http://ceph.com/download/
+CEPH_LICENSE = LGPLv2.1 CC-BY-SA Apache-2.0 GPLv2 LGPLv2+ BSD-3c MIT PD
+CEPH_LICENSE_FILES = COPYING
+CEPH_INSTALL_STAGING = YES
+
+CEPH_DEPENDENCIES = \
+ boost \
+ expat \
+ keyutils \
+ libedit2 \
+ libnss \
+ util-linux \
+
+# We disable everything for now, because the dependency tree can become
+# quite deep if we try to enable some features, and I have not tested that.
+# We need@least one crypto lib, and the currently only one available in
+# BR, that ceph can use, is libnss
+CEPH_CONF_OPT = \
+ --with-nss \
+ --without-profiler \
+ --without-debug \
+ --without-tcmalloc \
+ --without-hadoop \
+ --without-libatomic-ops \
+ --without-system-leveldb \
+ --without-system-libs3 \
+ --without-rest-bench \
+ --without-cryptopp \
+ --with-ocf \
+
+ifeq ($(BR2_PACKAGE_LIBFUSE),y)
+CEPH_DEPENDENCIES += libfuse
+CEPH_CONF_OPT += --with-fuse
+else
+CEPH_CONF_OPT += --without-fuse
+endif
+
+ifeq ($(BR2_PACKAGE_LIBAIO),y)
+CEPH_DEPENDENCIES += libaio
+CEPH_CONF_OPT += --with-libaio
+else
+CEPH_CONF_OPT += --without-libaio
+endif
+
+$(eval $(autotools-package))
--
1.7.2.5
^ permalink raw reply related
* [Buildroot] [PATCH 16/19] package/libedit2: new package
From: Yann E. MORIN @ 2012-12-16 16:56 UTC (permalink / raw)
To: buildroot
In-Reply-To: <cover.1355676845.git.yann.morin.1998@free.fr>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
---
package/Config.in | 1 +
package/libedit2/Config.in | 9 +++
package/libedit2/libedit2-01-Makefile.patch | 25 +++++++
package/libedit2/libedit2-02-el.c-issetugid.patch | 24 ++++++
package/libedit2/libedit2-03-el.c-MAXPATHLEN.patch | 40 +++++++++++
.../libedit2/libedit2-04-readline.h-stdio.patch | 17 +++++
.../libedit2/libedit2-08-readline-history.h.patch | 20 +++++
.../libedit2/libedit2-10-define_SIZE_T_MAX.patch | 18 +++++
.../libedit2/libedit2-12-libedit-Makefile.patch | 54 ++++++++++++++
package/libedit2/libedit2-20-fortify.patch | 23 ++++++
package/libedit2/libedit2.mk | 75 ++++++++++++++++++++
package/libedit2/libedit2.pc | 13 ++++
12 files changed, 319 insertions(+), 0 deletions(-)
create mode 100644 package/libedit2/Config.in
create mode 100644 package/libedit2/libedit2-01-Makefile.patch
create mode 100644 package/libedit2/libedit2-02-el.c-issetugid.patch
create mode 100644 package/libedit2/libedit2-03-el.c-MAXPATHLEN.patch
create mode 100644 package/libedit2/libedit2-04-readline.h-stdio.patch
create mode 100644 package/libedit2/libedit2-08-readline-history.h.patch
create mode 100644 package/libedit2/libedit2-10-define_SIZE_T_MAX.patch
create mode 100644 package/libedit2/libedit2-12-libedit-Makefile.patch
create mode 100644 package/libedit2/libedit2-20-fortify.patch
create mode 100644 package/libedit2/libedit2.mk
create mode 100644 package/libedit2/libedit2.pc
diff --git a/package/Config.in b/package/Config.in
index 84036fc..04aef11 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -540,6 +540,7 @@ endmenu
menu "Text and terminal handling"
source "package/enchant/Config.in"
source "package/icu/Config.in"
+source "package/libedit2/Config.in"
source "package/libiconv/Config.in"
source "package/linenoise/Config.in"
source "package/ncurses/Config.in"
diff --git a/package/libedit2/Config.in b/package/libedit2/Config.in
new file mode 100644
index 0000000..1e7b95d
--- /dev/null
+++ b/package/libedit2/Config.in
@@ -0,0 +1,9 @@
+config BR2_PACKAGE_LIBEDIT2
+ bool "libedit2"
+ select BR2_PACKAGE_LIBBSD
+ select BR2_PACKAGE_NCURSES
+ help
+ The editline library (from BSD) provides generic line editing
+ and history functions. It slightly resembles GNU readline.
+
+ http://ftp.netbsd.org/pub/NetBSD/NetBSD-release-5-0/src/lib/libedit/
diff --git a/package/libedit2/libedit2-01-Makefile.patch b/package/libedit2/libedit2-01-Makefile.patch
new file mode 100644
index 0000000..91645e4
--- /dev/null
+++ b/package/libedit2/libedit2-01-Makefile.patch
@@ -0,0 +1,25 @@
+ 01-Makefile.diff by Neal H Walfield <neal@cs.uml.edu> and
+ Gergely Nagy <algernon@debian.org>
+
+ Add the necessary includes and other things to the libedit
+ Makefile, so it will compile on GNU systems, with our supplied
+ glue code
+
+ Yann E. MORIN: patch from debian.
+
+--- a/libedit/Makefile
++++ b/libedit/Makefile
+@@ -1,6 +1,13 @@
+ # $NetBSD: Makefile,v 1.36 2007/05/28 12:06:18 tls Exp $
+ # @(#)Makefile 8.1 (Berkeley) 6/4/93
+
++OS!= sh -c "case `uname -s` in GNU|GNU/*) echo GNU ;; *) uname -s ;; esac"
++
++.if ${OS} == GNU || ${OS} == Linux
++CFLAGS += -include bsd/bsd.h
++MKLINT=no
++.endif
++
+ USE_SHLIBDIR= yes
+
+ WARNS= 3
diff --git a/package/libedit2/libedit2-02-el.c-issetugid.patch b/package/libedit2/libedit2-02-el.c-issetugid.patch
new file mode 100644
index 0000000..b060fa4
--- /dev/null
+++ b/package/libedit2/libedit2-02-el.c-issetugid.patch
@@ -0,0 +1,24 @@
+ 02-el.c-issetugid.diff by Gergely Nagy <algernon@debian.org>
+
+ issetugid(2) is not implemented on GNU systems, so #ifdef it out
+
+ Yann E. MORIN: patch from debian.
+
+--- a/libedit/el.c 2008-04-06 02:53:28.000000000 +1100
++++ b/libedit/el.c 2009-06-23 08:51:48.000000000 +1000
+@@ -479,12 +479,14 @@ el_source(EditLine *el, const char *fnam
+
+ fp = NULL;
+ if (fname == NULL) {
+-#ifdef HAVE_ISSETUGID
++#if 1
+ static const char elpath[] = "/.editrc";
+ char path[MAXPATHLEN];
+
++#ifndef __GLIBC__
+ if (issetugid())
+ return (-1);
++#endif
+ if ((ptr = getenv("HOME")) == NULL)
+ return (-1);
+ if (strlcpy(path, ptr, sizeof(path)) >= sizeof(path))
diff --git a/package/libedit2/libedit2-03-el.c-MAXPATHLEN.patch b/package/libedit2/libedit2-03-el.c-MAXPATHLEN.patch
new file mode 100644
index 0000000..aadd36a
--- /dev/null
+++ b/package/libedit2/libedit2-03-el.c-MAXPATHLEN.patch
@@ -0,0 +1,40 @@
+ 03-el.c-MAXPATHLEN.diff by Gergely Nagy <algernon@debian.org>
+
+ on systems without MAXPATHLEN, allocate memory dynamically
+
+ Yann E. MORIN: patch from debian.
+
+--- a/libedit/el.c 2009-06-23 08:57:04.000000000 +1000
++++ b/libedit/el.c 2009-06-23 08:57:30.000000000 +1000
+@@ -481,7 +481,11 @@ el_source(EditLine *el, const char *fnam
+ if (fname == NULL) {
+ #if 1
+ static const char elpath[] = "/.editrc";
++#ifdef MAXPATHLEN
+ char path[MAXPATHLEN];
++#else
++ char *path;
++#endif
+
+ #ifndef __GLIBC__
+ if (issetugid())
+@@ -489,10 +493,19 @@ el_source(EditLine *el, const char *fnam
+ #endif
+ if ((ptr = getenv("HOME")) == NULL)
+ return (-1);
++#ifndef MAXPATHLEN
++ path = (char *)malloc(strlen(ptr) + strlen(elpath) + 10);
++ if (path == NULL)
++ return (-1);
++ /* Always succeeds, since we have enough memory */
++ strcpy(path, ptr);
++ strcat(path, elpath);
++#else
+ if (strlcpy(path, ptr, sizeof(path)) >= sizeof(path))
+ return (-1);
+ if (strlcat(path, elpath, sizeof(path)) >= sizeof(path))
+ return (-1);
++#endif
+ fname = path;
+ #else
+ /*
diff --git a/package/libedit2/libedit2-04-readline.h-stdio.patch b/package/libedit2/libedit2-04-readline.h-stdio.patch
new file mode 100644
index 0000000..84257b9
--- /dev/null
+++ b/package/libedit2/libedit2-04-readline.h-stdio.patch
@@ -0,0 +1,17 @@
+ 04-readline.h-stdio.diff by Gergely Nagy <algernon@debian.org>
+
+ since readline.h uses types defined in stdio.h, that header should
+ be included
+
+ Yann E. MORIN: patch from debian.
+
+--- a/libedit/readline/readline.h 2008-04-29 16:53:01.000000000 +1000
++++ b/libedit/readline/readline.h 2009-06-23 08:35:58.000000000 +1000
+@@ -31,6 +31,7 @@
+ #ifndef _READLINE_H_
+ #define _READLINE_H_
+
++#include <stdio.h>
+ #include <sys/types.h>
+
+ /* list of readline stuff supported by editline library's readline wrapper */
diff --git a/package/libedit2/libedit2-08-readline-history.h.patch b/package/libedit2/libedit2-08-readline-history.h.patch
new file mode 100644
index 0000000..f30093f
--- /dev/null
+++ b/package/libedit2/libedit2-08-readline-history.h.patch
@@ -0,0 +1,20 @@
+ 08-readline-history.h.diff by Pawel Wiecek <coven@debian.org>
+ (compatibility with older versions)
+
+ Setting the global variable rl_inhibit_completion to 1 did indeed
+ disable completion, but the invoking key (e.g., <TAB>) was not
+ inserted directly into the input line as it should be.
+ This patch fixes this problem, and also declares rl_inhibit_completion
+ in readline.h for better readline compatibility.
+
+ Yann E. MORIN: patch from debian.
+
+--- a/libedit/readline/Makefile 2003-08-03 19:23:15.000000000 +1000
++++ b/libedit/readline/Makefile 2009-06-23 08:35:58.000000000 +1000
+@@ -10,4 +10,6 @@ INCS= readline.h
+ INCSDIR= /usr/include/readline
+ INCSYMLINKS= readline.h ${INCSDIR}/history.h
+
++incinstall:: linksinstall
++
+ .include <bsd.prog.mk>
diff --git a/package/libedit2/libedit2-10-define_SIZE_T_MAX.patch b/package/libedit2/libedit2-10-define_SIZE_T_MAX.patch
new file mode 100644
index 0000000..c8ce262
--- /dev/null
+++ b/package/libedit2/libedit2-10-define_SIZE_T_MAX.patch
@@ -0,0 +1,18 @@
+ 10-define_SIZE_T_MAX.diff by Anibal Monsalve Salazar
+ define SIZE_T_MAX as UINT_MAX in limits.h
+
+ Yann E. MORIN: patch from debian.
+
+--- a/libedit/readline.c 2008-04-29 16:53:01.000000000 +1000
++++ a/libedit/readline.c 2008-06-14 23:54:16.000000000 +1000
+@@ -61,6 +61,10 @@ __RCSID("$NetBSD: readline.c,v 1.75 2008
+ #include "readline/readline.h"
+ #include "filecomplete.h"
+
++#ifndef SIZE_T_MAX
++#define SIZE_T_MAX UINT_MAX
++#endif
++
+ void rl_prep_terminal(int);
+ void rl_deprep_terminal(void);
+
diff --git a/package/libedit2/libedit2-12-libedit-Makefile.patch b/package/libedit2/libedit2-12-libedit-Makefile.patch
new file mode 100644
index 0000000..3234f33
--- /dev/null
+++ b/package/libedit2/libedit2-12-libedit-Makefile.patch
@@ -0,0 +1,54 @@
+ 12-libedit-Makefile.diff by Anibal Monsalve Salazar
+ without this patch I get the following message:
+ make: ${_MKTARGET_CREATE} expands to empty string
+
+ Yann E. MORIN: patch from debian.
+
+--- a/libedit/Makefile 2007-05-28 22:06:18.000000000 +1000
++++ a/libedit/Makefile 2008-06-15 13:53:50.000000000 +1000
+@@ -59,45 +59,37 @@ CLEANFILES+= ${AHDR} fcns.h help.h fcns.
+ SUBDIR= readline
+
+ vi.h: vi.c makelist Makefile
+- ${_MKTARGET_CREATE}
+ ${HOST_SH} ${LIBEDITDIR}/makelist -h ${LIBEDITDIR}/vi.c \
+ > ${.TARGET}.tmp && \
+ mv ${.TARGET}.tmp ${.TARGET}
+
+ emacs.h: emacs.c makelist Makefile
+- ${_MKTARGET_CREATE}
+ ${HOST_SH} ${LIBEDITDIR}/makelist -h ${LIBEDITDIR}/emacs.c \
+ > ${.TARGET}.tmp && \
+ mv ${.TARGET}.tmp ${.TARGET}
+
+ common.h: common.c makelist Makefile
+- ${_MKTARGET_CREATE}
+ ${HOST_SH} ${LIBEDITDIR}/makelist -h ${LIBEDITDIR}/common.c \
+ > ${.TARGET}.tmp && \
+ mv ${.TARGET}.tmp ${.TARGET}
+
+ fcns.h: ${AHDR} makelist Makefile
+- ${_MKTARGET_CREATE}
+ ${HOST_SH} ${LIBEDITDIR}/makelist -fh ${AHDR} > ${.TARGET}.tmp && \
+ mv ${.TARGET}.tmp ${.TARGET}
+
+ fcns.c: ${AHDR} fcns.h help.h makelist Makefile
+- ${_MKTARGET_CREATE}
+ ${HOST_SH} ${LIBEDITDIR}/makelist -fc ${AHDR} > ${.TARGET}.tmp && \
+ mv ${.TARGET}.tmp ${.TARGET}
+
+ help.c: ${ASRC} makelist Makefile
+- ${_MKTARGET_CREATE}
+ ${HOST_SH} ${LIBEDITDIR}/makelist -bc ${ASRC} > ${.TARGET}.tmp && \
+ mv ${.TARGET}.tmp ${.TARGET}
+
+ help.h: ${ASRC} makelist Makefile
+- ${_MKTARGET_CREATE}
+ ${HOST_SH} ${LIBEDITDIR}/makelist -bh ${ASRC} > ${.TARGET}.tmp && \
+ mv ${.TARGET}.tmp ${.TARGET}
+
+ editline.c: ${OSRCS} makelist Makefile
+- ${_MKTARGET_CREATE}
+ ${HOST_SH} ${LIBEDITDIR}/makelist -e ${OSRCS:T} > ${.TARGET}.tmp && \
+ mv ${.TARGET}.tmp ${.TARGET}
+
diff --git a/package/libedit2/libedit2-20-fortify.patch b/package/libedit2/libedit2-20-fortify.patch
new file mode 100644
index 0000000..0a41ce3
--- /dev/null
+++ b/package/libedit2/libedit2-20-fortify.patch
@@ -0,0 +1,23 @@
+http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=488456
+
+Patch by Kees Cook <kees@outflux.net>
+
+Yann E. MORIN: patch from debian.
+
+--- a/libedit/vi.c 2006-10-22 17:48:13.000000000 +1000
++++ b/libedit/vi.c 2009-06-23 08:35:58.000000000 +1000
+@@ -1012,8 +1012,12 @@ vi_histedit(EditLine *el, int c)
+ if (fd < 0)
+ return CC_ERROR;
+ cp = el->el_line.buffer;
+- write(fd, cp, el->el_line.lastchar - cp +0u);
+- write(fd, "\n", 1);
++ if (write(fd, cp, el->el_line.lastchar - cp +0u)<0 ||
++ write(fd, "\n", 1)<0) {
++ close(fd);
++ unlink(tempfile);
++ return CC_ERROR;
++ }
+ pid = fork();
+ switch (pid) {
+ case -1:
diff --git a/package/libedit2/libedit2.mk b/package/libedit2/libedit2.mk
new file mode 100644
index 0000000..b9ca41e
--- /dev/null
+++ b/package/libedit2/libedit2.mk
@@ -0,0 +1,75 @@
+#############################################################
+#
+# libedit2
+#
+#############################################################
+
+# Note: libedit2 does not have a regular homepage, and it seems
+# there is no place where to download a tarball from. That's
+# why we use the Debian way-back machine.
+LIBEDIT2_VERSION_MAJOR = 2
+LIBEDIT2_VERSION_MINOR = 11-20080614
+LIBEDIT2_VERSION = $(LIBEDIT2_VERSION_MAJOR).$(LIBEDIT2_VERSION_MINOR)
+LIBEDIT2_SOURCE = libedit_$(LIBEDIT2_VERSION).orig.tar.bz2
+LIBEDIT2_SITE = http://snapshot.debian.org/archive/debian/20120601T033558Z/pool/main/libe/libedit
+LIBEDIT2_SUBDIR = libedit
+LIBEDIT2_INSTALL_STAGING = YES
+LIBEDIT2_DEPENDENCIES = host-pmake libbsd ncurses
+
+define POST_PATCH_PERMISSIONS
+ chmod +x $(@D)/libedit/makelist
+endef
+
+LIBEDIT2_POST_PATCH_HOOKS += POST_PATCH_PERMISSIONS
+
+define LIBEDIT2_FIX_VIS_H_INCLUDE
+ $(SED) 's/^#include <vis.h>$$/#include <bsd\/vis.h>/;' $(@D)/libedit/filecomplete.c
+ $(SED) 's/^#include <vis.h>$$/#include <bsd\/vis.h>/;' $(@D)/libedit/history.c
+ $(SED) 's/^#include <vis.h>$$/#include <bsd\/vis.h>/;' $(@D)/libedit/readline.c
+endef
+LIBEDIT2_POST_PATCH_HOOKS += LIBEDIT2_FIX_VIS_H_INCLUDE
+
+LIBEDIT2_PMAKE_ARGS = MKPROFILE=no MKCATPAGES=no MLINKS= MANPAGES= NOGCCERROR=1 \
+ SHLIB_SHFLAGS="-Wl,-soname,libedit.so.${LIBEDIT2_VERSION_MAJOR}" \
+
+define LIBEDIT2_BUILD_CMDS
+ cd $(@D)/$(LIBEDIT2_SUBDIR); \
+ $(TARGET_CONFIGURE_OPTS) LDADD="-lbsd -lcurses" pmake $(LIBEDIT2_PMAKE_ARGS)
+endef
+
+LIBEDIT2_MAN_LINKS = el_init el_end el_reset el_gets el_getc el_push el_parse \
+ el_set el_get el_source el_resize el_line el_insertstr \
+ el_deletestr history_init history_end history
+
+# $1: DESTDIR to install into
+# Can't use pmake to install, it wants to be root. sigh... :-(
+define LIBEDIT2_INSTALL_CMDS
+ $(INSTALL) -D -m 0644 package/libedit2/libedit2.pc $(1)/usr/lib/pkgconfig/libedit2.pc
+ ln -sf libedit2.pc $(1)/usr/lib/pkgconfig/libedit.pc
+ $(INSTALL) -D -m 0644 $(@D)/libedit/libedit.a $(1)/usr/lib/libedit.a
+ $(INSTALL) -D -m 0644 $(@D)/libedit/libedit_pic.a $(1)/usr/lib/libedit_pic.a
+ $(INSTALL) -D -m 0644 $(@D)/libedit/libedit.so.2.11 $(1)/usr/lib/libedit.so.2.11
+ $(INSTALL) -D -m 0644 $(@D)/libedit/histedit.h $(1)/usr/include/histedit.h
+ ln -sf libedit.so.$(LIBEDIT2_VERSION) $(1)/usr/lib/libedit.so.$(LIBEDIT2_VERSION_MAJOR)
+ ln -sf libedit.so.$(LIBEDIT2_VERSION_MAJOR) $(1)/usr/lib/libedit.so
+ $(INSTALL) -D -m 0644 $(@D)/libedit/readline/readline.h $(1)/usr/include/editline/readline.h
+ if [ "$(BR2_HAVE_DOCUMENTATION)" = "y" ]; then \
+ $(INSTALL) -v -D -m 0644 $(@D)/libedit/editline.3 $(1)/usr/share/man/man3/editline.3el; \
+ $(INSTALL) -v -D -m 0644 $(@D)/libedit/editrc.3 $(1)/usr/share/man/man5/editrc.5el; \
+ for lnk in $(LIBEDIT2_MAN_LINKS); do \
+ ln -sfv editline.3el $(1)/usr/share/man/man3/$${lnk}.3el; \
+ done; \
+ fi
+endef
+# cd $(@D)/libedit; pmake install incinstall DESTDIR=$(1) $(LIBEDIT2_PMAKE_ARGS)
+# cd $(@D)/libedit/readline; pmake incinstall DESTDIR=$(1) $(LIBEDIT2_PMAKE_ARGS)
+
+define LIBEDIT2_INSTALL_STAGING_CMDS
+ $(call LIBEDIT2_INSTALL_CMDS,$(STAGING_DIR))
+endef
+
+define LIBEDIT2_INSTALL_TARGET_CMDS
+ $(call LIBEDIT2_INSTALL_CMDS,$(TARGET_DIR))
+endef
+
+$(eval $(generic-package))
diff --git a/package/libedit2/libedit2.pc b/package/libedit2/libedit2.pc
new file mode 100644
index 0000000..47ac871
--- /dev/null
+++ b/package/libedit2/libedit2.pc
@@ -0,0 +1,13 @@
+prefix=/usr
+exec_prefix=${prefix}
+libdir=${exec_prefix}/lib
+includedir=${prefix}/include
+
+Name: libedit
+Description: Not just a replacement library for libreadline and libhistory.
+Version: 2.11
+Requires: libbsd ncurses
+Requires.private:
+Libs: -L${libdir} -ledit
+Libs.private:
+Cflags: -I${includedir}
--
1.7.2.5
^ permalink raw reply related
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox