All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] booting os 'Unknown OS' (1) is not supported
@ 2014-01-17 10:11 Alexander Khryukin
  2014-01-17 14:11 ` Detlev Zundel
  0 siblings, 1 reply; 22+ messages in thread
From: Alexander Khryukin @ 2014-01-17 10:11 UTC (permalink / raw)
  To: u-boot

Hello guys!
I faced with a strange behaviour of u-boot.
Few months ago i bought an ARM development board from yicsystem
it's based on exynos 5250 and very similar to arndale
http://www.yicsystem.com/products/low-cost-board/yse5250/

And i can boot Android ICS
but when i try to boot any linux
i always see


Checking Boot Mode ... SDMMC
Now running in RAM - U-Boot at: c3e00000
REVISION: 1.0
REVISION: 1.0
MMC Device 0: 3839 MB
NAME: S5P_MSHC0
MMC Device 1: 7348 MB
MMC Device 2 not found
Destroy Hash Table: c3f80f78 table = (null)
Create Hash Table: N=512
INSERT: table c3f80f78, filled 1/521 rv c3d047a0 ==> name="baudrate"
value="115200"
INSERT: table c3f80f78, filled 2/521 rv c3d0582c ==> name="bootargs"
value="root=/dev/mmcblk0p1"
INSERT: table c3f80f78, filled 3/521 rv c3d04a1c ==> name="bootcmd"
value="movi read kernel 0 40008000;movi read rootfs 0 41000000 100000;bootm
40008000 41000000"
INSERT: table c3f80f78, filled 4/521 rv c3d04f20 ==> name="bootdelay"
value="3"
INSERT: table c3f80f78, filled 5/521 rv c3d04bfc ==> name="bootfile"
value="/tftpboot/revoboot/bin/revoboot.pxe"
INSERT: table c3f80f78, filled 6/521 rv c3d040a4 ==>
name="emmcbootrecovery" value="mmc erase boot 1 0 0;emmc open 1;movi read
fwbl1 0 40000000;movi write zero fwbl1 1 40000000;movi read bl2 0
40004000;movi write zero bl2 1 40004000;movi read u-boot 0 42000000;movi
write zero u-boot 1 42000000;movi read tzsw 0 42100000;movi write zero tzsw
1 42100000;emmc close 1"
INSERT: table c3f80f78, filled 7/521 rv c3d04998 ==> name="ethact"
value="smc911x-0"
INSERT: table c3f80f78, filled 8/521 rv c3d0462c ==> name="ethaddr"
value="00:40:5c:26:0a:5b"
INSERT: table c3f80f78, filled 9/521 rv c3d057a8 ==> name="gatewayip"
value="192.168.0.1"
INSERT: table c3f80f78, filled 10/521 rv c3d05874 ==> name="ipaddr"
value="192.168.0.28"
INSERT: table c3f80f78, filled 11/521 rv c3d048c0 ==> name="netmask"
value="255.255.255.0"
INSERT: table c3f80f78, filled 12/521 rv c3d05214 ==> name="rootfslen"
value=" 100000"
INSERT: table c3f80f78, filled 13/521 rv c3d048e4 ==> name="serverip"
value="192.168.0.13"
INSERT: free(data = c3d00010)
INSERT: done
Net:   smc911x-0
### main_loop entered: bootdelay=3

### main_loop: bootcmd="movi read kernel 0 40008000;movi read rootfs 0
41000000 100000;bootm 40008000 41000000"
Hit any key to stop autoboot:  0
reading kernel..device 0 Start 1063, Count 16384
MMC read: dev # 0, block # 1063, count 16384 ... 16384 blocks read: OK
completed
reading RFS..device 0 Count 17447, Start 2048
MMC read: dev # 0, block # 17447, count 2048 ... 2048 blocks read: OK
completed
## Current stack ends at 0xc3cfbd98 *  kernel: cmdline image address =
0x40008000
## Booting kernel from Legacy Image at 40008000 ...
   Image Name:   Linux-3.12.0-rc1-armv7-x0.6-0012
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3243400 Bytes = 3167 KiB
   Load Address: 40008000
   Entry Point:  40008000
   Verifying Checksum ... OK
   kernel data at 0x40008040, len = 0x00317d88 (3243400)
*  ramdisk: cmdline image address = 0x41000000
Wrong Ramdisk Image Format
   ramdisk start = 0x41000000, ramdisk end = 0x41000000
   XIP Kernel Image ... OK
OK
   kernel loaded at 0x40008000, end = 0x4031fd88
images.os.start = 0x40008000, images.os.end = 0x4031fdc8
images.os.load = 0x40008000, load_end = 0x4031fd88
*ERROR: booting os 'Unknown OS' (1) is not supported*





Unknown OS.
But i do not understand what i should change to proceed.
Any suggestions?

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

* [U-Boot] booting os 'Unknown OS' (1) is not supported
  2014-01-17 10:11 [U-Boot] booting os 'Unknown OS' (1) is not supported Alexander Khryukin
@ 2014-01-17 14:11 ` Detlev Zundel
  2014-01-17 14:36   ` Alexander Khryukin
  0 siblings, 1 reply; 22+ messages in thread
From: Detlev Zundel @ 2014-01-17 14:11 UTC (permalink / raw)
  To: u-boot

Hi Alexander,

> I faced with a strange behaviour of u-boot.

Expected behaviour for some people may seem strange to others ;)

> Few months ago i bought an ARM development board from yicsystem
> it's based on exynos 5250 and very similar to arndale
> http://www.yicsystem.com/products/low-cost-board/yse5250/
>
> And i can boot Android ICS
> but when i try to boot any linux
> i always see
>
>
> Checking Boot Mode ... SDMMC
> Now running in RAM - U-Boot at: c3e00000
> REVISION: 1.0
> REVISION: 1.0
> MMC Device 0: 3839 MB
> NAME: S5P_MSHC0
> MMC Device 1: 7348 MB
> MMC Device 2 not found
> Destroy Hash Table: c3f80f78 table = (null)
> Create Hash Table: N=512
> INSERT: table c3f80f78, filled 1/521 rv c3d047a0 ==> name="baudrate"
> value="115200"
> INSERT: table c3f80f78, filled 2/521 rv c3d0582c ==> name="bootargs"
> value="root=/dev/mmcblk0p1"
> INSERT: table c3f80f78, filled 3/521 rv c3d04a1c ==> name="bootcmd"
> value="movi read kernel 0 40008000;movi read rootfs 0 41000000 100000;bootm
> 40008000 41000000"
> INSERT: table c3f80f78, filled 4/521 rv c3d04f20 ==> name="bootdelay"
> value="3"
> INSERT: table c3f80f78, filled 5/521 rv c3d04bfc ==> name="bootfile"
> value="/tftpboot/revoboot/bin/revoboot.pxe"
> INSERT: table c3f80f78, filled 6/521 rv c3d040a4 ==>
> name="emmcbootrecovery" value="mmc erase boot 1 0 0;emmc open 1;movi read
> fwbl1 0 40000000;movi write zero fwbl1 1 40000000;movi read bl2 0
> 40004000;movi write zero bl2 1 40004000;movi read u-boot 0 42000000;movi
> write zero u-boot 1 42000000;movi read tzsw 0 42100000;movi write zero tzsw
> 1 42100000;emmc close 1"
> INSERT: table c3f80f78, filled 7/521 rv c3d04998 ==> name="ethact"
> value="smc911x-0"
> INSERT: table c3f80f78, filled 8/521 rv c3d0462c ==> name="ethaddr"
> value="00:40:5c:26:0a:5b"
> INSERT: table c3f80f78, filled 9/521 rv c3d057a8 ==> name="gatewayip"
> value="192.168.0.1"
> INSERT: table c3f80f78, filled 10/521 rv c3d05874 ==> name="ipaddr"
> value="192.168.0.28"
> INSERT: table c3f80f78, filled 11/521 rv c3d048c0 ==> name="netmask"
> value="255.255.255.0"
> INSERT: table c3f80f78, filled 12/521 rv c3d05214 ==> name="rootfslen"
> value=" 100000"
> INSERT: table c3f80f78, filled 13/521 rv c3d048e4 ==> name="serverip"
> value="192.168.0.13"
> INSERT: free(data = c3d00010)
> INSERT: done
> Net:   smc911x-0
> ### main_loop entered: bootdelay=3
>
> ### main_loop: bootcmd="movi read kernel 0 40008000;movi read rootfs 0
> 41000000 100000;bootm 40008000 41000000"
> Hit any key to stop autoboot:  0
> reading kernel..device 0 Start 1063, Count 16384
> MMC read: dev # 0, block # 1063, count 16384 ... 16384 blocks read: OK
> completed
> reading RFS..device 0 Count 17447, Start 2048
> MMC read: dev # 0, block # 17447, count 2048 ... 2048 blocks read: OK
> completed
> ## Current stack ends at 0xc3cfbd98 *  kernel: cmdline image address =
> 0x40008000
> ## Booting kernel from Legacy Image at 40008000 ...
>    Image Name:   Linux-3.12.0-rc1-armv7-x0.6-0012
>    Image Type:   ARM Linux Kernel Image (uncompressed)
>    Data Size:    3243400 Bytes = 3167 KiB
>    Load Address: 40008000
>    Entry Point:  40008000
>    Verifying Checksum ... OK
>    kernel data at 0x40008040, len = 0x00317d88 (3243400)
> *  ramdisk: cmdline image address = 0x41000000
> Wrong Ramdisk Image Format
>    ramdisk start = 0x41000000, ramdisk end = 0x41000000
>    XIP Kernel Image ... OK

This "XIP" points to a problem.  In essence I think you should try to
load your image to any address in RAM but _not_ to the load address
specified in the uImage.  The intention of this field is to tell U-Boot
where the uImage file - that could reside on nor flash for exmple -
should be loaded to in RAM before it is executed.  You have specified
4008000 at image creation time but already load uImage that has a
64-byte header prepended to that location.  U-Boot in term finds that
the image is alreday where it should be, does nothing and switches to
XIP mode and then gets pretty confused.

So again, try loading the image somewhere else in RAM and let U-Boot do
the copying to the correct place.

And even better, we consider uImages to be legacy for quite a while, so
please plan to switch to using FIT images sometime soon.

Cheers
  Detlev

-- 
This is  not the first  time my views  on some topic have  inspired in
someone the  desire to psychoanalyze me. Previous  experience leads me
to ask  about your couch. Is  it comfortable? Are its  springs in good
shape?                                     -- Jonh McCarthy
--
DENX Software Engineering GmbH,      MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: dzu at denx.de

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

* [U-Boot] booting os 'Unknown OS' (1) is not supported
  2014-01-17 14:11 ` Detlev Zundel
