ltib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

cuImage notes (was Re: [Ltib] 2.6.24 for mpc8458amc)


From: Stuart Hughes
Subject: cuImage notes (was Re: [Ltib] 2.6.24 for mpc8458amc)
Date: Wed, 20 Feb 2008 08:57:23 +0000

Hi Chip/Maxime,

Here's the scoop on the bootloader stuff.  Around 2.6.16 (depends on
exact target) if you're building a target where ARCH=powerpc (not ppc)
then the bootloader needed to pass a flat device tree.  To do this you
can either burn a newer u-boot, or alternatively if you are not able or
willing to udate your u-boot, you can use "cuImage"  this basically puts
a wrapper around the kernel images that includes the device tree.

Some of the platforms in LTIB can support cuImage, one of them is
mpc8548cds.  Here's an outline of how you can get cuImage working.  Note
that the patch will vary depending on your kernel source version and the
target you are working on, this is just an example (you may need to
adjust):

Anyhow, here's the basis of what you need to do:

1/ In the kernel source tree, find and edit:
arch/powerpc/boot/dts/mpc8548cds.dts and add
this change (this is kernel version dependent):

diff --git a/arch/powerpc/boot/dts/mpc8548cds.dts
b/arch/powerpc/boot/dts/mpc8548cds.dts
index d215d21..df82bbb 100644
--- a/arch/powerpc/boot/dts/mpc8548cds.dts
+++ b/arch/powerpc/boot/dts/mpc8548cds.dts
@@ -400,4 +400,7 @@
                         big-endian;
        };
    };
+   chosen {
+           linux,stdout-path = "/address@hidden/address@hidden";
+   };
 };


2/ Rebuild the kernel and adjust the configuration.  You need to make
sure you're using an ARCH=powerpc not an ARCH=ppc.  And also need to set
the device tree.

$ ./ltib -p kernel -c

When the kernel config screen is show, under "Kernel options" set:
"Static device tree source file" (CONFIG_DEVICE_TREE), this should
be the name of the dts file, e.g.: mpc8548cds.dts

This should then build a cuImage.85xx and put it into rootfs/boot.  This
should be bootable from an older u-boot.

Here is an example of an 8548 being booted with an old u-boot.  You will
need to adjust your commands.  Note prior to running these you need to
copy rootfs/boot/cuImage.85xx to your tftp area, in this case I copied
to /tftpboot/ltib/bootable_kernel.8548CDS

---- example u-boot sequence based on u-boot-1.1.3  ----

=> setenv tftp_path /ltib
=> setenv serverip 10.82.193.2
=> setenv ipaddr 10.82.193.136
=> setenv netmask 255.255.255.0
=> setenv gatewayip
=> setenv rootpath /home/seh/ltib_bsps/8548cds/rootfs
=> setenv hostname mpc8548cds
=> setenv netdev eth0
=> setenv consoledev ttyS1
=> setenv baud 115200
=> setenv bootargs root=/dev/nfs rw 
nfsroot=10.82.193.2:/home/seh/ltib_bsps/8548cds/rootfs 
ip=10.82.193.136:10.82.193.2::255.255.255.0:mpc8548cds:eth0:off 
console=ttyS1,115200
=> setenv loadkernaddr 0x800000
=> setenv loaddtbaddr 0x9F0000
=> setenv loadramaddr 0xB00000
=> setenv bootfile /ltib/bootable_kernel.8548CDS
=> setenv dtbfile /ltib/dtb.8548CDS
=> setenv rdfile /ltib/rd.8548CDS
=> sleep 5
=> tftp 0x800000 /ltib/bootable_kernel.8548CDS

Speed: 1000, full duplex
Using eTSEC0 device
TFTP from server 10.82.193.2; our IP address is 10.82.193.136
Filename '/ltib/bootable_kernel.8548CDS'.
Load address: 0x800000
Loading: #################################################################
     #################################################################
     #################################################################
     ###############################################
done
Bytes transferred = 1238159 (12e48f hex)
=> bootm 0x800000

## Booting image at 00800000 ...
   Image Name:   Linux-2.6.24-06830-gbe8229b-dirt
   Image Type:   PowerPC Linux Kernel Image (gzip compressed)
   Data Size:    1238095 Bytes =  1.2 MB
   Load Address: 00400000
   Entry Point:  004005b0
   Verifying Checksum ... OK
   Uncompressing Kernel Image ... OK
Memory <- <0x0 0x10000000> (256MB)

ethernet0: local-mac-address <- 04:00:00:00:00:0a
ethernet1: local-mac-address <- 04:00:00:00:00:0b
....
.... more boot messages.....
....


Regards, Stuart

