我的全志Allwinner V3s板子跑linux4.13-y程序,控制台不显示 Uncompressing Linux... done
是怎么回事
离线
我是用这个bootz命令启动 zImage 的, 理论上要先执行 arch/arm/boot/compressed/misc.c 里面的解压缩吧?
#define CONFIG_BOOTCOMMAND "sf probe 0 50000000; " \
"sf read 0x41000000 0x0F0000 0x10000; " \
"sf read 0x41010000 0x100000 0x600000; " \
"bootz 0x41010000 - 0x41000000"
那就应该先输出 Uncompressing Linux... done 才对,但是现在根本不输出了。
离线
貌似putstr( ) 使用的函数 putc( ) 有问题,得换 xboot 的 putc( ) 试一试。
离线
修改 arch/arm/boot/compressed/misc.c:
static inline uint32_t read32(uint32_t addr)
{
return( *((volatile uint32_t *)(addr)) );
}static inline void write32(uint32_t addr, uint32_t value)
{
*((volatile uint32_t *)(addr)) = value;
}void sys_uart_putc(char c)
{
unsigned int addr = 0x01c28000;while((read32(addr + 0x7c) & (0x1 << 1)) == 0);
write32(addr + 0x00, c);
}static void putstr(const char *ptr)
{
char c;while ((c = *ptr++) != '\0') {
if (c == '\n')
sys_uart_putc('\r');
sys_uart_putc(c);
}flush();
}
把xboot的sys_uart_putc( ) 弄上去之后,
终于输出了 Uncompressing Linux... done
有图有真相!
离线