Skip to contentSkip to conversation

kexec on Nokia Internet Tablets

DISCUSSION Otto Solares 3 participants 6 messages Feb 17, 2009 – Feb 18, 2009

lore
Share & tools
lore
#0 lore raw

Hi all!

I want to make kexec work on current Nokia Internet Tablets but maybe someone here have a clue or better if a patch :)

When I run a kexec enabled linux-omap kernel and try to boot the production Maemo kernel or a linux-omap kernel I only succeed if the serial-console flag in r&d mode is set, if not the device just hangs.

It seems as a timing problem because if I insert small delays to the kexeced kernel via CONFIG_BOOT_PRINTK_DELAY it works too without the serial-console flag set.

Any idea what to debug or where to start?

Thanks.

-otto

#1 lore raw
Quoted 4 lines · Otto Solares

Hi all!

I want to make kexec work on current Nokia Internet Tablets but maybe someone here have a clue or better if a patch :)

Do you need to patch anything for this, or does it work out of the box?

Quoted 4 lines

When I run a kexec enabled linux-omap kernel and try to boot the production Maemo kernel or a linux-omap kernel I only succeed if the serial-console flag in r&d mode is set, if not the device just hangs.

Sounds like something does not get correctly initialized..

Quoted 5 lines

It seems as a timing problem because if I insert small delays to the kexeced kernel via CONFIG_BOOT_PRINTK_DELAY it works too without the serial-console flag set.

Any idea what to debug or where to start?

Well since the LCD is on, you could write a little function that writes the output to the LCD. You just need to find out the virtual address of the LCD and then add a function for displaying fonts.. Pretty easy to do.

BTW, do you have some Maemo package for kexec?

Tony

#2 lore raw
Quoted 7 lines · Tony Lindgren
Quoted 4 lines · Otto Solares

Hi all!

I want to make kexec work on current Nokia Internet Tablets but maybe someone here have a clue or better if a patch :)

Do you need to patch anything for this, or does it work out of the box?

Tried with l-o out of the box and tried too with this patch applied but same results so far:

http://kernel.ubuntu.com/git?p=ubuntu/ubuntu-jaunty.git;a=commit;h=6cd8dd766aec17ce66aa4f732928d05534da0937

Although it seems it was reverted here:

http://kernel.ubuntu.com/git?p=ubuntu/ubuntu-jaunty.git;a=commit;h=484b70239a16c01d706a82e5e4afe2f82f24d950

Quoted 11 lines
Quoted 4 lines

When I run a kexec enabled linux-omap kernel and try to boot the production Maemo kernel or a linux-omap kernel I only succeed if the serial-console flag in r&d mode is set, if not the device just hangs.

Sounds like something does not get correctly initialized..

Quoted 4 lines

It seems as a timing problem because if I insert small delays to the kexeced kernel via CONFIG_BOOT_PRINTK_DELAY it works too without the serial-console flag set.

Quoted 6 lines
Quoted 1 line

Any idea what to debug or where to start?

Well since the LCD is on, you could write a little function that writes the output to the LCD. You just need to find out the virtual address of the LCD and then add a function for displaying fonts.. Pretty easy to do.

Ok, btw do you known a function name I should patch with the debugging output?

Quoted 1 line

BTW, do you have some Maemo package for kexec?

Nope, although I host a userland patch and the statically compiled binary here:

http://guug.org/nit/kexec/

-otto

#3 lore raw
Quoted 9 lines · Otto Solares
Quoted 7 lines · Tony Lindgren
Quoted 4 lines · Otto Solares

Hi all!

I want to make kexec work on current Nokia Internet Tablets but maybe someone here have a clue or better if a patch :)

Do you need to patch anything for this, or does it work out of the box?

Quoted 8 lines

Tried with l-o out of the box and tried too with this patch applied but same results so far:

http://kernel.ubuntu.com/git?p=ubuntu/ubuntu-jaunty.git;a=commit;h=6cd8dd766aec17ce66aa4f732928d05534da0937

Although it seems it was reverted here:

http://kernel.ubuntu.com/git?p=ubuntu/ubuntu-jaunty.git;a=commit;h=484b70239a16c01d706a82e5e4afe2f82f24d950

OK, thanks for the links.

Quoted 13 lines
Quoted 13 lines
Quoted 4 lines

When I run a kexec enabled linux-omap kernel and try to boot the production Maemo kernel or a linux-omap kernel I only succeed if the serial-console flag in r&d mode is set, if not the device just hangs.

Sounds like something does not get correctly initialized..

Quoted 5 lines

It seems as a timing problem because if I insert small delays to the kexeced kernel via CONFIG_BOOT_PRINTK_DELAY it works too without the serial-console flag set.

Any idea what to debug or where to start?

Quoted 7 lines
Quoted 4 lines

Well since the LCD is on, you could write a little function that writes the output to the LCD. You just need to find out the virtual address of the LCD and then add a function for displaying fonts.. Pretty easy to do.

Ok, btw do you known a function name I should patch with the debugging output?

We have the DEBUG_LL patch in l-o tree that's for low-level debug output to serial port. You could could add a function called printlcd() and call that instead of printascii().

Quoted 6 lines
Quoted 1 line

BTW, do you have some Maemo package for kexec?

Nope, although I host a userland patch and the statically compiled binary here:

http://guug.org/nit/kexec/

Great, it would be nice to switch between Maemo and whatever easily.

Tony

kernel/printk.c +7 -0
@@ -44,6 +44,10 @@ void asmlinkage __attribute__((weak)) early_printk(const char *fmt, ...)
 
 #define __LOG_BUF_LEN	(1 << CONFIG_LOG_BUF_SHIFT)
 
+#ifdef CONFIG_DEBUG_LL
+extern void printascii(char *);
+#endif
+
 /* printk's without a loglevel use this.. */
 #define DEFAULT_MESSAGE_LOGLEVEL 4 /* KERN_WARNING */
 
@@ -668,6 +672,9 @@ asmlinkage int vprintk(const char *fmt, va_list args)
 	printed_len += vscnprintf(printk_buf + printed_len,
 				  sizeof(printk_buf) - printed_len, fmt, args);
 
+#ifdef	CONFIG_DEBUG_LL
+	printascii(printk_buf);
+#endif
 
 	/*
 	 * Copy the output into log_buf.  If the caller didn't provide
#4 lore raw
Quoted 71 lines · Tony Lindgren
Quoted 9 lines · Otto Solares
Quoted 7 lines · Tony Lindgren
Quoted 4 lines · Otto Solares

Hi all!

I want to make kexec work on current Nokia Internet Tablets but maybe someone here have a clue or better if a patch :)

Do you need to patch anything for this, or does it work out of the box?

Quoted 8 lines

Tried with l-o out of the box and tried too with this patch applied but same results so far:

http://kernel.ubuntu.com/git?p=ubuntu/ubuntu-jaunty.git;a=commit;h=6cd8dd766aec17ce66aa4f732928d05534da0937

Although it seems it was reverted here:

http://kernel.ubuntu.com/git?p=ubuntu/ubuntu-jaunty.git;a=commit;h=484b70239a16c01d706a82e5e4afe2f82f24d950

OK, thanks for the links.

Quoted 13 lines
Quoted 13 lines
Quoted 4 lines

When I run a kexec enabled linux-omap kernel and try to boot the production Maemo kernel or a linux-omap kernel I only succeed if the serial-console flag in r&d mode is set, if not the device just hangs.

Sounds like something does not get correctly initialized..

Quoted 5 lines

It seems as a timing problem because if I insert small delays to the kexeced kernel via CONFIG_BOOT_PRINTK_DELAY it works too without the serial-console flag set.

Any idea what to debug or where to start?

Quoted 7 lines
Quoted 4 lines

Well since the LCD is on, you could write a little function that writes the output to the LCD. You just need to find out the virtual address of the LCD and then add a function for displaying fonts.. Pretty easy to do.

Ok, btw do you known a function name I should patch with the debugging output?

We have the DEBUG_LL patch in l-o tree that's for low-level debug output to serial port. You could could add a function called printlcd() and call that instead of printascii().

Quoted 6 lines
Quoted 1 line

BTW, do you have some Maemo package for kexec?

Nope, although I host a userland patch and the statically compiled binary here:

http://guug.org/nit/kexec/

Great, it would be nice to switch between Maemo and whatever easily.

Tony

kernel/printk.c +4 -0
@@ -44,6 +44,10 @@ void asmlinkage __attribute__((weak)) early_printk(const char *fmt, ...)
 
 #define __LOG_BUF_LEN	(1 << CONFIG_LOG_BUF_SHIFT)
 
+#ifdef CONFIG_DEBUG_LL
+extern void printascii(char *);
+#endif
+
 /* printk's without a loglevel use this.. */
 #define DEFAULT_MESSAGE_LOGLEVEL 4 /* KERN_WARNING */
 

kernel/printk.c asmlinkage int vprintk(const char *fmt, va_list args) · line 680

Quoted 9 lines
kernel/printk.c +3 -0
@@ -668,6 +672,9 @@ asmlinkage int vprintk(const char *fmt, va_list args)
 	printed_len += vscnprintf(printk_buf + printed_len,
 				  sizeof(printk_buf) - printed_len, fmt, args);
 
+#ifdef	CONFIG_DEBUG_LL
+	printascii(printk_buf);
+#endif
 
 	/*
 	 * Copy the output into log_buf.  If the caller didn't provide

Cool! will try something when get home... thx!

-otto

#5 lore raw
In reply to Tony Lindgren
Quoted 5 lines · On Tue, 17 Feb 2009 14:09:36 -0800 Tony Lindgren <[email protected]> wrote:
Quoted 5 lines
Quoted 4 lines

Well since the LCD is on, you could write a little function that writes the output to the LCD. You just need to find out the virtual address of the LCD and then add a function for displaying fonts.. Pretty easy to do.

Quoted 7 lines
Quoted 2 lines

Ok, btw do you known a function name I should patch with the debugging output?

We have the DEBUG_LL patch in l-o tree that's for low-level debug output to serial port. You could could add a function called printlcd() and call that instead of printascii().

Haven't tried but how about easier option CONFIG_MTD_OOPS? I.e. using Maemo root device /dev/mtdblock4 for console=ttyMTD4 and then analyze the partion afterward by booting root from sd card.

Jarkko