Martin Langhoff | 1 Dec 2010 18:46
Picon
Gravatar

Re: Patches for a faster wikibrowse

On Mon, Nov 29, 2010 at 6:32 PM, Chris Ball <cjb <at> laptop.org> wrote:
> Sounds great, let me know if there's anything I need to do.

Is there a 'make a release' script anywhere? I haven't seen one, so
I'm following

  unzip ;
  replace code and data files as appropriate ;
  diff --brief -urN to check it makes sense ;
  bump version number in activity.info ;
  zip to new .xo file...

cheers,

m
--

-- 
 martin.langhoff <at> gmail.com
 martin <at> laptop.org -- School Server Architect
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
Martin Langhoff | 1 Dec 2010 19:28
Picon
Gravatar

Re: Patches for a faster wikibrowse

On Wed, Dec 1, 2010 at 12:46 PM, Martin Langhoff
<martin.langhoff <at> gmail.com> wrote:
> Is there a 'make a release' script anywhere? I haven't seen one, so
> I'm following

Ok - for the English wikipedia I had to revert various files as the
code in wikiserver.git assumes Spanish.

Please test the bundles at http://dev.laptop.org/~martin/wikipedia_es/
and http://dev.laptop.org/~martin/wikipedia_en/

cheers,

m
--

-- 
 martin.langhoff <at> gmail.com
 martin <at> laptop.org -- School Server Architect
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
James Cameron | 2 Dec 2010 05:46
Favicon

Re: Modifying 353 (xo-1) to apply the dev.laptop.org/ticket/10195 fix {XO Wifi Issues}

On Wed, Dec 01, 2010 at 11:00:36PM -0500, Samuel Greenfeld wrote:
> Pardon me if I missed the clarification, but if one XO unit is
> consistently bad while another physical XO unit always works
> regardless of their locations, this would suggest a hardware issue.

Given no firmware or software differences, yes.

(One such hardware issue is low sensitivity of the receiver; if it
cannot hear distant access points then it is more likely to receive a
nearby access point that would otherwise have had its transmission
trodden on.  This would appear to be beneficial, and would make a
damaged unit always work when a normal unit would be consistently bad.)

> Your truncated "scan-wifi" output suggests that the bad XOs only were 
> working on Channel 1.

A scan is time limited.  The response buffer is length limited.
OpenFirmware only issues one scan request and prints one response
buffer.  Linux may do something entirely different.

Also possible is that there were sufficient beacons heard on channel 1
to fill the response buffer, long before any larger channel number was
attempted by the wireless firmware.

Mikus wrote:
> Note that both the "bad" XO1-s and the "good" XO-1s __will__ connect
> via the (non-adhoc) mesh interface -- to me that says the silicon is
> working -- though I do not know if the AP radio signal in the "bad"
> XO-1s is too attenuated (bad antenna connection?) to be detected.

(Continue reading)

Kevin Gordon | 2 Dec 2010 19:11
Picon

F14 syslinux boot issue

Folks: 

Please forgive me if this doesn't belong here, but I'm a rookie :-) 

The new F14 live SoaS spin from the Sugarlabs link, when put onto a USB stick using the Fedora Windows Live-USB-Creator, hangs immediately on attempted boot at the initial " SYSLINUX 3.81 ....."   line.  It would appear that this 3.81 version used by the creator may be too old for F14.    I notice on a raw F14-DVD ISO spin that it was using 4.02 SYSLINUX.  So, I poked around and found that there is this neat little zip archive up at http://www.kernel.org/pub/linux/utils/boot/syslinux/4.xx/syslinux-4.02.zip.  If you unzip it then drill down into the win32 (or win64 if you are using a 64-bit machine to build)  and then copy that decompressed syslinux.exe over the one in the LiveUSB program file "Tools" sub directory, and then go ahead and re-build the USB stick, all is good.

On a tangential note, the new SoaS build doesnt appear in the dropdown for LiveUSB Creator yet, but downloading it from the Sugarlabs spins to the machine, and then using the browse function on the creator pointing to the downloaded ISO wokrs fine. (Just a friendly reminder to increase the persistent storage, on a 4GB stick I chose 1220 and it seems to work fine).  The USB stick was formatted to FAT32, 32kb blocks, with Name FEDORA before running the create. And o yeah, don't forget to change the BIOS boot order to pick the USB HDD as the first.