@ 2014-01-17 14:36   ` Alexander Khryukin
  2014-01-17 15:20     ` Detlev Zundel
  0 siblings, 1 reply; 22+ messages in thread
From: Alexander Khryukin @ 2014-01-17 14:36 UTC (permalink / raw)
  To: u-boot

Thanks for your answer!

>So again, try loading the image somewhere else in RAM and let U-Boot do
>the copying to the correct place.

It's not obvious for me how to do it.
Might you have any guide or faq?




2014/1/17 Detlev Zundel <dzu@denx.de>

> Hi Alexander,
>
> > I faced with a strange behaviour of u-boot.
>
> Expected behaviour for some people may seem strange to others ;)
>
> > Few months ago i bought an ARM development board from yicsystem
> > it's based on exynos 5250 and very similar to arndale
> > http://www.yicsystem.com/products/low-cost-board/yse5250/
> >
> > And i can boot Android ICS
> > but when i try to boot any linux
> > i always see
> >
> >
> > Checking Boot Mode ... SDMMC
> > Now running in RAM - U-Boot at: c3e00000
> > REVISION: 1.0
> > REVISION: 1.0
> > MMC Device 0: 3839 MB
> > NAME: S5P_MSHC0
> > MMC Device 1: 7348 MB
> > MMC Device 2 not found
> > Destroy Hash Table: c3f80f78 table = (null)
> > Create Hash Table: N=512
> > INSERT: table c3f80f78, filled 1/521 rv c3d047a0 ==> name="baudrate"
> > value="115200"
> > INSERT: table c3f80f78, filled 2/521 rv c3d0582c ==> name="bootargs"
> > value="root=/dev/mmcblk0p1"
> > INSERT: table c3f80f78, filled 3/521 rv c3d04a1c ==> name="bootcmd"
> > value="movi read kernel 0 40008000;movi read rootfs 0 41000000
> 100000;bootm
> > 40008000 41000000"
> > INSERT: table c3f80f78, filled 4/521 rv c3d04f20 ==> name="bootdelay"
> > value="3"
> > INSERT: table c3f80f78, filled 5/521 rv c3d04bfc ==> name="bootfile"
> > value="/tftpboot/revoboot/bin/revoboot.pxe"
> > INSERT: table c3f80f78, filled 6/521 rv c3d040a4 ==>
> > name="emmcbootrecovery" value="mmc erase boot 1 0 0;emmc open 1;movi read
> > fwbl1 0 40000000;movi write zero fwbl1 1 40000000;movi read bl2 0
> > 40004000;movi write zero bl2 1 40004000;movi read u-boot 0 42000000;movi
> > write zero u-boot 1 42000000;movi read tzsw 0 42100000;movi write zero
> tzsw
> > 1 42100000;emmc close 1"
> > INSERT: table c3f80f78, filled 7/521 rv c3d04998 ==> name="ethact"
> > value="smc911x-0"
> > INSERT: table c3f80f78, filled 8/521 rv c3d0462c ==> name="ethaddr"
> > value="00:40:5c:26:0a:5b"
> > INSERT: table c3f80f78, filled 9/521 rv c3d057a8 ==> name="gatewayip"
> > value="192.168.0.1"
> > INSERT: table c3f80f78, filled 10/521 rv c3d05874 ==> name="ipaddr"
> > value="192.168.0.28"
> > INSERT: table c3f80f78, filled 11/521 rv c3d048c0 ==> name="netmask"
> > value="255.255.255.0"
> > INSERT: table c3f80f78, filled 12/521 rv c3d05214 ==> name="rootfslen"
> > value=" 100000"
> > INSERT: table c3f80f78, filled 13/521 rv c3d048e4 ==> name="serverip"
> > value="192.168.0.13"
> > INSERT: free(data = c3d00010)
> > INSERT: done
> > Net:   smc911x-0
> > ### main_loop entered: bootdelay=3
> >
> > ### main_loop: bootcmd="movi read kernel 0 40008000;movi read rootfs 0
> > 41000000 100000;bootm 40008000 41000000"
> > Hit any key to stop autoboot:  0
> > reading kernel..device 0 Start 1063, Count 16384
> > MMC read: dev # 0, block # 1063, count 16384 ... 16384 blocks read: OK
> > completed
> > reading RFS..device 0 Count 17447, Start 2048
> > MMC read: dev # 0, block # 17447, count 2048 ... 2048 blocks read: OK
> > completed
> > ## Current stack ends at 0xc3cfbd98 *  kernel: cmdline image address =
> > 0x40008000
> > ## Booting kernel from Legacy Image at 40008000 ...
> >    Image Name:   Linux-3.12.0-rc1-armv7-x0.6-0012
> >    Image Type:   ARM Linux Kernel Image (uncompressed)
> >    Data Size:    3243400 Bytes = 3167 KiB
> >    Load Address: 40008000
> >    Entry Point:  40008000
> >    Verifying Checksum ... OK
> >    kernel data at 0x40008040, len = 0x00317d88 (3243400)
> > *  ramdisk: cmdline image address = 0x41000000
> > Wrong Ramdisk Image Format
> >    ramdisk start = 0x41000000, ramdisk end = 0x41000000
> >    XIP Kernel Image ... OK
>
> This "XIP" points to a problem.  In essence I think you should try to
> load your image to any address in RAM but _not_ to the load address
> specified in the uImage.  The intention of this field is to tell U-Boot
> where the uImage file - that could reside on nor flash for exmple -
> should be loaded to in RAM before it is executed.  You have specified
> 4008000 at image creation time but already load uImage that has a
> 64-byte header prepended to that location.  U-Boot in term finds that
> the image is alreday where it should be, does nothing and switches to
> XIP mode and then gets pretty confused.
>
> So again, try loading the image somewhere else in RAM and let U-Boot do
> the copying to the correct place.
>
> And even better, we consider uImages to be legacy for quite a while, so
> please plan to switch to using FIT images sometime soon.
>
> Cheers
>   Detlev
>
> --
> This is  not the first  time my views  on some topic have  inspired in
> someone the  desire to psychoanalyze me. Previous  experience leads me
> to ask  about your couch. Is  it comfortable? Are its  springs in good
> shape?                                     -- Jonh McCarthy
> --
> DENX Software Engineering GmbH,      MD: Wolfgang Denk & Detlev Zundel
> HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
> Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: dzu at denx.de
>

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

