am335x 调试命令记录





setenv serverip 192.168.1.103
setenv ipaddr 192.168.1.10


setenv bootargs  "noinitrd root=/dev/nfs nfsroot=192.168.1.103:/root/Music/rootfs ip=192.168.1.10"




setenv bootargs  console=ttyO0,115200n8 root=/dev/nfs nfsroot=192.168.1.103:/root/Music/rootfs,nolock rw ip=dhcp


ip_method=thcp


forling: uboot


make CROSS_COMPILE=arm-arago-linux-gnueabi- distclean
  make  CROSS_COMPILE=arm-arago-linux-gnueabi- -j4  ok335x_config




forlinx kernel
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- uImage LOADADDR=0x80008000






uboot :
make CROSS_COMPILE=arm-linux-gnueabihf- distclean
     
  make CROSS_COMPILE=arm-linux-gnueabihf- -j4 am335x_evm_config
  make  CROSS_COMPILE=arm-linux-gnueabihf- -j4  ok335x_config




uboot  目前状态 ,已经完成编译 ,不出意外,应该可以烧录进去


setenv ipaddr 192.168.1.100




kernel SDK:
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- distclean


make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf-  tisdk_am335x-evm_defconfig


make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- am335x-evmsk.dtb




make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- zImage




make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- uImage LOADADDR=0x80008000




状态  内  核中加入了jffs2 选项 , 参考 《AM335x JFFS2  Support Guide》 ,但是没有加入 Hamming ECC
相关代码。




export QTDIR=/forlinx/qt                        
export LD_LIBRARY_PATH=$QTDIR/lib:$LD_LIBRARY_PATH                                                     
export QT_QWS_FONTDIR=$QTDIR/lib/fonts                                                         
export QWS_SIZE=320x240                           
export QWS_DISPLAY=Linux:dev/fb0


CCS软件,需要导入的脚本 gel文件在CCS安装软件的目录下。


kernel 3.2 
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf-  am335x_evm_defconfig


mtd0: 00200000 00020000 "SPL"
mtd1: 00200000 00020000 "SPL.backup1"
mtd2: 00200000 00020000 "SPL.backup2"
mtd3: 00200000 00020000 "SPL.backup3"
mtd4: 00200000 00020000 "U-Boot"
mtd5: 00200000 00020000 "U-Boot Env"
mtd6: 00800000 00020000 "Kernel"
mtd7: 0ec00000 00020000 "File System"


rootfs
setenv bootargs ‘mem=32M console=ttyO0,115200 noinitrd mmcroot=/dev/mmcblk0p2 ro mmcrootfstype=yaffs2 init=/linuxrc’




dr}"


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


uboot 2014 


修改:  board.c


else if (board_is_evm_15_or_later(&header) || board_is_am335xD(&header) ) 
return &dpll_ddr_evm_sk;


setenv bootargs concole=ttyO0,115200n8 root=/dev/mmcblk0p2 rw rootfstype=ext3 rootwait
setenv bootargs  "console=ttyO0,115200n8  mem=256M root=/dev/mmcblk0p2 rw rootfstype=ext3 rootwait init=/init ip=off"
 


PHY 0x00: OUI = 0x1374, Model = 0x07, Rev = 0x04, 1000baseX, FDX


 elm_decode_bch_error 116
 
 File not found /boot/am335x-icev2.dtb




U-Boot SPL 2011.09 (Jan 31 2018 - 23:04:15)
Texas Instruments Revision detection unimplemented
Booting from NAND...
mkimage signature not found - ih_magic = ffffffff
Assuming u-boot.bin ..





du -h --max-depth=1 // 可以查看文件大小


flash_eraseall /dev/mtd0
flash_eraseall /dev/mtd1
flash_eraseall /dev/mtd2
flash_eraseall /dev/mtd3
flash_eraseall /dev/mtd4
flash_eraseall /dev/mtd5
flash_eraseall /dev/mtd6
flash_eraseall /dev/mtd7
flash_eraseall /dev/mtd8
flash_eraseall /dev/mtd9


