summaryrefslogtreecommitdiff
path: root/recipes/linux/LAB-kernel-2.6.13-hh2/labrun.patch
diff options
context:
space:
mode:
authorDenys Dmytriyenko <denis@denix.org>2009-03-17 14:32:59 -0400
committerDenys Dmytriyenko <denis@denix.org>2009-03-17 14:32:59 -0400
commit709c4d66e0b107ca606941b988bad717c0b45d9b (patch)
tree37ee08b1eb308f3b2b6426d5793545c38396b838 /recipes/linux/LAB-kernel-2.6.13-hh2/labrun.patch
parentfa6cd5a3b993f16c27de4ff82b42684516d433ba (diff)
rename packages/ to recipes/ per earlier agreement
See links below for more details: http://thread.gmane.org/gmane.comp.handhelds.openembedded/21326 http://thread.gmane.org/gmane.comp.handhelds.openembedded/21816 Signed-off-by: Denys Dmytriyenko <denis@denix.org> Acked-by: Mike Westerhof <mwester@dls.net> Acked-by: Philip Balister <philip@balister.org> Acked-by: Khem Raj <raj.khem@gmail.com> Acked-by: Marcin Juszkiewicz <hrw@openembedded.org> Acked-by: Koen Kooi <koen@openembedded.org> Acked-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
Diffstat (limited to 'recipes/linux/LAB-kernel-2.6.13-hh2/labrun.patch')
-rw-r--r--recipes/linux/LAB-kernel-2.6.13-hh2/labrun.patch85
1 files changed, 85 insertions, 0 deletions
diff --git a/recipes/linux/LAB-kernel-2.6.13-hh2/labrun.patch b/recipes/linux/LAB-kernel-2.6.13-hh2/labrun.patch
new file mode 100644
index 0000000000..29ff10eda2
--- /dev/null
+++ b/recipes/linux/LAB-kernel-2.6.13-hh2/labrun.patch
@@ -0,0 +1,85 @@
+Index: lab/lab-main.c
+===================================================================
+RCS file: /cvs/linux/kernel26/lab/lab-main.c,v
+retrieving revision 1.9
+diff -u -p -r1.9 lab-main.c
+--- kernel26/lab/lab-main.c 22 Dec 2005 02:17:57 -0000 1.9
++++ kernel26/lab/lab-main.c 16 Feb 2006 22:02:29 -0000
+@@ -18,7 +18,7 @@
+ #include <linux/lab/lab.h>
+ #include <linux/lab/commands.h>
+
+-
++void lab_runfile(char *source, char *sourcefile);
+
+ int globfail;
+ EXPORT_SYMBOL (globfail);
+@@ -67,7 +67,7 @@ static void parseargs (char *argstr, int
+ while ((c = *argstr) != 0) {
+ enum ParseState newState;
+
+- if (c == ';' && lastState != PS_STRING && lastState != PS_ESCAPE)
++ if ((c == ';' || c == '\n') && lastState != PS_STRING && lastState != PS_ESCAPE)
+ break;
+
+ if (lastState == PS_ESCAPE) {
+@@ -106,7 +106,7 @@ static void parseargs (char *argstr, int
+ if (argc_p != NULL)
+ *argc_p = argc;
+
+- if (*argstr == ';')
++ if (*argstr == ';' || *argstr == '\n')
+ *argstr++ = 0;
+
+ *resid = argstr;
+@@ -189,6 +189,7 @@ EXPORT_SYMBOL (lab_exec_string);
+
+ static char *blockdevs[] = {
+ "/dev/mmc/blk0/part1", "ext2",
++ "/dev/ide/host0/bus0/target0/lun0/part1", "ext2",
+ "/dev/mtdblock/3", "jffs2",
+ NULL
+ };
+@@ -222,19 +223,19 @@ void lab_main (int cmdline)
+ }
+ lab_puts ("\r\n"
+ ">> Booting now.\r\n");
+- sys_mkdir("/fs", 0000);
++ sys_mkdir("/mnt", 0000);
+ sys_mount("/dev", "/dev", "devfs", 0, "");
+ lab_puts (">> Looking for filesystems...\r\n");
+ blockdev = blockdevs;
+ while (*blockdev) {
+ lab_printf(" >> Trying \"%s\"... ", blockdev[0]);
+- if (sys_mount(blockdev[0], "/fs", blockdev[1], MS_RDONLY, "") >= 0) {
++ if (sys_mount(blockdev[0], "/mnt", blockdev[1], MS_RDONLY, "") >= 0) {
+ struct stat sstat;
+-
++
+ lab_printf("ok");
+- if (sys_newstat("/fs/boot/zImage", &sstat) < 0) {
+- lab_printf(", but no zImage.\r\n");
+- sys_oldumount("/fs");
++ if (sys_newstat("/mnt/boot/labrun", &sstat) < 0) {
++ lab_printf(", but no labrun.\r\n");
++ sys_oldumount("/mnt");
+ blockdev += 2;
+ continue;
+ }
+@@ -249,12 +250,10 @@ void lab_main (int cmdline)
+ lab_printf(">> No bootable filesystems found!\r\n");
+ goto domenu;
+ }
+- lab_printf(">> Copying zImage... ");
+- lab_copy("fs", "/fs/boot/zImage", "fs", "/zImage");
+- lab_printf("done\r\n>> Unmounting filesystem... ");
+- sys_oldumount("/fs");
+- lab_printf("done\r\n>> Booting kernel.\r\n");
+- lab_armboot("fs", "/zImage", NULL);
++
++ lab_printf(">> Executing labrun...\r\n");
++ lab_runfile("fs", "/mnt/boot/labrun");
++ lab_printf("done\r\n");
+ }
+
+ domenu: