您尚未登录。

#1 Re: 全志 SOC » 求大佬指导!初学自己做了个A33的板子,但emmc刷了固件就是启动不了 » 2024-08-30 16:19:18

UBOOT都起来了,就顺便把kernel也编译一下,然后下载进去呗。
我怀疑你那个img支持的硬件和你自己的硬件电源部分有差异。

#3 Re: 全志 SOC » uboot里能给emmc分区吗? » 2024-08-26 09:57:27

gpt - GUID Partition Table

Usage:
gpt <command> <interface> <dev> <partitions_list>
- GUID partition table restoration and validity check
Restore or verify GPT information on a device connected
to interface
Example usage:
gpt write mmc 0 $partitions
gpt verify mmc 0 $partitions</code>

#5 Re: RK3288/RK3399/RK1108 » [RK3188] kernel 卡死,请各位给点分析问题的意见? » 2024-06-26 13:31:01

晕哥 说:

如果没有任何日志输出就死了,考虑一下硬件问题,给CPU/DDR降频降温试一试。

感谢晕哥指导。

#6 RK3288/RK3399/RK1108 » [RK3188] kernel 卡死,请各位给点分析问题的意见? » 2024-06-26 11:23:20

muxi01
回复: 2

修补完了kernel驱动,可以正常的在终端敲击命令,但是使用apt install , scp  wget等指令下载文件,10M内的文件随便下载,在测试1G文件下载的时候,中途直接卡死。开启了pstore,并没有发现有panic,随后开启看门狗,卡死后一会儿会重启。再从有线切换到无线,同样会卡死,htop显示在卡死前CPU使用率无明显增长。因硬件无法连接JLINK,所以暂时想不出其他法子,请求各位同仁,给点分析建议。

#11 Re: RK3288/RK3399/RK1108 » [rockchip-rk3xxx] rkdeveloptool 在windows上的编译 » 2023-12-09 19:27:19

在Linux下运行需要sudo 权限,否则同样的异常错误,具体原因不知道,建议在linux使用。

#12 RK3288/RK3399/RK1108 » 嘉立创的 泰山派,刚下单还没送货,原价转手有人要么? » 2023-12-09 19:24:29

muxi01
回复: 2

我的快播小方 RK3188已经可以进入UBOOT了,EMMC也识别到了,所以刚下单的泰山派不打算要了,目前嘉立创商城缺货了,有人需要的话请留言。

快播小方开机 日志,下一步就是进入kernel了。

Model: Radxa Rock
MPIDR: 0x80000000
Serial: raw, 0x20064000
DRAM:  1 GiB
Sysmem: init



 ------Time:09:25:04------0


Relocation Offset: 00000000
Relocation fdt: 9de43ce0 - 9de48de8
CR: M/C/I
I2c1 speed: 400000Hz
VDD_ARM -5 uV
*** Warning - No MMC card found, using default environment

MMC:   dwmmc@1021c000: 0
In:    serial
Out:   serial
Err:   serial
Model: Radxa Rock
MPIDR: 0x80000000
## Error: "rkimg_bootdev" not defined
defalut set mmc 0
Bootdev(scan): mmc 0
rockchip_get_bootdev:257 -> dev_type=6 devnum=0
blk_get_devnum_by_type 90
MMC0: High Speed, 37Mhz
## Unknown partition table type 0
PartType: <NULL>
No misc partition
boot mode: None
CLK: (uboot. arm: enter 0 KHz, init 0 KHz, kernel 0N/A)
  apll 600000 KHz
  dpll 300000 KHz
  cpll 132000 KHz
  gpll 891000 KHz
Net:   Net Initialization Skipped
No ethernet found.
Hit key to stop autoboot('CTRL+C'):  0
## Error: "version" not defined
=> mmc info
Device: dwmmc@1021c000
Manufacturer ID: 15
OEM: 100
Name: M8G1W
Timing Interface: High Speed
Tran Speed: 37500000
Rd Block Len: 512
MMC version 4.4.1
High Capacity: Yes
Capacity: 7.3 GiB
Bus Width: 8-bit
Erase Group Size: 512 KiB
HC WP Group Size: 1 MiB
User Capacity: 7.3 GiB WRREL
Boot Capacity: 2 MiB ENH
RPMB Capacity: 128 KiB ENH

#13 Re: RK3288/RK3399/RK1108 » [rockchip-rk3xxx] rkdeveloptool 在windows上的编译 » 2023-11-24 22:03:00

好像不对,在这里失败了pComm =  new CRKUsbComm(dev, g_pLogObject, bRet);

#14 RK3288/RK3399/RK1108 » [rockchip-rk3xxx] rkdeveloptool 在windows上的编译 » 2023-11-24 14:29:24

muxi01
回复: 4

工具使用说明
可执行文件,直接重命名为.exe

diff --git a/DefineHeader.h b/DefineHeader.h
index cea0f02..cebc639 100644
--- a/DefineHeader.h
+++ b/DefineHeader.h
@@ -21,12 +21,22 @@
 #include <sstream>
 #include <algorithm>
 using namespace std;
-typedef unsigned char BYTE, *PBYTE;
-typedef unsigned char UCHAR;
-typedef unsigned short WCHAR;
-typedef unsigned short USHORT;
-typedef unsigned int	UINT;
-typedef unsigned int	DWORD;
+// typedef unsigned char BYTE, *PBYTE;
+// typedef unsigned char UCHAR;
+// typedef unsigned short WCHAR;
+// typedef unsigned short USHORT;
+// typedef unsigned int	UINT;
+// typedef unsigned int	DWORD;
+
+#define PBYTE unsigned char *
+#define BYTE unsigned char
+#define UCHAR unsigned char
+#define WCHAR unsigned short
+#define USHORT unsigned short
+#define UINT unsigned int
+#define DWORD unsigned int
+
+
 #define ALIGN(x, a)		__ALIGN_MASK((x), (a) - 1)
 #define __ALIGN_MASK(x, mask)	(((x) + (mask)) & ~(mask))
 #define RK28_SEC2_RESERVED_LEN 473
diff --git a/RKLog.cpp b/RKLog.cpp
index 37dc62b..c24bbfe 100644
--- a/RKLog.cpp
+++ b/RKLog.cpp
@@ -74,8 +74,11 @@ bool CRKLog::Write(string text)
 	char szDateTime[100];
 	string  strName;
 	FILE *file=NULL;
-	time(&now);
-	localtime_r(&now, &timeNow);
+	//time(&now);
+	//localtime_r(&now, &timeNow);
+
+	now =time(0);
+	localtime_s(&timeNow,&now);
 	sprintf(szDateTime, "%04d-%02d-%02d.txt", timeNow.tm_year + 1900, timeNow.tm_mon + 1, timeNow.tm_mday);
 	strName = m_path + m_name+szDateTime;
 
diff --git a/crc.cpp b/crc.cpp
index 8bd2647..9dd6ab8 100644
--- a/crc.cpp
+++ b/crc.cpp
@@ -188,15 +188,52 @@ unsigned int crc32_le(unsigned int crc, unsigned char *p, unsigned int len)
 	}
 	return nAccum;
 */
+#if 0
+
+	unsigned long long      addr =(unsigned long long) p;
+	unsigned int      *tab = crc32table_le;
+	crc = crc ^ 0xFFFFFFFF;
+	if(( (addr & 3) && len)){
+		do {
+			unsigned char *p = (unsigned char *)addr;
+			DO_CRC(*p++);
+			addr = (unsigned long long)p;
+		} while ((--len) && (addr &3 ));
+	}
+	if((len >= 4)){
+		unsigned int save_len = len & 3;
+		len = len >> 2;
+		addr-=4;
+		do {
+			addr +=4;
+			crc ^= *((unsigned int *)addr);
+			DO_CRC(0);
+			DO_CRC(0);
+			DO_CRC(0);
+			DO_CRC(0);
+		} while (--len);
+		addr+=4;
+		len = save_len;
+	}
+	if(len){
+		do {
+			unsigned char *p = (unsigned char *)addr;
+			DO_CRC(*p++);
+			addr = (unsigned long long)p;
+		} while (--len);
+	}
+	crc = crc ^ 0xFFFFFFFF;
+	return crc;
+#else
 	unsigned int      *b =(unsigned int *)p;
 	unsigned int      *tab = crc32table_le;
 	crc = crc ^ 0xFFFFFFFF;
-	if((((long)b)&3 && len)){
+	if(( (((unsigned long long)b) & 3) && len)){
 		do {
 			unsigned char *p = (unsigned char *)b;
 			DO_CRC(*p++);
 			b = (unsigned int *)p;
-		} while ((--len) && ((long)b)&3 );
+		} while ((--len) && ((unsigned long long)b)&3 );
 	}
 	if((len >= 4)){
 		unsigned int save_len = len & 3;
@@ -221,7 +258,7 @@ unsigned int crc32_le(unsigned int crc, unsigned char *p, unsigned int len)
 	}
 	crc = crc ^ 0xFFFFFFFF;
 	return crc;
-
+#endif
 }
 
 #define CRC16_CCITT         0x1021  //CRC operator
diff --git a/main.cpp b/main.cpp
index 72bd94b..0e864ca 100644
--- a/main.cpp
+++ b/main.cpp
@@ -3292,7 +3292,7 @@ bool handle_command(int argc, char* argv[], CRKScan *pScan)
 	return bSuccess;
 }
 