* [U-Boot] booting os 'Unknown OS' (1) is not supported
  2014-01-17 14:36   ` Alexander Khryukin
@ 2014-01-17 15:20     ` Detlev Zundel
  2014-01-17 15:39       ` Alexander Khryukin
  0 siblings, 1 reply; 22+ messages in thread
From: Detlev Zundel @ 2014-01-17 15:20 UTC (permalink / raw)
  To: u-boot

Hello Alexander,

> Thanks for your answer!
>
>>So again, try loading the image somewhere else in RAM and let U-Boot do
>>the copying to the correct place.
>
> It's not obvious for me how to do it.
> Might you have any guide or faq?

[...]

>> > ### main_loop: bootcmd="movi read kernel 0 40008000;movi read rootfs 0
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^
>> > 41000000 100000;bootm 40008000 41000000"
                     ^^^^^^^^^^^^^^

Your bootmcd reads the kernel to 40008000 and then calls bootm to that
address.  Simple change those two places to, say, 40800000 by editing
bootcmd.  (Not knowing your system, I presume RAM starts at 4000,0000
and 4080,0000 then would be 8MiB after the beginning.  U-Boot will copy
the kernel to 4008000 so the kernel should not be bigger than 7.5MiB but
the other snippets from your log say the kernel is ~3.2MiB, so this
should be fine.

Cheers
  Detlev

-- 
The only thing that interferes with my learning is my education.
                              -- Albert Einstein
--
DENX Software Engineering GmbH,      MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: dzu at denx.de

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

* [U-Boot] booting os 'Unknown OS' (1) is not supported
  2014-01-17 15:20     ` Detlev Zundel
@ 2014-01-17 15:39       ` Alexander Khryukin
  2014-01-17 15:42         ` Alexander Khryukin
  2014-01-17 16:11         ` Detlev Zundel
  0 siblings, 2 replies; 22+ messages in thread
From: Alexander Khryukin @ 2014-01-17 15:39 UTC (permalink / raw)
  To: u-boot

Thanks.
I changed env to

baudrate=115200
*bootcmd=movi read kernel 0 40800000;movi read rootfs 0 41000000
100000;bootm 40800000 41000000*
bootdelay=3
emmcbootrecovery=mmc erase boot 1 0 0;emmc open 1;movi read fwbl1 0
40000000;movi write zero fwbl1 1 40000000;movi read bl2 0 40004000;movi
write zero bl2 1 40004000;movi read u-boot 0 42000000;movi write zero
u-boot 1 42000000;movi read tzsw 0 42100000;movi write zero tzsw 1
42100000;emmc close 1
ethact=smc911x-0
ethaddr=00:40:5c:26:0a:5b
gatewayip=192.168.0.1
ipaddr=192.168.0.28
netmask=255.255.255.0
rootfslen= 100000
serverip=192.168.0.13



And now trying to boot
U-Boot 2012.12-00000-g503cd8d-dirty (Jan 15 2014 - 12:58:49) for YICSYSTEM
YSE5250-scp


CPU: S5PC520 Rev1.0 [Samsung SOC on SMP Platform Base on ARM CortexA15]
APLL = 800MHz, MPLL = 800MHz
Board:  YSE5250-scp
DRAM:  2047 MiB

TrustZone Enabled BSP
BL1 version: 20130404
PMIC: S5M8767

Checking Boot Mode ... SDMMC
REVISION: 1.0
REVISION: 1.0
MMC Device 0: 3839 MB
NAME: S5P_MSHC0
MMC Device 1: 7348 MB
MMC Device 2 not found
Net:   smc911x-0
Hit any key to stop autoboot:  0
reading kernel..device 0 Start 1063, Count 16384
MMC read: dev # 0, block # 1063, count 16384 ... 16384 blocks read: OK
completed
reading RFS..device 0 Count 17447, Start 2048
MMC read: dev # 0, block # 17447, count 2048 ... 2048 blocks read: OK
completed
## Booting kernel from Legacy Image at 40800000 ...
   Image Name:   Linux-3.13.0-rc8
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    4754992 Bytes = 4643 KiB
   Load Address: 40008000
   Entry Point:  40008000
   Verifying Checksum ... OK
Wrong Ramdisk Image Format
   Loading Kernel Image ... OK
OK
*ERROR: booting os 'Unknown OS' (1) is not supported*


No changes.
But XIP is gone.



2014/1/17 Detlev Zundel <dzu@denx.de>

> Hello Alexander,
>
> > Thanks for your answer!
> >
> >>So again, try loading the image somewhere else in RAM and let U-Boot do
> >>the copying to the correct place.
> >
> > It's not obvious for me how to do it.
> > Might you have any guide or faq?
>
> [...]
>
> >> > ### main_loop: bootcmd="movi read kernel 0 40008000;movi read rootfs 0
>                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^
> >> > 41000000 100000;bootm 40008000 41000000"
>                      ^^^^^^^^^^^^^^
>
> Your bootmcd reads the kernel to 40008000 and then calls bootm to that
> address.  Simple change those two places to, say, 40800000 by editing
> bootcmd.  (Not knowing your system, I presume RAM starts at 4000,0000
> and 4080,0000 then would be 8MiB after the beginning.  U-Boot will copy
> the kernel to 4008000 so the kernel should not be bigger than 7.5MiB but
> the other snippets from your log say the kernel is ~3.2MiB, so this
> should be fine.
>
> Cheers
>   Detlev
>
> --
> The only thing that interferes with my learning is my education.
>                               -- Albert Einstein
> --
> DENX Software Engineering GmbH,      MD: Wolfgang Denk & Detlev Zundel
> HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
> Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: dzu at denx.de
>

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

* [U-Boot] booting os 'Unknown OS' (1) is not supported
  2014-01-17 15:39       ` Alexander Khryukin
