AM3358--Uboot支援LCD輸出1024*768,am3358--ubootlcd
1. uboot/include/lcd/tq3358_fb.h
#define TFT2403201#define TFT3202402#define TFT4802723//T43(天嵌4.3寸屏)#define TFT800480_H504//H50(5寸高清屏)#define TFT8004805//A70(群創7.0寸屏)#define TFT8006006//A104(友達10.4寸屏)#define TFT1024600_H707//H70(7寸高清屏)#define DYNAMIC_CONFIG8//動態配置LCD
typedef enum _LCD_TYPE{X240Y320=0,X320Y240,X480Y272,X640Y480,X800Y480,X800Y480_H50,X800Y600,X1024Y600_H70,X1024Y768,X1280Y800,LCD_TYPE_MAX,} LCD_TYPE;
2. uboot\common\cmd_menu.c
void lcd_menu_usage(){printf("\r\n##### LCD select Menu #####\r\n");printf("[1] T43\" screen.\r\n");printf("[2] A70\" screen.\r\n");printf("[3] A104\" screen.\r\n");printf("[4] H50\" screen.\r\n");printf("[5] H70\" screen.\r\n");printf("[6] A133\" screen.\r\n");printf("[7] W35\" screen.\r\n");printf("[8] VGA1280X800\" screen.\r\n"); printf("[9] X1024Y768\" screen.\r\n");printf("[r] Reboot u-boot\r\n");//printf("[s] Reinitializtion lcd.\r\n");printf("[q] Return Parameter Menu \r\n");printf("Enter your selection: ");}void lcd_menu_shell(){char c;char cmd_buf[256];while (1){lcd_menu_usage();c = getc();printf("%c\n", c);switch (c){case '1':{sprintf(cmd_buf, "setenv lcdtype X480Y272;");run_command(cmd_buf, 0);run_command("saveenv;", 0);break;}case '2':{sprintf(cmd_buf, "setenv lcdtype X800Y480;");run_command(cmd_buf, 0);run_command("saveenv;", 0);break;}case '3':{sprintf(cmd_buf, "setenv lcdtype X800Y600;");run_command(cmd_buf, 0);run_command("saveenv;", 0);break;}case '4':{sprintf(cmd_buf, "setenv lcdtype X800Y480_H50;");run_command(cmd_buf, 0);run_command("saveenv;", 0);break;}case '5':{sprintf(cmd_buf, "setenv lcdtype X1024Y600_H70;");run_command(cmd_buf, 0);run_command("saveenv;", 0);break;break;}case '6':{sprintf(cmd_buf, "setenv lcdtype X1280Y800;");run_command(cmd_buf, 0);run_command("saveenv;", 0);break;break;}case '7':{sprintf(cmd_buf, "setenv lcdtype X320Y240;");run_command(cmd_buf, 0);run_command("saveenv;", 0);break;}case '8':{sprintf(cmd_buf, "setenv lcdtype VGA1280X800;");run_command(cmd_buf, 0);run_command("saveenv;", 0);break;break;} case '9':{sprintf(cmd_buf, "setenv lcdtype X1024Y768;");run_command(cmd_buf, 0);run_command("saveenv;", 0);break;break;}case 'R':case 'r':{strcpy(cmd_buf, "reset");run_command(cmd_buf, 0);break;}case 'Q':case 'q':{return;break;}}}}
3. include\configs\tq3358.h ub0ot預設設定
#ifdef CONFIG_TQ3358
#define CONFIG_IPADDR192.168.1.6
#define CONFIG_SERVERIP192.168.1.8
#define CONFIG_NETMASK255.255.255.0
#define CONFIG_ETHADDR00:40:5c:26:0a:52
#define CONFIG_GATEWAYIP192.168.1.2
#ifdef CONFIG_NAND
#define CONFIG_EXTRA_ENV_SETTINGS \
"mloimgname=MLO\0"\
"ubootimgname=u-boot.bin\0"\
"kernelimgname=zImage.bin\0"\
"rootimgname=root.bin\0"\
"lcdtype=X800Y480\0" \
"uart1_d_can=uart1\0" \
"uart2_i2c2=uart2\0" \
"kloadaddr=0x80008000\0" \
"cpaddr=0x81000000\0"\
"loadaddr=0x80200000\0" \
"console=ttySAC0,115200n8\0" \
"yaffs_root=/dev/mtdblock9\0" \
"yaffs_root_fs_type=yaffs2 rw rootwait=1\0" \
"ubi_root=ubi0:rootfs\0" \
"ubi_root_fs_type=ubifs ubi.mtd=9,2048 rw rootwait=1\0" \
"nfsserverip=192.168.1.7\0" \
"nfsipaddr=192.168.1.6\0" \