您尚未登录。

#1 Re: DIY/综合/Arduino/写字机/3D打印机/智能小车/平衡车/四轴飞行/MQTT/物联网 » 请教CH579的网络,不用库自己初始化的问题 » 2022-02-21 23:13:20

有研究 CH579M 以太网初始化的小伙伴搜到这里的话,请出门去 WCH 官网下载 CH32F20xEVT.ZIP, 以下目录将有神奇的发现 lol
CH32F20xEVT\EXAM\ETH\F207\ETH_internal_10BASE-T_PHY
CH32F20xEVT\EXAM\ETH\F208\ETH_internal_10BASE-T_PHY

#3 8051/STC8/AT89C51/N76E003 » 51单片机的一个多线程编程模型 » 2021-10-28 18:30:32

Iron
回复: 5

Protothread 一个非常巧妙的轮询式多线程模型,也是 contiki 系统的内核,uip 和 lwip 作者 adam 的杰作
http://dunkels.com/adam/

proteus8.12.SP0 居然都支持 STC 51 单片机和 STM32 模拟了。。
https://www.52pojie.cn/thread-1432924-1-1.html 
链接:https://pan.xunlei.com/s/VMZq3HdA1_aoTPXmaYi4SkLsA1
提取码:p9qc

常见问题:
一、proteus 8.12_sp0和proteus_8.9sp2存在相同的问题,如果安装在非C盘目录下,打开后则会显示密钥错误和未注册的灰色字体;点击帮助后也是未注册。
这是因为破解器默认是你安装在C盘。
解决方法如下:
[1]、卸载后重装在C盘
[2]、1.先在C盘安装,破解.
        2.打开软件,发现有注册信息,则注册成功
        3.此时软件复制根目录的bin文件夹。
        4.卸载刚才安装的proteus
        注意:不要用第三方的卸载软件,在控制面版里卸载就行,更不要用everything之类的把残余文件删的干干净净
        5.重新安装,选择D盘。破解
        6.把刚才复制bin文件夹覆盖到D盘软件的根目录下,选择全部替换
        7.再打开proteus就显示注册成功了
-- 虽然有点脱裤子放屁的感觉,但能用就行

Protesu 仿真测试,两个线程控制 LED 闪烁,另外还有 mutex timer 等,可以参考 contiki 的内核实现。

仿真截图:
STC15W_LED_Blink.gif

示例工程:
STCxx_Projects.rar

测试代码:

/**
  ******************************************************************************
  * @file    main.c
  * @author  Iron
  * @date    2021-01-01
  * @version v1.0
  * @brief   main c file
  */

/* Private includes ----------------------------------------------------------*/
#include "board.h"
#include "pt.h"
#include "delay.h"

/* Private define ------------------------------------------------------------*/
/* Private macro -------------------------------------------------------------*/
/* Private typedef -----------------------------------------------------------*/
/* Private variables ---------------------------------------------------------*/

/* Two flags that the two protothread functions use. */
static int protothread1_flag, protothread2_flag;

/* Private function prototypes -----------------------------------------------*/


/**
 * The first protothread function. A protothread function must always
 * return an integer, but must never explicitly return - returning is
 * performed inside the protothread statements.
 *
 * The protothread function is driven by the main loop further down in
 * the code.
 */
static int protothread1(struct pt *pt)
{
    /* A protothread function must begin with PT_BEGIN() which takes a
       pointer to a struct pt. */
    PT_BEGIN(pt);

    /* We loop forever here. */
    while (1)
    {
        /* Wait until the other protothread has set its flag. */
        PT_WAIT_UNTIL(pt, protothread2_flag != 0);

        /* thread code... */
        led_togger(LED0);
        delay_ms(100);

        /* We then reset the other protothread's flag, and set our own
           flag so that the other protothread can run. */
        protothread2_flag = 0;
        protothread1_flag = 1;

        /* And we loop. */
    }

    /* All protothread functions must end with PT_END() which takes a
       pointer to a struct pt. */
    PT_END(pt);
}

/**
 * The second protothread function. This is almost the same as the
 * first one.
 */
static int protothread2(struct pt *pt)
{
    PT_BEGIN(pt);

    while (1)
    {
        /* Let the other protothread run. */
        protothread2_flag = 1;

        /* Wait until the other protothread has set its flag. */
        PT_WAIT_UNTIL(pt, protothread1_flag != 0);

        /* thread code... */
        led_togger(LED1);
        delay_ms(100);

        /* We then reset the other protothread's flag. */
        protothread1_flag = 0;

        /* And we loop. */
    }
    PT_END(pt);
}


/**
 * Finally, we have the main loop. Here is where the protothreads are
 * initialized and scheduled. First, however, we define the
 * protothread state variables pt1 and pt2, which hold the state of
 * the two protothreads.
 */
static struct pt pt1, pt2;

int main(void)
{
    board_init();

    /* Initialize the protothread state variables with PT_INIT(). */
    PT_INIT(&pt1);
    PT_INIT(&pt2);

    /*
     * Then we schedule the two protothreads by repeatedly calling their
     * protothread functions and passing a pointer to the protothread
     * state variables as arguments.
     */
    while (1)
    {
        protothread1(&pt1);
        protothread2(&pt2);
    }
}

/**
  * @}
  */

/******************* (C)COPYRIGHT 2021 ***** END OF FILE *********************/

#4 Openwrt/LEDE/AR9331/MT7688/RT5350 » OpenWRT 4G LTE 模块 qmi.sh 'Unable to connect IPv6' » 2021-04-22 12:49:24

Iron
回复: 1

琢磨了两三天 OpenWRT 4G LTE 模块上网,用的物联网卡测试,发现无法正常连接。最后换自己手机卡就可以了。。
总结是 uqmi IPV6 错误原因是 SIM 卡套餐不支持 IPV6 ..

Thu Apr 22 12:23:51 2021 daemon.notice netifd: Interface 'wwan' is setting up now
Thu Apr 22 12:23:51 2021 daemon.notice netifd: wwan (15865): Waiting for SIM initialization
Thu Apr 22 12:23:52 2021 daemon.notice netifd: wwan (15865): Device does not support 802.3 mode. Informing driver of raw-ip only for wwan0 ..
Thu Apr 22 12:23:52 2021 daemon.notice netifd: wwan (15865): Waiting for network registration
Thu Apr 22 12:23:52 2021 daemon.notice netifd: wwan (15865): Starting network wwan
Thu Apr 22 12:23:52 2021 daemon.notice netifd: wwan (15865): Unable to connect IPv6
Thu Apr 22 12:26:27 2021 daemon.notice netifd: wwan (16989): Stopping network wwan
Thu Apr 22 12:26:27 2021 daemon.notice netifd: wwan (16989): Command failed: Permission denied

#5 Re: 全志 SOC » 全志v3s板 (开源) » 2021-03-05 14:21:37

优秀,眼馋做不来。。

#6 Re: 全志 SOC » 通过 v3s openwrt 上网发个帖 » 2021-01-26 10:35:09

crolin 说:

你好请问下,我移植openwrt的时候,init那边内核panic了,  可以分享下你的移植么 Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000004

参考这个: https://whycan.com/t_5308.html

#7 计算机图形/GUI/RTOS/FileSystem/OpenGL/DirectX/SDL2 » STM32G070KBT6 Threadx 移植测试 » 2020-12-02 14:06:05

Iron
回复: 0

# STM32G070KBT6 Threadx 移植测试
- _tx_initialize_unused_memory / _tx_thread_system_stack_ptr 配置可能存在问题,仅供参考。

STM32G070KBT6 Threadx 移植测试

* STM32CubeIDE (gcc)
    - .project

* MDK
     - MDK-ARM/STM32G070KBT6_TEST.uvprojx

* IAR
    - EWARM/Project.eww

移植问题记录:

* _tx_initialize_low_level
- 1. _tx_initialize_unused_memory 为链接脚本后剩余 RAM 空间起始地址
- 2. _tx_thread_system_stack_ptr 为系统堆栈指针
- 3. PendSV_IRQn 中断优先级设置为最低优先级
- 4. SysTick_IRQn 中断优先级要大于 PendSV_IRQn

* 在编译器选项里使能定义宏: TX_INCLUDE_USER_DEFINE_FILE
- 包含 tx_user.h
- "#define TX_TIMER_TICKS_PER_SECOND (100)"
- 新增定义 "#define TX_MS_TO_TICKS( ms ) ((( ms ) * TX_TIMER_TICKS_PER_SECOND ) / 1000 )"

https://gitee.com/vjiot-open/stm32g070kbt6_threadx_test
https://whycan.com/files/members/1206/stm32g070kbt6_threadx_test.zip

#8 Re: 全志 SOC » 通过 v3s openwrt 上网发个帖 » 2020-10-16 01:34:43

可能附近无线信道繁忙,或者我的无线路由器性能不行。。改天再试下别的 wifi 性能。。

阿黄 说:

你这无线速度也忒慢了

#9 Re: 全志 SOC » 通过 v3s openwrt 上网发个帖 » 2020-10-16 01:31:19

看起来 WiFi AP 模式的速度较低还是,问题可能还是驱动或者 WiFi 芯片性能上。。

#10 Re: 全志 SOC » 通过 v3s openwrt 上网发个帖 » 2020-10-16 01:26:50

EMAC 测试, 百兆路由器口

$ iperf3 -c 192.168.10.182 -p 10000
Connecting to host 192.168.10.182, port 10000
[  4] local 192.168.10.202 port 39739 connected to 192.168.10.182 port 10000
[ ID] Interval           Transfer     Bandwidth
[  4]   0.00-1.00   sec  11.5 MBytes  96.3 Mbits/sec
[  4]   1.00-2.00   sec  11.4 MBytes  95.3 Mbits/sec
[  4]   2.00-3.01   sec  11.2 MBytes  94.0 Mbits/sec
[  4]   3.01-4.00   sec  11.4 MBytes  95.8 Mbits/sec
[  4]   4.00-5.01   sec  11.4 MBytes  94.9 Mbits/sec
[  4]   5.01-6.00   sec  11.2 MBytes  94.9 Mbits/sec
[  4]   6.00-7.00   sec  11.2 MBytes  94.7 Mbits/sec
[  4]   7.00-8.00   sec  11.2 MBytes  94.2 Mbits/sec
[  4]   8.00-9.00   sec  11.4 MBytes  95.3 Mbits/sec
[  4]   9.00-10.01  sec  11.2 MBytes  94.0 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bandwidth
[  4]   0.00-10.01  sec   113 MBytes  94.9 Mbits/sec                  sender
[  4]   0.00-10.01  sec   113 MBytes  94.9 Mbits/sec                  receiver

iperf Done.

EMAC 测试, 千兆交换机接口

$ iperf3 -c 192.168.10.182 -p 10000
Connecting to host 192.168.10.182, port 10000
[  4] local 192.168.10.202 port 40120 connected to 192.168.10.182 port 10000
[ ID] Interval           Transfer     Bandwidth
[  4]   0.00-1.00   sec  11.5 MBytes  96.3 Mbits/sec
[  4]   1.00-2.00   sec  11.4 MBytes  95.5 Mbits/sec
[  4]   2.00-3.01   sec  11.4 MBytes  94.9 Mbits/sec
[  4]   3.01-4.00   sec  11.2 MBytes  94.9 Mbits/sec
[  4]   4.00-5.01   sec  11.4 MBytes  94.9 Mbits/sec
[  4]   5.01-6.01   sec  11.4 MBytes  95.0 Mbits/sec
[  4]   6.01-7.00   sec  11.1 MBytes  94.1 Mbits/sec
[  4]   7.00-8.00   sec  11.4 MBytes  95.2 Mbits/sec
[  4]   8.00-9.00   sec  11.4 MBytes  95.5 Mbits/sec
[  4]   9.00-10.01  sec  11.4 MBytes  94.9 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bandwidth
[  4]   0.00-10.01  sec   114 MBytes  95.1 Mbits/sec                  sender
[  4]   0.00-10.01  sec   113 MBytes  95.1 Mbits/sec                  receiver

iperf Done.

ASIX AX88772 USB 2.0 Ethernet 普通网线

$ iperf3 -c 192.168.2.1 -p 10000
Connecting to host 192.168.2.1, port 10000
[  4] local 192.168.2.157 port 39252 connected to 192.168.2.1 port 10000
[ ID] Interval           Transfer     Bandwidth
[  4]   0.00-1.00   sec  5.25 MBytes  44.0 Mbits/sec
[  4]   1.00-2.00   sec  7.25 MBytes  60.7 Mbits/sec
[  4]   2.00-3.01   sec  7.50 MBytes  62.8 Mbits/sec
[  4]   3.01-4.01   sec  7.25 MBytes  60.8 Mbits/sec
[  4]   4.01-5.01   sec  7.25 MBytes  60.8 Mbits/sec
[  4]   5.01-6.02   sec  7.38 MBytes  61.3 Mbits/sec
[  4]   6.02-7.00   sec  7.12 MBytes  60.6 Mbits/sec
[  4]   7.00-8.01   sec  7.38 MBytes  61.7 Mbits/sec
[  4]   8.01-9.01   sec  7.25 MBytes  60.6 Mbits/sec
[  4]   9.01-10.01  sec  7.38 MBytes  61.7 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bandwidth
[  4]   0.00-10.01  sec  71.0 MBytes  59.5 Mbits/sec                  sender
[  4]   0.00-10.01  sec  70.8 MBytes  59.4 Mbits/sec                  receiver

iperf Done.

ASIX AX88772 USB 2.0 Ethernet 千兆网线

$ iperf3 -c 192.168.2.1 -p 10000
Connecting to host 192.168.2.1, port 10000
[  4] local 192.168.2.157 port 39894 connected to 192.168.2.1 port 10000
[ ID] Interval           Transfer     Bandwidth
[  4]   0.00-1.00   sec  7.50 MBytes  62.8 Mbits/sec
[  4]   1.00-2.00   sec  7.25 MBytes  60.7 Mbits/sec
[  4]   2.00-3.01   sec  7.25 MBytes  60.6 Mbits/sec
[  4]   3.01-4.01   sec  7.38 MBytes  61.9 Mbits/sec
[  4]   4.01-5.01   sec  7.50 MBytes  62.6 Mbits/sec
[  4]   5.01-6.00   sec  7.25 MBytes  61.5 Mbits/sec
[  4]   6.00-7.00   sec  7.38 MBytes  62.0 Mbits/sec
[  4]   7.00-8.01   sec  7.38 MBytes  61.4 Mbits/sec
[  4]   8.01-9.01   sec  7.25 MBytes  61.0 Mbits/sec
[  4]   9.01-10.00  sec  7.25 MBytes  61.1 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bandwidth
[  4]   0.00-10.00  sec  73.4 MBytes  61.5 Mbits/sec                  sender
[  4]   0.00-10.00  sec  73.2 MBytes  61.4 Mbits/sec                  receiver

iperf Done.

USB rtl8192cu AP Mode
信道11,无密码

$ iperf3 -c 192.168.2.1 -p 10000                                                            
Connecting to host 192.168.2.1, port 10000                                                  
[  4] local 192.168.2.185 port 40950 connected to 192.168.2.1 port 10000                    
[ ID] Interval           Transfer     Bandwidth                                             
[  4]   0.00-1.00   sec   256 KBytes  2.09 Mbits/sec                                        
[  4]   1.00-2.00   sec   512 KBytes  4.18 Mbits/sec                                        
[  4]   2.00-3.01   sec   512 KBytes  4.18 Mbits/sec                                        
[  4]   3.01-4.01   sec   512 KBytes  4.18 Mbits/sec                                        
[  4]   4.01-5.01   sec   256 KBytes  2.09 Mbits/sec                                        
[  4]   5.01-6.02   sec   384 KBytes  3.14 Mbits/sec                                        
[  4]   6.02-7.00   sec   256 KBytes  2.12 Mbits/sec                                        
[  4]   7.00-8.01   sec   512 KBytes  4.18 Mbits/sec                                        
[  4]   8.01-9.01   sec   384 KBytes  3.14 Mbits/sec                                        
[  4]   9.01-10.01  sec   384 KBytes  3.14 Mbits/sec                                        
- - - - - - - - - - - - - - - - - - - - - - - - -                                           
[ ID] Interval           Transfer     Bandwidth                                             
[  4]   0.00-10.01  sec  3.88 MBytes  3.25 Mbits/sec                  sender                
[  4]   0.00-10.01  sec  3.83 MBytes  3.21 Mbits/sec                  receiver              
                                                                                            
iperf Done.                                                                                 

信道4,无密码

$ iperf3 -c 192.168.2.1 -p 10000
Connecting to host 192.168.2.1, port 10000
[  4] local 192.168.2.185 port 41112 connected to 192.168.2.1 port 10000
[ ID] Interval           Transfer     Bandwidth
[  4]   0.00-1.00   sec   640 KBytes  5.24 Mbits/sec
[  4]   1.00-2.01   sec   512 KBytes  4.17 Mbits/sec
[  4]   2.01-3.01   sec   512 KBytes  4.18 Mbits/sec
[  4]   3.01-4.01   sec   512 KBytes  4.18 Mbits/sec
[  4]   4.01-5.02   sec   384 KBytes  3.13 Mbits/sec
[  4]   5.02-6.00   sec   384 KBytes  3.19 Mbits/sec
[  4]   6.00-7.00   sec   256 KBytes  2.09 Mbits/sec
[  4]   7.00-8.01   sec   384 KBytes  3.13 Mbits/sec
[  4]   8.01-9.01   sec   384 KBytes  3.14 Mbits/sec
[  4]   9.01-10.01  sec   256 KBytes  2.09 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bandwidth
[  4]   0.00-10.01  sec  4.12 MBytes  3.46 Mbits/sec                  sender
[  4]   0.00-10.01  sec  4.12 MBytes  3.46 Mbits/sec                  receiver

iperf Done. 

                           

USB rtl8192cu Station Mode

   
root@OpenWrt:/# iperf3 -c 192.168.10.174 -p 10000
Connecting to host 192.168.10.174, port 10000
[  5] local 192.168.10.176 port 47004 connected to 192.168.10.174 port 10000
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.00   sec   617 KBytes  5.05 Mbits/sec    0   91.9 KBytes       
[  5]   1.00-2.00   sec   868 KBytes  7.11 Mbits/sec    0    106 KBytes       
[  5]   2.00-3.00   sec  1.02 MBytes  8.54 Mbits/sec    0    116 KBytes       
[  5]   3.00-4.00   sec  1.03 MBytes  8.64 Mbits/sec    0    133 KBytes       
[  5]   4.00-5.00   sec   755 KBytes  6.18 Mbits/sec    0    133 KBytes       
[  5]   5.00-6.00   sec   419 KBytes  3.43 Mbits/sec    0    133 KBytes       
[  5]   6.00-7.00   sec   950 KBytes  7.78 Mbits/sec    0    208 KBytes       
[  5]   7.00-8.03   sec  4.07 MBytes  33.3 Mbits/sec    0    253 KBytes       
[  5]   8.03-9.00   sec  3.92 MBytes  33.6 Mbits/sec    0    253 KBytes       
[  5]   9.00-10.00  sec  3.78 MBytes  31.7 Mbits/sec    0    253 KBytes       
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-10.00  sec  17.3 MBytes  14.5 Mbits/sec    0             sender
[  5]   0.00-10.00  sec  17.3 MBytes  14.5 Mbits/sec                  receiver

iperf Done.

#11 Re: 全志 SOC » 通过 v3s openwrt 上网发个帖 » 2020-10-15 17:30:02

感觉是 lichee pi USB PCB 线路设计可能有问题,WiFi 和 USB 以太网速度都不快,下载测试只有 100K/s 到 300K/s 晚点再试下。

阿黄 说:

用iperf3可以测试的。 openwrt里面可以直接装ipk

#12 Re: 全志 SOC » 通过 v3s openwrt 上网发个帖 » 2020-10-15 17:09:27

不太会测试性能,弃坑了。。AP 模式用手机下载数据只有 100K/s 左右,用买的路由器差不多 10M/s, 专业的人做专业的事。。不继续深入了。

阿黄 说:
jujiaqi 说:
Iron 说:

ASIX AX88772 USB 2.0 Ethernet

10 多块钱的百兆那种。。热的烫手。。。

性能好不好再说,先研究学习下,后续考虑试试 imx6ull 工业级的芯片

ASIX 应该比较稳定,rtl8152b每隔一段时间,可能有十几天,就会断网,需要重新插拔。v3s跑openwrt 还挺合适的,期待楼主更多测试。

想请教下 V3S使用USB接LAN,速度能跑满吗?能跑到多少带宽?

#13 Re: 全志 SOC » 通过 v3s openwrt 上网发个帖 » 2020-10-12 21:36:07

换上 RTL8192CU 确实可以配置成 AP 了,构建一个可用的根文件系统还是挺难的,buildroot 编译感觉要一整天。。openwrt 的 imagebuilder 瞬间就可以输出一个可用的镜像文件了,官网的 openwrt sunxi 没使能 musb 驱动,需要 git clone openwrt 重新编译下内核就可以了。(前后研究了20天,主要是对 linux 驱动和WiFi驱动知识不了解,发给后来人看..)
RTL8192CU.png

Iron 说:

今天默默的买了 RTL8192CU 研究看看。。20块一个
https://item.taobao.com/item.htm?spm=a1z09.2.0.0.2da72e8dl1QvOE&id=588404509123&_u=b8lev2867f8


阿黄 说:

你看一下这个支持列表 https://wireless.wiki.kernel.org/en/users/drivers
我感觉RTL8192CU和RT2800系列支持的比较好。

#14 Re: 全志 SOC » 通过 v3s openwrt 上网发个帖 » 2020-10-11 20:34:51

今天默默的买了 RTL8192CU 研究看看。。20块一个
https://item.taobao.com/item.htm?spm=a1z09.2.0.0.2da72e8dl1QvOE&id=588404509123&_u=b8lev2867f8


阿黄 说:

你看一下这个支持列表 https://wireless.wiki.kernel.org/en/users/drivers
我感觉RTL8192CU和RT2800系列支持的比较好。

#15 Re: 全志 SOC » 通过 v3s openwrt 上网发个帖 » 2020-10-10 14:39:38

估计 AP6181 系列会好很多,例如 BCM43362 这种芯片貌似是工业级温度的。MT7601u / RTL8818CUS 应该都是商业级的,内核集成了驱动部分,主要是便宜拿来学习学习...

sy373466062 说:

这几款长期(7*24)使用稳定吗? RTL的很多都是用一段时间需要重启一下才行。

Iron 说:

是啊,主要做了 AP 测试,MT7601u / RTL8818CUS 模块出现的问题是一样的。刚重新用 19.07 源码编译了,下午看看。。

阿黄 说:

别啊,好不容易找到个一起玩V3S的OP的,我这个就是用的自带的MT7601u驱动,一开始报的信息和你截出来的一模一样,无线里面80211bgn没有信号强度,显示设备未激活,但是能搜到其他热点。后来把master禁用掉就好了。

你是要当AP热点?

#16 Re: 全志 SOC » 通过 v3s openwrt 上网发个帖 » 2020-10-10 14:20:47

https://wireless.wiki.kernel.org/en/users/drivers
确实是自带的 MT7601u 和 rtl8xxxu 驱动都不支持 AP 模式,再研究下,或者换个 WiFi 模块看看

阿黄 说:

昨晚我看了,openwrt自带的MT7601u驱动应该是不支持ap模式的,在系统中,使用iw list也表明了没有支持APmode,从github上找了一个 https://github.com/Anthony96922/mt7601u-ap ,还没编译成功

#17 Re: 全志 SOC » 通过 v3s openwrt 上网发个帖 » 2020-10-09 10:18:21

是啊,主要做了 AP 测试,MT7601u / RTL8818CUS 模块出现的问题是一样的。刚重新用 19.07 源码编译了,下午看看。。

阿黄 说:
Iron 说:

hmm 可能还是驱动问题,感觉坑越来越深。。。十一全在搬家了,东西都找不到了,感觉要弃坑了。

阿黄 说:

是的,做ap我还没测试,至少确定的一点是ap和 sta只能启用一个

别啊,好不容易找到个一起玩V3S的OP的,我这个就是用的自带的MT7601u驱动,一开始报的信息和你截出来的一模一样,无线里面80211bgn没有信号强度,显示设备未激活,但是能搜到其他热点。后来把master禁用掉就好了。

你是要当AP热点?

#18 Re: 全志 SOC » 通过 v3s openwrt 上网发个帖 » 2020-10-09 09:49:57

hmm 可能还是驱动问题,感觉坑越来越深。。。十一全在搬家了,东西都找不到了,感觉要弃坑了。

阿黄 说:
Iron 说:

意思是不能用作 AP 模式?你这测试的是 station 模式吧。

是的,做ap我还没测试,至少确定的一点是ap和 sta只能启用一个

#19 Re: 全志 SOC » 通过 v3s openwrt 上网发个帖 » 2020-10-09 08:20:51

意思是不能用作 AP 模式?你这测试的是 station 模式吧。

#20 Re: 全志 SOC » 通过 v3s openwrt 上网发个帖 » 2020-09-30 11:55:58

是的,简单测试迅雷下载点东西,只有 300K~500K 每秒,直接用WiFi有 1~2M,v3s 应该可以用外置千兆 PHY,USB 估计性能有线,另外 USB 接 WiFi, 要给 V3S 接外部电源,之前用电脑的 USB,开启 WiFi 直接,系统直接挂掉了,电脑 U 口供电不足。。。

阿黄 说:
jujiaqi 说:

即便搞定了wifi,性能也不会太好。我也在用openwrt,但只用了两个以太网口,把这个openwrt串在另外两个路由之间。

其中一个网口是USB转的吗?

#22 Re: VMWare/Linux/Ubuntu/Fedora/CentOS/U-BOOT » 解决 github.com 克隆速度太慢的问题 » 2020-09-29 17:25:58

速度可以,镜像? 为了导代码,专门装了台 NAS 跑 gogs 镜像各种源码。。

#23 Re: 全志 SOC » 通过 v3s openwrt 上网发个帖 » 2020-09-29 17:02:28

jujiaqi 说:

楼主的usb网卡是rtl8152b吗

ASIX AX88772 USB 2.0 Ethernet

10 多块钱的百兆那种。。热的烫手。。。

性能好不好再说,先研究学习下,后续考虑试试 imx6ull 工业级的芯片

#24 Re: 全志 SOC » 通过 v3s openwrt 上网发个帖 » 2020-09-29 16:22:08

阿黄 说:

你用的什么型号的USB WIFI,回头我也试一下

openwrt 19.07.4 首先要重新编译内核,使能 v3s 的 musb, 另外必须用 openwrt 源码编译,内核要打补丁。。

买了两种
MT7601u / RTL8818CUS

#25 全志 SOC » 通过 v3s openwrt 上网发个帖 » 2020-09-29 16:07:33

Iron
回复: 38

cool USB WiFi 依然没搞定,先用 USB ethernet 上网试试。。

_20200929160521.png
_20200929160503.jpg

WiFi 的故障日志:

Tue Sep 29 07:42:36 2020 user.notice mac80211: Failed command: iw phy phy0 set antenna 0xffffffff 0xffffffff
Tue Sep 29 07:42:36 2020 daemon.notice netifd: radio0 (4089): command failed: Not supported (-95)
Tue Sep 29 07:42:36 2020 user.notice mac80211: Failed command: iw phy phy0 set distance 0
Tue Sep 29 07:42:36 2020 daemon.notice netifd: radio0 (4089): command failed: Not supported (-95)
Tue Sep 29 07:42:36 2020 user.notice mac80211: Failed command: iw phy phy0 interface add wlan0 type __ap
Tue Sep 29 07:42:36 2020 daemon.err hostapd: Configuration file: /var/run/hostapd-phy0.conf
Tue Sep 29 07:42:36 2020 daemon.err hostapd: Could not read interface wlan0 flags: No such device
Tue Sep 29 07:42:36 2020 daemon.notice hostapd: nl80211: Driver does not support authentication/association or connect commands
Tue Sep 29 07:42:36 2020 daemon.notice hostapd: nl80211: deinit ifname=wlan0 disabled_11b_rates=0
Tue Sep 29 07:42:36 2020 daemon.err hostapd: Could not read interface wlan0 flags: No such device
Tue Sep 29 07:42:36 2020 daemon.err hostapd: nl80211 driver initialization failed.
Tue Sep 29 07:42:36 2020 daemon.notice hostapd: wlan0: interface state UNINITIALIZED->DISABLED
Tue Sep 29 07:42:36 2020 daemon.notice hostapd: wlan0: AP-DISABLED
Tue Sep 29 07:42:36 2020 daemon.notice hostapd: wlan0: CTRL-EVENT-TERMINATING
Tue Sep 29 07:42:36 2020 daemon.err hostapd: hostapd_free_hapd_data: Interface wlan0 wasn't started
Tue Sep 29 07:42:36 2020 daemon.notice netifd: radio0 (4089): cat: can't open '/var/run/wifi-phy0.pid': No such file or directory
Tue Sep 29 07:42:36 2020 daemon.notice netifd: radio0 (4089): WARNING (wireless_add_process): executable path /usr/sbin/wpad does not match process  path (/proc/exe)
Tue Sep 29 07:42:36 2020 daemon.notice netifd: radio0 (4089): Command failed: Invalid argument
Tue Sep 29 07:42:36 2020 daemon.notice netifd: radio0 (4089): Device setup failed: HOSTAPD_START_FAILED

下班继续研究。。。

#26 Re: 全志 SOC » v3s openwrt usb wifi 驱动成功了,还没正常配置热点 » 2020-09-29 16:03:31

阿黄 说:

19.07.4是刚出的吧,这么快就升到这个版本了啊 好快啊

用的最新版的开发测试。。

#27 Re: 全志 SOC » v3s openwrt usb wifi 驱动成功了,还没正常配置热点 » 2020-09-27 16:59:37

sad 驱动貌似都可以,就是不能正常路由上网,不能正常配置 WiFi, 继续尝试...

v3s-openwrt-2.png

#28 全志 SOC » v3s openwrt usb wifi 驱动成功了,还没正常配置热点 » 2020-09-27 14:17:43

Iron
回复: 5

搞了10多天了,重新给 v3s 编译了 openwrt 的 linux 内核,添加配置 MUSB, Wireless, Wireless  LAN Driver 可以正常识别 wlan 网卡了。目前又卡在 WiFi 配置上

v3s openwrt

#29 Re: 全志 SOC » 采用 openwrt imagebuilder 构建 v3s cpio-rootfs 运行测试 » 2020-09-25 09:58:09

改个错误,rdinit 应该采用 rdinit=/etc/preinit

setenv bootargs console=ttyS0,115200 initrd=0x41B00000,2247520 rdinit=/etc/preinit ; bootz 0x41000000 - 0x41800000

#30 Re: 全志 SOC » 采用 openwrt imagebuilder 构建 v3s cpio-rootfs 运行测试 » 2020-09-22 09:35:31

checkout 说:

请问使用这个打包工具打包镜像,和直接使用openwrt有哪些异同?
是不是可以使用openwrt上的一些工具,例如sysupgrade升级系统?

OpenWRT Imagebuilder 最终生成的就是 SD 镜像文件。
cpio rootfs 可以通过 sunx-fel USB 下载到 SDRAM 里运行测试,我的目的是测试根文件系统和驱动时不需要烧写 SD 卡。

'sysupgrade' 功能应该是可以的,应该需要把镜像烧录到 SD 卡运行,目前也在摸索学习中。。

#31 全志 SOC » 采用 openwrt imagebuilder 构建 v3s cpio-rootfs 运行测试 » 2020-09-18 13:09:19

Iron
回复: 6

系统环境:Debian/Ubuntu

参考文档:
    https://openwrt.org/docs/guide-user/additional-software/imagebuilder
    The Image Builder runs only in 64bit linux. You can however run a 64bit linux in VM (i.e. virtualbox) even from 32bit windows.

清华镜像:
    https://mirrors.tuna.tsinghua.edu.cn/help/openwrt/
    https://mirrors.tuna.tsinghua.edu.cn/openwrt/
下载文件:
    https://mirrors.tuna.tsinghua.edu.cn/openwrt/releases/19.07.4/targets/sunxi/cortexa7/openwrt-imagebuilder-19.07.4-sunxi-cortexa7.Linux-x86_64.tar.xz



1. Debian/Ubuntu 环境配置

apt-get install build-essential libncurses5-dev libncursesw5-dev zlib1g-dev gawk git gettext libssl-dev xsltproc wget unzip python

2. 解压 openwrt-imagebuilder-19.07.4-sunxi-cortexa7.Linux-x86_64.tar.xz 到指定目录

tar -xvf openwrt-imagebuilder-19.07.4-sunxi-cortexa7.Linux-x86_64.tar.xz
cd openwrt-imagebuilder-19.07.4-sunxi-cortexa7.Linux-x86_64

3. 修改 repositories.conf, 指定镜像地址,加快下载速度

# rootfs  sed -i 's_downloads.openwrt.org_mirrors.tuna.tsinghua.edu.cn/openwrt_' /etc/opkg/distfeeds.conf
sed -i 's_downloads.openwrt.org_mirrors.tuna.tsinghua.edu.cn/openwrt_' repositories.conf

3. 修改 .config 文件, 添加 cpio 格式 rootfs

CONFIG_TARGET_ROOTFS_CPIOGZ=y

4. 'make image' 
     默认会输出所有 PROFILE 配置的镜像文件,因为测试只需要 cpio 格式 rootfs, 可以指定 PROFILE 节省输出时间

# make image # 生成所有 PROFILE 镜像
make image PROFILE=sun8i-h2-plus-orangepi-zero # 指定 PROFILE
# make image PROFILE=sun8i-h2-plus-orangepi-zero PACKAGES="luci" FILES="<path>" # 指定 PROFILE,添加 PACKAGES, 添加文件到 rootfs,如网络配置等

5. make image 完成
   在 .\bin\targets\sunxi\cortexa7 目录下生成了 openwrt-19.07.4-sunxi-cortexa7-rootfs.cpio.gz 镜像文件

6. Windows sunxi-fel USB 下载运行测试,由于默认生成的 openwrt rootfs 里没有 /init 文件, kernel 命令参数需要指定 'rdinit=/sbin/init'。
_sunxi-fel_v3s_run_openwrt.bat

