您尚未登录。

#3 Re: 全志 SOC » 请问 荔枝派zero V3s主线u-boot 如何修改默认的串口为uart2(PB0/PB1) ? » 2019-01-21 15:42:12

还是一样,Uncompressing Linux... done, booting the kernel. 出现这个后,下面就没有输出了。

#4 Re: 全志 SOC » 请问 荔枝派zero V3s主线u-boot 如何修改默认的串口为uart2(PB0/PB1) ? » 2019-01-21 15:33:05

修改 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)
{
    [ins]unsigned int addr = 0x01c28800;[/ins]

    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();
}
U-Boot 2017.01-rc2 (Jan 20 2019 - 19:52:07 -0800) Allwinner Technology

CPU:   Allwinner V3s (SUN8I 1681)
Model: Lichee Pi Zero
DRAM:  64 MiB
MMC:   SUNXI SD/MMC: 0
SF: Detected w25q128bv with page size 256 Bytes, erase size 4 KiB, total 16 MiB
*** Warning - bad CRC, using default environment

Setting up a 800x480 lcd console (overscan 0x0)
dotclock: 33000kHz = 33000kHz: (1 * 3MHz * 66) / 6
In:    serial@01c28800
Out:   serial@01c28800
Err:   serial@01c28800
Net:   No ethernet found.
starting USB...
No controllers found
Hit any key to stop autoboot:  2  1  0 
reading zImage
3987592 bytes read in 207 ms (18.4 MiB/s)
reading sun8i-v3s-licheepi-zero-dock.dtb
11986 bytes read in 26 ms (450.2 KiB/s)
## Flattened Device Tree blob at 41800000
   Booting using the fdt blob at 0x41800000
   Loading Device Tree to 42dfa000, end 42dffed1 ... OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.

更新下,直接写输出串口2 的地址没有问题,zImage解压正常

#5 Re: 全志 SOC » 请问 荔枝派zero V3s主线u-boot 如何修改默认的串口为uart2(PB0/PB1) ? » 2019-01-21 15:06:27

但是我这个zImage,是同一个啊,我只是修改了Uboot的串口输出,原来是uart0输出,我改成UART2输出,UART0的就正常加载输出,UART2的就卡在Starting kernel ...这个地方,说明这个zImage是没有问题的,我如果直接写输出端口的地址是不是能直接输出?又要芯片手册,头大。

#7 Re: 全志 SOC » 请问 荔枝派zero V3s主线u-boot 如何修改默认的串口为uart2(PB0/PB1) ? » 2019-01-21 14:48:34

62楼,我是用串口0 的方法输出的,我板子上也是飞线到串口0的,然后我改成串口2,发现串口2还是卡在Starting kernel ...这个地方

#9 Re: 全志 SOC » 请问 荔枝派zero V3s主线u-boot 如何修改默认的串口为uart2(PB0/PB1) ? » 2019-01-21 13:57:37

晕哥,内核打印改成串口2,还有什么地方需要修改的吗?我现在,串口0和串口2都接上电脑了,串口2还是卡在Starting kernel ...,串口0也没有输出

#10 Re: 全志 SOC » 请问 荔枝派zero V3s主线u-boot 如何修改默认的串口为uart2(PB0/PB1) ? » 2019-01-21 13:55:50

出现用户登录了,加载完整。61楼的问题,我重新git clone 了下,可能是下载不完成。

#11 Re: 全志 SOC » 请问 荔枝派zero V3s主线u-boot 如何修改默认的串口为uart2(PB0/PB1) ? » 2019-01-21 13:41:36

U-Boot 2017.01-rc2 (Jan 20 2019 - 20:58:24 -0800) Allwinner Technology

CPU:   Allwinner V3s (SUN8I 1681)
Model: Lichee Pi Zero
DRAM:  64 MiB
MMC:   SUNXI SD/MMC: 0
SF: Detected w25q128bv with page size 256 Bytes, erase size 4 KiB, total 16 MiB
*** Warning - bad CRC, using default environment

Setting up a 800x480 lcd console (overscan 0x0)
dotclock: 33000kHz = 33000kHz: (1 * 3MHz * 66) / 6
In:    serial@01c28000
Out:   serial@01c28000
Err:   serial@01c28000
Net:   No ethernet found.
starting USB...
No controllers found
Hit any key to stop autoboot:  2 
[13:38:32.024]ÊÕ¡û¡ô 1 
[13:38:33.025]ÊÕ¡û¡ô 0 

