All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] bav335x support broken
@ 2015-03-14  5:06 Gilles
  2015-03-14 17:55 ` Anish Khurana
  0 siblings, 1 reply; 7+ messages in thread
From: Gilles @ 2015-03-14  5:06 UTC (permalink / raw)
  To: u-boot

Folks,

I posted a patch to add support for bav335x boards (a322aad99de4). The patch was tested against v2015.04-rc1 and worked perfectly but somehow, something was introduced since then which breaks the board support.

There are two main errors I need to fix before posting another patch but need help with the second error. 

The first error is easy. Compilation throws:
#error "Please define NS16550 registers size."
which I can simply fix by defining CONFIG_SYS_NS16550_REG_SIZE in include/configs/bav335x.h
((( Altough I am stil puzzled as to why this was defined as -4 (where?) on v2015.04-rc1 )))

After adding the define, everything compiles up to failing on the final link with:

drivers/serial/built-in.o: In function `get_current':
/home/gilles/bbdev/u-boot/drivers/serial/serial.c:389: undefined reference to `default_serial_console'
drivers/serial/built-in.o: In function `serial_initialize':

Can anyone please explain what changed between 2015.04-rc1 and 2015.04-rc2 which could cause such a behavior? I have spent the last couple hours re-basing a branch to see where it breaks as to maybe get a clue on what changed but no luck so far. Any tips would be appreciated.

Thanks,
Gilles
.

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

* [U-Boot] bav335x support broken
  2015-03-14  5:06 [U-Boot] bav335x support broken Gilles
@ 2015-03-14 17:55 ` Anish Khurana
  2015-03-14 21:47   ` Albert ARIBAUD
  2015-03-16  6:32   ` Gilles
  0 siblings, 2 replies; 7+ messages in thread
From: Anish Khurana @ 2015-03-14 17:55 UTC (permalink / raw)
  To: u-boot

Hi Gilles,

This u-boot version is having lot of changes , they have enabled
Kconfig similar to Kernel and having GUI support ( make menuconfig) .
so if you are gettting error as you mentioned , try to add Device
model configurations  and SYS malloc() as :

Steps 1 make <birdland_bav335x config>
Step 2 make menuconfig
Step 3 Device driver -> Enable driver model, enable Driver model for serial)
Step 4 malloc() pool , General setup --> Enable malloc() pool.

Please try this , I think it will work.

Thanks,
Anish


On Sat, Mar 14, 2015 at 10:36 AM, Gilles <gilles@gigadevices.com> wrote:
> Folks,
>
> I posted a patch to add support for bav335x boards (a322aad99de4). The patch was tested against v2015.04-rc1 and worked perfectly but somehow, something was introduced since then which breaks the board support.
>
> There are two main errors I need to fix before posting another patch but need help with the second error.
>
> The first error is easy. Compilation throws:
> #error "Please define NS16550 registers size."
> which I can simply fix by defining CONFIG_SYS_NS16550_REG_SIZE in include/configs/bav335x.h
> ((( Altough I am stil puzzled as to why this was defined as -4 (where?) on v2015.04-rc1 )))
>
> After adding the define, everything compiles up to failing on the final link with:
>
> drivers/serial/built-in.o: In function `get_current':
> /home/gilles/bbdev/u-boot/drivers/serial/serial.c:389: undefined reference to `default_serial_console'
> drivers/serial/built-in.o: In function `serial_initialize':
>
> Can anyone please explain what changed between 2015.04-rc1 and 2015.04-rc2 which could cause such a behavior? I have spent the last couple hours re-basing a branch to see where it breaks as to maybe get a clue on what changed but no luck so far. Any tips would be appreciated.
>
> Thanks,
> Gilles
> .
>
>
>
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot

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

