Bug 685

Summary: mpc8315e-rdb kernel of nightly build (20110121-1,Laverne release) boot failed
Product: [Yocto Project Subprojects] Kernel Reporter: liang li <liang.li2>
Component: kernel-toolingAssignee: Bruce Ashfield <bruce.ashfield>
Status: RESOLVED WONTFIX QA Contact:
Severity: normal    
Priority: Low CC: jiajun.xu, ke.yu, liangliang.wang, liming.wang, sgw, yi.zhao, yp.kernel.watcher, yp.watcher
Version: 0.9   
Target Milestone: 0.9.1   
Hardware: mpc8315e-rdb   
OS: ppc   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: ---

Description liang li 2011-01-28 01:57:29 UTC
use nightly build (20110121-1) below:
http://autobuilder.pokylinux.org/nightly/20110121-1/machines/mpc8315e-rdb/ppc/uImage-2.6.34+git0+b67e060194a38c6331da1532bd06446087a42b3b_0+986e6eb66c26007cee7916d5d12f4756e6b5436f-r12-mpc8315e-rdb-20110123070914.bin

kernel boot failed and error messages below:
....

## Booting kernel from Legacy Image at 00800000 ...
   Image Name:   Yocto Linux (Built by Poky 4.0)/
   Created:      2011-01-23   7:09:26 UTC
   Image Type:   PowerPC Linux Kernel Image (gzip compressed)
   Data Size:    2485833 Bytes = 2.4 MiB
   Load Address: 20008000
   Entry Point:  20008000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 00780000
   Booting using the fdt blob at 0x780000
   Uncompressing Kernel Image ... Machine check in kernel mode.
Caused by (from msr): regs 07f18810 Unknown values in msr
NIP: 00001220 XER: 00000000 LR: 07FCCC58 REGS: 07f18810 TRAP: 0200 DAR: 00000000
MSR: 00001000 EE: 0 PR: 0 FP: 0 ME: 1 IR/DR: 00
GPR00: 00000444 07F18900 07F18F44 07F189D8 00000060 00000007 0000000D 20807EFE 
GPR08: 00A5EE83 20007FFF 008000D6 07F1CEC0 00000000 00000000 00000004 07F1CF30 
GPR16: 07F1CF14 0025EE35 00000000 20007FFF 000001FF FFFFFF00 00000000 00000000 
GPR24: 00000000 07F1D3F0 07F1DDC0 00000001 FFFFFFFF 000001F8 07FEF840 00000000 
Call backtrace: 
FFFFFFF8 07FCEC34 07FCABA0 07FCACC8 07FAFAD0 07FB024C 07FC1180 
07FC0748 07FC0A10 07FC10C4 07FC0748 07FC09D4 07FC24AC 07FC1180 
07FC0748 07FC09D4 07FC3578 07F9F8EC 07F9E600 
machine check
Resetting the board.

kernel can not boot and the board is resetted.
Comment 1 liang li 2011-01-28 01:59:13 UTC
the patch has been tested and passed on git master branch by liming,wang and bruce.
thanks.
Comment 2 Bruce Ashfield 2011-01-28 12:18:31 UTC
Two questions:

1) which patch ? I sent a few on this in the background, but none of
them should have been the fix. Since the loaddr on this boot implies
that uImage from the kernel itself is not being used, but instead some
of the poky constructed ones.

Can someone compare the .bin being booted against the 
linux-fsl-mpc8315e-rdb-standard-build/arch/powerpc/boot/uImage ? Are
they exactly the same size ?

Is this a dtb or fdt based boot ?

2) can I see a dump of the uboot env ?
Comment 3 liang li 2011-01-29 17:43:36 UTC
(In reply to comment #2)
> Two questions:
> 
> 1) which patch ? I sent a few on this in the background, but none of
> them should have been the fix. Since the loaddr on this boot implies
> that uImage from the kernel itself is not being used, but instead some
> of the poky constructed ones.
> 
> Can someone compare the .bin being booted against the 
> linux-fsl-mpc8315e-rdb-standard-build/arch/powerpc/boot/uImage ? Are
> they exactly the same size ?
> 
> Is this a dtb or fdt based boot ?
> 
> 2) can I see a dump of the uboot env ?