-
+#include <unistd.h>
 int main(int argc, char* argv[])
 {
 	CRKScan *pScan = NULL;
@@ -3303,10 +3303,11 @@ int main(int argc, char* argv[])
 	struct stat statBuf;
 
 	g_ConfigItemVec.clear();
-	sprintf(szProgramProcPath, "/proc/%d/exe", getpid());
-	if (readlink(szProgramProcPath, szProgramDir, 256) == -1)
-		strcpy(szProgramDir, ".");
-	else {
+	// sprintf(szProgramProcPath, "/proc/%d/exe", getpid());
+	// if (readlink(szProgramProcPath, szProgramDir, 256) == -1)
+	// 	strcpy(szProgramDir, ".");
+	// else 
+	{
 		char *pSlash;
 		pSlash = strrchr(szProgramDir, '/');
 		if (pSlash)
@@ -3317,7 +3318,7 @@ int main(int argc, char* argv[])
 	strConfigFile = szProgramDir;
 	strConfigFile += "/config.ini";
 	if (opendir(strLogDir.c_str()) == NULL)
-		mkdir(strLogDir.c_str(), S_IRWXU | S_IRWXG | S_IROTH);
+		mkdir(strLogDir.c_str());
 	g_pLogObject = new CRKLog(strLogDir.c_str(), "log",true);
 
 	if(stat(strConfigFile.c_str(), &statBuf) < 0) {

#15 RK3288/RK3399/RK1108 » RK32xx RK39xx系列的芯片在maskroom模式下,有没有linux版本的烧录工具? » 2023-11-18 15:25:02

muxi01
回复: 1

RK32xx RK39xx系列的芯片在maskroom模式下,有没有linux版本的烧录工具? 类似于全志的sunxi-fel

#17 Re: 全志 SOC » 使用华嵌HQEmbed S3 开发板, 驱动经典的无线芯片 BCM43438(AP6212) 的 蓝牙Bluetooth » 2023-11-10 17:28:02

@晕哥,请教一下brcmfmac43430-sdio.clm_blob 这个文件是做什么的,我目前/lib/brcm目录下只放了brcmfmac43430-sdio.txt brcmfmac43430-sdio.bin文件,加载模块的时候,可以识别到wlan0,但是配置不了WIFI。

# wpa_supplicant -Dnl80211 -iwlan0 -c/etc/wpa_supplicant.conf
Successfully initialized wpa_supplicant
wlan0: CTRL-EVENT-SCAN-FAILED ret=-22 retry=1
wlan0: CTRL-EVENT-SCAN-FAILED ret=-22 retry=1
wlan0: CTRL-EVENT-SCAN-FAILED ret=-22 retry=1
wlan0: CTRL-EVENT-SCAN-FAILED ret=-22 retry=1
wlan0: CTRL-EVENT-SCAN-FAILED ret=-22 retry=1
^Cwlan0: CTRL-EVENT-DSCP-POLICY clear_all
wlan0: CTRL-EVENT-DSCP-POLICY clear_all
nl80211: deinit ifname=wlan0 disabled_11b_rates=0
wlan0: CTRL-EVENT-TERMINATING
#  iwconfig  wlan0
wlan0     IEEE 802.11  ESSID:off/any
          Mode:Managed  Access Point: Not-Associated   Tx-Power=31 dBm
          Retry short limit:7   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:on

#  iw
iwconfig  iwgetid   iwlist    iwpriv    iwspy
#  iwlist wlan0 scanning
wlan0     Interface doesn't support scanning : Invalid argument



# iwconfig  wlan0 essid wifishare key qwer1234
Error for wireless request "Set Encode" (8B2A) :
    invalid argument "qwer1234".

# iwlist  wlan0 scanning
[ 1658.378623] ieee80211 phy0: brcmf_run_escan: error (-52)
[ 1658.384010] ieee80211 phy0: brcmf_cfg80211_scan: scan error (-52)
wlan0     Interface doesn't support scanning : Invalid exchange

#19 Re: 全志 SOC » [小爱mini音响 R16 ] regulatory.db 加载失败的问题 » 2023-11-03 18:08:43

解决办法2个:
1.将相关功能编译成模块。

 .config - Linux/arm 5.4.63 Kernel Configuration
 > Networking support > Wireless ──────────────────────────────────────────────────────────────────────────────────────
  ┌─────────────────────────────────────────────────── Wireless ────────────────────────────────────────────────────┐
  │  Arrow keys navigate the menu.  <Enter> selects submenus ---> (or empty submenus ----).  Highlighted letters    │
  │  are hotkeys.  Pressing <Y> includes, <N> excludes, <M> modularizes features.  Press <Esc><Esc> to exit, <?>    │
  │  for Help, </> for Search.  Legend: [*] built-in  [ ] excluded  <M> module  < > module capable                  │
  │                                                                                                                 │
  │ ┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ │
  │ │                   --- Wireless                                                                              │ │
  │ │                   <M>   cfg80211 - wireless configuration API                                               │ │
  │ │                   [ ]     nl80211 testmode command                                                          │ │
  │ │                   [ ]     enable developer warnings                                                         │ │
  │ │                   [*]     enable powersave by default                                                       │ │
  │ │                   [ ]     cfg80211 DebugFS entries                                                          │ │
  │ │                   [*]     cfg80211 wireless extensions compatibility                                        │ │
  │ │                   [ ]   lib80211 debugging messages                                                         │ │
  │ │                   <M>   Generic IEEE 802.11 Networking Stack (mac80211)                                     │ │
  │ │                         Default rate control algorithm (Minstrel)  --->                                     │ │
  │ │                   [*]   Enable mac80211 mesh networking support                                             │ │
  │ │                   [ ]   Enable LED triggers                                                                 │ │
  │ │                   [ ]   Export mac80211 internals in DebugFS                                                │ │
  │ │                   [ ]   Trace all mac80211 debug messages                                                   │ │
  │ │                   [ ]   Select mac80211 debugging features  ----                                            │ │
  │ │                                                                                                             │ │
  │ └─────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ │
  ├─────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
  │                            <Select>    < Exit >    < Help >    < Save >    < Load >                             │
  └─────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘

2.骚操作,不建议用

在include/linux/init.h下新增
#define last_initcall(fn)        __define_initcall(fn, 8)
#define last_initcall_sync(fn)        __define_initcall(fn, 8s)


net/wireless/reg.c 下新增
last_initcall(regulatory_init_db);
//late_initcall(regulatory_init_db);


init/main.c 中新增
extern initcall_entry_t __initcall_start[];
extern initcall_entry_t __initcall0_start[];
extern initcall_entry_t __initcall1_start[];
extern initcall_entry_t __initcall2_start[];
extern initcall_entry_t __initcall3_start[];
extern initcall_entry_t __initcall4_start[];
extern initcall_entry_t __initcall5_start[];
extern initcall_entry_t __initcall6_start[];
extern initcall_entry_t __initcall7_start[];
extern initcall_entry_t __initcall8_start[]; //新增
extern initcall_entry_t __initcall_end[];

static initcall_entry_t *initcall_levels[] __initdata = {
    __initcall0_start,
    __initcall1_start,
    __initcall2_start,
    __initcall3_start,
    __initcall4_start,
    __initcall5_start,
    __initcall6_start,
    __initcall7_start,
    __initcall8_start, //新增
    __initcall_end,
};


static void __init do_initcalls(void)
{
    int level;
    for (level = 0; level < ARRAY_SIZE(initcall_levels) - 2; level++) // -1 改为-2
        do_initcall_level(level);
}

static void __init do_last_initcalls(void)
{
    do_initcall_level(ARRAY_SIZE(initcall_levels) - 2);
}


在这个kernel_init_freeable函数最末尾调用do_last_initcalls();


在include/asm-generic/vmlinux.lds.h中

#define INIT_CALLS                            \
        __initcall_start = .;                    \
        KEEP(*(.initcallearly.init))                \
        INIT_CALLS_LEVEL(0)                    \
        INIT_CALLS_LEVEL(1)                    \
        INIT_CALLS_LEVEL(2)                    \
        INIT_CALLS_LEVEL(3)                    \
        INIT_CALLS_LEVEL(4)                    \
        INIT_CALLS_LEVEL(5)                    \
        INIT_CALLS_LEVEL(rootfs)                \
        INIT_CALLS_LEVEL(6)                    \
        INIT_CALLS_LEVEL(7)                    \
        INIT_CALLS_LEVEL(8)                    \ //新增
        __initcall_end = .;

#20 全志 SOC » [小爱mini音响 R16 ] regulatory.db 加载失败的问题 » 2023-10-30 17:49:30

muxi01
回复: 1
[    1.707503] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[    1.717596] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[    1.724231] ALSA device list:
[    1.727198]   #0: sun8i-a33-audio
[    1.731001] platform regulatory.0: loading regulatory.db failed
[    1.736936] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
[.db
[    1.748784] VFS: Mounted root (squashfs filesystem) readonly on device 31:6.
[    1.759426] devtmpfs: mounted
[    1.759791] mmc0: new high speed SDIO card at address 0001
[    1.769257] Freeing unused kernel memory: 1024K
[    1.770834] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43430-sdio for chip BCM43430/1
[    1.819524] Run /sbin/init as init process
[    1.984161] brcmfmac mmc0:0001:1: loading brcm/brcmfmac43430-sdio.bin success
[    2.051478] brcmfmac mmc0:0001:1: loading brcm/brcmfmac43430-sdio.sinovoip,bananapi-m2m.txt success
[    2.369805] random: crng init done

日志如图,可能的原因是regulatory.db 的加载早与文件系统挂载完成,导致找不到指定文件。 因为 regulatory.db 文件确实存在于/lib/firmware中。
我尝试过在加载文件之前调用mdelay(3000)来延时,但问题依旧,表现为整个日志的时间都顺延了3S,请教一下这个问题该如何解决?

#21 Re: 技术人生/软件使用技巧/破解经验/技术吐槽/灌水 » 不拆SoC,不用X光机,利用已知IO探测未知的IO连接情况 » 2023-10-26 16:59:56

// SPDX-License-Identifier: GPL-2.0+
/*
 * Copyright (C) 2018, STMicroelectronics - All Rights Reserved
 */

#include <common.h>
#include <command.h>
#include <dm.h>
#include <errno.h>
#include <stdio.h>
#include <dm/pinctrl.h>
#include <dm/uclass-internal.h>
#include <asm/io.h>
#include <asm/gpio.h>
#include <asm/arch/gpio.h>

#define LIMIT_DEVNAME	30

struct gpio_describe {
	const char *pGroup;
	const char  pins[32];
};
static const char *pname[]={"PA","PB","PC","PD","PE","PF","PG","PH","PI","PJ","PK","PL"};

static int get_serial_input(uint32_t timeout)
{
	unsigned long time_start;
	int input;
	time_start = get_timer(0);
	for(;;)
	{
		if(tstc()) {
			input =getchar();
			if(input > 0)
				return input;
		}
		if(get_timer(time_start) > timeout){
			return -1;
		}
	}
}

static int sunxi_gpio_output(u32 pin, u32 val)
{
	u32 dat;
	u32 bank = GPIO_BANK(pin);
	u32 num = GPIO_NUM(pin);
	struct sunxi_gpio *pio = BANK_TO_GPIO(bank);

	dat = readl(&pio->dat);
	if (val)
		dat |= 0x1 << num;
	else
		dat &= ~(0x1 << num);

	writel(dat, &pio->dat);

	return 0;
}

static int sunxi_gpio_input(u32 pin)
{
	u32 dat;
	u32 bank = GPIO_BANK(pin);
	u32 num = GPIO_NUM(pin);
	struct sunxi_gpio *pio = BANK_TO_GPIO(bank);

	dat = readl(&pio->dat);
	dat >>= num;

	return dat & 0x1;
}

static int get_gpio_by_name(const char *pin)
{
	int group=0,idx=0;
	if((pin[0] == 'p')||(pin[0]=='P'))
	{
		group = pin[1] - (pin[1] > 'a' ? 'a' : 'A');
		idx   = dectoul(&pin[2], NULL);
		return (group * 32 + idx);
	}
	return -1;
}

#define  GROUP_SIZE		8
static struct gpio_describe all_gpio[GROUP_SIZE]={
	{.pGroup="PB",.pins={0,1,2,3,4,5,6,7,-1}},
	{.pGroup="PC",.pins={0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,-1}},
	{.pGroup="PD",.pins={'x','x',2,3,4,5,6,7,10,11,12,13,14,15,18,19,20,21,22,23,24,25,26,27,-1}},
	{.pGroup="PE",.pins={0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,-1}},
	{.pGroup="PF",.pins={0,1,'x',3,'x',5,-1}},
	{.pGroup="PG",.pins={0,1,2,3,4,5,6,7,8,9,10,11,12,13,-1}},
	{.pGroup="PH",.pins={0,1,2,3,4,5,6,7,8,9,-1}},
	{.pGroup="PL",.pins={0,1,2,3,4,5,6,7,8,9,10,11,-1}},
};

static char gname[GROUP_SIZE*32][8];
static int  gno[GROUP_SIZE*32];
static int  gtotal=0;
static int  tick =0;

static void create_gpio_map(void)
{
	struct gpio_describe *pdescribe;

	for(int i=0;i<GROUP_SIZE;i++)
	{
		pdescribe = &all_gpio[i];
		for(int k=0;k<32;k++){
			if(pdescribe->pins[k] == 'x'){
				continue;
			}
			if(pdescribe->pins[k] < 0){
				break;
			}
			sprintf(gname[gtotal],"%s%d",pdescribe->pGroup,pdescribe->pins[k]);
			gno[gtotal] =get_gpio_by_name(gname[gtotal]);
			if(gno[gtotal] > 0){
				sunxi_gpio_set_cfgpin(gno[gtotal], SUNXI_GPIO_OUTPUT);
				gtotal++;
			}
		}
	}
}

static void simulate_set_bsp(int bsp)
{
	tick =(1000*1000 + (bsp / 2)) / bsp;
}

static void simulate_uart_delay(void)
{
	__udelay(tick);
}

static void simulate_uart_send(char *str,int gpio)
{
	char data;
	while(*str){
		data =*str++;
		sunxi_gpio_output(gpio,0);	//start
		simulate_uart_delay();
		for(int i=0;i<8;i++){
			sunxi_gpio_output(gpio,data & 0x01);
			simulate_uart_delay();
			data >>=1;
		}
		sunxi_gpio_output(gpio,1);	//stop
		simulate_uart_delay();
	}
}

static int do_pin_detect(struct cmd_tbl *cmdtp, int flag, int argc,
		     char *const argv[])
{
	char io_name[16];

	printf("show GPIO name on itself\n");
	create_gpio_map();
	simulate_set_bsp(2400);
	while(get_serial_input(50) < 0){
		for(int i=0;i<gtotal;i++){
			sprintf(io_name,"%s \n",gname[i]);
			simulate_uart_send(io_name,gno[i]);
		}
	}
	return 0;
}

U_BOOT_CMD(pindetect, CONFIG_SYS_MAXARGS, 1, do_pin_detect,
	"the GPIO name is displaied on itself in UART at bsp 2400",
	"\nexample: pindetect   - all pins name on itself gpio\n"
)

以上代码在 R16 uboot中测试通过,因公司网络限制不能上传资源,个人自行测试。

#22 Re: 技术人生/软件使用技巧/破解经验/技术吐槽/灌水 » 不拆SoC,不用X光机,利用已知IO探测未知的IO连接情况 » 2023-10-26 14:58:14

metro 说:

之前看过一个更骚的操作(仅对于FPGA有效),可以给每个引脚安排一个输出当前引脚编号的UART发送单元,之后只需要用一个串口模块就能读取每个信号的对应引脚编号了。

同样的方法,借助1个TIMER,MCU/SOC也完全可以,波特率调低点就行。

#25 Re: 全志 SOC » 分享一种emmc固件的制作方式(squashfs+overlay) » 2023-10-11 12:09:08

感谢,刚好用得上。但是似乎不能执行脚本。

# ls -al overlayfs
-rwxr-xr-x    1 root     root           857 Oct 11  2023 overlayfs
# pwd
/bin
# ./overlayfs
-sh: ./overlayfs: not found
#

#26 Re: 全志 SOC » [小爱mini音响 R16 ] mtdblock.c文件的驱动是否存在逻辑BUG? » 2023-10-11 11:33:57

我是用mkfs.ext4格式化始终报错,我把overlayfs分区改小了,然后正常了

# mkfs.ext4 /dev/mtdblock7
mke2fs 1.47.0 (5-Feb-2023)
Creating filesystem with 89984 1k blocks and 22528 inodes
Filesystem UUID: bb8c5630-6d33-4e10-9730-50693acf846e
Superblock backups stored on blocks:
[  109.076672] nand: nand_erase_nand: attempt to erase a bad block at page 0x0000ffc0


Allocating group tables: done            
[  109.087194] mtdblock: erase of region [0x57c0000, 0x20000] on "overlayfs_a" failed

Writing inode tables: 
[  109.100275] blk_update_request: I/O error, dev mtdblock7, sector 562 op 0x1:(WRITE) flags 0x800 phys_seg 1 prio class 0
done
[  109.122311] nand: nand_erase_nand: attempt to erase a bad block at page 0x0000ffc0
[  109.129919] mtdblock: erase of region [0x57c0000, 0x20000] on "overlayfs_a" failed
[  109.137513] blk_update_request: I/O error, dev mtdblock7, sector 11852 op 0x1:(WRITE) flags 0x800 phys_seg 1 prio class 0
Creating journal (4096 blocks): [  109.240616] nand: nand_erase_nand: attempt to erase a bad block atpage 0x0000ffc0
[  109.250679] mtdblock: erase of region [0x57c0000, 0x20000] on "overlayfs_a" failed
[  109.258263] blk_update_request: I/O error, dev mtdblock7, sector 65538 op 0x1:(WRITE) flags 0x4000phys_seg 32 prio class 0
[  109.269429] nand: nand_erase_nand: attempt to erase a bad block at page 0x0000ffc0
[  109.277005] mtdblock: erase of region [0x57c0000, 0x20000] on "overlayfs_a" failed
[  109.284573] blk_update_request: I/O error, dev mtdblock7, sector 65546 op 0x1:(WRITE) flags 0x4000phys_seg 31 prio class 0
[  109.295726] nand: nand_erase_nand: attempt to erase a bad block at page 0x0000ffc0
[  109.303286] mtdblock: erase of region [0x57c0000, 0x20000] on "overlayfs_a" failed

#27 Re: 全志 SOC » [小爱mini音响 R16 ] mtdblock.c文件的驱动是否存在逻辑BUG? » 2023-10-11 09:47:58

duanlin 说:

不存在逻辑bug。因为函数参数指定了写入的位置,如果函数内部私自移开写位置,则为违抗指令。返回值很难描述变通行为的细节。

坏块,不就应该跳过吗?不跳过,指令就执行不下去了。

#28 全志 SOC » [小爱mini音响 R16 ] mtdblock.c文件的驱动是否存在逻辑BUG? » 2023-10-10 18:33:36

muxi01
回复: 3
// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * Direct MTD block device access
 *
 * Copyright © 1999-2010 David Woodhouse <dwmw2@infradead.org>
 * Copyright © 2000-2003 Nicolas Pitre <nico@fluxnic.net>
 */

#include <linux/fs.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/sched.h>
#include <linux/slab.h>
#include <linux/types.h>
#include <linux/vmalloc.h>

#include <linux/mtd/mtd.h>
#include <linux/mtd/blktrans.h>
#include <linux/mutex.h>
#include <linux/major.h>


struct mtdblk_dev {
	struct mtd_blktrans_dev mbd;
	int count;
	struct mutex cache_mutex;
	unsigned char *cache_data;
	unsigned long cache_offset;
	unsigned int cache_size;
	enum { STATE_EMPTY, STATE_CLEAN, STATE_DIRTY } cache_state;
};

/*
 * Cache stuff...
 *
 * Since typical flash erasable sectors are much larger than what Linux's
 * buffer cache can handle, we must implement read-modify-write on flash
 * sectors for each block write requests.  To avoid over-erasing flash sectors
 * and to speed things up, we locally cache a whole flash sector while it is
 * being written to until a different sector is required.
 */

static int erase_write (struct mtd_info *mtd, unsigned long pos,
			unsigned int len, const char *buf)
{
	struct erase_info erase;
	size_t retlen;
	int ret;

	/*
	 * First, let's erase the flash block.
	 */
	erase.addr = pos;
	erase.len = len;

	ret = mtd_erase(mtd, &erase);
	if (ret) {
		printk (KERN_WARNING "mtdblock: erase of region [0x%lx, 0x%x] er=%d"
				     "on \"%s\" failed\n",
			pos, len, ret,mtd->name);
		return ret;
	}

	/*
	 * Next, write the data to flash.
	 */

	ret = mtd_write(mtd, pos, len, &retlen, buf);
	if (ret)
		return ret;
	if (retlen != len)
		return -EIO;
	return 0;
}


static int write_cached_data (struct mtdblk_dev *mtdblk)
{
	struct mtd_info *mtd = mtdblk->mbd.mtd;
	int ret;

	if (mtdblk->cache_state != STATE_DIRTY)
		return 0;

	pr_debug("mtdblock: writing cached data for \"%s\" "
			"at 0x%lx, size 0x%x\n", mtd->name,
			mtdblk->cache_offset, mtdblk->cache_size);

	ret = erase_write (mtd, mtdblk->cache_offset,
			   mtdblk->cache_size, mtdblk->cache_data);
	if (ret)
		return ret;

	/*
	 * Here we could arguably set the cache state to STATE_CLEAN.
	 * However this could lead to inconsistency since we will not
	 * be notified if this content is altered on the flash by other
	 * means.  Let's declare it empty and leave buffering tasks to
	 * the buffer cache instead.
	 */
	mtdblk->cache_state = STATE_EMPTY;
	return 0;
}


static int do_cached_write (struct mtdblk_dev *mtdblk, unsigned long pos,
			    int len, const char *buf)
{
	struct mtd_info *mtd = mtdblk->mbd.mtd;
	unsigned int sect_size = mtdblk->cache_size;
	size_t retlen;
	int ret;

	pr_debug("mtdblock: write on \"%s\" at 0x%lx, size 0x%x\n",
		mtd->name, pos, len);

	if (!sect_size)
		return mtd_write(mtd, pos, len, &retlen, buf);

	while (len > 0) {
		unsigned long sect_start = (pos/sect_size)*sect_size;
		unsigned int offset = pos - sect_start;
		unsigned int size = sect_size - offset;
		if( size > len )
			size = len;

		if (size == sect_size) {
			/*
			 * We are covering a whole sector.  Thus there is no
			 * need to bother with the cache while it may still be
			 * useful for other partial writes.
			 */
			ret = erase_write (mtd, pos, size, buf);
			if (ret)
				return ret;
		} else {
			/* Partial sector: need to use the cache */

			if (mtdblk->cache_state == STATE_DIRTY &&
			    mtdblk->cache_offset != sect_start) {
				ret = write_cached_data(mtdblk);
				if (ret)
					return ret;
			}

			if (mtdblk->cache_state == STATE_EMPTY ||
			    mtdblk->cache_offset != sect_start) {
				/* fill the cache with the current sector */
				mtdblk->cache_state = STATE_EMPTY;
				ret = mtd_read(mtd, sect_start, sect_size,
					       &retlen, mtdblk->cache_data);
				if (ret && !mtd_is_bitflip(ret))
					return ret;
				if (retlen != sect_size)
					return -EIO;

				mtdblk->cache_offset = sect_start;
				mtdblk->cache_size = sect_size;
				mtdblk->cache_state = STATE_CLEAN;
			}

			/* write data to our local cache */
			memcpy (mtdblk->cache_data + offset, buf, size);
			mtdblk->cache_state = STATE_DIRTY;
		}

		buf += size;
		pos += size;
		len -= size;
	}

	return 0;
}


static int do_cached_read (struct mtdblk_dev *mtdblk, unsigned long pos,
			   int len, char *buf)
{
	struct mtd_info *mtd = mtdblk->mbd.mtd;
	unsigned int sect_size = mtdblk->cache_size;
	size_t retlen;
	int ret;

	pr_debug("mtdblock: read on \"%s\" at 0x%lx, size 0x%x\n",
			mtd->name, pos, len);

	if (!sect_size) {
		ret = mtd_read(mtd, pos, len, &retlen, buf);
		if (ret && !mtd_is_bitflip(ret))
			return ret;
		return 0;
	}

	while (len > 0) {
		unsigned long sect_start = (pos/sect_size)*sect_size;
		unsigned int offset = pos - sect_start;
		unsigned int size = sect_size - offset;
		if (size > len)
			size = len;

		/*
		 * Check if the requested data is already cached
		 * Read the requested amount of data from our internal cache if it
		 * contains what we want, otherwise we read the data directly
		 * from flash.
		 */
		if (mtdblk->cache_state != STATE_EMPTY &&
		    mtdblk->cache_offset == sect_start) {
			memcpy (buf, mtdblk->cache_data + offset, size);
		} else {
			ret = mtd_read(mtd, pos, size, &retlen, buf);
			if (ret && !mtd_is_bitflip(ret))
				return ret;
			if (retlen != size)
				return -EIO;
		}

		buf += size;
		pos += size;
		len -= size;
	}

	return 0;
}

static int mtdblock_readsect(struct mtd_blktrans_dev *dev,
			      unsigned long block, char *buf)
{
	struct mtdblk_dev *mtdblk = container_of(dev, struct mtdblk_dev, mbd);
	return do_cached_read(mtdblk, block<<9, 512, buf);
}

static int mtdblock_writesect(struct mtd_blktrans_dev *dev,
			      unsigned long block, char *buf)
{
	struct mtdblk_dev *mtdblk = container_of(dev, struct mtdblk_dev, mbd);
	if (unlikely(!mtdblk->cache_data && mtdblk->cache_size)) {
		mtdblk->cache_data = vmalloc(mtdblk->mbd.mtd->erasesize);
		if (!mtdblk->cache_data)
			return -EINTR;
		/* -EINTR is not really correct, but it is the best match
		 * documented in man 2 write for all cases.  We could also
		 * return -EAGAIN sometimes, but why bother?
		 */
	}
	return do_cached_write(mtdblk, block<<9, 512, buf);
}

static int mtdblock_open(struct mtd_blktrans_dev *mbd)
{
	struct mtdblk_dev *mtdblk = container_of(mbd, struct mtdblk_dev, mbd);

	pr_debug("mtdblock_open\n");

	if (mtdblk->count) {
		mtdblk->count++;
		return 0;
	}

	/* OK, it's not open. Create cache info for it */
	mtdblk->count = 1;
	mutex_init(&mtdblk->cache_mutex);
	mtdblk->cache_state = STATE_EMPTY;
	if (!(mbd->mtd->flags & MTD_NO_ERASE) && mbd->mtd->erasesize) {
		mtdblk->cache_size = mbd->mtd->erasesize;
		mtdblk->cache_data = NULL;
	}

	pr_debug("ok\n");

	return 0;
}

static void mtdblock_release(struct mtd_blktrans_dev *mbd)
{
	struct mtdblk_dev *mtdblk = container_of(mbd, struct mtdblk_dev, mbd);

	pr_debug("mtdblock_release\n");

	mutex_lock(&mtdblk->cache_mutex);
	write_cached_data(mtdblk);
	mutex_unlock(&mtdblk->cache_mutex);

	if (!--mtdblk->count) {
		/*
		 * It was the last usage. Free the cache, but only sync if
		 * opened for writing.
		 */
		if (mbd->file_mode & FMODE_WRITE)
			mtd_sync(mbd->mtd);
		vfree(mtdblk->cache_data);
	}

	pr_debug("ok\n");
}

static int mtdblock_flush(struct mtd_blktrans_dev *dev)
{
	struct mtdblk_dev *mtdblk = container_of(dev, struct mtdblk_dev, mbd);

	mutex_lock(&mtdblk->cache_mutex);
	write_cached_data(mtdblk);
	mutex_unlock(&mtdblk->cache_mutex);
	mtd_sync(dev->mtd);
	return 0;
}

static void mtdblock_add_mtd(struct mtd_blktrans_ops *tr, struct mtd_info *mtd)
{
	struct mtdblk_dev *dev = kzalloc(sizeof(*dev), GFP_KERNEL);

	if (!dev)
		return;

	dev->mbd.mtd = mtd;
	dev->mbd.devnum = mtd->index;

	dev->mbd.size = mtd->size >> 9;
	dev->mbd.tr = tr;

	if (!(mtd->flags & MTD_WRITEABLE))
		dev->mbd.readonly = 1;

	if (add_mtd_blktrans_dev(&dev->mbd))
		kfree(dev);
}

static void mtdblock_remove_dev(struct mtd_blktrans_dev *dev)
{
	del_mtd_blktrans_dev(dev);
}

static struct mtd_blktrans_ops mtdblock_tr = {
	.name		= "mtdblock",
	.major		= MTD_BLOCK_MAJOR,
	.part_bits	= 0,
	.blksize 	= 512,
	.open		= mtdblock_open,
	.flush		= mtdblock_flush,
	.release	= mtdblock_release,
	.readsect	= mtdblock_readsect,
	.writesect	= mtdblock_writesect,
	.add_mtd	= mtdblock_add_mtd,
	.remove_dev	= mtdblock_remove_dev,
	.owner		= THIS_MODULE,
};

static int __init init_mtdblock(void)
{
	return register_mtd_blktrans(&mtdblock_tr);
}

static void __exit cleanup_mtdblock(void)
{
	deregister_mtd_blktrans(&mtdblock_tr);
}

module_init(init_mtdblock);
module_exit(cleanup_mtdblock);


MODULE_LICENSE("GPL");
MODULE_AUTHOR("Nicolas Pitre <nico@fluxnic.net> et al.");
MODULE_DESCRIPTION("Caching read/erase/writeback block device emulation access to MTD devices");

erase_write 这个在业务逻辑上是否存在逻辑BUG,该函数执行了nand 的erase 和 write ,在erase之前会先检测该地址是否为坏块,为坏块了则返回错误,即擦写都失败。既然nand是存在坏块的可能的,那么擦地址和写地址应该自动偏移,跳过坏块才对。

#29 Re: 全志 SOC » [小爱mini音响 R16 ] 配置MTD时死机 » 2023-09-15 14:23:38

结帖,已经解决,方法是修改CONFIG_SYS_MALLOC_LEN为2M

#30 Re: 全志 SOC » [小爱mini音响 R16 ] 配置MTD时死机 » 2023-09-13 10:50:06

muxi01 说:

可以肯定的是kernel中的串口,肯定是配置对了的。

nand 使用的是PC端口,串口使用的是PF2 PF4,完全不冲突。

#32 Re: 全志 SOC » [小爱mini音响 R16 ] 配置MTD时死机 » 2023-09-13 10:30:26

可以肯定的是kernel中的串口,肯定是配置对了的。

#33 Re: 全志 SOC » [小爱mini音响 R16 ] 配置MTD时死机 » 2023-09-13 10:25:06

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 5.4.253-g3055d27e195b-dirty (xialixin@NBKJ-5SLTP93) (gcc version 6.4.1 (OpenWrt/Linaro GCC 6.4-2017.11 2017-11)) #20 SMP Wed Sep 13 10:14:46 CST 2023
[    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: Allwinner R16 EVB (Parrot)
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] cma: Reserved 16 MiB at 0x47000000
[    0.000000] On node 0 totalpages: 32768
[    0.000000]   Normal zone: 256 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 32768 pages, LIFO batch:7
[    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 s30732 r8192 d22516 u61440
[    0.000000] pcpu-alloc: s30732 r8192 d22516 u61440 alloc=15*4096
[    0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 32512
[    0.000000] Kernel command line: console=ttyS0,115200 earyprintk loglevel=8 root=/dev/mtdblock7 rootfstype=ext2 rootwait init=/sbin/init mtdparts=nand.0:17m(secret_a),384k(spl2_a),384k(spl3_a),384k(env_a),2m(u-boot_a),10m(kernel_a),-(rootfs_a)
[    0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes, linear)
[    0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes, linear)
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 103260K/131072K available (6144K kernel code, 437K rwdata, 1716K rodata, 1024Kinit, 245K bss, 11428K reserved, 16384K cma-reserved, 0K highmem)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] rcu: Hierarchical RCU implementation.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000] GIC: Using split EOI/Deactivate mode
[    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.000006] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns
[    0.000017] Switching to timer-based delay loop, resolution 41ns
[    0.000237] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[    0.000759] Console: colour dummy device 80x30
[    0.000803] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=240000)
[    0.000813] CPU: Testing write buffer coherency: ok
[    0.000850] pid_max: default: 32768 minimum: 301
[    0.000974] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.000987] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.002081] /cpus/cpu@0 missing clock-frequency property
[    0.002103] /cpus/cpu@1 missing clock-frequency property
[    0.002117] /cpus/cpu@2 missing clock-frequency property
[    0.002132] /cpus/cpu@3 missing clock-frequency property
[    0.002142] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[    0.002756] do_one_initcall.923 fn=c010cf74
[    0.002771] do_one_initcall.923 fn=c0905c14
[    0.002794] Setting up static identity map for 0x40100000 - 0x40100060
[    0.002801] do_one_initcall.923 fn=c0908a5c
[    0.002817] do_one_initcall.923 fn=c09094f8
[    0.002935] do_one_initcall.923 fn=c090a804
[    0.002943] do_one_initcall.923 fn=c090bdc4
[    0.002948] rcu: Hierarchical SRCU implementation.
[    0.002955] do_one_initcall.923 fn=c090beac
[    0.002961] do_one_initcall.923 fn=c090c0c4
[    0.002967] do_one_initcall.923 fn=c090bec8
[    0.003057] do_one_initcall.923 fn=c090dd3c
[    0.003170] do_one_initcall.923 fn=c09101e4
[    0.003178] do_one_initcall.923 fn=c03a71fc
[    0.003310] do_one_initcall.923 fn=c0922e94
[    0.003326] do_one_initcall.923 fn=c092c708
[    0.003606] smp: Bringing up secondary CPUs ...
[    0.004605] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
[    0.005684] CPU2: thread -1, cpu 2, socket 0, mpidr 80000002
[    0.006700] CPU3: thread -1, cpu 3, socket 0, mpidr 80000003
[    0.006785] smp: Brought up 1 node, 4 CPUs
[    0.006802] SMP: Total of 4 processors activated (192.00 BogoMIPS).
[    0.006808] CPU: All CPU(s) started in HYP mode.
[    0.006812] CPU: Virtualization extensions available.
[    0.007297] devtmpfs: initialized
[    0.012667] do_one_initcall.923 fn=c0915564
[    0.012685] do_one_initcall.923 fn=c0925b68
[    0.013161] do_one_initcall.923 fn=c0902930
[    0.013181] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
[    0.013200] do_one_initcall.923 fn=c0902c40
[    0.013207] do_one_initcall.923 fn=c0904204
[    0.013215] do_one_initcall.923 fn=c090754c
[    0.013221] do_one_initcall.923 fn=c0909288
[    0.013228] do_one_initcall.923 fn=c0909280
[    0.013234] do_one_initcall.923 fn=c0909ad4
[    0.013320] do_one_initcall.923 fn=c090a458
[    0.013345] do_one_initcall.923 fn=c090b20c
[    0.013431] do_one_initcall.923 fn=c090bd00
[    0.013438] do_one_initcall.923 fn=c090c9ac
[    0.013445] do_one_initcall.923 fn=c090cfb4
[    0.013456] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.013465] do_one_initcall.923 fn=c090d558
[    0.013481] futex hash table entries: 1024 (order: 4, 65536 bytes, linear)
[    0.013600] do_one_initcall.923 fn=c090d920
[    0.013620] do_one_initcall.923 fn=c090dc7c
[    0.013637] do_one_initcall.923 fn=c01a75a0
[    0.013655] do_one_initcall.923 fn=c0912790
[    0.014127] do_one_initcall.923 fn=c09136f0
[    0.014168] do_one_initcall.923 fn=c0913a74
[    0.014189] do_one_initcall.923 fn=c0913b38
[    0.014197] do_one_initcall.923 fn=c0913b54
[    0.014204] do_one_initcall.923 fn=c0915374
[    0.014224] do_one_initcall.923 fn=c0915e54
[    0.014232] do_one_initcall.923 fn=c0916fe4
[    0.014280] do_one_initcall.923 fn=c09170d4
[    0.014285] pinctrl core: initialized pinctrl subsystem
[    0.014408] do_one_initcall.923 fn=c0917288
[    0.014454] do_one_initcall.923 fn=c091b124
[    0.014804] do_one_initcall.923 fn=c091d068
[    0.014821] do_one_initcall.923 fn=c091dc34
[    0.014828] do_one_initcall.923 fn=c09211d0
[    0.014840] do_one_initcall.923 fn=c09211f8
[    0.014853] do_one_initcall.923 fn=c09259fc
[    0.015129] do_one_initcall.923 fn=c0925ab4
[    0.015148] do_one_initcall.923 fn=c0925b44
[    0.015156] do_one_initcall.923 fn=c0925c9c
[    0.015165] do_one_initcall.923 fn=c0926414
[    0.015719] NET: Registered protocol family 16
[    0.015916] do_one_initcall.923 fn=c09057b8
[    0.017013] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.017027] do_one_initcall.923 fn=c090ba60
[    0.017489] do_one_initcall.923 fn=c090e694
[    0.017547] do_one_initcall.923 fn=c090e7b4
[    0.017560] do_one_initcall.923 fn=c092caac
[    0.017577] do_one_initcall.923 fn=c091738c
[    0.017603] do_one_initcall.923 fn=c091b3bc
[    0.017621] do_one_initcall.923 fn=c091bb7c
[    0.017707] do_one_initcall.923 fn=c091cfac
[    0.017742] do_one_initcall.923 fn=c091d92c
[    0.017753] do_one_initcall.923 fn=c091dae8
[    0.017770] do_one_initcall.923 fn=c091db20
[    0.017799] do_one_initcall.923 fn=c091dc24
[    0.017815] do_one_initcall.923 fn=c091de48
[    0.017849] do_one_initcall.923 fn=c091e740
[    0.017892] do_one_initcall.923 fn=c091fdbc
[    0.017980] do_one_initcall.923 fn=c092c640
[    0.018129] do_one_initcall.923 fn=c0902bd0
[    0.018137] do_one_initcall.923 fn=c0902c6c
[    0.018144] do_one_initcall.923 fn=c09048c8
[    0.018266] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
[    0.018274] hw-breakpoint: maximum watchpoint size is 8 bytes.
[    0.018284] do_one_initcall.923 fn=c0904e80
[    0.018313] do_one_initcall.923 fn=c090508c
[    0.018320] do_one_initcall.923 fn=c091af30
[    0.018360] do_one_initcall.923 fn=c091ae48
[    0.018398] do_one_initcall.923 fn=c0923190
[    0.023867] do_one_initcall.923 fn=c0902c9c
[    0.024222] do_one_initcall.923 fn=c09099b4
[    0.024246] do_one_initcall.923 fn=c090a210
[    0.029707] do_one_initcall.923 fn=c090a7c0
[    0.029757] do_one_initcall.923 fn=c090d908
[    0.029774] do_one_initcall.923 fn=c090dbe0
[    0.029781] do_one_initcall.923 fn=c090e218
[    0.030030] do_one_initcall.923 fn=c090e6f0
[    0.030266] do_one_initcall.923 fn=c090ea20
[    0.030275] do_one_initcall.923 fn=c09100a0
[    0.030397] do_one_initcall.923 fn=c092c75c
[    0.030406] do_one_initcall.923 fn=c01ed5e8
[    0.030412] do_one_initcall.923 fn=c01ed5b8
[    0.030418] do_one_initcall.923 fn=c0911c04
[    0.030437] do_one_initcall.923 fn=c0911c9c
[    0.030444] do_one_initcall.923 fn=c09155c8
[    0.030861] do_one_initcall.923 fn=c09155d4
[    0.031033] do_one_initcall.923 fn=c09155e0
[    0.031178] do_one_initcall.923 fn=c09155ec
[    0.031318] do_one_initcall.923 fn=c09155f8
[    0.031398] do_one_initcall.923 fn=c0915734
[    0.031406] do_one_initcall.923 fn=c091576c
[    0.031415] do_one_initcall.923 fn=c09157ac
[    0.031425] do_one_initcall.923 fn=c0915848
[    0.031431] do_one_initcall.923 fn=c0915888
[    0.031654] do_one_initcall.923 fn=c0917354
[    0.031671] do_one_initcall.923 fn=c0917430
[    0.031704] do_one_initcall.923 fn=c0917468
[    0.031731] do_one_initcall.923 fn=c091752c
[    0.031849] do_one_initcall.923 fn=c091b24c
[    0.032772] do_one_initcall.923 fn=c091b26c
[    0.032863] do_one_initcall.923 fn=c091ce00
[    0.032896] do_one_initcall.923 fn=c048d56c
[    0.032919] do_one_initcall.923 fn=c091de58
[    0.032999] do_one_initcall.923 fn=c091df10
[    0.033261] SCSI subsystem initialized
[    0.033270] do_one_initcall.923 fn=c091e308
[    0.033501] libata version 3.00 loaded.
[    0.033510] do_one_initcall.923 fn=c091e944
[    0.033603] do_one_initcall.923 fn=c091f20c
[    0.033625] do_one_initcall.923 fn=c091f234
[    0.033723] usbcore: registered new interface driver usbfs
[    0.033778] usbcore: registered new interface driver hub
[    0.033820] usbcore: registered new device driver usb
[    0.033828] do_one_initcall.923 fn=c091f420
[    0.033913] do_one_initcall.923 fn=c091f5cc
[    0.033933] do_one_initcall.923 fn=c091f624
[    0.033964] do_one_initcall.923 fn=c091f684
[    0.033995] do_one_initcall.923 fn=c091f8f4
[    0.034016] do_one_initcall.923 fn=c092053c
[    0.034039] do_one_initcall.923 fn=c09205a4
[    0.034057] pps_core: LinuxPPS API ver. 1 registered
[    0.034063] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.034069] do_one_initcall.923 fn=c0920658
[    0.034087] PTP clock support registered
[    0.034094] do_one_initcall.923 fn=c09206f8
[    0.034112] do_one_initcall.923 fn=c0920778
[    0.034137] do_one_initcall.923 fn=c0921360
[    0.034211] do_one_initcall.923 fn=c09214c4
[    0.034238] do_one_initcall.923 fn=c09252c4
[    0.034285] do_one_initcall.923 fn=c059e228
[    0.034294] do_one_initcall.923 fn=c0925360
[    0.034326] do_one_initcall.923 fn=c092537c
[    0.034344] do_one_initcall.923 fn=c09253bc
[    0.034377] Advanced Linux Sound Architecture Driver Initialized.
[    0.034385] do_one_initcall.923 fn=c0925aa8
[    0.034399] do_one_initcall.923 fn=c0925e30
[    0.034812] do_one_initcall.923 fn=c092606c
[    0.034826] do_one_initcall.923 fn=c0926324
[    0.034837] do_one_initcall.923 fn=c0926330
[    0.034877] do_one_initcall.923 fn=c092654c
[    0.034920] do_one_initcall.923 fn=c092767c
[    0.034937] do_one_initcall.923 fn=c0921044
[    0.035269] do_one_initcall.923 fn=c0902d08
[    0.035298] do_one_initcall.923 fn=c0907474
[    0.035311] do_one_initcall.923 fn=c090ceb4
[    0.035378] clocksource: Switched to clocksource arch_sys_counter
[    0.035387] do_one_initcall.923 fn=c0912e34
[    0.035451] do_one_initcall.923 fn=c09137d0
[    0.035473] do_one_initcall.923 fn=c0913834
[    0.035499] do_one_initcall.923 fn=c0913908
[    0.035556] do_one_initcall.923 fn=c0913a34
[    0.035569] do_one_initcall.923 fn=c0913e0c
[    0.035578] do_one_initcall.923 fn=c0913e44
[    0.035587] do_one_initcall.923 fn=c0913e80
[    0.035595] do_one_initcall.923 fn=c0913ea8
[    0.035603] do_one_initcall.923 fn=c0913ee4
[    0.035612] do_one_initcall.923 fn=c0913f20
[    0.035620] do_one_initcall.923 fn=c0913f58
[    0.035637] do_one_initcall.923 fn=c0913f90
[    0.035646] do_one_initcall.923 fn=c0913fb8
[    0.035655] do_one_initcall.923 fn=c0913ff0
[    0.035663] do_one_initcall.923 fn=c0914028
[    0.035671] do_one_initcall.923 fn=c0914120
[    0.035679] do_one_initcall.923 fn=c0914148
[    0.035689] do_one_initcall.923 fn=c0914998
[    0.035697] do_one_initcall.923 fn=c0915c40
[    0.035704] do_one_initcall.923 fn=c0917a90
[    0.035832] do_one_initcall.923 fn=c091cae0
[    0.042480] do_one_initcall.923 fn=c091db50
[    0.042500] do_one_initcall.923 fn=c09207ac
[    0.042510] thermal_sys: Registered thermal governor 'step_wise'
[    0.042921] do_one_initcall.923 fn=c092124c
[    0.042934] do_one_initcall.923 fn=c0925cf0
[    0.042990] do_one_initcall.923 fn=c09263fc
[    0.042998] do_one_initcall.923 fn=c09272b8
[    0.043090] NET: Registered protocol family 2
[    0.043303] IP idents hash table entries: 2048 (order: 2, 16384 bytes, linear)
[    0.043703] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes, linear)
[    0.043733] TCP established hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.043754] TCP bind hash table entries: 1024 (order: 1, 8192 bytes, linear)
[    0.043776] TCP: Hash tables configured (established 1024 bind 1024)
[    0.043872] UDP hash table entries: 256 (order: 1, 8192 bytes, linear)
[    0.043909] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes, linear)
[    0.044072] do_one_initcall.923 fn=c0927234
[    0.044082] do_one_initcall.923 fn=c092960c
[    0.044093] NET: Registered protocol family 1
[    0.044123] do_one_initcall.923 fn=c0929660
[    0.044134] do_one_initcall.923 fn=c0929ac4
[    0.044723] RPC: Registered named UNIX socket transport module.
[    0.044735] RPC: Registered udp transport module.
[    0.044740] RPC: Registered tcp transport module.
[    0.044745] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.044753] do_one_initcall.923 fn=c0902820
[    0.045140] do_one_initcall.923 fn=c0904b34
[    0.045528] do_one_initcall.923 fn=c090917c
[    0.045549] do_one_initcall.923 fn=c0909204
[    0.045580] do_one_initcall.923 fn=c09092a0
[    0.045649] do_one_initcall.923 fn=c09095e0
[    0.045666] do_one_initcall.923 fn=c090bcd0
[    0.045673] do_one_initcall.923 fn=c090bce8
[    0.045679] do_one_initcall.923 fn=c090cbc8
[    0.045685] do_one_initcall.923 fn=c090cf38
[    0.045830] do_one_initcall.923 fn=c090cfd4
[    0.045843] do_one_initcall.923 fn=c090d018
[    0.045898] do_one_initcall.923 fn=c090d0c0
[    0.045950] do_one_initcall.923 fn=c090d100
[    0.046241] do_one_initcall.923 fn=c090d200
[    0.046249] do_one_initcall.923 fn=c090d880
[    0.046260] do_one_initcall.923 fn=c090d8a8
[    0.046278] do_one_initcall.923 fn=c090dcfc
[    0.046300] do_one_initcall.923 fn=c090ddf0
[    0.046326] do_one_initcall.923 fn=c090de08
[    0.046458] do_one_initcall.923 fn=c090e2e4
[    0.046588] do_one_initcall.923 fn=c090e3f4
[    0.046626] do_one_initcall.923 fn=c090e7ec
[    0.046634] do_one_initcall.923 fn=c090fd9c
[    0.046647] do_one_initcall.923 fn=c0910100
[    0.046654] workingset: timestamp_bits=30 max_order=15 bucket_order=0
[    0.046662] do_one_initcall.923 fn=c0910358
[    0.046671] do_one_initcall.923 fn=c0911208
[    0.046703] do_one_initcall.923 fn=c0911c74
[    0.046713] do_one_initcall.923 fn=c0911fec
[    0.051746] do_one_initcall.923 fn=c0912e88
[    0.051767] do_one_initcall.923 fn=c09130f0
[    0.051782] do_one_initcall.923 fn=c09134e0
[    0.051795] do_one_initcall.923 fn=c0913610
[    0.051827] do_one_initcall.923 fn=c09136b0
[    0.051843] do_one_initcall.923 fn=c091374c
[    0.051864] do_one_initcall.923 fn=c0913970
[    0.052078] do_one_initcall.923 fn=c09139f4
[    0.052096] do_one_initcall.923 fn=c0913b70
[    0.052200] do_one_initcall.923 fn=c0913bb4
[    0.052215] do_one_initcall.923 fn=c0914240
[    0.052248] do_one_initcall.923 fn=c09144c0
[    0.052875] do_one_initcall.923 fn=c091485c
[    0.053103] do_one_initcall.923 fn=c09149f0
[    0.053270] do_one_initcall.923 fn=c0914a50
[    0.053280] do_one_initcall.923 fn=c0914ae0
[    0.053906] do_one_initcall.923 fn=c0915228
[    0.053918] do_one_initcall.923 fn=c0915240
[    0.053924] do_one_initcall.923 fn=c0915258
[    0.053930] NFS: Registering the id_resolver key type
[    0.053982] Key type id_resolver registered
[    0.053988] Key type id_legacy registered
[    0.054008] do_one_initcall.923 fn=c0915290
[    0.054037] do_one_initcall.923 fn=c0915354
[    0.054045] do_one_initcall.923 fn=c0915364
[    0.054050] do_one_initcall.923 fn=c09154dc
[    0.054068] do_one_initcall.923 fn=c0915584
[    0.054078] do_one_initcall.923 fn=c0915908
[    0.054089] do_one_initcall.923 fn=c0915bbc
[    0.054096] do_one_initcall.923 fn=c0915d20
[    0.054133] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 248)
[    0.054140] do_one_initcall.923 fn=c0915e3c
[    0.054148] io scheduler mq-deadline registered
[    0.054154] do_one_initcall.923 fn=c0915e48
[    0.054160] io scheduler kyber registered
[    0.054165] do_one_initcall.923 fn=c0915fb0
[    0.058151] do_one_initcall.923 fn=c0916360
[    0.058263] do_one_initcall.923 fn=c0916408
[    0.058531] do_one_initcall.923 fn=c0916ff4
[    0.058762] do_one_initcall.923 fn=c091704c
[    0.058784] do_one_initcall.923 fn=c09170a4
[    0.058967] sun4i-usb-phy 1c19400.phy: Couldn't request ID GPIO
[    0.059252] do_one_initcall.923 fn=c09170b4
[    0.059339] do_one_initcall.923 fn=c09170c4
[    0.059412] do_one_initcall.923 fn=c09171a8
[    0.059525] do_one_initcall.923 fn=c09171b8
[    0.059629] do_one_initcall.923 fn=c09171c8
[    0.059718] do_one_initcall.923 fn=c09171d8
[    0.059796] do_one_initcall.923 fn=c09171e8
[    0.059868] do_one_initcall.923 fn=c09171f8
[    0.059949] sun8i-a23-r-pinctrl 1f02c00.pinctrl: Reset controller missing
[    0.059997] do_one_initcall.923 fn=c0917208
[    0.062750] sun8i-a33-pinctrl 1c20800.pinctrl: initialized sunXi PIO driver
[    0.062875] do_one_initcall.923 fn=c0917218
[    0.062964] do_one_initcall.923 fn=c0917228
[    0.063038] do_one_initcall.923 fn=c0917238
[    0.063109] do_one_initcall.923 fn=c0917248
[    0.063190] do_one_initcall.923 fn=c0917258
[    0.063283] do_one_initcall.923 fn=c0917268
[    0.063353] do_one_initcall.923 fn=c0917278
[    0.063440] do_one_initcall.923 fn=c091747c
[    0.063596] do_one_initcall.923 fn=c0917e58
[    0.063658] do_one_initcall.923 fn=c0917e68
[    0.063719] do_one_initcall.923 fn=c0917e7c
[    0.063792] do_one_initcall.923 fn=c09191bc
[    0.063864] do_one_initcall.923 fn=c091a4f0
[    0.063931] do_one_initcall.923 fn=c091a8b8
[    0.064003] do_one_initcall.923 fn=c091a8c8
[    0.064087] do_one_initcall.923 fn=c091a8d8
[    0.064181] do_one_initcall.923 fn=c091a8e8
[    0.064248] do_one_initcall.923 fn=c091ac40
[    0.064320] do_one_initcall.923 fn=c091ad80
[    0.064495] do_one_initcall.923 fn=c091ae08
[    0.064567] do_one_initcall.923 fn=c091ae18
[    0.064637] do_one_initcall.923 fn=c091ae28
[    0.064708] do_one_initcall.923 fn=c091ae38
[    0.064784] do_one_initcall.923 fn=c091afdc
[    0.064856] do_one_initcall.923 fn=c091afec
[    0.067517] do_one_initcall.923 fn=c091affc
[    0.068088] do_one_initcall.923 fn=c091b25c
[    0.068139] do_one_initcall.923 fn=c091b27c
[    0.068326] do_one_initcall.923 fn=c091b538
[    0.068335] do_one_initcall.923 fn=c091b558
[    0.110858] do_one_initcall.923 fn=c091c748
[    0.110876] Serial: 8250/16550 driver, 8 ports, IRQ sharing disabled
[    0.112386] do_one_initcall.923 fn=c091cac0
[    0.112582] sun8i-a33-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pf not found, using dummy regulator
[    0.113376] printk: console [ttyS0] disabled
[    0.133572] 1c28000.serial: ttyS0 at MMIO 0x1c28000 (irq = 33, base_baud = 1500000) is a U6_16550A
[    1.942602] printk: console [ttyS0] enabled
[    1.947151] do_one_initcall.923 fn=c091cad0
[    1.951620] do_one_initcall.923 fn=c091cee0
[    1.955825] do_one_initcall.923 fn=c091cee8
[    1.960066] do_one_initcall.923 fn=c091cfb8
[    1.964616] do_one_initcall.923 fn=c091cfc8
[    1.969175] do_one_initcall.923 fn=c091cfd8
[    1.973422] do_one_initcall.923 fn=c091cfe8
[    1.977955] do_one_initcall.923 fn=c091cff8
[    1.982416] do_one_initcall.923 fn=c091d008
[    1.986804] do_one_initcall.923 fn=c091d018
[    1.991092] do_one_initcall.923 fn=c091d028
[    1.995337] do_one_initcall.923 fn=c091d038
[    1.999787] do_one_initcall.923 fn=c091d048
[    2.004057] do_one_initcall.923 fn=c091d058
[    2.008350] do_one_initcall.923 fn=c0476018
[    2.012666] do_one_initcall.923 fn=c091d8ec
[    2.016891] do_one_initcall.923 fn=c091de10
[    2.022364] do_one_initcall.923 fn=c091de20
[    2.026605] do_one_initcall.923 fn=c091de2c
[    2.030807] do_one_initcall.923 fn=c091de3c
[    2.035004] do_one_initcall.923 fn=c091e154
[    2.039284] do_one_initcall.923 fn=c091e730
[    2.043577] do_one_initcall.923 fn=c091e7c8
[    2.047864] do_one_initcall.923 fn=c091e7d8
[    2.052142] do_one_initcall.923 fn=c091e848
[    2.056347] do_one_initcall.923 fn=c091e8bc
[    2.060572] do_one_initcall.923 fn=c091eddc
[    2.064854] do_one_initcall.923 fn=c091edec
[    2.069237] do_one_initcall.923 fn=c091eefc
[    2.073415] CAN device driver interface
[    2.077274] do_one_initcall.923 fn=c091ef28
[    2.081533] do_one_initcall.923 fn=c091ef38
[    2.085836] do_one_initcall.923 fn=c091f1a0
[    2.090046] do_one_initcall.923 fn=c091f1dc
[    2.094300] do_one_initcall.923 fn=c091f1ec
[    2.098689] do_one_initcall.923 fn=c091f1fc
[    2.103072] do_one_initcall.923 fn=c091f430
[    2.107266] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    2.113783] do_one_initcall.923 fn=c091f4a0
[    2.117971] ehci-platform: EHCI generic platform driver
[    2.123563] do_one_initcall.923 fn=c091f4f4
[    2.127778] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    2.133993] do_one_initcall.923 fn=c091f558
[    2.138184] ohci-platform: OHCI generic platform driver
[    2.143676] do_one_initcall.923 fn=c091f5ac
[    2.147921] do_one_initcall.923 fn=c091f5bc
[    2.152316] do_one_initcall.923 fn=c091f654
[    2.156513] do_one_initcall.923 fn=c091f790
[    2.160691] do_one_initcall.923 fn=c091f79c
[    2.164868] do_one_initcall.923 fn=c091f7a8
[    2.169115] do_one_initcall.923 fn=c091f7c0
[    2.173459] do_one_initcall.923 fn=c091f7d0
[    2.177788] do_one_initcall.923 fn=c091f7e0
[    2.182005] do_one_initcall.923 fn=c091f984
[    2.186264] do_one_initcall.923 fn=c091f994
[    2.191143] sun6i-rtc 1f00000.rtc: registered as rtc0
[    2.196217] sun6i-rtc 1f00000.rtc: RTC enabled
[    2.200797] do_one_initcall.923 fn=c091fdac
[    2.205083] do_one_initcall.923 fn=c091fe7c
[    2.209278] i2c /dev entries driver
[    2.212792] do_one_initcall.923 fn=c091ff34
[    2.217147] sun8i-a33-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-ph not found, using dummy regulator
[    2.227619] do_one_initcall.923 fn=c091ff44
[    2.231893] do_one_initcall.923 fn=c091ff54
[    2.236116] do_one_initcall.923 fn=c091ff60
[    2.240293] do_one_initcall.923 fn=c091ff6c
[    2.244470] do_one_initcall.923 fn=c091ff78
[    2.248669] do_one_initcall.923 fn=c091ff84
[    2.252847] do_one_initcall.923 fn=c091ff90
[    2.257035] do_one_initcall.923 fn=c091ff9c
[    2.261212] do_one_initcall.923 fn=c091ffa8
[    2.265399] do_one_initcall.923 fn=c091ffb4
[    2.269576] do_one_initcall.923 fn=c091ffc0
[    2.273752] do_one_initcall.923 fn=c091ffcc
[    2.277940] do_one_initcall.923 fn=c091ffd8
[    2.282117] do_one_initcall.923 fn=c091ffe4
[    2.286303] do_one_initcall.923 fn=c091fff0
[    2.290480] do_one_initcall.923 fn=c091fffc
[    2.294657] do_one_initcall.923 fn=c0920008
[    2.298843] do_one_initcall.923 fn=c0920014
[    2.303024] do_one_initcall.923 fn=c0920020
[    2.307211] do_one_initcall.923 fn=c092002c
[    2.311388] do_one_initcall.923 fn=c0920038
[    2.315575] do_one_initcall.923 fn=c0920044
[    2.319752] do_one_initcall.923 fn=c0920050
[    2.323928] do_one_initcall.923 fn=c092005c
[    2.328115] do_one_initcall.923 fn=c0920068
[    2.332292] do_one_initcall.923 fn=c0920074
[    2.336479] do_one_initcall.923 fn=c0920080
[    2.340655] do_one_initcall.923 fn=c092008c
[    2.344831] do_one_initcall.923 fn=c0920098
[    2.349018] do_one_initcall.923 fn=c09200a4
[    2.353194] do_one_initcall.923 fn=c09200b0
[    2.357381] do_one_initcall.923 fn=c09200bc
[    2.361558] do_one_initcall.923 fn=c09200c8
[    2.365744] do_one_initcall.923 fn=c09200d4
[    2.369924] do_one_initcall.923 fn=c09200e0
[    2.374100] do_one_initcall.923 fn=c09200ec
[    2.378288] do_one_initcall.923 fn=c09200f8
[    2.382465] do_one_initcall.923 fn=c0920104
[    2.386652] do_one_initcall.923 fn=c0920110
[    2.390829] do_one_initcall.923 fn=c092011c
[    2.395005] do_one_initcall.923 fn=c0920128
[    2.399191] do_one_initcall.923 fn=c0920134
[    2.403368] do_one_initcall.923 fn=c0920140
[    2.407554] do_one_initcall.923 fn=c092014c
[    2.411731] do_one_initcall.923 fn=c0920158
[    2.415917] do_one_initcall.923 fn=c0920164
[    2.420094] do_one_initcall.923 fn=c0920170
[    2.424271] do_one_initcall.923 fn=c092017c
[    2.428458] do_one_initcall.923 fn=c0920188
[    2.432635] do_one_initcall.923 fn=c0920194
[    2.436825] do_one_initcall.923 fn=c09201a0
[    2.441002] do_one_initcall.923 fn=c09201ac
[    2.445178] do_one_initcall.923 fn=c09201b8
[    2.449365] do_one_initcall.923 fn=c09201c4
[    2.453542] do_one_initcall.923 fn=c09201d0
[    2.457728] do_one_initcall.923 fn=c09201dc
[    2.461905] do_one_initcall.923 fn=c09201e8
[    2.466091] do_one_initcall.923 fn=c09201f4
[    2.470268] do_one_initcall.923 fn=c0920200
[    2.474444] do_one_initcall.923 fn=c092020c
[    2.478632] do_one_initcall.923 fn=c0920218
[    2.482808] do_one_initcall.923 fn=c0920224
[    2.486995] do_one_initcall.923 fn=c0920230
[    2.491172] do_one_initcall.923 fn=c092023c
[    2.495348] do_one_initcall.923 fn=c0920248
[    2.499534] do_one_initcall.923 fn=c0920254
[    2.503714] do_one_initcall.923 fn=c0920260
[    2.507909] do_one_initcall.923 fn=c092026c
[    2.512086] do_one_initcall.923 fn=c0920278
[    2.516273] do_one_initcall.923 fn=c0920284
[    2.520450] do_one_initcall.923 fn=c0920290
[    2.524626] do_one_initcall.923 fn=c092029c
[    2.528813] do_one_initcall.923 fn=c09202a8
[    2.532990] do_one_initcall.923 fn=c09202b4
[    2.537176] do_one_initcall.923 fn=c09202c0
[    2.541353] do_one_initcall.923 fn=c09202cc
[    2.545539] do_one_initcall.923 fn=c09202d8
[    2.549716] do_one_initcall.923 fn=c09202e4
[    2.553892] do_one_initcall.923 fn=c09202f0
[    2.558078] do_one_initcall.923 fn=c09202fc
[    2.562255] do_one_initcall.923 fn=c0920308
[    2.566441] do_one_initcall.923 fn=c0920314
[    2.570622] do_one_initcall.923 fn=c0920320
[    2.574798] do_one_initcall.923 fn=c092032c
[    2.578986] do_one_initcall.923 fn=c0920338
[    2.583163] do_one_initcall.923 fn=c0920344
[    2.587349] do_one_initcall.923 fn=c0920350
[    2.591526] do_one_initcall.923 fn=c092035c
[    2.595712] do_one_initcall.923 fn=c0920368
[    2.599889] do_one_initcall.923 fn=c0920374
[    2.604065] do_one_initcall.923 fn=c0920380
[    2.608251] do_one_initcall.923 fn=c092038c
[    2.612428] do_one_initcall.923 fn=c0920398
[    2.616614] do_one_initcall.923 fn=c09203a4
[    2.620791] do_one_initcall.923 fn=c09203b0
[    2.624967] do_one_initcall.923 fn=c09203bc
[    2.629154] do_one_initcall.923 fn=c09203c8
[    2.633330] do_one_initcall.923 fn=c09203d4
[    2.637520] do_one_initcall.923 fn=c09203e0
[    2.641697] do_one_initcall.923 fn=c09203ec
[    2.645884] do_one_initcall.923 fn=c09203f8
[    2.650061] do_one_initcall.923 fn=c0920404
[    2.654237] do_one_initcall.923 fn=c0920410
[    2.658424] do_one_initcall.923 fn=c092041c
[    2.662601] do_one_initcall.923 fn=c0920428
[    2.666787] do_one_initcall.923 fn=c0920434
[    2.670964] do_one_initcall.923 fn=c0920440
[    2.675140] do_one_initcall.923 fn=c092044c
[    2.679326] do_one_initcall.923 fn=c0920458
[    2.683503] do_one_initcall.923 fn=c0920464
[    2.687689] do_one_initcall.923 fn=c0920470
[    2.691866] do_one_initcall.923 fn=c092047c
[    2.696052] do_one_initcall.923 fn=c0920488
[    2.700228] do_one_initcall.923 fn=c0920494
[    2.704408] do_one_initcall.923 fn=c09204a0
[    2.708595] do_one_initcall.923 fn=c09204ac
[    2.712772] do_one_initcall.923 fn=c09204b8
[    2.716959] do_one_initcall.923 fn=c09204c4
[    2.721136] do_one_initcall.923 fn=c09204d0
[    2.725312] do_one_initcall.923 fn=c09204dc
[    2.729498] do_one_initcall.923 fn=c09204e8
[    2.733675] do_one_initcall.923 fn=c09204f4
[    2.737862] do_one_initcall.923 fn=c0920500
[    2.742038] do_one_initcall.923 fn=c092050c
[    2.746224] do_one_initcall.923 fn=c0920518
[    2.750401] do_one_initcall.923 fn=c0920524
[    2.754577] do_one_initcall.923 fn=c0920530
[    2.758763] do_one_initcall.923 fn=c0920594
[    2.763078] do_one_initcall.923 fn=c0920748
[    2.767386] do_one_initcall.923 fn=c0920758
[    2.771661] do_one_initcall.923 fn=c0920768
[    2.775948] do_one_initcall.923 fn=c09211c0
[    2.780465] sunxi-wdt 1c20ca0.watchdog: Watchdog enabled (timeout=16 sec, nowayout=0)
[    2.788407] do_one_initcall.923 fn=c0921258
[    2.792633] do_one_initcall.923 fn=c0921268
[    2.798358] do_one_initcall.923 fn=c0921398
[    2.802738] do_one_initcall.923 fn=c09213a8
[    2.807044] do_one_initcall.923 fn=c09213b8
[    2.811280] do_one_initcall.923 fn=c09214b4
[    2.815705] do_one_initcall.923 fn=c0921510
[    2.820031] sun8i-a33-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pe not found, using dummy regulator
[    2.830300] do_one_initcall.923 fn=c0921520
[    2.834487] do_one_initcall.923 fn=c0921560
[    2.838688] do_one_initcall.923 fn=c0921a68
[    2.843063] sun4i-ss 1c15000.crypto-engine: Die ID 5
[    2.849576] do_one_initcall.923 fn=c0922ecc
[    2.853811] do_one_initcall.923 fn=c0922f20
[    2.858062] do_one_initcall.923 fn=c0922f38
[    2.862279] do_one_initcall.923 fn=c0922f50
[    2.866511] do_one_initcall.923 fn=c0922f68
[    2.870715] do_one_initcall.923 fn=c0922f80
[    2.874917] do_one_initcall.923 fn=c0922f98
[    2.879133] do_one_initcall.923 fn=c0922fb0
[    2.883336] do_one_initcall.923 fn=c0922fc8
[    2.887551] do_one_initcall.923 fn=c0922fe0
[    2.891756] do_one_initcall.923 fn=c0922ff8
[    2.895982] do_one_initcall.923 fn=c0923010
[    2.900196] do_one_initcall.923 fn=c0923028
[    2.904403] do_one_initcall.923 fn=c0923040
[    2.908621] do_one_initcall.923 fn=c0923058
[    2.912827] do_one_initcall.923 fn=c0923070
[    2.917070] usbcore: registered new interface driver usbhid
[    2.922632] usbhid: USB HID core driver
[    2.926473] do_one_initcall.923 fn=c09252a4
[    2.930669] do_one_initcall.923 fn=c0925350
[    2.934992] do_one_initcall.923 fn=c092536c
[    2.939409] do_one_initcall.923 fn=c09255b8
[    2.943794] do_one_initcall.923 fn=c09257c0
[    2.947997] do_one_initcall.923 fn=c092582c
[    2.952498] do_one_initcall.923 fn=c0925978
[    2.956902] do_one_initcall.923 fn=c09262e4
[    2.961163] do_one_initcall.923 fn=c092766c
[    2.965342] do_one_initcall.923 fn=c092776c
[    2.969695] do_one_initcall.923 fn=c09295a8
[    2.973877] do_one_initcall.923 fn=c0929744
[    2.978071] NET: Registered protocol family 17
[    2.982536] do_one_initcall.923 fn=c09297bc
[    2.986727] can: controller area network core (rev 20170425 abi 9)
[    2.992972] NET: Registered protocol family 29
[    2.997427] do_one_initcall.923 fn=c0929860
[    3.001602] can: raw protocol (rev 20170425)
[    3.005884] do_one_initcall.923 fn=c09298a8
[    3.010059] can: broadcast manager protocol (rev 20170425 t)
[    3.015728] do_one_initcall.923 fn=c0929900
[    3.019904] can: netlink gateway (rev 20190810) max_hops=1
[    3.025559] do_one_initcall.923 fn=c0929b84
[    3.029785] do_one_initcall.923 fn=c0929c44
[    3.034018] Key type dns_resolver registered
[    3.038449] do_one_initcall.923 fn=c0902d2c
[    3.042631] do_one_initcall.923 fn=c090485c
[    3.046827] Registering SWP/SWPB emulation handler
[    3.051613] do_one_initcall.923 fn=c011daf8
[    3.055824] do_one_initcall.923 fn=c09091dc
[    3.060010] do_one_initcall.923 fn=c09091b4
[    3.064197] do_one_initcall.923 fn=c09094d0
[    3.068391] do_one_initcall.923 fn=c09094a8
[    3.072574] do_one_initcall.923 fn=c090b150
[    3.076933] do_one_initcall.923 fn=c090b1d4
[    3.081123] do_one_initcall.923 fn=c090b60c
[    3.085305] do_one_initcall.923 fn=c090be00
[    3.089502] do_one_initcall.923 fn=c090d520
[    3.093687] do_one_initcall.923 fn=c0910224
[    3.097882] do_one_initcall.923 fn=c0911c6c
[    3.102059] do_one_initcall.923 fn=c0912230
[    3.106245] do_one_initcall.923 fn=c09154d0
[    3.110529] do_one_initcall.923 fn=c0915f78
[    3.114709] do_one_initcall.923 fn=c0917b34
[    3.126315] do_one_initcall.923 fn=c0470d2c
[    3.130821] sun8i-a33-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pd not found, using dummy regulator
[    3.143641] sun8i-a23-r-pinctrl 1f02c00.pinctrl: initialized sunXi PIO driver
[    3.152619] sun8i-a23-r-pinctrl 1f02c00.pinctrl: 1f02c00.pinctrl supply vcc-pl not found, using dummy regulator
[    3.163015] sunxi-rsb 1f03400.rsb: RSB running at 3000000 Hz
[    3.169092] axp20x-rsb sunxi-rsb-3a3: AXP20x variant AXP223 found
[    3.177792] input: axp20x-pek as /devices/platform/soc/1f03400.rsb/sunxi-rsb-3a3/axp221-pek/input/input0
[    3.187851] axp20x-adc axp22x-adc: DMA mask not set
[    3.193316] axp20x-battery-power-supply axp20x-battery-power-supply: DMA mask not set
[    3.201491] vcc-3v0: supplied by regulator-dummy
[    3.206485] vdd-sys: supplied by regulator-dummy
[    3.211344] vdd-cpu: supplied by regulator-dummy
[    3.216348] dcdc4: supplied by regulator-dummy
[    3.220908] vcc-dram: supplied by regulator-dummy
[    3.225957] dc1sw: supplied by vcc-3v0
[    3.229836] vdd-cpus: supplied by vcc-dram
[    3.234164] vcc-io: supplied by regulator-dummy
[    3.238979] vdd-dll: supplied by regulator-dummy
[    3.243844] vcc-pll-avcc: supplied by regulator-dummy
[    3.249200] vcc-1v2-hsic: Bringing 700000uV into 1200000-1200000uV
[    3.255607] vcc-1v2-hsic: supplied by regulator-dummy
[    3.260762] vcc-dsp: Bringing 700000uV into 3000000-3000000uV
[    3.266695] vcc-dsp: supplied by regulator-dummy
[    3.271431] eldo3: Bringing 700000uV into 3000000-3000000uV
[    3.277207] eldo3: supplied by regulator-dummy
[    3.281745] vcc-wifi0: Bringing 700000uV into 3300000-3300000uV
[    3.287743] vcc-wifi0: supplied by regulator-dummy
[    3.292779] vcc-wifi1: Bringing 700000uV into 3300000-3300000uV
[    3.298769] vcc-wifi1: supplied by regulator-dummy
[    3.303845] vcc-3v0-csi: Bringing 700000uV into 3000000-3000000uV
[    3.310126] vcc-3v0-csi: supplied by regulator-dummy
[    3.315342] dldo4: supplied by regulator-dummy
[    3.319929] rtc_ldo: supplied by regulator-dummy
[    3.324882] ldo_io0: supplied by regulator-dummy
[    3.329770] ldo_io1: supplied by regulator-dummy
[    3.334610] usb0-vbus: supplied by vcc5v0
[    3.339065] axp20x-ac-power-supply axp20x-ac-power-supply: DMA mask not set
[    3.346376] axp20x-usb-power-supply axp20x-usb-power-supply: DMA mask not set
[    3.354600] axp20x-rsb sunxi-rsb-3a3: AXP20X driver loaded
[    3.361237] ehci-platform 1c1a000.usb: EHCI Host Controller
[    3.366880] ehci-platform 1c1a000.usb: new USB bus registered, assigned bus number 1
[    3.375201] ehci-platform 1c1a000.usb: irq 26, io mem 0x01c1a000
[    3.405396] ehci-platform 1c1a000.usb: USB 2.0 started, EHCI 1.00
[    3.412269] hub 1-0:1.0: USB hub found
[    3.416077] hub 1-0:1.0: 1 port detected
[    3.420767] ohci-platform 1c1a400.usb: Generic Platform OHCI controller
[    3.427418] ohci-platform 1c1a400.usb: new USB bus registered, assigned bus number 2
[    3.435449] ohci-platform 1c1a400.usb: irq 27, io mem 0x01c1a400
[    3.510036] hub 2-0:1.0: USB hub found
[    3.513825] hub 2-0:1.0: 1 port detected
[    3.518620] usb_phy_generic usb_phy_generic.1.auto: usb_phy_generic.1.auto supply vcc not found, using dummy regulator
[    3.529768] musb-hdrc musb-hdrc.2.auto: MUSB HDRC host driver
[    3.535547] musb-hdrc musb-hdrc.2.auto: new USB bus registered, assigned bus number 3
[    3.544162] hub 3-0:1.0: USB hub found
[    3.547964] hub 3-0:1.0: 1 port detected
[    3.553229] input: 1c22800.lradc as /devices/platform/soc/1c22800.lradc/input/input1
[    3.561252] do_one_initcall.923 fn=c091f7f0
[    3.565495] sun6i-rtc 1f00000.rtc: setting system clock to 1970-01-01T00:00:55 UTC (55)
[    3.573487] do_one_initcall.923 fn=c0923248
[    3.577817] do_one_initcall.923 fn=c0926d2c
[    3.581998] do_one_initcall.923 fn=c0928478
[    3.586208] do_one_initcall.923 fn=c03d263c
[    3.590486] do_one_initcall.923 fn=c091b0d8
[    3.594668] do_one_initcall.923 fn=c0925988
[    3.598856] ALSA device list:
[    3.601824]   No soundcards found.
[    3.605955] Waiting for root device /dev/mtdblock7...
[   33.755403] vcc3v0: disabling
[   33.758373] vcc3v3: disabling
[   33.761337] vcc5v0: disabling
[   33.764309] dc1sw: disabling