@ 2014-01-17 15:42         ` Alexander Khryukin
  2014-01-17 16:17           ` Detlev Zundel
  2014-01-17 16:11         ` Detlev Zundel
  1 sibling, 1 reply; 22+ messages in thread
From: Alexander Khryukin @ 2014-01-17 15:42 UTC (permalink / raw)
  To: u-boot

Also if flashed 3.12_zImage (same kernel, same sources, just zImage)
i see this



reading kernel..device 0 Start 1063, Count 16384
MMC read: dev # 0, block # 1063, count 16384 ... 16384 blocks read: OK
completed
reading RFS..device 0 Count 17447, Start 2048
MMC read: dev # 0, block # 17447, count 2048 ... 2048 blocks read: OK
completed
Boot with zImage
Wrong Ramdisk Image Format

Starting kernel ...


And it's stucked at "Starting kernel ..."


2014/1/17 Alexander Khryukin <alexander@mezon.ru>

> Thanks.
> I changed env to
>
> baudrate=115200
> *bootcmd=movi read kernel 0 40800000;movi read rootfs 0 41000000
> 100000;bootm 40800000 41000000*
> bootdelay=3
> emmcbootrecovery=mmc erase boot 1 0 0;emmc open 1;movi read fwbl1 0
> 40000000;movi write zero fwbl1 1 40000000;movi read bl2 0 40004000;movi
> write zero bl2 1 40004000;movi read u-boot 0 42000000;movi write zero
> u-boot 1 42000000;movi read tzsw 0 42100000;movi write zero tzsw 1
> 42100000;emmc close 1
> ethact=smc911x-0
> ethaddr=00:40:5c:26:0a:5b
> gatewayip=192.168.0.1
> ipaddr=192.168.0.28
> netmask=255.255.255.0
> rootfslen= 100000
> serverip=192.168.0.13
>
>
>
> And now trying to boot
> U-Boot 2012.12-00000-g503cd8d-dirty (Jan 15 2014 - 12:58:49) for YICSYSTEM
> YSE5250-scp
>
>
> CPU: S5PC520 Rev1.0 [Samsung SOC on SMP Platform Base on ARM CortexA15]
> APLL = 800MHz, MPLL = 800MHz
> Board:  YSE5250-scp
> DRAM:  2047 MiB
>
> TrustZone Enabled BSP
> BL1 version: 20130404
> PMIC: S5M8767
>
>
> Checking Boot Mode ... SDMMC
> REVISION: 1.0
> REVISION: 1.0
> MMC Device 0: 3839 MB
> NAME: S5P_MSHC0
> MMC Device 1: 7348 MB
> MMC Device 2 not found
> Net:   smc911x-0
>
> Hit any key to stop autoboot:  0
> reading kernel..device 0 Start 1063, Count 16384
> MMC read: dev # 0, block # 1063, count 16384 ... 16384 blocks read: OK
> completed
> reading RFS..device 0 Count 17447, Start 2048
> MMC read: dev # 0, block # 17447, count 2048 ... 2048 blocks read: OK
> completed
> ## Booting kernel from Legacy Image at 40800000 ...
>    Image Name:   Linux-3.13.0-rc8
>
>    Image Type:   ARM Linux Kernel Image (uncompressed)
>    Data Size:    4754992 Bytes = 4643 KiB
>
>    Load Address: 40008000
>    Entry Point:  40008000
>    Verifying Checksum ... OK
> Wrong Ramdisk Image Format
>    Loading Kernel Image ... OK
> OK
>
> *ERROR: booting os 'Unknown OS' (1) is not supported*
>
>
> No changes.
> But XIP is gone.
>
>
>
> 2014/1/17 Detlev Zundel <dzu@denx.de>
>
>> Hello Alexander,
>>
>> > Thanks for your answer!
>> >
>> >>So again, try loading the image somewhere else in RAM and let U-Boot do
>> >>the copying to the correct place.
>> >
>> > It's not obvious for me how to do it.
>> > Might you have any guide or faq?
>>
>> [...]
>>
>> >> > ### main_loop: bootcmd="movi read kernel 0 40008000;movi read rootfs
>> 0
>>                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^
>> >> > 41000000 100000;bootm 40008000 41000000"
>>                      ^^^^^^^^^^^^^^
>>
>> Your bootmcd reads the kernel to 40008000 and then calls bootm to that
>> address.  Simple change those two places to, say, 40800000 by editing
>> bootcmd.  (Not knowing your system, I presume RAM starts at 4000,0000
>> and 4080,0000 then would be 8MiB after the beginning.  U-Boot will copy
>> the kernel to 4008000 so the kernel should not be bigger than 7.5MiB but
>> the other snippets from your log say the kernel is ~3.2MiB, so this
>> should be fine.
>>
>> Cheers
>>   Detlev
>>
>> --
>> The only thing that interferes with my learning is my education.
>>                               -- Albert Einstein
>> --
>> DENX Software Engineering GmbH,      MD: Wolfgang Denk & Detlev Zundel
>> HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
>> Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: dzu at denx.de
>>
>
>

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

* [U-Boot] booting os 'Unknown OS' (1) is not supported
  2014-01-17 15:39       ` Alexander Khryukin
  2014-01-17 15:42         ` Alexander Khryukin
@ 2014-01-17 16:11         ` Detlev Zundel
  2014-01-17 16:17           ` Alexander Khryukin
  1 sibling, 1 reply; 22+ messages in thread
From: Detlev Zundel @ 2014-01-17 16:11 UTC (permalink / raw)
  To: u-boot

Hi Alexander,

[...]

> *ERROR: booting os 'Unknown OS' (1) is not supported*

Hm, very strange.  Looking up the code, the '1' is the image type
contained in the uImage header.  It is defined to be OpenBSD in
include/image.h and if your U-Boot doesn't have support for that, you
will get that message.  This however doesn't make sense to have an
uImage with this type.

Can you do an 'mkimage -l <image>' on your development host to check the
contents of the header?  If this looks good, then somehow the image
seems to be overwritten before trying to boot, but I don't see where.

Cheers
  Detlev

-- 
I object to doing things that computers can do.   -- Olin Shivers
--
DENX Software Engineering GmbH,      MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: dzu at denx.de

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

* [U-Boot] booting os 'Unknown OS' (1) is not supported
  2014-01-17 15:42         ` Alexander Khryukin
@ 2014-01-17 16:17           ` Detlev Zundel
  2014-01-17 16:35             ` Alexander Khryukin
  0 siblings, 1 reply; 22+ messages in thread
From: Detlev Zundel @ 2014-01-17 16:17 UTC (permalink / raw)
  To: u-boot

Hi Alexander,

> Also if flashed 3.12_zImage (same kernel, same sources, just zImage)

Ok, zImage doesn't have the uImage header, so we will not see any
information nor will U-Boot be able to verify a checksum there.

> reading kernel..device 0 Start 1063, Count 16384
> MMC read: dev # 0, block # 1063, count 16384 ... 16384 blocks read: OK
> completed
> reading RFS..device 0 Count 17447, Start 2048
> MMC read: dev # 0, block # 17447, count 2048 ... 2048 blocks read: OK
> completed
> Boot with zImage
> Wrong Ramdisk Image Format

Note that you also have a problem with your ramdisk, even if the kernel
starts, it will likely not do much if it needs the ramdisk.

> Starting kernel ...
>
>
> And it's stucked at "Starting kernel ..."

Let's say "we don't see anything after Starting kernel ....".  This is
also a common case when the kernel cannot open an initial console.  It
may well be that the kernel runs but without a console you will see
nothing.  To diagnose this you'd need to be sure that "bootargs" is
setup properly before booting the kernel.

Let's step back a bit.  Do you have a kernel and ramdisk and kernel
command line that works on your board?  I.e. do we have a "working case"
that we can retreat to for further tests?  Also is U-Boot and the kernel
mainline?

Cheers
  Detlev

-- 
The management question  ...  is not  _whether_  to build a pilot system
and throw it away.  You _will_ do that.  The only question is whether to
plan  in advance  to build  a throwaway,  or  to promise  to deliver the
throwaway to customers.          - Fred Brooks, "The Mythical Man Month"
--
DENX Software Engineering GmbH,      MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: dzu at denx.de

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

* [U-Boot] booting os 'Unknown OS' (1) is not supported
  2014-01-17 16:11         ` Detlev Zundel
@ 2014-01-17 16:17           ` Alexander Khryukin
  2014-01-17 16:19             ` Alexander Khryukin
  0 siblings, 1 reply; 22+ messages in thread
From: Alexander Khryukin @ 2014-01-17 16:17 UTC (permalink / raw)
  To: u-boot

>Can you do an 'mkimage -l <image>


[fedya at discordy linux-linaro-tracking]$ mkimage -l arch/arm/boot/uImage
Image Name:   Linux-3.13.0-rc8
Created:      Fri Jan 17 15:47:36 2014
Image Type:   ARM Linux Kernel Image (uncompressed)
Data Size:    4737032 Bytes = 4626.01 kB = 4.52 MB
Load Address: 40008000
Entry Point:  40008000

source code: https://github.com/fedya/u-boot-yse5250



2014/1/17 Detlev Zundel <dzu@denx.de>

> Hi Alexander,
>
> [...]
>
> > *ERROR: booting os 'Unknown OS' (1) is not supported*
>
> Hm, very strange.  Looking up the code, the '1' is the image type
> contained in the uImage header.  It is defined to be OpenBSD in
> include/image.h and if your U-Boot doesn't have support for that, you
> will get that message.  This however doesn't make sense to have an
> uImage with this type.
>
> Can you do an 'mkimage -l <image>' on your development host to check the
> contents of the header?  If this looks good, then somehow the image
> seems to be overwritten before trying to boot, but I don't see where.
>
> Cheers
>   Detlev
>
> --
> I object to doing things that computers can do.   -- Olin Shivers
> --
> DENX Software Engineering GmbH,      MD: Wolfgang Denk & Detlev Zundel
> HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
> Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: dzu at denx.de
>

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

* [U-Boot] booting os 'Unknown OS' (1) is not supported
  2014-01-17 16:17           ` Alexander Khryukin