[13:38:33.097]ÊÕ¡û¡ôreading zImage
3987592 bytes read in 206 ms (18.5 MiB/s)
reading sun8i-v3s-licheepi-zero-dock.dtb
11986 bytes read in 26 ms (450.2 KiB/s)
## Flattened Device Tree blob at 41800000
   Booting using the fdt blob at 0x41800000
   Loading Device Tree to 42dfa000, end 42dffed1 ... OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.13.16-licheepi-zero (ubuntu@ubuntu) (gcc version 7.3.0 (Ubuntu/Linaro 7.3.0-27ubuntu1~18.04)) #2 SMP Sun Jan 20 18:46:21 PST 2019
[    0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c5387d
[    0.000000] CPU: div instructions available: patching division code
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] OF: fdt: Machine model: Lichee Pi Zero with Dock
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] percpu: Embedded 16 pages/cpu @c3de6000 s33868 r8192 d23476 u65536
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 15883
[    0.000000] Kernel command line: console=ttyS0,115200 panic=5 rootwait root=/dev/mmcblk0p2 earlyprintk rw  vt.global_cursor_default=0
[    0.000000] PID hash table entries: 256 (order: -2, 1024 bytes)
[    0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Memory: 53580K/64036K available (6144K kernel code, 217K rwdata, 1456K rodata, 1024K init, 264K bss, 10456K reserved, 0K cma-reserved, 0K highmem)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
[    0.000000]     vmalloc : 0xc4000000 - 0xff800000   ( 952 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xc3e89000   (  62 MB)
[    0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
[    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)
[    0.000000]       .text : 0xc0008000 - 0xc0700000   (7136 kB)
[    0.000000]       .init : 0xc0900000 - 0xc0a00000   (1024 kB)
[    0.000000]       .data : 0xc0a00000 - 0xc0a367c0   ( 218 kB)
[    0.000000]        .bss : 0xc0a3da78 - 0xc0a7fc2c   ( 265 kB)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] Hierarchical RCU implementation.
[    0.000000] 	RCU event tracing is enabled.
[    0.000000] 	RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=1.

这是用串口0输出的log,看来改成串口2,内核里面没有改成功。

#12 Re: 全志 SOC » 请问 荔枝派zero V3s主线u-boot 如何修改默认的串口为uart2(PB0/PB1) ? » 2019-01-19 23:32:12

  DTC     arch/arm/boot/dts/sun8i-a23-evb.dtb
In file included from arch/arm/boot/dts/sun8i-a23.dtsi:45:0,
                 from arch/arm/boot/dts/sun8i-a23-evb.dts:46:
arch/arm/boot/dts/sun8i-a23-a33.dtsi:47:54: fatal error: dt-bindings/interrupt-controller/arm-gic.h: No such file or directory
 #include <dt-bindings/interrupt-controller/arm-gic.h>
                                                      ^
compilation terminated.
scripts/Makefile.lib:325: recipe for target 'arch/arm/boot/dts/sun8i-a23-evb.dtb' failed
make[1]: *** [arch/arm/boot/dts/sun8i-a23-evb.dtb] Error 1
arch/arm/Makefile:346: recipe for target 'dtbs' failed
make: *** [dtbs] Error 2
make: *** Waiting for unfinished jobs....
  AR      drivers/mtd/built-in.o
  AR      drivers/built-in.o

这个文件是怎么生成的,看源代码里面是没有。

#13 Re: 全志 SOC » 请问 荔枝派zero V3s主线u-boot 如何修改默认的串口为uart2(PB0/PB1) ? » 2019-01-19 21:35:55

ubuntu@ubuntu:~/Downloads$ sha1sum V3s_TFCard.7z
43c635802438e26c8fe96ada66255b664d52cddd  V3s_TFCard.7z

#14 Re: 全志 SOC » 请问 荔枝派zero V3s主线u-boot 如何修改默认的串口为uart2(PB0/PB1) ? » 2019-01-19 21:34:50

ubuntu@ubuntu:~/Downloads$ md5sum V3s_TFCard.7z
7c9007deeeacfb0c1e3475b2baae25ad  V3s_TFCard.7z

#15 Re: 全志 SOC » 请问 荔枝派zero V3s主线u-boot 如何修改默认的串口为uart2(PB0/PB1) ? » 2019-01-19 21:22:06

1aa4f54699db1eb70650b8fd5cde5ab3  /media/ubuntu/D456-7CA0/zImage   ,我去,我是直接点击下载的啊,我用Ubuntu下载试试

#16 Re: 全志 SOC » 请问 荔枝派zero V3s主线u-boot 如何修改默认的串口为uart2(PB0/PB1) ? » 2019-01-19 20:19:12

TF卡,https://whycan.cn/files/201712/15/V3s_TFCard.7z,在这下载的,在下载Linux代码,等会编译下,拷进去试试。我也觉得是这个内核有问题,但是看你的LOG是正常的。

#17 Re: 全志 SOC » 请问 荔枝派zero V3s主线u-boot 如何修改默认的串口为uart2(PB0/PB1) ? » 2019-01-19 18:28:05

晕哥,我俩的情况还不一样,我这个原因是串口的输入输出是自反馈电路,设计上的缺陷。我现在是切割开单独连接输入和输出,正常,能进入uboot,也能发送命令。从这个log日志看,跳转到内核后,打印就断掉了。

#20 Re: 全志 SOC » 请问 荔枝派zero V3s主线u-boot 如何修改默认的串口为uart2(PB0/PB1) ? » 2019-01-19 16:44:01

看了下论坛的其他文章,可能的问题是:
1.串口设置不对
2.内核不对
1.串口是这么设置的

/*
 * (C) Copyright 2014 Chen-Yu Tsai <wens@csie.org>
 *
 * Configuration settings for the Allwinner A23 (sun8i) CPU
 *
 * SPDX-License-Identifier:	GPL-2.0+
 */

#ifndef __CONFIG_H
#define __CONFIG_H

/*
 * A23 specific configuration
 */

#ifdef CONFIG_USB_EHCI
#define CONFIG_USB_EHCI_SUNXI
#endif

#ifdef CONFIG_MACH_SUN8I_H3
	#define CONFIG_SUNXI_USB_PHYS	4
#elif defined CONFIG_MACH_SUN8I_A83T
	#define CONFIG_SUNXI_USB_PHYS	3
#elif defined CONFIG_MACH_SUN8I_V3S
	#define CONFIG_SUNXI_USB_PHYS	1
#else
	#define CONFIG_SUNXI_USB_PHYS	2
#endif

#define CONFIG_BOOTCOMMAND   "setenv bootm_boot_mode sec;"      \
	"load mmc 0:1 0x41000000 zImage;"  \
	"load mmc 0:1 0x41800000 sun8i-v3s-licheepi-zero-dock.dtb;" \
	"bootz 0x41000000 - 0x41800000;"

#define CONFIG_BOOTARGS      "console=ttyS2,115200 panic=5 rootwait mtdparts=spi32766.0:1M(uboot)ro,64k(dtb)ro,6M(kernel)ro,-(rootfs) root=/dev/mmcblk0p2 earlyprintk rw"

/*
 * Include common sunxi configuration where most the settings are
 */
#include <configs/sunxi-common.h>

#endif /* __CONFIG_H */

应该没问题。
2。内核有问题,但是是从你那个连接下载的,看你log输出正常,也应该没问题。

#22 Re: 全志 SOC » 请问 荔枝派zero V3s主线u-boot 如何修改默认的串口为uart2(PB0/PB1) ? » 2019-01-19 16:28:53

FluxBB bbcode 测试 ,我对比了下,我下载的https://whycan.cn/files/201712/15/V3s_TFCard.7z,和你截图的log输出的大小不一样,这个有影响吗

#23 Re: 全志 SOC » 请问 荔枝派zero V3s主线u-boot 如何修改默认的串口为uart2(PB0/PB1) ? » 2019-01-18 22:48:14

U-Boot 2017.01-rc2-g59058e5-dirty (Jan 18 2019 - 05:23:33 -0800) Allwinner Technology

CPU:   Allwinner V3s (SUN8I 1681)
Model: Lichee Pi Zero
DRAM:  64 MiB
MMC:   SUNXI SD/MMC: 0
SF: Detected w25q128bv with page size 256 Bytes, erase size 4 KiB, total 16 MiB
*** Warning - bad CRC, using default environment

Setting up a 800x480 lcd console (overscan 0x0)
dotclock: 33000kHz = 33000kHz: (1 * 3MHz * 66) / 6
In:    serial@01c28800
Out:   serial@01c28800
Err:   serial@01c28800
Net:   No ethernet found.
starting USB...
No controllers found
Hit any key to stop autoboot:  2  1  0 
SF: Detected w25q128bv with page size 256 Bytes, erase size 4 KiB, total 16 MiB
device 0 offset 0xf0000, size 0x10000
SF: 65536 bytes @ 0xf0000 Read: OK
device 0 offset 0x300000, size 0x800000
SF: 8388608 bytes @ 0x300000 Read: OK
=> 
[22:44:34.025]发→◇ls
□
[22:44:41.809]发→◇l

#27 Re: 全志 SOC » 请问 荔枝派zero V3s主线u-boot 如何修改默认的串口为uart2(PB0/PB1) ? » 2019-01-18 21:50:06

@晕哥,波特率改成9600,显示没有乱码了,但是有报错。

#28 Re: 全志 SOC » 请问 荔枝派zero V3s主线u-boot 如何修改默认的串口为uart2(PB0/PB1) ? » 2019-01-18 21:48:46

U-Boot SPL 2017.01-rc2-g59058e5-dirty (Jan 18 2019 - 05:23:33)
DRAM: 64 MiB
Trying to boot from MMC1

U-Boot 2017.01-rc2-g59058e5-dirty (Jan 18 2019 - 05:23:33 -0800) Allwinner Technology

CPU:   Allwinner V3s (SUN8I 1681)
Model: Lichee Pi Zero
DRAM:  64 MiB
MMC:   SUNXI SD/MMC: 0
SF: Detected w25q128bv with page size 256 Bytes, erase size 4 KiB, total 16 MiB
*** Warning - bad CRC, using default environment

Setting up a 800x480 lcd console (overscan 0x0)
dotclock: 33000kHz = 33000kHz: (1 * 3MHz * 66) / 6
In:    serial@01c28800
Out:   serial@01c28800
Err:   serial@01c28800


U-Boot 2017.01-rc2-g59058e5-dirty (Jan 18 2019 - 05:23:33 -0800) Allwinner Technology

CPU:   Allwinner V3s (SUN8I 1681)
Model: Lichee Pi Zero
DRAM:  64 MiB
MMC:   SUNXI SD/MMC: 0
SF: Detected w25q128bv with page size 256 Bytes, erase size 4 KiB, total 16 MiB
*** Warning - bad CRC, using default environment

Setting up a 800x480 lcd console (overscan 0x0)
dotclock: 33000kHz = 33000kHz: (1 * 3MHz * 66) / 6
In:    serial@01c28800
Out:   serial@01c28800
Err:   serial@01c28800
Net:   No ethernet found.
starting USB...
No controllers found
Hit any key to stop autoboot:  2  0
=> MC:   SUNXI SD/MMC: 0
Unknown command 'MC:' - try 'help'
=> 
Unknown command 'MC:' - try 'help'
=> SF: Detected w25q128bv with page size 252> MC:   SUNXI SD/MMC: >> SF: Detected w25q128bv with page size 252> MC:   SUNXI SD/MMC: >> SF: Detected w25q128bv with page size 252> MC:   SUNXI SD/MMC: >> SF: Detected w25q128bv with page size 252> MC:   SUNXI SD/MMC: >> SF: Detected w25q128bv with page size 252> MC:   SUNXI SD/MMC: >> SF: Detected w25q128bv with page size 252> MC:   SUNXI SD/MMC: >> SF: Detected w25q128bv with page size 252> MC:   SUNXI SD/MMC: >> SF: Detected w25q128bv with page size 252> MC:   SUNXI SD/MMC: >> SF: Detected w25q128bv with page size 252> MC:   SUNXI SD/MMC: >> SF: Detected w25q128bv with page size 252> MC:   SUNXI SD/MMC: >> SF: Detected w25q128bv with page size 252> MC:   SUNXI SD/MMC: >> SF: Detected w25q128bv with page size 252> MC:   SUNXI SD/MMC: >> SF: Detected w25q128bv with page size 252> MC:   SUNXI SD/MMC: >> SF: Detected w25q128bv with page size 252> MC:   SUNXI SD/MMC: >> SF: Detected w25q128bv with page size 252> MC:   SUNXI SD/MMC: >> SF: Detected w25q128bv with page s

#29 Re: 全志 SOC » 请问 荔枝派zero V3s主线u-boot 如何修改默认的串口为uart2(PB0/PB1) ? » 2019-01-15 14:35:04

晕哥,如果我单烧写uboot,不放内核和文件系统,串口是不是也能打印输出

#30 Re: 全志 SOC » 请问 荔枝派zero V3s主线u-boot 如何修改默认的串口为uart2(PB0/PB1) ? » 2019-01-15 14:33:46

之前用flash启动过,后来flash拆坏掉了,就做成TF卡启动的了,现在启动就是乱码

#31 Re: 全志 SOC » 请问 荔枝派zero V3s主线u-boot 如何修改默认的串口为uart2(PB0/PB1) ? » 2019-01-15 14:14:20

板子用flash加载也正常,我这个是烧写到TF卡上,TF卡我也换了几个了,都是一样

#34 Re: 全志 SOC » 请问 荔枝派zero V3s主线u-boot 如何修改默认的串口为uart2(PB0/PB1) ? » 2019-01-15 14:03:56

[13:56:14.987]ÊÕ¡û¡ô\0
[13:56:15.425]ÊÕ¡û¡ô¡U\0½¼À\0SPL 2017.01-rc2 (Jan 14 2019 - 21:52:58)
DRAM:\0\0MiB
Trying to boot from MMC1
[13:56:15.630]ÊÕ¡û¡ô¡\0U-Boot 2017.01-rc2 (Jan 14 2019 - 21:52:58 -0800) Allwinner Technologù

CPUz   Aüüÿéþþåò ^w÷ (WU^xI q~xq)
]ÿäåüz \éçèåå Pé zåòÿ
DRA]z  lp\0À\0\0W\0\0  WU^xI WD?]]Gz p
\0\0Detected w25q128bv with page size 256 Bùôå÷< åòá÷å ÷éúå t OéB< ôÿôáü q~ ]éB
\0%%º…À¸€¸œ\0- bad CRC, using default environment