* [U-Boot] bav335x support broken
  2015-03-14 17:55 ` Anish Khurana
@ 2015-03-14 21:47   ` Albert ARIBAUD
  2015-03-16  6:32   ` Gilles
  1 sibling, 0 replies; 7+ messages in thread
From: Albert ARIBAUD @ 2015-03-14 21:47 UTC (permalink / raw)
  To: u-boot

Hello Anish,

(apologies for any duplicates. My mail server and the U-Boot ML are
playing tricks with my sanity.)

On Sat, 14 Mar 2015 23:25:03 +0530, Anish Khurana
<anish.khurana130181@gmail.com> wrote:
> Hi Gilles,
> 
> This u-boot version is having lot of changes , they have enabled
> Kconfig similar to Kernel and having GUI support ( make menuconfig) .
> so if you are gettting error as you mentioned , try to add Device
> model configurations  and SYS malloc() as :
> 
> Steps 1 make <birdland_bav335x config>
> Step 2 make menuconfig
> Step 3 Device driver -> Enable driver model, enable Driver model for serial)
> Step 4 malloc() pool , General setup --> Enable malloc() pool.
> 
> Please try this , I think it will work.

Thanks Anish for pointing this out. I just saw this in my all-ARM
build. If this fix works, then the defconfig for both birdland_bav335a
and birdland_bav335b should be adjusted so as not to need the manual
menuconfig fix.

> Thanks,
> Anish

Amicalement,
-- 
Albert.

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

* [U-Boot] bav335x support broken
  2015-03-14 17:55 ` Anish Khurana
  2015-03-14 21:47   ` Albert ARIBAUD
@ 2015-03-16  6:32   ` Gilles
  2015-03-16 16:14     ` Anish Khurana
  1 sibling, 1 reply; 7+ messages in thread
From: Gilles @ 2015-03-16  6:32 UTC (permalink / raw)
  To: u-boot

Hi Anish,

Thanks for pointing that out. I ran menuconfig and that fixed the compilation issue however, now I'm getting this error when I try to run it:

spl_load_image_fat_os: error reading image args, err - -1

I guess I'll fool around with menuconfig see if there is something that should be enabled and isn't. (maybe you have a suggestion on this?)

Anyway, I'll post updated defconfigs when I figure it out. Hopefully this is just a config issue.

Thanks,
Gilles
.


> On Mar 14, 2015, at 10:55 , Anish Khurana <anish.khurana130181@gmail.com> wrote:
> 
> Hi Gilles,
> 
> This u-boot version is having lot of changes , they have enabled
> Kconfig similar to Kernel and having GUI support ( make menuconfig) .
> so if you are gettting error as you mentioned , try to add Device
> model configurations  and SYS malloc() as :
> 
> Steps 1 make <birdland_bav335x config>
> Step 2 make menuconfig
> Step 3 Device driver -> Enable driver model, enable Driver model for serial)
> Step 4 malloc() pool , General setup --> Enable malloc() pool.
> 
> Please try this , I think it will work.
> 
> Thanks,
> Anish
> 
> 
> On Sat, Mar 14, 2015 at 10:36 AM, Gilles <gilles@gigadevices.com> wrote:
>> Folks,
>> 
>> I posted a patch to add support for bav335x boards (a322aad99de4). The patch was tested against v2015.04-rc1 and worked perfectly but somehow, something was introduced since then which breaks the board support.
>> 
>> There are two main errors I need to fix before posting another patch but need help with the second error.
>> 
>> The first error is easy. Compilation throws:
>> #error "Please define NS16550 registers size."
>> which I can simply fix by defining CONFIG_SYS_NS16550_REG_SIZE in include/configs/bav335x.h
>> ((( Altough I am stil puzzled as to why this was defined as -4 (where?) on v2015.04-rc1 )))
>> 
>> After adding the define, everything compiles up to failing on the final link with:
>> 
>> drivers/serial/built-in.o: In function `get_current':
>> /home/gilles/bbdev/u-boot/drivers/serial/serial.c:389: undefined reference to `default_serial_console'
>> drivers/serial/built-in.o: In function `serial_initialize':
>> 
>> Can anyone please explain what changed between 2015.04-rc1 and 2015.04-rc2 which could cause such a behavior? I have spent the last couple hours re-basing a branch to see where it breaks as to maybe get a clue on what changed but no luck so far. Any tips would be appreciated.
>> 
>> Thanks,
>> Gilles
>> .
>> 
>> 
>> 
>> _______________________________________________
>> U-Boot mailing list
>> U-Boot at lists.denx.de
>> http://lists.denx.de/mailman/listinfo/u-boot

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