Cheers, and apologies for putting a Windows/Fedora/SoaS posting in the OLPC stream.  Perhaps someone more senior in the Fedora and Sugar areas who monitors this could ship this upstream to a more appropriate place for those who might want to know.

KG


_______________________________________________
Devel mailing list
Devel <at> lists.laptop.org
http://lists.laptop.org/listinfo/devel
Daniel Drake | 3 Dec 2010 16:30
Favicon

Re: F14 syslinux boot issue

On 2 December 2010 18:11, Kevin Gordon <kgordon420 <at> gmail.com> wrote:
> Folks:
>
> Please forgive me if this doesn't belong here, but I'm a rookie :-)
>
> The new F14 live SoaS spin from the Sugarlabs link, when put onto a USB
> stick using the Fedora Windows Live-USB-Creator, hangs immediately on
> attempted boot at the initial " SYSLINUX 3.81 ....."   line.  It would
> appear that this 3.81 version used by the creator may be too old for F14.

I think I've seen this problem reported in other threads too.
Given that you may have identified a solution, you should definitely
repost this to the SoaS mailing list:
http://lists.sugarlabs.org/listinfo/soas

Daniel
Kevin Gordon | 3 Dec 2010 17:00
Picon

Re: F14 syslinux boot issue



On Fri, Dec 3, 2010 at 10:30 AM, Daniel Drake <dsd <at> laptop.org> wrote:
On 2 December 2010 18:11, Kevin Gordon <kgordon420 <at> gmail.com> wrote:
> Folks:
>
> Please forgive me if this doesn't belong here, but I'm a rookie :-)
>
> The new F14 live SoaS spin from the Sugarlabs link, when put onto a USB
> stick using the Fedora Windows Live-USB-Creator, hangs immediately on
> attempted boot at the initial " SYSLINUX 3.81 ....."   line.  It would
> appear that this 3.81 version used by the creator may be too old for F14.

I think I've seen this problem reported in other threads too.
Given that you may have identified a solution, you should definitely
repost this to the SoaS mailing list:
http://lists.sugarlabs.org/listinfo/soas

Daniel

Joined list and posted
KG
_______________________________________________
Devel mailing list
Devel <at> lists.laptop.org
http://lists.laptop.org/listinfo/devel
Daniel Drake | 4 Dec 2010 16:13
Favicon

XO-1.5 ebook switch driver - upstream submission

Hi Paul,

