大家好,我的AM335X在启动时在longin时两个串口同时有console信息输出,什么原因呢?
如下:
_____ _____ _ _
| _ |___ ___ ___ ___ | _ |___ ___ |_|___ ___| |_
| | _| .'| . | . | | __| _| . | | | -_| _| _|
|__|__|_| |__,|_ |___| |__| |_| |___|_| |___|___|_|
|___| |___|
Arago Project http://arago-project.org am335x-evm ttyO3
Arago 2016.10 am335x-evm ttyO3
am335x-evm login:
_____ _____ _ _
| _ |___ ___ ___ ___ | _ |___ ___ |_|___ ___| |_
| | _| .'| . | . | | __| _| . | | | -_| _| _|
|__|__|_| |__,|_ |___| |__| |_| |___|_| |___|___|_|
|___| |___|
Arago Project http://arago-project.org am335x-evm ttyO0
Arago 2016.10 am335x-evm ttyO0
am335x-evm login:
两个串口同时有!!!
环境变量里console只有ttyO0,如下:
U-Boot SPL 2016.05-00304-gad06f64-dirty (Apr 24 2017 – 08:59:39)
Core Clock:1000 MHz,Mpu Clock 600 MHz
Trying to boot from MMC1
reading args
spl_load_image_fat_os: error reading image args, err – -1
reading u-boot.img
reading u-boot.img
reading u-boot.img
reading u-boot.img
U-Boot 2016.05-00304-gad06f64-dirty (Apr 24 2017 – 08:59:39 +0800)
CPU : AM335X-GP rev 2.1
Model: TI AM335x HXDW
Watchdog enabled
DRAM: 256 MiB
NAND: 256 MiB
MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1
reading uboot.env
Net: Could not get PHY for ethernet@4a100000: addr 0
eth0: ethernet@4a100000
Warning: usb_ether MAC addresses don't match:
Address in SROM is de:ad:be:ef:00:01
Address in environment is 84:eb:18:bd:a8:9e
, eth1: usb_ether
Press SPACE to abort autoboot in 2 seconds
hxdw:/>pr
arch=arm
args_fit=setenv bootargs console=${console}
args_mmc=run finduuid;setenv bootargs console=${console} ${optargs} root=PARTUUI
D=${uuid} rw rootfstype=${mmcrootfstype}
baudrate=115200
board=am335x_hxdw
board_name=kx[|LM=hsoc
board_rev=[|LM=hsoc
board_serial=LM=hsoc
boot_a_script=load ${devtype} ${devnum}:${distro_bootpart} ${scriptaddr} ${prefi
x}${script}; source ${scriptaddr}
boot_efi_binary=load ${devtype} ${devnum}:${distro_bootpart} ${kernel_addr_r} ef
i/boot/bootarm.efi; if fdt addr ${fdt_addr_r}; then bootefi ${kernel_addr_r} ${f
dt_addr_r};elsebootefi ${kernel_addr_r} ${fdtcontroladdr};fi
boot_extlinux=sysboot ${devtype} ${devnum}:${distro_bootpart} any ${scriptaddr}
${prefix}extlinux/extlinux.conf
boot_fdt=try
boot_fit=0
boot_net_usb_start=usb start
boot_prefixes=/ /boot/
boot_script_dhcp=boot.scr.uimg
boot_scripts=boot.scr.uimg boot.scr
boot_targets=mmc0 legacy_mmc0 mmc1 legacy_mmc1 nand0 pxe dhcp
bootcmd=run updatesys;run nandbootdebug
bootcmd_dhcp=run boot_net_usb_start; if dhcp ${scriptaddr} ${boot_script_dhcp};
then source ${scriptaddr}; fi
bootcmd_legacy_mmc0=setenv mmcdev 0; setenv bootpart 0:2 ; run mmcboot
bootcmd_legacy_mmc1=setenv mmcdev 1; setenv bootpart 1:2 ; run mmcboot
bootcmd_mmc0=setenv devnum 0; run mmc_boot
bootcmd_mmc1=setenv devnum 1; run mmc_boot
bootcmd_nand=run nandboot
bootcmd_pxe=run boot_net_usb_start; dhcp; if pxe get; then pxe boot; fi
bootcount=1
bootdelay=2
bootdir=/boot
bootenvfile=uEnv.txt
bootfile=zImage
bootm_size=0x10000000
bootpart=0:2
bootscript=echo Running bootscript from mmc${mmcdev} …; source ${loadaddr}
console=ttyO0,115200n8
cpu=armv7
dfu_alt_info_emmc=rawemmc raw 0 3751936
dfu_alt_info_mmc=boot part 0 1;rootfs part 0 2;MLO fat 0 1;MLO.raw raw 0x100 0x1
00;u-boot.img.raw raw 0x300 0x400;spl-os-args.raw raw 0x80 0x80;spl-os-image.raw
raw 0x900 0x2000;spl-os-args fat 0 1;spl-os-image fat 0 1;u-boot.img fat 0 1;uE
nv.txt fat 0 1
dfu_alt_info_nand=SPL part 0 1;SPL.backup1 part 0 2;SPL.backup2 part 0 3;SPL.bac
kup3 part 0 4;u-boot part 0 5;u-boot-spl-os part 0 6;kernel part 0 8;rootfs part
0 9
dfu_alt_info_ram=kernel ram 0x80200000 0xD80000;fdt ram 0x80F80000 0x80000;ramdi
sk ram 0x81000000 0x4000000
distro_bootcmd=for target in ${boot_targets}; do run bootcmd_${target}; done
efi_dtb_prefixes=/ /dtb/ /dtb/current/
envboot=mmc dev ${mmcdev}; if mmc rescan; then echo SD/MMC found on device ${mmc
dev};if run loadbootscript; then run bootscript;else if run loadbootenv; then ec
ho Loaded env from ${bootenvfile};run importbootenv;fi;if test -n $uenvcmd; then
echo Running uenvcmd …;run uenvcmd;fi;fi;fi;
eth1addr=84:eb:18:bd:a8:9e
ethaddr=84:eb:18:bd:a8:9c
fdt_addr_r=0x88000000
fdtaddr=0x88000000
fdtcontroladdr=8ef15ed8
fdtfile=am335x-hxdw.dtb
fileaddr=81000000
filesize=34b010
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; i
f test $board_name = BBG1; then setenv fdtfile am335x-bonegreen.dtb; fi; 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 =
A335_ICE; then setenv fdtfile am335x-icev2.dtb; fi; if test $board_name = AM335
X_HXDW; then setenv fdtfile am335x-hxdw.dtb; fi; if test $fdtfile = undefined; t
hen echo WARNING: Could not determine device tree to use; fi;
finduuid=part uuid mmc ${bootpart} uuid
fit_bootfile=fitImage.itb
fit_loadaddr=0x88000000
importbootenv=echo Importing environment from mmc${mmcdev} …; env import -t ${
loadaddr} ${filesize}
init_console=if test $board_name = A335_ICE; then setenv console ttyO3,115200n8;
else setenv console ttyO0,115200n8;fi;
kernel_addr_r=0x82000000
load_efi_dtb=load ${devtype} ${devnum}:${distro_bootpart} ${fdt_addr_r} ${prefix
}${efi_fdtfile}
loadaddr=0x82000000
loadbootenv=fatload mmc ${mmcdev} ${loadaddr} ${bootenvfile}
loadbootscript=load mmc ${mmcdev} ${loadaddr} boot.scr
loadfdt=load ${devtype} ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}
loadfit=run args_fit; bootm ${loadaddr}#${fdtfile};
loadimage=load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/${bootfile}
loadramdisk=load mmc ${mmcdev} ${rdaddr} ramdisk.gz
mmc_boot=if mmc dev ${devnum}; then setenv devtype mmc; run scan_dev_for_boot_pa
rt; fi
mmcboot=mmc dev ${mmcdev}; setenv devnum ${mmcdev}; setenv devtype mmc; if mmc r
escan; then echo SD/MMC found on device ${mmcdev};if run loadimage; then if test
${boot_fit} -eq 1; then run loadfit; else run mmcloados;fi;fi;fi;
mmcbootdebug=run nandargs_debug;load mmc 0 ${fdtaddr} ${fdtfile};load mmc 0 ${lo
adaddr} zImage;bootz ${loadaddr} – ${fdtaddr};
mmcdev=0
mmcloados=run args_mmc; if test ${boot_fdt} = yes || test ${boot_fdt} = try; the
n if run loadfdt; then bootz ${loadaddr} – ${fdtaddr}; else if test ${boot_fdt}
= try; then bootz; else echo WARN: Cannot load the DT; fi; fi; else bootz; fi;
mmcrootfstype=ext4 rootwait
mtdids=nand0=nand.0
mtdparts=mtdparts=nand.0:128k(NAND.SPL),128k(NAND.SPL.backup1),128k(NAND.SPL.bac
kup2),128k(NAND.SPL.backup3),256k(NAND.u-boot-spl-os),1m(NAND.u-boot),128k(NAND.
u-boot-env),128k(NAND.u-boot-env.backup1),8m(NAND.kernel),-(NAND.file-system)
nandargs=setenv bootargs console=${console} ${optargs} root=${nandroot} rootfsty
pe=${nandrootfstype}
nandargs_debug=setenv bootargs console=${console} ${optargs} root=${nandroot} ro
otfstype=${nandrootfstype}
nandboot=echo Booting from nand …; run nandargs; nand read ${fdtaddr} NAND.u-b
oot-spl-os; nand read ${loadaddr} NAND.kernel; bootz ${loadaddr} – ${fdtaddr}
nandbootdebug=echo Booting from nand(Debug) …; run nandargs_debug; nand read $
{fdtaddr} NAND.u-boot-spl-os; nand read ${loadaddr} NAND.kernel; bootz ${loadadd
r} – ${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=${se
rverip}:${rootpath},${nfsopts} rw ip=dhcp
netboot=echo Booting from network …; setenv autoload no; dhcp; run netloadimag
e; run netloadfdt; run netargs; bootz ${loadaddr} – ${fdtaddr}
netloadfdt=tftp ${fdtaddr} ${fdtfile}
netloadimage=tftp ${loadaddr} ${bootfile}
nfsopts=nolock
partitions=uuid_disk=${uuid_gpt_disk};name=rootfs,start=2MiB,size=-,uuid=${uuid_
gpt_rootfs}
pxefile_addr_r=0x80100000
ramargs=setenv bootargs console=${console} ${optargs} root=${ramroot} rootfstype
=${ramrootfstype}
ramboot=echo Booting from ramdisk …; run ramargs; bootz ${loadaddr} ${rdaddr}
${fdtaddr}
ramdisk_addr_r=0x88080000
ramroot=/dev/ram0 rw
ramrootfstype=ext2
rdaddr=0x88080000
rootpath=/export/rootfs
scan_dev_for_boot=echo Scanning ${devtype} ${devnum}:${distro_bootpart}…; for
prefix in ${boot_prefixes}; do run scan_dev_for_extlinux; run scan_dev_for_scrip
ts; done;run scan_dev_for_efi;
scan_dev_for_boot_part=part list ${devtype} ${devnum} -bootable devplist; env ex
ists devplist || setenv devplist 1; for distro_bootpart in ${devplist}; do if fs
type ${devtype} ${devnum}:${distro_bootpart} bootfstype; then run scan_dev_for_b
oot; fi; done
scan_dev_for_efi=setenv efi_fdtfile ${fdtfile}; if test -z "${fdtfile}" -a -n "$
{soc}"; then setenv efi_fdtfile ${soc}-${board}${boardver}.dtb; fi; for prefix i
n ${efi_dtb_prefixes}; do if test -e ${devtype} ${devnum}:${distro_bootpart} ${p
refix}${efi_fdtfile}; then run load_efi_dtb; fi;done;if test -e ${devtype} ${dev
num}:${distro_bootpart} efi/boot/bootarm.efi; then echo Found EFI removable medi
a binary efi/boot/bootarm.efi; run boot_efi_binary; echo EFI LOAD FAILED: contin
uing…; fi; setenv efi_fdtfile
scan_dev_for_extlinux=if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefi
x}extlinux/extlinux.conf; then echo Found ${prefix}extlinux/extlinux.conf; run b
oot_extlinux; echo SCRIPT FAILED: continuing…; fi
scan_dev_for_scripts=for script in ${boot_scripts}; do if test -e ${devtype} ${d
evnum}:${distro_bootpart} ${prefix}${script}; then echo Found U-Boot script ${pr
efix}${script}; run boot_a_script; echo SCRIPT FAILED: continuing…; fi; done
scriptaddr=0x80000000
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@44e09000
stdin=serial@44e09000
stdout=serial@44e09000
ubifs_boot=if ubi part UBI && ubifsmount ubi${devnum}:boot; then setenv devtype
ubi; setenv bootpart 0; run scan_dev_for_boot; fi
update_to_fit=setenv loadaddr ${fit_loadaddr}; setenv bootfile ${fit_bootfile}
updateall= run findfdt; nand erase.chip;mmc rescan; fatload mmc 0 81000000 MLO_n
and; cp.b 0x81000000 0x81020000 20000; cp.b 0x81000000 0x81040000 20000; cp.b 0x
81000000 0x81060000 20000; fatload mmc 0 0x81080000 ${fdtfile}; fatload mmc 0 0x
810C0000 u-boot_nand.img; nand write 0x81000000 0x0 200000;fatload mmc 0 0x81000
000 zImage; nand write 0x81000000 0x200000 ${filesize}; fatload mmc 0 0x81000000
ubi.img; nand write 0x81000000 0xA00000 ${filesize}; saveenv; echo ************
************************************* ; echo *—–UpdateSystem and Filesystem C
ompleted!—-* ; echo *-Please Remove TF/SD Card, Power Off, Power On-* ;
updatesys= run findfdt; nand erase 0x0 0xA00000;mmc rescan; fatload mmc 0 810000
00 MLO_nand; cp.b 0x81000000 0x81020000 20000; cp.b 0x81000000 0x81040000 20000;
cp.b 0x81000000 0x81060000 20000; fatload mmc 0 0x81080000 ${fdtfile}; fatload
mmc 0 0x810C0000 u-boot_nand.img; nand write 0x81000000 0x0 200000;fatload mmc 0
0x81000000 zImage; nand write 0x81000000 0x200000 ${filesize}; saveenv; echo **
*********************************************** ; echo *————UpdateSystem
Completed!————* ; echo *-Please Remove TF/SD Card, Power Off, Power On-
* ; echo ************************************************* ;
usb_boot=usb start; if usb dev ${devnum}; then setenv devtype usb; run scan_dev_
for_boot_part; fi
usbnet_devaddr=de:ad:be:ef:00:01
vendor=ti
ver=U-Boot 2016.05-00304-gad06f64-dirty (Apr 24 2017 – 08:59:39 +0800)
Environment size: 10480/131068 bytes
hxdw:/>printenv console
console=ttyO0,115200n8
Zhihua Zhang:
解决了,关闭rootfs的console功能!这个问题真有点坑,不知道TI SDK包里的文件系统为什么要搞个这玩意,害我查了一个星期!
即将/etc/systemd/system/getty.target.wants/serial-getty@ttyO3.service文件删除或者重命名!
Jian Zhou:
回复 Zhihua Zhang:
你用的是哪个版本的SDK啊?印象里我们的SDK都是只使能一个串口,UART0。
Zhihua Zhang:
回复 Jian Zhou:
ti-processor-sdk-linux-am335x-evm-03.02.00.05
TI中文支持网