mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* booting linux
@ 2011-03-02 10:31 Vanalme Filip
  2011-03-02 10:45 ` Baruch Siach
  0 siblings, 1 reply; 5+ messages in thread
From: Vanalme Filip @ 2011-03-02 10:31 UTC (permalink / raw)
  To: barebox

My barebox porting on i.MX27 comes in a next phase : booting the kernel. 
I'm using a kernel image from some time ago, an image that worked with redboot (formerly installed bootloader of the board).
I loaded the image to nand-flash :
barebox:/ erase /dev/nand0.kernel.bb
barebox:/ tftp zImage /dev/nand0.kernel.bb
error frame: 0xa7b058f8 0x00000882    <===== ???
TFTP from server 10.0.48.80 ('zImage' -> '/dev/nand0.kernel.bb')
        #################################################################
        #################################################################
        #################################################################
        #################################################################
        #################################################################
        ######################
barebox:/

Apart from the "error frame" message, the transfer seems to be successful.

Then I do :

barebox:/ bootz /dev/nand0.kernel.bb
loaded zImage from /dev/nand0.kernel.bb with size 1777792
commandline: console=ttymxc0,115200 ip=dhcp root=/dev/mtdblock7 rootfstype=jffs2 mtdparts=mxc_nand:256k(barebox)ro,128k(bareboxenv),5M(kernel),-(root)
arch_number: 1802
Uncompressing Linux........................................................................................................................... done, booting the kernel.

The kernel uncompresses but never starts. Any idea why not ? Does barebox expand the kernel to the right place in SDRAM or do I have to specify that in the bootz command ?
I think the kernel is never started at all because I don't see any output at all. In this phase, even having a kernel crash would be great... because at least then I would know the kernel has been running for a while... ;-) 

I guess the image is OK because it uncompresses successfully. Maybe a problem in the bootargs that are passed to the kernel ?
Should I already have a /dev/mtdblock7 device in barebox's /dev ?

Maybe useful information :

barebox:/ printenv
locals:
machine=imx27pdk
ip=dhcp
kernel_loc=nand
rootfs_loc=nand
rootfs_type=jffs2
rootfsimage=root-jffs2
kernelimage_type=zimage
kernelimage=zImage-imx27pdk
nfsroot=:/path/to/nfs/root
autoboot_timeout=3
bootargs=console=ttymxc0,115200
nand_parts=256k(barebox)ro,128k(bareboxenv),5M(kernel),-(root)
rootfs_mtdblock_nand=7
PS1=\e[1;32mbarebox@\e[1;31m\h:\w\e[0m
bootfile=zImage
nameserver=10.0.0.44
domainname=televic.com
globals:
PATH=/env/bin
barebox:/

Filip


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: booting linux
  2011-03-02 10:31 booting linux Vanalme Filip
@ 2011-03-02 10:45 ` Baruch Siach
  2011-03-02 13:03   ` Vanalme Filip
  0 siblings, 1 reply; 5+ messages in thread
From: Baruch Siach @ 2011-03-02 10:45 UTC (permalink / raw)
  To: Vanalme Filip; +Cc: barebox

Hi Vanalme,

On Wed, Mar 02, 2011 at 11:31:31AM +0100, Vanalme Filip wrote:

[snip]

> Then I do :
> 
> barebox:/ bootz /dev/nand0.kernel.bb
> loaded zImage from /dev/nand0.kernel.bb with size 1777792
> commandline: console=ttymxc0,115200 ip=dhcp root=/dev/mtdblock7 rootfstype=jffs2 mtdparts=mxc_nand:256k(barebox)ro,128k(bareboxenv),5M(kernel),-(root)
> arch_number: 1802
> Uncompressing Linux........................................................................................................................... done, booting the kernel.

If your kernel is recent enough (2.6.33 or newer) try the following:

1. Enable EARLY_PRINTK in your .config

2. Add "earlyprintk" to your bootargs

3. Boot the kernel

Post here what you see.

baruch

> The kernel uncompresses but never starts. Any idea why not ? Does barebox 
> expand the kernel to the right place in SDRAM or do I have to specify that 
> in the bootz command ?
> I think the kernel is never started at all because I don't see any output at all. In this phase, even having a kernel crash would be great... because at least then I would know the kernel has been running for a while... ;-) 
> 
> I guess the image is OK because it uncompresses successfully. Maybe a problem in the bootargs that are passed to the kernel ?
> Should I already have a /dev/mtdblock7 device in barebox's /dev ?
> 
> Maybe useful information :
> 
> barebox:/ printenv
> locals:
> machine=imx27pdk
> ip=dhcp
> kernel_loc=nand
> rootfs_loc=nand
> rootfs_type=jffs2
> rootfsimage=root-jffs2
> kernelimage_type=zimage
> kernelimage=zImage-imx27pdk
> nfsroot=:/path/to/nfs/root
> autoboot_timeout=3
> bootargs=console=ttymxc0,115200
> nand_parts=256k(barebox)ro,128k(bareboxenv),5M(kernel),-(root)
> rootfs_mtdblock_nand=7
> PS1=\e[1;32mbarebox@\e[1;31m\h:\w\e[0m
> bootfile=zImage
> nameserver=10.0.0.44
> domainname=televic.com
> globals:
> PATH=/env/bin
> barebox:/
> 
> Filip

-- 
                                                     ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch@tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: booting linux
  2011-03-02 10:45 ` Baruch Siach