@ 2014-01-17 16:19             ` Alexander Khryukin
  2014-01-17 16:42               ` Detlev Zundel
  0 siblings, 1 reply; 22+ messages in thread
From: Alexander Khryukin @ 2014-01-17 16:19 UTC (permalink / raw)
  To: u-boot

Might i need a special arguments for mkimage
to set up OS in headers of uImage?


2014/1/17 Alexander Khryukin <alexander@mezon.ru>

> >Can you do an 'mkimage -l <image>
>
>
> [fedya at discordy linux-linaro-tracking]$ mkimage -l arch/arm/boot/uImage
> Image Name:   Linux-3.13.0-rc8
> Created:      Fri Jan 17 15:47:36 2014
>
> Image Type:   ARM Linux Kernel Image (uncompressed)
> Data Size:    4737032 Bytes = 4626.01 kB = 4.52 MB
>
> Load Address: 40008000
> Entry Point:  40008000
>
> source code: https://github.com/fedya/u-boot-yse5250
>
>
>
> 2014/1/17 Detlev Zundel <dzu@denx.de>
>
>> Hi Alexander,
>>
>> [...]
>>
>> > *ERROR: booting os 'Unknown OS' (1) is not supported*
>>
>> Hm, very strange.  Looking up the code, the '1' is the image type
>> contained in the uImage header.  It is defined to be OpenBSD in
>> include/image.h and if your U-Boot doesn't have support for that, you
>> will get that message.  This however doesn't make sense to have an
>> uImage with this type.
>>
>> Can you do an 'mkimage -l <image>' on your development host to check the
>> contents of the header?  If this looks good, then somehow the image
>> seems to be overwritten before trying to boot, but I don't see where.
>>
>> Cheers
>>   Detlev
>>
>> --
>> I object to doing things that computers can do.   -- Olin Shivers
>> --
>> DENX Software Engineering GmbH,      MD: Wolfgang Denk & Detlev Zundel
>> HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
>> Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: dzu at denx.de
>>
>
>

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

* [U-Boot] booting os 'Unknown OS' (1) is not supported
  2014-01-17 16:17           ` Detlev Zundel
@ 2014-01-17 16:35             ` Alexander Khryukin
  2014-01-17 17:35               ` Detlev Zundel
  0 siblings, 1 reply; 22+ messages in thread
From: Alexander Khryukin @ 2014-01-17 16:35 UTC (permalink / raw)
  To: u-boot

> Do you have a kernel and ramdisk and kernel
> command line that works on your board?

Yes, i have a working 3.0. kernel and ramdisk.img
it is an android image.

Linux version 3.0.15 (root at yicsystem) (gcc version 4.4.3 (GCC) ) #1 SMP
PREEMPT Thu Apr 25 14:28:59 KST 2013

> kernel command line

# cat /proc/cmdline
console=ttySAC1,115200n8 vmalloc=512M androidboot.console=ttySAC1

i built a kernel with same string.

> Also is U-Boot and the kernel
> mainline?
u-boot based on U-Boot 2012.12-00000-g462762b-dirty with yse5250 platform
changes


And i tried a mainline u-boot and it's does not working.
Just an empty screen on terminal window.


2014/1/17 Detlev Zundel <dzu@denx.de>

> Hi Alexander,
>
> > Also if flashed 3.12_zImage (same kernel, same sources, just zImage)
>
> Ok, zImage doesn't have the uImage header, so we will not see any
> information nor will U-Boot be able to verify a checksum there.
>
> > reading kernel..device 0 Start 1063, Count 16384
> > MMC read: dev # 0, block # 1063, count 16384 ... 16384 blocks read: OK
> > completed
> > reading RFS..device 0 Count 17447, Start 2048
> > MMC read: dev # 0, block # 17447, count 2048 ... 2048 blocks read: OK
> > completed
> > Boot with zImage
> > Wrong Ramdisk Image Format
>
> Note that you also have a problem with your ramdisk, even if the kernel
> starts, it will likely not do much if it needs the ramdisk.
>
> > Starting kernel ...
> >
> >
> > And it's stucked at "Starting kernel ..."
>
> Let's say "we don't see anything after Starting kernel ....".  This is
> also a common case when the kernel cannot open an initial console.  It
> may well be that the kernel runs but without a console you will see
> nothing.  To diagnose this you'd need to be sure that "bootargs" is
> setup properly before booting the kernel.
>
> Let's step back a bit.  Do you have a kernel and ramdisk and kernel
> command line that works on your board?  I.e. do we have a "working case"
> that we can retreat to for further tests?  Also is U-Boot and the kernel
> mainline?
>
> Cheers
>   Detlev
>
> --
> The management question  ...  is not  _whether_  to build a pilot system
> and throw it away.  You _will_ do that.  The only question is whether to
> plan  in advance  to build  a throwaway,  or  to promise  to deliver the
> throwaway to customers.          - Fred Brooks, "The Mythical Man Month"
> --
> DENX Software Engineering GmbH,      MD: Wolfgang Denk & Detlev Zundel
> HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
> Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: dzu at denx.de
>

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

* [U-Boot] booting os 'Unknown OS' (1) is not supported
  2014-01-17 16:19             ` Alexander Khryukin
@ 2014-01-17 16:42               ` Detlev Zundel
  2014-01-17 16:57                 ` Alexander Khryukin
  0 siblings, 1 reply; 22+ messages in thread
From: Detlev Zundel @ 2014-01-17 16:42 UTC (permalink / raw)
  To: u-boot

Hi Alexander,

> Might i need a special arguments for mkimage
> to set up OS in headers of uImage?

One needs parameters for that, but the information looks ok:

[...]

>> [fedya at discordy linux-linaro-tracking]$ mkimage -l arch/arm/boot/uImage
>> Image Name:   Linux-3.13.0-rc8
>> Created:      Fri Jan 17 15:47:36 2014
>>
>> Image Type:   ARM Linux Kernel Image (uncompressed)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

If you check common/image.c:261 (image_print_type), you'll see that this
is correctly decoded from the image, so the image seems perfectly fine.
It just makes no sense that U-Boot then complains about an unknown OS.
This means that between the time the header is printed and between the
time the code wants to boot it, the memory does not contain what it
should anymore.

Cheers
  Detlev

-- 
ike|abel - Eine Partnerschaft erweist sich als ikeabel, wenn ein samst?glicher
Besuch bei Ikea  weder zur sofortigen Trennung noch zu tagelangen Diskussionen
f?hrt.  In einigen urbanen Subkulturen hat der gemeinsame Ikea-Besuch die Ver-
lobung vollst?ndig ersetzt.            -- "Wortschatz" v. Sascha Lobo
--
DENX Software Engineering GmbH,      MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: dzu at denx.de

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