I've made some small changes to your code for the XO-1.5 ebook switch
driver and am wondering if you have any comments before I submit this
upstream.

 - driver renamed to "xo1p5-ebook"
 - THRM# bit handling removed, since we'll do that in the DSDT
   (pending Mitch's approval)
 - /proc interface removed
 - /sys interface added (much simpler)
 - minor updates for new ACPI API

powerd will need an update for the /sys change. I'll take this on when
the time comes. (all this is framed for post-F14 release)

[PATCH] OLPC XO-1.5 ebook switch driver

From: Paul Fox <pgf <at> laptop.org>

The OLPC XO-1.5 has an ebook switch, triggered when the laptop
screen is rotated then folding down, converting the device into ebook
form.

This switch is exposed through ACPI. Add a driver that exposes it
to userspace as an input device and sysfs "state" attribute.

Signed-off-by: Daniel Drake <dsd <at> laptop.org>
---
 drivers/platform/x86/Kconfig       |    9 ++
 drivers/platform/x86/Makefile      |    1 +
 drivers/platform/x86/xo1p5-ebook.c |  229 ++++++++++++++++++++++++++++++++++++
 3 files changed, 239 insertions(+), 0 deletions(-)
 create mode 100644 drivers/platform/x86/xo1p5-ebook.c

diff --git a/drivers/platform/x86/Kconfig b/drivers/platform/x86/Kconfig
index faec777..d3893d9 100644
--- a/drivers/platform/x86/Kconfig
+++ b/drivers/platform/x86/Kconfig
 <at>  <at>  -639,4 +639,13  <at>  <at>  config XO1_RFKILL
 	  Support for enabling/disabling the WLAN interface on the OLPC XO-1
 	  laptop.

+config XO1P5_EBOOK
+	tristate "OLPC XO-1.5 ebook switch"
+	depends on ACPI
+	---help---
+	  Support for the ebook switch on the OLPC XO-1.5 laptop.
+
+	  This switch is triggered as the screen is rotated and folded down to
+	  convert the device into ebook form.
+
 endif # X86_PLATFORM_DEVICES
diff --git a/drivers/platform/x86/Makefile b/drivers/platform/x86/Makefile
index 9950ccc..20b74be 100644
--- a/drivers/platform/x86/Makefile
+++ b/drivers/platform/x86/Makefile
 <at>  <at>  -33,3 +33,4  <at>  <at>  obj-$(CONFIG_INTEL_IPS)		+= intel_ips.o
 obj-$(CONFIG_GPIO_INTEL_PMIC)	+= intel_pmic_gpio.o
 obj-$(CONFIG_XO1_RFKILL)	+= xo1-rfkill.o
 obj-$(CONFIG_IBM_RTL)		+= ibm_rtl.o
+obj-$(CONFIG_XO1P5_EBOOK)	+= xo1p5-ebook.o
diff --git a/drivers/platform/x86/xo1p5-ebook.c b/drivers/platform/x86/xo1p5-ebook.c
new file mode 100644
index 0000000..f8ba020
--- /dev/null
+++ b/drivers/platform/x86/xo1p5-ebook.c
 <at>  <at>  -0,0 +1,229  <at>  <at> 
+/*
+ *  OLPC XO-1.5 ebook switch driver
+ *  (based on generic ACPI button driver)
+ *
+ *  Copyright (C) 2009 Paul Fox <pgf <at> laptop.org>
+ *  Copyright (C) 2010 One Laptop per Child
+ *
+ *  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 <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/init.h>
+#include <linux/types.h>
+#include <linux/input.h>
+#include <acpi/acpi_bus.h>
+#include <acpi/acpi_drivers.h>
+
+#define MODULE_NAME "xo1p5-ebook"
+#define PREFIX MODULE_NAME ": "
+
+#define XO1P5_EBOOK_CLASS		MODULE_NAME
+#define XO1P5_EBOOK_TYPE_UNKNOWN	0x00
+#define XO1P5_EBOOK_NOTIFY_STATUS	0x80
+
+#define XO1P5_EBOOK_SUBCLASS		"ebook"
+#define XO1P5_EBOOK_HID			"XO15EBK"
+#define XO1P5_EBOOK_DEVICE_NAME		"EBook Switch"
+
+ACPI_MODULE_NAME(MODULE_NAME);
+
+MODULE_AUTHOR("Paul Fox");
+MODULE_DESCRIPTION("OLPC XO-1.5 ebook switch driver");
+MODULE_LICENSE("GPL");
+
+static const struct acpi_device_id ebook_device_ids[] = {
+	{ XO1P5_EBOOK_HID, 0 },
+	{ "", 0 },
+};
+MODULE_DEVICE_TABLE(acpi, ebook_device_ids);
+
+struct ebook_switch {
+	struct input_dev *input;
+	char phys[32];			/* for input device */
+};
+
+/* --------------------------------------------------------------------------
+                                 /sys Interface
+   -------------------------------------------------------------------------- */
+
+static ssize_t ebook_show_state(struct device *dev,
+		struct device_attribute *attr, char *buf)
+{
+	struct acpi_device *acpi_dev = to_acpi_device(dev);
+	const char *state_txt = "unsupported";
+	unsigned long long state;
+	acpi_status status;
+
+	status = acpi_evaluate_integer(acpi_dev->handle, "EBK", NULL, &state);
+	if (!ACPI_FAILURE(status))
+		state_txt = state ? "open" : "closed";
+
+	return snprintf(buf, PAGE_SIZE, "%s\n", state_txt);
+}
+static DEVICE_ATTR(state, S_IRUGO, ebook_show_state, NULL);
+
+/* --------------------------------------------------------------------------
+                                Driver Interface
+   -------------------------------------------------------------------------- */
+static int ebook_send_state(struct acpi_device *device)
+{
+	struct ebook_switch *button = acpi_driver_data(device);
+	unsigned long long state;
+	acpi_status status;
+
+	status = acpi_evaluate_integer(device->handle, "EBK", NULL, &state);
+	if (ACPI_FAILURE(status))
+		return -ENODEV;
+
+	/* input layer checks if event is redundant */
+	input_report_switch(button->input, SW_TABLET_MODE, !state);
+	input_sync(button->input);
+	return 0;
+}
+
+static void ebook_switch_notify(struct acpi_device *device, u32 event)
+{
+	struct ebook_switch *button = acpi_driver_data(device);
+	struct input_dev *input;
+
+	switch (event) {
+	case ACPI_FIXED_HARDWARE_EVENT:
+		event = XO1P5_EBOOK_NOTIFY_STATUS;
+		/* fall through */
+	case XO1P5_EBOOK_NOTIFY_STATUS:
+		input = button->input;
+		ebook_send_state(device);
+		break;
+	default:
+		ACPI_DEBUG_PRINT((ACPI_DB_INFO,
+				  "Unsupported event [0x%x]\n", event));
+		break;
+	}
+}
+
+static int ebook_switch_resume(struct acpi_device *device)
+{
+	return ebook_send_state(device);
+}
+
+static int ebook_switch_add(struct acpi_device *device)
+{
+	struct ebook_switch *button;
+	struct input_dev *input;
+	const char *hid = acpi_device_hid(device);
+	char *name, *class;
+	int error;
+
+	button = kzalloc(sizeof(struct ebook_switch), GFP_KERNEL);
+	if (!button)
+		return -ENOMEM;
+
+	device->driver_data = button;
+
+	button->input = input = input_allocate_device();
+	if (!input) {
+		error = -ENOMEM;
+		goto err_free_button;
+	}
+
+	name = acpi_device_name(device);
+	class = acpi_device_class(device);
+
+	if (strcmp(hid, XO1P5_EBOOK_HID)) {
+		printk(KERN_ERR PREFIX "Unsupported hid [%s]\n", hid);
+		error = -ENODEV;
+		goto err_free_input;
+	}
+
+	strcpy(name, XO1P5_EBOOK_DEVICE_NAME);
+	sprintf(class, "%s/%s", XO1P5_EBOOK_CLASS, XO1P5_EBOOK_SUBCLASS);
+
+	error = device_create_file(&device->dev, &dev_attr_state);
+	if (error)
+		goto err_free_input;
+
+	snprintf(button->phys, sizeof(button->phys), "%s/button/input0", hid);
+
+	input->name = name;
+	input->phys = button->phys;
+	input->id.bustype = BUS_HOST;
+	input->dev.parent = &device->dev;
+
+	input->evbit[0] = BIT_MASK(EV_SW);
+	set_bit(SW_TABLET_MODE, input->swbit);
+
+	error = input_register_device(input);
+	if (error)
+		goto err_remove_fs;
+
+	ebook_send_state(device);
+
+	if (device->wakeup.flags.valid) {
+		/* Button's GPE is run-wake GPE */
+		acpi_enable_gpe(device->wakeup.gpe_device,
+				device->wakeup.gpe_number);
+		device->wakeup.run_wake_count++;
+		device->wakeup.state.enabled = 1;
+	}
+
+	printk(KERN_INFO PREFIX "%s [%s]\n", name, acpi_device_bid(device));
+	return 0;
+
+ err_remove_fs:
+	device_remove_file(&device->dev, &dev_attr_state);
+ err_free_input:
+	input_free_device(input);
+ err_free_button:
+	kfree(button);
+	return error;
+}
+
+static int ebook_switch_remove(struct acpi_device *device, int type)
+{
+	struct ebook_switch *button = acpi_driver_data(device);
+
+	device_remove_file(&device->dev, &dev_attr_state);
+	input_unregister_device(button->input);
+	kfree(button);
+	return 0;
+}
+
+static struct acpi_driver xo1p5_ebook_driver = {
+	.name = MODULE_NAME,
+	.class = XO1P5_EBOOK_CLASS,
+	.ids = ebook_device_ids,
+	.ops = {
+		.add = ebook_switch_add,
+		.resume = ebook_switch_resume,
+		.remove = ebook_switch_remove,
+		.notify = ebook_switch_notify,
+	},
+};
+
+static int __init xo1p5_ebook_init(void)
+{
+	return acpi_bus_register_driver(&xo1p5_ebook_driver);
+}
+
+static void __exit xo1p5_ebook_exit(void)
+{
+	acpi_bus_unregister_driver(&xo1p5_ebook_driver);
+}
+
+module_init(xo1p5_ebook_init);
+module_exit(xo1p5_ebook_exit);
--