U-Boot(SPL) SPL 2023.10-rc2-g8ba06ef2-dirty (Sep 12 2023 - 14:49:02 +0800)
DRAM: 128 MiB
Trying to boot from FEL


U-Boot 2023.10-rc2-g8ba06ef2-dirty (Sep 12 2023 - 14:49:02 +0800) Allwinner Technology

CPU:   Allwinner A33 (SUN8I 1667)
Model: Allwinner R16 EVB (Parrot)
DRAM:  128 MiB
Core:  26 devices, 18 uclasses, devicetree: separate
WDT:   Not starting watchdog@1c20ca0
NAND:  128 MiB
Loading Environment from NAND... *** Warning - bad CRC, using default environment

Loading Environment from NAND... *** Warning - bad CRC, using default environment

In:    serial,usbkbd
Out:   serial
Err:   serial
Allwinner mUSB OTG (Peripheral)
Net:   using musb-hdrc, OUT ep1out IN ep1in STATUS ep2in
MAC de:ad:be:ef:00:01
HOST MAC de:ad:be:ef:00:00
RNDIS ready
eth0: usb_ether
starting USB...
Bus usb@1c1a000: USB EHCI 1.00
Bus usb@1c1a400: USB OHCI 1.0
scanning bus usb@1c1a000 for devices... 1 USB Device(s) found
scanning bus usb@1c1a400 for devices... 1 USB Device(s) found
       scanning usb for storage devices... 0 Storage Device(s) found