Hi bruce,

the method to solve this kernel problems (this is told by liming.wang):
diff --git a/meta/conf/machine/mpc8315e-rdb.conf
b/meta/conf/machine/mpc8315e-rdb.conf
index e3f9d23..69f3dbe 100644
--- a/meta/conf/machine/mpc8315e-rdb.conf
+++ b/meta/conf/machine/mpc8315e-rdb.conf
@@ -14,3 +14,6 @@ MACHINE_FEATURES = "kernel26 keyboard pci ext2 ext3 serial"

 PREFERRED_PROVIDER_virtual/kernel = "linux-yocto"
 PREFERRED_PROVIDER_linux-libc-headers ?= "linux-libc-headers-yocto"
+
+UBOOT_ENTRYPOINT = "0x00000000"
+

it is dtb based boot.

liang li
Comment 4 Bruce Ashfield 2011-01-29 20:40:49 UTC
That is the fix that I sent Liming, but looking at the code it should
have zero impact. UBOOT_ENTRYPOINT is only used on uImages
that are created outside of the kernel build process.

How are you building the dtb ? Manually ?

I'm either going to have to run some experiments here (hence why I'm
looking for the full boot instructions for what' you've done) or I'm going
to need to get some debug code used in your build environment.

So if you can enter your build & boot steps, I can start there. If that
doesn't work, I'll get you to run some debug code that will show me
why your uImage is being constructed incorrectly.
Comment 5 liang li 2011-01-29 22:15:24 UTC
(In reply to comment #4)
> That is the fix that I sent Liming, but looking at the code it should
> have zero impact. UBOOT_ENTRYPOINT is only used on uImages
> that are created outside of the kernel build process.
> 
> How are you building the dtb ? Manually ?
dtb is given by Liming (not manually).
> 
> I'm either going to have to run some experiments here (hence why I'm
> looking for the full boot instructions for what' you've done) or I'm going
> to need to get some debug code used in your build environment.
> 
> So if you can enter your build & boot steps, I can start there. If that
> doesn't work, I'll get you to run some debug code that will show me
> why your uImage is being constructed incorrectly.
steps:
1. set build env.
2. bitbake poky-image-minimal
3. from tmp/deploy/images get the uImage.
build env :
if you can ssh to the 128.224.158.136 (my machine)
user : liangli
passwd :3111llli2
dir: /home/liangli/poky-git-build_4
images: tmp/deploy/images
Comment 6 liang li 2011-01-29 22:20:18 UTC
(In reply to comment #5)
> (In reply to comment #4)
> > That is the fix that I sent Liming, but looking at the code it should
> > have zero impact. UBOOT_ENTRYPOINT is only used on uImages
> > that are created outside of the kernel build process.
> > 
> > How are you building the dtb ? Manually ?
> dtb is given by Liming (not manually).
> > 
> > I'm either going to have to run some experiments here (hence why I'm
> > looking for the full boot instructions for what' you've done) or I'm going
> > to need to get some debug code used in your build environment.
> > 
> > So if you can enter your build & boot steps, I can start there. If that
> > doesn't work, I'll get you to run some debug code that will show me
> > why your uImage is being constructed incorrectly.
> steps:
> 1. set build env.
> 2. bitbake poky-image-minimal
> 3. from tmp/deploy/images get the uImage.
> build env :
> if you can ssh to the 128.224.158.136 (my machine)
> user : liangli
> passwd :3111lli2
> dir: /home/liangli/poky-git-build_4
> images: tmp/deploy/images
passwd :3111lli2
Comment 7 Bruce Ashfield 2011-01-30 12:32:43 UTC
One last question .. the dtb. Where are you getting the dtb from ?
Comment 8 liang li 2011-01-30 17:38:00 UTC
(In reply to comment #7)
> One last question .. the dtb. Where are you getting the dtb from ?
It is given by Liming:
server :pek-lpgbuild5 (128.224.153.35)
file: /folk/lwang0/mpc8315erdb.dtb
Comment 9 Saul Wold 2011-02-08 10:24:49 UTC
This hardware was not officially supported as part of 0.9, please move to 1.0 for tested and supported kernel with this hardware support.