[Armadeus-commitlog] armadeus branch, master, updated. release-3.2-38-g942fa6e
Brought to you by:
sszy
|
From: Julien B a. A. <ar...@us...> - 2009-12-10 19:34:26
|
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 942fa6e8d15e96782d0f2b9f7178d4b603e6e061 (commit)
via 9ce35f8ba2a06d158c307300ebc9425731d1ba6e (commit)
from f501162576d91f4af422a10edbc6315501d96259 (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 942fa6e8d15e96782d0f2b9f7178d4b603e6e061
Author: Julien Boibessot <jul...@ar...>
Date: Thu Dec 10 16:20:25 2009 +0100
[DEMOS] Add a new tool to seek LCD's dead pixels
commit 9ce35f8ba2a06d158c307300ebc9425731d1ba6e
Author: Julien Boibessot <jul...@ar...>
Date: Thu Dec 10 15:54:01 2009 +0100
[BUILDROOT] Add a fix for uClibc 0.9.29 to be able to set speed > 115200 on serial terminal/port
-----------------------------------------------------------------------
Summary of changes:
buildroot/package/armadeus/demos/Config.in | 6 +
buildroot/package/armadeus/demos/demos.mk | 4 +
...-0.9.29-fix-max_baud_rate_setting_for_arm.patch | 22 ++++
target/demos/{show_image => test_lcd}/Makefile | 34 +++---
target/demos/{input_test => test_lcd}/README | 0
target/demos/test_lcd/test_lcd.c | 126 ++++++++++++++++++++
6 files changed, 175 insertions(+), 17 deletions(-)
create mode 100644 buildroot/toolchain/uClibc/uClibc-0.9.29-fix-max_baud_rate_setting_for_arm.patch
copy target/demos/{show_image => test_lcd}/Makefile (62%)
copy target/demos/{input_test => test_lcd}/README (100%)
create mode 100644 target/demos/test_lcd/test_lcd.c
diff --git a/buildroot/package/armadeus/demos/Config.in b/buildroot/package/armadeus/demos/Config.in
index 8d9d9d2..d5e13e6 100644
--- a/buildroot/package/armadeus/demos/Config.in
+++ b/buildroot/package/armadeus/demos/Config.in
@@ -53,4 +53,10 @@ config BR2_PACKAGE_ARMADEUS_DEMOS_SHOW_IMAGE
help
SDL based image viewer.
+config BR2_PACKAGE_ARMADEUS_DEMOS_TEST_LCD
+ bool "LCD test"
+ select CONFIG_BR2_PACKAGE_SDL
+ help
+ Test for LCD dead pixels. Needs SDL.
+
endmenu
diff --git a/buildroot/package/armadeus/demos/demos.mk b/buildroot/package/armadeus/demos/demos.mk
index b95d938..dd8edc6 100644
--- a/buildroot/package/armadeus/demos/demos.mk
+++ b/buildroot/package/armadeus/demos/demos.mk
@@ -43,6 +43,10 @@ ifeq ($(BR2_PACKAGE_ARMADEUS_DEMOS_SHOW_IMAGE),y)
ARMADEUS-DEMOS_SUBDIRS+=show_image
endif
+ifeq ($(BR2_PACKAGE_ARMADEUS_DEMOS_TEST_LCD),y)
+ARMADEUS-DEMOS_SUBDIRS+=test_lcd
+endif
+
$(ARMADEUS-DEMOS_DIR)/.unpacked:
mkdir -p $(ARMADEUS-DEMOS_DIR)/
diff --git a/buildroot/toolchain/uClibc/uClibc-0.9.29-fix-max_baud_rate_setting_for_arm.patch b/buildroot/toolchain/uClibc/uClibc-0.9.29-fix-max_baud_rate_setting_for_arm.patch
new file mode 100644
index 0000000..9f5681e
--- /dev/null
+++ b/buildroot/toolchain/uClibc/uClibc-0.9.29-fix-max_baud_rate_setting_for_arm.patch
@@ -0,0 +1,22 @@
+Index: uClibc-0.9.29/libc/sysdeps/linux/common/bits/termios.h
+===================================================================
+--- uClibc-0.9.29/libc/sysdeps/linux/common/bits/termios.h 2009-12-10 15:05:16.000000000 +0100
++++ uClibc-0.9.29.mod/libc/sysdeps/linux/common/bits/termios.h 2009-12-10 15:05:45.000000000 +0100
+@@ -156,7 +156,6 @@
+ #endif
+ #define B57600 0010001
+ #define B115200 0010002
+-#if 0 /* limited on uClibc, keep in sync w/ cfsetspeed.c */
+ #define B230400 0010003
+ #define B460800 0010004
+ #define B500000 0010005
+@@ -171,9 +170,6 @@
+ #define B3500000 0010016
+ #define B4000000 0010017
+ #define __MAX_BAUD B4000000
+-#else
+-#define __MAX_BAUD B115200
+-#endif
+ #ifdef __USE_MISC
+ # define CIBAUD 002003600000 /* input baud rate (not used) */
+ # define CMSPAR 010000000000 /* mark or space (stick) parity */
diff --git a/target/demos/show_image/Makefile b/target/demos/test_lcd/Makefile
similarity index 62%
copy from target/demos/show_image/Makefile
copy to target/demos/test_lcd/Makefile
index d7e7fa1..fed69b9 100644
--- a/target/demos/show_image/Makefile
+++ b/target/demos/test_lcd/Makefile
@@ -1,49 +1,49 @@
ARMADEUS_BASE_DIR=../../..
-include $(ARMADEUS_BASE_DIR)/Makefile.in
+# Default values for local compiling:
+INSTALL_DIR:=$(ARMADEUS_ROOTFS_DIR)/usr/local/bin
+INSTALL_DATA_DIR:=$(ARMADEUS_ROOTFS_DIR)/usr/share
CC:=$(ARMADEUS_TOOLCHAIN_PATH)/arm-linux-gcc
STRIP:=$(ARMADEUS_TOOLCHAIN_PATH)/arm-linux-sstrip
STAGING_DIR:=$(ARMADEUS_STAGING_DIR)
-INSTALL_DIR:=$(ARMADEUS_ROOTFS_DIR)/usr/local/bin/
SDL_DIR:=$(ARMADEUS_SDL_DIR)
-
-DEFINES=-DTARGET
CFLAGS=$(shell STAGING_DIR=$(STAGING_DIR) sh $(SDL_DIR)/sdl-config --cflags) -g
-LDFLAGS=$(shell STAGING_DIR=$(STAGING_DIR) sh $(SDL_DIR)/sdl-config --libs) -lSDL_image
+LDFLAGS=$(shell STAGING_DIR=$(STAGING_DIR) sh $(SDL_DIR)/sdl-config --libs)
ifeq ($(TARGET),x86)
- INSTALL_DIR:=/usr/local/bin/
- CFLAGS=`/usr/bin/sdl-config --cflags` -g
- LIBS=`/usr/bin/sdl-config --libs` -lSDL_Image
- CC=gcc
- STRIP=strip
- DEFINES=-DHOST
+ INSTALL_DIR:=/usr/local/bin
+ INSTALL_DATA_DIR:=/usr/share
+ CFLAGS=`/usr/bin/sdl-config --cflags`
+ LDFLAGS=`/usr/bin/sdl-config --libs`
+ CC=gcc
+ STRIP=strip
endif
-EXEC_NAME=show_image
+EXEC_NAME=test_lcd
default: $(EXEC_NAME)
all: $(EXEC_NAME)
-image.o: image.c
+%.o: %.c
$(CC) $(CFLAGS) -c -o $@ $^
-$(EXEC_NAME): image.o
+$(EXEC_NAME): test_lcd.o
$(CC) $(LDFLAGS) -o $@ $^
install: $(EXEC_NAME)
mkdir -p $(INSTALL_DIR)
- cp $^ $(INSTALL_DIR)
+ cp $^ $(INSTALL_DIR)
$(STRIP) $(INSTALL_DIR)/$^
+uninstall:
+ rm -f $(INSTALL_DIR)/$(EXEC_NAME)
+
clean:
rm -rf $(EXEC_NAME)
rm -rf *.o
-uninstall:
- rm -f $(INSTALL_DIR)/$(EXEC_NAME)
-
.PHONY: clean install uninstall
diff --git a/target/demos/input_test/README b/target/demos/test_lcd/README
similarity index 100%
copy from target/demos/input_test/README
copy to target/demos/test_lcd/README
diff --git a/target/demos/test_lcd/test_lcd.c b/target/demos/test_lcd/test_lcd.c
new file mode 100644
index 0000000..6e82467
--- /dev/null
+++ b/target/demos/test_lcd/test_lcd.c
@@ -0,0 +1,126 @@
+/*
+ * Small tool to test LCD pixels (and why not one day repair defect one ! ;-))
+ * for the Armadeus project: http://www.armadeus.org
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h> /* for sleep() */
+
+#include "SDL.h"
+
+#ifdef DEBUG
+#define debug( args...) printf( ## args )
+#else
+#define debug( args...) do {;} while(0);
+#endif
+
+
+SDL_Surface *screen;
+
+
+static void free_ressources()
+{
+ SDL_FreeSurface(screen);
+}
+
+void cleanup(void)
+{
+ free_ressources();
+ SDL_Quit();
+}
+
+static void fill_screen_and_wait_key(Uint8 r, Uint8 g, Uint8 b)
+{
+ Uint32 color;
+
+ color = SDL_MapRGB(screen->format, r, g, b);
+ SDL_FillRect(screen, NULL, color);
+ SDL_Flip(screen);
+ printf("Press ENTER to continue\n");
+ getchar();
+}
+
+
+int main(int argc, char *argv[])
+{
+ Uint8* keys;
+ int cursorPos = 0;
+ const struct SDL_VideoInfo *video_info;
+ SDL_Rect **modes;
+ int i, height, width;
+
+ /* Initialize SDL */
+ if( SDL_Init( SDL_INIT_VIDEO | SDL_INIT_TIMER /*| SDL_INIT_EVENTTHREAD |SDL_INIT_NOPARACHUTE*/) < 0 )
+ {
+ fprintf(stderr, "Unable to init SDL: %s\n", SDL_GetError());
+ exit(1);
+ }
+ atexit(cleanup);
+
+ /* Get available fullscreen/hardware modes */
+ modes = SDL_ListModes(NULL, SDL_FULLSCREEN|SDL_HWSURFACE);
+
+ /* Check is there are any modes available */
+ if (modes == (SDL_Rect **)0) {
+ printf("No modes available!\n");
+ exit(-1);
+ }
+
+ /* Check if our resolution is restricted */
+ if (modes == (SDL_Rect **)-1) {
+ printf("All resolutions available.\n");
+ } else {
+ /* Print valid modes */
+ printf("Available Modes\n");
+ for (i=0; modes[i]; ++i) {
+ printf(" %d x %d\n", modes[i]->w, modes[i]->h);
+ }
+ }
+ width = modes[0]->w;
+ height = modes[0]->h;
+ printf("Taking greatest one: %d x %d\n\n", width, height);
+
+ /* Get video infos */
+ video_info = SDL_GetVideoInfo();
+ if (!video_info) {
+ printf("Unable to get video infos\n");
+ exit(1);
+ }
+/* printf("Pixel format:\n");
+ printf(" ", video_info->vfmt-> */
+
+ /* Get a screen to display our test */
+ screen = SDL_SetVideoMode(width, height, 16, 0);
+ if (screen == NULL) {
+ fprintf(stderr, "Unable to set %d x %d video mode: %s\n", width, height, SDL_GetError());
+ exit(1);
+ }
+
+ /* Hide mouse */
+ SDL_ShowCursor(0);
+
+ /* Main loop */
+ fill_screen_and_wait_key(0, 0, 0); /* black */
+ fill_screen_and_wait_key(255, 0, 0); /* red */
+ fill_screen_and_wait_key(0, 255, 0); /* green */
+ fill_screen_and_wait_key(0, 0, 255); /* blue */
+ fill_screen_and_wait_key(255, 255, 255); /* white */
+
+ exit(0);
+}
+
hooks/post-receive
--
armadeus
|