0

I have problem with starting kernel. I compiled my kernel with am335x-evm_defconfing. Before compilation I added initramfs, and I shown my own rootfs. When the compilations was end, I transfered my zImage to NFS folder. I restarted NFS demon, and turned on Sitara. In main menu u-Boot I executed this command.

setenv bootfile zImage
setenv fdtfile am335x.dtb
setenv serverip <serverip>
dhcp

After this command a whole image was transfered.

tftp ${fdtaddr} ${fdtfile};
bootz ${loadaddr} - ${fdtaddr};

After this command I saw this console lines

#### Flattened Device Tree blob at 80f80000
Booting using the fdt blob at 0x80f80000
Loading Device Tree to 8f321000, end 8f32c4e6 ... OK

Starting kernel ...

And in this stage process was hang. Any suggestion about it.? Maybe I do something wrong.

For append I paste my variables from u-Boot environment.

arch=arm
baudrate=115200
board=am335x
board_name=FLogicSi
board_rev=B.01
boot_fdt=try
boot_targets= mmc0 nand
bootcmd=for target in ${boot_targets}; do run bootcmd_${target}; done
bootcmd_mmc0=setenv devnum 0; setenv rootpart 2; run mmc_boot;
bootcmd_nand=run nandboot;
bootcmd_usb=setenv devnum 0; run usb_boot;
bootdelay=3
bootdir=/boot
bootenv=uEnv.txt
bootfile=kernelDM
bootpart=0:2
console=ttyO0,115200n8
cpu=armv7
dfu_alt_info_emmc=rawemmc mmc 0 3751936
dfu_alt_info_mmc=boot part 0 1;rootfs part 0 2;MLO fat 0 1;MLO.raw mmc 100 100;u-boot.img.raw mmc 300 400;spl-os-args.raw mmc 80 80;spl-os-image.raw mmc 900 2000;spl-o1
dfu_alt_info_nand=NAND.SPL part 0 1;NAND.SPL.backup1 part 0 2;NAND.SPL.backup2 part 0 3;NAND.SPL.backup3 part 0 4;NAND.u-boot-spl-os part 0 5;NAND.u-boot part 0 6;NAND0
dfu_alt_info_ram=kernel ram 0x80200000 0xD80000;fdt ram 0x80F80000 0x80000;ramdisk ram 0x81000000 0x4000000
dnsip=10.0.0.1
eth1addr=d0:ff:50:b3:58:2e
ethact=cpsw
ethaddr=d0:ff:50:b3:58:2c
fdt_high=0xa0000000
fdtaddr=0x80F80000
fdtfile=am335x-flsi-usb.dtb
fileaddr=80f80000
filesize=84e7
findfdt=if test $board_name = A335BONE; then setenv fdtfile am335x-bone.dtb; fi; if test $board_name = A335BNLT; then setenv fdtfile am335x-boneblack.dtb; fi; if test
gatewayip=10.0.0.1
importbootenv=echo Importing environment from mmc ...; env import -t $loadaddr $filesize
ipaddr=10.0.0.32
loadaddr=0x80200000
loadbootenv=load mmc ${mmcdev} ${loadaddr} ${bootenv}
loadfdt=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}
loadimage=load mmc ${bootpart} ${loadaddr} ${bootdir}/${bootfile}
loadramdisk=load mmc ${mmcdev} ${rdaddr} ramdisk.gz
mmc_boot=setenv devtype mmc; if mmc dev ${devnum}; then run mmcargs;run scan_boot; run mmcboot;setenv mmcdev 1; setenv bootpart 1:2; run mmcboot;fi
mmcargs=setenv bootargs console=${console} ${optargs} root=${mmcroot} rootfstype=${mmcrootfstype}
mmcboot=mmc dev ${mmcdev}; if mmc rescan; then echo SD/MMC found on device ${mmcdev};if run loadbootenv; then echo Loaded environment from ${bootenv};run importbootenv;
mmcdev=0
mmcloados=run mmcargs; if test ${boot_fdt} = yes || test ${boot_fdt} = try; then if run loadfdt; then bootz ${loadaddr} - ${fdtaddr}; else if test ${boot_fdt} = try; t;
mmcroot=/dev/mmcblk0p2 ro
mmcrootfstype=ext4 rootwait
mtdids=nand0=nand.0
mtdparts=mtdparts=nand.0:128k(NAND.SPL),128k(NAND.SPL.backup1),128k(NAND.SPL.backup2),128k(NAND.SPL.backup3),256k(NAND.u-boot-spl-os),1m(NAND.u-boot),128k(NAND.u-boot-)
nandargs=setenv bootargs console=${console} ${optargs} root=${nandroot} rootfstype=${nandrootfstype}
nandboot=echo Booting from nand ...; run nandargs; nand read ${fdtaddr} NAND.u-boot-spl-os; nand read ${loadaddr} NAND.kernel; bootz ${loadaddr} - ${fdtaddr}
nandroot=ubi0:rootfs rw ubi.mtd=NAND.file-system,2048
nandrootfstype=ubifs rootwait=1
netargs=setenv bootargs console=${console} ${optargs} root=/dev/nfs 
nfsroot=${serverip}:${rootpath},${nfsopts} rw ip=dhcp
netboot=echo Booting from network ...; setenv autoload no; dhcp; tftp ${loadaddr} ${bootfile}; tftp ${fdtaddr} ${fdtfile}; run netargs; bootz ${loadaddr} - ${fdtaddr}
netmask=255.0.0.0
nfsopts=nolock
partitions=uuid_disk=${uuid_gpt_disk};name=rootfs,start=2MiB,size=-,uuid=${uuid_gpt_rootfs}
ramargs=setenv bootargs console=${console} ${optargs} root=${ramroot}
rootfstype=${ramrootfstype}
ramboot=echo Booting from ramdisk ...; run ramargs; bootz ${loadaddr} ${rdaddr} ${fdtaddr}
ramroot=/dev/ram0 rw ramdisk_size=65536 initrd=${rdaddr},64M
ramrootfstype=ext2
rdaddr=0x81000000
rootpart=2
rootpath=/export/rootfs
scan_boot=echo Scanning ${devtype} ${devnum}...; for prefix in ${bootdir}; do for script in ${bootfile}; do run script_boot; done; done;
script_boot=if load ${devtype} ${devnum}:${rootpart} ${loadaddr} ${bootdir}/${bootfile}; then run findfdt; load ${devtype} ${devnum}:${rootpart} ${fdtaddr} ${bootdir}/;
serverip=10.0.0.10
soc=am33xx
spiargs=setenv bootargs console=${console} ${optargs} root=${spiroot} rootfstype=${spirootfstype}
spiboot=echo Booting from spi ...; run spiargs; sf probe ${spibusno}:0; sf read ${loadaddr} ${spisrcaddr} ${spiimgsize}; bootz ${loadaddr}
spibusno=0
spiimgsize=0x362000
spiroot=/dev/mtdblock4 rw
spirootfstype=jffs2
spisrcaddr=0xe0000
static_ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off
stderr=serial
stdin=serial
stdout=serial
usb_boot=setenv devtype usb; run usb_init; if usb dev 0; then run usbargs;run scan_boot; bootz ${loadaddr} - ${fdtaddr}; fi
usb_init=usb start 0;
usbargs=setenv bootargs console=${console} ${optargs} root=${usbroot} rootfstype=${usbrootfstype}
usbnet_devaddr=d0:ff:50:b3:58:2e
usbroot=/dev/sda2 rw
usbrootfstype=ext4 rootwait
vendor=ti
ver=U-Boot 2013.10-00189-g78d8ebd-dirty (Oct 15 2014 - 17:35:33)