* [U-Boot] bav335x support broken
  2015-03-16  6:32   ` Gilles
@ 2015-03-16 16:14     ` Anish Khurana
  2015-03-17  8:09       ` Gilles
  0 siblings, 1 reply; 7+ messages in thread
From: Anish Khurana @ 2015-03-16 16:14 UTC (permalink / raw)
  To: u-boot

Hi Giles,

I was browsing the code and it seems it is failing in spl_fat.c file
in function spl_load_image_fat_os() and internally calls
do_fat_read_at() function. Also I noticed that configuration is very
near to am335x( ti sitara) architecture, so probably can try some more
configure similar to am335x .

Thanks,
Anish


On Mon, Mar 16, 2015 at 12:02 PM, Gilles <gilles@gigadevices.com> wrote:
> Hi Anish,
>
> Thanks for pointing that out. I ran menuconfig and that fixed the compilation issue however, now I'm getting this error when I try to run it:
>
> spl_load_image_fat_os: error reading image args, err - -1
>
> I guess I'll fool around with menuconfig see if there is something that should be enabled and isn't. (maybe you have a suggestion on this?)
>
> Anyway, I'll post updated defconfigs when I figure it out. Hopefully this is just a config issue.
>
> Thanks,
> Gilles
> .
>
>
>> On Mar 14, 2015, at 10:55 , Anish Khurana <anish.khurana130181@gmail.com> wrote:
>>
>> Hi Gilles,
>>
>> This u-boot version is having lot of changes , they have enabled
>> Kconfig similar to Kernel and having GUI support ( make menuconfig) .
>> so if you are gettting error as you mentioned , try to add Device
>> model configurations  and SYS malloc() as :
>>
>> Steps 1 make <birdland_bav335x config>
>> Step 2 make menuconfig
>> Step 3 Device driver -> Enable driver model, enable Driver model for serial)
>> Step 4 malloc() pool , General setup --> Enable malloc() pool.
>>
>> Please try this , I think it will work.
>>
>> Thanks,
>> Anish
>>
>>
>> On Sat, Mar 14, 2015 at 10:36 AM, Gilles <gilles@gigadevices.com> wrote:
>>> Folks,
>>>
>>> I posted a patch to add support for bav335x boards (a322aad99de4). The patch was tested against v2015.04-rc1 and worked perfectly but somehow, something was introduced since then which breaks the board support.
>>>
>>> There are two main errors I need to fix before posting another patch but need help with the second error.
>>>
>>> The first error is easy. Compilation throws:
>>> #error "Please define NS16550 registers size."
>>> which I can simply fix by defining CONFIG_SYS_NS16550_REG_SIZE in include/configs/bav335x.h
>>> ((( Altough I am stil puzzled as to why this was defined as -4 (where?) on v2015.04-rc1 )))
>>>
>>> After adding the define, everything compiles up to failing on the final link with:
>>>
>>> drivers/serial/built-in.o: In function `get_current':
>>> /home/gilles/bbdev/u-boot/drivers/serial/serial.c:389: undefined reference to `default_serial_console'
>>> drivers/serial/built-in.o: In function `serial_initialize':
>>>
>>> Can anyone please explain what changed between 2015.04-rc1 and 2015.04-rc2 which could cause such a behavior? I have spent the last couple hours re-basing a branch to see where it breaks as to maybe get a clue on what changed but no luck so far. Any tips would be appreciated.
>>>
>>> Thanks,
>>> Gilles
>>> .
>>>
>>>
>>>
>>> _______________________________________________
>>> U-Boot mailing list
>>> U-Boot at lists.denx.de
>>> http://lists.denx.de/mailman/listinfo/u-boot
>

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