Hit any key to stop autoboot:  0
musb-hdrc: peripheral reset irq lost!
Starting download of 4377528 bytes
.................................
downloading of 4377528 bytes finished
Flashing image at offset 0x1420000
download kernel iamge addr:0x40008000 len:4377528
Starting download of 23769 bytes

downloading of 23769 bytes finished
Flashing image at offset 0x1420000
download dtb iamge addr:0x41000000 len:23769
status: -108 ep 'ep1in' trans: 4
## Booting kernel from Legacy Image at 40008000 ...
   Image Name:   ARM OpenWrt Linux-5.4.61
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    4377464 Bytes = 4.2 MiB
   Load Address: 40008000
   Entry Point:  40008000
   Verifying Checksum ... OK
   Working FDT set to 41000000
   Loading Kernel Image
   Loading Device Tree to 40f2c000, end 40f34cd8 ... OK
   Working FDT set to 40f2c000
Using machid 4137 from environment

Starting kernel ...

前面部分是启用MTD设备但是没有启用Raw/Parallel Nand device support的,可以执行到wait for xxx,后面部分是启用了Raw/Parallel Nand device support的,直接就死掉了。

#34 Re: 全志 SOC » [小爱mini音响 R16 ] 配置MTD时死机 » 2023-09-13 09:49:35