-- 
1.7.3.2
Daniel Drake | 4 Dec 2010 16:20
Favicon

XO-1.5 DSDT: enable THRM# GPIO (ebook) by default

Hi Mitch,

With this DSDT change, we can remove an ugly hunk from the Linux driver for
the ebook switch. Then the linux driver becomes agnostic to the fact that
this is on the thermal interrupt GPIO (or even on any GPIO at all).

Paul suggested that we get you to get a quick look at this and think
about if it has any implications on Windows.

cheers
Daniel

Index: cpu/x86/pc/olpc/via/dsdt.dsl
===================================================================
--- cpu/x86/pc/olpc/via/dsdt.dsl	(revisión: 2065)
+++ cpu/x86/pc/olpc/via/dsdt.dsl	(copia de trabajo)
 <at>  <at>  -343,6 +343,9  <at>  <at> 
     // always want to hear both lid events when awake
     Store (GPI7, LPOL)  // watch either edge

+    // always want to hear ebook events (through THRM# GPIO)
+    Store (One, \_SB.PCI0.VT86.ENTH)
+
     Return (0)
 }

 <at>  <at>  -1173,6 +1176,10  <at>  <at> 
                     , 7,
                 IOBA, 9,        // Power Management I/O Base

+                Offset(0x8c), // Host Power Management Control
+                    , 3,
+                ENTH, 1,      // THRM# enable
+
                 Offset(0x94),
                     , 5,
                 PLLD, 1,    // RX9405 Internal PLL Reset During Suspend 0:Enable,1:Disable
 <at>  <at>  -2354,6 +2361,7  <at>  <at> 

             Method(_INI, 0)
             {
+                Store (One, \_SB.PCI0.VT86.ENTH)
                 Store (One, THRM)
                 Store (GPI9, TPOL)  // init edge detect from current state
             }
