I try to crosscompile the linux kernel 3.14 much time for my beaglebone black with different ARCH(x64, i386) and different toolchain. But none of them can start correctly. It always stop at
## Booting kernel from Legacy Image at 80007fc0 ...
Image Name: Linux-3.17.1+
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 6732680 Bytes = 6.4 MiB
Load Address: 80008000
Entry Point: 80008000
Verifying Checksum ... OK
## Flattened Device Tree blob at 80f80000
Booting using the fdt blob at 0x80f80000
XIP Kernel Image ... OK
OK
Using Device Tree in place at 80f80000, end 80f92df6
Starting kernel ...
I think I use a incorrect toolchain, So I try to use the toolchain in ti StarsWares and linaro-toolchain. But it still not work. I also think I need to use 32bit ubuntu instead of my ubuntu 14.10(64bit), but it still not work.
finally, I try to compile an sample c program and try to run it on my beaglebone. it says:
root@beaglebone:~\# ./test
-sh: ./test: No such file or directory
it seems I use incorrect toolchain.
I try to use the the kernel config file on:
git://github.com/beagleboard/kernel.git
but it still stop at:
Starting kernel ...
My crosscompile tool chain was.
My kernel build command was:
make ARCH=arm CROSS_COMPILE=/home/larry/develop/linaro-toolchain/gcc-linaro-arm-linux-gnueabihf-4.9-2014.09_linux/bin/arm-linux-gnueabihf-
make modules ARCH=arm CROSS_COMPILE=/home/larry/develop/linaro-toolchain/gcc-linaro-arm-linux-gnueabihf-4.9-2014.09_linux/bin/arm-linux-gnueabihf-
make modules_install INSTALL_MOD_PATH=mymodules ARCH=arm CROSS_COMPILE=/home/larry/develop/linaro-toolchain/gcc-linaro-arm-linux-gnueabihf-4.9-2014.09_linux/bin/arm-linux-gnueabihf-
make LOADADDR=0x80008000 uImage dtbs ARCH=arm CROSS_COMPILE=/home/larry/develop/linaro-toolchain/gcc-linaro-arm-linux-gnueabihf-4.9-2014.09_linux/bin/arm-linux-gnueabihf-
kernel .config was here:
My U-Boot config was:
`U-Boot# printenv
arch=arm
baudrate=115200
board=am335x
board_name=A335BNLT
board_rev=000B
bootcmd=gpio set 53; i2c mw 0x24 1 0x3e; run findfdt; mmc dev 0; if mmc rescan ; then echo micro SD card found;setenv mmcdev 0;else echo No micro SD card found, setting mmcdev to 1;setenv mmcdev 1;fi;setenv bootpart ${mmcdev}:2;mmc dev ${mmcdev}; if mmc rescan; then gpio set 54; echo SD/MMC found on device ${mmcdev};if run loadbootenv; then echo Loaded environment from ${bootenv};run importbootenv;fi;if test -n $uenvcmd; then echo Running uenvcmd ...;run uenvcmd;fi;gpio set 55; if run loaduimage; then gpio set 56; run loadfdt;run mmcboot;fi;fi;
bootdelay=1
bootdir=/boot
bootenv=uEnv.txt
bootfile=uImage
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 3C0;u-boot.img fat 0 1;uEnv.txt fat 0 1
dfu_alt_info_nand=SPL part 0 1;SPL.backup1 part 0 2;SPL.backup2 part 0 3;SPL.backup3 part 0 4;u-boot part 0 5;kernel part 0 7;rootfs part 0 8
ethact=cpsw
ethaddr=1c:ba:8c:95:c8:fa
fdt_high=0xffffffff
fdtaddr=0x80F80000
fdtfile=am335x-boneblack.dtb
findfdt=if test $board_name = A33515BB; then setenv fdtfile am335x-evm.dtb; fi; if test $board_name = A335X_SK; then setenv fdtfile am335x-evmsk.dtb; fi;if test $board_name = A335BONE; then setenv fdtfile am335x-bone.dtb; fi; if test $board_name = A335BNLT; then setenv fdtfile am335x-boneblack.dtb; fi
importbootenv=echo Importing environment from mmc ...; env import -t $loadaddr $filesize
kloadaddr=0x80007fc0
loadaddr=0x80200000
loadbootenv=load mmc ${mmcdev} ${loadaddr} ${bootenv}
loadfdt=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}
loadramdisk=load mmc ${mmcdev} ${rdaddr} ramdisk.gz
loaduimage=load mmc ${bootpart} ${kloadaddr} ${bootdir}/${bootfile}
mmcargs=setenv bootargs console=${console} ${optargs} root=${mmcroot}
rootfstype=${mmcrootfstype}
mmcboot=echo Booting from mmc ...; run mmcargs; bootm ${kloadaddr} - ${fdtaddr}
mmcdev=0
mmcroot=/dev/mmcblk0p2 ro
mmcrootfstype=ext4 rootwait
mtdids=nand0=omap2-nand.0
mtdparts=mtdparts=omap2-nand.0:128k(SPL),128k(SPL.backup1),128k(SPL.backup2),128k(SPL.backup3),1920k(u-boot),128k(u-boot-env),5m(kernel),-(rootfs)
nandargs=setenv bootargs console=${console} ${optargs} root=${nandroot}
rootfstype=${nandrootfstype}
nandboot=echo Booting from nand ...; run nandargs; nand read ${loadaddr} ${nandsrcaddr} ${nandimgsize}; bootm ${loadaddr}
nandimgsize=0x500000
nandroot=ubi0:rootfs rw ubi.mtd=7,2048
nandrootfstype=ubifs rootwait=1
nandsrcaddr=0x280000
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; bootm ${loadaddr} - ${fdtaddr}
nfsopts=nolock
ramargs=setenv bootargs console=${console} ${optargs} root=${ramroot}
rootfstype=${ramrootfstype}
ramboot=echo Booting from ramdisk ...; run ramargs; bootm ${loadaddr} ${rdaddr} ${fdtaddr}
ramroot=/dev/ram0 rw ramdisk_size=65536 initrd=${rdaddr},64M
ramrootfstype=ext2
rdaddr=0x81000000
rootpath=/export/rootfs
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}; bootm ${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
usbnet_devaddr=1c:ba:8c:95:c8:fa
vendor=ti
ver=U-Boot 2013.04-dirty (Jun 19 2013 - 09:57:14)
Environment size: 3877/131068 bytes
It spend my to much time. Anyone Can help me? Thanks.
0x80007fc0
seem typical for Beaglebone, but not other ARM boards. Try loading the uImage to0x80200000
and the DTB to0x81200000
as described here. These addresses have to be modified in the bootcmd U-Boot environment variable. – sawdust-static
GCC compile/link option. – sawdust0x81200000
in the uboot, but it still stop atStarting kernel
, I use the uboot default config, it can boot thekernel-3.8
(system default), but can't boot from mykernel-3.17
(compile by me). @sawdust – larry