Skip to contentSkip to conversation

Not able to boot cuImage for the target board with MPC8270 processor

DISCUSSION sgosavi1 3 participants 7 messages Aug 29, 2018 – Sep 25, 2018

lore
Share & tools
lore

sgosavi1

author
#0 lore raw

Hi Everyone,

Recently I took up the activity of switching from Linux kernel version 2.16.17.6 to version 4.15.13 for our target board that supports MPC8270 PowerPC processor. As I understand the new kernel version mandates the use of a device tree in the kernel source to describe the target board. I took "pq2fads.dts" as a reference device tree file to port the kernel for our target board. The U-boot version 1.1.4 that we currently use does not support passing of device tree to kernel but passes the board information structure used by the older kernel version we have been using so far.

As suggested in the new kernel documentation I created a "cuImage.pq2fads" kernel image which has the device tree and boot wrapper code embedded in the image to support booting the kernel with older U-boot. However I am unable to see any debug output after the dump from U-boot below.

U-Boot 1.1.4 (Aug 2 2018 - 06:27:35)

MPC8260 Reset Status: Check Stop, External Soft, External Hard

MPC8260 Clock Configuration
- Bus-to-Core Mult 4x, VCO Div 2, 60x Bus Freq 25-75 , Core Freq 100-300
- dfbrg 1, corecnf 0x1a, busdf 5, cpmdf 1, plldf 0, pllmf 5

 - vco_out  394515000, scc_clk   98628750, brg_clk   24657187
 - cpu_clk  263010000, cpm_clk  197257500, bus_clk   65752500
CPU:   MPC8260 (HiP7 Rev 14, Mask 1.0 1K49M) at 263.010 MHz
Board: Emerson MPC8270 CCB
Init SRAM, CAN, DOC...
UPMA done. Setting up UPMB
Rev B or Higher CPU Board
I2C:   ready
DRAM:  128 MB
FLASH: 16 MB
In:    serial
Out:   serial
Err:   serial
Net:   FCC1 ETHERNET, FCC2 ETHERNET
Press <foo> to STOP AUTOBOOT!:autoboot in 2 seconds
## Booting image at ffc00000 ...
   Image Name:   Linux-4.15.13
   Created:      2018-08-29  10:45:39 UTC
   Image Type:   PowerPC Linux Kernel Image (gzip compressed)
   Data Size:    1166748 Bytes =  1.1 MB

Load Address: 00400000
Entry Point: 004007a4
Verifying Checksum ... OK
Uncompressing Kernel Image ... OK

I also checked the kernel dump at location associated with "_log_buf" symbol in the System.map file in RAM but did not get any debug info.

Please can anyone suggest if I am missing something here and how can I get the debug output on my serial console during bootup.

Thanks,
Sachin.

--
Sent from: http://linuxppc.10917.n7.nabble.com/linuxppc-dev-f3.html

#1 lore raw

Le 29/08/2018 à 13:14, sgosavi1 a écrit :

Quoted 50 lines

Hi Everyone,

Recently I took up the activity of switching from Linux kernel version 2.16.17.6 to version 4.15.13 for our target board that supports MPC8270 PowerPC processor. As I understand the new kernel version mandates the use of a device tree in the kernel source to describe the target board. I took "pq2fads.dts" as a reference device tree file to port the kernel for our target board. The U-boot version 1.1.4 that we currently use does not support passing of device tree to kernel but passes the board information structure used by the older kernel version we have been using so far.

As suggested in the new kernel documentation I created a "cuImage.pq2fads" kernel image which has the device tree and boot wrapper code embedded in the image to support booting the kernel with older U-boot. However I am unable to see any debug output after the dump from U-boot below.

U-Boot 1.1.4 (Aug 2 2018 - 06:27:35)

MPC8260 Reset Status: Check Stop, External Soft, External Hard

MPC8260 Clock Configuration
- Bus-to-Core Mult 4x, VCO Div 2, 60x Bus Freq 25-75 , Core Freq 100-300
- dfbrg 1, corecnf 0x1a, busdf 5, cpmdf 1, plldf 0, pllmf 5

  - vco_out  394515000, scc_clk   98628750, brg_clk   24657187
  - cpu_clk  263010000, cpm_clk  197257500, bus_clk   65752500