On Tue, 2008-02-19 at 21:00 -0600, Chip Webb wrote:
> Hi Maxime,
> 
> I ran into something that looked like this a couple of months ago.
> The solution was to re-program the u-boot on my target with a newer
> version.
> 
> I am by no means an expert, but I understand that the interface
> between u-boot
> and linux is (and has been) in flux over the last year or so and that 
> newer versions of the kernel (at least on my target) would hang the
> way you describe if booted from an older version of u-boot.
> I suspect that the issue was related to the flattened device tree
> being passed to the kernel, but it's beyond my knowledge to do
> anything more than speculate on the actual cause.
> 
> Most boards seem to have provision for two bootloaders. If yours
> has a jumper or switch for selecting this you may want to program
> the new u-boot to the alternate page so that the one you have isn't 
> erased.
> 
> Best Regards,
> 
> Chip Webb
> 
> Stuart Hughes wrote: 
> > Hi Maxime,
> > 
> > At this stage I think you'd probably get more help from the linux-ppc
> > kernel mailing list.
> > 
> > Regards, Stuart
> > 
> > On Tue, 2008-02-19 at 11:30 +0000, maxime louvel wrote:
> >   
> > > Thanks,
> > > 
> > > I haven't been able to build the kernel without LTIB...
> > > I have tried to build it with an embedded compiler but get an internal
> > > assembler error....
> > > 
> > > regards,
> > > Maxime
> > > 
> > > On Feb 19, 2008 10:53 AM, Stuart Hughes <address@hidden> wrote:
> > >         Hi Maxime,
> > >         
> > >         This is not really an LTIB question, you'd probably get more
> > >         help on a
> > >         linux-ppc kernel mailing list.
> > >         
> > >         Can you boot this kernel if built outside of LTIB?  If so,
> > >         which cross
> > >         compiler did you use?
> > >         
> > >         Regards, Stuart
> > >         
> > >         
> > >         
> > >         On Tue, 2008-02-19 at 09:46 +0000, maxime louvel wrote:
> > >         > Hi,
> > >         >
> > >         > I am trying to make a 2.6.24 vanilla kernel boot (an work
> > >         fine in a
> > >         > second time) on a mpc8548amc board.
> > >         > I have got the last LTIB version from the public svn and add
> > >         the
> > >         > platform specific stuff from the sources of the current
> > >         kernel running
> > >         > on the cards.
> > >         > What I have basically add is:
> > >         > - a folder mpc8548amc, in the config/platform directory,
> > >         which allow
> > >         > to select the mpc8548amc as the supported platform in the
> > >         first screen
> > >         > of the LTIB installation
> > >         > - add the following files:
> > >         >   - arch/ppc/configs/mpc8548amc_defconfig
> > >         >   - arch/ppc/configs/platforms/85xx/mpc_8548_amc.h and .c
> > >         > - I have used the dts of an another platform (mpc8548cds)
> > >         which seems
> > >         > quite the same, but I haven't got any confirmation of that
> > >         yet.
> > >         >
> > >         > When I am booting the kernel image built by LTIB here is
> > >         what I get:
> > >         >
> > >         > AMC=> dhcp 0x1000000 uImage.amc.2.6.24
> > >         > Speed: 1000, full duplex
> > >         > BOOTP broadcast 1
> > >         > DHCP client bound to address 10.255.255.2
> > >         > Using eTSEC0 device
> > >         > TFTP from server 0.0.0.0; our IP address is 10.255.255.2;
> > >         sending
> > >         > through gateway 10.1.1.1
> > >         > Filename 'uImage.amc.2.6.24'.
> > >         > Load address: 0x1000000
> > >         > Loading: ##############################
> > >         > ###################################
> > >         >
> > >         >
> > >         #################################################################
> > >         >
> > >         >
> > >         #################################################################
> > >         >
> > >         >
> > >         #################################################################
> > >         >
> > >         >
> > >         #################################################################
> > >         >         ###########################
> > >         > done
> > >         > Bytes transferred = 1802102 (1b7f76 hex)
> > >         > AMC=> bootm 0x1000000
> > >         > ## Booting image at 01000000 ...
> > >         >   Image Name:   Linux-2.6.24
> > >         >   Image Type:   PowerPC Linux Kernel Image (gzip compressed)
> > >         >   Data Size:    1802038 Bytes =  1.7 MB
> > >         >   Load Address: 00000000
> > >         >   Entry Point:  00000000
> > >         >   Verifying Checksum ... OK
> > >         >   Uncompressing Kernel Image ... OK
> > >         >
> > >         > No further messages...
> > >         >
> > >         > Does someone has an idea ?
> > >         >
> > >         > thanks,
> > >         > Maxime
> > >         >
> > >         > --
> > >         > Maxime Louvel
> > >         > 0044 7964 5555 80
> > >         > 43 Allen road
> > >         > Whitemore reans
> > >         > WV60AW Wolverhampton
> > >         > United Kingdom
> > >         
> > >         > _______________________________________________
> > >         > LTIB home page: http://bitshrine.org
> > >         >
> > >         > Ltib mailing list
> > >         > address@hidden
> > >         > http://lists.nongnu.org/mailman/listinfo/ltib
> > >         
> > > 
> > > 
> > > 
> > > -- 
> > > Maxime Louvel
> > > 0044 7964 5555 80
> > > 43 Allen road
> > > Whitemore reans
> > > WV60AW Wolverhampton
> > > United Kingdom
> > >     
> > 
> > 
> > 
> > _______________________________________________
> > LTIB home page: http://bitshrine.org
> > 
> > Ltib mailing list
> > address@hidden
> > http://lists.nongnu.org/mailman/listinfo/ltib
> > 
> > 
> >   





reply via email to

[Prev in Thread] Current Thread [Next in Thread]