白丁 发表于 2016-10-24 20:55
是用的tf卡吗?重新格式化烧个镜像试试
我学着分区,中间操作出错了,没再改直接用厂家的img重新刷一遍,看着能用,现在系统都跑起来了,我加一个ALTR,uart-1.0出错,下面是我的过程,您帮我看看有什么问题:
dts部分:
UART: serial@0x100040000 {
compatible = "altr,uart-15.0", "ALTR,uart-1.0";
reg = ;
interrupt-parent = ;
interrupts = ;
clocks = ;
}; //end serial@0x100040000 (UART)
驱动程序匹配部分:
static struct of_device_id altera_uart_match[] = {
{ .compatible = "ALTR,uart-1.0", },
{},
};
make menuconfig的时候选择的是driver->tty->serial->altera serial选择*编译到内核。
启动Linux后应该是没有发现设备,在dev/没看到ttyAL。
按照驱动里面:
static struct uart_driver altera_uart_driver = {
.owner = THIS_MODULE,
.driver_name = DRV_NAME,
.dev_name = "ttyAL",
.major = SERIAL_ALTERA_MAJOR,
.minor = SERIAL_ALTERA_MINOR,
.nr = CONFIG_SERIAL_ALTERA_UART_MAXPORTS,
.cons = ALTERA_UART_CONSOLE,
};
应该有个ttyAL设备。