:: _sunxi-fel_v3s_run_openwrt.bat
:: make image PROFILE=sun8i-v3s-lichee-pi-zero PACKAGES="luci" FILES="./target/linux/sunxi/base-files" # add "/init"
:: openwrt-19.07.4-sunxi-cortexa7-rootfs_target-base-filse.cpio (2247520字节)
:: "setenv bootargs console=ttyS0,115200 initrd=0x41B00000,2247520 rdinit=/sbin/init; bootz 0x41000000 - 0x41800000"

sunxi-fel.exe -p uboot u-boot-sunxi-with-spl.bin write 0x41000000 zImage write 0x41800000 sun8i-v3s-licheepi-ethernet.dtb write 0x41B00000 openwrt-19.07.4-sunxi-cortexa7-rootfs.cpio.gz

测试文件:
https://whycan.com/files/members/1206/openwrt_v3s_usb-run-test_20200918-1316.rar


运行日志

U-Boot SPL 2020.07 (Jul 31 2020 - 15:28:00 +0800)
DRAM: 64 MiB
Trying to boot from FEL


U-Boot 2020.07 (Jul 31 2020 - 15:28:00 +0800) Allwinner Technology

CPU:   Allwinner V3s (SUN8I 1681)
Model: Lichee Pi Zero
DRAM:  64 MiB
MMC:   mmc@01c0f000: 0
Loading Environment from FAT... Card did not respond to voltage select!
In:    serial@01c28000
Out:   serial@01c28000
Err:   serial@01c28000
Net:   No ethernet found.
starting USB...
No working controllers found
Hit any key to stop autoboot:  0 
Card did not respond to voltage select!
starting USB...
No working controllers found
USB is stopped. Please issue 'usb start' first.
starting USB...
No working controllers found
No ethernet found.
missing environment variable: pxeuuid
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/00000000
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/0000000
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/000000
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/00000
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/0000
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/000
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/00
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/0
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/default-arm-sunxi-sunxi
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/default-arm-sunxi
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/default-arm
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/default
No ethernet found.
Config file not found
starting USB...
No working controllers found
No ethernet found.
No ethernet found.
=> setenv bootargs console=ttyS0,115200 initrd=0x41B00000,2247520 rdinit=/sbin/init; bootz 0x41000000 - 0x41800000
## Flattened Device Tree blob at 41800000
   Booting using the fdt blob at 0x41800000
   Loading Device Tree to 42dfa000, end 42dff574 ... OK

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 5.4.61-g6070742d3 (iron@d0483bbb7ad2) (gcc version 8.3.0 (Debian 8.3.0-2)) #1 SMP Fri Sep 18 11:33:30 CST 2020
[    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 Ethernet
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] cma: Failed to reserve 16 MiB
[    0.000000] psci: probing for conduit method from DT.
[    0.000000] psci: Using PSCI v0.1 Function IDs from DT
[    0.000000] percpu: Embedded 15 pages/cpu s30604 r8192 d22644 u61440
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 16256
[    0.000000] Kernel command line: console=ttyS0,115200 initrd=0x41B00000,2247520 rdinit=/sbin/init
[    0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes, linear)
[    0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes, linear)
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 52724K/65536K available (6144K kernel code, 436K rwdata, 1700K rodata, 1024K init, 246K bss, 12812K reserved, 0K cma-reserved, 0K highmem)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] rcu: Hierarchical RCU implementation.
[    0.000000] rcu: 	RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=1.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[    0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000] GIC: GICv2 detected, but range too small and irqchip.gicv2_force_probe not set
[    0.000000] random: get_random_bytes called from start_kernel+0x2b0/0x448 with crng_init=0
[    0.000000] arch_timer: cp15 timer(s) running at 24.00MHz (phys).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x588fe9dc0, max_idle_ns: 440795202592 ns
[    0.000007] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns
[    0.000018] Switching to timer-based delay loop, resolution 41ns
[    0.000239] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[    0.000496] Console: colour dummy device 80x30
[    0.000559] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=240000)
[    0.000575] pid_max: default: 32768 minimum: 301
[    0.000745] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.000759] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.001637] CPU: Testing write buffer coherency: ok
[    0.002170] /cpus/cpu@0 missing clock-frequency property
[    0.002196] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[    0.003024] Setting up static identity map for 0x40100000 - 0x40100060
[    0.003255] rcu: Hierarchical SRCU implementation.
[    0.003770] smp: Bringing up secondary CPUs ...
[    0.003792] smp: Brought up 1 node, 1 CPU
[    0.003801] SMP: Total of 1 processors activated (48.00 BogoMIPS).
[    0.003808] CPU: All CPU(s) started in HYP mode.
[    0.003813] CPU: Virtualization extensions available.
[    0.004436] devtmpfs: initialized
[    0.007443] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
[    0.007803] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.007832] futex hash table entries: 256 (order: 2, 16384 bytes, linear)
[    0.008050] pinctrl core: initialized pinctrl subsystem
[    0.009245] NET: Registered protocol family 16
[    0.009692] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.011038] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
[    0.011057] hw-breakpoint: maximum watchpoint size is 8 bytes.
[    0.025031] SCSI subsystem initialized
[    0.025733] usbcore: registered new interface driver usbfs
[    0.025788] usbcore: registered new interface driver hub
[    0.025888] usbcore: registered new device driver usb
[    0.026150] pps_core: LinuxPPS API ver. 1 registered
[    0.026160] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.026182] PTP clock support registered
[    0.026451] Advanced Linux Sound Architecture Driver Initialized.
[    0.027671] clocksource: Switched to clocksource arch_sys_counter
[    0.039278] thermal_sys: Registered thermal governor 'step_wise'
[    0.039626] NET: Registered protocol family 2
[    0.040309] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes, linear)
[    0.040343] TCP established hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.040367] TCP bind hash table entries: 1024 (order: 1, 8192 bytes, linear)
[    0.040389] TCP: Hash tables configured (established 1024 bind 1024)
[    0.040540] UDP hash table entries: 256 (order: 1, 8192 bytes, linear)
[    0.040594] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes, linear)
[    0.040852] NET: Registered protocol family 1
[    0.041761] RPC: Registered named UNIX socket transport module.
[    0.041783] RPC: Registered udp transport module.
[    0.041790] RPC: Registered tcp transport module.
[    0.041796] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.042108] Unpacking initramfs...
[    0.263620] Freeing initrd memory: 2196K
[    0.265264] workingset: timestamp_bits=30 max_order=14 bucket_order=0
[    0.273734] NFS: Registering the id_resolver key type
[    0.273794] Key type id_resolver registered
[    0.273802] Key type id_legacy registered
[    0.273923] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 248)
[    0.273934] io scheduler mq-deadline registered
[    0.273942] io scheduler kyber registered
[    0.274841] sun4i-usb-phy 1c19400.phy: Couldn't request ID GPIO
[    0.278922] sun8i-v3s-pinctrl 1c20800.pinctrl: initialized sunXi PIO driver
[    0.346723] Serial: 8250/16550 driver, 8 ports, IRQ sharing disabled
[    0.349361] sun8i-v3s-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pb not found, using dummy regulator
[    0.350481] printk: console [ttyS0] disabled
[    0.370788] 1c28000.serial: ttyS0 at MMIO 0x1c28000 (irq = 30, base_baud = 1500000) is a U6_16550A
[    0.942089] printk: console [ttyS0] enabled
[    0.971572] libphy: Fixed MDIO Bus: probed
[    0.975684] CAN device driver interface
[    0.980120] dwmac-sun8i 1c30000.ethernet: IRQ eth_wake_irq not found
[    0.986479] dwmac-sun8i 1c30000.ethernet: IRQ eth_lpi not found
[    0.992607] dwmac-sun8i 1c30000.ethernet: PTP uses main clock
[    0.998467] dwmac-sun8i 1c30000.ethernet: No regulator found
[    1.004677] dwmac-sun8i 1c30000.ethernet: Current syscon value is not the default 38000 (expect 58000)
[    1.014087] dwmac-sun8i 1c30000.ethernet: No HW DMA feature register supported
[    1.021327] dwmac-sun8i 1c30000.ethernet: RX Checksum Offload Engine supported
[    1.028558] dwmac-sun8i 1c30000.ethernet: COE Type 2
[    1.033519] dwmac-sun8i 1c30000.ethernet: TX Checksum insertion supported
[    1.040313] dwmac-sun8i 1c30000.ethernet: Normal descriptors
[    1.045965] dwmac-sun8i 1c30000.ethernet: Chain mode enabled
[    1.051648] dwmac-sun8i 1c30000.ethernet: device MAC address e6:14:67:11:c5:ab
[    1.059155] libphy: stmmac: probed
[    1.063271] dwmac-sun8i 1c30000.ethernet: Found internal PHY node
[    1.069625] libphy: mdio_mux: probed
[    1.073227] dwmac-sun8i 1c30000.ethernet: Switch mux to internal PHY
[    1.079626] dwmac-sun8i 1c30000.ethernet: Powering internal PHY
[    1.089726] libphy: mdio_mux: probed
[    1.093637] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    1.100291] ehci-platform: EHCI generic platform driver
[    1.105636] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    1.111906] ohci-platform: OHCI generic platform driver
[    1.119030] sun6i-rtc 1c20400.rtc: registered as rtc0
[    1.124096] sun6i-rtc 1c20400.rtc: RTC enabled
[    1.128938] i2c /dev entries driver
[    1.133779] sunxi-wdt 1c20ca0.watchdog: Watchdog enabled (timeout=16 sec, nowayout=0)
[    1.142518] sun8i-v3s-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pf not found, using dummy regulator
[    1.178964] sunxi-mmc 1c0f000.mmc: initialized, max. request size: 16384 KB
[    1.186438] sun8i-v3s-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pg not found, using dummy regulator
[    1.197998] usbcore: registered new interface driver usbhid
[    1.203578] usbhid: USB HID core driver
[    1.209514] NET: Registered protocol family 17
[    1.213997] can: controller area network core (rev 20170425 abi 9)
[    1.220424] NET: Registered protocol family 29
[    1.224876] can: raw protocol (rev 20170425)
[    1.229192] can: broadcast manager protocol (rev 20170425 t)
[    1.234854] can: netlink gateway (rev 20190810) max_hops=1
[    1.240706] Key type dns_resolver registered
[    1.245083] Registering SWP/SWPB emulation handler
[    1.259261] usb_phy_generic usb_phy_generic.1.auto: usb_phy_generic.1.auto supply vcc not found, using dummy regulator
[    1.270932] musb-hdrc musb-hdrc.2.auto: MUSB HDRC host driver
[    1.276718] musb-hdrc musb-hdrc.2.auto: new USB bus registered, assigned bus number 1
[    1.286183] hub 1-0:1.0: USB hub found
[    1.290281] hub 1-0:1.0: 1 port detected
[    1.295849] sun6i-rtc 1c20400.rtc: setting system clock to 1970-01-01T00:17:45 UTC (1065)
[    1.304408] ALSA device list:
[    1.307386]   No soundcards found.
[    1.312971] Freeing unused kernel memory: 1024K
[    1.317881] Run /sbin/init as init process
[    1.326567] cgroup1: Need name or subsystem set
[    1.362120] init: Console is alive
[    1.365821] init: - watchdog -
[    1.380092] init: - preinit -
[    1.521345] random: jshn: uninitialized urandom read (4 bytes read)
[    1.555949] random: jshn: uninitialized urandom read (4 bytes read)
[    1.581226] random: jshn: uninitialized urandom read (4 bytes read)
[    1.605149] dwmac-sun8i 1c30000.ethernet eth0: PHY [0.1:01] driver [Generic PHY]
[    1.613929] dwmac-sun8i 1c30000.ethernet eth0: No Safety Features support found
[    1.621313] dwmac-sun8i 1c30000.ethernet eth0: No MAC Management Counters available
[    1.628991] dwmac-sun8i 1c30000.ethernet eth0: PTP not supported by HW
[    1.635522] dwmac-sun8i 1c30000.ethernet eth0: configuring for phy/mii link mode
Press the [f] key and hit [enter] to enter failsafe mode
Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level
[    4.761984] mount_root: mounting /dev/root
[    4.771340] urandom-seed: Seed file not found (/etc/urandom.seed)
[    4.804367] procd: - early -
[    4.807386] procd: - watchdog -
[    5.636054] procd: - watchdog -
[    5.639612] procd: - ubus -
[    5.647248] urandom_read: 1 callbacks suppressed
[    5.647261] random: ubusd: uninitialized urandom read (4 bytes read)
[    5.692897] random: ubusd: uninitialized urandom read (4 bytes read)
[    5.699824] random: ubusd: uninitialized urandom read (4 bytes read)
[    5.707025] procd: - init -
Please press Enter to activate this console.
[    6.003990] urngd: v1.0.2 started.
[    6.052981] random: crng init done
[    6.056393] random: 3 urandom warning(s) missed due to ratelimiting



BusyBox v1.30.1 () built-in shell (ash)

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 OpenWrt 19.07.4, r11208-ce6496d796
 -----------------------------------------------------
=== WARNING! =====================================
There is no root password defined on this device!
Use the "passwd" command to set up a new password
in order to prevent unauthorized SSH logins.
--------------------------------------------------
root@OpenWrt:/# 

#32 Re: 全志 SOC » Allwinner V3s SD 运行 Alpine Linux 发行版总结(适用于 H3 等其他 ARM 板) » 2020-09-10 11:26:49

zhjerry 说:

看了WIKI说安装使用的最小内存是256M和128M, 那么64M的V3S是不够的。 楼主试了吗?

有兴趣可以看下面运行日志,mount sd卡其他分区到 /usr 目录,可以安装 gcc,gdb, openssl-server 等, 实测可以用 Windows Visual Studio 通过 ssh 开发 V3s 的 linux 程序。

alpine:~# free
              total        used        free      shared  buff/cache   available
Mem:          51088       25892       11828        6528       13368       18860
Swap:       1048572           0     1048572
alpine:~# df -h
Filesystem                Size      Used Available Use% Mounted on
devtmpfs                 10.0M         0     10.0M   0% /dev
shm                      24.9M         0     24.9M   0% /dev/shm
/dev/mmcblk0p1          511.7M    207.0M    304.8M  40% /media/mmcblk0p1
tmpfs                    24.9M      6.3M     18.7M  25% /
tmpfs                     5.0M     88.0K      4.9M   2% /run
/dev/loop0               27.5M     27.5M         0 100% /.modloop
/dev/mmcblk0p2            5.6G    406.0M      4.9G   8% /usr

完整运行日志

U-Boot SPL 2020.07 (Jul 31 2020 - 15:28:00 +0800)
DRAM: 64 MiB
Trying to boot from MMC1


U-Boot 2020.07 (Jul 31 2020 - 15:28:00 +0800) Allwinner Technology

