* u-boot-2014.4
* arm-linux-gcc-4.5.1
* linux-3.0.8-20180411
github地址:
[email protected]:fanglinn/smart210-SDK.git
#1.编译
cp mini210_linux_defconfig .config
make uImage -j4
#2. 修改nand分区匹配u-boot的分区,和uboot里面的一致
drivers\mtd\nand\s3c_nand.c
static struct mtd_partition s3c_partition_info[] = {
[0] = {
.name = "bootloader",
.size = SZ_256K,
.offset = 0,
},
[1] = {
.name = "device_tree",
.offset = MTDPART_OFS_APPEND,
.size = SZ_128K,
},
[2] = {
.name = "params",
.offset = MTDPART_OFS_APPEND,
.size = SZ_128K,
},
[3] = {
.name = "kernel",
.offset = MTDPART_OFS_APPEND,
.size = SZ_1M + SZ_4M,
},
[4] = {
.name = "rootfs",
.offset = MTDPART_OFS_APPEND,
.size = MTDPART_SIZ_FULL,
}
};
#2. nfs启动
set bootargs "noinitrd init=/linuxrc console=ttySAC0,115200 root=/dev/nfs rw nfsroot=192.168.1.111:/home/flinn/bin/rootfs_mini210/ ip=192.168.1.123:192.168.1.111:192.168.1.1:255.255.255.0::eth0:off"
set bootcmd "nfs 0x30007FC0 192.168.1.111:/home/flinn/smart210-SDK/bin/uImage;bootm 0x30007FC0"
boot
Q1:
Uncompressing Linux... done, booting the kernel.之后没有任何输出。
查阅资料发现
arch\arm\mach-s5pv210\include\mach\uncompress.h
static void arch_detect_cpu(void)
{
/* we do not need to do any cpu detection here at the moment. */
+ fifo_mask = S5PV210_UFSTAT_TXMASK;
+ fifo_max = 63 << S5PV210_UFSTAT_TXSHIFT;
}
Q2:
NFS启动报错
/init: line 109: can't create /r/dev/console: Permission denied
General setup
[*] Initial RAM filesystem and RAM disk (initramfs/initrd) support
(FriendlyARM.cpio) Initramfs source file(s)
Q3:
使用触摸屏
由于之前使用superboot里面参数会传递"ctp=?", 现在用u-boot,不需要这一步
查看源码
static int __init panel_setup_touch_id(char *str)
{
unsigned int val;
char *p = str, *end;
val = simple_strtoul(p, &end, 10);
if (end <= p) {
return 1;
}
if (ctp_type <= CTP_AUTO && val < CTP_MAX) {
ctp_type = val;
}
return 1;
}
__setup("ctp=", panel_setup_touch_id);
现在没有设置touch_id, 因此需要在代码里面把ctp_type写死
修改办法:
unsigned int mini210_get_ctp(void)
{
//return ctp_type;
return panel_lcd_list[lcd_idx].ctp;
}
最终的打印消息
[ 2.829904] ft5x0x_ts_probe ctp : 3
[ 2.829910]
[ 2.836591] input: ft5x0x_ts as /devices/virtual/input/input1
[ 2.851046] hw ver : 24
[ 2.851052]
[ 2.851132] ft5x0x_ts 2-0038: Firmware version 0x18