2

I'm trying to get a newer linux kernel to boot on a PPC embedded linux device using U-Boot, but it won't boot the kernel.

My bootable kernel image builds, and is being network booted by U-Boot. The problem is, after uncompressing the kernel, nothing happens. I can't quite work out what's happening - it has been suggested to me that the uncompressed kernel is being written over the bootable kernel image, thus corrupting the uncompressed kernel, but I don't know how to find where in memory this is all happening. Here's the output from U-Boot:

Booting kernel from Legacy Image at 00800000
Image Name:   Linux-4.9.48
Image Type:   PowerPC Linux Kernel Image (gzip compressed)
Data Size:    3098594 Bytes =  3 MB
Load Address: 00000000
Entry Point:  00000000
Verifying Checksum ... OK
Uncompressing Kernel Image ... OK

After this point, it does nothing.

Does anyone have any other ideas as to why this is happening, or know where to find a memory map of uBoot? Thanks in advance!

Edit: Posting output of printenv plus full boot output

ramboot=run ramargs addmtd addother;tftp $ramdiskaddr $ramdiskfile;tftp 
$loadaddr $bootfile;bootm $loadaddr $ramdiskaddr
nfsboot=run nfsargs addmtd addip addother;tftp $loadaddr $bootfile; bootm 
$loadaddr
bootdelay=2
baudrate=115200
loads_echo=1
netmask=255.255.0.0
hostname=Paradigm_
loadaddr=800000
addip=setenv bootargs $bootargs 
ip=$ipaddr:$serverip:$gatewayip:$netmask:$hostname:$netdev:off
addmtd=setenv bootargs $bootargs mtdparts=$mtd_id:$mtdkernel,$mtdrootfs,$mtduboot,$mtdfuturea,$mtdfutureb,$mtdunu
sed,$mtdenvars
addother=setenv bootargs $bootargs console=$consoledev,$baudrate 
$othbootargs contrast=$contrast
consoledev=ttyS3
fargs=setenv bootargs root=/dev/ram rw
fboot=run fargs addmtd addip addother; bootm $kernel_base $fs_base
flkernel=echo ************************;echo * Starting flkernel... *;echo 
************************;prot off $kernel_base $kernel_end;erase 
$kernel_base $kernel_end;tftp $loadaddr $bootfile;cp.b $loadaddr 
$kernel_base $filesize;prot on $kernel_base $kernel_end;cmp.b $loadaddr 
$kernel_base $filesize;echo *********************;echo * flkernel Complete 
*;echo *********************
flrootfs=echo ************************;echo * Starting flrootfs... *;echo 
************************;prot off $fs_base $fs_end;erase $fs_base 
$fs_end;tftp $loadaddr $rootfsfile;cp.b $loadaddr $fs_base $filesize;prot on 
$fs_base $fs_end;cmp.b $loadaddr $fs_base $filesize;echo 
*********************;echo * flrootfs Complete *;echo *********************
flub=mw.l $loadaddr ffffffff 10000;tftp $loadaddr $ubootbinfile;prot off 
$uboot_base $uboot_end;erase $uboot_base $uboot_end;cp.b $loadaddr 
$uboot_base $filesize;prot on $uboot_base $uboot_end;cmp.b $loadaddr 
$uboot_base $filesize
fs_base=fc700000
fs_end=fe6fffff
hboot=run fargs addip addother;tftp $loadaddr $bootfile;prot off $fs_base 
$fs_end;bootm $loadaddr
kernel_base=fc000000
kernel_end=fc6fffff
mtd_id=phys_mapped_flash
mtdkernel=7M@0x00000000(Kernel)
mtdrootfs=32M@0x00700000(RootFS)
mtduboot=768K@0x03F00000(U-Boot)
mtdunused=192K@0x03FC0000(Unused)
mtdfuturea=8M@0x02700000(Future-A)
mtdfutureb=16M@0x02F00000(Future-B)
mtdenvars=64K@0x03FF0000(EnvVars)
netdev=eth0
nfsargs=setenv bootargs root=/dev/nfs rw nfsroot=$serverip:$rootpath
othbootargs=ramdisk_size=64000 panic=5
ramargs=setenv bootargs root=/dev/ram rw
rootfsfile=initrd
uboot_base=fff00000
uboot_end=fffbffff
uboot_version=2.1.1.9.0.502
ubootbinfile=u-boot.bin
usbargs=setenv bootargs root=/dev/uba1 rw rootfstype=ext3 rootdelay=3
usbboot=echo ***********************;echo * Starting usbboot... *;echo 
***********************;run usbargs addmtd addip addother;bootm $kernel_base
ethaddr=00:c0:16:00:93:a1
ethact=TSEC0
RTC_bat_low=0
bootfile=/srv/tftp/bison/lexs/uImage
rootpath=/srv/nfs4/bison/lexs
serverip=172.30.0.2
gatewayip=172.30.1.1
ipaddr=172.30.2.208
bootcmd=run nfsboot
stdin=serial
stdout=serial
stderr=serial

Environment size: 2869/8188 bytes
etcunison=> boot
Speed: 100, full duplex
Using TSEC0 device
TFTP from server 172.30.0.2; our IP address is 172.30.2.208
Filename '/srv/tftp/bison/lexs/uImage'.
Load address: 0x800000
Loading: #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #####################
done
Bytes transferred = 3097895 (2f4527 hex)
## Booting kernel from Legacy Image at 00800000 ...
   Image Name:   Linux-4.9.48
   Image Type:   PowerPC Linux Kernel Image (gzip compressed)
   Data Size:    3097831 Bytes =  3 MB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
   Uncompressing Kernel Image ... OK
  • 1) Try find some debug options what could debug the early boot stage of the kernel 2) since roughly 3.x, the Linux changes roughly 2months, which options are needed for a working console/keyboard... doublecheck them... – peterh Sep 28 '17 at 12:11
  • Please include the full log from U-Boot including where you load the image and device tree to, along with kernel args and so forth, thanks! – Tom Rini Sep 28 '17 at 13:49
  • Thanks a lot for your help! Just posted the output of printenv and the boot log in the question. Does that cover everything? – Lex Sandeford Sep 28 '17 at 14:27
  • The version of U-Boot we're using is pre-device tree as this is an update to an existing device. – Lex Sandeford Sep 28 '17 at 15:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.