CPU:   Allwinner V3s (SUN8I 1681)
Model: Lichee Pi Zero
DRAM:  64 MiB
MMC:   mmc@01c0f000: 0
Loading Environment from FAT... OK
In:    serial@01c28000
Out:   serial@01c28000
Err:   serial@01c28000
Net:   No ethernet found.
starting USB...
No working controllers found
Hit any key to stop autoboot:  0 
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
Found /extlinux/extlinux.conf
Retrieving file: /extlinux/extlinux.conf
246 bytes read in 4 ms (59.6 KiB/s)
1:	Linux lts
Retrieving file: /boot/initramfs-lts
6900974 bytes read in 318 ms (20.7 MiB/s)
Retrieving file: /boot/vmlinuz-lts
4948480 bytes read in 230 ms (20.5 MiB/s)
append: modules=loop,squashfs,sd-mod,usb-storage,ext4
Retrieving file: /boot/dtbs-lts/sun8i-v3s-licheepi-ethernet.dtb
10072 bytes read in 50 ms (196.3 KiB/s)
## Flattened Device Tree blob at 41800000
   Booting using the fdt blob at 0x41800000
   Loading Ramdisk to 4276b000, end 42dffcee ... OK
   Loading Device Tree to 42765000, end 4276a757 ... OK

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 5.4.43-1-lts (buildozer@build-3-12-armv7) (gcc version 9.3.0 (Alpine 9.3.0)) #2-Alpine SMP Thu, 28 May 2020 20:13:48 UTC
[    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 Ethernet
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] efi: Getting EFI parameters from FDT:
[    0.000000] efi: UEFI not found.
[    0.000000] cma: Failed to reserve 48 MiB
[    0.000000] psci: probing for conduit method from DT.
[    0.000000] psci: Using PSCI v0.1 Function IDs from DT
[    0.000000] percpu: Embedded 20 pages/cpu s51596 r8192 d22132 u81920
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 16240
[    0.000000] Kernel command line: modules=loop,squashfs,sd-mod,usb-storage,ext4
[    0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes, linear)
[    0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes, linear)
[    0.000000] mem auto-init: stack:off, heap alloc:on, heap free:off
[    0.000000] Memory: 43324K/65536K available (7168K kernel code, 592K rwdata, 2416K rodata, 1024K init, 2807K bss, 22212K reserved, 0K cma-reserved, 0K highmem)
[    0.000000] random: get_random_u32 called from cache_random_seq_create+0x98/0x148 with crng_init=0
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] kmemleak: Kernel memory leak detector disabled
[    0.000000] ftrace: allocating 26545 entries in 52 pages
[    0.000000] rcu: Hierarchical RCU implementation.
[    0.000000] rcu: 	RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=1.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[    0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000] GIC: GICv2 detected, but range too small and irqchip.gicv2_force_probe not set
[    0.000000] arch_timer: cp15 timer(s) running at 24.00MHz (phys).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x588fe9dc0, max_idle_ns: 440795202592 ns
[    0.000008] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns
[    0.000021] Switching to timer-based delay loop, resolution 41ns
[    0.000547] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[    0.001158] Console: colour dummy device 80x30
[    0.001586] printk: console [tty0] enabled
[    0.001669] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=240000)
[    0.001708] pid_max: default: 32768 minimum: 301
[    0.001974] LSM: Security Framework initializing
[    0.002029] Yama: becoming mindful.
[    0.002206] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.002246] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.003793] CPU: Testing write buffer coherency: ok
[    0.004623] /cpus/cpu@0 missing clock-frequency property
[    0.004683] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[    0.005967] Setting up static identity map for 0x40300000 - 0x403000ac
[    0.006620] rcu: Hierarchical SRCU implementation.
[    0.007255] EFI services will not be available.
[    0.007584] smp: Bringing up secondary CPUs ...
[    0.007619] smp: Brought up 1 node, 1 CPU
[    0.007637] SMP: Total of 1 processors activated (48.00 BogoMIPS).
[    0.007654] CPU: All CPU(s) started in HYP mode.
[    0.007667] CPU: Virtualization extensions available.
[    0.008718] devtmpfs: initialized
[    0.012687] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
[    0.013621] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.013712] futex hash table entries: 256 (order: 2, 16384 bytes, linear)
[    0.014369] pinctrl core: initialized pinctrl subsystem
[    0.016193] DMI not present or invalid.
[    0.016924] NET: Registered protocol family 16
[    0.017599] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.018451] audit: initializing netlink subsys (disabled)
[    0.023252] audit: type=2000 audit(0.020:1): state=initialized audit_enabled=0 res=1
[    0.028317] cpuidle: using governor ladder
[    0.028373] cpuidle: using governor menu
[    0.028885] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
[    0.028934] hw-breakpoint: maximum watchpoint size is 8 bytes.
[    0.036444] Serial: AMBA PL011 UART driver
[    0.116843] fbcon: Taking over console
[    0.119984] pps_core: LinuxPPS API ver. 1 registered
[    0.120037] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.120100] PTP clock support registered
[    0.131246] NetLabel: Initializing
[    0.131303] NetLabel:  domain hash size = 128
[    0.131319] NetLabel:  protocols = UNLABELED CIPSOv4 CALIPSO
[    0.131497] NetLabel:  unlabeled traffic allowed by default
[    0.133587] clocksource: Switched to clocksource arch_sys_counter
[    0.176891] VFS: Disk quotas dquot_6.6.0
[    0.177073] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    0.233028] thermal_sys: Registered thermal governor 'fair_share'
[    0.233039] thermal_sys: Registered thermal governor 'step_wise'
[    0.234431] NET: Registered protocol family 2
[    0.236369] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes, linear)
[    0.236480] TCP established hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.236531] TCP bind hash table entries: 1024 (order: 1, 8192 bytes, linear)
[    0.236569] TCP: Hash tables configured (established 1024 bind 1024)
[    0.236797] UDP hash table entries: 256 (order: 1, 8192 bytes, linear)
[    0.236863] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes, linear)
[    0.237495] NET: Registered protocol family 1
[    0.237587] NET: Registered protocol family 44
[    0.238645] Trying to unpack rootfs image as initramfs...
[    0.832906] Freeing initrd memory: 6740K
[    0.838651] Initialise system trusted keyrings
[    0.841009] workingset: timestamp_bits=14 max_order=14 bucket_order=0
[    0.879500] Key type asymmetric registered
[    0.879559] Asymmetric key parser 'x509' registered
[    0.880350] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 248)
[    0.881389] io scheduler mq-deadline registered
[    0.881438] io scheduler kyber registered
[    0.899395] sun8i-v3s-pinctrl 1c20800.pinctrl: initialized sunXi PIO driver
[    0.917310] Serial: 8250/16550 driver, 8 ports, IRQ sharing disabled
[    0.928126] sun8i-v3s-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pb not found, using dummy regulator
[    0.949772] 1c28000.serial: ttyS0 at MMIO 0x1c28000 (irq = 31, base_baud = 1500000) is a U6_16550A
[    1.576464] printk: console [ttyS0] enabled
[    1.582345] Serial: AMBA driver
[    1.587524] msm_serial: driver initialized
[    1.633091] brd: module loaded
[    1.639195] libphy: Fixed MDIO Bus: probed
[    1.648553] sun6i-rtc 1c20400.rtc: registered as rtc0
[    1.653872] sun6i-rtc 1c20400.rtc: RTC enabled
[    1.665153] ledtrig-cpu: registered to indicate activity on CPUs
[    1.674920] ashmem: initialized
[    1.684601] Key type dns_resolver registered
[    1.688975] ThumbEE CPU extension supported.
[    1.693279] Registering SWP/SWPB emulation handler
[    1.699439] registered taskstats version 1
[    1.703795] Loading compiled-in X.509 certificates
[    1.710486] Key type ._fscrypt registered
[    1.715281] Key type .fscrypt registered
[    1.728758] sun6i-rtc 1c20400.rtc: setting system clock to 2020-09-10T03:19:22 UTC (1599707962)
[    1.744818] Freeing unused kernel memory: 1024K
[    1.763799] Run /init as init process
Alpine Init 3.4.5-r3
 * Loading boot drivers: [    1.889631] loop: module loaded
[    1.896977] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    1.914530] SCSI subsystem initialized
[    1.934639] usbcore: registered new interface driver usbfs
[    1.941062] usbcore: registered new interface driver hub
[    1.947081] usbcore: registered new device driver usb
[    1.959026] usbcore: registered new interface driver usb-storage
ok.
 * Mounting boot media: [    2.860588] sun8i-v3s-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pf not found, using dummy regulator
[    2.896357] sunxi-mmc 1c0f000.mmc: initialized, max. request size: 16384 KB
[    2.905696] sun8i-v3s-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pg not found, using dummy regulator
[    2.941682] sunxi-mmc 1c10000.mmc: initialized, max. request size: 16384 KB
[    2.958369] mmc0: host does not support reading read-only switch, assuming write-enable
[    2.974554] mmc1: queuing unknown CIS tuple 0x01 (3 bytes)
[    2.995903] mmc0: new high speed SDHC card at address 1234
[    3.007654] mmc1: queuing unknown CIS tuple 0x1a (5 bytes)
[    3.026869] mmc1: queuing unknown CIS tuple 0x1b (8 bytes)
[    3.045674] mmc1: queuing unknown CIS tuple 0x80 (1 bytes)
[    3.055954] mmcblk0: mmc0:1234 SA08G 7.21 GiB 
[    3.064187] mmc1: queuing unknown CIS tuple 0x81 (1 bytes)
[    3.073905] mmc1: queuing unknown CIS tuple 0x82 (1 bytes)
[    3.080014] mmc1: new high speed SDIO card at address 0001
[    3.085946]  mmcblk0: p1 p2 p3
[    4.368575] FAT-fs (mmcblk0p1): utf8 is not a recommended IO charset for FAT filesystems, filesystem will be case sensitive!
[    4.403364] random: fast init done
[    4.598556] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
ok.
 * Loading user settings from /media/mmcblk0p1/alpine.apkovl.tar.gz: ok.
 * Installing packages to root filesystem: (1/56) Installing musl (1.1.24-r9)
(2/56) Installing busybox (1.31.1-r19)
Executing busybox-1.31.1-r19.post-install
(3/56) Installing alpine-baselayout (3.2.0-r7)
Executing alpine-baselayout-3.2.0-r7.pre-install
Executing alpine-baselayout-3.2.0-r7.post-install
(4/56) Installing openrc (0.42.1-r11)
Executing openrc-0.42.1-r11.post-install
(5/56) Installing alpine-conf (3.9.0-r1)
(6/56) Installing libcrypto1.1 (1.1.1g-r0)
(7/56) Installing libssl1.1 (1.1.1g-r0)
(8/56) Installing ca-certificates-bundle (20191127-r4)
(9/56) Installing libtls-standalone (2.9.1-r1)
(10/56) Installing ssl_client (1.31.1-r19)
(11/56) Installing zlib (1.2.11-r3)
(12/56) Installing apk-tools (2.10.5-r1)
(13/56) Installing busybox-suid (1.31.1-r19)
(14/56) Installing busybox-initscripts (3.2-r2)
Executing busybox-initscripts-3.2-r2.post-install
(15/56) Installing scanelf (1.2.6-r0)
(16/56) Installing musl-utils (1.1.24-r9)
(17/56) Installing libc-utils (0.7.2-r3)
(18/56) Installing alpine-keys (2.2-r0)
(19/56) Installing alpine-base (3.12.0-r0)
(20/56) Installing libcap (2.27-r0)
(21/56) Installing chrony (3.5.1-r0)
Executing chrony-3.5.1-r0.pre-install
(22/56) Installing chrony-openrc (3.5.1-r0)
(23/56) Installing libgcc (9.3.0-r2)
(24/56) Installing libstdc++ (9.3.0-r2)
  3% #                                           [    7.964107] apk invoked oom-killer: gfp_mask=0x100cca(GFP_HIGHUSER_MOVABLE), order=0, oom_score_adj=0
[    7.973376] CPU: 0 PID: 1130 Comm: apk Not tainted 5.4.43-1-lts #2-Alpine
[    7.980166] Hardware name: Allwinner sun8i Family
[    7.984871] Backtrace: 
[    7.987346] [<8030e3dc>] (dump_backtrace) from [<8030e73c>] (show_stack+0x20/0x24)
[    7.994925]  r7:00000548 r6:60000013 r5:00000000 r4:80e8a110
[    8.000593] [<8030e71c>] (show_stack) from [<809759ac>] (dump_stack+0xc4/0xd8)
[    8.007831] [<809758e8>] (dump_stack) from [<804a29fc>] (dump_header+0x64/0x1b4)
[    8.015233]  r7:00000548 r6:80ba8c6c r5:83be0000 r4:829edd28
[    8.020900] [<804a2998>] (dump_header) from [<804a1db4>] (oom_kill_process+0x168/0x174)
[    8.028909]  r7:00000548 r6:80ba8c6c r5:829edd28 r4:83be0000
[    8.034575] [<804a1c4c>] (oom_kill_process) from [<804a2824>] (out_of_memory+0x260/0x33c)
[    8.042758]  r7:80e06494 r6:80e09640 r5:829edd28 r4:83be0000
[    8.048429] [<804a25c4>] (out_of_memory) from [<804ee800>] (__alloc_pages_nodemask+0xdf0/0x1130)
[    8.057218]  r6:829ec000 r5:00000000 r4:00000000
[    8.061849] [<804eda10>] (__alloc_pages_nodemask) from [<804b77e0>] (shmem_alloc_page+0x44/0x68)
[    8.070641]  r10:82270148 r9:8396d800 r8:000000dc r7:00000005 r6:82270038 r5:80e06744
[    8.078471]  r4:82ae1008
[    8.081015] [<804b779c>] (shmem_alloc_page) from [<804b9300>] (shmem_getpage_gfp.constprop.0+0x180/0x888)
[    8.090581]  r4:82ae1008
[    8.093125] [<804b9180>] (shmem_getpage_gfp.constprop.0) from [<804bb130>] (shmem_fallocate+0x3a4/0x550)
[    8.102611]  r10:829ec000 r9:822700c0 r8:000000dc r7:0000011a r6:00000000 r5:00000000
[    8.110441]  r4:82270038
[    8.112985] [<804bad8c>] (shmem_fallocate) from [<80515bdc>] (vfs_fallocate+0x178/0x2a4)
[    8.121082]  r10:00000000 r9:00000000 r8:00000000 r7:00000000 r6:804bad8c r5:83a21b40
[    8.128913]  r4:00000000
[    8.131453] [<80515a64>] (vfs_fallocate) from [<8051681c>] (ksys_fallocate+0x50/0x84)
[    8.139290]  r10:00000160 r9:829ec000 r8:83a21b40 r7:00000000 r6:00000000 r5:00000000
[    8.147120]  r4:83a21b40
[    8.149661] [<805167cc>] (ksys_fallocate) from [<80516874>] (sys_fallocate+0x24/0x2c)
[    8.157497]  r8:80301204 r7:00000160 r6:7e86f034 r5:00000000 r4:00119644
[    8.164204] [<80516850>] (sys_fallocate) from [<80301000>] (ret_fast_syscall+0x0/0x4c)
[    8.172124] Exception stack(0x829edfa8 to 0x829edff0)
[    8.177182] dfa0:                   00119644 00000000 00000008 00000000 00000000 00000000
[    8.185366] dfc0: 00119644 00000000 7e86f034 00000160 00000008 7e871574 7e871190 00000000
[    8.193546] dfe0: 00000003 7e86ef1c 004ff0c1 76fae12a
[    8.198600]  r5:00000000 r4:00119644
[    8.202347] Mem-Info:
[    8.204694] active_anon:5389 inactive_anon:3658 isolated_anon:0
[    8.204694]  active_file:1 inactive_file:0 isolated_file:0
[    8.204694]  unevictable:0 dirty:1 writeback:0 unstable:0
[    8.204694]  slab_reclaimable:950 slab_unreclaimable:1348
[    8.204694]  mapped:631 shmem:5943 pagetables:19 bounce:0
[    8.204694]  free:207 free_pcp:5 free_cma:0
[    8.236446] Node 0 active_anon:21556kB inactive_anon:14632kB active_file:4kB inactive_file:0kB unevictable:0kB isolated(anon):0kB isolated(file):0kB mapped:2524kB dirty:4kB writeback:0kB shmem:23772kB writeback_tmp:0kB unstable:0kB all_unreclaimable? yes
[    8.258997] Normal free:828kB min:832kB low:1040kB high:1248kB active_anon:21556kB inactive_anon:14632kB active_file:4kB inactive_file:0kB unevictable:0kB writepending:4kB present:65536kB managed:51088kB mlocked:0kB kernel_stack:320kB pagetables:76kB bounce:0kB free_pcp:20kB local_pcp:20kB free_cma:0kB
[    8.285774] lowmem_reserve[]: 0 0 0
[    8.289272] Normal: 17*4kB (UE) 11*8kB (UE) 10*16kB (UE) 4*32kB (UM) 2*64kB (ME) 0*128kB 1*256kB (E) 0*512kB 0*1024kB 0*2048kB 0*4096kB = 828kB
[    8.302180] 5945 total pagecache pages
[    8.305947] 0 pages in swap cache
[    8.309266] Swap cache stats: add 0, delete 0, find 0/0
[    8.314505] Free swap  = 0kB
[    8.317388] Total swap = 0kB
[    8.320269] 16384 pages RAM
[    8.323064] 0 pages HighMem/MovableOnly
[    8.326919] 3612 pages reserved
[    8.330063] 0 pages cma reserved
[    8.333292] Tasks state (memory values in pages):
[    8.338009] [  pid  ]   uid  tgid total_vm      rss pgtables_bytes swapents oom_score_adj name
[    8.346658] [   1130]     0  1130     3892     3583    26624        0             0 apk
[    8.354690] oom-kill:constraint=CONSTRAINT_NONE,nodemask=(null),global_oom,task_memcg=/,task=apk,pid=1130,uid=0
[    8.364840] Out of memory: Killed process 1130 (apk) total-vm:15568kB, anon-rss:12356kB, file-rss:0kB, shmem-rss:1976kB, UID:0 pgtables:26kB oom_score_adj:0
[    8.386275] oom_reaper: reaped process 1130 (apk), now anon-rss:0kB, file-rss:0kB, shmem-rss:0kB
Killed
ok.


   OpenRC 0.42.1.188bfebd7f is starting up Linux 5.4.43-1-lts (armv7l)

 * /proc is already mounted
 * Mounting /run ... * /run/openrc: creating directory
 * /run/lock: creating directory
 * /run/lock: correcting owner
 * Caching service dependencies ... [ ok ]
 * Remounting devtmpfs on /dev ... [ ok ]
 * Mounting /dev/mqueue ... [ ok ]
 * Mounting modloop  ... * Missing openssl. Modloop verification disabled!
 [ ok ]
 * Mounting security filesystem ... [ ok ]
 * Mounting debug filesystem ... [ ok ]
 * Mounting persistent storage (pstore) filesystem ... [ ok ]
 * Starting busybox mdev ... [ ok ]
 * Loading hardware drivers ... [ ok ]
 * Loading modules ... [ ok ]
 * Setting system clock using the hardware clock [UTC] ... [ ok ]
 * Checking local filesystems  ...fsck: fsck.ext4: No such file or directory
 [ ok ]
 * Remounting filesystems ... [ ok ]
 * Mounting local filesystems ... [ ok ]
 * Configuring kernel parameters ... [ ok ]
 * Migrating /var/lock to /run/lock ... [ ok ]
 * Creating user login records ... [ ok ]
 * Wiping /tmp directory ... [ ok ]
 * Setting hostname ... [ ok ]
 * Setting keymap ... [ ok ]
 * Starting networking ... *   lo ... [ ok ]
 *   eth0 ...udhcpc: started, v1.31.1
udhcpc: sending discover
udhcpc: sending select for 192.168.10.233
udhcpc: lease of 192.168.10.233 obtained, lease time 86400
 [ ok ]
 * Starting busybox syslog ... [ ok ]
 * Starting busybox acpid ... [ ok ]
 * Starting chronyd ... [ ok ]
 * Starting busybox crond ... [ ok ]