* [U-Boot] booting os 'Unknown OS' (1) is not supported
  2014-01-17 16:42               ` Detlev Zundel
@ 2014-01-17 16:57                 ` Alexander Khryukin
  2014-01-17 17:39                   ` Detlev Zundel
  0 siblings, 1 reply; 22+ messages in thread
From: Alexander Khryukin @ 2014-01-17 16:57 UTC (permalink / raw)
  To: u-boot

You have any suggestion how i can fix or hack it?
I really have no clue what's wrong and why it's working with android kernel
and not with mainline.


2014/1/17 Detlev Zundel <dzu@denx.de>

> Hi Alexander,
>
> > Might i need a special arguments for mkimage
> > to set up OS in headers of uImage?
>
> One needs parameters for that, but the information looks ok:
>
> [...]
>
> >> [fedya at discordy linux-linaro-tracking]$ mkimage -l arch/arm/boot/uImage
> >> Image Name:   Linux-3.13.0-rc8
> >> Created:      Fri Jan 17 15:47:36 2014
> >>
> >> Image Type:   ARM Linux Kernel Image (uncompressed)
>                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>
> If you check common/image.c:261 (image_print_type), you'll see that this
> is correctly decoded from the image, so the image seems perfectly fine.
> It just makes no sense that U-Boot then complains about an unknown OS.
> This means that between the time the header is printed and between the
> time the code wants to boot it, the memory does not contain what it
> should anymore.
>
> Cheers
>   Detlev
>
> --
> ike|abel - Eine Partnerschaft erweist sich als ikeabel, wenn ein
> samst?glicher
> Besuch bei Ikea  weder zur sofortigen Trennung noch zu tagelangen
> Diskussionen
> f?hrt.  In einigen urbanen Subkulturen hat der gemeinsame Ikea-Besuch die
> Ver-
> lobung vollst?ndig ersetzt.            -- "Wortschatz" v. Sascha Lobo
> --
> DENX Software Engineering GmbH,      MD: Wolfgang Denk & Detlev Zundel
> HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
> Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: dzu at denx.de
>

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

* [U-Boot] booting os 'Unknown OS' (1) is not supported
  2014-01-17 16:35             ` Alexander Khryukin
@ 2014-01-17 17:35               ` Detlev Zundel
  0 siblings, 0 replies; 22+ messages in thread
From: Detlev Zundel @ 2014-01-17 17:35 UTC (permalink / raw)
  To: u-boot

Hi Alexander,

>> Do you have a kernel and ramdisk and kernel
>> command line that works on your board?
>
> Yes, i have a working 3.0. kernel and ramdisk.img
> it is an android image.
>
> Linux version 3.0.15 (root at yicsystem) (gcc version 4.4.3 (GCC) ) #1 SMP
> PREEMPT Thu Apr 25 14:28:59 KST 2013
>
>> kernel command line
>
> # cat /proc/cmdline
> console=ttySAC1,115200n8 vmalloc=512M androidboot.console=ttySAC1
>
> i built a kernel with same string.

Ok, good.

>> Also is U-Boot and the kernel
>> mainline?
> u-boot based on U-Boot 2012.12-00000-g462762b-dirty with yse5250 platform
> changes
>
>
> And i tried a mainline u-boot and it's does not working.
> Just an empty screen on terminal window.

This is of course unfortunate as we are then not able to _really_ infer
what is going on on your board.  Potentially, there can be a lot of
changes in such modified versions.

Cheers
  Detlev

-- 
#!/usr/bin/perl
$c="print\"\#\!\/usr\/bin\/perl\
\\\$c\=\\\"\"\.quotemeta\(\$c\)\.\"\\\"\;\\n\$c;\"";
print"#!/usr/bin/perl\n\$c=\"".quotemeta($c)."\";\n$c;";
--
DENX Software Engineering GmbH,      MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: dzu at denx.de

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

* [U-Boot] booting os 'Unknown OS' (1) is not supported
  2014-01-17 16:57                 ` Alexander Khryukin
@ 2014-01-17 17:39                   ` Detlev Zundel
  2014-01-20  9:32                     ` Alexander Khryukin
  0 siblings, 1 reply; 22+ messages in thread
From: Detlev Zundel @ 2014-01-17 17:39 UTC (permalink / raw)
  To: u-boot

Hi Alexander,

> You have any suggestion how i can fix or hack it?
> I really have no clue what's wrong and why it's working with android kernel
> and not with mainline.

Well, potentially, there can be worlds of differences between such
kernels.  I don't know your platform at all, but is it expected to work
with a mainline kernel?

The only thing that I can think of to get more information is to edit
your bootcmd to only boot the kernel without any ramdisk and see if the
loading of the latter is the problem, i.e. something like that:

bootcmd=movi read kernel 0 40800000;bootm 40800000

Even though this cannot fully work, it may give us new input.

Cheers
  Detlev

-- 
;; Self-replicator in ELisp
((lambda (l) (prin1-to-string (list l (list (quote quote) l))))
 (quote (lambda (l) (prin1-to-string (list l (list (quote quote) l))))))
--
DENX Software Engineering GmbH,      MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: dzu at denx.de

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

* [U-Boot] booting os 'Unknown OS' (1) is not supported
  2014-01-17 17:39                   ` Detlev Zundel
@ 2014-01-20  9:32                     ` Alexander Khryukin
  2014-01-20 10:06                       ` Wolfgang Denk
  0 siblings, 1 reply; 22+ messages in thread
From: Alexander Khryukin @ 2014-01-20  9:32 UTC (permalink / raw)
  To: u-boot

Good day!
I'm here again with short report.

As you said i changed my bootcmd to
*bootcmd=movi read kernel 0 40800000;bootm 4080000*
with default bootargs options
bootargs=console=ttySAC1,115200n8 vmalloc=512M androidboot.console=ttySAC

And i see same result

[YSE5250 at omv]# boot
reading kernel..device 0 Start 1063, Count 16384
MMC read: dev # 0, block # 1063, count 16384 ... 16384 blocks read: OK
completed
## Current stack ends at 0xc3cfbcc8 *  kernel: cmdline image address =
0x40800000
## Booting kernel from Legacy Image at 40800000 ...
   Image Name:   Linux-3.13.0-rc8
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    4737032 Bytes = 4626 KiB
   Load Address: 40008000
   Entry Point:  40008000
   Verifying Checksum ... OK
   kernel data at 0x40800040, len = 0x00484808 (4737032)
## No init Ramdisk
   ramdisk start = 0x00000000, ramdisk end = 0x00000000
   Loading Kernel Image ... OK
OK
   kernel loaded at 0x40008000, end = 0x4048c808
ERROR: booting os 'Unknown OS' (1) is not supported







2014/1/17 Detlev Zundel <dzu@denx.de>

> Hi Alexander,
>
> > You have any suggestion how i can fix or hack it?
> > I really have no clue what's wrong and why it's working with android
> kernel
> > and not with mainline.
>
> Well, potentially, there can be worlds of differences between such
> kernels.  I don't know your platform at all, but is it expected to work
> with a mainline kernel?
>
> The only thing that I can think of to get more information is to edit
> your bootcmd to only boot the kernel without any ramdisk and see if the
> loading of the latter is the problem, i.e. something like that:
>
> bootcmd=movi read kernel 0 40800000;bootm 40800000
>
> Even though this cannot fully work, it may give us new input.
>
> Cheers
>   Detlev
>
> --
> ;; Self-replicator in ELisp
> ((lambda (l) (prin1-to-string (list l (list (quote quote) l))))
>  (quote (lambda (l) (prin1-to-string (list l (list (quote quote) l))))))
> --
> DENX Software Engineering GmbH,      MD: Wolfgang Denk & Detlev Zundel
> HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
> Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: dzu at denx.de
>

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

* [U-Boot] booting os 'Unknown OS' (1) is not supported
  2014-01-20  9:32                     ` Alexander Khryukin
@ 2014-01-20 10:06                       ` Wolfgang Denk
  2014-01-20 10:33                         ` Alexander Khryukin
  0 siblings, 1 reply; 22+ messages in thread
From: Wolfgang Denk @ 2014-01-20 10:06 UTC (permalink / raw)
  To: u-boot

Dear Alexander Khryukin,

In message <CABtOAfz3e-Ee3V73tH6U4bjsqixU6SY3h1TdNG2fx-PhDf0sjg@mail.gmail.com> you wrote:
>
> As you said i changed my bootcmd to
> *bootcmd=movi read kernel 0 40800000;bootm 4080000*

I really wonder which sort of U-Boot you are running.  "movi" is not a
command present in mainline, not in any vendor port I am aware of.
What exactly is this command supposed to do?

Please change the boot command and include the commands

	md 4080000 10;imi 4080000

before the "bootm" part.

	

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Hacking's just another word for nothing left to kludge.

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

* [U-Boot] booting os 'Unknown OS' (1) is not supported
  2014-01-20 10:06                       ` Wolfgang Denk
@ 2014-01-20 10:33                         ` Alexander Khryukin
  2014-01-20 11:23                           ` Detlev Zundel
  2014-01-20 19:34                           ` Wolfgang Denk
  0 siblings, 2 replies; 22+ messages in thread
