[U-Boot] u-boot 1.1.2 boot latest powerpc based kernel?

Hi,
Can an old u-boot (e.g. 1.1.2) boot a latest powerpc based kernel (e.g. 2.6.33)? I noticed that the bd_info in the latest u-boot is different from the one in 1.1.2. The custom board with u-boot 1.1.2 passed only the first 6 parameters to a 2.4 kernel shown as below.
typedef struct bd_info { /*======================================================================*/ unsigned long bi_memstart; /* start of DRAM memory */ unsigned long bi_memsize; /* size of DRAM memory in bytes */ unsigned long bi_intfreq; /* Internal Freq, in MHz */ unsigned long bi_busfreq; /* Bus Freq, in MHz */ unsigned char bi_enetaddr[6]; /* Ethernet adress */ unsigned long bi_baudrate; /* Console Baudrate */ unsigned long bi_flashstart; /* start of FLASH memory */ unsigned long bi_flashsize; /* size of FLASH memory */ unsigned long bi_flashoffset; /* reserved area for startup monitor */ unsigned long bi_sramstart; /* start of SRAM memory */ unsigned long bi_sramsize; /* size of SRAM memory */ #if defined(CONFIG_5xx) || defined(CONFIG_8xx) || defined(CONFIG_8260) \ || defined(CONFIG_E500) unsigned long bi_immr_base; /* base of IMMR register */ #endif <...snipped> }
The customer does't want to upgrade u-boot. If linux drivers are ported to the new powerpc arch, is u-boot 1.1.2 still able to boot the new kernel? Besides the bd_info, what else the powerpc kernel expect from u-boot?
Thanks, -Shawn.

On Thu, May 13, 2010 at 1:43 AM, Shawn Jin shawnxjin@gmail.com wrote:
The customer does't want to upgrade u-boot. If linux drivers are ported to the new powerpc arch, is u-boot 1.1.2 still able to boot the new kernel? Besides the bd_info, what else the powerpc kernel expect from u-boot?
The only way to find out for sure is to test it. You'll probably need to enable cuImage support in the kernel, at the very least. No one keeps track of whether newer kernels work with older U-Boots, so there's no way to know in advance whether a specific kernel and a specific device tree and a specific (older) U-Boot will work together.

On Thu, May 13, 2010 at 7:47 AM, Timur Tabi timur@freescale.com wrote:
The only way to find out for sure is to test it. You'll probably need to enable cuImage support in the kernel, at the very least. No one keeps track of whether newer kernels work with older U-Boots, so there's no way to know in advance whether a specific kernel and a specific device tree and a specific (older) U-Boot will work together.
Thanks for the comments.
However my concern is specific to the powerpc arch. If I understand correctly, the powerpc arch expects a bootloader provide a DTS file. I'm not sure how the current U-Boot transfers such info to the kernerl. People here can shed some light on this? I'm certain the old U-Boot (e.g. 1.1.2) doesn't have this kind of capability. The bd_info is still one of data transferred to the kernel, right? How does bd_info work with the DTS info?
Thanks, -Shawn.

Dear Shawn Jin,
In message AANLkTik4dbCkniKRuJ4JtMpHpQiLDgbXtw5Ihby0XFOx@mail.gmail.com you wrote:
On Thu, May 13, 2010 at 7:47 AM, Timur Tabi timur@freescale.com wrote:
The only way to find out for sure is to test it. You'll probably need to enable cuImage support in the kernel, at the very least. No one
-------^^^^^^^^^^^^^^
However my concern is specific to the powerpc arch. If I understand correctly, the powerpc arch expects a bootloader provide a DTS file.
Not if you use a cuImage as Timur suggested.
I'm not sure how the current U-Boot transfers such info to the kernerl. People here can shed some light on this? I'm certain the old U-Boot (e.g. 1.1.2) doesn't have this kind of capability. The bd_info
It would be easier if you upgraded to a recent version of U-Boot of course.
Best regards,
Wolfgang Denk

Shawn Jin wrote:
However my concern is specific to the powerpc arch. If I understand correctly, the powerpc arch expects a bootloader provide a DTS file. I'm not sure how the current U-Boot transfers such info to the kernerl.
One of the registers (r7 maybe?) contains the address of the device tree.
People here can shed some light on this? I'm certain the old U-Boot (e.g. 1.1.2) doesn't have this kind of capability.
That's why cuImage was invented. cuImage embeds the device tree in the kernel image. The drawback is that you can't rely on U-Boot to do any fixups.
The bd_info is still one of data transferred to the kernel, right? How does bd_info work with the DTS info?
That, I don't know.

On Mon, May 17, 2010 at 09:06:49AM -0500, Timur Tabi wrote:
Shawn Jin wrote:
However my concern is specific to the powerpc arch. If I understand correctly, the powerpc arch expects a bootloader provide a DTS file. I'm not sure how the current U-Boot transfers such info to the kernerl.
One of the registers (r7 maybe?) contains the address of the device tree.
r3
People here can shed some light on this? I'm certain the old U-Boot (e.g. 1.1.2) doesn't have this kind of capability.
That's why cuImage was invented. cuImage embeds the device tree in the kernel image. The drawback is that you can't rely on U-Boot to do any fixups.
U-Boot itself can't do any fixups (because it doesn't know about the device tree), but the cuImage bootwrapper does do some fixups (mainly memory size, clock speed, and MAC address) based on the bd_info that U-Boot passes in. The drawback is that the bd_info is fragile and the information it passes is limited.
The bd_info is still one of data transferred to the kernel, right?
Not in the new booting scheme. cuImage will accept a bd_info instead of a device tree (and will have a device tree built into the kernel).
-Scott
participants (4)
-
Scott Wood
-
Shawn Jin
-
Timur Tabi
-
Wolfgang Denk