Welcome to Alpine Linux 3.12
Kernel 5.4.43-1-lts on an armv7l (/dev/ttyS0)

alpine login: root
Password: 
Welcome to Alpine!

The Alpine Wiki contains a large amount of how-to guides and general
information about administrating Alpine systems.
See <http://wiki.alpinelinux.org/>.

You can setup the system with the command: setup-alpine

You may change this message by editing /etc/motd.

alpine:~# df -h
Filesystem                Size      Used Available Use% Mounted on
devtmpfs                 10.0M         0     10.0M   0% /dev
shm                      24.9M         0     24.9M   0% /dev/shm
/dev/mmcblk0p1          511.7M    207.0M    304.8M  40% /media/mmcblk0p1
tmpfs                    24.9M      6.3M     18.7M  25% /
tmpfs                     5.0M     88.0K      4.9M   2% /run
/dev/loop0               27.5M     27.5M         0 100% /.modloop
/dev/mmcblk0p2            5.6G    406.0M      4.9G   8% /usr
alpine:~# free
              total        used        free      shared  buff/cache   available
Mem:          51088       25596       12192        6528       13300       19168
Swap:             0           0           0
alpine:~# swapon /dev/mmcblk0p3
alpine:~# free
              total        used        free      shared  buff/cache   available
Mem:          51088       25852       11924        6528       13312       18908
Swap:       1048572           0     1048572
alpine:~# fdisk -l
Disk /dev/mmcblk0: 7386 MB, 7744782336 bytes, 15126528 sectors
236352 cylinders, 4 heads, 16 sectors/track
Units: sectors of 1 * 512 = 512 bytes

Device       Boot StartCHS    EndCHS        StartLBA     EndLBA    Sectors  Size Id Type
/dev/mmcblk0p1 *  0,32,33     65,101,36         2048    1050623    1048576  512M  e Win95 FAT16 (LBA)
/dev/mmcblk0p2    65,101,37   811,10,31      1050624   13029375   11978752 5849M 83 Linux
/dev/mmcblk0p3    811,10,32   941,148,39    13029376   15126527    2097152 1024M 82 Linux swap
alpine:~# ifconfig
eth0      Link encap:Ethernet  HWaddr 06:BF:32:25:66:3A  
          inet addr:192.168.10.233  Bcast:0.0.0.0  Mask:255.255.255.0
          inet6 addr: fe80::4bf:32ff:fe25:663a/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:106 errors:0 dropped:1 overruns:0 frame:0
          TX packets:29 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:12659 (12.3 KiB)  TX bytes:2986 (2.9 KiB)
          Interrupt:32 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

alpine:~# top
Mem: 39256K used, 11832K free, 6528K shrd, 1204K buff, 12156K cached
CPU:   0% usr   0% sys   0% nic 100% idle   0% io   0% irq   0% sirq
Load average: 0.02 0.04 0.01 1/57 2088
  PID  PPID USER     STAT   VSZ %VSZ CPU %CPU COMMAND
 2081  2080 root     S     1336   3%   0   0% -ash
 1947     1 root     S     1312   3%   0   0% /sbin/syslogd -t
 2088  2081 root     R     1300   3%   0   0% top
 2052     1 root     S     1296   3%   0   0% /usr/sbin/crond -c /etc/crontabs
    1     0 root     S     1292   3%   0   0% /sbin/init
 2080     1 root     S     1292   3%   0   0% /bin/login -- root
 2076     1 root     S     1292   3%   0   0% /sbin/getty 38400 tty6
 2064     1 root     S     1292   3%   0   0% /sbin/getty 38400 tty3
 2068     1 root     S     1292   3%   0   0% /sbin/getty 38400 tty4
 2069     1 root     S     1292   3%   0   0% /sbin/getty 38400 tty5
 1892     1 root     S     1292   3%   0   0% udhcpc -b -R -p /var/run/udhcpc.et
 2060     1 root     S     1292   3%   0   0% /sbin/getty 38400 tty2
 2059     1 root     S     1292   3%   0   0% /sbin/getty 38400 tty1
 2027     1 chrony   S      868   2%   0   0% /usr/sbin/chronyd -f /etc/chrony/c
   10     2 root     IW       0   0%   0   0% [rcu_sched]
 1079     2 root     IW<      0   0%   0   0% [kworker/0:2H-kb]
    9     2 root     SW       0   0%   0   0% [ksoftirqd/0]
   15     2 root     IW       0   0%   0   0% [kworker/u2:1-ev]
   63     2 root     IW       0   0%   0   0% [kworker/0:1-eve]
  968     2 root     IW<      0   0%   0   0% [kworker/0:1H-kb]

#33 全志 SOC » Allwinner V3s SD 运行 Alpine Linux 发行版总结(适用于 H3 等其他 ARM 板) » 2020-09-10 09:49:38

Iron
回复: 3

Alpine Linux is a security-oriented, lightweight Linux distribution based on musl libc and busybox.
https://www.alpinelinux.org/
特点:
- 根文件系统采用 tmpfs,掉电会丢失当前运行参数,重新恢复到原系统状态
- 采用 lbu commit 可以保存配置等信息
- 采用 apk 包管理系统

1. SD 卡格式化为 FAT 格式,可选添加其他分区

2. 编译和烧写 u-boot 到 SD 卡

make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- LicheePi_Zero_defconfig
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf-

sudo dd if=u-boot-sunxi-with-spl.bin of=/dev/<sdx> bs=1024 seek=8

3. 下载解压 Generic ARM 压缩文件至 SD boot 分区 FAT 目录
  http://dl-cdn.alpinelinux.org/alpine/v3.12/releases/armv7/alpine-uboot-3.12.0-armv7.tar.gz

4. 上电即可运行,系统配置和管理参考
wiki 链接:https://wiki.alpinelinux.org/wiki/Main_Page
apk 镜像源:https://mirrors.alpinelinux.org/

5. 关于外设驱动
- alpine linux 内核编译配置信息在 boot 目录 config-lts
- alpine linux usb kernel 驱动配置为 "host" 模式,v3s 设备树默认为 "otg", 修改设备树为 usb dr_mode 为 "host", 参考 H3 添加 ohci0 ehci0, 重新编译设备树即可识别 USB 外设,已实测可以 U盘,USB WiFi 网卡,4G 模块。。
- V3s 驱动和 H3 类似,例如以太网,LCD 参考 H3 设备树配置即可

#34 Re: 全志 SOC » lichee-pi_zero v3s Windows 环境下 USB FEL 下载到 RAM 运行 OpenWrt 19.07.1 测试 » 2020-08-26 00:39:59

哦豁哦豁 说:

请问楼主, openwrt 怎么移植?

没有移植,主要通过 dockerhub 里的 openwrt imagebuilder, 选择对应芯片分支镜像,然后 make image, 会在目录下生成一个 rootfs 目录(具体生成方法可以研究 make image 脚本),提取 rootfs 目录后,再利用 buildroot 选择 rootfs overlay 生成不同格式的 rootfs 镜像,最后挂载到 kernel 就可以运行了。实际运行估计还要修改 rootfs 配置,比如 root 密码,getty console 配置,network init 脚本等。

#35 NXP i.MX6UL/6ULL » imx6ull usb 下载运行 initrd » 2020-08-26 00:32:23

Iron
回复: 0

主要目的是在不烧写 emmc 或 sd 的情况下,通过 USB 下载实现运行和调试 u-boot, linux kernel, rootfs,外设驱动等。
采用 uuu.exe 在 windows 下写入 SDRAM,imx6ull 启动配置为 USB  方式。

:(遇到一个被自己坑的深坑,initrd 的第二个参数,必须是 rootfs 准确的文件大小,否则可能在调用解压缩处理时出错导致无法加载 rootfs,之前 v3s 图省事,填了一个较大的值,也能正常运行,但是 imx6ull 采用外部 SDRAM, 上电复位后的 RAM 值是 0xFFFFFFFF,最后导致挂载 rootfs 出错。
出错提示为: devtmpfs: error mounting -2

USB 下载运行测试文件
_20200826003120.png


CMD 命令行

uuu usb-run_scripts_imx-cpio.txt

uuu scripts 脚本

uuu_version 1.1.0

SDP: boot -f u-boot-dtb.imx -nojump

# 0x80000000 ~ 0xA000000
SDP: write -f zImage -addr 0x82000000
SDP: write -f imx6ull-14x14-evk.dtb -addr 0x83000000

SDP: write -f alpine-linux-rootfs\rootfs.cpio.gz -addr 0x84000000
#SDP: write -f alpine-linux-rootfs\rootfs.cpio -addr 0x84000000

SDP: jump -f u-boot-dtb.imx 
#SDPU: done

运行日志如下:

U-Boot 2020.07 (Aug 24 2020 - 01:57:45 +0800)

CPU:   Freescale i.MX6ULL rev1.1 792 MHz (running at 396 MHz)
CPU:   Industrial temperature grade (-40C to 105C) at 39C
Reset cause: POR
Model: Freescale i.MX6 UltraLiteLite 14x14 EVK Board
Board: MX6ULL 14x14 EVK
DRAM:  512 MiB
MMC:   FSL_SDHC: 0, FSL_SDHC: 1
Loading Environment from MMC... *** Warning - bad CRC, using default environment

In:    serial
Out:   serial
Err:   serial
Net:   
Error: ethernet@20b4000 address not set.

Error: ethernet@20b4000 address not set.
Could not get PHY for FEC0: addr 2
Could not get PHY for FEC0: addr 2
No ethernet found.

Hit any key to stop autoboot:  0 
switch to partitions #0, OK
mmc1(part 0) is current device
switch to partitions #0, OK
mmc1(part 0) is current device
** No partition table - mmc 1 **
** No partition table - mmc 1 **
Booting from net ...

Error: ethernet@20b4000 address not set.

Error: ethernet@20b4000 address not set.

Error: ethernet@20b4000 address not set.
Could not get PHY for FEC0: addr 2

Error: ethernet@20b4000 address not set.

Error: ethernet@20b4000 address not set.
No ethernet found.

Error: ethernet@20b4000 address not set.

Error: ethernet@20b4000 address not set.

Error: ethernet@20b4000 address not set.

Error: ethernet@20b4000 address not set.
Could not get PHY for FEC0: addr 2

Error: ethernet@20b4000 address not set.

Error: ethernet@20b4000 address not set.
No ethernet found.

Error: ethernet@20b4000 address not set.
zimage: Bad magic!
=> setenv bootargs console=ttymxc0,115200 initrd=0x84000000,4683796 root=/dev/ram0 rw; bootz 0x82000000 - 0x83000000
Kernel image @ 0x82000000 [ 0x000000 - 0x8038b0 ]
## Flattened Device Tree blob at 83000000
   Booting using the fdt blob at 0x83000000
   Using Device Tree in place at 83000000, end 8300a3b0

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 5.4.25-gb11492dff (iron@iron-debian-ipason) (gcc version 8.3.0 (Debian 8.3.0-2)) #14 SMP Wed Aug 26 00:06:59 +08 2020
[    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: Freescale i.MX6 UltraLiteLite 14x14 EVK Board
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] cma: Reserved 64 MiB at 0x9c000000
[    0.000000] percpu: Embedded 20 pages/cpu s50344 r8192 d23384 u81920
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 130048
[    0.000000] Kernel command line: console=ttymxc0,115200 initrd=0x84000000,4683796 root=/dev/ram0 rw
[    0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes, linear)
[    0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes, linear)
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 423320K/524288K available (12288K kernel code, 987K rwdata, 4288K rodata, 1024K init, 6598K bss, 35432K reserved, 65536K cma-reserved, 0K highmem)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] Running RCU self tests
[    0.000000] rcu: Hierarchical RCU implementation.
[    0.000000] rcu: 	RCU event tracing is enabled.
[    0.000000] rcu: 	RCU lockdep checking is enabled.
[    0.000000] rcu: 	RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=1.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[    0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000] random: get_random_bytes called from start_kernel+0x2b0/0x4c8 with crng_init=0
[    0.000000] Switching to timer-based delay loop, resolution 41ns
[    0.000020] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
[    0.000091] clocksource: mxc_timer1: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[    0.003917] Console: colour dummy device 80x30
[    0.004031] Lock dependency validator: Copyright (c) 2006 Red Hat, Inc., Ingo Molnar
[    0.004077] ... MAX_LOCKDEP_SUBCLASSES:  8
[    0.004120] ... MAX_LOCK_DEPTH:          48
[    0.004162] ... MAX_LOCKDEP_KEYS:        8192
[    0.004201] ... CLASSHASH_SIZE:          4096
[    0.004243] ... MAX_LOCKDEP_ENTRIES:     32768
[    0.004284] ... MAX_LOCKDEP_CHAINS:      65536
[    0.004323] ... CHAINHASH_SIZE:          32768
[    0.004364]  memory used by lock dependency info: 3997 kB
[    0.004406]  memory used for stack traces: 2112 kB
[    0.004447]  per task-struct memory footprint: 1536 bytes
[    0.004688] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=240000)
[    0.004761] pid_max: default: 32768 minimum: 301
[    0.005724] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.005799] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.014922] CPU: Testing write buffer coherency: ok
[    0.018236] CPU0: update cpu_capacity 1024
[    0.018310] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[    0.024462] Setting up static identity map for 0x80100000 - 0x80100078
[    0.026025] rcu: Hierarchical SRCU implementation.
[    0.029238] smp: Bringing up secondary CPUs ...
[    0.029311] smp: Brought up 1 node, 1 CPU
[    0.029365] SMP: Total of 1 processors activated (48.00 BogoMIPS).
[    0.029412] CPU: All CPU(s) started in SVC mode.
[    0.035220] devtmpfs: initialized
[    0.086583] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
[    0.089043] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.089226] futex hash table entries: 256 (order: 2, 16384 bytes, linear)
[    0.095642] pinctrl core: initialized pinctrl subsystem
[    0.107875] NET: Registered protocol family 16
[    0.168471] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.177497] cpuidle: using governor menu
[    0.222552] vdd3p0: supplied by regulator-dummy
[    0.227038] cpu: supplied by regulator-dummy
[    0.231390] vddsoc: supplied by regulator-dummy
[    0.295647] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
[    0.295856] hw-breakpoint: maximum watchpoint size is 8 bytes.
[    0.307771] imx6ul-pinctrl 20e0000.iomuxc: initialized IMX pinctrl driver
[    0.309811] imx6ul-pinctrl 2290000.iomuxc-snvs: no groups defined in /soc/aips-bus@2200000/iomuxc-snvs@2290000
[    0.309886] imx6ul-pinctrl 2290000.iomuxc-snvs: initialized IMX pinctrl driver
[    0.558159] mxs-dma 1804000.dma-apbh: initialized
[    0.571214] vgaarb: loaded
[    0.575372] SCSI subsystem initialized
[    0.579251] usbcore: registered new interface driver usbfs
[    0.580328] usbcore: registered new interface driver hub
[    0.580913] usbcore: registered new device driver usb
[    0.590393] i2c i2c-0: IMX I2C adapter registered
[    0.594926] i2c i2c-1: IMX I2C adapter registered
[    0.595833] mc: Linux media interface: v0.10
[    0.596170] videodev: Linux video capture interface: v2.00
[    0.597451] pps_core: LinuxPPS API ver. 1 registered
[    0.597511] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.597668] PTP clock support registered
[    0.600656] Advanced Linux Sound Architecture Driver Initialized.
[    0.608264] Bluetooth: Core ver 2.22
[    0.608589] NET: Registered protocol family 31
[    0.608643] Bluetooth: HCI device and connection manager initialized
[    0.608955] Bluetooth: HCI socket layer initialized
[    0.609050] Bluetooth: L2CAP socket layer initialized
[    0.609420] Bluetooth: SCO socket layer initialized
[    0.615580] clocksource: Switched to clocksource mxc_timer1
[    2.385035] thermal_sys: Registered thermal governor 'step_wise'
[    2.386905] NET: Registered protocol family 2
[    2.391641] tcp_listen_portaddr_hash hash table entries: 256 (order: 1, 10240 bytes, linear)
[    2.391937] TCP established hash table entries: 4096 (order: 2, 16384 bytes, linear)
[    2.392177] TCP bind hash table entries: 4096 (order: 5, 147456 bytes, linear)
[    2.393394] TCP: Hash tables configured (established 4096 bind 4096)
[    2.394437] UDP hash table entries: 256 (order: 2, 20480 bytes, linear)
[    2.394729] UDP-Lite hash table entries: 256 (order: 2, 20480 bytes, linear)
[    2.396496] NET: Registered protocol family 1
[    2.402323] RPC: Registered named UNIX socket transport module.
[    2.402570] RPC: Registered udp transport module.
[    2.402624] RPC: Registered tcp transport module.
[    2.402674] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    2.406132] PCI: CLS 0 bytes, default 64
[    2.408853] Trying to unpack rootfs image as initramfs...
[    2.565951] random: fast init done
[    3.882008] Freeing initrd memory: 4576K
[    3.885644] hw perfevents: enabled with armv7_cortex_a7 PMU driver, 5 counters available
[    3.896332] Initialise system trusted keyrings
[    3.898181] workingset: timestamp_bits=30 max_order=17 bucket_order=0
[    3.962382] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    3.969459] NFS: Registering the id_resolver key type
[    3.969919] Key type id_resolver registered
[    3.970158] Key type id_legacy registered
[    3.970647] jffs2: version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
[    4.080852] Key type asymmetric registered
[    4.081239] Asymmetric key parser 'x509' registered
[    4.081740] io scheduler mq-deadline registered
[    4.081808] io scheduler kyber registered
[    4.098696] pwm-backlight backlight-display: backlight-display supply power not found, using dummy regulator
[    4.129361] imx-sdma 20ec000.sdma: Direct firmware load for imx/sdma/sdma-imx6q.bin failed with error -2
[    4.129632] imx-sdma 20ec000.sdma: Falling back to sysfs fallback for: imx/sdma/sdma-imx6q.bin
[    4.142903] 2020000.serial: ttymxc0 at MMIO 0x2020000 (irq = 21, base_baud = 5000000) is a IMX
[    4.893755] printk: console [ttymxc0] enabled
[    4.907283] 21e8000.serial: ttymxc1 at MMIO 0x21e8000 (irq = 65, base_baud = 5000000) is a IMX
[    4.947050] panel-simple panel: panel supply power not found, using dummy regulator
[    4.965102] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[    4.972095] [drm] No driver support for vblank timestamp query.
[    4.989961] [drm] Initialized mxsfb-drm 1.0.0 20160824 for 21c8000.lcdif on minor 0
[    5.038745] Console: switching to colour frame buffer device 60x34
[    5.049761] mxsfb 21c8000.lcdif: fb0: mxsfb-drmdrmfb frame buffer device
[    5.131662] brd: module loaded
[    5.205138] loop: module loaded
[    5.240085] spi-nor spi4.0: unrecognized JEDEC id bytes: ff ff ff ff ff ff
[    5.251028] gpio@0 enforce active low on chipselect handle
[    5.272978] libphy: Fixed MDIO Bus: probed
[    5.281185] CAN device driver interface
[    5.295267] pps pps0: new PPS source ptp0
[    5.302549] fec 20b4000.ethernet: Invalid MAC address: 00:00:00:00:00:00
[    5.309652] fec 20b4000.ethernet: Using random MAC address: 9e:0a:64:c9:ff:75
[    5.319053] libphy: fec_enet_mii_bus: probed
[    5.355040] fec 20b4000.ethernet eth0: registered PHC device 0
[    5.367468] pps pps1: new PPS source ptp1
[    5.374019] fec 2188000.ethernet: Invalid MAC address: 00:00:00:00:00:00
[    5.381310] fec 2188000.ethernet: Using random MAC address: fa:3c:9b:1e:37:9e
[    5.762627] libphy: fec_enet_mii_bus: probed
[    5.770748] fec 2188000.ethernet eth1: registered PHC device 1
[    5.780937] usbcore: registered new interface driver r8152
[    5.787462] usbcore: registered new interface driver lan78xx
[    5.793584] usbcore: registered new interface driver asix
[    5.799836] usbcore: registered new interface driver ax88179_178a
[    5.806702] usbcore: registered new interface driver cdc_ether
[    5.812952] usbcore: registered new interface driver smsc95xx
[    5.819216] usbcore: registered new interface driver net1080
[    5.825188] usbcore: registered new interface driver cdc_subset
[    5.831638] usbcore: registered new interface driver zaurus
[    5.837702] usbcore: registered new interface driver MOSCHIP usb-ethernet driver
[    5.846002] usbcore: registered new interface driver cdc_ncm
[    5.851769] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    5.858554] ehci-pci: EHCI PCI platform driver
[    5.863346] ehci-mxc: Freescale On-Chip EHCI Host driver
[    5.870742] usbcore: registered new interface driver usb-storage
[    5.884177] imx_usb 2184000.usb: No over current polarity defined
[    5.891410] imx_usb 2184000.usb: 2184000.usb supply vbus not found, using dummy regulator
[    5.914495] mxs_phy 20c9000.usbphy: vbus is not valid
[    5.926222] imx_usb 2184200.usb: 2184200.usb supply vbus not found, using dummy regulator
[    5.941100] ci_hdrc ci_hdrc.1: EHCI Host Controller
[    5.947106] ci_hdrc ci_hdrc.1: new USB bus registered, assigned bus number 1
[    5.985711] ci_hdrc ci_hdrc.1: USB 2.0 started, EHCI 1.00
[    5.994743] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.04
[    6.003700] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    6.011190] usb usb1: Product: EHCI Host Controller
[    6.016309] usb usb1: Manufacturer: Linux 5.4.25-gb11492dff ehci_hcd
[    6.022759] usb usb1: SerialNumber: ci_hdrc.1
[    6.036975] hub 1-0:1.0: USB hub found
[    6.041601] hub 1-0:1.0: 1 port detected
[    6.064896] input: 20cc000.snvs:snvs-powerkey as /devices/soc0/soc/2000000.aips-bus/20cc000.snvs/20cc000.snvs:snvs-powerkey/input/input0
[    6.089424] input: iMX6UL Touchscreen Controller as /devices/soc0/soc/2000000.aips-bus/2040000.tsc/input/input1
[    6.119273] snvs_rtc 20cc000.snvs:snvs-rtc-lp: registered as rtc0
[    6.126458] i2c /dev entries driver
[    6.139591] pxp 21cc000.pxp: Device registered as /dev/video0
[    6.169434] imx2-wdt 20bc000.wdog: timeout 60 sec (nowayout=0)
[    6.177316] Bluetooth: HCI UART driver ver 2.3
[    6.181878] Bluetooth: HCI UART protocol H4 registered
[    6.187503] Bluetooth: HCI UART protocol LL registered
[    6.196760] sdhci: Secure Digital Host Controller Interface driver
[    6.203044] sdhci: Copyright(c) Pierre Ossman
[    6.207676] sdhci-pltfm: SDHCI platform and OF driver helper
[    6.218251] sdhci-esdhc-imx 2190000.usdhc: Got CD GPIO
[    6.269532] mmc0: SDHCI controller on 2190000.usdhc [2190000.usdhc] using ADMA
[    6.318707] mmc1: SDHCI controller on 2194000.usdhc [2194000.usdhc] using ADMA
[    6.407018] usbcore: registered new interface driver usbhid
[    6.412826] usbhid: USB HID core driver
[    6.431610] mag3110 0-000e: 0-000e supply vdd not found, using dummy regulator
[    6.442936] mmc1: new DDR MMC card at address 0001
[    6.449157] mag3110 0-000e: 0-000e supply vddio not found, using dummy regulator
[    6.467423] mmcblk1: mmc1:0001 8GTF4R 7.28 GiB 
[    6.473718] mmcblk1boot0: mmc1:0001 8GTF4R partition 1 4.00 MiB
[    6.498506] mmcblk1boot1: mmc1:0001 8GTF4R partition 2 4.00 MiB
[    6.517322] mmcblk1rpmb: mmc1:0001 8GTF4R partition 3 512 KiB, chardev (244:0)
[    6.527751] wm8960 1-001a: Failed to issue reset
[    6.602113] NET: Registered protocol family 10
[    6.628615] Segment Routing with IPv6
[    6.632707] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[    6.644032] NET: Registered protocol family 17
[    6.649194] can: controller area network core (rev 20170425 abi 9)
[    6.656220] NET: Registered protocol family 29
[    6.660793] can: raw protocol (rev 20170425)
[    6.665743] can: broadcast manager protocol (rev 20170425 t)
[    6.671585] can: netlink gateway (rev 20190810) max_hops=1
[    6.679114] Key type dns_resolver registered
[    6.710899] Registering SWP/SWPB emulation handler
[    6.716884] Loading compiled-in X.509 certificates
[    6.855653] regulator-can-3v3 GPIO handle specifies active low - ignored
[    6.881858] imx_thermal tempmon: Industrial CPU temperature grade - max:105C critical:100C passive:95C
[    6.900792] snvs_rtc 20cc000.snvs:snvs-rtc-lp: setting system clock to 1970-01-01T02:08:19 UTC (7699)
[    6.910775] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[    6.942716] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[    6.950945] ALSA device list:
[    6.955216] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
[    6.964310] platform regulatory.0: Falling back to sysfs fallback for: regulatory.db
[    6.972748]   No soundcards found.
[    6.982092] Freeing unused kernel memory: 1024K
[    6.996278] Run /init as init process

   OpenRC 0.41.2.2bf3cea is starting up Buildroot 2020.02-g2bf3cea (armv7l)

 * Mounting /proc ... [ ok ]
 * Mounting /run ... * /run/openrc: creating directory
 * /run/lock: creating directory
 * /run/lock: correcting owner
 * Caching service dependencies ... [ ok ]
 * Clock skew detected with `(null)'
 * Adjusting mtime of `/run/openrc/deptree' to Sun Aug 23 15:43:37 2020

 * WARNING: clock skew detected!
 * Mounting /sys ... [ ok ]
 * Mounting security filesystem ... [ ok ]
 * Mounting debug filesystem ... [ ok ]
 * Mounting cgroup filesystem ... [ ok ]
 * Remounting devtmpfs on /dev ... [ ok ]
 * Mounting /dev/pts ... [ ok ]
 * Mounting /dev/shm ... [ ok ]
 * WARNING: clock skew detected!
 * Setting system clock using the hardware clock [UTC] ... [ ok ]