@ 2011-03-02 13:03   ` Vanalme Filip
  2011-03-02 13:53     ` Sascha Hauer
  0 siblings, 1 reply; 5+ messages in thread
From: Vanalme Filip @ 2011-03-02 13:03 UTC (permalink / raw)
  To: Baruch Siach; +Cc: barebox

> -----Original Message-----
> From: Baruch Siach [mailto:baruch@tkos.co.il]
> Sent: woensdag 2 maart 2011 11:46
> To: Vanalme Filip
> Cc: barebox@lists.infradead.org
> Subject: Re: booting linux
> 
> Hi Vanalme,
> 
> On Wed, Mar 02, 2011 at 11:31:31AM +0100, Vanalme Filip wrote:
> 
> [snip]
> 
> > Then I do :
> >
> > barebox:/ bootz /dev/nand0.kernel.bb
> > loaded zImage from /dev/nand0.kernel.bb with size 1777792
> > commandline: console=ttymxc0,115200 ip=dhcp root=/dev/mtdblock7
> rootfstype=jffs2
> mtdparts=mxc_nand:256k(barebox)ro,128k(bareboxenv),5M(kernel),-(root)
> > arch_number: 1802
> > Uncompressing
> Linux........................................................................................................................... done,
> booting the kernel.
> 
> If your kernel is recent enough (2.6.33 or newer) try the following:
> 
> 1. Enable EARLY_PRINTK in your .config
> 
> 2. Add "earlyprintk" to your bootargs
> 
> 3. Boot the kernel
> 
> Post here what you see.

[Filip] 
Unfortunately, the kernel I use is version 2.6.22. But, no problem, I got a kernel 2.6.38 version from one of my colleagues (who is porting the kernel to our i.MX27PDK board). With EARLY_PRINTK enabled.
First time I tried to start the kernel, I got a message that machine types of barebox and kernel did not match. In barebox, I'm using MACH_TYPE_IMX27, while kernel is using MACH_TYPE_IMX27_3DS (unfortunately, I did not capture the console output for that attempt...). So I changed barebox to use also MACH_TYPE_IMX27_3DS and............kernel boots !
It ends with a kernel panic, but it boots !
I don't know if the incompatible machine code could also have been the problem when I tried booting the 2.6.22. We will anyhow continue working on porting the 2.6.38 to our board, so I think it's no use to continue investigating the 2.6.22.

On to the next hurdle... :-)