CPU:   MPC8260 (HiP7 Rev 14, Mask 1.0 1K49M) at 263.010 MHz
Board: Emerson MPC8270 CCB
Init SRAM, CAN, DOC...
UPMA done. Setting up UPMB
Rev B or Higher CPU Board
I2C:   ready
DRAM:  128 MB
FLASH: 16 MB
In:    serial
Out:   serial
Err:   serial
Net:   FCC1 ETHERNET, FCC2 ETHERNET
Press <foo> to STOP AUTOBOOT!:autoboot in 2 seconds
## Booting image at ffc00000 ...
    Image Name:   Linux-4.15.13
    Created:      2018-08-29  10:45:39 UTC
    Image Type:   PowerPC Linux Kernel Image (gzip compressed)
    Data Size:    1166748 Bytes =  1.1 MB

Load Address: 00400000
Entry Point: 004007a4
Verifying Checksum ... OK
Uncompressing Kernel Image ... OK

Quoted 5 lines

I also checked the kernel dump at location associated with "_log_buf" symbol in the System.map file in RAM but did not get any debug info.

Please can anyone suggest if I am missing something here and how can I get the debug output on my serial console during bootup.

Have you selected CONFIG_PPC_EARLY_DEBUG (and probably CONFIG_PPC_EARLY_DEBUG_CPM) ?

Christophe

Quoted 10 lines

Thanks,
Sachin.

--
Sent from: http://linuxppc.10917.n7.nabble.com/linuxppc-dev-f3.html

#4 lore raw
In reply to sgosavi1
Quoted 6 lines · On Wed, 2018-08-29 at 04:14 -0700, sgosavi1 wrote:

Press <foo> to STOP AUTOBOOT!:autoboot in 2 seconds ## Booting image at ffc00000 ...

   Image Name:   Linux-4.15.13
   Created:      2018-08-29  10:45:39 UTC
   Image Type:   PowerPC Linux Kernel Image (gzip compressed)
   Data Size:    1166748 Bytes =  1.1 MB
Quoted 8 lines

Load Address: 00400000
Entry Point: 004007a4
Verifying Checksum ... OK
Uncompressing Kernel Image ... OK

I also checked the kernel dump at location associated with "_log_buf" symbol in the System.map file in RAM but did not get any debug info.

If you didn't get any output beyond this then it's probably[1] failing in the bootwrapper, not the kernel itself -- so neither _log_buf nor CONFIG_PPC_EARLY_DEBUG would help.

Quoted 2 lines

Please can anyone suggest if I am missing something here and how can I get the debug output on my serial console during bootup.

To debug, if you aren't able to use JTAG, add code to the bootwrapper to manually poke at known CPM serial addresses early on, to see how far it's progressing.

Are you sure the device tree you're using is correct for your board, including all addresses being where your U-Boot configured them?

-Scott

[1] Another possibility would be that it's booting, but serial output isn't working.

author
#5 lore raw
Quoted 1 line

Are you sure the device tree you're using is correct for your board,

including

Quoted 1 line

all addresses being where your U-Boot configured them?

I actually created one for the target board I am using but had similar problem. So I decided to take the pq2fads.dts tree as a reference since it is based on the POWER QUICKII family and build the cuImage. I am sure I will get some errors here but I can debug and then build the device tree for my board.

I will try to debug the boot wrapper code as suggested. Thanks for your support.

Sachin.

--
Sent from: http://linuxppc.10917.n7.nabble.com/linuxppc-dev-f3.html

author
#6 lore raw

Hi All,

I debugged the bootwrapper code by printing messages in RAM using memcpy. The bootwrapper code appears to be executing correctly. I ensured that the "serial_console_init" function has executed successfully. But I am still not able to get any of the "printf" output in the wrapper code on the serial console.

Can anybody suggests what else I need to look at?

Thanks,
Sachin

--
Sent from: http://linuxppc.10917.n7.nabble.com/linuxppc-dev-f3.html