[Armadeus-commitlog] armadeus branch, master, updated. release-3.2-330-g9fa6bc8
Brought to you by:
sszy
|
From: Julien B a. A. <ar...@us...> - 2010-05-03 14:18:06
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "armadeus".
The branch, master has been updated
via 9fa6bc8a3589496fb0a5d9a1e2a5f559ad709933 (commit)
via 6683ecc650eb681a0dade8d2598eb2ba22b9edc6 (commit)
via 0eb5b0e5ad78f370ae8e5d91da2c500715b10c5c (commit)
from a2b0f5a38618a22eaec6d4849e56f9e8fef9993b (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 9fa6bc8a3589496fb0a5d9a1e2a5f559ad709933
Author: Julien Boibessot <jul...@ar...>
Date: Mon May 3 16:10:00 2010 +0200
[BUILDROOT] Add wpa_supplicant package (for 2008.11 Buildroot)
commit 6683ecc650eb681a0dade8d2598eb2ba22b9edc6
Author: Julien Boibessot <jul...@ar...>
Date: Fri Apr 30 19:29:15 2010 +0200
[DEMOS] Add better error handling in capture app
commit 0eb5b0e5ad78f370ae8e5d91da2c500715b10c5c
Author: Julien Boibessot <jul...@ar...>
Date: Fri Apr 30 19:26:58 2010 +0200
Add backlight_control/.gitignore
-----------------------------------------------------------------------
Summary of changes:
.../target/device/armadeus/apf27/apf27_defconfig | 3 +-
.../buildroot/108-wpa_supplicant-add_package.patch | 139 ++++++++++++++++++++
patches/buildroot/cleanup_buildroot.sh | 1 +
target/demos/backlight_control/.gitignore | 1 +
target/demos/camera/capture/capture.c | 48 +++++---
5 files changed, 174 insertions(+), 18 deletions(-)
create mode 100644 patches/buildroot/108-wpa_supplicant-add_package.patch
create mode 100644 target/demos/backlight_control/.gitignore
diff --git a/buildroot/target/device/armadeus/apf27/apf27_defconfig b/buildroot/target/device/armadeus/apf27/apf27_defconfig
index 08daaf0..4078a18 100644
--- a/buildroot/target/device/armadeus/apf27/apf27_defconfig
+++ b/buildroot/target/device/armadeus/apf27/apf27_defconfig
@@ -1,6 +1,6 @@
#
# Automatically generated make config: don't edit
-# Fri Apr 30 09:57:54 2010
+# Mon May 3 15:55:29 2010
#
BR2_HAVE_DOT_CONFIG=y
BR2_VERSION="0.10.0-svn"
@@ -490,6 +490,7 @@ BR2_PACKAGE_PORTMAP=y
# BR2_PACKAGE_VTUN is not set
# BR2_PACKAGE_WEBIF is not set
BR2_PACKAGE_WIRELESS_TOOLS=y
+# BR2_PACKAGE_WPA_SUPPLICANT is not set
BR2_BLOCKDEV_SUPPORT=y
#
diff --git a/patches/buildroot/108-wpa_supplicant-add_package.patch b/patches/buildroot/108-wpa_supplicant-add_package.patch
new file mode 100644
index 0000000..9084c28
--- /dev/null
+++ b/patches/buildroot/108-wpa_supplicant-add_package.patch
@@ -0,0 +1,139 @@
+
+Backport of wpa_supplicant integration from Buildroot mainline.
+
+Not needed for recent BR.
+
+Index: buildroot/package/Config.in
+===================================================================
+--- buildroot.orig/package/Config.in 2010-05-03 14:23:54.000000000 +0200
++++ buildroot/package/Config.in 2010-05-03 14:25:24.000000000 +0200
+@@ -236,6 +236,7 @@
+ source "package/wget/Config.in"
+ endif
+ source "package/wireless-tools/Config.in"
++source "package/wpa_supplicant/Config.in"
+
+ endif
+
+Index: buildroot/package/wpa_supplicant/Config.in
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ buildroot/package/wpa_supplicant/Config.in 2010-05-03 14:29:34.000000000 +0200
+@@ -0,0 +1,32 @@
++config BR2_PACKAGE_WPA_SUPPLICANT
++ bool "wpa_supplicant"
++ help
++ WPA supplicant for secure wireless networks
++
++ http://hostap.epitest.fi/wpa_supplicant/
++
++config BR2_PACKAGE_WPA_SUPPLICANT_EAP
++ bool "Enable WPA with EAP"
++ depends on BR2_PACKAGE_WPA_SUPPLICANT
++ help
++ Enable WPA with EAP (IEEE 802.1X)
++
++config BR2_PACKAGE_WPA_SUPPLICANT_OPENSSL
++ bool "Use openssl TLS (recommended)"
++ depends on BR2_PACKAGE_WPA_SUPPLICANT && BR2_PACKAGE_WPA_SUPPLICANT_EAP
++ select BR2_PACKAGE_OPENSSL
++ help
++ Use OpenSSL's TLS implementation instead of internal libtommath.
++
++config BR2_PACKAGE_WPA_SUPPLICANT_CLI
++ bool "Install wpa_cli binary"
++ depends on BR2_PACKAGE_WPA_SUPPLICANT
++ help
++ Install wpa_cli command line utility
++
++config BR2_PACKAGE_WPA_SUPPLICANT_PASSPHRASE
++ bool "Install wpa_passphrase binary"
++ depends on BR2_PACKAGE_WPA_SUPPLICANT
++ help
++ Install wpa_passphrase command line utility
++
+Index: buildroot/package/wpa_supplicant/wpa_supplicant.mk
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ buildroot/package/wpa_supplicant/wpa_supplicant.mk 2010-05-03 14:33:11.000000000 +0200
+@@ -0,0 +1,80 @@
++#############################################################
++#
++# wpa_supplicant
++#
++#############################################################
++
++WPA_SUPPLICANT_VERSION = 0.6.10
++WPA_SUPPLICANT_SITE = http://hostap.epitest.fi/releases
++WPA_SUPPLICANT_LIBTOOL_PATCH = NO
++WPA_SUPPLICANT_INSTALL_TARGET_OPT = DESTDIR=$(TARGET_DIR) install
++WPA_SUPPLICANT_DEPENDENCIES =
++WPA_SUPPLICANT_CONFIG = $(WPA_SUPPLICANT_DIR)/wpa_supplicant/.config
++WPA_SUPPLICANT_SUBDIR = wpa_supplicant
++WPA_SUPPLICANT_TARGET_BINS = wpa_cli wpa_supplicant wpa_passphrase
++WPA_SUPPLICANT_DBUS_SERVICE = fi.epitest.hostap.WPASupplicant
++
++ifeq ($(BR2_PACKAGE_LIBNL),y)
++ WPA_SUPPLICANT_DEPENDENCIES += libnl
++endif
++
++ifeq ($(BR2_PACKAGE_WPA_SUPPLICANT_OPENSSL),y)
++ WPA_SUPPLICANT_DEPENDENCIES += openssl
++endif
++ifeq ($(BR2_PACKAGE_DBUS),y)
++ WPA_SUPPLICANT_DEPENDENCIES += host-pkgconfig dbus
++ WPA_SUPPLICANT_MAKE_ENV = \
++ PKG_CONFIG_SYSROOT_DIR="$(STAGING_DIR)" \
++ PKG_CONFIG_PATH="$(STAGING_DIR)/usr/lib/pkgconfig"
++endif
++
++$(eval $(call AUTOTARGETS,package,wpa_supplicant))
++
++$(WPA_SUPPLICANT_TARGET_CONFIGURE):
++ cp $(WPA_SUPPLICANT_DIR)/wpa_supplicant/defconfig $(WPA_SUPPLICANT_CONFIG)
++ echo "CFLAGS += $(TARGET_CFLAGS)" >>$(WPA_SUPPLICANT_CONFIG)
++ echo "CC = $(TARGET_CC)" >>$(WPA_SUPPLICANT_CONFIG)
++ $(SED) "s/\/local//" $(WPA_SUPPLICANT_DIR)/wpa_supplicant/Makefile
++ifneq ($(BR2_PACKAGE_WPA_SUPPLICANT_EAP),y)
++ $(SED) "s/^CONFIG_EAP_*/#CONFIG_EAP_/g" $(WPA_SUPPLICANT_CONFIG)
++ echo "CONFIG_TLS=none" >>$(WPA_SUPPLICANT_CONFIG)
++else
++ifeq ($(BR2_PACKAGE_WPA_SUPPLICANT_OPENSSL),y)
++ echo "CONFIG_TLS=openssl" >>$(WPA_SUPPLICANT_CONFIG)
++else
++ echo "CONFIG_TLS=internal" >>$(WPA_SUPPLICANT_CONFIG)
++ echo "CONFIG_INTERNAL_LIBTOMMATH=y" >>$(WPA_SUPPLICANT_CONFIG)
++endif
++endif
++ifeq ($(BR2_PACKAGE_DBUS),y)
++ echo "CONFIG_CTRL_IFACE_DBUS=y" >>$(WPA_SUPPLICANT_CONFIG)
++endif
++ifeq ($(BR2_PACKAGE_LIBNL),y)
++ echo "CONFIG_DRIVER_NL80211=y" >>$(WPA_SUPPLICANT_CONFIG)
++endif
++ touch $@
++
++$(WPA_SUPPLICANT_HOOK_POST_INSTALL):
++ifneq ($(BR2_PACKAGE_WPA_SUPPLICANT_CLI),y)
++ rm -f $(TARGET_DIR)/usr/sbin/wpa_cli
++endif
++ifneq ($(BR2_PACKAGE_WPA_SUPPLICANT_PASSPHRASE),y)
++ rm -f $(TARGET_DIR)/usr/sbin/wpa_passphrase
++endif
++ifeq ($(BR2_PACKAGE_DBUS),y)
++ $(INSTALL) -D \
++ $(WPA_SUPPLICANT_DIR)/wpa_supplicant/dbus-wpa_supplicant.conf \
++ $(TARGET_DIR)/etc/dbus-1/system.d/wpa_supplicant.conf
++ $(INSTALL) -D \
++ $(WPA_SUPPLICANT_DIR)/wpa_supplicant/dbus-wpa_supplicant.service \
++ $(TARGET_DIR)/usr/share/dbus-1/system-services/$(WPA_SUPPLICANT_DBUS_SERVICE).service
++endif
++ touch $@
++
++$(WPA_SUPPLICANT_TARGET_UNINSTALL):
++ $(call MESSAGE,"Uninstalling")
++ rm -f $(addprefix $(TARGET_DIR)/usr/sbin/, $(WPA_SUPPLICANT_TARGET_BINS))
++ rm -f $(TARGET_DIR)/etc/dbus-1/system.d/wpa_supplicant.conf
++ rm -f $(TARGET_DIR)/usr/share/dbus-1/system-services/$(WPA_SUPPLICANT_DBUS_SERVICE).service
++ rm -f $(WPA_SUPPLICANT_TARGET_INSTALL_TARGET) $(WPA_SUPPLICANT_HOOK_POST_INSTALL)
++
diff --git a/patches/buildroot/cleanup_buildroot.sh b/patches/buildroot/cleanup_buildroot.sh
index 12117e8..4194e47 100755
--- a/patches/buildroot/cleanup_buildroot.sh
+++ b/patches/buildroot/cleanup_buildroot.sh
@@ -17,3 +17,4 @@ rm -f buildroot/package/audio/madplay/madplay-audio-alsa.patch
rm -f buildroot/package/mplayer/mplayer-1.0rc1-add_pld_asm_inst_for_non_armv5_arch.patch
rm -f buildroot/package/busybox/busybox-1.12.1-speed_table-B921600.patch
rm -rf buildroot/package/firmware/
+rm -rf buildroot/package/wpa_supplicant/
diff --git a/target/demos/backlight_control/.gitignore b/target/demos/backlight_control/.gitignore
new file mode 100644
index 0000000..bc78951
--- /dev/null
+++ b/target/demos/backlight_control/.gitignore
@@ -0,0 +1 @@
+backlight
diff --git a/target/demos/camera/capture/capture.c b/target/demos/camera/capture/capture.c
index 8282784..23c8a8b 100644
--- a/target/demos/camera/capture/capture.c
+++ b/target/demos/camera/capture/capture.c
@@ -200,7 +200,7 @@ static void simple_copy(void *yuv, int size, void* rgb)
memcpy(rgb, yuv, size);
}
-static void process_image(/*const */void *pCaptured)
+static void process_image(/*const */void *pCaptured, int size)
{
SDL_Rect update_rec;
@@ -212,7 +212,9 @@ static void process_image(/*const */void *pCaptured)
if (mycamera.pixelformat != V4L2_PIX_FMT_RGB565) {
printf("Unknown image format\n");
}
- simple_copy(pCaptured, mycamera.sizeimage, image->pixels);
+ if (size == 0)
+ size = mycamera.sizeimage;
+ simple_copy(pCaptured, size, image->pixels);
}
/* Blit converted image on screen */
@@ -231,7 +233,7 @@ static int read_frame(void)
switch (io) {
case IO_METHOD_READ:
- if (-1 == read (fd, buffers[0].start, buffers[0].length)) {
+ if (-1 == read(fd, buffers[0].start, buffers[0].length)) {
switch (errno) {
case EAGAIN:
return 0;
@@ -246,7 +248,7 @@ static int read_frame(void)
}
}
- process_image (buffers[0].start);
+ process_image(buffers[0].start, buffers[0].length);
break;
@@ -256,7 +258,7 @@ static int read_frame(void)
buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
buf.memory = V4L2_MEMORY_MMAP;
- if (-1 == xioctl (fd, VIDIOC_DQBUF, &buf)) {
+ if (-1 == xioctl(fd, VIDIOC_DQBUF, &buf)) {
switch (errno) {
case EAGAIN:
return 0;
@@ -267,16 +269,16 @@ static int read_frame(void)
/* fall through */
default:
- errno_exit ("VIDIOC_DQBUF");
+ errno_exit("VIDIOC_DQBUF");
}
}
assert (buf.index < n_buffers);
- process_image (buffers[buf.index].start);
+ process_image(buffers[buf.index].start, buf.length);
- if (-1 == xioctl (fd, VIDIOC_QBUF, &buf))
- errno_exit ("VIDIOC_QBUF");
+ if (-1 == xioctl(fd, VIDIOC_QBUF, &buf))
+ errno_exit("VIDIOC_QBUF");
break;
@@ -308,7 +310,7 @@ static int read_frame(void)
assert (i < n_buffers);
- process_image ((void *) buf.m.userptr);
+ process_image((void *) buf.m.userptr, 0);
if (-1 == xioctl (fd, VIDIOC_QBUF, &buf))
errno_exit ("VIDIOC_QBUF");
@@ -512,7 +514,7 @@ static void init_mmap(void)
exit (EXIT_FAILURE);
}
- buffers = calloc (req.count, sizeof (*buffers));
+ buffers = calloc(req.count, sizeof (*buffers));
if (!buffers) {
fprintf (stderr, "Out of memory\n");
@@ -615,12 +617,16 @@ static Uint32 get_a_supported_pix_fmt(void)
if (-1 == ioctl(fd, VIDIOC_ENUM_FMT, &fmtdesc))
break;
- if ((fmtdesc.pixelformat == V4L2_PIX_FMT_YUYV) || (fmtdesc.pixelformat == V4L2_PIX_FMT_YUV420)) {
+ if ((fmtdesc.pixelformat == V4L2_PIX_FMT_YUYV)
+ || (fmtdesc.pixelformat == V4L2_PIX_FMT_YUV420)
+ || (fmtdesc.pixelformat == V4L2_PIX_FMT_JPEG)) {
fprintf(stdout, "Using img format (%d 0x%08x): ", i, fmtdesc.pixelformat);
if (fmtdesc.pixelformat == V4L2_PIX_FMT_YUYV)
fprintf(stdout, "YUYV (YUV:4:2:2)\n");
if (fmtdesc.pixelformat == V4L2_PIX_FMT_YUV420)
fprintf(stdout, "YUV:4:2:0\n");
+ if (fmtdesc.pixelformat == V4L2_PIX_FMT_JPEG)
+ fprintf(stdout, "JPEG\n");
return fmtdesc.pixelformat;
}
}
@@ -704,6 +710,7 @@ static void init_device(unsigned int capt_width, unsigned int capt_height)
if (!fmt.fmt.pix.pixelformat) {
fprintf(stderr, "%s does not support requested img formats\n",
dev_name);
+ exit(EXIT_FAILURE);
}
fmt.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
@@ -731,19 +738,22 @@ static void init_device(unsigned int capt_width, unsigned int capt_height)
mycamera.bytesperline = fmt.fmt.pix.bytesperline;
mycamera.sizeimage = fmt.fmt.pix.sizeimage;
+ fprintf(stdout, " picture size: %d\n", fmt.fmt.pix.sizeimage);
+
switch (io) {
case IO_METHOD_READ:
- init_read (fmt.fmt.pix.sizeimage);
+ init_read(fmt.fmt.pix.sizeimage);
break;
case IO_METHOD_MMAP:
- init_mmap ();
+ init_mmap();
break;
case IO_METHOD_USERPTR:
- init_userp (fmt.fmt.pix.sizeimage);
+ init_userp(fmt.fmt.pix.sizeimage);
break;
}
+ fprintf(stdout, " OK\n");
}
static void close_device(void)
@@ -884,8 +894,12 @@ int main(int argc, char **argv)
camheight = camheight > height ? height : camheight;
init_device(camwidth, camheight);
- SDL_Init(SDL_INIT_VIDEO);
- screen = SDL_SetVideoMode(width, height, 16, (SDL_HWSURFACE));
+ if (SDL_Init(SDL_INIT_VIDEO) < 0) {
+ fprintf(stderr, "Unable to init SDL: %s\n", SDL_GetError());
+ exit(EXIT_FAILURE);
+ }
+ fprintf(stderr, "SDL OK\n");
+ screen = SDL_SetVideoMode(width, height, 16, SDL_ANYFORMAT | SDL_DOUBLEBUF | SDL_HWSURFACE);
if (screen) {
printf("Video mode: %dx%dx%d\n", screen->w, screen->h,
screen->format->BitsPerPixel);
hooks/post-receive
--
armadeus
|