public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Jerry Van Baren <vanbaren@cideas.com>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] LIBFDT on the mpc8349emds was[PATCH: u-boot-fdt] Improve error print messages.
Date: Wed, 08 Aug 2007 11:05:38 -0400	[thread overview]
Message-ID: <46B9DBC2.9070105@cideas.com> (raw)
In-Reply-To: <1865.6044-24067-45791643-1186580309@seznam.cz>

Michal Simek wrote:
> HI,
> 
>> Undefine CONFIG_OF_FLAT_TREE - it and CONFIG_OF_LIBFDT are mutually 
>> exclusive.  That is The Old Way, CONFIG_OF_LIBFDT is The New Way.  The 
>> following is the starting point.  CONFIG_OF_BOARD_SETUP is most likely 
>> necessary, CONFIG_OF_HAS_BD_T is either necessary or A Good Thing, and 
>> CONFIG_OF_HAS_UBOOT_ENV is optional.
>>
>> /* pass open firmware flat tree */
>> #define CONFIG_OF_LIBFDT        1
>> #undef  CONFIG_OF_FLAT_TREE
>> #define CONFIG_OF_BOARD_SETUP   1
>> #define CONFIG_OF_HAS_BD_T      1
>> #define CONFIG_OF_HAS_UBOOT_ENV 1
> 
> I changed setting but I have problem with compilation.
> 
> /* pass open firmware flat tree */
> -#define CONFIG_OF_FLAT_TREE    1
> +#define CONFIG_OF_LIBFDT       1
> +#undef CONFIG_OF_FLAT_TREE
> #define CONFIG_OF_BOARD_SETUP  1
> +#define CONFIG_OF_HAS_BD_T     1
> +#define CONFIG_OF_HAS_UBOOT_ENV     
> MPC8349 has compilation problem.
> 
> common/libcommon.a(cmd_bootm.o): In function `do_bootm_linux':
> /tmp/1/u-boot-fdt.git/common/cmd_bootm.c:978: undefined reference to 
> `ft_board_setup'
> common/libcommon.a(cmd_fdt.o): In function `do_fdt':
> /tmp/1/u-boot-fdt.git/common/cmd_fdt.c:300: undefined reference to 
> `ft_board_setup'
> make: *** [u-boot] Error 1
> 
> I tried to change board specific file. Part of patch is below. And 
> function ft_get_prop isn't available. Function ft_get_prop is in 
> common/ft_build.c and this file is in CONFIG_OF_FLAT_TREE choice. What 
> can I do with this?
> 
> --- a/board/mpc8349emds/mpc8349emds.c
> +++ b/board/mpc8349emds/mpc8349emds.c
> @@ -584,7 +584,7 @@ U_BOOT_CMD(
> );
> #endif /* if defined(CONFIG_DDR_ECC) && defined(CONFIG_DDR_ECC_CMD) */
> 
> -#if defined(CONFIG_OF_FLAT_TREE) && defined(CONFIG_OF_BOARD_SETUP)
> +#if defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP)
> void
> ft_board_setup(void *blob, bd_t *bd)
> {
> 
> I can try fdt on PQ3 (MPC8560 and EP8548).Is it better choise than PQ II 
> Pro?
> 
> Best regards,
> Michal Simek

Hi Michal,

Kim is more knowledgeable on the 8349 boards than me, I only have a 
MPC8360-MDS-PB board.

The problem is that you have defined (per my directions) 
CONFIG_OF_BOARD_SETUP which means that it will call-out to 
ft_board_setup() to do board-specific setup.

There are two possibilities:
1) I'm wrong and you don't want to define CONFIG_OF_BOARD_SETUP.
2) You need to implement an appropriate ft_board_setup() and friends 
using the LIBFDT functions.

Number 2 is the more likely possibility.  Your error message is 
indicating that you need to port your mpc8349emds board-specific setup 
from the old CONFIG_OF_FLAT_TREE methods (which call ft_get_prop(), 
etc.) to the New Improved[tm] CONFIG_OF_LIBFDT methods.

Kim Phillips may have done this adaptation already, I believe what you 
really want to do is to clone Kim's u-boot-83xx repo and start there 
(either on the "mpc83xx" branch or the "testing" branch).  If Kim has 
not done the adaptation yet, follow his lead on one of the other 83xx 
boards which he has done.

Best regards,
gvb

  reply	other threads:[~2007-08-08 15:05 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-07 16:06 [U-Boot-Users] [PATCH: u-boot-fdt] Improve error print messages Jerry Van Baren
2007-08-07 20:29 ` Kim Phillips
2007-08-08  7:15   ` Michal Simek
2007-08-08 12:50     ` Jerry Van Baren
2007-08-08 13:38       ` Michal Simek
2007-08-08 15:05         ` Jerry Van Baren [this message]
     [not found]           ` <20070808170651.9c7e78f8.kim.phillips@freescale.com>
2007-08-10  6:33             ` [U-Boot-Users] LIBFDT on the mpc8349emds was[PATCH: " Kim Phillips
2007-08-09 21:05 ` [U-Boot-Users] [PATCH: " Wolfgang Denk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=46B9DBC2.9070105@cideas.com \
    --to=vanbaren@cideas.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox