Send commitlog mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
http://lists.openmoko.org/mailman/listinfo/commitlog
or, via email, send a message with subject or body 'help' to
[EMAIL PROTECTED]
You can reach the person managing the list at
[EMAIL PROTECTED]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of commitlog digest..."
Today's Topics:
1. r4383 - trunk/src/target/opkg/libopkg ([EMAIL PROTECTED])
2. r4384 - trunk/src/target/opkg/libopkg ([EMAIL PROTECTED])
3. r4385 - trunk/src/target/opkg/tests ([EMAIL PROTECTED])
4. development kernel tree: Changes to 'andy-tracking'
([EMAIL PROTECTED])
5. development kernel tree: Changes to 'andy' ([EMAIL PROTECTED])
6. development kernel tree: Changes to 'stable'
([EMAIL PROTECTED])
7. development kernel tree: Changes to 'stable'
([EMAIL PROTECTED])
8. development kernel tree: Changes to 'andy' ([EMAIL PROTECTED])
9. development kernel tree: Changes to 'andy-tracking'
([EMAIL PROTECTED])
10. r4386 - in developers: . alphaone alphaone/u-blox
([EMAIL PROTECTED])
--- Begin Message ---
Author: thomas
Date: 2008-04-21 16:20:32 +0200 (Mon, 21 Apr 2008)
New Revision: 4383
Modified:
trunk/src/target/opkg/libopkg/opkg.c
trunk/src/target/opkg/libopkg/opkg.h
Log:
libopkg: add opkg_read_config_files() function
Modified: trunk/src/target/opkg/libopkg/opkg.c
===================================================================
--- trunk/src/target/opkg/libopkg/opkg.c 2008-04-21 09:19:58 UTC (rev
4382)
+++ trunk/src/target/opkg/libopkg/opkg.c 2008-04-21 14:20:32 UTC (rev
4383)
@@ -107,6 +107,49 @@
args_deinit (opkg->args);
}
+int
+opkg_read_config_files (opkg_t *opkg)
+{
+ args_t *a = opkg->args;
+ opkg_conf_t *c = opkg->conf;
+
+ /* Unfortunatly, the easiest way to re-read the config files right now is to
+ * throw away opkg->conf and start again */
+
+ /* copy the settings we need to keep */
+ a->autoremove = c->autoremove;
+ a->force_depends = c->force_depends;
+ a->force_defaults = c->force_defaults;
+ a->force_overwrite = c->force_overwrite;
+ a->force_downgrade = c->force_downgrade;
+ a->force_reinstall = c->force_reinstall;
+ a->force_removal_of_dependent_packages =
c->force_removal_of_dependent_packages;
+ a->force_removal_of_essential_packages =
c->force_removal_of_essential_packages;
+ a->nodeps = c->nodeps;
+ a->noaction = c->noaction;
+ a->query_all = c->query_all;
+ a->multiple_providers = c->multiple_providers;
+ a->verbosity = c->verbosity;
+
+ if (a->offline_root) free (a->offline_root);
+ a->offline_root = strdup (c->offline_root);
+
+ if (a->offline_root_pre_script_cmd) free (a->offline_root_pre_script_cmd);
+ a->offline_root_pre_script_cmd = strdup (c->offline_root_pre_script_cmd);
+
+ if (a->offline_root_post_script_cmd) free (a->offline_root_post_script_cmd);
+ a->offline_root_post_script_cmd = strdup (c->offline_root_post_script_cmd);
+
+ /* throw away old opkg_conf and start again */
+ opkg_conf_deinit (opkg->conf);
+ opkg_conf_init (opkg->conf, opkg->args);
+
+ free (opkg->options);
+ opkg_init_options_array (opkg->conf, &opkg->options);
+
+ return 0;
+}
+
void
opkg_get_option (opkg_t *opkg, char *option, void **value)
{
Modified: trunk/src/target/opkg/libopkg/opkg.h
===================================================================
--- trunk/src/target/opkg/libopkg/opkg.h 2008-04-21 09:19:58 UTC (rev
4382)
+++ trunk/src/target/opkg/libopkg/opkg.h 2008-04-21 14:20:32 UTC (rev
4383)
@@ -21,6 +21,7 @@
void opkg_free (opkg_t *opkg);
void opkg_get_option (opkg_t *opkg, char *option, void **value);
void opkg_set_option (opkg_t *opkg, char *option, void *value);
+int opkg_read_config_files (opkg_t *opkg);
int opkg_install_package (opkg_t *opkg, char *package_name);
int opkg_remove_package (opkg_t *opkg, char *package_name);
--- End Message ---
--- Begin Message ---
Author: thomas
Date: 2008-04-21 16:33:34 +0200 (Mon, 21 Apr 2008)
New Revision: 4384
Modified:
trunk/src/target/opkg/libopkg/opkg.c
Log:
libopkg: add some checks for NULL strings
Modified: trunk/src/target/opkg/libopkg/opkg.c
===================================================================
--- trunk/src/target/opkg/libopkg/opkg.c 2008-04-21 14:20:32 UTC (rev
4383)
+++ trunk/src/target/opkg/libopkg/opkg.c 2008-04-21 14:33:34 UTC (rev
4384)
@@ -131,14 +131,23 @@
a->multiple_providers = c->multiple_providers;
a->verbosity = c->verbosity;
- if (a->offline_root) free (a->offline_root);
- a->offline_root = strdup (c->offline_root);
+ if (c->offline_root)
+ {
+ if (a->offline_root) free (a->offline_root);
+ a->offline_root = strdup (c->offline_root);
+ }
- if (a->offline_root_pre_script_cmd) free (a->offline_root_pre_script_cmd);
- a->offline_root_pre_script_cmd = strdup (c->offline_root_pre_script_cmd);
+ if (c->offline_root_pre_script_cmd)
+ {
+ if (a->offline_root_pre_script_cmd) free (a->offline_root_pre_script_cmd);
+ a->offline_root_pre_script_cmd = strdup (c->offline_root_pre_script_cmd);
+ }
- if (a->offline_root_post_script_cmd) free (a->offline_root_post_script_cmd);
- a->offline_root_post_script_cmd = strdup (c->offline_root_post_script_cmd);
+ if (c->offline_root_post_script_cmd)
+ {
+ if (a->offline_root_post_script_cmd) free
(a->offline_root_post_script_cmd);
+ a->offline_root_post_script_cmd = strdup (c->offline_root_post_script_cmd);
+ }
/* throw away old opkg_conf and start again */
opkg_conf_deinit (opkg->conf);
--- End Message ---
--- Begin Message ---
Author: thomas
Date: 2008-04-21 16:34:05 +0200 (Mon, 21 Apr 2008)
New Revision: 4385
Modified:
trunk/src/target/opkg/tests/libopkg_test.c
Log:
opkg: add opkg_read_config_files() to libopkg_test
Modified: trunk/src/target/opkg/tests/libopkg_test.c
===================================================================
--- trunk/src/target/opkg/tests/libopkg_test.c 2008-04-21 14:33:34 UTC (rev
4384)
+++ trunk/src/target/opkg/tests/libopkg_test.c 2008-04-21 14:34:05 UTC (rev
4385)
@@ -11,6 +11,8 @@
opkg_set_option (opkg, "offline_root", "/tmp/");
+ opkg_read_config_files (opkg);
+
err = opkg_update_package_lists (opkg);
printf ("opkg_update_package_lists returned %d\n", err);
--- End Message ---
--- Begin Message ---
sound/soc/s3c24xx/Kconfig | 6 ++++
sound/soc/s3c24xx/neo1973_wm8753.c | 52 ++++++++++++++++++++++++++++++++++++
sound/soc/s3c24xx/s3c24xx-i2s.c | 4 ++-
sound/soc/s3c24xx/s3c24xx-pcm.c | 2 +-
4 files changed, 62 insertions(+), 2 deletions(-)
New commits:
commit ef6d026851086b06c5d5f5a109d39572b30bcc03
Author: Tim Niemeyer <[EMAIL PROTECTED]>
Date: Mon Apr 21 21:00:53 2008 +0100
From c1baaa80d398008fb4da52cd20f3dbb3fb256892 Mon Sep 17 00:00:00 2001
Subject: [PATCH] This adds some debug messages to the Neo1937 sound driver.
Signed-off-by: Tim Niemeyer <[EMAIL PROTECTED]>
commit e975f12562c186f39342edb981410ea995c73ebf
Author: Tim Niemeyer <[EMAIL PROTECTED]>
Date: Mon Apr 21 20:58:51 2008 +0100
From 77eb347463c7a50761666caacbf9b46b3d8214ac Mon Sep 17 00:00:00 2001
Subject: [PATCH] This fixes the exit function, so that the module can be
removed.
Signed-off-by: Tim Niemeyer <[EMAIL PROTECTED]>
--- End Message ---
--- Begin Message ---
sound/soc/s3c24xx/Kconfig | 6 ++++
sound/soc/s3c24xx/neo1973_wm8753.c | 52 ++++++++++++++++++++++++++++++++++++
sound/soc/s3c24xx/s3c24xx-i2s.c | 4 ++-
sound/soc/s3c24xx/s3c24xx-pcm.c | 2 +-
4 files changed, 62 insertions(+), 2 deletions(-)
New commits:
commit cad594a5edf1d5cdc653066c041f5d2e02003db5
Author: Tim Niemeyer <[EMAIL PROTECTED]>
Date: Mon Apr 21 21:02:47 2008 +0100
From c1baaa80d398008fb4da52cd20f3dbb3fb256892 Mon Sep 17 00:00:00 2001
Subject: [PATCH] This adds some debug messages to the Neo1937 sound driver.
Signed-off-by: Tim Niemeyer <[EMAIL PROTECTED]>
commit eff60ede70bdc91b841aa32e24c6e2f34d7c9005
Author: Tim Niemeyer <[EMAIL PROTECTED]>
Date: Mon Apr 21 21:02:41 2008 +0100
From 77eb347463c7a50761666caacbf9b46b3d8214ac Mon Sep 17 00:00:00 2001
Subject: [PATCH] This fixes the exit function, so that the module can be
removed.
Signed-off-by: Tim Niemeyer <[EMAIL PROTECTED]>
--- End Message ---
--- Begin Message ---
sound/soc/s3c24xx/Kconfig | 6 ++++
sound/soc/s3c24xx/neo1973_wm8753.c | 52 ++++++++++++++++++++++++++++++++++++
sound/soc/s3c24xx/s3c24xx-i2s.c | 4 ++-
sound/soc/s3c24xx/s3c24xx-pcm.c | 2 +-
4 files changed, 62 insertions(+), 2 deletions(-)
New commits:
commit ecbd7cc4182e0c8cb3be26451355b8b71420ae7d
Author: Tim Niemeyer <[EMAIL PROTECTED]>
Date: Mon Apr 21 21:04:46 2008 +0100
From c1baaa80d398008fb4da52cd20f3dbb3fb256892 Mon Sep 17 00:00:00 2001
Subject: [PATCH] This adds some debug messages to the Neo1937 sound driver.
Signed-off-by: Tim Niemeyer <[EMAIL PROTECTED]>
commit bceecd55152c141924a300c1d80454e140062e23
Author: Tim Niemeyer <[EMAIL PROTECTED]>
Date: Mon Apr 21 21:04:40 2008 +0100
From 77eb347463c7a50761666caacbf9b46b3d8214ac Mon Sep 17 00:00:00 2001
Subject: [PATCH] This fixes the exit function, so that the module can be
removed.
Signed-off-by: Tim Niemeyer <[EMAIL PROTECTED]>
--- End Message ---
--- Begin Message ---
Rebased ref, commits from common ancestor:
commit 1796e3d226fd1b119b09130478c781e25b7f5770
Author: Tim Niemeyer <[EMAIL PROTECTED]>
Date: Mon Apr 21 21:09:37 2008 +0100
This-adds-some-debug-messages-to-the-Neo1937-sound-d.patch
Subject: [PATCH] This adds some debug messages to the Neo1937 sound driver.
Signed-off-by: Tim Niemeyer <[EMAIL PROTECTED]>
commit b22975802d893a8cc600757436d5dd4dcd5cf469
Author: Tim Niemeyer <[EMAIL PROTECTED]>
Date: Mon Apr 21 21:08:40 2008 +0100
This-fixes-the-exit-function-so-that-the-module-can.patch
Subject: [PATCH] This fixes the exit function, so that the module can be
removed.
Signed-off-by: Tim Niemeyer <[EMAIL PROTECTED]>
--- End Message ---
--- Begin Message ---
Rebased ref, commits from common ancestor:
commit f0409043eaf7df7294ad98d0b60981510c82ddf6
Author: Tim Niemeyer <[EMAIL PROTECTED]>
Date: Mon Apr 21 21:10:44 2008 +0100
This-adds-some-debug-messages-to-the-Neo1937-sound-d.patch
Subject: [PATCH] This adds some debug messages to the Neo1937 sound driver.
Signed-off-by: Tim Niemeyer <[EMAIL PROTECTED]>
commit 954823764ced012ad6c8044839ae06ade5bee1be
Author: Tim Niemeyer <[EMAIL PROTECTED]>
Date: Mon Apr 21 21:10:39 2008 +0100
This-fixes-the-exit-function-so-that-the-module-can.patch
Subject: [PATCH] This fixes the exit function, so that the module can be
removed.
Signed-off-by: Tim Niemeyer <[EMAIL PROTECTED]>
--- End Message ---
--- Begin Message ---
Rebased ref, commits from common ancestor:
commit 590ec070c74a9dee72779888e79043c2e311cfda
Author: Tim Niemeyer <[EMAIL PROTECTED]>
Date: Mon Apr 21 21:12:29 2008 +0100
This-adds-some-debug-messages-to-the-Neo1937-sound-d.patch
Subject: [PATCH] This adds some debug messages to the Neo1937 sound driver.
Signed-off-by: Tim Niemeyer <[EMAIL PROTECTED]>
commit b51d9ce5aadcb6752e22caae7d7cf57824a169d3
Author: Tim Niemeyer <[EMAIL PROTECTED]>
Date: Mon Apr 21 21:11:58 2008 +0100
This-fixes-the-exit-function-so-that-the-module-can.patch
Subject: [PATCH] This fixes the exit function, so that the module can be
removed.
Signed-off-by: Tim Niemeyer <[EMAIL PROTECTED]>
--- End Message ---
--- Begin Message ---
Author: alphaone
Date: 2008-04-22 04:50:50 +0200 (Tue, 22 Apr 2008)
New Revision: 4386
Added:
developers/alphaone/
developers/alphaone/u-blox/
developers/alphaone/u-blox/ubx-config.rb
Log:
* Utility to configure UBX GPS receivers
Added: developers/alphaone/u-blox/ubx-config.rb
===================================================================
--- developers/alphaone/u-blox/ubx-config.rb 2008-04-21 14:34:05 UTC (rev
4385)
+++ developers/alphaone/u-blox/ubx-config.rb 2008-04-22 02:50:50 UTC (rev
4386)
@@ -0,0 +1,164 @@
+#!/usr/bin/ruby
+# ubx-config.rb - Utility to configure advanced features of u-blox GPS chipset
+#
+# Copyright 2008 OpenMoko, Inc.
+# Authored by Daniel Willmann <[EMAIL PROTECTED]>
+#
+# 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.
+
+gem_original_require 'serialport'
+
+UBX_CLASS = {
+ :NAV => 0x01,
+ :RXM => 0x02,
+ :INF => 0x04,
+ :ACK => 0x05,
+ :CFG => 0x06,
+ :UPD => 0x09,
+ :MON => 0x0a,
+ :AID => 0x0b,
+ :TIM => 0x0d,
+ :USR => 0x40
+}
+
+UBX_ID = {
+ :ACK => 0x01,
+ :NACK => 0x00,
+ :ALM => 0x30,
+ :DATA => 0x10,
+ :EPH => 0x31,
+ :HUI => 0x02,
+ :INI => 0x01,
+ :REQ => 0x00,
+ :ANT => 0x13,
+ :CFG => 0x09
+}
+
+UBX_REVSTR = {
+ [:AID, :ALM, 1] =>
+ ["C", [:SVID]],
+ [:AID, :ALM, 8] =>
+ ["VV", [:SVID, :WEEK]],
+ [:AID, :ALM, 40] =>
+ ["V"*10, [:SVID, :WEEK, :DWRD0, :DWRD1, :DWRD2, :DWRD3, :DWRD4,
:DWRD5, :DWRD6, :DWRD7]]
+}
+
+UBX_FWDSTR = {}
+UBX_REVSTR.each_pair { |key, value|
+ newkey = key[0..1] << value[1].length
+ UBX_FWDSTR[newkey] = value
+}
+
+class Message
+ SYNC1=0xb5
+ SYNC2=0x62
+ attr_accessor :data
+ def initialize(cl, id, data)
+ @cl = cl
+ @id = id
+ @data = data
+ end
+
+ def checksum(str)
+ @ck_A = 0
+ @ck_B = 0
+ str[2..-1].each_byte { |el|
+ @ck_A = @ck_A + el
+ @ck_B = @ck_B + @ck_A
+ }
+ @ck_A = @ck_A&0xff
+ @cl_B = @ck_B&0xff
+ return [EMAIL PROTECTED], @ck_B].pack("CC")
+ end
+
+ def to_a()
+ return [SYNC1, SYNC2, @cl, @id, @data]
+ end
+
+ def to_s()
+ if @data.length > 0
+ (data_fmt, data_names) = [EMAIL PROTECTED], @id,
@data.length]]
+ data_packed = @data.pack(data_fmt)
+ else
+ data_packed = ""
+ end
+ result = [SYNC1, SYNC2, [EMAIL PROTECTED], [EMAIL PROTECTED],
data_packed.length].pack("CCCCv") + data_packed
+ result << checksum(result)
+ end
+
+ def Message.parse(data)
+ if (data.length < 8)
+ return [nil, 0]
+ end
+ i = data.index([SYNC1, SYNC2].pack("CC"))
+ if i == 0
+ (cl, id, len) = data.unpack("xxCCv")
+ if data.length < len+8
+ return [nil, 0]
+ end
+
+ cl = UBX_CLASS.index(cl)
+ id = UBX_ID.index(id)
+ if len > 0
+ (data_fmt, data_names) = UBX_REVSTR[[cl, id,
len]]
+ payload = data[6..len+6].unpack(data_fmt)
+ else
+ payload = []
+ end
+
+ msg = Message.new(cl, id, payload)
+ return [msg, len+8]
+ elsif not i
+ return [nil, data.length]
+ else
+ return [nil, i]
+ end
+ end
+end
+
+device = SerialPort.new(ARGV[0], baudrate=9600, databits=8, stopbits=1,
parity=SerialPort::NONE)
+device.read_timeout=-1
+
+worker = Thread.new() {
+ stream = []
+ while true
+ begin
+ stream << device.getc
+ (msg, len) = Message.parse(stream.map {|i| i.chr}.to_s)
+ if msg
+ puts msg.inspect
+ end
+ stream = stream[len..-1]
+ rescue
+ puts "An error occurred: #{$!}"
+ stream = [ ]
+ end
+ end
+}
+
+sleep(2)
+
+foo = Message.new(:AID, :ALM, [])
+
+while true
+ puts "Submitting Almanach request"
+ device.write(foo.to_s)
+ device.flush()
+ sleep(3)
+ bar = Message.new(:AID, :ALM, [1, 1234, 1, 2, 3, 4, 5, 6, 7, 8])
+ device.write(bar.to_s)
+ device.flush()
+ sleep (2)
+end
Property changes on: developers/alphaone/u-blox/ubx-config.rb
___________________________________________________________________
Name: svn:executable
+ *
--- End Message ---
_______________________________________________
commitlog mailing list
[email protected]
http://lists.openmoko.org/mailman/listinfo/commitlog