Thanks !
> 
> baruch
> 
> > The kernel uncompresses but never starts. Any idea why not ? Does barebox
> > expand the kernel to the right place in SDRAM or do I have to specify that
> > in the bootz command ?
> > I think the kernel is never started at all because I don't see any output at all. In
> this phase, even having a kernel crash would be great... because at least then I
> would know the kernel has been running for a while... ;-)
> >
> > I guess the image is OK because it uncompresses successfully. Maybe a
> problem in the bootargs that are passed to the kernel ?
> > Should I already have a /dev/mtdblock7 device in barebox's /dev ?
> >
> > Maybe useful information :
> >
> > barebox:/ printenv
> > locals:
> > machine=imx27pdk
> > ip=dhcp
> > kernel_loc=nand
> > rootfs_loc=nand
> > rootfs_type=jffs2
> > rootfsimage=root-jffs2
> > kernelimage_type=zimage
> > kernelimage=zImage-imx27pdk
> > nfsroot=:/path/to/nfs/root
> > autoboot_timeout=3
> > bootargs=console=ttymxc0,115200
> > nand_parts=256k(barebox)ro,128k(bareboxenv),5M(kernel),-(root)
> > rootfs_mtdblock_nand=7
> > PS1=\e[1;32mbarebox@\e[1;31m\h:\w\e[0m
> > bootfile=zImage
> > nameserver=10.0.0.44
> > domainname=televic.com
> > globals:
> > PATH=/env/bin
> > barebox:/
> >
> > Filip
> 
> --
>                                                      ~. .~   Tk Open Systems
> =}------------------------------------------------ooO--U--Ooo------------{=
>    - baruch@tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: booting linux
  2011-03-02 13:03   ` Vanalme Filip
@ 2011-03-02 13:53     ` Sascha Hauer
  2011-03-02 14:37       ` Vanalme Filip
  0 siblings, 1 reply; 5+ messages in thread
From: Sascha Hauer @ 2011-03-02 13:53 UTC (permalink / raw)
  To: Vanalme Filip; +Cc: barebox

On Wed, Mar 02, 2011 at 02:03:27PM +0100, Vanalme Filip wrote:
> > -----Original Message-----
> > From: Baruch Siach [mailto:baruch@tkos.co.il]
> > Sent: woensdag 2 maart 2011 11:46
> > To: Vanalme Filip
> > Cc: barebox@lists.infradead.org
> > Subject: Re: booting linux
> > 
> > Hi Vanalme,
> > 
> > On Wed, Mar 02, 2011 at 11:31:31AM +0100, Vanalme Filip wrote:
> > 
> > [snip]
> > 
> > > Then I do :
> > >
> > > barebox:/ bootz /dev/nand0.kernel.bb
> > > loaded zImage from /dev/nand0.kernel.bb with size 1777792
> > > commandline: console=ttymxc0,115200 ip=dhcp root=/dev/mtdblock7
> > rootfstype=jffs2
> > mtdparts=mxc_nand:256k(barebox)ro,128k(bareboxenv),5M(kernel),-(root)
> > > arch_number: 1802
> > > Uncompressing
> > Linux........................................................................................................................... done,
> > booting the kernel.
> > 
> > If your kernel is recent enough (2.6.33 or newer) try the following:
> > 
> > 1. Enable EARLY_PRINTK in your .config
> > 
> > 2. Add "earlyprintk" to your bootargs
> > 
> > 3. Boot the kernel
> > 
> > Post here what you see.
> 
> [Filip] 
> Unfortunately, the kernel I use is version 2.6.22. But, no problem, I
> got a kernel 2.6.38 version from one of my colleagues (who is porting
> the kernel to our i.MX27PDK board). With EARLY_PRINTK enabled.  First
> time I tried to start the kernel, I got a message that machine types
> of barebox and kernel did not match. In barebox, I'm using
> MACH_TYPE_IMX27, while kernel is using MACH_TYPE_IMX27_3DS
> (unfortunately, I did not capture the console output for that
> attempt...). So I changed barebox to use also MACH_TYPE_IMX27_3DS
> and............kernel boots !  It ends with a kernel panic, but it
> boots !  I don't know if the incompatible machine code could also have
> been the problem when I tried booting the 2.6.22. We will anyhow
> continue working on porting the 2.6.38 to our board, so I think it's
> no use to continue investigating the 2.6.22.

I guess the 2.6.22 kernel is a Freescale kernel. These need system_rev
to be set properly.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: booting linux
  2011-03-02 13:53     ` Sascha Hauer
@ 2011-03-02 14:37       ` Vanalme Filip
  0 siblings, 0 replies; 5+ messages in thread
From: Vanalme Filip @ 2011-03-02 14:37 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: barebox

> -----Original Message-----
> From: Sascha Hauer [mailto:s.hauer@pengutronix.de]
> Sent: woensdag 2 maart 2011 14:54
> To: Vanalme Filip
> Cc: Baruch Siach; barebox@lists.infradead.org
> Subject: Re: booting linux
> 
> On Wed, Mar 02, 2011 at 02:03:27PM +0100, Vanalme Filip wrote:
> > > -----Original Message-----
> > > From: Baruch Siach [mailto:baruch@tkos.co.il]
> > > Sent: woensdag 2 maart 2011 11:46
> > > To: Vanalme Filip
> > > Cc: barebox@lists.infradead.org
> > > Subject: Re: booting linux
> > >
> > > Hi Vanalme,
> > >
> > > On Wed, Mar 02, 2011 at 11:31:31AM +0100, Vanalme Filip wrote:
> > >
> > > [snip]
> > >
> > > > Then I do :
> > > >
> > > > barebox:/ bootz /dev/nand0.kernel.bb
> > > > loaded zImage from /dev/nand0.kernel.bb with size 1777792
> > > > commandline: console=ttymxc0,115200 ip=dhcp root=/dev/mtdblock7
> > > rootfstype=jffs2
> > > mtdparts=mxc_nand:256k(barebox)ro,128k(bareboxenv),5M(kernel),-(root)
> > > > arch_number: 1802
> > > > Uncompressing
> > > Linux...........................................................................................................................
> done,
> > > booting the kernel.
> > >
> > > If your kernel is recent enough (2.6.33 or newer) try the following:
> > >
> > > 1. Enable EARLY_PRINTK in your .config
> > >
> > > 2. Add "earlyprintk" to your bootargs
> > >
> > > 3. Boot the kernel
> > >
> > > Post here what you see.
> >
> > [Filip]
> > Unfortunately, the kernel I use is version 2.6.22. But, no problem, I
> > got a kernel 2.6.38 version from one of my colleagues (who is porting
> > the kernel to our i.MX27PDK board). With EARLY_PRINTK enabled.  First
> > time I tried to start the kernel, I got a message that machine types
> > of barebox and kernel did not match. In barebox, I'm using
> > MACH_TYPE_IMX27, while kernel is using MACH_TYPE_IMX27_3DS
> > (unfortunately, I did not capture the console output for that
> > attempt...). So I changed barebox to use also MACH_TYPE_IMX27_3DS
> > and............kernel boots !  It ends with a kernel panic, but it
> > boots !  I don't know if the incompatible machine code could also have
> > been the problem when I tried booting the 2.6.22. We will anyhow
> > continue working on porting the 2.6.38 to our board, so I think it's
> > no use to continue investigating the 2.6.22.
> 
> I guess the 2.6.22 kernel is a Freescale kernel. These need system_rev
> to be set properly.
> 
> Sascha

[Filip]  That's correct. That's the kernel that comes with the i.MX27PDK package. Obviously with a lot of patches specific for this board. 
Unfortunately, this seems the only kernel version available for this board. In later kernel versions, the board seems not supported anymore. And Freescale did not port their specific patches to later versions.  Because our target board is based on the PDK board, and because we would like to use recent versions for bootloader as well as for Linux kernel, we have to do the porting ourselves.... (with the NFC problems, as you know, being one of the "higher hurdles" to take...). For now, I don't care about 2.6.22 not working, because our focus is anyhow on a recent version.

I think we are not yet at the end of this story... ;-)


Filip
> 
> --
> Pengutronix e.K.                           |                             |
> Industrial Linux Solutions                 | http://www.pengutronix.de/  |
> Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
> Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-03-02 14:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-02 10:31 booting linux Vanalme Filip
2011-03-02 10:45 ` Baruch Siach
2011-03-02 13:03   ` Vanalme Filip
2011-03-02 13:53     ` Sascha Hauer
2011-03-02 14:37       ` Vanalme Filip

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox