Hi I'm using syslinux 5.01 and is installing our bootloader using "extlinux --install /boot". In the extlinux.conf I've specified that the kontron_wdt.c32 program should boot another label once it has been executed but it never calls the second label. Here's my extlinux.conf: default wdt timeout 5 prompt 1 label linuxfoo kernel /vmlinuz append root=/dev/sda2 #.... more options label wdt com32 kontron_wdt.c32 append timeout=120 default_label= linuxfoo When I try to debug the kontron_wdt.c32 I can see that syslinux_run_command(..) returns -1. What could cause this? I've tried the ifcpu.c32 application as well (which is a bit similar to kontron_wdt.c32) and it also cannot call syslinux_run_command(). I can see that syslinux_run_command() call create_args_and_load() but if I put any printf's there they're not printed to screen, so it's pretty hard to debug what's causing the error. If someone knows a way to call two labels that would also work as a workaround for the problem I'm trying to solve. -- Bjoern
On Tue, Aug 13, 2013 at 3:21 AM, Bj?rn Damstedt Rasmussen <bjra at terma.com> wrote:> Hi > > I'm using syslinux 5.01 and is installing our bootloader using "extlinux --install /boot". In the extlinux.conf I've specified that the kontron_wdt.c32 program should boot another label once it has been executed but it never calls the second label.Did you build all of the COM32s and extlinux? Do you ever see an error?> Here's my extlinux.conf: > > default wdt > timeout 5 > prompt 1 > > label linuxfoo > kernel /vmlinuz > append root=/dev/sda2 #.... more options > > label wdt > com32 kontron_wdt.c32 > append timeout=120 default_label= linuxfoo > > When I try to debug the kontron_wdt.c32 I can see that syslinux_run_command(..) returns -1. What could cause this?What string would the above config pass to syslinux_run_command()? Does it have a trailing line end character? terminating NUL character?> I've tried the ifcpu.c32 application as well (which is a bit similar to kontron_wdt.c32) and it also cannot call syslinux_run_command(). > > I can see that syslinux_run_command() call create_args_and_load() but if I put any printf's there they're not printed to screen, so it's pretty hard to debug what's causing the error.Are you using printf() or dprintf()?> If someone knows a way to call two labels that would also work as a workaround for the problem I'm trying to solve.Are you just looking to append additional parameters to another LABEL? Try this: LABEL wdt COM32 cmd.c32 APPEND linuxfoo timeout=120 -- -Gene
Hi Gene Thanks for your response!> What string would the above config pass to syslinux_run_command()? > Does it have a trailing line end character? terminating NUL character?What is being passed to syslinux_run_command() is "linuxfoo", i.e. with a terminating 0. Here's the Kontron string copy from kontron_wdt.c: if (!strncmp(argv[i], "default_label=", 14)) { strlcpy(default_label, argv[i] + 14, sizeof(default_label)); } Later they call: printf("Executing default label = '%s'\n",default_label); syslinux_run_command(default_label); The printf I get in the terminal shows the right label (linuxfoo) so I figure the call fails somewhere in the underlying functions. Unfortunately I don't get any error printouts, so I have no idea what's wrong. I've also tried copying all *.c32 files to /boot and it still doesn't work. What I'm trying to do is execute two labels. First start the watchdog (wdt label) and afterwards boot the OS (linuxfoo). Is there a simple way to do this? -- Bjoern default wdt timeout 5 prompt 1 label linuxfoo kernel /vmlinuz append root=/dev/sda2 #.... more options label wdt com32 kontron_wdt.c32 append timeout=120 default_label=linuxfoo Bj?rn Damstedt Rasmussen Developer, Software Processing Terma A/S -----Original Message----- From: syslinux-bounces at zytor.com [mailto:syslinux-bounces at zytor.com] On Behalf Of Gene Cumm Sent: 13. august 2013 13:12 To: For discussion of Syslinux and tftp-hpa Subject: Re: [syslinux] Booting second label On Tue, Aug 13, 2013 at 3:21 AM, Bj?rn Damstedt Rasmussen <bjra at terma.com> wrote:> Hi > > I'm using syslinux 5.01 and is installing our bootloader using "extlinux --install /boot". In the extlinux.conf I've specified that the kontron_wdt.c32 program should boot another label once it has been executed but it never calls the second label.Did you build all of the COM32s and extlinux? Do you ever see an error?> Here's my extlinux.conf: > > default wdt > timeout 5 > prompt 1 > > label linuxfoo > kernel /vmlinuz > append root=/dev/sda2 #.... more options > > label wdt > com32 kontron_wdt.c32 > append timeout=120 default_label= linuxfoo > > When I try to debug the kontron_wdt.c32 I can see that syslinux_run_command(..) returns -1. What could cause this?What string would the above config pass to syslinux_run_command()? Does it have a trailing line end character? terminating NUL character?> I've tried the ifcpu.c32 application as well (which is a bit similar to kontron_wdt.c32) and it also cannot call syslinux_run_command(). > > I can see that syslinux_run_command() call create_args_and_load() but if I put any printf's there they're not printed to screen, so it's pretty hard to debug what's causing the error.Are you using printf() or dprintf()?> If someone knows a way to call two labels that would also work as a workaround for the problem I'm trying to solve.Are you just looking to append additional parameters to another LABEL? Try this: LABEL wdt COM32 cmd.c32 APPEND linuxfoo timeout=120 -- -Gene _______________________________________________ Syslinux mailing list Submissions to Syslinux at zytor.com Unsubscribe or set options at: http://www.zytor.com/mailman/listinfo/syslinux Please do not send private replies to mailing list traffic.
> Hi > > I'm using syslinux 5.01 and is installing our bootloader using > "extlinux --install /boot". In the extlinux.conf I've specified that > the kontron_wdt.c32 program should boot another label once it has been > executed but it never calls the second label. > > Here's my extlinux.conf: > > default wdt > timeout 5 > prompt 1 > > label linuxfoo > kernel /vmlinuz > append root=/dev/sda2 #.... more options > > label wdt > com32 kontron_wdt.c32 > append timeout=120 default_label= linuxfoo > > When I try to debug the kontron_wdt.c32 I can see that > syslinux_run_command(..) returns -1. What could cause this? > > I've tried the ifcpu.c32 application as well (which is a bit similar > to kontron_wdt.c32) and it also cannot call syslinux_run_command(). > > I can see that syslinux_run_command() call create_args_and_load() but > if I put any printf's there they're not printed to screen, so it's > pretty hard to debug what's causing the error. > > If someone knows a way to call two labels that would also work as a > workaround for the problem I'm trying to solve. > > -- BjoernHave you tried version 4.07? If it works with 4.06 or 4.07 but not with 5.xx, then we can narrow down the issue. Please remember to always use the c32 modules from the same version of the boot loader. For testing purposes, try using official binaries (not re-building). I'd also suggest, just for testing purposes, changing the DEFAULT label and _not_ using the Syslinux TIMEOUT directive: ---- default linuxfoo prompt 1 label linuxfoo kernel /vmlinuz append root=/dev/sda2 #.... more options label wdt com32 kontron_wdt.c32 append timeout=120 default_label=linuxfoo --- So from the boot prompt type "wdt" and see what happens. If nothing happens (after the timeout after "wdt"), then type in "linuxfoo" in the boot prompt. Is it still failing? Also note that I left no space character after "default_label=". Regards, Ady.
Hi Ady I tried removing Syslinux TIMEOUT and typing 'wdt' but the 'linuxfoo' label is still not called. I have to enter it manually and it will start. The "timeout=120" parameter is for the kontron_wdt.c32 watchdog. So the system will reset after 120 seconds if the watchdog hasn't been serviced. We're rebuilding the syslinux source code since we're cross compiling. Is there some special parameter or macro which needs to be passed to the make command in order to build c32 modules properly? -- Bjoern -----Original Message----- From: syslinux-bounces at zytor.com [mailto:syslinux-bounces at zytor.com] On Behalf Of Ady Sent: 13. august 2013 16:54 To: Syslinux at zytor.com Subject: Re: [syslinux] Booting second label> Hi > > I'm using syslinux 5.01 and is installing our bootloader using > "extlinux --install /boot". In the extlinux.conf I've specified that > the kontron_wdt.c32 program should boot another label once it has been > executed but it never calls the second label. > > Here's my extlinux.conf: > > default wdt > timeout 5 > prompt 1 > > label linuxfoo > kernel /vmlinuz > append root=/dev/sda2 #.... more options > > label wdt > com32 kontron_wdt.c32 > append timeout=120 default_label= linuxfoo > > When I try to debug the kontron_wdt.c32 I can see that > syslinux_run_command(..) returns -1. What could cause this? > > I've tried the ifcpu.c32 application as well (which is a bit similar > to kontron_wdt.c32) and it also cannot call syslinux_run_command(). > > I can see that syslinux_run_command() call create_args_and_load() but > if I put any printf's there they're not printed to screen, so it's > pretty hard to debug what's causing the error. > > If someone knows a way to call two labels that would also work as a > workaround for the problem I'm trying to solve. > > -- BjoernHave you tried version 4.07? If it works with 4.06 or 4.07 but not with 5.xx, then we can narrow down the issue. Please remember to always use the c32 modules from the same version of the boot loader. For testing purposes, try using official binaries (not re-building). I'd also suggest, just for testing purposes, changing the DEFAULT label and _not_ using the Syslinux TIMEOUT directive: ---- default linuxfoo prompt 1 label linuxfoo kernel /vmlinuz append root=/dev/sda2 #.... more options label wdt com32 kontron_wdt.c32 append timeout=120 default_label=linuxfoo --- So from the boot prompt type "wdt" and see what happens. If nothing happens (after the timeout after "wdt"), then type in "linuxfoo" in the boot prompt. Is it still failing? Also note that I left no space character after "default_label=". Regards, Ady. _______________________________________________ Syslinux mailing list Submissions to Syslinux at zytor.com Unsubscribe or set options at: http://www.zytor.com/mailman/listinfo/syslinux Please do not send private replies to mailing list traffic.
On Tue, 13 Aug, at 07:21:35AM, Bj?rn Damstedt Rasmussen wrote:> Hi > > I'm using syslinux 5.01 and is installing our bootloader using > "extlinux --install /boot". In the extlinux.conf I've specified that > the kontron_wdt.c32 program should boot another label once it has been > executed but it never calls the second label.This bug should be fixed by, commit 04f40bc55ed4f39d6c625b017bb16907f7d50c05 Author: Matt Fleming <matt.fleming at intel.com> Date: Thu Feb 7 12:59:35 2013 +0000 run_command: Use load_kernel() which understands labels load_kernel() understands how to handle labels from config files whereas create_args_and_load() assumes that the cmdline is a COM32 file. Callers of syslinux_run_command() may want to pass labels, so use a function that allows that. Signed-off-by: Matt Fleming <matt.fleming at intel.com> which is part of releases 5.10, 6.00, 6.01. -- Matt Fleming, Intel Open Source Technology Center