Environment size: 5565/131067 bytes

This is output of printenv. I think variable console is correct.

And in the menuconfig of the kernel i have this value:

root=/dev/mmcblk0p2 rootwait console=ttyO0,115200 

BR

Daniel

ADDENDUM -- Console Log for transfer

U-Boot# setenv bootfile kernelDM
U-Boot# setenv fdtfile am335x-flsi-usb.dtb
U-Boot# setenv serverip 10.0.0.10
U-Boot# dhcp 
link up on port 0, speed 1000, full duplex 
BOOTP broadcast 1 
DHCP client bound to address 10.0.0.32 
Using cpsw device TFTP from server 10.0.0.10; our IP address is 10.0.0.32 
Filename 'kernelDM'. 
Load address: 0x80200000 
Loading: ################# ... ### 2.4 MiB/s 
done 
Bytes transferred = 29544136 (1c2cec8 hex) 
sawdust
  • 16,103
  • 3
  • 40
  • 50
MarCovy
  • 17
  • 9
  • The output `Starting kernel ...` indicates that the decompression of the zImage is hanging. How large is the initramfs, and what's the total size of the transferred image? *"I transfered my zImage to NFS folder."* -- You should be using the TFTP server's directory. You're using TFTP not NFS. – sawdust Jan 23 '15 at 19:40
  • @sawdust The size of my zImage is 28852K. I show you log transfer from console. U-Boot# setenv bootfile kernelDM U-Boot# setenv fdtfile am335x-flsi-usb.dtb U-Boot# setenv serverip 10.0.0.10 U-Boot# dhcp link up on port 0, speed 1000, full duplex BOOTP broadcast 1 DHCP client bound to address 10.0.0.32 Using cpsw device TFTP from server 10.0.0.10; our IP address is 10.0.0.32 Filename 'kernelDM'. Load address: 0x80200000 Loading: #################### 2.4 MiB/s done Bytes transferred = 29544136 (1c2cec8 hex) The hash pattern was longer, and I must reduced him. – MarCovy Jan 28 '15 at 07:50
  • @artlessnoise Yes, I did. I transfered my zImage. I described it in above comment. – MarCovy Jan 28 '15 at 07:52
  • Why did you show "zImage" as the bootfile name, and then "kernelDM"? Where did "kernelDM" come from? Why is it so large? I've had issues with such large uImage+initramfs, and had get rid of the initramfs. BTW @artlessnoise this issue is probably too early for CONFIG_DEBUG_LL or anything else in kernel to have any effect. – sawdust Jan 28 '15 at 19:15
  • @sawdust See [debug decompression stage](http://stackoverflow.com/questions/9575817/debug-linux-kernel-pre-decompression-stage). I think I had this conversation with you before? You may need to enable some tracing in the decompressor code by defining/uncommenting some code. The assembler macros for DEBUG_LL will work at any stage of boot on the ARM Linux, if the mach/SOC supports it. See [compressed head.S](https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/arch/arm/boot/compressed/head.S) and look for DEBUG. You are correct, that it could be a u-boot issue. Who knows? – artless noise Jan 28 '15 at 19:30
  • @artlessnoise - I don't recall a prior conversation with you. It's been over a year since I looked at uncompression code, so if there's DEBUG stuff in there then of course the OP should try it. I'm only aware of a [Freescale requirement](http://stackoverflow.com/questions/18378563/how-do-i-find-arm-linux-entry-point-when-it-fails-to-uncompress/18392238#18392238). I didn't claim it's a U-Boot issue, but rather not a kernel issue. I consider the built-in decompression code for kernel boot to be separate from the kernel, i.e. it's code executed prior to reaching the kernel *entry* address – sawdust Jan 28 '15 at 19:49
  • @sawdust [Arm Linux entry...](http://stackoverflow.com/questions/18378563/how-do-i-find-arm-linux-entry-point-when-it-fails-to-uncompress) has a comment at the bottom. At least with stock kernels on many ARM platforms, you can debug the de-compressor. If you are actually a programmer, you can port the DEBUG_LL code. Does the OP have some bizarre stuff? He can also put some code in [the u-boot image to printout easily](http://git.denx.de/?p=u-boot.git;a=blob;f=arch/arm/lib/bootm.c#l66); just use a `printf`? – artless noise Jan 28 '15 at 20:21

0 Answers0