最近在移植am335x的板子,内核为sdk内的4.1.18,uboot是2014.7。
uboot启动没有问题,但是在最后starting kernel的时候卡住了。
在网上找到了一些方案比方说修改disable掉RTC(3.12.xx),在commandline里面选择ttyO0(使用的板子是在这个串口上),但是还是没有输出。
我的dtb文件出错会导致这一类的问题吗?还是说是我的内核编译的时候出现的问题。
以下是我编译的步骤:
./scripts/kconfig/merge_config.sh -m arch/arm/configs/omap2plus_defconfig ti_config_fragments/ipc.cfg ti_config_fragments/power.cfg ti_config_fragments/audio_display.cfg ti_config_fragments/system_test.cfg ti_config_fragments/baseport.cfg ti_config_fragments/wlan.cfg ti_config_fragments/connectivity.cfg ti_config_fragments/auto.cfg
make menuconfig ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf-
在这一步,disable掉了RTC。
make -j4 uImage ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- LOADADDR=0x80008000
生成没有问题,但是无法启动。
以下是我的uEnv.txt
bootargs=console=ttyO0,115200n8 root=/dev/mmcblk0p2 rw rootfstype=ext4 mem=512M coherent_pool=8M rootwait loglevel=20
bootcmd=fatls mmc 0; fatload mmc 0 0x82000000 uImage;fatload mmc 0 0x80F80000 am335x-evm.dtb;bootm 0x82000000 - 0x80F80000
uenvcmd=fatls mmc 0; fatload mmc 0 0x82000000 uImage;fatload mmc 0 0x80F80000 am335x-evm.dtb;bootm 0x82000000 - 0x80F80000
这是我uboot启动时打印的:
U-Boot 2014.07 (Jun 03 2016 - 15:16:17)
I2C: ready
DRAM: 512 MiB
NAND: 0 MiB
MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1
*** Warning - readenv() failed, using default environment
Net: <ethaddr> not set. Validating first E-fuse MAC
cpsw, usb_ether
Hit any key to stop autoboot: 0
WARNING: Could not determine device tree to use
switch to partitions #0, OK
mmc0 is current device
SD/MMC found on device 0
reading uEnv.txt
364 bytes read in 4 ms (88.9 KiB/s)
Loaded environment from uEnv.txt
Importing environment from mmc ...
Running uenvcmd ...
97937 mlo
441764 u-boot.img
3500680 uimage
364 uenv.txt
39995 am335x-evm.dtb
1559 readme.txt
6 file(s), 0 dir(s)
reading uImage
3500680 bytes read in 202 ms (16.5 MiB/s)
reading am335x-evm.dtb
39995 bytes read in 10 ms (3.8 MiB/s)
## Booting kernel from Legacy Image at 82000000 ...
Image Name: Linux-4.1.18Barney-gbbe8cfc
Created: 2016-06-07 16:55:16 UTC
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 3500616 Bytes = 3.3 MiB
Load Address: 80008000
Entry Point: 80008000
Verifying Checksum ... OK
## Flattened Device Tree blob at 80f80000
Booting using the fdt blob at 0x80f80000
Loading Kernel Image ... OK
Loading Device Tree to 8fff3000, end 8ffffc3a ... OK
Starting kernel ...