哇酷小二 说:

看下前面有没有生成 mtdX 设备?

没有注意,但是应该不会有,因为我的设备就只有nand,在没有启用MTD的情况下,应该不会有设备吧

#35 Re: 全志 SOC » [小爱mini音响 R16 ] 重新烧录tina-linux 系统 » 2023-09-13 09:48:38

anuoplus 说:

和原厂烧录固件是一样的吗?

主线Linux,自己编译。

#36 全志 SOC » [小爱mini音响 R16 ] 配置MTD时死机 » 2023-09-12 23:09:15

muxi01
回复: 6

kernel配置一旦启用Raw/Parallel Nand device support ,开机就卡死在starting kernel....
否则,就waiting for root device /dev/mtdblock7...
请教一下,接下来该怎么调试?

#37 Re: 全志 SOC » allwinner H3 NAND FLASH调试 » 2023-08-22 18:26:03

调试过了没,有源码吗?一起调?

#38 Re: 全志 SOC » [小爱mini音响 R16 ] 重新烧录tina-linux 系统 » 2023-07-23 12:32:22

驱动下载好像有点问题,后续重新编辑一下。

#39 全志 SOC » [小爱mini音响 R16 ] 重新烧录tina-linux 系统 » 2023-07-23 12:30:41

muxi01
回复: 4