From: Alexander Khryukin @ 2014-01-20 10:33 UTC (permalink / raw)
  To: u-boot

link to my u-boot https://github.com/fedya/u-boot-yse5250

>Please change the boot command and include the commands

Changed to this
bootcmd=md 40800000 10;imi 40800000;bootm 40800000

[YSE5250 at omv]# boot
40800000: 56190527 ba6b0d61 9850d952 08484800    '..Va.k.R.P..HH.
40800010: 00800040 00800040 8a221c4c 00020205    @... at ...L.".....
40800020: 756e694c 2e332d78 302e3331 3863722d    Linux-3.13.0-rc8
40800030: 00000000 00000000 00000000 00000000    ................

## Checking Image at 40800000 ...
   Legacy image found
   Image Name:   Linux-3.13.0-rc8
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    4737032 Bytes = 4626 KiB
   Load Address: 40008000
   Entry Point:  40008000
   Verifying Checksum ... OK
## Current stack ends at 0xc3cfbcc8 *  kernel: cmdline image address =
0x40800000
## Booting kernel from Legacy Image at 40800000 ...
   Image Name:   Linux-3.13.0-rc8
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    4737032 Bytes = 4626 KiB
   Load Address: 40008000
   Entry Point:  40008000
   Verifying Checksum ... OK
   kernel data at 0x40800040, len = 0x00484808 (4737032)
## No init Ramdisk
   ramdisk start = 0x00000000, ramdisk end = 0x00000000
   Loading Kernel Image ... OK
OK
   kernel loaded at 0x40008000, end = 0x4048c808
ERROR: booting os 'Unknown OS' (1) is not supported




>movi
string from help

movi    - movi  - sd/mmc r/w sub system for SMDK board

and same command for o-droid
http://lists.denx.de/pipermail/u-boot/2013-February/146047.html




2014/1/20 Wolfgang Denk <wd@denx.de>

> Dear Alexander Khryukin,
>
> In message <
> CABtOAfz3e-Ee3V73tH6U4bjsqixU6SY3h1TdNG2fx-PhDf0sjg at mail.gmail.com> you
> wrote:
> >
> > As you said i changed my bootcmd to
> > *bootcmd=movi read kernel 0 40800000;bootm 4080000*
>
> I really wonder which sort of U-Boot you are running.  "movi" is not a
> command present in mainline, not in any vendor port I am aware of.
> What exactly is this command supposed to do?
>
> Please change the boot command and include the commands
>
>         md 4080000 10;imi 4080000
>
> before the "bootm" part.
>
>
>
> Best regards,
>
> Wolfgang Denk
>
> --
> DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
> HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
> Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
> Hacking's just another word for nothing left to kludge.
>

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

* [U-Boot] booting os 'Unknown OS' (1) is not supported
  2014-01-20 10:33                         ` Alexander Khryukin
@ 2014-01-20 11:23                           ` Detlev Zundel
  2014-01-20 12:08                             ` Alexander Khryukin
  2014-01-20 19:34                           ` Wolfgang Denk
  1 sibling, 1 reply; 22+ messages in thread
From: Detlev Zundel @ 2014-01-20 11:23 UTC (permalink / raw)
  To: u-boot

Hi Alexander,

> link to my u-boot https://github.com/fedya/u-boot-yse5250
>
>>Please change the boot command and include the commands
>
> Changed to this
> bootcmd=md 40800000 10;imi 40800000;bootm 40800000
>
> [YSE5250 at omv]# boot
> 40800000: 56190527 ba6b0d61 9850d952 08484800    '..Va.k.R.P..HH.
> 40800010: 00800040 00800040 8a221c4c 00020205    @... at ...L.".....
> 40800020: 756e694c 2e332d78 302e3331 3863722d    Linux-3.13.0-rc8
> 40800030: 00000000 00000000 00000000 00000000    ................
>
> ## Checking Image at 40800000 ...
>    Legacy image found
>    Image Name:   Linux-3.13.0-rc8
>    Image Type:   ARM Linux Kernel Image (uncompressed)
>    Data Size:    4737032 Bytes = 4626 KiB
>    Load Address: 40008000
>    Entry Point:  40008000
>    Verifying Checksum ... OK
> ## Current stack ends at 0xc3cfbcc8 *  kernel: cmdline image address =
> 0x40800000
> ## Booting kernel from Legacy Image at 40800000 ...
>    Image Name:   Linux-3.13.0-rc8
>    Image Type:   ARM Linux Kernel Image (uncompressed)
>    Data Size:    4737032 Bytes = 4626 KiB
>    Load Address: 40008000
>    Entry Point:  40008000
>    Verifying Checksum ... OK
>    kernel data at 0x40800040, len = 0x00484808 (4737032)
> ## No init Ramdisk
>    ramdisk start = 0x00000000, ramdisk end = 0x00000000
>    Loading Kernel Image ... OK
> OK
>    kernel loaded at 0x40008000, end = 0x4048c808
> ERROR: booting os 'Unknown OS' (1) is not supported

This is really weird and I am pretty sure that this is not supposed to
happen with the code that we have in mainline.  I think you have two
options here:

1. Get mainline U-Boot running on your board that works with the uImage
   that os created from mainline Linux

2. Debug your U-Boot version why it does not handle the uImage like it
   is supposed to.

Option 1 will be the more rewarding alternative of course.

Best wishes
  Detlev

-- 
insults:  If set, sudo will insult users when they enter an incorrect
password.  This flag is off by default.
                                                       -- man sudoers
--
DENX Software Engineering GmbH,      MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: dzu at denx.de

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

* [U-Boot] booting os 'Unknown OS' (1) is not supported
  2014-01-20 11:23                           ` Detlev Zundel
@ 2014-01-20 12:08                             ` Alexander Khryukin
  2014-01-20 12:35                               ` Andreas Bießmann
  0 siblings, 1 reply; 22+ messages in thread
From: Alexander Khryukin @ 2014-01-20 12:08 UTC (permalink / raw)
  To: u-boot

methinks that the problem in kernel.
I can boot "original" android kernel from any place: emmc, SD, fat
partition, USB-device, etc.



2014/1/20 Detlev Zundel <dzu@denx.de>

> Hi Alexander,
>
> > link to my u-boot https://github.com/fedya/u-boot-yse5250
> >
> >>Please change the boot command and include the commands
> >
> > Changed to this
> > bootcmd=md 40800000 10;imi 40800000;bootm 40800000
> >
> > [YSE5250 at omv]# boot
> > 40800000: 56190527 ba6b0d61 9850d952 08484800    '..Va.k.R.P..HH.
> > 40800010: 00800040 00800040 8a221c4c 00020205    @... at ...L.".....
> > 40800020: 756e694c 2e332d78 302e3331 3863722d    Linux-3.13.0-rc8
> > 40800030: 00000000 00000000 00000000 00000000    ................
> >
> > ## Checking Image at 40800000 ...
> >    Legacy image found
> >    Image Name:   Linux-3.13.0-rc8
> >    Image Type:   ARM Linux Kernel Image (uncompressed)
> >    Data Size:    4737032 Bytes = 4626 KiB
> >    Load Address: 40008000
> >    Entry Point:  40008000
> >    Verifying Checksum ... OK
> > ## Current stack ends at 0xc3cfbcc8 *  kernel: cmdline image address =
> > 0x40800000
> > ## Booting kernel from Legacy Image at 40800000 ...
> >    Image Name:   Linux-3.13.0-rc8
> >    Image Type:   ARM Linux Kernel Image (uncompressed)
> >    Data Size:    4737032 Bytes = 4626 KiB
> >    Load Address: 40008000
> >    Entry Point:  40008000
> >    Verifying Checksum ... OK
> >    kernel data at 0x40800040, len = 0x00484808 (4737032)
> > ## No init Ramdisk
> >    ramdisk start = 0x00000000, ramdisk end = 0x00000000
> >    Loading Kernel Image ... OK
> > OK
> >    kernel loaded at 0x40008000, end = 0x4048c808
> > ERROR: booting os 'Unknown OS' (1) is not supported
>
> This is really weird and I am pretty sure that this is not supposed to
> happen with the code that we have in mainline.  I think you have two
> options here:
>
> 1. Get mainline U-Boot running on your board that works with the uImage
>    that os created from mainline Linux
>
> 2. Debug your U-Boot version why it does not handle the uImage like it
>    is supposed to.
>
> Option 1 will be the more rewarding alternative of course.
>
> Best wishes
>   Detlev
>
> --
> insults:  If set, sudo will insult users when they enter an incorrect
> password.  This flag is off by default.
>                                                        -- man sudoers
> --
> DENX Software Engineering GmbH,      MD: Wolfgang Denk & Detlev Zundel
> HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
> Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: dzu at denx.de
>

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

* [U-Boot] booting os 'Unknown OS' (1) is not supported
  2014-01-20 12:08                             ` Alexander Khryukin