_______________________________________________
Devel mailing list
Devel <at> lists.laptop.org
http://lists.laptop.org/listinfo/devel
Chris Ball | 4 Dec 2010 19:03
Favicon
Gravatar

Re: XO-1.5 ebook switch driver - upstream submission

Hi Dan,

   >  - driver renamed to "xo1p5-ebook"

Not sure where the 'p' comes from -- how about "xo1_5-ebook"?
We could do the same on 1.75, e.g. olpc-ec-1_75.c.

Thanks,

- Chris.
--

-- 
Chris Ball   <cjb <at> laptop.org>
One Laptop Per Child
Daniel Drake | 4 Dec 2010 19:04
Favicon

Re: XO-1.5 ebook switch driver - upstream submission

On 4 December 2010 18:03, Chris Ball <cjb <at> laptop.org> wrote:
> Hi Dan,
>
>   >  - driver renamed to "xo1p5-ebook"
>
> Not sure where the 'p' comes from -- how about "xo1_5-ebook"?
> We could do the same on 1.75, e.g. olpc-ec-1_75.c.

It's only a detail, but...

I was thinking that it makes sense to use something other than _ as
the decimal point (p is for point).
This is because in function names you can't use -, so _ becomes the
natural equivalent of space.
Under your suggestion there would be xo1_5_ebook_init() where theres
no consistent meaning of _ (first one represents a decimal point in a
version number, 2nd and 3rd one are word separators).

Daniel

Gmane