modprobe: can't change directory to '5.4.25-gb11492dff': No such file or directory
 * Loading custom binary format handlers ... [ ok ]
 * Checking local filesystems  ... [ ok ]
 * Remounting filesystems ... [ ok ]
 * Updating /etc/mtab ... * Creating mtab symbolic link
 [ ok ]
 * Activating swap devices ... [ ok ]
 * Mounting local filesystems ... [ ok ]
 * Configuring kernel parameters ... [ ok ]
 * Migrating /var/lock to /run/lock ... [ ok ]
 * Creating user login records ... [ ok ]
 * Wiping /tmp directory ... [ ok ]
 * Setting hostname to localhost from /etc/hostname ... [ ok ]
 * Bringing up network interface lo ... [ ok ]
 * Starting networking ... *   lo ...ip: RTNETLINK answers: File exists
 [ !! ]
 *   eth0 ...udhcpc: started, v1.31.1
udhcpc: sending discover
udhcpc: sending discover
udhcpc: sending discover
udhcpc: sending select for 192.168.1.204
udhcpc: lease of 192.168.1.204 obtained, lease time 259200
 [ ok ]
 * Setting terminal encoding [ASCII] ... [ ok ]
 * Saving terminal encoding ... [ ok ]
 * Adding static routes ... [ ok ]
 * WARNING: clock skew detected!
 * Starting /etc/init.d/S01syslogd
 [ ok ]
 * Starting /etc/init.d/S02klogd
 [ ok ]
 * Starting /etc/init.d/S02sysctl
 [ ok ]
 * Starting /etc/init.d/S20urandom
 [ ok ]
 * Starting /etc/init.d/S40network
ip: RTNETLINK answers: File exists
ifup: interface eth0 already configured
 [ ok ]

Welcome to Alpine Linux 3.12
Kernel 5.4.25-gb11492dff on an armv7l (/dev/ttymxc0)

localhost login: root
Welcome to Alpine!

The Alpine Wiki contains a large amount of how-to guides and general
information about administrating Alpine systems.
See <http://wiki.alpinelinux.org/>.

You can setup the system with the command: setup-alpine

You may change this message by editing /etc/motd.

localhost:~# ifconfig
eth0      Link encap:Ethernet  HWaddr 9E:0A:64:C9:FF:75  
          inet addr:192.168.1.204  Bcast:0.0.0.0  Mask:255.255.255.0
          inet6 addr: fe80::9c0a:64ff:fec9:ff75/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:5 errors:0 dropped:0 overruns:0 frame:0
          TX packets:12 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:1390 (1.3 KiB)  TX bytes:1424 (1.3 KiB)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

localhost:~# free
              total        used        free      shared  buff/cache   available
Mem:         494456       26204      454476         120       13776      456540
Swap:             0           0           0
localhost:~# df -h
Filesystem                Size      Used Available Use% Mounted on
devtmpfs                 10.0M         0     10.0M   0% /dev
tmpfs                    48.3M    120.0K     48.2M   0% /run
cgroup_root              10.0M         0     10.0M   0% /sys/fs/cgroup
shm                     241.4M         0    241.4M   0% /dev/shm
localhost:~# fdisk -l
Disk /dev/mmcblk1: 7456 MB, 7818182656 bytes, 15269888 sectors
238592 cylinders, 4 heads, 16 sectors/track
Units: sectors of 1 * 512 = 512 bytes

Disk /dev/mmcblk1 doesn't contain a valid partition table
localhost:~# 

#36 全志 SOC » Lichee-pi-zero allwinner-v3s LCD 成功驱动 ~ » 2020-08-05 02:24:24

Iron
回复: 14

深夜晒图

 LCD test 00
 LCD test 01

测试镜像文件,windows 环境下 usb 下载运行
 LCD test 01

修改的 linux kernel 源码地址, 分之 v3s:
https://gitee.com/vjiot-open/linux-5.4.25

git clone https://gitee.com/vjiot-open/linux-5.4.25.git -b v3s linux-5.4.25-v3s

测试镜像文件下载:
https://whycan.cn/files/members/1206/v3s-lcd-test.rar

链接: 百度网盘下载地址
https://pan.baidu.com/s/1pFRZ74mNGjRutrlBiE1aSQ
提取码:ewwp

#39 Re: 全志 SOC » 关于 lichee-pi zero v3s 以太网硬件严重发热问题和解决办法 » 2020-03-18 20:03:34

john78 说:

R8, R9, R10, R11-----不装吗?试了下不行啊
L1-装不装都没有发现问题

装了电阻就会发热,摸摸 HR911105A 的引脚都是热的。
L1, R8, R9, R10, R11 都去掉。另外你用的如果不是 HR911105A,情况可能不一样。

#40 Re: 全志 SOC » 关于 lichee-pi zero v3s 以太网硬件严重发热问题和解决办法 » 2020-03-17 21:36:55

arychen 说:

发热是因为什么? 这几个电阻吗

是啊,EPHY 的 VDD 电压是 1.2V,VCC 电压是 3.3V, 估计是上拉到3.3V和1.2V VDD 电源之间的问题,资料有限,具体原因不确定,参考友善之臂的 H3 原理图 EPHY 接线,以太网可以正常工作,温度也正常了,摸起来不烫手了。

#41 全志 SOC » 关于 lichee-pi zero v3s 以太网硬件严重发热问题和解决办法 » 2020-03-17 14:04:29

Iron
回复: 28

最近测试 lichee-pi zero v3s 发现插上以太网后,发热特别严重,一度怀疑设备树配置,驱动问题,最后觉得是不是芯片在使用内置 EPHY 后功率特别大导致,然而发现 HR911105A 的引脚也热的烫手,最后确认出现在硬件上。

通过对比 V3S 和 H3 Datasheet, 可以确定 v3s 和 H3 同属于 sun8i 系列,EMAC 和 EPHY 配置是兼容的,且默认使能 EPHY 且不需要配置 mii gpio 引脚,使用的专用 IO 口,通过 syscon 使能外设和时钟后即可,所以 emac 设备树可以直接采用 H3 的配置,并使用相同的以太网驱动, 可以共享主线 linux kernel H3 Ethernet 驱动。

lichee-zero dock 移除 L1, R8, R9, R10, R11
lichee-zero_ethernet_20200317-1403.jpg

H3 Ethernet 原理部分,EPHY TX  RX 引脚直连 CPU ,无任何上下拉电阻和电容。
NanoPi-M1.jpg

#42 Re: 全志 SOC » lichee-pi_zero v3s Windows 环境下 USB FEL 下载到 RAM 运行 OpenWrt 19.07.1 测试 » 2020-03-12 23:42:44

firstman 说:

还是没看明白具体从哪里克隆代码, 配置,编译的呢.

https://hub.docker.com/r/openwrtorg/imagebuilder

make image

输出文件在 build_dir 里。。

#43 Re: 全志 SOC » lichee-pi_zero v3s Windows 环境下 USB FEL 下载到 RAM 运行 OpenWrt 19.07.1 测试 » 2020-03-12 23:34:21

firstman 说:

请教是如何移植 openwrt 到 V3s 的?

openwrt rootfs 取至 openwrt imagebuilder sunxi-coretex-a7 的输出 rootfs.squashfs 再解压出来的文件。

我这里是利用 buildroot 配置 rootfs 目录,取消默认的 busybox.

Symbol: BR2_ROOTFS_OVERLAY [=/home/iron/workplace/openwrt/openwrt-19.07.1-sunxi-cortexa7-rootfs/squashfs-root]                                                                                                              
Type  : string                                                                                                                                                                                                              
Prompt: Root filesystem overlay directories                                                                                                                                                                                         
    Location:                                                                                                                                                                                                         (4) -> System configuration                                                                                                                                                                                                  
  x   Defined at system/Config.in:510  

#44 全志 SOC » lichee-pi_zero v3s Windows 环境下 USB FEL 下载到 RAM 运行 OpenWrt 19.07.1 测试 » 2020-03-12 23:19:02

Iron
回复: 7

# lichee-pi_zero v3s Windows 环境下 USB FEL 下载到 RAM 运行 OpenWrt 19.07.1 测试

