r1922 - in trunk
dslinux_amadeus at dslinux.in-berlin.de
dslinux_amadeus at dslinux.in-berlin.de
Tue Sep 25 23:35:19 CEST 2007
Author: amadeus
Date: 2007-09-25 23:35:14 +0200 (Tue, 25 Sep 2007)
New Revision: 1922
Log:
Add a snapshot utility to DSLINUX
Modified: trunk/config/Configure.help
===================================================================
--- trunk/config/Configure.help 2007-09-25 17:53:13 UTC (rev 1921)
+++ trunk/config/Configure.help 2007-09-25 21:35:14 UTC (rev 1922)
@@ -368,6 +368,9 @@
User level serial port configuration tool.
Approx binary size: 18k
+CONFIG_USER_SNAPSHOT
+ Small program to dump the contents of a framebuffer device into a PNG file.
+
CONFIG_USER_STTY_STTY
Command to change the settings on serial devices. For example
you can change the baud rate, flow control and so on.
Modified: trunk/config/config.in
===================================================================
--- trunk/config/config.in 2007-09-25 17:53:13 UTC (rev 1921)
+++ trunk/config/config.in 2007-09-25 21:35:14 UTC (rev 1922)
@@ -815,6 +815,11 @@
bool 'rl' CONFIG_USER_RL_RL
bool 'sed' CONFIG_USER_SED_SED
bool 'setserial' CONFIG_USER_SETSERIAL_SETSERIAL
+bool 'snapshot' CONFIG_USER_SNAPSHOT
+if [ "$CONFIG_USER_SNAPSHOT" = "y" ]; then
+ define_bool CONFIG_LIB_LIBPNG y
+ define_bool CONFIG_LIB_ZLIB y
+fi
bool 'siggen' CONFIG_USER_TRIPWIRE_SIGGEN
bool 'sl' CONFIG_USER_SL_SL
bool 'strace' CONFIG_USER_STRACE_STRACE
Modified: trunk/linux-2.6.x/drivers/video/ndsfb.c
===================================================================
--- trunk/linux-2.6.x/drivers/video/ndsfb.c 2007-09-25 17:53:13 UTC (rev 1921)
+++ trunk/linux-2.6.x/drivers/video/ndsfb.c 2007-09-25 21:35:14 UTC (rev 1922)
@@ -25,7 +25,7 @@
#include <asm/arch/power.h>
#include <asm/io.h>
-#define VCOUNT (*(volatile u16*)0x04000006)
+#define VCOUNT (*(volatile u16*)0x04000006)
#define DISPLAY_CR (*(volatile u32*)0x04000000)
#define SUB_DISPLAY_CR (*(volatile u32*)0x04001000)
@@ -209,6 +209,7 @@
static int ndsfb_enable __initdata = 1; /* enabled by default */
+static int opencount = 0;
/*
* Interface used by the world
*/
@@ -457,7 +458,7 @@
static int ndsfb_get_vblank(struct fb_vblank *vblank)
{
- memset(vblank, 0, sizeof(&vblank));
+ memset(vblank, 0, sizeof(*vblank));
vblank->flags = FB_VBLANK_HAVE_VCOUNT;
vblank->vcount = readw(VCOUNT);
return 0;
@@ -472,8 +473,6 @@
struct fb_info *info)
{
void __user *argp = (void __user *)arg;
- u32 val, old_mode;
- int retval = -EFAULT;
switch (cmd) {
case FBIOGET_VBLANK:
@@ -609,16 +608,19 @@
{
struct platform_device *dev = to_platform_device(info->device);
if (dev->id == 1) {
- ndstouch_open_fb1();
+ if (!opencount++)
+ ndstouch_open_fb1();
}
return 0;
}
static int ndsfb_release(struct fb_info *info, int user)
{
+ // This is called when the reference count goes to zero.
struct platform_device *dev = to_platform_device(info->device);
if (dev->id == 1) {
- ndstouch_close_fb1();
+ if (!--opencount)
+ ndstouch_close_fb1();
}
return 0;
}
@@ -629,7 +631,6 @@
static void ndsfb_platform_release(struct device *device)
{
- // This is called when the reference count goes to zero.
}
static int __init ndsfb_probe(struct device *device)
Modified: trunk/user/Makefile
===================================================================
--- trunk/user/Makefile 2007-09-25 17:53:13 UTC (rev 1921)
+++ trunk/user/Makefile 2007-09-25 21:35:14 UTC (rev 1922)
@@ -331,6 +331,7 @@
dir_$(CONFIG_USER_SMBMOUNT_SMBUMOUNT) += smbmount
dir_$(CONFIG_USER_SMTP_SMTPCLIENT) += smtpclient
dir_$(CONFIG_USER_SMTP_SMTPFILTER) += smtpfilter
+dir_$(CONFIG_USER_SNAPSHOT) += snapshot
dir_$(CONFIG_USER_SNMPD_SNMPD) += snmpd
dir_$(CONFIG_USER_SNORT_SNORT) += snort
dir_$(CONFIG_USER_SPEEDTOUCH_MODEM_RUN) += speedtouch/src
Added: trunk/user/snapshot/Makefile
Added: trunk/user/snapshot/snapshot.c
Modified: trunk/vendors/Nintendo/DLDI/config.vendor
===================================================================
--- trunk/vendors/Nintendo/DLDI/config.vendor 2007-09-25 17:53:13 UTC (rev 1921)
+++ trunk/vendors/Nintendo/DLDI/config.vendor 2007-09-25 21:35:14 UTC (rev 1922)
@@ -401,6 +401,7 @@
# CONFIG_USER_RL_RL is not set
# CONFIG_USER_SED_SED is not set
# CONFIG_USER_SETSERIAL_SETSERIAL is not set
+CONFIG_USER_SNAPSHOT=y
# CONFIG_USER_TRIPWIRE_SIGGEN is not set
CONFIG_USER_SL_SL=y
# CONFIG_USER_STRACE_STRACE is not set
Modified: trunk/vendors/Nintendo/DSGBA/config.vendor
===================================================================
--- trunk/vendors/Nintendo/DSGBA/config.vendor 2007-09-25 17:53:13 UTC (rev 1921)
+++ trunk/vendors/Nintendo/DSGBA/config.vendor 2007-09-25 21:35:14 UTC (rev 1922)
@@ -391,6 +391,7 @@
# CONFIG_USER_RL_RL is not set
# CONFIG_USER_SED_SED is not set
# CONFIG_USER_SETSERIAL_SETSERIAL is not set
+# CONFIG_USER_SNAPSHOT is not set
# CONFIG_USER_TRIPWIRE_SIGGEN is not set
CONFIG_USER_SL_SL=y
# CONFIG_USER_STRACE_STRACE is not set
Modified: trunk/vendors/Nintendo/DSMEM/config.vendor
===================================================================
--- trunk/vendors/Nintendo/DSMEM/config.vendor 2007-09-25 17:53:13 UTC (rev 1921)
+++ trunk/vendors/Nintendo/DSMEM/config.vendor 2007-09-25 21:35:14 UTC (rev 1922)
@@ -390,6 +390,7 @@
# CONFIG_USER_RL_RL is not set
# CONFIG_USER_SED_SED is not set
# CONFIG_USER_SETSERIAL_SETSERIAL is not set
+# CONFIG_USER_SNAPSHOT is not set
# CONFIG_USER_TRIPWIRE_SIGGEN is not set
CONFIG_USER_SL_SL=y
# CONFIG_USER_STRACE_STRACE is not set
Modified: trunk/vendors/Nintendo/GBAMP/config.vendor
===================================================================
--- trunk/vendors/Nintendo/GBAMP/config.vendor 2007-09-25 17:53:13 UTC (rev 1921)
+++ trunk/vendors/Nintendo/GBAMP/config.vendor 2007-09-25 21:35:14 UTC (rev 1922)
@@ -390,6 +390,7 @@
# CONFIG_USER_RL_RL is not set
# CONFIG_USER_SED_SED is not set
# CONFIG_USER_SETSERIAL_SETSERIAL is not set
+# CONFIG_USER_SNAPSHOT is not set
# CONFIG_USER_TRIPWIRE_SIGGEN is not set
CONFIG_USER_SL_SL=y
# CONFIG_USER_STRACE_STRACE is not set
Modified: trunk/vendors/Nintendo/GBAMP-EXT2/config.vendor
===================================================================
--- trunk/vendors/Nintendo/GBAMP-EXT2/config.vendor 2007-09-25 17:53:13 UTC (rev 1921)
+++ trunk/vendors/Nintendo/GBAMP-EXT2/config.vendor 2007-09-25 21:35:14 UTC (rev 1922)
@@ -390,6 +390,7 @@
# CONFIG_USER_RL_RL is not set
# CONFIG_USER_SED_SED is not set
# CONFIG_USER_SETSERIAL_SETSERIAL is not set
+# CONFIG_USER_SNAPSHOT is not set
# CONFIG_USER_TRIPWIRE_SIGGEN is not set
CONFIG_USER_SL_SL=y
# CONFIG_USER_STRACE_STRACE is not set
Modified: trunk/vendors/Nintendo/NDS/config.vendor
===================================================================
--- trunk/vendors/Nintendo/NDS/config.vendor 2007-09-25 17:53:13 UTC (rev 1921)
+++ trunk/vendors/Nintendo/NDS/config.vendor 2007-09-25 21:35:14 UTC (rev 1922)
@@ -388,6 +388,7 @@
# CONFIG_USER_RL_RL is not set
# CONFIG_USER_SED_SED is not set
# CONFIG_USER_SETSERIAL_SETSERIAL is not set
+# CONFIG_USER_SNAPSHOT is not set
# CONFIG_USER_TRIPWIRE_SIGGEN is not set
# CONFIG_USER_SL_SL is not set
# CONFIG_USER_STRACE_STRACE is not set
Modified: trunk/vendors/Nintendo/RAM/config.vendor
===================================================================
--- trunk/vendors/Nintendo/RAM/config.vendor 2007-09-25 17:53:13 UTC (rev 1921)
+++ trunk/vendors/Nintendo/RAM/config.vendor 2007-09-25 21:35:14 UTC (rev 1922)
@@ -336,6 +336,7 @@
# CONFIG_USER_RL_RL is not set
# CONFIG_USER_SED_SED is not set
# CONFIG_USER_SETSERIAL_SETSERIAL is not set
+# CONFIG_USER_SNAPSHOT is not set
# CONFIG_USER_TRIPWIRE_SIGGEN is not set
CONFIG_USER_SL_SL=y
# CONFIG_USER_STRACE_STRACE is not set
Modified: trunk/vendors/Nintendo/RAM-DEVEL/config.vendor
===================================================================
--- trunk/vendors/Nintendo/RAM-DEVEL/config.vendor 2007-09-25 17:53:13 UTC (rev 1921)
+++ trunk/vendors/Nintendo/RAM-DEVEL/config.vendor 2007-09-25 21:35:14 UTC (rev 1922)
@@ -384,6 +384,7 @@
# CONFIG_USER_ROOTLOADER_ROOTLOADER is not set
# CONFIG_USER_RL_RL is not set
# CONFIG_USER_SETSERIAL_SETSERIAL is not set
+# CONFIG_USER_SNAPSHOT is not set
# CONFIG_USER_TRIPWIRE_SIGGEN is not set
# CONFIG_USER_SL_SL is not set
# CONFIG_USER_STRACE_STRACE is not set
Modified: trunk/vendors/Nintendo/common/config.vendor
===================================================================
--- trunk/vendors/Nintendo/common/config.vendor 2007-09-25 17:53:13 UTC (rev 1921)
+++ trunk/vendors/Nintendo/common/config.vendor 2007-09-25 21:35:14 UTC (rev 1922)
@@ -386,6 +386,7 @@
# CONFIG_USER_ROOTLOADER_ROOTLOADER is not set
# CONFIG_USER_RL_RL is not set
# CONFIG_USER_SETSERIAL_SETSERIAL is not set
+# CONFIG_USER_SNAPSHOT is not set
# CONFIG_USER_TRIPWIRE_SIGGEN is not set
CONFIG_USER_SL_SL=y
# CONFIG_USER_STRACE_STRACE is not set
More information about the dslinux-commit
mailing list