y_Ïã\0õð á xppøtp`\0ØÆÀ\0ÆÞÜæÞØÀ\0\0ÞìÀàæÆÀÜ\0`x0)

[13:56:15.740]ÊÕ¡û¡ô`Œ°¼ŒŒà 33000kHz = 33000kHz: (1 * 3MHú * ~~) ? ~

[13:56:15.786]ÊÕ¡û¡ô\0\0   ÷åòéáü@pqærxp``\0ààp\0\0\0æÀàÀÀØ\0``Æ`p800
Err:   serial@01c28800


U-Boot 2017.01-rc2 (Jan 14 2019 - 21:52:58 -0800) Allwinner Technology

CPUz   Aüüÿéþþåò ^w÷ (WU^xI q~xq)
]ÿäåüz \éçèåå Pé zåòÿ
DRA]z  ~d À\0\0p\0\0\0\00\0\0\0C: 0
SF: Detected w25q128bv with page size 256 Bytes, erase size 4 KiB, total 16 MiB
*** Warning - bad CRC, õ÷éþï äåîáõüô åþþéòÿþýåþô

Wåôôéþï õð á xppøtxp üçä çÿþ÷ÿüå (þìÀâæÆÀÜ\0`ð`\0\0ÀÞàÆØÞÆÆp\0f3000kHz =
[13:56:15.853]ÊÕ¡û¡ô 33000kHz: (1 * 3MHz * 66) / 6
In:    serial@01c28800
Out:   serial@01c28800
Err:   serial@01c2xx0p
Y—\0  No ethernet found.
starting USB>>>
^ÿ çÿþôòÿüüåò÷ îÿõþä
\00\0¸à\0ÆÀð\0ào stop autoboot:  2  0
=> ÀÀB  à€€`\0B <INTERRUPT~
}~ àB<pàüÀ€€À€Àظ€À€€€œ€˜€àðÀ€`\0ÀÞ`p€€À€Àظ€À€€€œ€˜€àðÀ\0€`\0ÀÞ`p€€À€Àظ€À€€€œ€˜€àðÀ<R\0UIIUAQù
=> ã8¼`\0€€Àظ€À€€€œ€˜€àðÀ<àÀÀð0¼`<R\0UIIUAQù
=> 8vÜ€À€€€œ€˜€àðÀ<ÀÀà\0<àÀÀðpƒ\0À€€€œ€˜€àðÀ\0ÀÀÀ<R\0UIIUAQù`
}~ |ððÀ€À\0€€€œ€˜€àðÀ\0ÀÀÀ<àÀÀðÀ€ÀÀ€À€€€œ€˜€àðÀ<R\0UIIUAQù
=> î8x8øÀ€ÀÀ€À€€€œ€˜€àðÀ<àÀÀðp€xÀÀ€ÀÀ€À€€€œ€˜€àðÀ<ÀÀ\0€xÀÀÀÀÀ€€€œ€˜€àðÀ<ÀÀ<R\0UIIUAQù`

页脚

工信部备案:粤ICP备20025096号 Powered by FluxBB

感谢为中文互联网持续输出优质内容的各位老铁们。 QQ: 516333132, 微信(wechat): whycan_cn (哇酷网/挖坑网/填坑网) service@whycan.cn