@ 2014-01-20 12:35                               ` Andreas Bießmann
  0 siblings, 0 replies; 22+ messages in thread
From: Andreas Bießmann @ 2014-01-20 12:35 UTC (permalink / raw)
  To: u-boot

Dear Alexander Khryukin,

On 01/20/2014 01:08 PM, Alexander Khryukin wrote:
> methinks that the problem in kernel.
> I can boot "original" android kernel from any place: emmc, SD, fat
> partition, USB-device, etc.

well, maybe has your special u-boot special handling for your special
android kernel? Therefore would be the problem your special u-boot
variant (as pointed out before).

Best regards

Andreas Bie?mann

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

* [U-Boot] booting os 'Unknown OS' (1) is not supported
  2014-01-20 10:33                         ` Alexander Khryukin
  2014-01-20 11:23                           ` Detlev Zundel
@ 2014-01-20 19:34                           ` Wolfgang Denk
  1 sibling, 0 replies; 22+ messages in thread
From: Wolfgang Denk @ 2014-01-20 19:34 UTC (permalink / raw)
  To: u-boot

Dear Alexander,

In message <CABtOAfzG3B-eis0nDOiYtdq2rig_wP6SF2_jz=NLWw7Gp+PE2A@mail.gmail.com> you wrote:
>
> link to my u-boot https://github.com/fedya/u-boot-yse5250

Sorry, but I do not really care about out of tree code.

> Changed to this
> bootcmd=md 40800000 10;imi 40800000;bootm 40800000

OK, lets's go through this step by step.

Note that
> [YSE5250 at omv]# boot
> 40800000: 56190527 ba6b0d61 9850d952 08484800    '..Va.k.R.P..HH.
> 40800010: 00800040 00800040 8a221c4c 00020205    @... at ...L.".....
> 40800020: 756e694c 2e332d78 302e3331 3863722d    Linux-3.13.0-rc8
> 40800030: 00000000 00000000 00000000 00000000    ................

The header (struct image_header) is defined in "include/image.h".  we
have:

237 typedef struct image_header {
238         __be32          ih_magic;       /* Image Header Magic Number    */
	56190527 => 0x27051956 OK
239         __be32          ih_hcrc;        /* Image Header CRC Checksum    */
	ba6b0d61
240         __be32          ih_time;        /* Image Creation Timestamp     */
	9850d952 => 0x52d95098 = 1389973656 = Fri Jan 17 16:47:36 2014
241         __be32          ih_size;        /* Image Data Size              */
	08484800 => 0x00484808 = 4737032
242         __be32          ih_load;        /* Data  Load  Address          */
	00800040 = 0x40008000 OK
243         __be32          ih_ep;          /* Entry Point Address          */
	00800040 = 0x40008000 OK
244         __be32          ih_dcrc;        /* Image Data CRC Checksum      */
	8a221c4c
245         uint8_t         ih_os;          /* Operating System             */
	05 = IH_OS_LINUX OK
246         uint8_t         ih_arch;        /* CPU architecture             */
	02 = IH_ARCH_ARM OK
247         uint8_t         ih_type;        /* Image Type                   */
	02 = IH_TYPE_KERNEL OK
248         uint8_t         ih_comp;        /* Compression Type             */
	00 = IH_COMP_NONE OK
249         uint8_t         ih_name[IH_NMLEN];      /* Image Name           */
	Linux-3.13.0-rc8
250 } image_header_t;

This all looks perfectly OK to me.

> ## Checking Image at 40800000 ...
>    Legacy image found
>    Image Name:   Linux-3.13.0-rc8
>    Image Type:   ARM Linux Kernel Image (uncompressed)
>    Data Size:    4737032 Bytes = 4626 KiB
>    Load Address: 40008000
>    Entry Point:  40008000
>    Verifying Checksum ... OK

This is the "iminfo" output. All looks perfectly fine. Note
especially that the image gets correctly decoded as "ARM Linux Kernel
Image (uncompressed)".

> ## Booting kernel from Legacy Image at 40800000 ...
>    Image Name:   Linux-3.13.0-rc8
>    Image Type:   ARM Linux Kernel Image (uncompressed)
>    Data Size:    4737032 Bytes = 4626 KiB
>    Load Address: 40008000
>    Entry Point:  40008000
>    Verifying Checksum ... OK

This is the regular "bootm" image output. So far it looks perfectly
fine.

>    kernel data at 0x40800040, len = 0x00484808 (4737032)
> ## No init Ramdisk
>    ramdisk start = 0x00000000, ramdisk end = 0x00000000
>    Loading Kernel Image ... OK
> OK
>    kernel loaded at 0x40008000, end = 0x4048c808

0x40008000 + 0x00484808 (size) = 0x4048c808 ==> looks perfectly fine,
too, and is far enough away from your load address at 40800000

> ERROR: booting os 'Unknown OS' (1) is not supported

This code comes from "common/cmd_bootm.c":

 691         if (boot_fn == NULL && need_boot_fn) {
 692                 if (iflag)
 693                         enable_interrupts();
 694                 printf("ERROR: booting os '%s' (%d) is not supported\n",
 695                        genimg_get_os_name(images->os.os), images->os.os);
...

images->os.os has the value 1 here, not the expected 5 (IH_OS_LINUX)
we had before.  Somenting must have overwritten the header
information / parts of your RAM.

> >movi
> string from help
> 
> movi    - movi  - sd/mmc r/w sub system for SMDK board
> 
> and same command for o-droid
> http://lists.denx.de/pipermail/u-boot/2013-February/146047.html

I have not the lightest idea why they would invent something new
instead of what is being used in mainline.


I have no idea where your memory gets corrupted, or why, and with
out-of-tree code it's difficult to even guess.  But there is a good
chance that parts of your code base are simply broken.

If I were you, I would run this code under control of GDB (with a
JTAG debugger attached).  Then set a watchpoint on the images.os.os
address and check where it gets corrupted.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
I must follow the people.  Am I not their leader? - Benjamin Disraeli

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

end of thread, other threads:[~2014-01-20 19:34 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-17 10:11 [U-Boot] booting os 'Unknown OS' (1) is not supported Alexander Khryukin
2014-01-17 14:11 ` Detlev Zundel
2014-01-17 14:36   ` Alexander Khryukin
2014-01-17 15:20     ` Detlev Zundel
2014-01-17 15:39       ` Alexander Khryukin
2014-01-17 15:42         ` Alexander Khryukin
2014-01-17 16:17           ` Detlev Zundel
2014-01-17 16:35             ` Alexander Khryukin
2014-01-17 17:35               ` Detlev Zundel
2014-01-17 16:11         ` Detlev Zundel
2014-01-17 16:17           ` Alexander Khryukin
2014-01-17 16:19             ` Alexander Khryukin
2014-01-17 16:42               ` Detlev Zundel
2014-01-17 16:57                 ` Alexander Khryukin
2014-01-17 17:39                   ` Detlev Zundel
2014-01-20  9:32                     ` Alexander Khryukin
2014-01-20 10:06                       ` Wolfgang Denk
2014-01-20 10:33                         ` Alexander Khryukin
2014-01-20 11:23                           ` Detlev Zundel
2014-01-20 12:08                             ` Alexander Khryukin
2014-01-20 12:35                               ` Andreas Bießmann
2014-01-20 19:34                           ` Wolfgang Denk

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.