0.拆机飞线图
图1
图2

1.代码拉取(参考:https://www.bilibili.com/read/cv17374238?spm_id_from=333.999.0.0)
1.0 编译环境要求(最好是ubuntu16.04, ubuntu16.04 往后的版本,编译过程中各种问题,解决很耗时间,再装一个ubuntu16比较省事)
1.1安装依赖环境:

apt-get install git zlib1g-dev libexpat1-dev python texinfo build-essential unzip libssl-dev libxml-simple-perl libxml-sax-perl libxml2-dev libxml2-utils xsltproc wget bc ccache libc6-dev-i386 lib32ncurses5-dev lib32z1-dev gnupg cpio vim curl gawk busybox

1.2 下载repo工具

./repo init -u https://github.com/tinalinux/manifest -b r16-v2.1.y -m r16/v2.1.y.xml
./repo sync
./repo start r16-v2.1.y --all

1.3 参考中的 uboot 部分不需要下载,我们只烧录rootfs1 kernel1 两个分区

2.编译 tina-linux

export FORCE_UNSAFE_CONFIGURE=1
source build/envsetup.sh 
lunch astar_parrot-tina 
make menuconfig 
make 

3.配置linux

croot 
make kernel-menuconfig

4.输出文件在 out/astar-parrot 下

astar-parrot-uImage  compile_dir  md5sums   rootfs.img  staging_dir  tina_astar-arrot_uart0.img boot.img   image  packages  sha256sums  tina_astar-parrot_card0.img

5. take.rootfs.kernel1.sh kernal 镜像打包、ROOTFS拷贝,执行完成后拷贝到d://xiaoai/

#!/bin/bash
if [ "1" = "$1" ] ; then
        if [ -e "./astar-parrot/rootfs.img" ] ; then
                cp -rf ./astar-parrot/rootfs.img /mnt/d/xiaoai && echo "copy rootfs.img to xiaoai"
        else
                echo "please make root image"
        fi
elif [ -f "./astar-parrot/astar-parrot-uImage" ] ; then
        if [ -e "./kernel.img" ] ; then
                echo "1.rm kernel.img"
                rm -rf kernel.img
        fi
        if [ -e "./kernel" ] ; then
                echo "2.skip mkdir kernel "
        else
                echo "2.mkdir ./kernel"
                mkdir ./kernel
        fi
        dd if=/dev/zero of=./kernel.img bs=1024 count=6144 && echo "3.create kernel.img"
        mkfs.fat ./kernel.img   && echo "4.mkfs kernel.img"
        mount -t vfat  ./kernel.img   ./kernel  && echo "5.mount kernel.img"
        cp -r ./astar-parrot/astar-parrot-uImage ./kernel/uimage && echo "6.cp uimage to kernel.img"
        umount ./kernel && echo "7.umount kernel"

        cp -rf ./kernel.img /mnt/d/xiaoai && echo "8.fat is contain of uimage...."


else
        echo "please make kernel image!!!"
fi

6.安装adb fastboot 驱动
下载驱动文件,把名字修修改为 xxx.exe 后安装 或者百度9008免签名驱动 把,链接资源有问题

7.烧录
1.打开串口,按住s键不松手,等待小爱上电
2.把小爱USB插入PC
3.fastboot_test 开启fastboot 模式

8.刷机脚本 fastboot.burnning.sh(我本地安装的是git_bash)

#!/bin/bash

if [ "$1" = "r" ] ; then
	fastboot erase rootfs1 && fastboot flash rootfs1  rootfs.img
	fastboot reboot
elif [ "$1" = "k" ] ; then 
	fastboot erase kernel1 && fastboot flash kernel1 kernel.img
	fastboot reboot
else
	fastboot erase rootfs1 && fastboot flash rootfs1  rootfs.img
	fastboot erase kernel1 && fastboot flash kernel1 kernel.img
	fastboot reboot
fi

9.nand驱动修改: tina-linux/lichee/linux-3.4/drivers/block/nand/sun8iw5p1/lib/src/physic/nand_id.c
在nand_id.c 中 struct __NandPhyInfoPar_t SamsungNandTbl[] 结构体内,替换原来的
chip_id ={0xec, 0xf1, 0x00, 0x95, 0xff, 0xff, 0xff, 0xff },的内容。

    { {0xec, 0xf1, 0x00, 0x95, 0xff, 0xff, 0xff, 0xff }, 1,     4,      64,     1024,   0x4000008c,   896,    30,     0,       0,        0,     &PhysicArchiPara0, &DefDDRInfo,  0x000001 ,20000},   // K9F1G08  FS33NDO01GS10

10.运行结果
图1


11.请问一下小爱mini使用的 WIFI BT芯片具体型号。
https://blog.csdn.net/github_38345754/article/details/108697710/]这里可以看出大概是bcm43438,但是不肯定

#40 Re: 技术人生/软件使用技巧/破解经验/技术吐槽/灌水 » windows 平台FFMPEG 直接推流,哔哩哔哩(bilibili)开视频直播 » 2023-06-06 11:03:22

资本家大善人 说:

@muxi01
高通410 wifi棒子?
我已经用它推流直播了😂
【wifi棒B站24h推流测试-哔哩哔哩直播】 https://b23.tv/XG4CODS

有直播内容吗?没有版权的那种?

#41 Re: 技术人生/软件使用技巧/破解经验/技术吐槽/灌水 » windows 平台FFMPEG 直接推流,哔哩哔哩(bilibili)开视频直播 » 2023-05-31 18:04:43

哇酷小二 说:
muxi01 说:

你没有内容,基本不可能赚到钱

计划DIY一个 D1芯片哪吒开发板直播机,有点忙,延误了。

我买了几个随身WiFi棒子,刷debian来推流。但是没有内容可推,也就玩玩。D1芯片应该只能推720或者更低像素的视频吧。

#43 Re: 全志 SOC » F1C100s用DMA加速spiflash启动 » 2021-03-09 10:42:39

666.楼主可以直接在原来的基础上打个补丁就行,把补丁发布出来。

#44 Re: 全志 SOC » [R3 nand] USB wifi RTL8188EUS 驱动移植<暂时不以package的方式加入> » 2020-12-11 18:02:44

有时间了,再发布一个以package方式的驱动移植,完善脚本。

#45 全志 SOC » [R3 nand] USB wifi RTL8188EUS 驱动移植<暂时不以package的方式加入> » 2020-12-11 18:00:43

muxi01
回复: 4

1.修改设备树  /board/widora/mangopi/r3/devicetree/linux/devicetree.dts

&usb_otg {
        dr_mode = "host"; /* host peripheral */
        status = "okay";
};

2.下载驱动源码https://codeload.github.com/aircrack-ng/rtl8188eus/zip/v5.3.9
解压后拷贝到 /output/build/linux-5.4.66/drivers/net/wireless/realtek/rtl8188eus
2.1修改/output/build/linux-5.4.66/drivers/net/wireless/realte/Kconfig,加入

source "drivers/net/wireless/realtek/rtl8188eus/Kconfig"

2.2修改/output/build/linux-5.4.66/drivers/net/wireless/realte/Makefile,加入

obj-$(CONFIG_RTL8188EU)         += rtl8188eus/

2.3修改 rtl8188eus/include/osdep_service_bsd.h,第120行改为

#define LINUX_VERSION_CODE KERNEL_VERSION(5, 4, 66)

3.加入wpa_supplicant工具

make menuconfig
localtion
	->Target pckages
		->Networking applications
			[*] wpa_supplicant

4.make linux-menuconfig 配置网络

localtion
	 -*-   Wireless  --->
		<*>   cfg80211 - wireless configuration API
		[*]   support CRDA     
		[*]   cfg80211 wireless extensions compatibility 
		<*>   Generic IEEE 802.11 Networking Stack (mac80211)
        [*]   Minstrel
	[*] Networking support  ---> 
		 <*>   RF switch subsystem support  ---> 
	->Device Drivers
		[*]   Network device support  ---> 
			[*]   Network core driver support
			<*>   IEEE 802.1AE MAC-level encryption (MACsec)
  			 [*]  Wireless LAN  ---> 
				[*]   mac80211-based legacy WDS support
				[*]   Ralink devices 
				<*>   Ralink driver support  --->
					[*]   Realtek devices
					<M>   Realtek 8188E USB WiFi
					
		[*] USB support  --->
			<*>   Support for Host-side USB	 
			*** USB Host Controller Drivers *** 
			<*>   EHCI HCD (USB 2.0) support
			<*>   Generic EHCI driver for a platform device 
			<*>   OHCI HCD (USB 1.1) support
			<*>   Generic OHCI driver for a platform device
			       MUSB Mode Selection (Host only mode)  ---> #别错过这里,否则USB模式可能会出错
			<*>   Inventra Highspeed Dual Role Controller
			<*>   ChipIdea Highspeed Dual Role Controller
			[*]   ChipIdea host controller
			

5.编译,刷机。

6.安装驱动,启动网卡,创建运行需要的临时文件夹

	insmod ./lib/modules/5.4.66/kernel/drivers/net/wireless/realtek/rtl8188eus/8188eu.ko
	ifconfig wlan0 up
	mkdir -p /var/run/wpa_supplicant

7.新建配置文件 /etc/wpa_supplicant/wpa_supplicant.conf

ctrl_interface=/var/run/wpa_supplicant
ap_scan=1
network={
	ssid="mishare"  #wifi名字
	psk="qwer1234" #wifi密码
}

8.链接网络

	wpa_supplicant -B -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf

9.配置IP地址<暂时没有使用udhcpc工具>

ifconfig wlan0 192.168.137.202

#46 全志 SOC » [R3 nand]tinyplay 的使用方法 » 2020-12-09 18:35:20

muxi01
回复: 0

1.tinymix 打开耳放通道

tinymix set 3 1
tinymix set 1 63

2.查看配置

# tinymix contents
Number of controls: 25
ctl     type    num     name                                    value
0       INT     1       DAC Playback Volume                     63 (range 0->63)
1       INT     1       Headphone Playback Volume               63 (range 0->63)
2       BOOL    2       Headphone Playback Switch               On, On
3       INT     1       Line In Playback Volume                 0 (range 0->7)
4       INT     1       FM In Playback Volume                   0 (range 0->7)
5       INT     1       Mic In Playback Volume                  3 (range 0->7)
6       INT     1       Mic Boost Volume                        4 (range 0->7)
7       INT     1       ADC Capture Volume                      3 (range 0->7)
8       BOOL    1       ADC Mixer Right Out Capture Switch      On
9       BOOL    1       ADC Mixer Left Out Capture Switch       Off
10      BOOL    1       ADC Mixer Line In Capture Switch        Off
11      BOOL    1       ADC Mixer Right FM In Capture Switch    Off
12      BOOL    1       ADC Mixer Left FM In Capture Switch     Off
13      BOOL    1       ADC Mixer Mic Capture Switch            Off
14      BOOL    1       Left Mixer Right DAC Playback Switch    On
15      BOOL    1       Left Mixer Left DAC Playback Switch     Off
16      BOOL    1       Left Mixer FM In Playback Switch        Off
17      BOOL    1       Left Mixer Line In Playback Switch      Off
18      BOOL    1       Left Mixer Mic In Playback Switch       Off
19      BOOL    1       Right Mixer Left DAC Playback Switch    On
20      BOOL    1       Right Mixer Right DAC Playback Switch   Off
21      BOOL    1       Right Mixer FM In Playback Switch       Off
22      BOOL    1       Right Mixer Line In Playback Switch     Off
23      BOOL    1       Right Mixer Mic In Playback Switch      Off
24      ENUM    2       Headphone Source Playback Route         , DACMixer, , DACMixer

3.tinyplay 播放

tinyplay startup.wav

#47 全志 SOC » [R3 nand]tinyplay 的使用方法 » 2020-12-09 18:34:53

muxi01
回复: 0

1.tinymix 打开播放器通道

tinymix set 3 1
tinymix set 1 63

2.查看配置

# tinymix contents
Number of controls: 25
ctl     type    num     name                                    value
0       INT     1       DAC Playback Volume                     63 (range 0->63)
1       INT     1       Headphone Playback Volume               63 (range 0->63)
2       BOOL    2       Headphone Playback Switch               On, On
3       INT     1       Line In Playback Volume                 0 (range 0->7)
4       INT     1       FM In Playback Volume                   0 (range 0->7)
5       INT     1       Mic In Playback Volume                  3 (range 0->7)
6       INT     1       Mic Boost Volume                        4 (range 0->7)
7       INT     1       ADC Capture Volume                      3 (range 0->7)
8       BOOL    1       ADC Mixer Right Out Capture Switch      On
9       BOOL    1       ADC Mixer Left Out Capture Switch       Off
10      BOOL    1       ADC Mixer Line In Capture Switch        Off
11      BOOL    1       ADC Mixer Right FM In Capture Switch    Off
12      BOOL    1       ADC Mixer Left FM In Capture Switch     Off
13      BOOL    1       ADC Mixer Mic Capture Switch            Off
14      BOOL    1       Left Mixer Right DAC Playback Switch    On
15      BOOL    1       Left Mixer Left DAC Playback Switch     Off
16      BOOL    1       Left Mixer FM In Playback Switch        Off
17      BOOL    1       Left Mixer Line In Playback Switch      Off
18      BOOL    1       Left Mixer Mic In Playback Switch       Off
19      BOOL    1       Right Mixer Left DAC Playback Switch    On
20      BOOL    1       Right Mixer Right DAC Playback Switch   Off
21      BOOL    1       Right Mixer FM In Playback Switch       Off
22      BOOL    1       Right Mixer Line In Playback Switch     Off
23      BOOL    1       Right Mixer Mic In Playback Switch      Off
24      ENUM    2       Headphone Source Playback Route         , DACMixer, , DACMixer

3.tinyplay 播放

tinyplay startup.wav

#48 全志 SOC » [R3 nand]dropbear的使用 » 2020-12-09 16:38:57

muxi01
回复: 0

1.make linux-menuconfig使能pty字符型设备,使能RNDIS设备

Location: 
  -> Device Drivers
       -> Character devices
            [ ]   Unix98 PTY support 取消掉这个
            [*]   Legacy (BSD) PTY support   使用这个
            (5)     Maximum number of legacy PTY in use   

  ->Device Drivers 
         -> USB support 
         -> USB Gadget Support
          <M>   USB Gadget functions configurable through configfs
                  [*]     Network Control Model (CDC NCM)
                  [*]     Ethernet Control Model (CDC ECM)
                  [*]     Ethernet Control Model (CDC ECM) subset
                  [*]     RNDIS 
                  [*]     Ethernet Emulation Model (EEM)
          <M>   USB Gadget precomposed configurations   
          <M>     Ethernet Gadget (with CDC Ethernet support) 
           [*]       RNDIS support 
          <M>     CDC Composite Device (Ethernet and ACM) 
           <M>     CDC Composite Device (ACM and mass storage

2.修改pacakge\dropbear\dropbear.mk,屏蔽掉如下内容,否则无法创建dropbear文件夹

#ln -snf /var/run/dropbear $(TARGET_DIR)/etc/dropbear

3.替换S50dropbear

#!/bin/sh
#
# Starts dropbear sshd.
#

# Allow a few customizations from a config file
test -r /etc/default/dropbear && . /etc/default/dropbear

start() {
	DROPBEAR_ARGS="$DROPBEAR_ARGS -r /etc/dropbear/dropbear_rsa_host_key"

	# If /etc/dropbear is a symlink to /var/run/dropbear, and
	#   - the filesystem is RO (i.e. we can not rm the symlink),
	#     create the directory pointed to by the symlink.
	#   - the filesystem is RW (i.e. we can rm the symlink),
	#     replace the symlink with an actual directory

	if [ -L /etc/dropbear \
	     -a "$(readlink /etc/dropbear)" = "/var/run/dropbear" ]
	then
		if rm -f /etc/dropbear >/dev/null 2>&1; then
			mkdir -p /etc/dropbear
		else
			echo "No persistent location to store SSH host keys. New keys will be"
			echo "generated at each boot. Are you sure this is what you want to do?"
			mkdir -p "$(readlink /etc/dropbear)"
		fi
	else
		if [ ! -d /etc/dropbear ]; then
			mkdir -p /etc/dropbear
		fi
		if [ ! -e /etc/dropbear/dropbear_rsa_host_key ]; then
			/usr/bin/dropbearkey -t rsa -f /etc/dropbear/dropbear_rsa_host_key
		fi
	fi

	printf "Starting dropbear sshd: "
	umask 077

	start-stop-daemon -S -q -p /var/run/dropbear.pid \
		--exec /usr/sbin/dropbear -- $DROPBEAR_ARGS
	[ $? = 0 ] && echo "OK" || echo "FAIL"
}
stop() {
	printf "Stopping dropbear sshd: "
	start-stop-daemon -K -q -p /var/run/dropbear.pid
	[ $? = 0 ] && echo "OK" || echo "FAIL"
}
restart() {
	stop
	start
}

case "$1" in
  start)
  	start
	;;
  stop)
  	stop
	;;
  restart|reload)
  	restart
	;;
  *)
	echo "Usage: $0 {start|stop|restart}"
	exit 1
