4

I would like to know how to set the correct MACH_TYPE or arch_id for the kernel. I searched and found at least 2 references where the kernel would hang at "Starting Kernel ... ". These came with the same answer. Correctly set your Machine Type. But then neither mentions how to do so. Anyone know how to do this?

Pretty good explanation for the hang. and Another good description.

Both of these are close to what I am experiencing when I try to boot my kernel. It gets stuck on "Starting Kernel..." and won't continue. I have built the kernel several times from .configs that were supposed to be exactly for my model.

Timesys (LinuxLink) provides a .config that is supposed to match the kernel that they provide with their free build service. But that doesn't work either. If I use their pre-built kernel it boots up no problem. So I know it is not my u-boot or how I have configured my SD-card. The problem must come from the kernel build.

I run my make like: make ARCH=arm CROSS_COMPILE=${PATH_TO_TOOLCHAIN}/bin/armv7l-timesys-linux-gnueabi- uImage and make my image as follows: sudo mkimage -A arm -O linux -T kernel -C none -a 0x70800000 -e 0x70800000 -n "Linux-2.6.35-ts-armv7l" -d arch/arm/boot/uImage ../../uImage

I am working with a Freescale i.MX53 Eval Board. When I try to run the kernel:

U-Boot 2009.08-dirty (Aug 02 2013 - 19:57:03)

CPU:   Freescale i.MX53 family 2.1V at 800 MHz
mx53 pll1: 800MHz
mx53 pll2: 400MHz
mx53 pll3: 432MHz
mx53 pll4: 455MHz
ipg clock     : 66666666Hz
ipg per clock : 33333333Hz
uart clock    : 66666666Hz
cspi clock    : 108000000Hz
ahb clock     : 133333333Hz
axi_a clock   : 400000000Hz
axi_b clock   : 200000000Hz
emi_slow clock: 133333333Hz
ddr clock     : 400000000Hz
esdhc1 clock  : 80000000Hz
esdhc2 clock  : 80000000Hz
esdhc3 clock  : 80000000Hz
esdhc4 clock  : 80000000Hz
nfc clock     : 26666666Hz

Board: MX53-LOCO 1.0 Rev. B
Boot Reason: [POR]
Boot Device: SD
I2C:   ready
DRAM:   1 GB
MMC:   FSL_ESDHC: 0,FSL_ESDHC: 1
In:    serial
Out:   serial
Err:   serial
Serial reinitilized!
Net:   got MAC address from IIM: 00:04:9f:01:f7:ce
FEC0 [PRIME]
Hit any key to stop autoboot:  0
mmc0 is current device

MMC read: dev # 0, block # 2048, count 8192 ... 8192 blocks read: OK
## Booting kernel from Legacy Image at 70800000 ...
Image Name:   Linux-2.6.35-ts-armv7l
Image Type:   ARM Linux Kernel Image (uncompressed)
Data Size:    2999932 Bytes =  2.9 MB
Load Address: 70800000
Entry Point:  70800000
Verifying Checksum ... OK
XIP Kernel Image ... OK
OK

Starting kernel ...

u-boot env:

bootdelay=3
baudrate=115200
netdev=eth0
ethprime=FEC0
uboot=u-boot.bin
kernel=uImage
nfsroot=/opt/eldk/arm
bootargs_base=setenv bootargs console=ttymxc0,115200
bootargs_nfs=setenv bootargs ${bootargs} root=/dev/nfs ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp
bootcmd_net=run bootargs_base bootargs_nfs; tftpboot ${loadaddr} ${kernel}; bootm
bootcmd=run bootcmd_mmc
ethact=FEC0
lcd=video=mxcdi0fb:RGB24,SEIKO-WVGA di0_primary
bootargs_mmc=setenv bootargs ${bootargs} gpu_nommu ${lcd} ip=dhcp root=/dev/mmcblk0p1 rootwait rw
bootargs=console=ttymxc0,115200 gpu_nommu video=mxcdi0fb:RGB24,SEIKO-WVGA di0_primary ip=dhcp root=/dev/mmcblk0p1 rootwait rw
bootcmd_mmc=run bootargs_base bootargs_mmc; mmc dev 0; mmc read ${loadaddr} 0x800 0x2000; bootm
loadaddr=0x70800000
stdin=serial
stdout=serial
stderr=serial
Community
  • 1
  • 1
CaptainBli
  • 4,121
  • 4
  • 39
  • 58
  • 2
    Does your machine support `earlyprintk`? If so, you could enable it and access more debug output. – eepp Sep 05 '13 at 18:19
  • 4
    When you "make uImage", the kernel already runs mkimage for you. You are putting a header on a header and I think your hang is because you are trying to execute a header rather than the kernel entry code... (uImage being the name for a zImage with a u-boot header prepended) – unixsmurf Sep 05 '13 at 18:41
  • 2
    The pre-kernel-boot code for Freescale is a bit different than other ARM SoCs in that the machine ID is used to specify the serial port during decompression. If the machine ID is not recognized, then there's a 50/50 chance that the `putc()` code will hang. Please show more of that U-Boot output. So you install the uImage to an SD card? What is your `bootdef` variable? @unixsmurf has pointed out an issue that needs resolving first. Do an `od` on the beginning of the uImage to see if you really have a double header. – sawdust Sep 05 '13 at 18:58
  • I am checking the double header now. – CaptainBli Sep 05 '13 at 19:05
  • @eepp I seem to have trouble getting the earlyprintk to compile. I will keep working on that. Shouldn't take too long. – CaptainBli Sep 05 '13 at 19:35
  • earlyprintk is not going to help this issue. This uncompression is taking place well before those options can take effect. – sawdust Sep 05 '13 at 19:43
  • @unixsmurf and @sawdust I went back to the uImage and took the one built from the `make uImage` and left my `bootargs` the same and now it is booting up. I would like to give credit for the "double header" answers. – CaptainBli Sep 05 '13 at 19:47

1 Answers1

3

The issue is that a double u-boot header has been applied to the image. As per unixsmurf.

Community
  • 1
  • 1
artless noise
  • 21,212
  • 6
  • 68
  • 105