* [U-Boot] bav335x support broken
  2015-03-16 16:14     ` Anish Khurana
@ 2015-03-17  8:09       ` Gilles
  2015-03-17  8:56         ` Albert ARIBAUD
  0 siblings, 1 reply; 7+ messages in thread
From: Gilles @ 2015-03-17  8:09 UTC (permalink / raw)
  To: u-boot

Hi Anish,

Yes, actually my board support is based on an older sitara patch and it works when applied to v2015.01. But I was mistaken about the problem.
I went back to my original patch applied to v2015.01 and it gives the same error but then moves on to SPL and boots ok.

http://pastebin.com/A23qKkj8

So I guess it's safe to say that the "fat" error is not the problem. The problem when I compile a74ef40a471d9d4bffb36a8c89744cf6fd631e6f is that it restarts over and over.

http://pastebin.com/wvjx4mB8

Do you have any suggestions how how to find the cause of the constant restart? I actually don't have a debugger for this hardware :-(

Cheers,
Gilles
.



> On Mar 16, 2015, at 09:14 , Anish Khurana <anish.khurana130181@gmail.com> wrote:
> 
> Hi Giles,
> 
> I was browsing the code and it seems it is failing in spl_fat.c file
> in function spl_load_image_fat_os() and internally calls
> do_fat_read_at() function. Also I noticed that configuration is very
> near to am335x( ti sitara) architecture, so probably can try some more
> configure similar to am335x .
> 
> Thanks,
> Anish
> 
> 
> On Mon, Mar 16, 2015 at 12:02 PM, Gilles <gilles@gigadevices.com> wrote:
>> Hi Anish,
>> 
>> Thanks for pointing that out. I ran menuconfig and that fixed the compilation issue however, now I'm getting this error when I try to run it:
>> 
>> spl_load_image_fat_os: error reading image args, err - -1
>> 
>> I guess I'll fool around with menuconfig see if there is something that should be enabled and isn't. (maybe you have a suggestion on this?)
>> 
>> Anyway, I'll post updated defconfigs when I figure it out. Hopefully this is just a config issue.
>> 
>> Thanks,
>> Gilles
>> .
>> 
>> 
>>> On Mar 14, 2015, at 10:55 , Anish Khurana <anish.khurana130181@gmail.com> wrote:
>>> 
>>> Hi Gilles,
>>> 
>>> This u-boot version is having lot of changes , they have enabled
>>> Kconfig similar to Kernel and having GUI support ( make menuconfig) .
>>> so if you are gettting error as you mentioned , try to add Device
>>> model configurations  and SYS malloc() as :
>>> 
>>> Steps 1 make <birdland_bav335x config>
>>> Step 2 make menuconfig
>>> Step 3 Device driver -> Enable driver model, enable Driver model for serial)
>>> Step 4 malloc() pool , General setup --> Enable malloc() pool.
>>> 
>>> Please try this , I think it will work.
>>> 
>>> Thanks,
>>> Anish
>>> 
>>> 
>>> On Sat, Mar 14, 2015 at 10:36 AM, Gilles <gilles@gigadevices.com> wrote:
>>>> Folks,
>>>> 
>>>> I posted a patch to add support for bav335x boards (a322aad99de4). The patch was tested against v2015.04-rc1 and worked perfectly but somehow, something was introduced since then which breaks the board support.
>>>> 
>>>> There are two main errors I need to fix before posting another patch but need help with the second error.
>>>> 
>>>> The first error is easy. Compilation throws:
>>>> #error "Please define NS16550 registers size."
>>>> which I can simply fix by defining CONFIG_SYS_NS16550_REG_SIZE in include/configs/bav335x.h
>>>> ((( Altough I am stil puzzled as to why this was defined as -4 (where?) on v2015.04-rc1 )))
>>>> 
>>>> After adding the define, everything compiles up to failing on the final link with:
>>>> 
>>>> drivers/serial/built-in.o: In function `get_current':
>>>> /home/gilles/bbdev/u-boot/drivers/serial/serial.c:389: undefined reference to `default_serial_console'
>>>> drivers/serial/built-in.o: In function `serial_initialize':
>>>> 
>>>> Can anyone please explain what changed between 2015.04-rc1 and 2015.04-rc2 which could cause such a behavior? I have spent the last couple hours re-basing a branch to see where it breaks as to maybe get a clue on what changed but no luck so far. Any tips would be appreciated.
>>>> 
>>>> Thanks,
>>>> Gilles
>>>> .
>>>> 
>>>> 
>>>> 
>>>> _______________________________________________
>>>> U-Boot mailing list
>>>> U-Boot at lists.denx.de
>>>> http://lists.denx.de/mailman/listinfo/u-boot
>> 

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

* [U-Boot] bav335x support broken
  2015-03-17  8:09       ` Gilles
@ 2015-03-17  8:56         ` Albert ARIBAUD
  0 siblings, 0 replies; 7+ messages in thread
From: Albert ARIBAUD @ 2015-03-17  8:56 UTC (permalink / raw)
  To: u-boot

Hello Gilles,

On Tue, 17 Mar 2015 01:09:04 -0700, Gilles <gilles@gigadevices.com>
wrote:
> Hi Anish,
> 
> Yes, actually my board support is based on an older sitara patch and it works when applied to v2015.01. But I was mistaken about the problem.
> I went back to my original patch applied to v2015.01 and it gives the same error but then moves on to SPL and boots ok.
> 
> http://pastebin.com/A23qKkj8
> 
> So I guess it's safe to say that the "fat" error is not the problem. The problem when I compile a74ef40a471d9d4bffb36a8c89744cf6fd631e6f is that it restarts over and over.
> 
> http://pastebin.com/wvjx4mB8

This is typically caused by the u-boot image being corrupt, or
corrupting the SPL somehow, frequently because some memory is being
mapped by both for conflicting uses. Check memory mappings for SPL and
U-Boot including stack, BSS and malloc area locations.

> Do you have any suggestions how how to find the cause of the constant restart? I actually don't have a debugger for this hardware :-(

What you can do is enable debugging (define DEBUG macro) globally,
rebuild SPL and look at the console output. You can also add your own
debug() or printf() calls to track which parts of your code get run and
which ones don't.

> Cheers,
> Gilles

Amicalement,
-- 
Albert.

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

end of thread, other threads:[~2015-03-17  8:56 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-14  5:06 [U-Boot] bav335x support broken Gilles
2015-03-14 17:55 ` Anish Khurana
2015-03-14 21:47   ` Albert ARIBAUD
2015-03-16  6:32   ` Gilles
2015-03-16 16:14     ` Anish Khurana
2015-03-17  8:09       ` Gilles
2015-03-17  8:56         ` Albert ARIBAUD

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.