esac

exit $?

4.make menuconfig 使能dropbear

location
  ->Target packages
      -> networking applications
        [*]  dropbear

6.usb网卡启动脚本S40network  拷贝到./widora/mangopi/r3/rootfs/etc/init.d/S40network

#!/bin/sh
#
# Start the network....
#

# Debian ifupdown needs the /run/network lock directory
mkdir -p /run/network

installRNDIS()
{
        modprobe g_ether
        if [ $? -eq 0 ]
        then
                /sbin/ifconfig usb0 up
                /sbin/ifconfig usb0 '192.168.5.100'
                [ $? = 0 ] && echo 'Starting network: OK' || echo "Starting network:FAIL"
        else
                echo 'failed to install RNDIS(ethernet over usb)'
        fi
}

case "$1" in
  start)
        installRNDIS
        # printf "Starting network: "
        # /sbin/ifup -a
        # [ $? = 0 ] && echo "OK" || echo "FAIL"
        ;;
  stop)
        printf "Stopping network: "
        /sbin/ifdown -a
        [ $? = 0 ] && echo "OK" || echo "FAIL"
        ;;
  restart|reload)
        "$0" stop
        "$0" start
        ;;
  *)
        echo "Usage: $0 {start|stop|restart}"
        exit 1
esac

exit $?

