This email list is read-only. Emails sent to this list will be discarded
----------------------------------
.../0043-superreadahead-patch.patch | 65 ++++++++++++++++++++
meta-moblin/packages/linux/linux-moblin_2.6.27.bb | 3 +-
.../sreadahead/files/sreadahead-generate.sh | 21 ++++++
.../packages/sreadahead/files/sreadahead.sh | 7 ++
.../sreadahead/sreadahead-0.02/readahead_c.patch | 29 +++++++++
.../sreadahead-0.02/sreadahead-0.02-make.patch | 27 ++++++++
meta-moblin/packages/sreadahead/sreadahead_0.02.bb | 41 ++++++++++++
meta-moblin/packages/tasks/task-moblin-tools.bb | 7 +-
8 files changed, 196 insertions(+), 4 deletions(-)
New commits:
commit 1b7873fae984f29a3953e3601f543a29194fdaad
Author: Samuel Ortiz <[EMAIL PROTECTED]>
Date: Mon Nov 3 19:18:40 2008 +0100
task-moblin-tools: Add sreadahead to the package list
commit bebb376e62f94fec5caa1abb6141a6e6728ae95f
Author: Samuel Ortiz <[EMAIL PROTECTED]>
Date: Mon Nov 3 19:14:00 2008 +0100
sreadahead: Initial commit
Super readahead is an improved readahead tool.
commit 7b5d03d08e737dd3637072f60259af5b093b7f70
Author: Samuel Ortiz <[EMAIL PROTECTED]>
Date: Mon Nov 3 19:11:28 2008 +0100
linux-moblin: Add super readahead ext3 specific patch
We need this patch for sreadahead to generate the to be read file list.
Diff in this email is a maximum of 400 lines.
diff --git
a/meta-moblin/packages/linux/linux-moblin-2.6.27/0043-superreadahead-patch.patch
b/meta-moblin/packages/linux/linux-moblin-2.6.27/0043-superreadahead-patch.patch
new file mode 100644
index 0000000..101c100
--- /dev/null
+++
b/meta-moblin/packages/linux/linux-moblin-2.6.27/0043-superreadahead-patch.patch
@@ -0,0 +1,65 @@
+From: Arjan van de Ven <[EMAIL PROTECTED]>
+Date: Sun, 21 Sep 2008 11:58:27 -0700
+Subject: [PATCH] superreadahead patch
+
+---
+ fs/ext3/ioctl.c | 3 +++
+ fs/ext3/super.c | 1 +
+ include/linux/ext3_fs.h | 1 +
+ include/linux/fs.h | 2 ++
+ 4 files changed, 7 insertions(+), 0 deletions(-)
+
+diff --git a/fs/ext3/ioctl.c b/fs/ext3/ioctl.c
+index 0d0c701..7e62d7d 100644
+--- a/fs/ext3/ioctl.c
++++ b/fs/ext3/ioctl.c
+@@ -286,6 +286,9 @@ group_add_out:
+ mnt_drop_write(filp->f_path.mnt);
+ return err;
+ }
++ case EXT3_IOC_INODE_JIFFIES: {
++ return inode->created_when;
++ }
+
+
+ default:
+diff --git a/fs/ext3/super.c b/fs/ext3/super.c
+index 2845425..6a896a4 100644
+--- a/fs/ext3/super.c
++++ b/fs/ext3/super.c
+@@ -456,6 +456,7 @@ static struct inode *ext3_alloc_inode(struct super_block
*sb)
+ #endif
+ ei->i_block_alloc_info = NULL;
+ ei->vfs_inode.i_version = 1;
++ ei->vfs_inode.created_when = jiffies;
+ return &ei->vfs_inode;
+ }
+
+diff --git a/include/linux/ext3_fs.h b/include/linux/ext3_fs.h
+index 36c5403..b409fa7 100644
+--- a/include/linux/ext3_fs.h
++++ b/include/linux/ext3_fs.h
+@@ -225,6 +225,7 @@ struct ext3_new_group_data {
+ #endif
+ #define EXT3_IOC_GETRSVSZ _IOR('f', 5, long)
+ #define EXT3_IOC_SETRSVSZ _IOW('f', 6, long)
++#define EXT3_IOC_INODE_JIFFIES _IOR('f', 19, long)
+
+ /*
+ * ioctl commands in 32 bit emulation
+diff --git a/include/linux/fs.h b/include/linux/fs.h
+index c6455da..4ac846d 100644
+--- a/include/linux/fs.h
++++ b/include/linux/fs.h
+@@ -655,6 +655,8 @@ struct inode {
+ void *i_security;
+ #endif
+ void *i_private; /* fs or device private pointer */
++
++ unsigned long created_when; /* jiffies of creation time */
+ };
+
+ /*
+--
+1.5.5.1
+
diff --git a/meta-moblin/packages/linux/linux-moblin_2.6.27.bb
b/meta-moblin/packages/linux/linux-moblin_2.6.27.bb
index fe26cc5..b3d990a 100644
--- a/meta-moblin/packages/linux/linux-moblin_2.6.27.bb
+++ b/meta-moblin/packages/linux/linux-moblin_2.6.27.bb
@@ -1,6 +1,6 @@
require linux-moblin.inc
-PR = "r2"
+PR = "r3"
PE = "1"
DEFAULT_PREFERENCE = "-1"
@@ -49,6 +49,7 @@ SRC_URI =
"${KERNELORG_MIRROR}pub/linux/kernel/v2.6/linux-2.6.27.tar.bz2 \
file://0040-fastboot-fix-issues-and-improve-output-of-bootgraph.patch;patch=1 \
file://0041-r8169-8101e.patch;patch=1 \
file://0042-intelfb-945gme.patch;patch=1 \
+ file://0043-superreadahead-patch.patch;patch=1 \
file://defconfig-netbook"
S = "${WORKDIR}/linux-2.6.27"
diff --git a/meta-moblin/packages/sreadahead/files/sreadahead-generate.sh
b/meta-moblin/packages/sreadahead/files/sreadahead-generate.sh
new file mode 100755
index 0000000..626d7cc
--- /dev/null
+++ b/meta-moblin/packages/sreadahead/files/sreadahead-generate.sh
@@ -0,0 +1,21 @@
+#!/bin/sh
+#
+
+if [ -e /etc/readahead.packed ]; then
+ exit 0
+fi
+
+if [ -e /etc/readahead.packed.first ]; then
+ mv /etc/readahead.packed.first /etc/readahead.packed.second
+ exit 0
+fi
+
+# That's our second boot, we can generate the sreadahead file list
+if [ -e /etc/readahead.packed.second ]; then
+ rm -f /etc/readahead.packed.second
+ find / -type f > filelist.txt
+
+ /sbin/generate_filelist filelist.txt
+ rm filelist.txt
+ mv readahead.packed /etc/
+fi
diff --git a/meta-moblin/packages/sreadahead/files/sreadahead.sh
b/meta-moblin/packages/sreadahead/files/sreadahead.sh
new file mode 100755
index 0000000..c737828
--- /dev/null
+++ b/meta-moblin/packages/sreadahead/files/sreadahead.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+#
+# Start sreadahead, of the config file exists
+
+if [ -e /etc/readahead.packed ]; then
+ /sbin/sreadahead
+fi
diff --git a/meta-moblin/packages/sreadahead/sreadahead-0.02/readahead_c.patch
b/meta-moblin/packages/sreadahead/sreadahead-0.02/readahead_c.patch
new file mode 100644
index 0000000..a65c108
--- /dev/null
+++ b/meta-moblin/packages/sreadahead/sreadahead-0.02/readahead_c.patch
@@ -0,0 +1,29 @@
+---
+ readahead.c | 7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+Index: sreadahead-0.02/readahead.c
+===================================================================
+--- sreadahead-0.02.orig/readahead.c 2008-09-23 22:35:20.000000000 +0200
++++ sreadahead-0.02/readahead.c 2008-10-27 16:27:52.000000000 +0100
+@@ -69,7 +69,11 @@ void *one_thread(void *ptr)
+ int main(int argc, char **argv)
+ {
+ FILE *file = fopen("/etc/readahead.packed", "r");
+-
++ if (!file) {
++ perror("Couldnt open /etc/readahead.packed");
++ return -errno;
++ }
++
+ daemon(0,0);
+
+ total_files = fread(&files, sizeof(struct readahead), MAXR, file);
+@@ -81,7 +85,6 @@ int main(int argc, char **argv)
+ pthread_create(&three, NULL, one_thread, NULL);
+ pthread_create(&four, NULL, one_thread, NULL);
+
+- printf("Waiting\n");
+ pthread_join(one, NULL);
+ pthread_join(two, NULL);
+ pthread_join(three, NULL);
diff --git
a/meta-moblin/packages/sreadahead/sreadahead-0.02/sreadahead-0.02-make.patch
b/meta-moblin/packages/sreadahead/sreadahead-0.02/sreadahead-0.02-make.patch
new file mode 100644
index 0000000..d0ece66
--- /dev/null
+++ b/meta-moblin/packages/sreadahead/sreadahead-0.02/sreadahead-0.02-make.patch
@@ -0,0 +1,27 @@
+diff -Nrup sreadahead-0.02.orig/Makefile sreadahead-0.02/Makefile
+--- sreadahead-0.02.orig/Makefile 2008-09-23 22:36:24.000000000 +0200
++++ sreadahead-0.02/Makefile 2008-09-26 07:43:19.000000000 +0200
+@@ -1,11 +1,18 @@
+-all: generate_filelist sreadahead
++CFLAGS=-Os -g -Wall
++PROGS=generate_filelist sreadahead
++
++all: $(PROGS)
+
+
+ generate_filelist: readahead.h filelist.c Makefile
+- gcc -Os -g -Wall -W filelist.c -o generate_filelist
++ $(CC) $(CFLAGS) -W filelist.c -o generate_filelist
+
+ sreadahead: readahead.h readahead.c Makefile
+- gcc -Os -g -Wall -lpthread -W readahead.c -o sreadahead
++ $(CC) $(CFLAGS) -lpthread -W readahead.c -o sreadahead
+
+ clean:
+- rm -f *~ sreadahead generate_filelist
+\ No newline at end of file
++ rm -f *~ sreadahead generate_filelist
++
++install: all
++ mkdir -p $(DESTDIR)/sbin
++ install -p -m 755 $(PROGS) $(DESTDIR)/sbin
diff --git a/meta-moblin/packages/sreadahead/sreadahead_0.02.bb
b/meta-moblin/packages/sreadahead/sreadahead_0.02.bb
new file mode 100644
index 0000000..ca89635
--- /dev/null
+++ b/meta-moblin/packages/sreadahead/sreadahead_0.02.bb
@@ -0,0 +1,41 @@
+DESCRIPTION = "Super readahead, part of the fastboot tool set."
+SECTION = "base"
+HOMEPAGE = "http://www.moblin.org"
+LICENSE = "GPLv2"
+PR = "r12"
+
+inherit update-rc.d
+
+SRC_URI = "http://www.moblin.org/sites/all/files/sreadahead-${PV}.tar.gz \
+ file://sreadahead-0.02-make.patch;patch=1 \
+ file://readahead_c.patch;patch=1 \
+ file://sreadahead-generate.sh \
+ file://sreadahead.sh"
+
+CFLAGS_prepend = "-I ${S}/include "
+
+PACKAGES += "${PN}-generate"
+FILES_${PN} = "${base_sbindir}/sreadahead ${sysconfdir}/init.d/sreadahead.sh"
+FILES_${PN}-generate = "${base_sbindir}/generate_filelist
${sysconfdir}/init.d/sreadahead-generate.sh"
+
+INITSCRIPT_PACKAGES = "${PN} ${PN}-generate"
+INITSCRIPT_NAME = "sreadahead.sh"
+INITSCRIPT_NAME_${PN}-generate = "sreadahead-generate.sh"
+INITSCRIPT_PARAMS = "start 00 S ."
+INITSCRIPT_PARAMS_${PN}-generate = "defaults 99"
+
+do_install() {
+ oe_runmake install DESTDIR=${D}
+ install -d ${D}${sysconfdir}/init.d
+ install -m 755 ${WORKDIR}/sreadahead.sh ${D}${sysconfdir}/init.d/
+ install -m 755 ${WORKDIR}/sreadahead-generate.sh
${D}${sysconfdir}/init.d/
+}
+
+pkg_postinst_${PN}-generate () {
+ # can't do this offline
+ if [ "x$D" != "x" ]; then
+ exit 1
+ fi
+
+ touch /etc/readahead.packed.first
+}
diff --git a/meta-moblin/packages/tasks/task-moblin-tools.bb
b/meta-moblin/packages/tasks/task-moblin-tools.bb
index 86ac7ff..5a91d8e 100644
--- a/meta-moblin/packages/tasks/task-moblin-tools.bb
+++ b/meta-moblin/packages/tasks/task-moblin-tools.bb
@@ -3,7 +3,7 @@
#
DESCRIPTION = "Debuggin and profiling tools tasks for Moblin"
-PR = "r2"
+PR = "r3"
PACKAGES = "\
task-moblin-tools-debug \
@@ -33,8 +33,9 @@ RDEPENDS_task-moblin-tools-profile = "\
oprofileui-server \
powertop \
lttng-control \
- lttng-viewer"
-# sreadahead"
+ lttng-viewer \
+ sreadahead \
+ sreadahead-generate "
RDEPENDS_task-moblin-tools-profile_qemux86 += "valgrind"
_______________________________________________
Commits mailing list
[email protected]
https://lists.moblin.org/mailman/listinfo/commits