Windows 环境下通过 USB 下载到 RAM 里运行,无需烧写 flash 和插入 SD 卡,下载脚本如下:
注意 initrd=0x41B00000,12M,12M表示 rootfs.cpio 大小,小于实际大小将导致 rootfs 挂载错误。

"..\tools\sunxi-fel\sunxi-fel.exe" -p uboot u-boot-sunxi-with-spl.bin write 0x41000000 zImage write 0x41800000 ..\u-boot\sun8i-v3s-licheepi-ethernet.dtb write 0x41B00000 rootfs.cpio

@echo "setenv bootargs console=ttyS0,115200 initrd=0x41B00000,12M; bootz 0x41000000 - 0x41800000"

测试文件,百度网盘
链接:https://pan.baidu.com/s/1JczDhwqta2yDenbXOXzc0g
提取码:r9ax

roots 文件取致 docker_hub >> openwrtorg/imagebuilder:sunxi-cortexa7-19.07.1 >> make image 输出 rootfs.squashfs
由于 kernel,驱动,rootfs 未完全正确配置,仅作运行 openwrt 体验测试.

运行日志:

U-Boot SPL 2020.01 (Mar 12 2020 - 17:57:35 +0800)
DRAM: 64 MiB
Trying to boot from FEL


U-Boot 2020.01 (Mar 12 2020 - 17:57:35 +0800) Allwinner Technology