bootPath=/media/mmcblk0p1/NAND_yy
dd if=${bootPath}/MLO of=/dev/mtdblock0
dd if=${bootPath}/MLO of=/dev/mtdblock1
dd if=${bootPath}/MLO of=/dev/mtdblock2
dd if=${bootPath}/MLO of=/dev/mtdblock3
dd if=${bootPath}/am335x-evmsk.dtb of=/dev/mtdblock4
dd if=${bootPath}/u-boot.img of=/dev/mtdblock5


dd if=${bootPath}/zImage of=/dev/mtdblock8


flash_eraseall /dev/mtd8
dd if=zImage of=/dev/mtdblock8


ubiattach  -p /dev/mtd9 -O 2048
ubimkvol /dev/ubi0 -N rootfs -s 220MiB
mkdir -p /mnt/ubifs
mount  -t ubifs ubi0_0 /mnt/ubifs
mkdir /mnt/rootfs
cp -a /media/mmcblk0p2/* /mnt/ubifs   //此命令需要看实际挂载
sync 


720*2 + 1440+ 360 = 1800
220
tftp 0x82000000 ubi.img   
tftp 0x82000000 ubi-mini.img
nand erase 1400000 0ec00000
nand write.i 0x82000000 1400000 0ec00000




setenv bootargs "console=ttyO0,115200n8 root=ubi0:rootfs rw ubi.mtd=/,2048 rootfstype=ubifs rootwait=1"


am3358 : 语音终端


setenv bootargs "console=ttyO0,115200n8 root=ubi0:rootfs rw ubi.mtd=NAND.file-system,2048 rootfstype=ubifs rootwait=1"


setenv bootcmd  "run nandargs ;  nand read ${fdtaddr} NAND.u-boot-spl-os; nand read ${loadaddr} NAND.kernel;bootz ${loadaddr} - ${fdtaddr}"




#define CONFIG_ENV_IS_IN_NAND   // 修改环境变量到NAND






自启动脚本:




#!/bin/sh
                            
insmod /usr/src/gpmc_am335x.ko
/etc/profile
                          
 echo backlight > /sys/bus/platform/drivers/pwm-backlight/unbind
echo 0 >  /sys/class/pwm/pwmchip0/export 
echo 1000 > /sys/class/pwm/pwmchip0/pwm0/period 
echo 600  >  /sys/class/pwm/pwmchip0/pwm0/duty_cycle
echo 1 >     /sys/class/pwm/pwmchip0/pwm0/enable                  
                                        
export QTDIR=/forlinx/qt
export LD_LIBRARY_PATH=$QTDIR/lib:$LD_LIBRARY_PATH
export QWS_DISPLAY=Transformed:Rot270:LinuxFb:/dev/fb0
export QWS_SIZE=480x640                               
                       
 
mkdir /var/volatile/tmp
ip link set can0 type can bitrate 125000
ifconfig can0 up                        
ifconfig eth0 192.168.1.10 netmask 255.255.255.0
route add -net 224.0.0.0 netmask 240.0.0.0 dev eth0


/usr/src/voice_terminal -qws &


航管计算机


必须先设置 bootargs  再操作 load
setenv bootargs "console=ttyO0,115200n8 root=/dev/mmcblk0p2 rw rootfstype=ext3 rootwait"
 load  mmc 0  0x82000000 zImage  ;    
load mmc 0 0x88000000 am335x-evmsk.dtb ; 


bootz 0x82000000 - 0x88000000 


nand write 0x
200 wrong 


load  mmc 0  0x82000000 MLO
nand erase 0x00000000 0x000020000
nand write 0x82000000 0x00000000 0x000020000


stty -F /dev/ttyS1  speed 115200 cs8 -cstopb -parity -icanon min 1 time 1


setenv booargs "console=ttyS0,115200n8 root=/dev/nfs nfsroot=192.168.1.103:/root/Music/am3358_yyzd/rootfs_2018_4_13
 ip=192.168.1.10:192.168.1.103:192.168.1.1:255.255.255.0"







猜你喜欢

转载自blog.csdn.net/ljh618625/article/details/80377198
今日推荐