7.编译
编译完成后output/target下会多出很多ko文件,find -name *.ko来查看

./lib/modules/5.4.66/kernel/drivers/input/touchscreen/goodix.ko
./lib/modules/5.4.66/kernel/drivers/input/touchscreen/tsc2007.ko
./lib/modules/5.4.66/kernel/drivers/media/i2c/ov5640.ko
./lib/modules/5.4.66/kernel/drivers/media/i2c/ov2640.ko
./lib/modules/5.4.66/kernel/drivers/usb/gadget/function/usb_f_eem.ko
./lib/modules/5.4.66/kernel/drivers/usb/gadget/function/u_serial.ko
./lib/modules/5.4.66/kernel/drivers/usb/gadget/function/usb_f_obex.ko
./lib/modules/5.4.66/kernel/drivers/usb/gadget/function/usb_f_ecm_subset.ko
./lib/modules/5.4.66/kernel/drivers/usb/gadget/function/usb_f_rndis.ko
./lib/modules/5.4.66/kernel/drivers/usb/gadget/function/u_ether.ko
./lib/modules/5.4.66/kernel/drivers/usb/gadget/function/usb_f_acm.ko
./lib/modules/5.4.66/kernel/drivers/usb/gadget/function/usb_f_ss_lb.ko
./lib/modules/5.4.66/kernel/drivers/usb/gadget/function/usb_f_serial.ko
./lib/modules/5.4.66/kernel/drivers/usb/gadget/function/usb_f_ecm.ko
./lib/modules/5.4.66/kernel/drivers/usb/gadget/function/usb_f_fs.ko
./lib/modules/5.4.66/kernel/drivers/usb/gadget/function/usb_f_ncm.ko
./lib/modules/5.4.66/kernel/drivers/usb/gadget/function/usb_f_mass_storage.ko
./lib/modules/5.4.66/kernel/drivers/usb/gadget/legacy/g_cdc.ko
./lib/modules/5.4.66/kernel/drivers/usb/gadget/legacy/g_acm_ms.ko
./lib/modules/5.4.66/kernel/drivers/usb/gadget/legacy/g_serial.ko
./lib/modules/5.4.66/kernel/drivers/usb/gadget/legacy/gadgetfs.ko
./lib/modules/5.4.66/kernel/drivers/usb/gadget/legacy/g_mass_storage.ko
./lib/modules/5.4.66/kernel/drivers/usb/gadget/legacy/g_ether.ko
./lib/modules/5.4.66/kernel/drivers/usb/gadget/libcomposite.ko

8.驱动安装,压缩包里面有readme文件 https://download.csdn.net/download/Seeker_ZeroOne/13087112

9.驱动安装完成后,需要在控制面板\网络和 Internet\网络连接 中修改RNDIS网卡的IP为 :192.168.5.xxx

#49 全志 SOC » [R3 nand]tinycap 的使用方法 » 2020-12-08 10:01:52

muxi01
回复: 1

1.tinymix 查看控制器状态

tinymix contents
Number of controls: 25
ctl     type    num     name                                    value
0       INT     1       DAC Playback Volume                     63 (range 0->63)
1       INT     1       Headphone Playback Volume               0 (range 0->63)
2       BOOL    2       Headphone Playback Switch               Off, Off
3       INT     1       Line In Playback Volume                 0 (range 0->7)
4       INT     1       FM In Playback Volume                   0 (range 0->7)
5       INT     1       Mic In Playback Volume                  3 (range 0->7)
6       INT     1       Mic Boost Volume                        4 (range 0->7)
7       INT     1       ADC Capture Volume                      3 (range 0->7)
8       BOOL    1       ADC Mixer Right Out Capture Switch      Off
9       BOOL    1       ADC Mixer Left Out Capture Switch       Off
10      BOOL    1       ADC Mixer Line In Capture Switch        Off
11      BOOL    1       ADC Mixer Right FM In Capture Switch    Off
12      BOOL    1       ADC Mixer Left FM In Capture Switch     Off
13      BOOL    1       ADC Mixer Mic Capture Switch            Off
14      BOOL    1       Left Mixer Right DAC Playback Switch    Off
15      BOOL    1       Left Mixer Left DAC Playback Switch     Off
16      BOOL    1       Left Mixer FM In Playback Switch        Off
17      BOOL    1       Left Mixer Line In Playback Switch      Off
18      BOOL    1       Left Mixer Mic In Playback Switch       Off
19      BOOL    1       Right Mixer Left DAC Playback Switch    Off
20      BOOL    1       Right Mixer Right DAC Playback Switch   Off
21      BOOL    1       Right Mixer FM In Playback Switch       Off
22      BOOL    1       Right Mixer Line In Playback Switch     Off
23      BOOL    1       Right Mixer Mic In Playback Switch      Off 

2.打开控制器为13的 capture设备

 tinymix set 13 1 

3.录音

 tinycap xixi.wav -t 2 

#50 全志 SOC » [R3 nand] 模拟U盘的方法 » 2020-10-26 22:39:45

muxi01
回复: 0

make linux-menuconfig配置如下:
U盘_20201026-2203.jpg
Jietu20201024-182831.jpg
Jietu20201024-220529.jpg
USB_20201026-2236.jpg
启用U盘shell指令如下:
dd if=/dev/zero of=udisk.img bs=1M count=5
insmod  ./lib/modules/5.4.66/kernel/drivers/usb/gadget/libcomposite.ko
insmod ./lib/modules/5.4.66/kernel/drivers/usb/gadget/function/usb_f_mass_storage.ko
insmod ./lib/modules/5.4.66/kernel/drivers/usb/gadget/legacy/gadgetfs.ko
insmod  ./lib/modules/5.4.66/kernel/drivers/usb/gadget/legacy/g_mass_storage.ko  file=/udisk.img removable=1
遇到的问题:增加图4的配置即可
udc-core: couldn't find an available UDC - added [g_mass_storage] to list of pending drivers
成功连到电脑:
Jietu20201024-224823.jpg

#51 Re: 全志 SOC » [R3 nand] DFU烧录方法 » 2020-10-24 22:43:47

editing dfu_wait_timeout  ,书写错误,正确的是:editenv  dfu_wait_timeout

#52 全志 SOC » [R3 nand] DFU烧录方法 » 2020-10-24 15:53:32

muxi01
回复: 1

1.进入fel模式
    按住复位 + boot,依次先后释放开复位,boot ,此时PC端会出现新的设备,WIN需要装驱动(https://widora.io/_media/zh/zadig-2_3_exe.7z),我的是MAC+ubuntu组合不需要安装驱动

2.执行dfu_nand-all.sh

3. 执行fel-uboot.sh
   正常情况下可以完成刷机,win可能缺少驱动,而失败,此时需要修改 dfu_wait_timeout
   R3 运行bootloader,Ctrl+C强制打断,editing dfu_wait_timeout ,修改为1000,然后运行run dfu_nand, 然后安装驱动(https://widora.io/_media/zh/zadig-2_3_exe.7z)。不出意外会顺利完成刷机。

#53 全志 SOC » [R3 nand 版本] waiting for dev/mtdblock3的解决方法 » 2020-10-24 15:39:05

muxi01
回复: 1

1.新增对设备的支持
linux系统中,修改linux-5.xx/driver/mtd/nand/spi/winbond.c  第95行 加入如下代码:
     SPINAND_INFO("GD51FGQ", 0x9F,
                     NAND_MEMORG(1, 2048, 64, 64, 1024, 20, 1, 1, 1),
                     NAND_ECCREQ(1, 512),
                     SPINAND_INFO_OP_VARIANTS(&read_cache_variants,
                                              &write_cache_variants,
                                              &update_cache_variants),
                     0,
                     SPINAND_ECCINFO(&w25m02gv_ooblayout, NULL)),
2.使能设备树 nand设备 board/widora/mangopi/r3/devicetree/linux/devicetree.dts
spi-nor@0 {
        #address-cells = <1>;
        #size-cells = <1>;
        compatible = "winbond,w25q128", "jedec,spi-nor";
        reg = <0>;
        spi-max-frequency = <50000000>;
        status = "disabled"; //这里是新增的
             ......
     spi-nand@0 {
        #address-cells = <1>;
        #size-cells = <1>;
        compatible = "spi-nand";
        reg = <0>;
        spi-max-frequency = <50000000>;
        status = "okay";  //默认是disabled,
.....

执行: rebuild-kernel.sh 即可

页脚

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

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