CPU:   Allwinner V3s (SUN8I 1681)
Model: Lichee Pi Zero Ethernet
DRAM:  64 MiB
MMC:   mmc@01c0f000: 0
Loading Environment from FAT... Card did not respond to voltage select!
In:    serial@01c28000
Out:   serial@01c28000
Err:   serial@01c28000
Net:   No ethernet found.
starting USB...
No working controllers found
Hit any key to stop autoboot:  0 
Card did not respond to voltage select!
starting USB...
No working controllers found
USB is stopped. Please issue 'usb start' first.
starting USB...
No working controllers found
No ethernet found.
missing environment variable: pxeuuid
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/00000000
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/0000000
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/000000
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/00000
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/0000
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/000
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/00
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/0
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/default-arm-sunxi-sunxi
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/default-arm-sunxi
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/default-arm
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/default
No ethernet found.
Config file not found
starting USB...
No working controllers found
No ethernet found.
No ethernet found.
=> 
=> setenv bootargs console=ttyS0,115200 initrd=0x41B00000,12M; bootz 0x41000000 - 0x41800000
## Flattened Device Tree blob at 41800000
   Booting using the fdt blob at 0x41800000
   Loading Device Tree to 42dfa000, end 42dff8b8 ... OK

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.19.105 (iron@iron-debian-ipason) (gcc version 8.3.0 (Buildroot 2019.11.1-g23989e8-dirty)) #1 SMP Thu Mar 12 17:59:02 +08 2020
[    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 Ethernet
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] cma: Failed to reserve 16 MiB
[    0.000000] psci: probing for conduit method from DT.
[    0.000000] psci: Using PSCI v0.1 Function IDs from DT
[    0.000000] random: get_random_bytes called from start_kernel+0x9c/0x408 with crng_init=0
[    0.000000] percpu: Embedded 15 pages/cpu s30476 r8192 d22772 u61440
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 16256
[    0.000000] Kernel command line: console=ttyS0,115200 initrd=0x41B00000,12M
[    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: 42652K/65536K available (6144K kernel code, 420K rwdata, 1528K rodata, 1024K init, 242K bss, 22884K 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 : 0xc4800000 - 0xff800000   ( 944 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xc4000000   (  64 MB)
[    0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
[    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)
[    0.000000]       .text : 0x(ptrval) - 0x(ptrval)   (7136 kB)
[    0.000000]       .init : 0x(ptrval) - 0x(ptrval)   (1024 kB)
[    0.000000]       .data : 0x(ptrval) - 0x(ptrval)   ( 421 kB)
[    0.000000]        .bss : 0x(ptrval) - 0x(ptrval)   ( 243 kB)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] rcu: Hierarchical RCU implementation.
[    0.000000] rcu: 	RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=1.
[    0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000] GIC: GICv2 detected, but range too small and irqchip.gicv2_force_probe not set
[    0.000000] arch_timer: cp15 timer(s) running at 24.00MHz (phys).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x588fe9dc0, max_idle_ns: 440795202592 ns
[    0.000008] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns
[    0.000020] Switching to timer-based delay loop, resolution 41ns
[    0.000212] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[    0.000437] Console: colour dummy device 80x30
[    0.000495] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=240000)
[    0.000512] pid_max: default: 32768 minimum: 301
[    0.000677] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.000695] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.001470] CPU: Testing write buffer coherency: ok
[    0.001961] /cpus/cpu@0 missing clock-frequency property
[    0.001990] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[    0.002742] Setting up static identity map for 0x40100000 - 0x40100060
[    0.002992] rcu: Hierarchical SRCU implementation.
[    0.003803] smp: Bringing up secondary CPUs ...
[    0.003825] smp: Brought up 1 node, 1 CPU
[    0.003834] SMP: Total of 1 processors activated (48.00 BogoMIPS).
[    0.003842] CPU: All CPU(s) started in HYP mode.
[    0.003847] CPU: Virtualization extensions available.
[    0.004688] devtmpfs: initialized
[    0.007668] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
[    0.007954] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.007989] futex hash table entries: 256 (order: 2, 16384 bytes)
[    0.008217] pinctrl core: initialized pinctrl subsystem
[    0.009278] NET: Registered protocol family 16
[    0.009730] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.010992] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
[    0.011012] hw-breakpoint: maximum watchpoint size is 8 bytes.
[    0.022576] SCSI subsystem initialized
[    0.023267] usbcore: registered new interface driver usbfs
[    0.023339] usbcore: registered new interface driver hub
[    0.023447] usbcore: registered new device driver usb
[    0.023687] pps_core: LinuxPPS API ver. 1 registered
[    0.023698] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.023719] PTP clock support registered
[    0.023981] Advanced Linux Sound Architecture Driver Initialized.
[    0.025171] clocksource: Switched to clocksource arch_sys_counter
[    0.035939] NET: Registered protocol family 2
[    0.036606] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes)
[    0.036644] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.036667] TCP bind hash table entries: 1024 (order: 1, 8192 bytes)
[    0.036691] TCP: Hash tables configured (established 1024 bind 1024)
[    0.036841] UDP hash table entries: 256 (order: 1, 8192 bytes)
[    0.036893] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[    0.037111] NET: Registered protocol family 1
[    0.037964] RPC: Registered named UNIX socket transport module.
[    0.037986] RPC: Registered udp transport module.
[    0.037993] RPC: Registered tcp transport module.
[    0.037999] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.038300] Unpacking initramfs...
[    0.187059] Initramfs unpacking failed: junk in compressed archive
[    0.199590] Freeing initrd memory: 12288K
[    0.201624] workingset: timestamp_bits=30 max_order=14 bucket_order=0
[    0.208998] NFS: Registering the id_resolver key type
[    0.209053] Key type id_resolver registered
[    0.209060] Key type id_legacy registered
[    0.210829] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 248)
[    0.210855] io scheduler noop registered
[    0.210863] io scheduler deadline registered
[    0.211069] io scheduler cfq registered (default)
[    0.211084] io scheduler mq-deadline registered
[    0.211092] io scheduler kyber registered
[    0.211876] sun4i-usb-phy 1c19400.phy: Couldn't request ID GPIO
[    0.215765] sun8i-v3s-pinctrl 1c20800.pinctrl: initialized sunXi PIO driver
[    0.278274] Serial: 8250/16550 driver, 8 ports, IRQ sharing disabled
[    0.281407] console [ttyS0] disabled
[    0.301685] 1c28000.serial: ttyS0 at MMIO 0x1c28000 (irq = 30, base_baud = 1500000) is a U6_16550A
[    0.915558] console [ttyS0] enabled
[    0.921714] libphy: Fixed MDIO Bus: probed
[    0.925921] CAN device driver interface
[    0.930159] sun8i-v3s-pinctrl 1c20800.pinctrl: unknown pin PD0
[    0.936052] sun8i-v3s-pinctrl 1c20800.pinctrl: unknown pin PD1
[    0.941883] sun8i-v3s-pinctrl 1c20800.pinctrl: unknown pin PD2
[    0.947731] sun8i-v3s-pinctrl 1c20800.pinctrl: unknown pin PD3
[    0.953558] sun8i-v3s-pinctrl 1c20800.pinctrl: unknown pin PD4
[    0.959398] sun8i-v3s-pinctrl 1c20800.pinctrl: unknown pin PD5
[    0.965235] sun8i-v3s-pinctrl 1c20800.pinctrl: unknown pin PD7
[    0.971062] sun8i-v3s-pinctrl 1c20800.pinctrl: unknown pin PD8
[    0.976898] sun8i-v3s-pinctrl 1c20800.pinctrl: unknown pin PD9
[    0.982725] sun8i-v3s-pinctrl 1c20800.pinctrl: unknown pin PD10
[    0.988648] sun8i-v3s-pinctrl 1c20800.pinctrl: unknown pin PD12
[    0.994561] sun8i-v3s-pinctrl 1c20800.pinctrl: unknown pin PD13
[    1.000483] sun8i-v3s-pinctrl 1c20800.pinctrl: unknown pin PD15
[    1.006412] sun8i-v3s-pinctrl 1c20800.pinctrl: unknown pin PD16
[    1.012325] sun8i-v3s-pinctrl 1c20800.pinctrl: unknown pin PD17
[    1.018503] dwmac-sun8i 1c30000.ethernet: PTP uses main clock
[    1.024294] dwmac-sun8i 1c30000.ethernet: No regulator found
[    1.030518] dwmac-sun8i 1c30000.ethernet: Current syscon value is not the default 38000 (expect 58000)
[    1.039916] dwmac-sun8i 1c30000.ethernet: No HW DMA feature register supported
[    1.047157] dwmac-sun8i 1c30000.ethernet: RX Checksum Offload Engine supported
[    1.054372] dwmac-sun8i 1c30000.ethernet: COE Type 2
[    1.059345] dwmac-sun8i 1c30000.ethernet: TX Checksum insertion supported
[    1.066138] dwmac-sun8i 1c30000.ethernet: Normal descriptors
[    1.071790] dwmac-sun8i 1c30000.ethernet: Chain mode enabled
[    1.077673] libphy: stmmac: probed
[    1.081769] dwmac-sun8i 1c30000.ethernet: Found internal PHY node
[    1.088123] libphy: mdio_mux: probed
[    1.091729] dwmac-sun8i 1c30000.ethernet: Switch mux to internal PHY
[    1.098133] dwmac-sun8i 1c30000.ethernet: Powering internal PHY
[    1.108828] libphy: mdio_mux: probed
[    1.112700] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    1.119358] ehci-platform: EHCI generic platform driver
[    1.124697] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    1.130978] ohci-platform: OHCI generic platform driver
[    1.137540] sun6i-rtc 1c20400.rtc: rtc core: registered rtc-sun6i as rtc0
[    1.144339] sun6i-rtc 1c20400.rtc: RTC enabled
[    1.149139] i2c /dev entries driver
[    1.153820] sunxi-wdt 1c20ca0.watchdog: Watchdog enabled (timeout=16 sec, nowayout=0)
[    1.162468] sunxi-mmc 1c0f000.mmc: Linked as a consumer to regulator.2
[    1.195210] sunxi-mmc 1c0f000.mmc: initialized, max. request size: 16384 KB
[    1.203772] usbcore: registered new interface driver usbhid
[    1.209452] usbhid: USB HID core driver
[    1.215395] NET: Registered protocol family 17
[    1.219884] can: controller area network core (rev 20170425 abi 9)
[    1.226230] NET: Registered protocol family 29
[    1.230677] can: raw protocol (rev 20170425)
[    1.234944] can: broadcast manager protocol (rev 20170425 t)
[    1.240648] can: netlink gateway (rev 20170425) max_hops=1
[    1.246474] Key type dns_resolver registered
[    1.250835] Registering SWP/SWPB emulation handler
[    1.263293] usb_phy_generic usb_phy_generic.0.auto: usb_phy_generic.0.auto supply vcc not found, using dummy regulator
[    1.274231] usb_phy_generic usb_phy_generic.0.auto: Linked as a consumer to regulator.0
[    1.282874] musb-hdrc musb-hdrc.1.auto: MUSB HDRC host driver
[    1.288725] musb-hdrc musb-hdrc.1.auto: new USB bus registered, assigned bus number 1
[    1.297844] hub 1-0:1.0: USB hub found
[    1.301811] hub 1-0:1.0: 1 port detected
[    1.308483] sun6i-rtc 1c20400.rtc: setting system clock to 1970-01-01 00:07:27 UTC (447)
[    1.316968] ALSA device list:
[    1.319948]   No soundcards found.
[    1.325460] Freeing unused kernel memory: 1024K
[    1.330200] Run /init as init process
[    1.375476] init: Console is alive
[    1.379208] init: - watchdog -
[    1.386185] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    1.393761] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    1.403639] init: - preinit -
[    1.544378] random: jshn: uninitialized urandom read (4 bytes read)
[    1.579390] random: jshn: uninitialized urandom read (4 bytes read)
[    1.604300] random: jshn: uninitialized urandom read (4 bytes read)
[    1.629396] Generic PHY 0.1:01: attached PHY driver [Generic PHY] (mii_bus:phy_addr=0.1:01, irq=POLL)
[    1.640565] dwmac-sun8i 1c30000.ethernet eth0: No Safety Features support found
[    1.647965] dwmac-sun8i 1c30000.ethernet eth0: No MAC Management Counters available
[    1.655652] dwmac-sun8i 1c30000.ethernet eth0: PTP not supported by HW
Press the [f] key and hit [enter] to enter failsafe mode
Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level
[    4.779625] mount_root: mounting /dev/root
[    4.788965] urandom-seed: Seed file not found (/etc/urandom.seed)
[    4.822172] procd: - early -
[    4.826303] procd: - watchdog -
[    5.648485] procd: - watchdog -
[    5.652013] procd: - ubus -
[    5.659878] urandom_read: 1 callbacks suppressed
[    5.659890] random: ubusd: uninitialized urandom read (4 bytes read)
[    5.705582] random: ubusd: uninitialized urandom read (4 bytes read)
[    5.712395] random: ubusd: uninitialized urandom read (4 bytes read)
[    5.719743] procd: - init -
Please press Enter to activate this console.
[    5.998354] kmodloader: loading kernel modules from /etc/modules.d/*
[    6.016215] kmodloader: done loading kernel modules from /etc/modules.d/*
[    6.027208] urngd: v1.0.2 started.
[    6.078768] random: crng init done
[    6.082196] random: 3 urandom warning(s) missed due to ratelimiting



BusyBox v1.30.1 () built-in shell (ash)

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 OpenWrt 19.07.1, r10911-c155900f66
 -----------------------------------------------------
=== WARNING! =====================================
There is no root password defined on this device!
Use the "passwd" command to set up a new password
in order to prevent unauthorized SSH logins.
--------------------------------------------------
root@OpenWrt:/# [   31.845166] vcc3v0: disabling
[   31.848160] vcc3v3: disabling
[   31.851125] vcc5v0: disabling

root@OpenWrt:/# ifconfig
lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:64 errors:0 dropped:0 overruns:0 frame:0
          TX packets:64 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:4352 (4.2 KiB)  TX bytes:4352 (4.2 KiB)

root@OpenWrt:/# ifconfig -a
eth0      Link encap:Ethernet  HWaddr 02:03:AE:96:27:E8  
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Interrupt:31 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:64 errors:0 dropped:0 overruns:0 frame:0
          TX packets:64 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:4352 (4.2 KiB)  TX bytes:4352 (4.2 KiB)

root@OpenWrt:/# ifup eth0
Interface eth0 not found
root@OpenWrt:/# ifconfig eth0 up
[   79.462208] Generic PHY 0.1:01: attached PHY driver [Generic PHY] (mii_bus:phy_addr=0.1:01, irq=POLL)
[   79.473288] dwmac-sun8i 1c30000.ethernet eth0: No Safety Features support found
[   79.480734] dwmac-sun8i 1c30000.ethernet eth0: No MAC Management Counters available
[   79.488421] dwmac-sun8i 1c30000.ethernet eth0: PTP not supported by HW
root@OpenWrt:/# ifconfig eth0
eth0      Link encap:Ethernet  HWaddr 02:03:AE:96:27:E8  
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Interrupt:31 

root@OpenWrt:/# dhcpc eth0
/bin/ash: dhcpc: not found
root@OpenWrt:/# udhcpc eth0
udhcpc: started, v1.30.1
udhcpc: sending discover
udhcpc: sending discover
udhcpc: sending discover
[  126.325651] dwmac-sun8i 1c30000.ethernet eth0: Link is Up - 100Mbps/Full - flow control rx/tx

udhcpc: sending select for 192.168.2.176
udhcpc: lease of 192.168.2.176 obtained, lease time 43200
udhcpc: ifconfig eth0 192.168.2.176 netmask 255.255.255.0 broadcast 192.168.2.255
udhcpc: setting default routers: 192.168.2.1
root@OpenWrt:/# 
root@OpenWrt:/# ifconfig eth0
eth0      Link encap:Ethernet  HWaddr 02:03:AE:96:27:E8  
          inet addr:192.168.2.176  Bcast:192.168.2.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:12 errors:0 dropped:0 overruns:0 frame:0
          TX packets:3 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:1879 (1.8 KiB)  TX bytes:1026 (1.0 KiB)
          Interrupt:31 

root@OpenWrt:/# cat /etc/hostname 
licheepi-zero-xwiron
root@OpenWrt:/# netsta -tunpl
/bin/ash: netsta: not found
root@OpenWrt:/# netstat -tunpl
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name    
tcp        0      0 192.168.2.176:53        0.0.0.0:*               LISTEN      331/dnsmasq
tcp        0      0 127.0.0.1:53            0.0.0.0:*               LISTEN      331/dnsmasq
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      368/dropbear
netstat: /proc/net/tcp6: No such file or directory
udp        0      0 192.168.2.176:53        0.0.0.0:*                           331/dnsmasq
udp        0      0 127.0.0.1:53            0.0.0.0:*                           331/dnsmasq
netstat: /proc/net/udp6: No such file or directory
root@OpenWrt:/# 

#45 Re: 全志 SOC » lichee-pi zero 主线 linux-5.3.15 ethernet 驱动 dtb 修改笔记 » 2019-12-22 23:16:30

非法用户 说:

强啊, 都整到 5.3 了.

dwmac-sun8i.c

这个文件要修改吗?

不需要,只需要修改 dtsi 和 dts 文件
参考 dwmac-sun8i.c 目的是查看需要修改哪些东西。。修改错误的话,运行驱动文件会报错,根据错误信息再修改。最后是直接参考 H3 dtsi 文件,部分直接复制就可以。

#46 Re: 全志 SOC » lichee-pi zero 主线 linux-5.3.15 ethernet 驱动 dtb 修改笔记 » 2019-12-22 22:33:27

晕哥 说:

感谢分享, 这个LCD可以用吗?

看设备树是有的,但是我还没来得急测试。也是在一步一步学习中。。。

#47 全志 SOC » lichee-pi zero 主线 linux-5.3.15 ethernet 驱动 dtb 修改笔记 » 2019-12-22 22:25:33

Iron
回复: 5

参考修改笔记:
Licheepi Zero Ethernet 适配指南
linux-sunxi.org/Linux_mainlining_effort

参考文件
dwmac-sun8i.c
sunxi-h3-h5.dtsi

修改文件:
arch/arm/boot/dts/sun8i-v3s.dtsi
arch/arm/boot/dts/sun8i-v3s-licheepi-zero.dts

sun8i-v3s-licheepi-zero 设备树

重新编译生产设备树 dtb 文件

make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- dtbs

修改 etc/network/interfaces

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet dhcp
localhost:~# ifconfig
eth0      Link encap:Ethernet  HWaddr B6:38:A2:0E:28:25  
          inet addr:192.168.51.59  Bcast:192.168.51.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:886 errors:0 dropped:37 overruns:0 frame:0
          TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:79914 (78.0 KiB)  TX bytes:2736 (2.6 KiB)
          Interrupt:31 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

#48 Re: 全志 SOC » 没找到晶晨Amlogic板块啊,想开个大坑 » 2019-12-20 10:51:50

晕哥小弟 说:

那为什么很多的开发板也都使用android系统 ? 比如很多的物联网板卡,4G的很多都是.

我的理解是,直接招个 APP 开发工程师就可以干活了。。 找个懂嵌入式的开发 UI 就难多了。

#49 Re: DIY/综合/Arduino/写字机/3D打印机/智能小车/平衡车/四轴飞行/MQTT/物联网 » bitbucket/gitee 都限制仓库大小了, 没有自建git仓库的朋友们,我来推荐一个腾讯云旗下的代码托管平台 » 2019-12-19 19:25:59

big_smile 买了个蜗牛星际,再淘4块旧硬盘,装了 U-NAS 做个 raid , 跑个 Docker, 再运行个 gogs... 随便存了... 另外,阿里云 code git 每个项目可以存 2G... 貌似没限制总的最大容量。

#50 Re: 全志 SOC » Lichee-pi zero SD 卡 grub.cfg 多系统启动配置,busybox rootfs,Alpine linux » 2019-12-19 17:39:28

晕哥 说:

wow,感谢分享!

这是通过串口选择要进入的系统吧?

是的,在 boot 按键进入 grub 菜单。。

U-Boot SPL 2019.10-ge71ae959-dirty (Dec 10 2019 - 19:15:16 +0000)
DRAM: 64 MiB
Trying to boot from MMC1


U-Boot 2019.10-ge71ae959-dirty (Dec 10 2019 - 19:15:16 +0000) Allwinner Technology

CPU:   Allwinner V3s (SUN8I 1681)
Model: Lichee Pi Zero
DRAM:  64 MiB
MMC:   mmc@01c0f000: 0
Loading Environment from FAT... *** Warning - bad CRC, using default environment

In:    serial@01c28000
Out:   serial@01c28000
Err:   serial@01c28000
Net:   No ethernet found.
starting USB...
No working controllers found
Hit any key to stop autoboot:  0 
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
Found EFI removable media binary efi/boot/bootarm.efi
libfdt fdt_check_header(): FDT_ERR_BADMAGIC
Scanning disk mmc@01c0f000.blk...
Found 4 disks
BootOrder not defined
EFI boot manager: Cannot load any image
311296 bytes read in 31 ms (9.6 MiB/s)
libfdt fdt_check_header(): FDT_ERR_BADMAGIC
Welcome to GRUB!

error: no such device: alpine-uboot 3.10.3 armv7.


                                                        GNU GRUB  version 2.02

 ┌──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
 │ Linux vanilla                                                                                                                    │ 
 │ busybox                                                                                                                          │
 │*Alpine Linux                                                                                                                     │
 │                                                                                                                                  │
 │                                                                                                                                  │
 │                                                                                                                                  │
 │                                                                                                                                  │
 │                                                                                                                                  │
 │                                                                                                                                  │
 │                                                                                                                                  │
 │                                                                                                                                  │
 │                                                                                                                                  │
 │                                                                                                                                  │
 │                                                                                                                                  │
 │                                                                                                                                  │
 │                                                                                                                                  │
 │                                                                                                                                  │
 │                                                                                                                                  │
 │                                                                                                                                  │
 │                                                                                                                                  │
 │                                                                                                                                  │
 │                                                                                                                                  │
 │                                                                                                                                  │
 │                                                                                                                                  │
 │                                                                                                                                  │
 │                                                                                                                                  │
 │                                                                                                                                  │
 │                                                                                                                                  │
 │                                                                                                                                  │
 │                                                                                                                                  │
 │                                                                                                                                  │ 
 └──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘

      Use the ▲ and ▼ keys to select which entry is highlighted.                                                                
      Press enter to boot the selected OS, `e' to edit the commands before booting or `c' for a command-line.                   
                                                                                                                                     
                                                                                                                                     

#51 全志 SOC » Lichee-pi zero SD 卡 grub.cfg 多系统启动配置,busybox rootfs,Alpine linux » 2019-12-19 17:22:20

Iron
回复: 3

grub 系统启动项菜单




配置环境 ubuntu 18.04
1. SD 分区
grub GParted 分区工具
    Ubuntu 打开 GParted 分区工具![f7e3a4a8-e395-4a50-85b8-e30182ac3b69.jpg][1],分成三区如下:
grub GParted 分区工具

2. 写入 U-boot
    编译 u-boot-2019.10
   

make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- LicheePi_Zero_defconfig
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf-

生成 u-boot-sunxi-with-spl.bin,写入 SD 分区表空白处,注意设置正确的SD卡设备路径, 例如 /dev/sdb

sudo dd if=u-boot-sunxi-with-spl.bin of=/dev/<sdx> bs=1024 seek=8

3. 解压 alpine-uboot-3.10.3-armv7.tar.gz 至 boot 分区

sudo tar xvzf alpine-uboot-3.10.3-armv7.tar.gz -C /media/<user>/<mount path>

4. 解压 alpine-minirootfs-3.10.3-armv7.tar.gz 至 ‘Alpine Linux’ 分区

sudo tar xvzf alpine-minirootfs-3.10.3-armv7.tar.gz -C /media/<user>/<mount path>

修改 "Alpine Linux" 分区目录下 /etc/inittab,使能 getty tty0, 并添加自动登录脚本

cd /media/<user>/<mount path>
sudo vi inittab
# /etc/inittab
::sysinit:/sbin/openrc sysinit
::sysinit:/sbin/openrc boot
::wait:/sbin/openrc default
# Set up a couple of getty's
tty1::respawn:/sbin/getty 38400 tty1
tty2::respawn:/sbin/getty 38400 tty2
tty3::respawn:/sbin/getty 38400 tty3
tty4::respawn:/sbin/getty 38400 tty4
tty5::respawn:/sbin/getty 38400 tty5
tty6::respawn:/sbin/getty 38400 tty6
# Put a getty on the serial port
#ttyS0::respawn:/sbin/getty -L ttyS0 115200 vt100
ttyS0::respawn:/sbin/getty -L ttyS0 115200 vt100 -n -l /etc/autologin -I "console auto login as root..."
# Stuff to do for the 3-finger salute
::ctrlaltdel:/sbin/reboot
# Stuff to do before rebooting
::shutdown:/sbin/openrc shutdown

添加 /etc/autologin:

#!/bin/sh
exec /bin/login -f root
cd /media/<user>/<mount path>
sudo vi autologin
sudo chmod +x autologin


5. 写入 buildroot 编译的 rootfs, 输出目录 output\images,rootfs.tar。

sudo tar xvf buildroot_rootfs.tar -C /media/<user>/<mount path>

6. 拷贝编译好的 zImage 到 boot 目录下
7. 移除 extlinux
8. 修改 boot/grup/grub.cfg, 添加启动项菜单:

set timeout=3
menuentry "Linux vanilla" {
linux /boot/vmlinuz-vanilla modules=loop,squashfs,sd-mod,usb-storage quiet 
initrd /boot/initramfs-vanilla
}
menuentry "Busybox" {
linux /boot/zImage console=ttyS0,115200 panic=5 console=tty0 rootwait root=/dev/mmcblk0p2 earlyprintk rw
}
menuentry "Alpine Linux" {
linux /boot/zImage console=ttyS0,115200 panic=5 console=tty0 rootwait root=/dev/mmcblk0p3 earlyprintk rw
}

#52 Re: 全志 SOC » lichee-pi zero v3s 安装 alpine linux 运行日志 » 2019-12-19 17:13:08

smartcar 说:

alpine linux 怎么玩的,有没有教程?

https://wiki.alpinelinux.org/wiki/Main_Page

只能看官方文档咯0..0,我也不熟,学习摸索中。

#53 Re: RK3288/RK3399/RK1108 » 安卓连接需要认证的WiFi的时候怎么自动弹出认证页面呀? » 2019-12-11 15:47:41

补充一个 WiFi 模块AP 模式下,实现手机连接热点时自动跳转到网页的 CAPTIVE_PORTAL 认证方法:
1. 简单的 DNS 服务器,任意域名 DNS 请求均指向模块本身地址,如 192.168.4.1 (wifi 模块 AP IP地址)
2. HTTP 服务,任意 http get 请求,均返回 302 地址转移到指定的页面,如: http://192.168.4.1/index.html

实现后,手机链接WiFi热点后,可以自动打开网页,通过网页配置 WiFi 模块参数。

#54 Re: 全志 SOC » lichee-pi zero v3s 安装 alpine linux 运行日志 » 2019-12-11 04:51:25

lol 终于跑起来,主要问题更新 sd 卡 u-boot-sunxi-with-spl.bin 和 zimage
- sudo dd if=<board>/u-boot-sunxi-with-spl.bin of=/dev/<sdX> bs=1024 seek=8
- zimage 开启 initramfs 支持,并修改 size 为 32768,数量为 1
- /extlinux/extlinux.conf
  - KERNEL /boot/vmlinuz-vanilla 
    >>  KERNEL /boot/zimage
- /boot/grub/grub.cfg
  - linux    /boot/vmlinuz-vanilla modules=loop,squashfs,sd-mod,usb-storage quiet
     >>  linux    /boot/zimage modules=loop,squashfs,sd-mod,usb-storage quiet


----
login: root
>> setup-alpine  执行 Alpine linux 安装

TODO...

#55 全志 SOC » lichee-pi zero v3s 安装 alpine linux 运行日志 » 2019-12-11 04:45:08

Iron
回复: 4
U-Boot SPL 2019.10-ge71ae959-dirty (Dec 10 2019 - 19:15:16 +0000)
DRAM: 64 MiB
Trying to boot from MMC1


U-Boot 2019.10-ge71ae959-dirty (Dec 10 2019 - 19:15:16 +0000) Allwinner Technology

CPU:   Allwinner V3s (SUN8I 1681)
Model: Lichee Pi Zero
DRAM:  64 MiB
MMC:   mmc@01c0f000: 0
Loading Environment from FAT... *** Warning - bad CRC, using default environment

In:    serial@01c28000
Out:   serial@01c28000
Err:   serial@01c28000
Net:   No ethernet found.
starting USB...
No working controllers found
Hit any key to stop autoboot:  0 
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
Found /extlinux/extlinux.conf
Retrieving file: /extlinux/extlinux.conf
207 bytes read in 3 ms (67.4 KiB/s)
1:	Linux vanilla
Retrieving file: /boot/initramfs-vanilla
6588262 bytes read in 300 ms (20.9 MiB/s)
Retrieving file: /boot/zImage
3608368 bytes read in 177 ms (19.4 MiB/s)
append: modules=loop,squashfs,sd-mod,usb-storage quiet 
Retrieving file: /boot/dtbs/sun8i-v3s-licheepi-zero.dtb
8455 bytes read in 16 ms (515.6 KiB/s)
## Flattened Device Tree blob at 41800000
   Booting using the fdt blob at 0x41800000
   Loading Ramdisk to 427b7000, end 42dff766 ... OK
   Loading Device Tree to 427b1000, end 427b6106 ... OK

Starting kernel ...

[    0.001675] /cpus/cpu@0 missing clock-frequency property


   OpenRC 0.41.2.6fc2696f3e is starting up Linux 4.10.0-rc1-gdd75eb5de (armv7l)

 * /proc is already mounted
 * Mounting /run ... * /run/openrc: creating directory
 * /run/lock: creating directory
 * /run/lock: correcting owner
 * Caching service dependencies ... [ ok ]
 * Clock skew detected with `(null)'
 * Adjusting mtime of `/run/openrc/deptree' to Mon Jun 10 08:36:51 2019

 * WARNING: clock skew detected!
 * Remounting devtmpfs on /dev ... [ ok ]
 * Mounting modloop  ... * Verifying modloop
mount: can't setup loop device: No such device or address
 [ !! ]
 * ERROR: modloop failed to start
 * Mounting debug filesystem ... [ ok ]
 * Starting busybox mdev ... [ ok ]
 * Loading hardware drivers ... [ ok ]
 * WARNING: clock skew detected!
 * Mounting modloop  ... * Verifying modloop
mount: can't setup loop device: No such device or address
 [ !! ]
 * ERROR: modloop failed to start
 * Loading modules ...modprobe: can't change directory to '/lib/modules': No such file or directory
modprobe: can't change directory to '/lib/modules': No such file or directory
 [ ok ]
 * Setting system clock using the hardware clock [UTC] ... [ ok ]
 * Checking local filesystems  ... [ ok ]
 * Remounting filesystems ... [ ok ]
 * Mounting local filesystems ... [ ok ]
 * Configuring kernel parameters ...sysctl: error: 'net.ipv4.tcp_syncookies' is an unknown key
sysctl: error: 'net.ipv6.conf.all.accept_redirects' is an unknown key
sysctl: error: 'net.ipv6.conf.all.accept_source_route' is an unknown key
sysctl: error: 'net.ipv6.conf.default.use_tempaddr' is an unknown key
sysctl: error: 'net.ipv6.conf.all.use_tempaddr' is an unknown key
 [ ok ]
 * Migrating /var/lock to /run/lock ... [ ok ]
 * Creating user login records ... [ ok ]
 * Wiping /tmp directory ... [ ok ]
 * Setting hostname ... [ ok ]
 * Starting busybox syslog ... [ ok ]
 * WARNING: clock skew detected!
 * Mounting modloop  ... * Verifying modloop
mount: can't setup loop device: No such device or address
 [ !! ]
 * ERROR: modloop failed to start

Welcome to Alpine Linux 3.10
Kernel 4.10.0-rc1-gdd75eb5de on an armv7l (/dev/ttyS0)

alpine login:

#56 Re: 全志 SOC » 分享Nano fc100s linux主线5.2(TF卡)+adb+lcd(800*480)+qt5的编译过程 » 2019-11-25 17:25:46

晕哥 说:

我有一个mac air, 苹果OS舍不得删,又不会玩,尴尬.

苹果可以双系统,买个苹果跑 windows 的表示很尴尬。:D

#58 Re: 全志 SOC » 尝试从零构建F1C100s开发环境 » 2019-11-13 12:40:44

big_smile 整个虚拟机,要学习学习楼主从 0 开始趟坑。

#62 Re: DIY/综合/Arduino/写字机/3D打印机/智能小车/平衡车/四轴飞行/MQTT/物联网 » 大家玩过热敏打印机吗?买了两个FTP-638MCL101 » 2019-10-29 08:54:11

刚玩过一个,ESC&POS打印控制指令,用的串口,可以用 ANSI 编码打印中英文字符串。

页脚

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

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