您尚未登录。

#1 Re: 全志 SOC » 请问 AVR的 ATTINY10 这个单片机 可以用什么烧录? » 2025-06-22 15:03:01

淘宝上买CH347,烧写速度很快,价格便宜。
配套github开源软件:asprogrammer-dregmod-v3.17

#3 Re: 全志 SOC » 请问 AVR的 ATTINY10 这个单片机 可以用什么烧录? » 2025-06-21 10:32:54

淘宝上有 CH341烧录线,配合 NeoProgrammer 可以实现可编程的编程器。

#4 Re: 计算机图形/GUI/RTOS/FileSystem/OpenGL/DirectX/SDL2 » cmake编译 lvgl » 2025-06-18 11:31:04

A5F25C8AAE1D6C4A01029CDE1C7BE9D7.png


cmake -G "MinGW Makefiles" -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++

mingw32-make

#6 Re: 全志 SOC » A733烧录Android15后不能启动 » 2025-06-08 10:55:26

......


[464]HELLO! BOOT0 is starting!
[467]BOOT0 commit : {f11f8d34}
[473]PMU: AXP8191
[475]pmu_chip_id = 14
[477]set pll start
[479]cpul clk 0xf8802700!
[483]cpub clk 0xf8802700!
[486]dsu clk 0xf8801e00!
[489]set pll end
[491]dram return write ok
[494]board init ok
[495]rtc[3] value = 0xb00f
[498]rtc[7] value = 0x2
[500]enable_jtag
[502]Driver version 0.0.9 2024.11.20 10:19
[522]Cal words efuse addr 0x60 value 0xa8830000, addr 0x64 value 0x4f1f9b62
[579]Device  up at:[581][RX, TX]: gear=[4, 4], lane[2, 2], pwr[FAST MODE, FAST MODE], rate = 2
[588]sc st 2
[590]Read blk size 4096,capacity 31240191
[594]DRAM BOOT DRIVE INFO: V0.581_optim_mode1
[600]DRAM_VCC set to 560 mv
[602]DRAM CLK =2400 MHZ
[605]DRAM Type =9 (8:LPDDR4,9:LPDDR5)
[703]Training result is = 7
[705]DRAM Pstate 1 training, frequency is 1200 Mhz
[808]Training result is = 7
[811]DRAM Pstate 2 training, frequency is 800 Mhz
[999]Training result is = 7
[1002]DRAM Pstate 3 training, frequency is 400 Mhz
[1055]Training result is = 7
[1058]DRAM Pstate 0 training, frequency is 2400 Mhz
[1067]Actual DRAM SIZE =4096 M
[1070]DRAM SIZE =4096 MBytes, para1 = a10a, para2 = 10000001, dram_tpr13 = 65
[1085]DRAM simple test OK.
[1088]dram size = 4096
[1126]Loading boot-pkg Succeed(index=0).
[1130]Entry_name        = u-boot
[1139]Entry_name        = monitor
[1143]Entry_name        = scp
[1145]error: dtb not found for scp
[1150]Jump to ATF: monitor_base = 0x48000000, uboot_base = 0x4a000000, optee_base = 0x0
NOTICE:  BL31: OP-TEE 32bit detected
NOTICE:  BL31: U-BOOT 32bit detected
NOTICE:  BL31: v2.5(debug):9f44f15ed
NOTICE:  BL31: Built : 21:09:08, Dec 23 2024
NOTICE:  hardware check error1
BACKTRACE: START: bl31_platform_setup
0: EL3: 0x48003e1c
1: EL3: 0x480041fc
2: EL3: 0x480040f8
3: EL3: 0x480001f0
BACKTRACE: END: bl31_platform_setup
PANIC in EL3.
x30            = 0x0000000048004208
x0             = 0x0000000002500000
x1             = 0x0000000000000060
x2             = 0x0000000000000060
x3             = 0x00000000ffffffc8
x4             = 0x0000000000000034
x5             = 0x0000000000000034
x6             = 0x0000000000000004
x7             = 0x0000000000000000
x8             = 0x000000023fffffff
x9             = 0x0000000048013000
x10            = 0x0000000000000000
x11            = 0x0000000048000000
x12            = 0x0000000000000000
x13            = 0x0000000000000000
x14            = 0x0000000000000000
x15            = 0x0000000000000000
x16            = 0x0000000000000000
x17            = 0x0000000000048c00
x18            = 0x0000000000000020
x19            = 0x000000004800f4b4
x20            = 0x0000000000000000
x21            = 0x0000000000001903
x22            = 0x0000000000000000
x23            = 0x0000000000000000
x24            = 0x0000000000000000
x25            = 0x0000000000000000
x26            = 0x0000000000000000
x27            = 0x0000000000000000
x28            = 0x0000000000000000
x29            = 0x00000000480142c0
scr_el3        = 0x0000000000000238
sctlr_el3      = 0x0000000030cd183f
cptr_el3       = 0x0000000000000000
tcr_el3        = 0x000000008081351e
daif           = 0x00000000000002c0
mair_el3       = 0x00000000004404ff
spsr_el3       = 0x00000000000001cd
elr_el3        = 0x0000000000000000
ttbr0_el3      = 0x0000000048041301
esr_el3        = 0x00000000b21e3e3f
far_el3        = 0x72fefefffbffffbf
spsr_el1       = 0x00000000000001cd
elr_el1        = 0x0000000000000000
spsr_abt       = 0x00000000e0067807
spsr_und       = 0x00000000e20ef80c
spsr_irq       = 0x00000000681478dc
spsr_fiq       = 0x00000000c00a7c0e
sctlr_el1      = 0x0000000000c50838
actlr_el1      = 0x0000000000000000
cpacr_el1      = 0x0000000000000000
csselr_el1     = 0x0000000000000000
sp_el1         = 0x0000000000000000
esr_el1        = 0x000000007f7ffffe
ttbr0_el1      = 0x0000fefec4fe7efc
ttbr1_el1      = 0x00007efeff7f7ff8
mair_el1       = 0x44e048e000098aa4
amair_el1      = 0x0000000000000000
tcr_el1        = 0x0000000000000000
tpidr_el1      = 0xfffffe7f7ffefece
tpidr_el0      = 0xdffede76fefff7fe
tpidrro_el0    = 0xf7fefbffdffff6fe
par_el1        = 0xff00000048000980
mpidr_el1      = 0x0000000081000000
afsr0_el1      = 0x0000000000000000
afsr1_el1      = 0x0000000000000000
contextidr_el1 = 0x0000000000000000
vbar_el1       = 0x0000000000000000
cntp_ctl_el0   = 0x0000000000000000
cntp_cval_el0  = 0xfffffffffefefefc
cntv_ctl_el0   = 0x0000000000000000
cntv_cval_el0  = 0xfffeffffffffdeff
cntkctl_el1    = 0x0000000000000000
sp_el0         = 0x00000000480142c0
isr_el1        = 0x0000000000000000
cpuectlr_el1   = 0x000000002808bc00
icc_hppir0_el1 = 0x00000000000003ff
icc_hppir1_el1 = 0x00000000000003ff
icc_ctlr_el3   = 0x0000000000028400
gicd_ispendr regs (Offsets 0x200-0x278)
Offset                  Value
0x200:           0x0000000000000000
0x208:           0x0000000000000000
0x210:           0x0000000000000000
0x218:           0x0000000000000000
0x220:           0x0000000000000000
0x228:           0x0000000000000000
0x230:           0x0000000000000000
0x238:           0x0000000000000000
0x240:           0x0000000000000000
0x248:           0x0000000000000000
0x250:           0x0000000000000000
0x258:           0x0000000000000000
0x260:           0x0000000000000000
0x268:           0x0000000000000000
0x270:           0x0000000000000000
0x278:           0x0000000000000000

我也出现了这个情况

#10 Re: 全志 SOC » 请教F1C200S的RGB屏幕配置问题 » 2025-04-29 00:10:44

buildroot-tiny200 (F1C100/200s) 开发包近期更新内容 * 已支持DVP摄像头 *,支持SPI NAND
https://whycan.com/t_5221.html

#12 Re: RT1050/RT10XX » 把前几年买的不能自动的JLINK V9刷成 可以自动更新的版本了. » 2025-04-16 23:37:58

banma 说:
banma 说:

你好,一直提示clone,怎么解决,重新下载修改SN号吗?

我重新换了一个SN解决了。

怎么换SN呢?

#13 Re: 全志 SOC » t113s3 读取CPU温度失败(已解决) » 2025-04-15 09:25:31

有道理,某些公司不开源就是因为代码是一坨x

#15 Re: 全志 SOC » t113 qt g2d » 2025-04-01 23:59:16

我只对接了g2d旋转

#16 Re: 全志 SOC » 全志F1C100S这颗料是要停产了吗 官网连型号也查不到 » 2025-03-25 10:31:57

其实晶圆都在仓库,如果单大,会继续生产的,采购一块基板,发到封装厂就能干了,和PCBA没有本质区别。

#17 Re: VMWare/Linux/Ubuntu/Fedora/CentOS/U-BOOT » 一个简单的Linux线程通讯测试 » 2025-03-08 02:02:38

改为 tinyplay 播放:

#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>

// 共享数据及同步变量
static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
static pthread_cond_t cond = PTHREAD_COND_INITIALIZER;
static char play_filename[256] = {0};
static int play_request = 0;
extern int tinyplay(int argc, const char **argv);

void* audioplay_thread(void* arg)
{
	(void)arg;

	while (1)
	{
		pthread_mutex_lock(&mutex);

		while (!play_request) {
			printf("now waiting signal ...\n");
		    pthread_cond_wait(&cond, &mutex);
			printf("signal waited!\n");
		}

		printf("in audio play thread\n");
		play_request = 0; // 重置请求标志
		pthread_mutex_unlock(&mutex);



		printf("now playing: %s\n", play_filename);
		const char* argv[] = {"play", play_filename};
		int argc = sizeof(argv) / sizeof(argv[0]);

		tinyplay(argc, argv);
		//usleep(3*1000*1000);
	}
}

// 初始化并启动播放线程
void init_playback_thread() {
    pthread_t tid;
    pthread_create(&tid, NULL, audioplay_thread, NULL);
}

// 触发播放的函数
void request_play(const char* filename) {
    pthread_mutex_lock(&mutex);
    strncpy(play_filename, filename, sizeof(play_filename)-1);
    play_filename[sizeof(play_filename)-1] = '\0';
    play_request = 1;
    pthread_cond_signal(&cond);
    pthread_mutex_unlock(&mutex);
}

int main() {
    init_playback_thread();

    // 模拟其他线程触发播放
    request_play("test.wav");

    while(1)
    {

		char ch = getchar();
		if((ch == 'a') || (ch == 'A')) {
			request_play("/usr/lib/libreoffice/share/gallery/sounds/ok.wav");
		}
    }

    return 0;
}

#18 VMWare/Linux/Ubuntu/Fedora/CentOS/U-BOOT » 一个简单的Linux线程通讯测试 » 2025-03-08 01:26:58

ubuntu
回复: 1
#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>

// 共享数据及同步变量
static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
static pthread_cond_t cond = PTHREAD_COND_INITIALIZER;
static char play_filename[256] = {0};
static int play_request = 0;

void* audioplay_thread(void* arg)
{
	(void)arg;

	while (1)
	{
		pthread_mutex_lock(&mutex);

		while (!play_request) {
			printf("now waiting signal ...\n");
		    pthread_cond_wait(&cond, &mutex);
			printf("signal waited!\n");
		}

		printf("in audio play thread\n");
		play_request = 0; // 重置请求标志
		pthread_mutex_unlock(&mutex);



		printf("now playing: %s\n", play_filename);
		usleep(3*1000*1000);
	}
}

// 初始化并启动播放线程
void init_playback_thread() {
    pthread_t tid;
    pthread_create(&tid, NULL, audioplay_thread, NULL);
}

// 触发播放的函数
void request_play(const char* filename) {
    pthread_mutex_lock(&mutex);
    strncpy(play_filename, filename, sizeof(play_filename)-1);
    play_filename[sizeof(play_filename)-1] = '\0';
    play_request = 1;
    pthread_cond_signal(&cond);
    pthread_mutex_unlock(&mutex);
}

int main() {
    init_playback_thread();

    // 模拟其他线程触发播放
    request_play("test.wav");

    while(1)
    {

		char ch = getchar();
		if((ch == 'a') || (ch == 'A')) {
			request_play("test.wav");
		}
    }

    return 0;
}

#19 Re: 全志 SOC » 求大神指教,全志T507 PWM怎么实现发送固定脉冲数 » 2025-03-04 09:47:57

yozad 说:

使用T507控制电机:
1、电机默认频率13000Hz,最大可以设到60000
2、固定脉冲数在0-60000个脉冲之间

需要发送固定脉冲数让电机走固定位置,如何实现?

求大神指教,感谢

13K ~ 60K PWM频率?

#20 Re: VMWare/Linux/Ubuntu/Fedora/CentOS/U-BOOT » 记录一下常用易忘的Linux日常操作 » 2025-02-03 19:25:07

搜索当前文件夹,排除 out/ 文件夹

grep net-aic8800 -r . --exclude-dir out/

#21 Re: 全志 SOC » 8.8元的 ML307R-DL 4G CAT.1 模块 » 2025-01-16 10:16:49

dgtg 说:

请问下,这模块可以搭配C100或君正 使用吗?使用usb接口

F1C100s据说因为USB端点数量不够,可能不行。如果不行的话,可以走UART。

#23 Re: 全志 SOC » 45块顺丰包邮买到的10.1寸保资LCD价签F1C200S 值不值 » 2025-01-09 19:19:56

xfdr0805 说:

大佬,"年月日"这几个字可以用中文吗?时分秒的字体可以更大一些,我打算寒假回去挂家里大厅,给我老妈用,谢谢啦。

#24 Re: 全志 SOC » 45块顺丰包邮买到的10.1寸保资LCD价签F1C200S 值不值 » 2025-01-08 08:32:23

li6848 说:

屏幕闪屏,忽明忽暗的,有大佬瞅瞅吗。是我机子问题吗。

应该是货架上面淘汰下来的问题价签,所以下单前问清楚。

#26 Re: 全志 SOC » 8.8元的 ML307R-DL 4G CAT.1 模块 » 2024-12-24 15:58:32

hameyou 说:

这玩意是首个优惠价吧,批量8.8做不到吧

批量就是这个价,含税,中国移动的子公司,全网通模块。

#32 Re: 全志 SOC » 网上下载的t113用的tina5.x sdk,无t113s3配置,求个补丁。 » 2024-11-21 09:33:57

有 t113-s4 那个 sdk里面没有 支持 t113-s3,我试图补丁了一下,没有成功,放弃治疗。

#36 Re: 全志 SOC » 三张Linux I2S声卡可以玩 5.1杜比音效吗? » 2024-08-31 12:02:08

rick lou 说:

不可以,杜比和dts有严格监管的版权,建议同轴或者hdmi直通然后外接支持的解码器转成iis

有哪些解码器可以推荐呢?

#37 Re: 全志 SOC » 三张Linux I2S声卡可以玩 5.1杜比音效吗? » 2024-08-30 20:22:35

#### 使用ALSA
如果你更喜欢使用ALSA,可以使用多个混音器来组合不同的声道。首先,确认你的声卡设备名称,然后创建一个自定义的混音器文件来组合多个声道。

1. **编辑`/etc/asound.conf`**:
   创建或编辑`/etc/asound.conf`文件,定义一个新的混音器设备,将多个声卡组合在一起。例如:

   pcm.multichannel {
       type multi
       playback_switch {
           slave {
               pcm "hw:0,0"
           }
           slave {
               pcm "hw:1,0"
           }
           slave {
               pcm "hw:2,0"
           }
       }
   }

   在这里,`hw:0,0`、`hw:1,0` 和 `hw:2,0` 分别代表三张声卡的设备名称。你需要根据实际的设备名称进行替换。

2. **设置默认PCM设备**:
   确保你的系统将新创建的混音器设备设置为默认PCM设备。

### 3. 测试和调整
完成配置后,测试音频输出是否正确。你可以播放一段5.1声道的音频文件,并检查每个扬声器是否输出正确的声道声音。

### 4. 自动化脚本
为了简化每次启动时的配置过程,可以编写一个脚本来自动加载所需的PulseAudio模块或ALSA配置,并设置默认音频设备。

### 注意事项
- 确保所有声卡都正确连接并且工作正常。
- 扬声器的布线和设置也非常重要,确保每个扬声器连接到正确的输出端口。
- 由于声道映射需要精确设置,可能需要多次调整才能达到理想的效果。

通过上述步骤,你可以利用三张双声道声卡在Linux系统中实现5.1声道环绕声。

#38 全志 SOC » 三张Linux I2S声卡可以玩 5.1杜比音效吗? » 2024-08-30 20:21:48

ubuntu
回复: 4

三张Linux I2S声卡可以玩 5.1杜比音效吗?

#39 Re: 工业芯 匠芯创 » D13x 有现成的 ntp 功能吗? » 2024-08-29 07:51:30

NTP协议很简单的,如果有TCP/UDP demo代码,对照改下就可以了。

#41 Re: 全志 SOC » ubuntu 22.03不能显示中文是哪里不对啊? » 2024-08-28 17:10:18

海石生风 说:

前提条件要说明清楚:这是tty终端还是pts虚拟终端?
tty终端默认不支持中文显示,需要对内核打补丁才能支持中文
pts可以理解为是在桌面环境内打开的终端模拟器,ubuntu默认pts应该支持中文

SSH登录进去是tty还是pts ?

#42 Re: 全志 SOC » H3主线U-boot之环境变量 » 2024-08-27 12:11:32

uboot.env 具体放哪个位置呢?

#44 Re: ESP32/ESP8266 » ESP32-P4终于可以购买了, 官网tb开发板499, 小贵, » 2024-08-08 10:00:47

skrlaoshiren 说:

idf5.3开始支持esp32p4,官网上也有这个开发板资料

https://www.espressif.com/en/products/devkits

这是学多年前长城哈佛的玩法吗?一个H6玩到底

#48 Re: 全志 SOC » T113中断读取io状态赋值设置另外一个io 输出电平不同步 » 2024-08-06 23:47:49

50khz这么高频的嘛,周期是20us,全部在驱动里面操作试一试看,如果还不行就降低频率。

#49 Re: 计算机图形/GUI/RTOS/FileSystem/OpenGL/DirectX/SDL2 » 请问如何获取windows和Ubuntu的缩放值 » 2024-07-16 21:16:13

QQ截图20240716211317.png

谢谢老板,windows和ubuntu测试都没有问题。

    QList<QScreen*> screens = QApplication::screens(); // 获取所有屏幕的QScreen对象列表
    for (QScreen* screen : screens)
    {
        qDebug() << "logicXY: " << screen->logicalDotsPerInchX() << "," << screen->logicalDotsPerInchY();
    }

#52 Re: 全志 SOC » D1s调试lvds,求解? » 2024-07-08 08:57:05

ghosoft 说:

@晕哥
感谢晕哥, 弄好了

大佬改了哪里,分享一下

#56 Re: 工业芯 匠芯创 » 匠芯创 D211,7寸mipi屏核心板 » 2024-06-29 11:08:02

regbbs 说:
ArtInChip 说:

mipi一般是竖屏,而且还要做竖屏转横屏,要双buffer。一般情况下,仪表盘还是建议用RGB 横屏,最大可以1920x1200

7寸,10寸好多都是mipi的横屏。而且通用的,不同厂家的接口等都一样,可以直接替换

大佬有型号或厂家推荐吗?

#57 Re: 全志 SOC » v851s g2d 模块 sample 深究 » 2024-06-28 14:03:23

soso 说:
mysteryli 说:

看到G2D的例程输出到/dev/disp,
我换了屏幕使用fbtft,生成了FB0,怎么才能让这个mpp例程输出到fb0呢?

没法用吧。这个要对接rgb这些硬件驱动

g2d理论上可以用,但是g2d只能操作物理地址,得想办法得到fb的物理地址。

#58 Re: 全志 SOC » st7789v编译不通过,求助 » 2024-06-25 08:22:36

@Yulong
确认一下是不是全角的空格字符,或者有其他全角字符。

#59 全志 SOC » 请问T113 LVGL DEMO G2D_CMD_BITBLT_H failed: Operation not permitte是什么问题? » 2024-06-25 08:15:26

ubuntu
回复: 2
# chmod +x /tmp/lvgl_sunxifb && /tmp/lvgl_sunxifb 0
wh=1200x1920, vwh=1200x3840, bpp=32, rotated=0
Turn on double buffering.
Turn on 2d hardware acceleration.
Turn on 2d hardware acceleration rotate.
Error: sunxifb_g2d_blit_to_fb G2D_CMD_BITBLT_H failed: Operation not permitted
sunxifb_g2d_blit_to_fb src[phy=0x1200000 format=0 alpha=255 wh=[1200 1920] clip=[0 0 1200 1920]] dst=[phy=(nil) format=0 wh=[1200 3840] clip=[0 0 1200 1920]]
Error: sunxifb_g2d_blit_to_fb G2D_CMD_BITBLT_H failed: Operation not permitted
sunxifb_g2d_blit_to_fb src[phy=0x1200000 format=0 alpha=255 wh=[1200 1920] clip=[0 0 1200 1920]] dst=[phy=(nil) format=0 wh=[1200 3840] clip=[0 1920 1200 1920]]
Error: sunxifb_g2d_blit_to_fb G2D_CMD_BITBLT_H failed: Operation not permitted
sunxifb_g2d_blit_to_fb src[phy=0x1200000 format=0 alpha=255 wh=[1200 1920] clip=[0 0 1200 1920]] dst=[phy=(nil) format=0 wh=[1200 3840] clip=[0 0 1200 1920]]
Error: sunxifb_g2d_blit_to_fb G2D_CMD_BITBLT_H failed: Operation not permitted
sunxifb_g2d_blit_to_fb src[phy=0x1200000 format=0 alpha=255 wh=[1200 1920] clip=[0 0 1200 1920]] dst=[phy=(nil) format=0 wh=[1200 3840] clip=[0 1920 1200 1920]]

#63 Re: 8051/STC8/AT89C51/N76E003 » STC32G12K128的Dhrystone性能测试 » 2024-06-03 17:39:30

海石生风 说:

32位80251?为什么不选RISC-V?后者无论性能、生态、受权、扩展都能秒前者!

确实

#64 Re: 全志 SOC » V3S串口921600波特率使用 » 2024-05-21 14:03:26

游侠TT 说:

@谢图图
我全志的v3s调成功了,csdn上搜它高速时钟的设置,u-boot和内核都得改,串口0使用115200和串口2使用921600不会卡死了

请问最后具体是怎么解决的呢?

#65 Re: 全志 SOC » 咨询下芯片电源用EA3036的好处?用三个ASM1117不是也可以么? » 2024-05-20 10:37:15

LDO(低压差线性稳压器)的本质可以看作是电阻分压。LDO是一种常见的线性稳压器,用于在输入电压较高的情况下提供稳定的输出电压。它通过一个可调节的电阻网络来实现电压降和稳压功能。

#69 Re: 全志 SOC » 开源 T113-s3 图纸 » 2024-05-12 22:21:29

cz_jjq 说:

一直没整明白模拟地和数字地,为啥芯片下面要好大一个数字地?求教

为了芯片里面的那块基板好布线,散热,信号一致性啥的。

#70 Re: 全志 SOC » linux的2038问题有哪位大佬处理过吗,帮忙指点下? » 2024-05-06 12:07:05

现在不都是 uint64_t 类型了吗?

打印一下 sizeof(time_t)

#71 Re: VMWare/Linux/Ubuntu/Fedora/CentOS/U-BOOT » 记录一下常用易忘的Linux日常操作 » 2024-05-06 10:07:24

命令行挂载 hgfs 分区:

sudo /usr/bin/vmhgfs-fuse .host:/ /mnt/hgfs -o subtype=vmhgfs-fuse,allow_other

#76 Re: 感芯科技 » 老电脑装Linux能恢复青春吗? » 2024-04-25 16:30:54

如果支持高速M.2固态硬盘,换上去真能焕发第二春

#79 Re: VMWare/Linux/Ubuntu/Fedora/CentOS/U-BOOT » 讨论一下MQTT物联网安全问题 » 2024-04-13 11:11:32

lyg116 说:

用AES加密,并且用空中下发设备证书

这个下载不属于MQTT协议范围吧,请问具体怎么空中下载证书呢?

#80 Re: VMWare/Linux/Ubuntu/Fedora/CentOS/U-BOOT » 讨论一下MQTT物联网安全问题 » 2024-04-07 20:21:00

也可以用专网卡,VPN用的SIM卡,比如水表、电表、燃气表、环境监测用这种方案。

#84 Re: VMWare/Linux/Ubuntu/Fedora/CentOS/U-BOOT » Ubuntu下普通用户运行 wpa_gui 出错的解决方案 » 2024-03-19 17:11:40

命令行测试:

wpa_cli -i wlx60fb00f2ccfb -p /var/run/wpa_supplicant/ scan

wpa_cli -i wlx60fb00f2ccfb -p /var/run/wpa_supplicant/ scan_result

wpa_cli -i wlx60fb00f2ccfb -p /var/run/wpa_supplicant/ status

#86 VMWare/Linux/Ubuntu/Fedora/CentOS/U-BOOT » Ubuntu下普通用户运行 wpa_gui 出错的解决方案 » 2024-03-19 16:53:31

ubuntu
回复: 2

修改socket文件的拥有者权限:

sudo chown -R ubuntu:ubuntu/var/run/wpa_supplicant/

#92 Re: 技术人生/软件使用技巧/破解经验/技术吐槽/灌水 » 哔哩哔哩和抖音app免流的原理是什么? » 2023-12-26 12:14:42

dykxjh 说:

APP公司和电信、移动、联通合作

具体实现原理是什么呢?如果帆樯还免不免呢?

#94 Re: 全志 SOC » F1C200S在启动一路usb摄像头的时候,报了no space left on device » 2023-12-15 09:37:29

我知道你很急,但是请您先别急。

到底是内存不够,还是闪存不够?

#95 Re: 全志 SOC » 小白自制Linux开发板(F1C200s)整理系列,持续更新中 » 2023-12-03 23:51:17

随遇而安丶 说:

大佬厉害,能详细教一下我这手残党怎么焊芯片吗

先到芯片引脚上面上点锡,然后热风枪320度左右吹

#96 Re: 全志 SOC » 记录全志A133的u-boot读写设备树,免改固件在线调试 » 2023-11-30 16:48:29

fdt set /soc@03000000/lcd0@01c0c000/ lcd_x          <1024>
fdt set /soc@03000000/lcd0@01c0c000/ lcd_y          <400>
fdt set /soc@03000000/lcd0@01c0c000/ lcd_dclk_freq  <35>
fdt set /soc@03000000/lcd0@01c0c000/ lcd_hbp        <170>
fdt set /soc@03000000/lcd0@01c0c000/ lcd_ht         <1344>
fdt set /soc@03000000/lcd0@01c0c000/ lcd_hspw       <20>
fdt set /soc@03000000/lcd0@01c0c000/ lcd_vbp        <20>
fdt set /soc@03000000/lcd0@01c0c000/ lcd_vt         <435>
fdt set /soc@03000000/lcd0@01c0c000/ lcd_vspw       <5>







fdt set /soc@03000000/lcd0@01c0c000/ lcd_x          <1024>
fdt set /soc@03000000/lcd0@01c0c000/ lcd_y          <600>
fdt set /soc@03000000/lcd0@01c0c000/ lcd_dclk_freq  <52>
fdt set /soc@03000000/lcd0@01c0c000/ lcd_hbp        <170>
fdt set /soc@03000000/lcd0@01c0c000/ lcd_ht         <1364>
fdt set /soc@03000000/lcd0@01c0c000/ lcd_hspw       <10>
fdt set /soc@03000000/lcd0@01c0c000/ lcd_vbp        <20>
fdt set /soc@03000000/lcd0@01c0c000/ lcd_vt         <635>
fdt set /soc@03000000/lcd0@01c0c000/ lcd_vspw       <5>

#97 Re: 全志 SOC » 记录全志A133的u-boot读写设备树,免改固件在线调试 » 2023-11-30 16:18:21

=> fdt set /soc@03000000/lcd0@01c0c000/ lcd_x <1025>
=> fdt get value xxx /soc@03000000/lcd0@01c0c000/ lcd_x
=> print xxx
xxx=0x00000401

#98 Re: 全志 SOC » 记录全志A133的u-boot读写设备树,免改固件在线调试 » 2023-11-30 16:13:28

_20231130161108.jpg

=> fdt get value xxx /soc@03000000/pinctrl@07022000/s_uart0@0/ allwinner,drive
=> print xxx
xxx=0x00000001
=> fdt get value xxx /soc@03000000/lcd0@01c0c000/ compatible
=> print xxx
xxx=allwinner,sunxi-lcd0

#99 全志 SOC » 记录全志A133的u-boot读写设备树,免改固件在线调试 » 2023-11-30 16:05:09

ubuntu
回复: 4

fdt get value xxx /soc@03000000/pinctrl@07022000/s_uart0@0/ allwinner,drive 3

#100 Re: 技术人生/软件使用技巧/破解经验/技术吐槽/灌水 » 分享咸鱼上便宜的两款微型投影驱动玩玩,一款驱动简单,一款分辨率高,都是LCOS屏的。欢迎探讨交流 » 2023-11-28 11:28:22

wangchen 说:

一下子就想剁手了,到手每次又变垃圾

我下单了都申请退款了,我知道我只是想有一种曾经拥有的感觉。

#101 Re: DIY/综合/Arduino/写字机/3D打印机/智能小车/平衡车/四轴飞行/MQTT/物联网 » 请问,现在很多soc有算力,比如0.5T或者1T,这样的片子具体应用在哪些场合呢? » 2023-11-27 15:22:39

能用的场合很多,需要识别的场合都能用。我的一个朋友都躺平了,用上自动识别游戏人物,自己打游戏,自动赚钱了。

#104 全志 SOC » 一个简单的 linux fb0 双缓冲切换demo » 2023-11-27 11:14:48

ubuntu
回复: 1
#include <stdio.h>
#include <fcntl.h>
#include <unistd.h>
#include <stdlib.h>
#include <sys/mman.h>
#include <sys/ioctl.h>
#include <linux/fb.h>

#define WIDTH 480
#define HEIGHT 480
#define BYTES_PER_PIXEL 4

int main() {
    int fb = open("/dev/fb0", O_RDWR);
    if (fb == -1) {
        perror("Unable to open framebuffer");
        return 1;
    }

    struct fb_var_screeninfo vinfo;

    ioctl(fb, FBIOGET_VSCREENINFO, &vinfo);

    printf("vinfo.xres=%d, vinfo.yres=%d\n", vinfo.xres, vinfo.yres);
    printf("vinfo.xres_virtual=%d, vinfo.yres_virtual=%d\n", vinfo.xres_virtual, vinfo.yres_virtual);

    ioctl(fb, FBIOGET_VSCREENINFO, &vinfo);

    unsigned char *fbp = mmap(0, vinfo.yres_virtual * vinfo.xres * BYTES_PER_PIXEL, PROT_READ | PROT_WRITE, MAP_SHARED, fb, 0);

    // 填充第一个缓冲区
    for (int y = 0; y < vinfo.yres; y++)
        for (int x = 0; x < vinfo.xres; x++)
            *((unsigned long*)(fbp + 4*x + 4*y*vinfo.xres)) = 0xFF00FFFF;

    // 填充第二个缓冲区
    for (int y = vinfo.yres; y < 2*vinfo.yres; y++)
        for (int x = 0; x < vinfo.xres; x++)
            *((unsigned long*)(fbp + 4*x + 4*y*vinfo.xres)) = 0xFFFF00FF;



    int i = 0;
    while(1)
    {
        // 切换到第二个缓冲区
        vinfo.yoffset = (i++%2)*HEIGHT;
        printf("vinfo.yoffset = %d\n", vinfo.yoffset);

        if(0 != ioctl(fb, FBIOPAN_DISPLAY, &vinfo))
        {
                printf("fb iopan display error.\n");
        }

        sleep(1);
    }


    munmap(fbp, vinfo.yres_virtual * vinfo.xres * BYTES_PER_PIXEL);
    close(fb);

    return 0;
}

#105 Re: 全志 SOC » t113 udhcpc问题 » 2023-11-27 11:13:03

udhcpc就是这样的,执行前要执行 ifconfig eth0 up,

可能用别的dhcpc解决了这个问题。

#106 Re: 全志 SOC » V853网卡RTL8211F 1Gbps网卡时通时不通,是不是 tx-delay, rx-delay不对啊? » 2023-11-17 10:02:46

ethtool -s eth0 speed 10 duplex full autoneg on


强行改成10M,我这里各种路由器,各种网线都可以用了。

但是100M和1000M都不行

#108 Re: 全志 SOC » V853网卡RTL8211F 1Gbps网卡时通时不通,是不是 tx-delay, rx-delay不对啊? » 2023-11-16 16:58:03

=> fdt list /soc@03000000/pinctrl@02000000/gmac0@0/
gmac0@0 {
        allwinner,pins = "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6", "PE7", "PE8", "PE9", "PE10", "PE11", "PE12", "PE13", "PE14", "PE15";
        allwinner,function = "rgmii";
        allwinner,drive = "0";
        allwinner,muxsel = <0x00000003>;
        allwinner,pull = <0x00000000>;
        linux,phandle = <0x00000097>;
        phandle = <0x00000097>;
};
=>
=>
=>
=> fdt set /soc@03000000/pinctrl@02000000/gmac0@0/ allwinner,drive 3
=>
=>
=> fdt list /soc@03000000/pinctrl@02000000/gmac0@0/
gmac0@0 {
        allwinner,pins = "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6", "PE7", "PE8", "PE9", "PE10", "PE11", "PE12", "PE13", "PE14", "PE15";
        allwinner,function = "rgmii";
        allwinner,drive = "3";
        allwinner,muxsel = <0x00000003>;
        allwinner,pull = <0x00000000>;
        linux,phandle = <0x00000097>;
        phandle = <0x00000097>;
};
=>

#112 全志 SOC » A133 tina5 reboot 不成功,可能是什么问题引起呢? » 2023-11-15 12:05:56

ubuntu
回复: 0
root@OpenWrt:/#
root@OpenWrt:/# reboot
root@OpenWrt:/# [  131.812780] br-lan: port 1(eth0) entered disabled state
[  131.825385] device eth0 left promiscuous mode
[  131.830628] br-lan: port 1(eth0) entered disabled state
[  131.846463] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[  136.189181] sunxi-mmc sdc2: sdc set ios:clk 0Hz bm PP pm OFF vdd 0 width 1 timing LEGACY(SDR12) dt B
[  136.200895] [alarmtimer] have no shutdown alarm! alarmtimer_shutdown 322
[  137.161378] reboot: Restarting system

#113 Re: 工业芯 匠芯创 » RISC-V高性能显示控制跨界MCU D13x系列Datasheet » 2023-11-13 11:12:49

tangloong 说:

规格书 中文的  太棒了

让老外也体验一下中文四六级的酸爽。

#115 Re: 全志 SOC » 做了一块f1c200s小板子 » 2023-11-03 22:46:38

tangloong 说:

话说 EA3036 和 ASM1117 供电 使用上 差异大吗?ASM1117 成本更低吧?

1117效率低得吓人

#119 Re: 全志 SOC » 开源智能家居V3s CAN转以太网网关,附openwrt19.07.7 » 2023-10-13 15:48:39

make package/feeds/packages/canutils/compile V=s

make[1]: Entering directory '/opt2/openwrt/openwrt_v3s_can_gateway'
make[2]: Entering directory '/opt2/openwrt/openwrt_v3s_can_gateway/package/libs/toolchain'
echo "libc" >> /opt2/openwrt/openwrt_v3s_can_gateway/staging_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/pkginfo/toolchain.default.install
echo "libgcc" >> /opt2/openwrt/openwrt_v3s_can_gateway/staging_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/pkginfo/toolchain.default.install
echo "libpthread" >> /opt2/openwrt/openwrt_v3s_can_gateway/staging_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/pkginfo/toolchain.default.install
echo "librt" >> /opt2/openwrt/openwrt_v3s_can_gateway/staging_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/pkginfo/toolchain.default.install
make[2]: Leaving directory '/opt2/openwrt/openwrt_v3s_can_gateway/package/libs/toolchain'
time: package/libs/toolchain/compile#0.12#0.04#0.16
make[2]: Entering directory '/opt2/openwrt/openwrt_v3s_can_gateway/feeds/packages/utils/canutils'
mkdir -p /opt2/openwrt/openwrt_v3s_can_gateway/dl
SHELL= flock /opt2/openwrt/openwrt_v3s_can_gateway/tmp/.canutils-2017-02-16-cb33a557.tar.xz.flock -c '          /opt2/openwrt/openwrt_v3s_can_gateway/scripts/download.pl "/opt2/openwrt/openwrt_v3s_can_gateway/dl" "canutils-2017-02-16-cb33a557.tar.xz" "d9c01eeff3d81a28161ca5c3937ec005a1f49ca3eb97bee0164d53cc66365786" "" || (  /opt2/openwrt/openwrt_v3s_can_gateway/scripts/dl_github_archive.py --dl-dir="/opt2/openwrt/openwrt_v3s_can_gateway/dl" --url="https://github.com/linux-can/can-utils" --version="cb33a55720716cbe01e6025a2bda74a1b7e492d3" --subdir="canutils-2017-02-16-cb33a557" --source="canutils-2017-02-16-cb33a557.tar.xz" --hash="d9c01eeff3d81a28161ca5c3937ec005a1f49ca3eb97bee0164d53cc66365786" || (     echo "Checking out files from the git repository..."; mkdir -p /opt2/openwrt/openwrt_v3s_can_gateway/tmp/dl && cd /opt2/openwrt/openwrt_v3s_can_gateway/tmp/dl && rm -rf canutils-2017-02-16-cb33a557 && [ \! -d canutils-2017-02-16-cb33a557 ] && git clone  https://github.com/linux-can/can-utils canutils-2017-02-16-cb33a557 && (cd canutils-2017-02-16-cb33a557 && git checkout cb33a55720716cbe01e6025a2bda74a1b7e492d3 && git submodule update --init --recursive) && echo "Packing checkout..." && export TAR_TIMESTAMP=`cd canutils-2017-02-16-cb33a557 && git log -1 --format='\''@%ct'\''` && rm -rf canutils-2017-02-16-cb33a557/.git &&        tar --numeric-owner --owner=0 --group=0 --mode=a-s --sort=name ${TAR_TIMESTAMP:+--mtime="$TAR_TIMESTAMP"} -c canutils-2017-02-16-cb33a557 |    xz -zc -7e > /opt2/openwrt/openwrt_v3s_can_gateway/tmp/dl/canutils-2017-02-16-cb33a557.tar.xz && mv /opt2/openwrt/openwrt_v3s_can_gateway/tmp/dl/canutils-2017-02-16-cb33a557.tar.xz /opt2/openwrt/openwrt_v3s_can_gateway/dl/ && rm -rf canutils-2017-02-16-cb33a557; );  )    '
echo "canutils" >> /opt2/openwrt/openwrt_v3s_can_gateway/staging_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/pkginfo/canutils.default.install
echo "canutils-candump" >> /opt2/openwrt/openwrt_v3s_can_gateway/staging_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/pkginfo/canutils.default.install
echo "canutils-cansend" >> /opt2/openwrt/openwrt_v3s_can_gateway/staging_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/pkginfo/canutils.default.install
make[2]: Leaving directory '/opt2/openwrt/openwrt_v3s_can_gateway/feeds/packages/utils/canutils'
time: package/feeds/packages/canutils/compile#0.95#0.49#1.42
make[1]: Leaving directory '/opt2/openwrt/openwrt_v3s_can_gateway'

这个正常

#120 Re: 全志 SOC » 开源智能家居V3s CAN转以太网网关,附openwrt19.07.7 » 2023-10-13 15:34:23

Configuring luci.
Configuring luci-i18n-opkg-zh-cn.
Configuring procps-ng-top.
Configuring luci-i18n-opkg-en.
Configuring luci-i18n-base-en.
Configuring procps-ng-pmap.
Configuring kmod-ipt-offload.
Configuring urngd.
Configuring procps-ng-pgrep.
Configuring luci-i18n-firewall-zh-cn.
Configuring ppp-mod-pppoe.
Configuring canutils-candump.
Collected errors:
 * satisfy_dependencies_for: Cannot satisfy the following dependencies for ip-full:
 *      libcap
 * opkg_install_cmd: Cannot install package ip-full.
package/Makefile:65: recipe for target 'package/install' failed
make[2]: *** [package/install] Error 255
make[2]: Leaving directory '/opt2/openwrt/openwrt_v3s_can_gateway'
package/Makefile:108: recipe for target '/opt2/openwrt/openwrt_v3s_can_gateway/staging_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/stamp/.package_install' failed
make[1]: *** [/opt2/openwrt/openwrt_v3s_can_gateway/staging_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/stamp/.package_install] Error 2
make[1]: Leaving directory '/opt2/openwrt/openwrt_v3s_can_gateway'
/opt2/openwrt/openwrt_v3s_can_gateway/include/toplevel.mk:225: recipe for target 'world' failed
make: *** [world] Error 2[/b]

[b]real    6m44.278s
user    5m32.328s
sys     1m35.930s
#

咦,编译错误了

#121 Re: 全志 SOC » 请问 eth0 和 wlan0 作为lan连接内网,且可以互通,eth1作为wan口接入互联网,这个用linux命令行怎么表达。 » 2023-10-11 18:11:44

这个aic8800 的wlan0 没法加入br0

# brctl addif br0 wlan0
can't add wlan0 to bridge br0: Operation not supported

查了一下

这个错误可能是由于你尝试将一个无线接口(wlan0)添加到网桥,但是许多无线设备并不支持这种操作。这是由于802.11 WiFi规定的限制和驱动程序实现的问题。

一种可能的解决方案是将无线接口设置为四层(IP层)而非二层(以太网层)的转发模式。你可以使用Linux的网络地址转换(NAT)功能或者IP路由来实现这个目标。例如,你可以使用iptables和netfilter来配置NAT和防火墙规则,从而允许通过wlan0接收到的数据包在eth0和其他接口之间转发。

另外一个方法是使用第三方工具,如hostapd,它可以将无线网卡设置为AP模式(如果硬件支持),然后创建一个虚拟的有线接口,并将该接口加入到网桥。

需要注意的是,具体的解决方案取决于你的具体需求和环境,包括你的硬件、驱动程序、网络环境和安全需求等因素。

感觉可能是驱动问题。

#123 Re: 全志 SOC » 请问 eth0 和 wlan0 作为lan连接内网,且可以互通,eth1作为wan口接入互联网,这个用linux命令行怎么表达。 » 2023-10-11 15:15:36

同一个 dhcpd 进程,可以同时给 eth0和wlan0分配ip吗?

#设置wifi网卡地址
ifconfig wlan0 192.168.0.1[/b]

#给wifi网卡设置dhcp服务器
mkdir -p /var/run/dhcp-server/
dhcpd wlan0 -cf /etc/dhcpd.conf -pf /var/run/dhcp-server/dhcpd.pid

#124 全志 SOC » 请问 eth0 和 wlan0 作为lan连接内网,且可以互通,eth1作为wan口接入互联网,这个用linux命令行怎么表达。 » 2023-10-11 15:13:45

ubuntu
回复: 7

请问 eth0 和 wlan0 作为lan连接内网,且可以互通,eth1作为wan口接入互联网,这个用linux命令行怎么表达。

#125 Re: 全志 SOC » F1C100s裸奔DMA-TCON方式的Framebuffer,代码不到5KB!(附ST7789的RGB接口裸机驱动) » 2023-10-05 17:43:49

lzw 说:

IM012不是设置好那种模式,为什么还要用SPI配置

RGB模式需要SPI初始化,因为分辨率和gamma等通过spi配置

#126 Re: DIY/综合/Arduino/写字机/3D打印机/智能小车/平衡车/四轴飞行/MQTT/物联网 » 有啥办法能在手机不知道的情况下把屏幕数据送到电脑上? » 2023-10-02 20:29:01

艰夫 说:

scrcpy不行,第一容易被反外挂发现,第二速度慢延迟大

scrcpy 有什么特征会别反外挂发现呢? 延迟应该不大吧,就是用adb命令抓屏而已。

#127 Re: DIY/综合/Arduino/写字机/3D打印机/智能小车/平衡车/四轴飞行/MQTT/物联网 » 有啥办法能在手机不知道的情况下把屏幕数据送到电脑上? » 2023-10-02 17:30:51

之前是电子工程师,现在失业送外卖,不过送外卖也没单。没外挂只能吃西北风了

楼主是搞笑的吗?

试一试这个方案:

投屏软件scrcpy在Linux上的移植(porting scrcpy to linux)
https://whycan.com/t_2736.html#p22190

#129 Re: 全志 SOC » 手头有个野火的imx开发板,没有屏幕,默认烧录的镜像有fb0设备,用fbgrab也可以抓到图,我想安装个vncserver实时看fb0的图片 » 2023-09-17 20:15:09

3050311118 说:
哇酷小二 说:

都不是的话,试一试这个:

https://github.com/ponty/framebuffer-vncserver

成功了,还可以鼠标控制,太牛了https://whycan.com/files/members/5129/微信截图_20230917192134.png

6666

分享一下怎么弄出来的

#130 Re: 全志 SOC » 终于搞定f1c100s的i2s输出 » 2023-08-28 08:29:42

Water_bros 说:

@xfdr0805
dsd什么的还是算了,能输出24bit/192kHz就满足了

放弃吧,这芯片性能太差了,如果跑mp3解码,那ui就不动了。

#132 Re: Cortex M0/M3/M4/M7 » 灵动微 MCU 开发板赠送活动 » 2023-08-08 18:24:40

srovio 说:

@IOsetting
听说是把做广告推广的预算资金拿来补贴这种超低价的板子了

这把操作666

#133 Re: VMWare/Linux/Ubuntu/Fedora/CentOS/U-BOOT » 记录一下常用易忘的Linux日常操作 » 2023-08-06 08:46:33

不打包某个文件夹:

tar cvf sdk_20230806.tar --exclude=/opt/me/out /opt/me/

#134 Re: 全志 SOC » 深入研究T113 EFUSE,现已扩展XFEL工具,并支持烧写T113熔丝位 » 2023-07-12 22:47:42

就是说编程 LCJS 之后,是启动SBROM,否则是启动BROM?

#135 Re: 全志 SOC » 深入研究T113 EFUSE,现已扩展XFEL工具,并支持烧写T113熔丝位 » 2023-07-12 21:45:20

要启用加密引导模式,需要将LCJS段里面的某个bit写1,就启用加密引导了,如果这个时候rotpk段还没有写入,那么全志的会引导任何一个加密引导固件,不进行任何校验,但只要写入了rotpk(非全0),就需要校验了。

rotpk,其实就是RSA2048公钥的SHA256摘要,总共256bit,这个在烧写时,必须保留好RSA2048私钥,否则就像锁门并焊死锁孔。

这个brom完成的吗?如果 LCJS段里面的某个bit写1,而且写入了 写入了rotpk,那么我裸奔受影响吗?

#137 Re: 全志 SOC » 深入研究T113 EFUSE,现已扩展XFEL工具,并支持烧写T113熔丝位 » 2023-07-12 20:30:04

@xboot
是不是还有一些对用户不可见的efuse,厂家提前编程的区域?

#138 Re: 技术人生/软件使用技巧/破解经验/技术吐槽/灌水 » 24岁工地仔裸辞转行嵌入式 大佬们有什么建议吗 » 2023-06-23 01:10:22

如果能挤出时间,不建议裸辞。

可以试着网上学习,找一份薪水低一点的相关工作,边工作边学习。

#139 Re: 全志 SOC » 全志R128来袭,有想入坑的吗?我先来点初步研究成果 » 2023-05-14 09:19:19

jlau 说:

有人知道r128使用psram的逻辑吗?
psram里面应该也是sdram,为什么不直接用sdram?

节省晶圆面积?

#140 Re: 计算机图形/GUI/RTOS/FileSystem/OpenGL/DirectX/SDL2 » LVGL 学习记录 » 2023-05-04 23:12:44

#include "lvgl/lvgl.h"

#define DOUBLE_CLICK_TIME_MS 300 // 双击事件的最大时间间隔(毫秒)

static uint32_t last_click_time = 0;

static void btn_event_cb(lv_obj_t * obj, lv_event_t event)
{
    if (event == LV_EVENT_SHORT_CLICKED) {
        uint32_t now = lv_tick_get();

        if ((now - last_click_time) < DOUBLE_CLICK_TIME_MS) {
            printf("Double click!\n");
            last_click_time = 0;
        }
        else {
            printf("Single click.\n");
            last_click_time = now;
        }
    }
}

int main(void)
{
    lv_init();

    // 创建一个按钮控件
    lv_obj_t * btn = lv_btn_create(lv_scr_act(), NULL);

    // 设置按钮的单击事件回调函数
    lv_obj_set_event_cb(btn, btn_event_cb);

    while(1) {
        lv_task_handler(); // 处理 LVGL 任务
    }

    return 0;
}
在上面的示例中,当按钮被单击时,btn_event_cb() 回调函数会被触发,并检查两次事件之间的时间间隔。如果小于固定时间间隔,则输出 "Double click!",否则输出 "Single click."。

请注意,本示例代码使用了 lv_tick_get() 函数来获取当前系统时间,该函数需要您配置并启用 LVGL 的计时器(在 lv_conf.h 中进行配置)。另外,您可以通过修改 DOUBLE_CLICK_TIME_MS 宏来自定义双击事件的时间间隔。

#141 Re: 计算机图形/GUI/RTOS/FileSystem/OpenGL/DirectX/SDL2 » LVGL 学习记录 » 2023-05-04 17:21:27

void my_event(lv_event_t * e)
{
    lv_event_code_t code = lv_event_get_code(e);
    static uint32_t t;
    if(code == LV_EVENT_PRESSED) {
        t = lv_tick_get();
    } 
    else if(code == LV_EVENT_PRESSING) {
        if(lv_tick_elaps(t) > 3000) {
            /*Do something*/
        }
    }
}

#142 Re: 计算机图形/GUI/RTOS/FileSystem/OpenGL/DirectX/SDL2 » LVGL 学习记录 » 2023-05-04 13:42:59

static void drag_event_handler(lv_event_t * e)
{
    lv_obj_t * obj = lv_event_get_target(e);

    lv_indev_t * indev = lv_indev_get_act();
    lv_point_t vect;
    lv_indev_get_vect(indev, &vect);

    lv_coord_t x = lv_obj_get_x(obj) + vect.x;
    lv_coord_t y = lv_obj_get_y(obj) + vect.y;
    lv_obj_set_pos(obj, x, y);
}


/**
 * Make an object dragable.
 */
void lv_example_obj_2(void)
{
    lv_obj_t * obj;
    obj = lv_obj_create(lv_scr_act());
    lv_obj_set_size(obj, 150, 100);
    lv_obj_add_event_cb(obj, drag_event_handler, LV_EVENT_PRESSING, NULL);

    lv_obj_t * label = lv_label_create(obj);
    lv_label_set_text(label, "Drag me");
    lv_obj_center(label);

}

拖拽屏幕上面的控件

#143 Re: 全志 SOC » R528-s3点7.84" MIPI屏 » 2023-04-20 13:29:24

这是用什么软件抓包?

#147 Re: 全志 SOC » 想在V3s上驱动墨水屏,并开启fb设备,发现从framebuffer中无法更新画面 » 2023-03-23 22:44:32

可以多提供一点信息分析分析,比如用什么接口,用什么驱动芯片。

#150 Re: 全志 SOC » 昨天有朋友在 Q群问如何读spi nor flash(W25Q128/MX25L256)的唯一Id(UID), 刚好最近要用到,放狗搜了一圈 » 2022-12-24 20:31:49

Download new driver file m25p80.c

diff the origin m25p80.c and my m25p80.c

64,66d63
< /* Used for Winbond flashes only. */
< #define OPCODE_WINBOND_ID    0x4b    /* Get flash unique id */
< 
1001,1016d997
< /* flash unique id probe */
< static int unique_id_prob(struct spi_device *spi, u8 *id)
< {
<     int			tmp;
<     u8			code[5];
< 
<     code[0] = OPCODE_WINBOND_ID;
<     tmp = spi_write_then_read(spi, &code, 5, id, 8);
<     if (tmp < 0) {
<         pr_debug("%s: error %d reading UNIQUE ID\n",
<                 dev_name(&spi->dev), tmp);
<         return tmp;
<     }
<     return 0;
< }
< 
1125,1136d1105
<     /* show unique id in kernel debug log for w25q64 or w25q128. */
<     if(info->jedec_id == 0xef4017 || info->jedec_id == 0xef4018) {
<         u8 unique_id[8];
<         if(!unique_id_prob(spi, unique_id)) {
<             dev_warn(&spi->dev, "flash id: %02x%02x%02x%02x%02x%02x%02x%02x\n",
<                     unique_id[7], unique_id[6], unique_id[5], unique_id[4],
<                     unique_id[3], unique_id[2], unique_id[1], unique_id[0]);
<         } else {
<             dev_warn(&spi->dev, "failed to get flash unique id.\n");
<         }
<     }
< 

#151 Re: 计算机图形/GUI/RTOS/FileSystem/OpenGL/DirectX/SDL2 » LVGL 学习记录 » 2022-12-23 19:35:37

QQ截图20221223193308.png



    else if(code == LV_EVENT_PRESSED) {
        colorwheel->last_change_time = lv_tick_get();
        lv_indev_get_point(lv_indev_get_act(), &colorwheel->last_press_point);
        res = double_click_reset(obj);
        if(res != LV_RES_OK) return;
    }
    else if(code == LV_EVENT_PRESSING) {
        lv_indev_t * indev = lv_indev_get_act();
        if(indev == NULL) return;

        lv_indev_type_t indev_type = lv_indev_get_type(indev);
        lv_point_t p;
        if(indev_type == LV_INDEV_TYPE_ENCODER || indev_type == LV_INDEV_TYPE_KEYPAD) {
            p.x = obj->coords.x1 + lv_obj_get_width(obj) / 2;
            p.y = obj->coords.y1 + lv_obj_get_height(obj) / 2;
        }
        else {
            lv_indev_get_point(indev, &p);
        }

        lv_coord_t drag_limit = indev->driver->scroll_limit;
        if((LV_ABS(p.x - colorwheel->last_press_point.x) > drag_limit) ||
           (LV_ABS(p.y - colorwheel->last_press_point.y) > drag_limit)) {
            colorwheel->last_change_time = lv_tick_get();
            colorwheel->last_press_point.x = p.x;
            colorwheel->last_press_point.y = p.y;
        }

        p.x -= obj->coords.x1;
        p.y -= obj->coords.y1;

        /*Ignore pressing in the inner area*/
        uint16_t w = lv_obj_get_width(obj);

        int16_t angle = 0;
        lv_coord_t cir_w = lv_obj_get_style_arc_width(obj, LV_PART_MAIN);

LVGL双击实现 double click

#153 Re: VMWare/Linux/Ubuntu/Fedora/CentOS/U-BOOT » 请问我可以设置Ubuntu的Framebuffer size吗?软件在嵌入式系统fb(800*1280)跑, 我想在Ubuntu下用fb模拟 » 2022-12-19 21:02:27

拉轰的脚踏车 说:

晕, 用 fbset 就可以了, 实时随意调整分辨率:

fbset -xres 800 -yres 1280


真是没想到如此简单。

ubuntu18.04 不行

#154 Re: 计算机图形/GUI/RTOS/FileSystem/OpenGL/DirectX/SDL2 » LVGL 学习记录 » 2022-12-10 19:20:10

lv_obj_t* slider1;
lv_obj_t *label1, *label2;

void button_event_cb(lv_event_t* e)
{
    lv_slider_set_value(slider1, 100, LV_ANIM_OFF);
}

void slider_event_cb(lv_event_t* e)
{
    int32_t value = lv_slider_get_value(slider1);
    char valueStr[32];

    value = lv_slider_get_left_value(slider1);
    snprintf(valueStr, sizeof(valueStr), "%d", value);
    lv_label_set_text(label1, (valueStr));

    value = lv_slider_get_value(slider1);
    snprintf(valueStr, sizeof(valueStr), "%d", value);
    lv_label_set_text(label2, (valueStr));
}

void lv_demo_test2()
{
    slider1 = lv_slider_create(lv_scr_act());

    lv_obj_center(slider1);
    
    lv_slider_set_range(slider1, -255, 255);
    lv_slider_set_mode(slider1, LV_SLIDER_MODE_RANGE);
    lv_obj_add_event_cb(slider1, slider_event_cb, LV_EVENT_VALUE_CHANGED, NULL);
    label1 = lv_label_create(lv_scr_act());
    label2 = lv_label_create(lv_scr_act());
    lv_obj_align_to(label1, slider1, LV_ALIGN_OUT_BOTTOM_LEFT, 0, 10);
    lv_obj_align_to(label2, slider1, LV_ALIGN_OUT_BOTTOM_RIGHT, 0, 10);

    lv_slider_set_left_value(slider1, -100, LV_ANIM_OFF);
    lv_slider_set_value(slider1, 100, LV_ANIM_OFF);
    lv_obj_set_size(slider1, 20, 200);

    lv_obj_t* button1 = lv_btn_create(lv_scr_act());
    lv_obj_t* label3 = lv_label_create(button1);
    lv_label_set_text(label3, "Test");
    lv_obj_add_event_cb(button1, button_event_cb, LV_EVENT_CLICKED, NULL);
    lv_obj_align_to(button1, slider1, LV_ALIGN_OUT_BOTTOM_MID, 0, 30);
}

_20221210191949.png

#155 Re: 计算机图形/GUI/RTOS/FileSystem/OpenGL/DirectX/SDL2 » LVGL 学习记录 » 2022-12-10 19:02:18

lv_obj_t* slider1;
lv_obj_t *label1, *label2;

void slider_event_cb(lv_event_t* e)
{
    int32_t value = lv_slider_get_value(slider1);
    char valueStr[32];

    value = lv_slider_get_left_value(slider1);
    snprintf(valueStr, sizeof(valueStr), "%d", value);
    lv_label_set_text(label1, (valueStr));

    value = lv_slider_get_value(slider1);
    snprintf(valueStr, sizeof(valueStr), "%d", value);
    lv_label_set_text(label2, (valueStr));
}

void lv_demo_test2()
{
    slider1 = lv_slider_create(lv_scr_act());

    lv_obj_center(slider1);
    
    lv_slider_set_range(slider1, -255, 255);
    lv_slider_set_mode(slider1, LV_SLIDER_MODE_RANGE);
    lv_obj_add_event_cb(slider1, slider_event_cb, LV_EVENT_VALUE_CHANGED, NULL);
    label1 = lv_label_create(lv_scr_act());
    label2 = lv_label_create(lv_scr_act());
    lv_obj_align_to(label1, slider1, LV_ALIGN_OUT_BOTTOM_LEFT, 0, 10);
    lv_obj_align_to(label2, slider1, LV_ALIGN_OUT_BOTTOM_RIGHT, 0, 10);

}

_20221210190159.png

#156 Re: 计算机图形/GUI/RTOS/FileSystem/OpenGL/DirectX/SDL2 » LVGL 学习记录 » 2022-12-10 12:22:48

lv_obj_t* led1 = lv_led_create(lv_scr_act());

茴的三种写法,三种居中方法:

    lv_obj_set_align(led1, LV_ALIGN_CENTER);
    lv_obj_center(led1);
    lv_obj_align(led1, LV_ALIGN_CENTER, 0, 0);

#158 Re: 计算机图形/GUI/RTOS/FileSystem/OpenGL/DirectX/SDL2 » LVGL 学习记录 » 2022-12-06 17:01:11

短按触发事件顺序:
Pressed
Released
Short clicked
Clicked

长按触发事件顺序:
Pressed
Long press
Long press repeat
Long press repeat
Long press repeat
Long press repeat
Long press repeat
Long press repeat
Long press repeat
Long press repeat
Long press repeat
Released
Clicked

#159 计算机图形/GUI/RTOS/FileSystem/OpenGL/DirectX/SDL2 » LVGL 学习记录 » 2022-12-06 16:36:47

ubuntu
回复: 10
    static lv_indev_drv_t pointer_driver;
    lv_indev_drv_init(&pointer_driver);
    pointer_driver.type = LV_INDEV_TYPE_POINTER;
    pointer_driver.read_cb = lv_win32_pointer_driver_read_callback;
    pointer_driver.feedback_cb = btn_feedback_event_cb;
    lv_win32_pointer_device_object = lv_indev_drv_register(&pointer_driver);
void btn_feedback_event_cb(lv_indev_drv_t* indev_drv, lv_event_code_t event)
{
    printf("btn_feedback_event_cb\n");
    switch (event)
    {
    case LV_EVENT_PRESSED:
        printf("Pressed\n");
        break;

    case LV_EVENT_SHORT_CLICKED:
        printf("Short clicked\n");
        break;

    case LV_EVENT_CLICKED:
        printf("Clicked\n");
        break;

    case LV_EVENT_LONG_PRESSED:
        printf("Long press\n");
        break;

    case LV_EVENT_LONG_PRESSED_REPEAT:
        printf("Long press repeat\n");
        break;

    case LV_EVENT_RELEASED:
        printf("Released\n");
        break;

    default:
        printf("nothing\n");
        break;
    }
}

#161 Re: 全志 SOC » 试一试把 V3s 当做 无线 wifi 热点 » 2022-09-29 18:14:51

BR2_PACKAGE_DHCP=y

这个软件占用内存太多了,

嵌入式的话建议用busybox自带的 udhcpd,内存占用优秀太多了。

#162 Re: 上海航芯 » Linux开发环境下试玩ACM32F403RET7开发板 » 2022-07-02 22:04:25

牛叉, 第一次看到搞单片机的朋友只用Linux的。

#163 Re: 全志 SOC » 【小智出品】安卓4寸86面板开发板SW106开卖啦,2.54排针引出IO。 » 2022-06-14 08:55:13

bigbigcong 说:

1个G的片上内存!也是人才啊,,,话说这个芯片在网上怎么找不到相关的资料?是最新出的吗?

SW106 手册: SW106_Datasheet V1.0.pdf

#165 Re: 君正Ingenic/X1000/X2000/T10/T20/T30 » 小白求助!君正T31N uboot启动卡住 » 2022-05-15 20:26:17

qlOvQlp 说:
ubuntu 说:

看来DDR有问题?

有可能,我准备再焊一块板试试

闲鱼的二手芯片,更有可能了。

#167 Re: 全志 SOC » R6 » 2022-05-11 14:20:12

sun3iw1p1-r6.dtsi:           
sun3iw1p1.dtsi:               
sun3iw1p1-violin-F1C200s.dtsi:
sun3iw1p1-r6-pinctrl.dtsi:   

R6就是 F1C的马甲

#168 Re: 全志 SOC » 不雷同开源送两片,可选 D1/ D1s/ V3x/XR806/XR829/XR32/R11【长期有效】, F1C200s/V3s暂停 » 2022-05-10 20:53:20

titishev 说:

FC100s芯片比V3s芯片好在哪里?

更便宜,而且F1C100s 有 TVIN/TVOUT

#169 Re: 全志 SOC » 不雷同开源送两片,可选 D1/ D1s/ V3x/XR806/XR829/XR32/R11【长期有效】, F1C200s/V3s暂停 » 2022-05-10 17:20:24

mysteryli 说:

这几个片子 有双核的吗

数过来数过去,居然一个都没有。

#171 Re: 全志 SOC » 搞定 T113 / T113-S3 裸奔驱动CAN (转) » 2022-05-10 11:25:05

#define  CAN0  0x02504000
#define  CAN1  0x02504400


#define CAN_OFFSET(can_base,offset)          (*((volatile uint32_t *)(can_base + (offset))))

#define CAN_MSEL(can_base)       CAN_OFFSET(can_base,0x0000) //CAN mode select register
#define CAN_CMD(can_base)        CAN_OFFSET(can_base,0x0004)  //CAN command register
#define CAN_STA(can_base)        CAN_OFFSET(can_base,0x0008)  //CAN status register
#define CAN_INT(can_base)        CAN_OFFSET(can_base,0x000C)  //CAN interrupt register
#define CAN_INTEN(can_base)      CAN_OFFSET(can_base,0x0010) //CAN interrupt enable register
#define CAN_BUSTIME(can_base)    CAN_OFFSET(can_base,0x0014) //CAN bus timing register
#define CAN_TEWL(can_base)       CAN_OFFSET(can_base,0x0018)  //CAN TX error warning limit register
#define CAN_ERRC(can_base)       CAN_OFFSET(can_base,0x001c)  //CAN error counter register
#define CAN_RMCNT(can_base)      CAN_OFFSET(can_base,0x0020)  //CAN receive message counter register
#define CAN_RBUF_SADDR(can_base) CAN_OFFSET(can_base,0x0024) //CAN receive buffer start address register
#define CAN_TRBUF0(can_base)     CAN_OFFSET(can_base,0x0040) //CAN TX/RX message buffer 0 register
#define CAN_TRBUF1(can_base)     CAN_OFFSET(can_base,0x0044) //CAN TX/RX message buffer 0 register
#define CAN_TRBUF2(can_base)     CAN_OFFSET(can_base,0x0048) //CAN TX/RX message buffer 0 register
#define CAN_TRBUF3(can_base)     CAN_OFFSET(can_base,0x004c) //CAN TX/RX message buffer 0 register
#define CAN_TRBUF4(can_base)     CAN_OFFSET(can_base,0x0050) //CAN TX/RX message buffer 0 register
#define CAN_TRBUF5(can_base)     CAN_OFFSET(can_base,0x0054) //CAN TX/RX message buffer 0 register
#define CAN_TRBUF6(can_base)     CAN_OFFSET(can_base,0x0058) //CAN TX/RX message buffer 0 register
#define CAN_TRBUF7(can_base)     CAN_OFFSET(can_base,0x005c) //CAN TX/RX message buffer 0 register
#define CAN_TRBUF8(can_base)     CAN_OFFSET(can_base,0x0060) //CAN TX/RX message buffer 0 register
#define CAN_TRBUF9(can_base)     CAN_OFFSET(can_base,0x0064) //CAN TX/RX message buffer 0 register
#define CAN_TRBUF10(can_base)    CAN_OFFSET(can_base,0x0068) //CAN TX/RX message buffer 0 register
#define CAN_TRBUF11(can_base)    CAN_OFFSET(can_base,0x006c) //CAN TX/RX message buffer 0 register
#define CAN_TRBUF12(can_base)    CAN_OFFSET(can_base,0x0070) //CAN TX/RX message buffer 0 register
#define CAN_ACPC(can_base)       CAN_OFFSET(can_base,0x0028) //CAN acceptance code 0 register(reset mode)
#define CAN_ACPM(can_base)       CAN_OFFSET(can_base,0x002C) //CAN acceptance mask 0 register(reset mode)
#define CAN_RBUF_RBACK(can_base) CAN_OFFSET(can_base,0x0180) //~0x1b0 //CAN transmit buffer for read back register
#define CAN_VERSION(can_base)    CAN_OFFSET(can_base,0x0300) //CAN Version Register




typedef  struct _t113_can_control_t_
{
  volatile uint32_t  * can_clk_gate;
  uint32_t  can_base;
  uint32_t  int_id;
  
}t113_can_control_t;


t113_can_control_t t113_can[2] = 
{
  {
    (volatile uint32_t  *)0x0200192C,
    0x02504000,
    53
  },
  {
    (volatile uint32_t  *)0x0200192C,
    0x02504400,
    54
  }
    
};

uint32_t rxd_buf[13];

void t113_can_irq_handle(void*  p)
{
   uint32_t    can_base = (uint32_t) p;
   uint32_t    int_sta =   CAN_INT(can_base);
   if(int_sta &  1)
   {
       /* 接收中断 */
       can_read_data(can_base,rxd_buf);
       /*  后续处理  */
   }
   if(int_sta & 2 )
   {
      /*发送中断*/    
   }
   if(int_sta & 0xFC )
   {
      /* 错 误 中断  */
   }
   
   CAN_INT(can_base) = int_sta;
   
}
       

void ini_can(int can_id)
{
    if(can_id > 1) return;
    
    GPIOB->CFG0  &= ~(0xff00 <<  (can_id * 8));
    GPIOB->CFG0  |=  (0x8800 <<  (can_id * 8)); 
    GPIOB->DRV0  |=  (0x3300 <<  (can_id * 8));
    
    t113_can_control_t * can_info = &t113_can[can_id];
    
    uint32_t   can_base = can_info->can_base;
    
    int can_int_id = can_info->int_id;

    *can_info->can_clk_gate  |= (1 << (16 + can_id)) | (1 << can_id);/* CCU_CAN_BGR */
    
    
   
    CAN_MSEL(can_base) |= 1; /* Reset mode selected*/
   /* 500KHz CAN速率 */
    CAN_BUSTIME(can_base) = (9          /* apb_clk = 100Mz , 100/10 = 10MHz*/ 
                           | (1 << 14)   /* Synchronization Jump Width :2 Tq clock cycles */
                           | (13 << 16)  /*Phase Segment 1 : 14 Tq clock cycles  */
                           | ( 3 << 20)  /*Phase Segment 2 :  4 Tq clock cycles  */
                           | ( 0 << 23));  /*  Bus line is sampled three times at the sample point */
  
   CAN_ACPC(can_base)  = 0xffffffff; /*实际使用时根据需要设置滤波*/
   CAN_ACPM(can_base)  = 0xffffffff; /*实际使用时根据需要设置滤波*/
   
   
   CAN_MSEL(can_base) &= (~1); 
   
   // CAN_MSEL(can_base) |= (1 << 2); /* Loopback Mode */
  
   CAN_MSEL(can_base) |= (1 << 3);/* Single Filter  */
   
   
   bsp_int_vect_set(can_int_id,  /* Assign ISR handler. */
                   1u,            /* 中断的优先级         */
                   1u,            /* 中断的目标CPU        */
                   (void *)can_base,        /* 参数      */
                   t113_can_irq_handle);
  
   
    irq_enable(can_int_id);//
    /* 使能中断  */
    CAN_INTEN(can_base) = 0x0FF;
    
}
void can_send_data(uint32_t    can_base,uint8_t * buf,int  len)
{
  
    CAN_CMD(can_base) |= (1 << 2);
  
    CAN_MSEL(can_base) &= (~1); 
     
    int retry = 1000;
    do{
      
       if(--retry == 0) break;
    }while(!(CAN_STA(can_base) & (1 << 2)));
    
    if(retry == 0) return;//
    
    uint32_t * des =  &CAN_TRBUF0(can_base);
    
    for(int i = 0; i < len; i++)
     des[i] = buf[i];
     
    //CAN_CMD(can_base) = (1 << 4);
     CAN_CMD(can_base) |= (1 << 0);
}
void can_read_data(uint32_t    can_base,uint8_t * buf)
{
    uint32_t * src =  &CAN_TRBUF0(can_base);
    for(int i = 0; i < 13; i++)
       buf[i] = (char)src[i];
   
     CAN_CMD(can_base) |= (1 << 2);
}


uint8_t can_teat_data[13] = 
   {
      8,
      0,
      0x80,
      0x55, /*   SFF - TX data byte 1 / EFF- ID[12:5]  */
      0x55, /*  SFF-TX data byte2[7:3] / EFF-ID[4:0]
                SFF-TX data byte2[2:0] */  
      0x55, /* SFF-TX data byte 3 / EFF-TX data byte 1 */
      0x55, /* SDATA4_EDATA2  SFF-TX data byte 4 / EFF-TX data byte 2  */
      0x55, /* SDATA5_EDATA3 SFF-TX data byte 5 / EFF-TX data byte 3   */
      0x55,/* SDATA5_EDATA4  SFF-TX data byte 6 / EFF-TX data byte 4   */
      0x55,/* SDATA5_EDATA5  SFF-TX data byte 7 / EFF-TX data byte 5   */
      0x55,/* SDATA5_EDATA6  SFF-TX data byte 8 / EFF-TX data byte 6   */
      0x55, /* SDATA5_EDATA7   */
      0x55 /*  SDATA5_EDATA8   */
   };


/* can_id: is 0 or 1 */
void t113_can_test(void)
{
    ini_can(0);
    ini_can(1);
    
   while(1)
   {
    
    can_send_data(CAN0,can_data);
     ms_delay(500);
    can_send_data(CAN1,can_data);
     ms_delay(500);

   }
   
}

#174 Re: 全志 SOC » 分享荔枝派zero V3s gc0312 / gc0308 mjpg-streamer IP摄像头固件 » 2022-05-01 18:54:39

QQ图片20220501185344.jpg

_20220501184303.png

楼主牛啊, 居然连网线都省了,直接 USB RNDIS 网卡搞定!

#175 Re: 全志 SOC » 怎么判断v3s已经是硬解 » 2022-05-01 18:39:47

@benlypan
牛,请问最后怎么解决的呢?

#177 Re: NXP i.MX6UL/6ULL » 请教,嵌入式linux中emmc和nand是如何分区的? » 2022-04-23 10:49:56

@Gentlepig
tf卡/emmc的内部固件已经做了写平衡算法,所以软件就当他们是硬盘一样操作了,直接把那些分区信息写到介质的最前面了。

视同硬盘。

#178 Re: NXP i.MX6UL/6ULL » 请教,嵌入式linux中emmc和nand是如何分区的? » 2022-04-23 10:21:23

@Gentlepig
emmc/tf卡默认是块设备 /dev/mmcblk*,
nand 最终也模拟成了块设备 /dev/mtdblock*

#179 Re: 全志 SOC » 请教大佬f1c200s在Linux下 获取ov2640的jpeg的方法 » 2022-04-22 23:34:34

@CATdaily

media-ctl --set-v4l2 '"ov5640 1-003c":0[fmt:YUYV8_2X8/640x480]'

LD_LIBRARY_PATH=/usr/lib/mjpg-streamer/:$LD_LIBRARY_PATH mjpg_streamer -i "input_uvc.so -y -d /dev/video0" -o "output_http.so -p 8080 -w /usr/share/mjpg-streamer/www"

然后就 OK 了。

#180 Re: Nuvoton N32905/N32926/NUC972/N9H20/N9H26/N9H30 » 请教,nuc970的nand是何时、如何分区的? » 2022-04-22 15:24:15

分区最终是 驱动完成的,通过 bootargs / dts 传入分区参数完成分区。

烧录工具只是把需要的文件或者文件的镜像弄进去。

#181 Re: NXP i.MX6UL/6ULL » 如何彻底擦除emmc上的Boot分区? » 2022-04-21 12:00:12

全志的SDK好像没有用到 mmcblk0boot0 mmcblk0boot1,直接用主分区的。

#182 Re: 全志 SOC » 闲鱼30元广告机板填坑主线uboot+主线linux » 2022-04-20 23:24:04

刚从垃圾堆翻出来,原来里面跑的应该是 Android 4.4 的系统。

#183 Re: VMWare/Linux/Ubuntu/Fedora/CentOS/U-BOOT » 记录一下常用易忘的Linux日常操作 » 2022-04-20 22:39:20

vi 删除 .config 里面的 #开头的行:

:g/^#/d
:g/^$/d

执行这两个命令即可

#184 Re: 全志 SOC » 开源基于全志V3X & RP2040的3D打印机主板,klipper上下位机一体 » 2022-04-20 21:20:23

xiaok 说:

@ubuntu
可以是可以但是会假死,树莓派4b4g,全志H5,H3这几个平台都试过,linux直驱会假死

是不是因为Linux 不是事实系统引起?

#185 Re: 全志 SOC » 开源基于全志V3X & RP2040的3D打印机主板,klipper上下位机一体 » 2022-04-20 21:00:12

xiaok 说:
cube 说:

楼主优秀,可以直接用 V3x的PWM驱动电机吗?可以不用RP2040单片机吗?

可以驱动,但是2040是跑klipper固件的,开源3d打印机固件。
用上位机跑不太好,毕竟不是实时

瞄了一下代码,貌似可以直驱: https://github.com/Klipper3d/klipper/tree/master/src/linux

#187 Re: 全志 SOC » 请教大咖:Licheepi zero 内核加载不停复位问题。谢谢! » 2022-02-16 22:41:50

[    0.748076] m25p80 spi32766.0: unrecognized JEDEC id bytes: 0b, 40, 18
[    0.754729] m25p80: probe of spi32766.0 failed with error -2


你的FLASH ID没有再表中

#189 Re: 全志 SOC » A133 打包 » 2022-02-07 17:34:08

提示的那几个参数要加上才行。

#192 Re: 全志 SOC » RTL8723BS蓝牙错误有人遇上吗? » 2022-01-23 20:18:33

root@TinaLinux:/# rtk_hciattach -n -s 115200 ttyS1 rtk_h5
Realtek Bluetooth :Realtek Bluetooth init uart with init speed:115200, type:HCI UART H5
Realtek Bluetooth :Realtek hciattach version 3.1

Realtek Bluetooth :Use epoll
Realtek Bluetooth :[SYNC] Get SYNC Resp Pkt
Realtek Bluetooth :[CONFIG] Get SYNC pkt
Realtek Bluetooth :[CONFIG] Get CONFG pkt
Realtek Bluetooth :[CONFIG] Get CONFG resp pkt
Realtek Bluetooth :dic is 1, cfg field 0x14
Realtek Bluetooth :H5 init finished

Realtek Bluetooth :Realtek H5 IC
Realtek Bluetooth :Receive cmd complete event of command: 1001
Realtek Bluetooth :HCI Version 0x08
Realtek Bluetooth :HCI Revision 0x000d
Realtek Bluetooth :LMP Subversion 0x8723
Realtek Bluetooth :Receive cmd complete event of command: fc6d
Realtek Bluetooth :Read ROM version 02
Realtek Bluetooth :LMP Subversion 0x8723
Realtek Bluetooth :EVersion 2
Realtek Bluetooth :IC: RTL8723DS
Realtek Bluetooth :Firmware/config: rtl8723d_fw, rtl8723d_config
Realtek Bluetooth :Couldnt open extra config /opt/rtk_btconfig.txt, No such file or directory
Realtek Bluetooth :Couldnt access customer BT MAC file /opt/bdaddr
Realtek Bluetooth :Origin cfg len 48
Realtek Bluetooth :55 ab 23 87 2a 00 0c 00 10 02 80 92 04 50 c5 ea
Realtek Bluetooth :19 e1 1b fd af 5f 01 a4 0b d9 00 01 0f e4 00 01
Realtek Bluetooth :08 f3 00 01 0c f4 00 08 01 00 01 90 00 00 09 04
Realtek Bluetooth :Config baudrate: 04928002
Realtek Bluetooth :uart flow ctrl: 1
Realtek Bluetooth :Vendor baud from Config file: 04928002
Realtek Bluetooth :New cfg len 48
Realtek Bluetooth :55 ab 23 87 2a 00 0c 00 10 02 80 92 04 50 c5 ea
Realtek Bluetooth :19 e1 1b fd af 5f 01 a4 0b d9 00 01 0f e4 00 01
Realtek Bluetooth :08 f3 00 01 0c f4 00 08 01 00 01 90 00 00 09 04
Realtek Bluetooth :Load FW /lib/firmware/rtlbt/rtl8723d_fw OK, size 52096
Realtek Bluetooth :rtb_get_fw_project_id: opcode 0, len 1, data 9
Realtek Bluetooth :FW version 0xaa7add92, Patch num 3
Realtek Bluetooth :Chip id 0x0001
Realtek Bluetooth :Chip id 0x0002
Realtek Bluetooth :Chip id 0x0003
Realtek Bluetooth :Patch length 0x81b8
Realtek Bluetooth :Start offset 0x00004980
Realtek Bluetooth :Svn version:    20318
Realtek Bluetooth :Coexistence: BTCOEX_20180125-2323

Realtek Bluetooth :FW  exists, Config file  exists
Realtek Bluetooth :Total len 33256 for fwc
Realtek Bluetooth :baudrate in change speed command: 0x02 0x80 0x92 0x04
Realtek Bluetooth :Receive cmd complete event of command: fc17
Realtek Bluetooth :Received cc of vendor change baud
Realtek Bluetooth :Final speed 1500000
Realtek Bluetooth :end_idx: 131, lp_len: 244, additional pkts: 0

Realtek Bluetooth :Start downloading...
Realtek Bluetooth :Send last pkt
Realtek Bluetooth :Enable host hw flow control
Realtek Bluetooth :h5_hci_reset: Issue hci reset cmd
Realtek Bluetooth ERROR: Out-of-order packet arrived, got(6)expected(7)
Realtek Bluetooth ERROR: Out-of-order packet arrived, got(6)expected(7)
Realtek Bluetooth ERROR: Out-of-order packet arrived, got(6)expected(7)
Realtek Bluetooth ERROR: Out-of-order packet arrived, got(6)expected(7)
Realtek Bluetooth ERROR: Out-of-order packet arrived, got(6)expected(7)
Realtek Bluetooth ERROR: Out-of-order packet arrived, got(6)expected(7)
Realtek Bluetooth ERROR: Out-of-order packet arrived, got(6)expected(7)
Realtek Bluetooth ERROR: Out-of-order packet arrived, got(6)expected(7)
Realtek Bluetooth ERROR: Out-of-order packet arrived, got(6)expected(7)
Realtek Bluetooth ERROR: Out-of-order packet arrived, got(6)expected(7)
Realtek Bluetooth ERROR: Out-of-order packet arrived, got(6)expected(7)
Realtek Bluetooth WARN: OP_HCI_RESET Transmission timeout
Realtek Bluetooth ERROR: Out-of-order packet arrived, got(6)expected(7)
Realtek Bluetooth ERROR: Out-of-order packet arrived, got(6)expected(7)
Realtek Bluetooth ERROR: Out-of-order packet arrived, got(6)expected(7)
Realtek Bluetooth ERROR: Out-of-order packet arrived, got(6)expected(7)
Realtek Bluetooth ERROR: Out-of-order packet arrived, got(6)expected(7)
Realtek Bluetooth ERROR: Out-of-order packet arrived, got(6)expected(7)
Realtek Bluetooth ERROR: Out-of-order packet arrived, got(6)expected(7)
Realtek Bluetooth ERROR: Out-of-order packet arrived, got(6)expected(7)
Realtek Bluetooth ERROR: Out-of-order packet arrived, got(6)expected(7)
Realtek Bluetooth ERROR: Out-of-order packet arrived, got(6)expected(7)
Realtek Bluetooth ERROR: Out-of-order packet arrived, got(6)expected(7)
Realtek Bluetooth ERROR: Out-of-order packet arrived, got(6)expected(7)
Realtek Bluetooth WARN: OP_HCI_RESET Transmission timeout
Realtek Bluetooth ERROR: Retransmission exhausts
root@TinaLinux:/#

奇怪,我的 H5 勾上了 CONFIG_BT_HCIUART_3WIRE=y 也一样的。

#195 Re: 全志 SOC » D1哪吒v1.2版本原理图与PCB源文件 可以下载了 » 2022-01-21 12:28:35

全志D1/D1s RISC-V(基于平头哥C906) 哪吒开发板超全资料合集
https://whycan.com/t_6440.html

#199 Re: DIY/综合/Arduino/写字机/3D打印机/智能小车/平衡车/四轴飞行/MQTT/物联网 » VMware虚拟机共享windows目录性能调优小技巧 » 2022-01-19 13:16:31

试了一下,确实比以前快,由于磁盘转得够快,把我的USB鼠标都弄得一卡一卡的。

#200 Re: 全志 SOC » 一个网友用XFEL烧录芒果R3 spi nand,实验成功了。 » 2022-01-19 11:55:30

@xboot
请教全志官方烧录软件用哪些uboot命令烧录的?

#201 Re: Cortex M0/M3/M4/M7 » DAPLink添加WINUSB支持。。 » 2022-01-14 09:51:19

@XIVN1987
“微不足道”,让我想起一个有故事的视频,斜眼笑.gif

#202 Re: 全志 SOC » f1c200快速启动验证研究 » 2022-01-12 09:59:48

shaoxi2010 说:
kekemuyu 说:

2s进ui太牛了,是用的spi falsh吗?

是的,Tiny200自带的兆易spinand。不过目前目前整个rootfs也就十多M,感觉换nor应该更划算点吧。

楼主牛人!可以提供一个烧录固件体验一下吗?

#203 Re: 全志 SOC » qt5编写的程序怎么才能在tty7中运行? » 2021-12-29 16:12:58

夜阑卧听 说:
cube 说:

你是怎么在TTY1执行的呢?

按crtl+alt+F1,然后用命令行运行程序

嵌入式也可以吗?

#204 Re: 全志 SOC » 求助各位大佬,我的车机最近变砖了,用的全志t7的芯片 » 2021-12-27 10:11:35

@huangkun
感觉车机电源部分出问题了,或者插入特殊TF卡硬件看门狗复位了。

#205 Re: 全志 SOC » v3s 连接st7789屏显示闪屏,显示更新不正常 » 2021-12-12 20:38:42

我的 V3s 驱动 ST7789 像素点也是逗得狠,特别是颜色过渡的地方,请问楼主最后怎么解决的呢?

#206 Php/Nodejs/Web/HTML5/Javascript/微信开发/Python » 请问这个 npm install 出错是什么原因呢? » 2021-12-12 10:57:31

ubuntu
回复: 0
$ npm install
loadDep:zxcvbn → get      ▄ ╢███████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
WARN engine @socket.io/redis-adapter@7.1.0: wanted: {"node":">=10.0.0"} (current: {"node":"8.10.0","npm":"3.5.2"})
WARN engine spider-detector@2.0.0: wanted: {"node":">=8.15.0","npm":">=6.9.0","yarn":">=1.17.3"} (current: {"node":"8.10.0loadDep:zxcvbn → cache ad ▄ ╢███████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
WARN engine ipaddr.js@2.0.1: wanted: {"node":">= 10"} (current: {"node":"8.10.0","npm":"3.5.2"})
loadDep:zxcvbn → mapToReg ▀ ╢███████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
WARN engine connect-pg-simple@7.0.0: wanted: {"node":">=12.0.0"} (current: {"node":"8.10.0","npm":"3.5.2"})
loadDep:zxcvbn → resolveW ▀ ╢███████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
WARN engine connect-redis@6.0.0: wanted: {"node":">=12"} (current: {"node":"8.10.0","npm":"3.5.2"})
WARN engine html-to-text@8.1.0: wanted: {"node":">=10.23.2"} (current: {"node":"8.10.0","npm":"3.5.2"})
npm WARN deprecated request-promise-native@1.0.9: request-promise-native has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142
loadDep:zxcvbn            ▐ ╢███████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
WARN engine archiver@5.3.0: wanted: {"node":">= 10"} (current: {"node":"8.10.0","npm":"3.5.2"})
loadDep:zxcvbn → mapToReg ▌ ╢███████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
loadDep:zxcvbn → addRemot ▐ ╢███████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
npm WARN deprecated uglify-es@3.3.9: support for ECMAScript is superseded by `uglify-js` as of v3.13.0
loadDep:zxcvbn → addRemot ▐ ╢███████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
loadDep:zxcvbn → mapToReg ▌ ╢███████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
npm ERR! Linux 5.4.0-90-generic
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install"
npm ERR! node v8.10.0
npm ERR! npm  v3.5.2
npm ERR! code EMISSINGARG

npm ERR! typeerror Error: Missing required argument #1
npm ERR! typeerror     at andLogAndFinish (/usr/share/npm/lib/fetch-package-metadata.js:31:3)
npm ERR! typeerror     at fetchPackageMetadata (/usr/share/npm/lib/fetch-package-metadata.js:51:22)
npm ERR! typeerror     at resolveWithNewModule (/usr/share/npm/lib/install/deps.js:456:12)
npm ERR! typeerror     at /usr/share/npm/lib/install/deps.js:457:7
npm ERR! typeerror     at /usr/share/npm/node_modules/iferr/index.js:13:50
npm ERR! typeerror     at /usr/share/npm/lib/fetch-package-metadata.js:37:12
npm ERR! typeerror     at addRequestedAndFinish (/usr/share/npm/lib/fetch-package-metadata.js:82:5)
npm ERR! typeerror     at returnAndAddMetadata (/usr/share/npm/lib/fetch-package-metadata.js:117:7)
npm ERR! typeerror     at pickVersionFromRegistryDocument (/usr/share/npm/lib/fetch-package-metadata.js:134:20)
npm ERR! typeerror     at /usr/share/npm/node_modules/iferr/index.js:13:50
npm ERR! typeerror This is an error with npm itself. Please report this error at:
npm ERR! typeerror     <http://github.com/npm/npm/issues>
npm ERR! Linux 5.4.0-90-generic
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install"
npm ERR! node v8.10.0
npm ERR! npm  v3.5.2
npm ERR! code EMISSINGARG

npm ERR! typeerror Error: Missing required argument #1
npm ERR! typeerror     at andLogAndFinish (/usr/share/npm/lib/fetch-package-metadata.js:31:3)
npm ERR! typeerror     at fetchPackageMetadata (/usr/share/npm/lib/fetch-package-metadata.js:51:22)
npm ERR! typeerror     at resolveWithNewModule (/usr/share/npm/lib/install/deps.js:456:12)
npm ERR! typeerror     at /usr/share/npm/lib/install/deps.js:457:7
npm ERR! typeerror     at /usr/share/npm/node_modules/iferr/index.js:13:50
npm ERR! typeerror     at /usr/share/npm/lib/fetch-package-metadata.js:37:12
npm ERR! typeerror     at addRequestedAndFinish (/usr/share/npm/lib/fetch-package-metadata.js:82:5)
npm ERR! typeerror     at returnAndAddMetadata (/usr/share/npm/lib/fetch-package-metadata.js:117:7)
npm ERR! typeerror     at pickVersionFromRegistryDocument (/usr/share/npm/lib/fetch-package-metadata.js:134:20)
npm ERR! typeerror     at /usr/share/npm/node_modules/iferr/index.js:13:50
npm ERR! typeerror This is an error with npm itself. Please report this error at:
npm ERR! typeerror     <http://github.com/npm/npm/issues>
WARN engine helmet@4.6.0: wanted: {"node":">=10.0.0"} (current: {"node":"8.10.0","npm":"3.5.2"})
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
WARN engine postcss@8.4.4: wanted: {"node":"^10 || ^12 || >=14"} (current: {"node":"8.10.0","npm":"3.5.2"})
WARN engine sharp@0.29.3: wanted: {"node":">=12.13.0"} (current: {"node":"8.10.0","npm":"3.5.2"})
npm ERR! Linux 5.4.0-90-generic
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install"
npm ERR! node v8.10.0
npm ERR! npm  v3.5.2
npm ERR! code EMISSINGARG

npm ERR! typeerror Error: Missing required argument #1
npm ERR! typeerror     at andLogAndFinish (/usr/share/npm/lib/fetch-package-metadata.js:31:3)
npm ERR! typeerror     at fetchPackageMetadata (/usr/share/npm/lib/fetch-package-metadata.js:51:22)
npm ERR! typeerror     at resolveWithNewModule (/usr/share/npm/lib/install/deps.js:456:12)
npm ERR! typeerror     at /usr/share/npm/lib/install/deps.js:457:7
npm ERR! typeerror     at /usr/share/npm/node_modules/iferr/index.js:13:50
npm ERR! typeerror     at /usr/share/npm/lib/fetch-package-metadata.js:37:12
npm ERR! typeerror     at addRequestedAndFinish (/usr/share/npm/lib/fetch-package-metadata.js:82:5)
npm ERR! typeerror     at returnAndAddMetadata (/usr/share/npm/lib/fetch-package-metadata.js:117:7)
npm ERR! typeerror     at pickVersionFromRegistryDocument (/usr/share/npm/lib/fetch-package-metadata.js:134:20)
npm ERR! typeerror     at /usr/share/npm/node_modules/iferr/index.js:13:50
npm ERR! typeerror This is an error with npm itself. Please report this error at:
npm ERR! typeerror     <http://github.com/npm/npm/issues>
WARN engine autoprefixer@10.4.0: wanted: {"node":"^10 || ^12 || >=14"} (current: {"node":"8.10.0","npm":"3.5.2"})
WARN engine mongodb@4.2.1: wanted: {"node":">=12.9.0"} (current: {"node":"8.10.0","npm":"3.5.2"})
npm ERR! Linux 5.4.0-90-generic
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install"
npm ERR! node v8.10.0
npm ERR! npm  v3.5.2
npm ERR! code EMISSINGARG

npm ERR! typeerror Error: Missing required argument #1
npm ERR! typeerror     at andLogAndFinish (/usr/share/npm/lib/fetch-package-metadata.js:31:3)
npm ERR! typeerror     at fetchPackageMetadata (/usr/share/npm/lib/fetch-package-metadata.js:51:22)
npm ERR! typeerror     at resolveWithNewModule (/usr/share/npm/lib/install/deps.js:456:12)
npm ERR! typeerror     at /usr/share/npm/lib/install/deps.js:457:7
npm ERR! typeerror     at /usr/share/npm/node_modules/iferr/index.js:13:50
npm ERR! typeerror     at /usr/share/npm/lib/fetch-package-metadata.js:37:12
npm ERR! typeerror     at addRequestedAndFinish (/usr/share/npm/lib/fetch-package-metadata.js:82:5)
npm ERR! typeerror     at returnAndAddMetadata (/usr/share/npm/lib/fetch-package-metadata.js:117:7)
npm ERR! typeerror     at pickVersionFromRegistryDocument (/usr/share/npm/lib/fetch-package-metadata.js:134:20)
npm ERR! typeerror     at /usr/share/npm/node_modules/iferr/index.js:13:50
npm ERR! typeerror This is an error with npm itself. Please report this error at:
npm ERR! typeerror     <http://github.com/npm/npm/issues>

#207 Re: 全志 SOC » 全志D1芯片之终极探索 » 2021-12-10 16:42:42

xboot 说:

T113,也就是T133(这两名字原厂还没想好?)已经确认是双核A7,跟F133为同一个晶圆,同一个封装,pin脚定义。开的是双核cortex-a7,无RISC-V。

怪不得叫 F133, 原来里面还藏有个 T133。

#208 Re: 8051/STC8/AT89C51/N76E003 » 一元钱领的 HC89S003AF4开发板可以改成DAP LINK » 2021-12-09 14:51:20

wh201906 说:

在哪儿可以领啊?

有点历史了,疫情前的事情。现在可能闲鱼还有。

#209 Re: 全志 SOC » 子午线V3s路由器试玩 » 2021-11-23 08:22:05

确实值得学习,那些网络设备 br-lan, mon0 什么的以前都没见过,

[ 1021.395647] dhd_stop: Enter c31ef800
[ 1021.400934] dhd_set_mcast_list_handler: interface info not available/down
[ 1021.409582] dhdcdc_set_ioctl: SET PM to 0
[ 1021.418839] CFGP2P-ERROR) wl_cfgp2p_disable_discovery :
[ 1021.418852]  do nothing, not initialized
[ 1021.428259] CFGP2P-ERROR) wl_cfgp2p_deinit_priv :
[ 1021.428264] In
[ 1021.439386] dhd_stop: Exit
[ 1021.525007] dhd_open: Enter c31ef800
[ 1021.562579] dhd_open: Exit ret=0
[ 1021.593042] dhd_set_monitor: if 0 val 1851876211,cur   (null)
[ 1021.692969] dhdcdc_set_ioctl: SET PM to 0
[ 1021.785666] dhd_set_monitor: if 0 val 3,cur c248e000
[ 1021.790644] dhd_set_monitor: Mismatched params, return
[ 1198.921753] device mon0 entered promiscuous mode
[ 1618.888547] sys_check.sh (16292): drop_caches: 3
[ 2218.911067] sys_check.sh (19352): drop_caches: 3
[ 2818.921089] sys_check.sh (22296): drop_caches: 3
[ 3418.947203] sys_check.sh (25270): drop_caches: 3
[ 4019.001705] sys_check.sh (28157): drop_caches: 3
[ 4618.970054] sys_check.sh (31190): drop_caches: 3

shell 信息可以出现在 kmsg 里面是什么原理?

还有他的WIFI网卡,既可以自己做热点,又可以同时连接别的热点,不知道怎么做到的。

目前还不能通过WIFI桥接上网, 虽然在串口终端ping qq.com 正常。

#210 Re: 全志 SOC » 怎样在v3s上使用gcc编译器 » 2021-11-21 16:55:47

以前的buildroot可以构建arm linux下的gcc,现在新版本已经删除了。

如果把 debian 怼上去,可以通过apt安装gcc。

#211 Re: 全志 SOC » v3s lichee zero 单独usb供电,启动到uboot就没戏了? » 2021-11-16 12:19:49

U-Boot SPL 2021.07 (Nov 13 2021 - 11:49:14 +0800)
DRAM: 64 MiB
Trying to boot from MMC1


U-Boot 2021.07 (Nov 13 2021 - 11:49:14 +0800) Allwinner Technology

CPU:   Allwinner V3s (SUN8I 1681)
Model: Smallwit Pi Lite
DRAM:  64 MiB
MMC:   mmc@1c0f000: 0
Loading Environment from nowhere... OK
In:    serial@1c28000
Out:   serial@1c28000
Err:   serial@1c28000
Net:   No ethernet found.
Hit any key to stop autoboot:  0
switch to partitions #0, OK
mmc0 is current device
MMC Device 1 not found
no mmc device at slot 1
SF: Detected n25q128a13 with page size 256 Bytes, erase size 4 KiB, total 16 MiB
=========================
Boot Device: mmc0
Boot Slot 0: mmc0
Boot Slot 1: spi-nor
=========================
switch to partitions #0, OK
mmc0 is current device
Booting from MMC0...
4661328 bytes read in 261 ms (17 MiB/s)
14142 bytes read in 5 ms (2.7 MiB/s)
Kernel image @ 0x40000000 [ 0x000000 - 0x472050 ]
## Flattened Device Tree blob at 40700000
   Booting using the fdt blob at 0x40700000
   Loading Device Tree to 416f9000, end 416ff73d ... OK

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0

注意看信息,第一次是SPL,第二次才是真正的UBOOT

#212 Re: 技术人生/软件使用技巧/破解经验/技术吐槽/灌水 » 立创海外50讨论 » 2021-11-14 23:38:46

泼盆冷水,据说清关费用自己扛,不能退单,否则拉黑,Q群看到的,真实性有待验证。

#214 Re: SigmaStar/SSD201/SSD202/SSD212 » 有一个对标F1C800的芯片SigmaStar SSD201有谁了解吗 双核A7 » 2021-10-10 17:08:37

binbin 说:
fogwizard 说:

同感,料是好料,用户手册都没得提供,说多了都是泪

这家公司有打电话问过, 不好打交道的,问他要代理商的电话 也不给,跟他做生意  还不愿意的样子

现在芯片是卖方市场,会鸟人才怪了?

#215 Re: 全志 SOC » 用V3S跑QT5??? » 2021-09-26 12:18:58

只勾选 Qt 的ui部分不需要多少空间。

#219 Re: ESP32/ESP8266 » ESP8266的外设真的很拉垮 » 2021-09-01 12:49:00

I2C和PWM都是软件实现的实际上硬件并没有

阔怕阔怕

#220 Re: VMWare/Linux/Ubuntu/Fedora/CentOS/U-BOOT » 记录一下常用易忘的Linux日常操作 » 2021-08-28 10:21:51

objdump -T 查看动态链接库导出的函数。

$ riscv64-linux-gnu-objdump -T  ./out/d1-nezha/compile_dir/target/rootfs/usr/lib/libuapi.so

./out/d1-nezha/compile_dir/target/rootfs/usr/lib/libuapi.so:     file format elf64-littleriscv

DYNAMIC SYMBOL TABLE:
0000000000001970 l    d  .text  0000000000000000              .text
0000000000000000      DF *UND*  0000000000000000  GLIBC_2.27  fprintf
0000000000000000  w   D  *UND*  0000000000000000              _ITM_deregisterTMCloneTable
0000000000000000      DF *UND*  0000000000000000  GLIBC_2.27  getenv
0000000000000000      DF *UND*  0000000000000000  GLIBC_2.27  munmap
0000000000000000      DF *UND*  0000000000000000  GLIBC_2.27  malloc
0000000000000000      DF *UND*  0000000000000000  GLIBC_2.27  fputs
0000000000000000      DF *UND*  0000000000000000  GLIBC_2.27  usleep
0000000000000000      DF *UND*  0000000000000000  GLIBC_2.27  mmap64
0000000000000000      DF *UND*  0000000000000000  GLIBC_2.27  __errno_location
0000000000000000      DF *UND*  0000000000000000  GLIBC_2.27  pthread_mutex_unlock
0000000000000000      DF *UND*  0000000000000000  GLIBC_2.27  memcpy
0000000000000000      DF *UND*  0000000000000000  GLIBC_2.27  strerror
0000000000000000      DF *UND*  0000000000000000  GLIBC_2.27  close
0000000000000000      DF *UND*  0000000000000000  GLIBC_2.27  puts
0000000000000000      DF *UND*  0000000000000000  GLIBC_2.27  ioctl
0000000000000000      DO *UND*  0000000000000000  GLIBC_2.27  stderr
0000000000000000      DF *UND*  0000000000000000  GLIBC_2.27  pthread_mutex_lock
0000000000000000  w   DF *UND*  0000000000000000  GLIBC_2.27  __cxa_finalize
0000000000000000  w   D  *UND*  0000000000000000              _ITM_registerTMCloneTable
0000000000000000      DF *UND*  0000000000000000  GLIBC_2.27  open64
0000000000000000      DF *UND*  0000000000000000  GLIBC_2.27  strcmp
0000000000000000      DF *UND*  0000000000000000  GLIBC_2.27  memset
0000000000000000      DF *UND*  0000000000000000  GLIBC_2.27  free
0000000000005258 g    DO .bss   0000000000000028  Base        g_ion_mutex_alloc
0000000000001aae g    DF .text  0000000000000066  Base        sunxi_ion_alloc_get_viraddr_byFd
0000000000002120 g    DF .text  000000000000009e  Base        sunxi_ion_alloc_get_total_size
00000000000023ca g    DF .text  0000000000000014  Base        sunxi_ion_flush_cache_all
0000000000002b0e g    DF .text  00000000000000ee  Base        DispQueueToDisplay
0000000000002e26 g    DF .text  00000000000000fa  Base        DispInit
00000000000021ce g    DF .text  0000000000000096  Base        sunxi_ion_alloc_phy2vir_cpu
0000000000001b14 g    DF .text  000000000000011e  Base        sunxi_ion_alloc_open
00000000000023e8 g    DF .text  000000000000009c  Base        nv_rotage90
0000000000002768 g    DF .text  0000000000000074  Base        DispSetRect
00000000000030d6 g    DF .text  0000000000000016  Base        DestroyVideoOutport
0000000000005288 g    DO .bss   0000000000000030  Base        mLayerStatus
000000000000232c g    DF .text  0000000000000004  Base        sunxi_ion_alloc_shutdown
0000000000002484 g    DF .text  00000000000000a2  Base        nv_rotage270
0000000000002bfc g    DF .text  00000000000001ce  Base        DispWriteData
0000000000002350 g    DF .text  000000000000007a  Base        sunxi_ion_alloc_close
0000000000002612 g    DF .text  00000000000000d6  Base        DispAllocateVideoMem
0000000000002552 g    DF .text  000000000000001c  Base        DispGetScreenHeight
0000000000002ff6 g    DF .text  000000000000002c  Base        disp_layer_off
000000000000252e g    DF .text  0000000000000008  Base        DispSetRoute
0000000000001a1e g    DF .text  0000000000000004  Base        sunxi_ion_alloc_setup
0000000000002330 g    DF .text  0000000000000010  Base        sunxi_ion_alloc_read
0000000000002f20 g    DF .text  000000000000004a  Base        LayerClose
0000000000001a22 g    DF .text  0000000000000010  Base        sunxi_ion_alloc_memset
0000000000002f96 g    DF .text  0000000000000034  Base        DispDeinit
0000000000001e40 g    DF .text  000000000000010e  Base        sunxi_ion_alloc_pfree
0000000000001f4e g    DF .text  00000000000001d2  Base        sunxi_ion_alloc_alloc_drm
0000000000002736 g    DF .text  0000000000000032  Base        DispSetIoctl
00000000000025da g    DF .text  0000000000000038  Base        DispFreeVideoMem
000000000000284c g    DF .text  0000000000000090  Base        DispSetEnable
0000000000002340 g    DF .text  0000000000000010  Base        sunxi_ion_alloc_write
00000000000021be g    DF .text  0000000000000010  Base        sunxi_ion_alloc_copy
0000000000002f6a g    DF .text  000000000000002c  Base        LayerRelease
0000000000002526 g    DF .text  0000000000000008  Base        DispSetRotateAngel
0000000000002fca g    DF .text  000000000000002c  Base        disp_layer_on
0000000000002dca g    DF .text  000000000000005c  Base        LayerRequest
0000000000002536 g    DF .text  000000000000001c  Base        DispGetScreenWidth
0000000000002264 g    DF .text  000000000000008a  Base        sunxi_ion_alloc_get_bufferFd
0000000000003022 g    DF .text  00000000000000b4  Base        CreateVideoOutport
00000000000028dc g    DF .text  000000000000006a  Base        DispSetSrcRect
0000000000005008 g    DO .data  0000000000000090  Base        _allocionMemOpsS
0000000000005280 g    DO .bss   0000000000000008  Base        g_ion_alloc_context
00000000000026e8 g    DF .text  000000000000004e  Base        DispDequeue
00000000000023de g    DF .text  000000000000000a  Base        GetMemAdapterOpsS
0000000000005248 g    DO .bss   000000000000000c  Base        binfo
00000000000022ee g    DF .text  000000000000003e  Base        sunxi_ion_alloc_flush_cache
0000000000001a32 g    DF .text  000000000000007c  Base        sunxi_ion_alloc_vir2phy_cpu
00000000000027dc g    DF .text  0000000000000070  Base        DispSetZorder
0000000000001c32 g    DF .text  000000000000020e  Base        sunxi_ion_alloc_palloc

#221 Re: 全志 SOC » 执行Qt程序,提示库文件找不到。 » 2021-08-28 09:37:19

可能是 buildroot 你没有配置正确,也可能是buildroot这个版本有bug,到时候再检查一下。

#222 Re: 全志 SOC » 执行Qt程序,提示库文件找不到。 » 2021-08-28 09:29:39

mkdir /home/gzpeite/buildroot-2019.11.3/output/host/arm-buildroot-linux-gnueabihf/sysroot/usr/lib/

cp libGLESv2.so /home/gzpeite/buildroot-2019.11.3/output/host/arm-buildroot-linux-gnueabihf/sysroot/usr/lib/

别挣扎,死马做活马先。

#223 Re: 全志 SOC » 执行Qt程序,提示库文件找不到。 » 2021-08-28 09:23:03

/home/gzpeite/buildroot-2019.11.3/output/host/arm-buildroot-linux-gnueabihf/sysroot/usr/lib/libGLESv2.so

把 libGLESv2.so 复制到这里先试一试。

#224 Re: 全志 SOC » 哪吒D1使用gstreamer硬解码 » 2021-08-26 09:06:15

niubility!!!

但是视频看不到图像。

#225 Re: 全志 SOC » [V3X][Mystery]项目开发进度汇报 » 2021-08-23 20:20:35

mysteryli 说:

@ubuntu
你有设计板子吗

准备设计,不过最近很忙,所以没来得及玩。

#228 Re: 全志 SOC » [V3X][Mystery]项目开发进度汇报 » 2021-08-21 11:23:39

sblpp 说:
qianniao29 说:
sblpp 说:

芯片哪搞啊,万能宝木有啊

晕哥在小黄鱼有卖,买了两片还送了我一块F1C600的板子:D

太好了,求链接,我也搞个玩玩

好象是这个: https://item.taobao.com/item.htm?id=663925326351

#230 Re: 全志 SOC » 终于找到了全志SPI CS片选最多的soc了, 一共四个片选引脚 » 2021-08-17 15:40:19

H5的spi控制器驱动, 可以通过 gpio 控制 spi 片选 (转载)
https://whycan.com/t_2418.html#p48766


怪不得要用gpio片选喔

#231 Re: 全志 SOC » 哪吒D1默认显示输出改成HDMI » 2021-08-16 19:31:58

在移植LVGL的时候发现如果不把默认显示输出改成HDMI的话 那么LVGL通过fbdev读出来的fb分辨率就是原来800*1280的 所以用HDMI的来显示的话必须得修改

怪不得怪不得!

#232 Re: 全志 SOC » RGB888不使用8位时,低位数据线应该怎么接? » 2021-08-16 11:06:40

我见到的大部分0浮空,然后是1接地,偶尔看到2 R7/R6

#233 Re: 全志 SOC » 尝试编译一下哪吒D1的Tina系统 » 2021-08-15 17:42:51

晕哥网盘那个比较老了,要记得repo sync 更新到最新版本,具体修复了啥我也不知道。

#234 全志 SOC » TSC2007 I2C触摸驱动有个地方没搞明白, 为什么IRQ引脚和GPIO检测PEN引脚状态可以是同一个 » 2021-08-15 17:25:41

ubuntu
回复: 1

TSC2007 I2C触摸驱动有个地方没搞明白,
为什么IRQ引脚和GPIO检测PEN引脚状态可以是同一个,
这样在 IRQ/GPIO 两种复用之间要来回切换吗?
可是驱动代码里面并没有出现这种切换。


https://github.com/torvalds/linux/blob/master/drivers/input/touchscreen/tsc2007_core.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * drivers/input/touchscreen/tsc2007.c
 *
 * Copyright (c) 2008 MtekVision Co., Ltd.
 *	Kwangwoo Lee <kwlee@mtekvision.com>
 *
 * Using code from:
 *  - ads7846.c
 *	Copyright (c) 2005 David Brownell
 *	Copyright (c) 2006 Nokia Corporation
 *  - corgi_ts.c
 *	Copyright (C) 2004-2005 Richard Purdie
 *  - omap_ts.[hc], ads7846.h, ts_osk.c
 *	Copyright (C) 2002 MontaVista Software
 *	Copyright (C) 2004 Texas Instruments
 *	Copyright (C) 2005 Dirk Behme
 */

#include <linux/module.h>
#include <linux/slab.h>
#include <linux/gpio/consumer.h>
#include <linux/input.h>
#include <linux/interrupt.h>
#include <linux/i2c.h>
#include <linux/mod_devicetable.h>
#include <linux/property.h>
#include <linux/platform_data/tsc2007.h>
#include "tsc2007.h"

int tsc2007_xfer(struct tsc2007 *tsc, u8 cmd)
{
	s32 data;
	u16 val;

	data = i2c_smbus_read_word_data(tsc->client, cmd);
	if (data < 0) {
		dev_err(&tsc->client->dev, "i2c io error: %d\n", data);
		return data;
	}

	/* The protocol and raw data format from i2c interface:
	 * S Addr Wr [A] Comm [A] S Addr Rd [A] [DataLow] A [DataHigh] NA P
	 * Where DataLow has [D11-D4], DataHigh has [D3-D0 << 4 | Dummy 4bit].
	 */
	val = swab16(data) >> 4;

	dev_dbg(&tsc->client->dev, "data: 0x%x, val: 0x%x\n", data, val);

	return val;
}

static void tsc2007_read_values(struct tsc2007 *tsc, struct ts_event *tc)
{
	/* y- still on; turn on only y+ (and ADC) */
	tc->y = tsc2007_xfer(tsc, READ_Y);

	/* turn y- off, x+ on, then leave in lowpower */
	tc->x = tsc2007_xfer(tsc, READ_X);

	/* turn y+ off, x- on; we'll use formula #1 */
	tc->z1 = tsc2007_xfer(tsc, READ_Z1);
	tc->z2 = tsc2007_xfer(tsc, READ_Z2);

	/* Prepare for next touch reading - power down ADC, enable PENIRQ */
	tsc2007_xfer(tsc, PWRDOWN);
}

u32 tsc2007_calculate_resistance(struct tsc2007 *tsc, struct ts_event *tc)
{
	u32 rt = 0;

	/* range filtering */
	if (tc->x == MAX_12BIT)
		tc->x = 0;

	if (likely(tc->x && tc->z1)) {
		/* compute touch resistance using equation #1 */
		rt = tc->z2 - tc->z1;
		rt *= tc->x;
		rt *= tsc->x_plate_ohms;
		rt /= tc->z1;
		rt = (rt + 2047) >> 12;
	}

	return rt;
}

bool tsc2007_is_pen_down(struct tsc2007 *ts)
{
	/*
	 * NOTE: We can't rely on the pressure to determine the pen down
	 * state, even though this controller has a pressure sensor.
	 * The pressure value can fluctuate for quite a while after
	 * lifting the pen and in some cases may not even settle at the
	 * expected value.
	 *
	 * The only safe way to check for the pen up condition is in the
	 * work function by reading the pen signal state (it's a GPIO
	 * and IRQ). Unfortunately such callback is not always available,
	 * in that case we assume that the pen is down and expect caller
	 * to fall back on the pressure reading.
	 */

	if (!ts->get_pendown_state)
		return true;

	return ts->get_pendown_state(&ts->client->dev);
}

static irqreturn_t tsc2007_soft_irq(int irq, void *handle)
{
	struct tsc2007 *ts = handle;
	struct input_dev *input = ts->input;
	struct ts_event tc;
	u32 rt;

	while (!ts->stopped && tsc2007_is_pen_down(ts)) {

		/* pen is down, continue with the measurement */

		mutex_lock(&ts->mlock);
		tsc2007_read_values(ts, &tc);
		mutex_unlock(&ts->mlock);

		rt = tsc2007_calculate_resistance(ts, &tc);

		if (!rt && !ts->get_pendown_state) {
			/*
			 * If pressure reported is 0 and we don't have
			 * callback to check pendown state, we have to
			 * assume that pen was lifted up.
			 */
			break;
		}

		if (rt <= ts->max_rt) {
			dev_dbg(&ts->client->dev,
				"DOWN point(%4d,%4d), resistance (%4u)\n",
				tc.x, tc.y, rt);

			rt = ts->max_rt - rt;

			input_report_key(input, BTN_TOUCH, 1);
			input_report_abs(input, ABS_X, tc.x);
			input_report_abs(input, ABS_Y, tc.y);
			input_report_abs(input, ABS_PRESSURE, rt);

			input_sync(input);

		} else {
			/*
			 * Sample found inconsistent by debouncing or pressure is
			 * beyond the maximum. Don't report it to user space,
			 * repeat at least once more the measurement.
			 */
			dev_dbg(&ts->client->dev, "ignored pressure %d\n", rt);
		}

		wait_event_timeout(ts->wait, ts->stopped, ts->poll_period);
	}

	dev_dbg(&ts->client->dev, "UP\n");

	input_report_key(input, BTN_TOUCH, 0);
	input_report_abs(input, ABS_PRESSURE, 0);
	input_sync(input);

	if (ts->clear_penirq)
		ts->clear_penirq();

	return IRQ_HANDLED;
}

static irqreturn_t tsc2007_hard_irq(int irq, void *handle)
{
	struct tsc2007 *ts = handle;

	if (tsc2007_is_pen_down(ts))
		return IRQ_WAKE_THREAD;

	if (ts->clear_penirq)
		ts->clear_penirq();

	return IRQ_HANDLED;
}

static void tsc2007_stop(struct tsc2007 *ts)
{
	ts->stopped = true;
	mb();
	wake_up(&ts->wait);

	disable_irq(ts->irq);
}

static int tsc2007_open(struct input_dev *input_dev)
{
	struct tsc2007 *ts = input_get_drvdata(input_dev);
	int err;

	ts->stopped = false;
	mb();

	enable_irq(ts->irq);

	/* Prepare for touch readings - power down ADC and enable PENIRQ */
	err = tsc2007_xfer(ts, PWRDOWN);
	if (err < 0) {
		tsc2007_stop(ts);
		return err;
	}

	return 0;
}

static void tsc2007_close(struct input_dev *input_dev)
{
	struct tsc2007 *ts = input_get_drvdata(input_dev);

	tsc2007_stop(ts);
}

static int tsc2007_get_pendown_state_gpio(struct device *dev)
{
	struct i2c_client *client = to_i2c_client(dev);
	struct tsc2007 *ts = i2c_get_clientdata(client);

	return gpiod_get_value(ts->gpiod);
}

static int tsc2007_probe_properties(struct device *dev, struct tsc2007 *ts)
{
	u32 val32;
	u64 val64;

	if (!device_property_read_u32(dev, "ti,max-rt", &val32))
		ts->max_rt = val32;
	else
		ts->max_rt = MAX_12BIT;

	if (!device_property_read_u32(dev, "ti,fuzzx", &val32))
		ts->fuzzx = val32;

	if (!device_property_read_u32(dev, "ti,fuzzy", &val32))
		ts->fuzzy = val32;

	if (!device_property_read_u32(dev, "ti,fuzzz", &val32))
		ts->fuzzz = val32;

	if (!device_property_read_u64(dev, "ti,poll-period", &val64))
		ts->poll_period = msecs_to_jiffies(val64);
	else
		ts->poll_period = msecs_to_jiffies(1);

	if (!device_property_read_u32(dev, "ti,x-plate-ohms", &val32)) {
		ts->x_plate_ohms = val32;
	} else {
		dev_err(dev, "Missing ti,x-plate-ohms device property\n");
		return -EINVAL;
	}

	ts->gpiod = devm_gpiod_get_optional(dev, NULL, GPIOD_IN);
	if (IS_ERR(ts->gpiod))
		return PTR_ERR(ts->gpiod);

	if (ts->gpiod)
		ts->get_pendown_state = tsc2007_get_pendown_state_gpio;
	else
		dev_warn(dev, "Pen down GPIO is not specified in properties\n");

	return 0;
}

static int tsc2007_probe_pdev(struct device *dev, struct tsc2007 *ts,
			      const struct tsc2007_platform_data *pdata,
			      const struct i2c_device_id *id)
{
	ts->model             = pdata->model;
	ts->x_plate_ohms      = pdata->x_plate_ohms;
	ts->max_rt            = pdata->max_rt ? : MAX_12BIT;
	ts->poll_period       = msecs_to_jiffies(pdata->poll_period ? : 1);
	ts->get_pendown_state = pdata->get_pendown_state;
	ts->clear_penirq      = pdata->clear_penirq;
	ts->fuzzx             = pdata->fuzzx;
	ts->fuzzy             = pdata->fuzzy;
	ts->fuzzz             = pdata->fuzzz;

	if (pdata->x_plate_ohms == 0) {
		dev_err(dev, "x_plate_ohms is not set up in platform data\n");
		return -EINVAL;
	}

	return 0;
}

static void tsc2007_call_exit_platform_hw(void *data)
{
	struct device *dev = data;
	const struct tsc2007_platform_data *pdata = dev_get_platdata(dev);

	pdata->exit_platform_hw();
}

static int tsc2007_probe(struct i2c_client *client,
			 const struct i2c_device_id *id)
{
	const struct tsc2007_platform_data *pdata =
		dev_get_platdata(&client->dev);
	struct tsc2007 *ts;
	struct input_dev *input_dev;
	int err;

	if (!i2c_check_functionality(client->adapter,
				     I2C_FUNC_SMBUS_READ_WORD_DATA))
		return -EIO;

	ts = devm_kzalloc(&client->dev, sizeof(struct tsc2007), GFP_KERNEL);
	if (!ts)
		return -ENOMEM;

	if (pdata)
		err = tsc2007_probe_pdev(&client->dev, ts, pdata, id);
	else
		err = tsc2007_probe_properties(&client->dev, ts);
	if (err)
		return err;

	input_dev = devm_input_allocate_device(&client->dev);
	if (!input_dev)
		return -ENOMEM;

	i2c_set_clientdata(client, ts);

	ts->client = client;
	ts->irq = client->irq;
	ts->input = input_dev;

	init_waitqueue_head(&ts->wait);
	mutex_init(&ts->mlock);

	snprintf(ts->phys, sizeof(ts->phys),
		 "%s/input0", dev_name(&client->dev));

	input_dev->name = "TSC2007 Touchscreen";
	input_dev->phys = ts->phys;
	input_dev->id.bustype = BUS_I2C;

	input_dev->open = tsc2007_open;
	input_dev->close = tsc2007_close;

	input_set_drvdata(input_dev, ts);

	input_set_capability(input_dev, EV_KEY, BTN_TOUCH);

	input_set_abs_params(input_dev, ABS_X, 0, MAX_12BIT, ts->fuzzx, 0);
	input_set_abs_params(input_dev, ABS_Y, 0, MAX_12BIT, ts->fuzzy, 0);
	input_set_abs_params(input_dev, ABS_PRESSURE, 0, MAX_12BIT,
			     ts->fuzzz, 0);

	if (pdata) {
		if (pdata->exit_platform_hw) {
			err = devm_add_action(&client->dev,
					      tsc2007_call_exit_platform_hw,
					      &client->dev);
			if (err) {
				dev_err(&client->dev,
					"Failed to register exit_platform_hw action, %d\n",
					err);
				return err;
			}
		}

		if (pdata->init_platform_hw)
			pdata->init_platform_hw();
	}

	err = devm_request_threaded_irq(&client->dev, ts->irq,
					tsc2007_hard_irq, tsc2007_soft_irq,
					IRQF_ONESHOT,
					client->dev.driver->name, ts);
	if (err) {
		dev_err(&client->dev, "Failed to request irq %d: %d\n",
			ts->irq, err);
		return err;
	}

	tsc2007_stop(ts);

	/* power down the chip (TSC2007_SETUP does not ACK on I2C) */
	err = tsc2007_xfer(ts, PWRDOWN);
	if (err < 0) {
		dev_err(&client->dev,
			"Failed to setup chip: %d\n", err);
		return err;	/* chip does not respond */
	}

	err = input_register_device(input_dev);
	if (err) {
		dev_err(&client->dev,
			"Failed to register input device: %d\n", err);
		return err;
	}

	err =  tsc2007_iio_configure(ts);
	if (err) {
		dev_err(&client->dev,
			"Failed to register with IIO: %d\n", err);
		return err;
	}

	return 0;
}

static const struct i2c_device_id tsc2007_idtable[] = {
	{ "tsc2007", 0 },
	{ }
};

MODULE_DEVICE_TABLE(i2c, tsc2007_idtable);

static const struct of_device_id tsc2007_of_match[] = {
	{ .compatible = "ti,tsc2007" },
	{ /* sentinel */ }
};
MODULE_DEVICE_TABLE(of, tsc2007_of_match);

static struct i2c_driver tsc2007_driver = {
	.driver = {
		.name	= "tsc2007",
		.of_match_table = tsc2007_of_match,
	},
	.id_table	= tsc2007_idtable,
	.probe		= tsc2007_probe,
};

module_i2c_driver(tsc2007_driver);

MODULE_AUTHOR("Kwangwoo Lee <kwlee@mtekvision.com>");
MODULE_DESCRIPTION("TSC2007 TouchScreen Driver");
MODULE_LICENSE("GPL");

buildroot-tiny200 (F1C100/200s) 开发包近期更新内容 * 已支持DVP摄像头 *
https://whycan.com/t_5221.html#p54779

        rtp@48 {
                compatible = "ti,tsc2007";
                reg = <0x48>;
                interrupt-parent = <&pio>;
                interrupts = <4 12 IRQ_TYPE_EDGE_FALLING>;
                gpios = <&pio 4 12 GPIO_ACTIVE_LOW>;
                pendown-gpio = <&pio 4 12 GPIO_ACTIVE_LOW>;
                ti,x-plate-ohms = <660>;
                wakeup-source;
                status = "okay";
        };

#235 Re: DIY/综合/Arduino/写字机/3D打印机/智能小车/平衡车/四轴飞行/MQTT/物联网 » 请问 ADS7843 ADS7846 TSC2046 有什么区别吗? » 2021-08-14 18:38:30

diff --git a/drivers/input/touchscreen/Kconfig b/drivers/input/touchscreen/Kconfig
index 5e640ae..c0b36cc 100644
--- a/drivers/input/touchscreen/Kconfig
+++ b/drivers/input/touchscreen/Kconfig
@@ -12,17 +12,17 @@ menuconfig INPUT_TOUCHSCREEN
 if INPUT_TOUCHSCREEN
 
 config TOUCHSCREEN_ADS7846
-	tristate "ADS 7846/7843 based touchscreens"
+	tristate "ADS7846/TSC2046 and ADS7843 based touchscreens"
 	depends on SPI_MASTER
 	depends on HWMON = n || HWMON
 	help
 	  Say Y here if you have a touchscreen interface using the
-	  ADS7846 or ADS7843 controller, and your board-specific setup
-	  code includes that in its table of SPI devices.
+	  ADS7846/TSC2046 or ADS7843 controller, and your board-specific
+	  setup code includes that in its table of SPI devices.
 
 	  If HWMON is selected, and the driver is told the reference voltage
 	  on your board, you will also get hwmon interfaces for the voltage
-	  (and on ads7846, temperature) sensors of this chip.
+	  (and on ads7846/tsc2046, temperature) sensors of this chip.
 
 	  If unsure, say N (but it's safe to say "Y").
 
diff --git a/drivers/input/touchscreen/ads7846.c b/drivers/input/touchscreen/ads7846.c
index 693e3b2..b0110fe 100644
--- a/drivers/input/touchscreen/ads7846.c
+++ b/drivers/input/touchscreen/ads7846.c
@@ -39,6 +39,7 @@
 /*
  * This code has been heavily tested on a Nokia 770, and lightly
  * tested on other ads7846 devices (OSK/Mistral, Lubbock).
+ * TSC2046 is just newer ads7846 silicon.
  * Support for ads7843 tested on Atmel at91sam926x-EK.
  * Support for ads7845 has only been stubbed in.
  *

软件上面貌似是同一个物种:

http://visa.lab.asu.edu/gitlab/fstrace/android-kernel-msm-hammerhead-3.4-marshmallow-mr3/commit/bff0de5f59ff935138eb41c397a7e50468028b83.diff

#237 Re: 全志 SOC » A33板子修改U-BOOT调试串口失败,大佬们帮忙分析一下 » 2020-12-07 10:18:43

weiyongwill 说:

多谢大佬指点,哪里可以设置关闭LCD,是在uboot设置里面,还是需要改代码?

哇酷小二 说:

有没有可能PD10/11 的 UART1复用 被LCD初始化 覆盖了?

如果修改设备树没用的话, make menuconfig 禁用这个 CONFIG_VIDEO_SUNXI

#238 Re: 全志 SOC » buildroot选择安装mysql后启动信息问题 » 2020-11-30 09:26:12

应该启动了吧, 如果没有启动就看下这个错误日志文件  '/var/mysql/buildroot.err'

#240 Re: 技术人生/软件使用技巧/破解经验/技术吐槽/灌水 » 自己动手把车钥匙的2032电池换了 » 2020-11-30 09:10:31

刚刚翻了一下原图, 也不是很清晰, 下次换备用钥匙电池我拍个无码高清的。

有可能真的是二维码。

#242 Re: 全志 SOC » A33主线Linux跑起OpenGL/ES » 2020-11-02 17:22:43

../src/mesa/tnl/t_vb_lighttmp.h:508:16: warning: 'base[0][3]' may be used uninitialized in this function [-Wmaybe-uninitialized]
   Fcolor[j][3] = base[0][3];
                ^
In file included from ../src/mesa/tnl/t_vb_light.c:29:0:
../src/mesa/main/macros.h:264:13: warning: 'base[0][2]' may be used uninitialized in this function [-Wmaybe-uninitialized]
    (DST)[2] = (SRC)[2];             \
             ^
In file included from ../src/mesa/tnl/t_vb_light.c:303:0:
../src/mesa/tnl/t_vb_lighttmp.h:429:12: note: 'base[0][2]' was declared here
    GLfloat base[2][4];
            ^
In file included from ../src/mesa/tnl/t_vb_light.c:29:0:
../src/mesa/main/macros.h:263:13: warning: 'base[0][1]' may be used uninitialized in this function [-Wmaybe-uninitialized]
    (DST)[1] = (SRC)[1];             \
             ^
In file included from ../src/mesa/tnl/t_vb_light.c:303:0:
../src/mesa/tnl/t_vb_lighttmp.h:429:12: note: 'base[0][1]' was declared here
    GLfloat base[2][4];
            ^
In file included from ../src/mesa/tnl/t_vb_light.c:29:0:
../src/mesa/main/macros.h:262:13: warning: 'base[0][0]' may be used uninitialized in this function [-Wmaybe-uninitialized]
    (DST)[0] = (SRC)[0];             \
             ^
In file included from ../src/mesa/tnl/t_vb_light.c:303:0:
../src/mesa/tnl/t_vb_lighttmp.h:429:12: note: 'base[0][0]' was declared here
    GLfloat base[2][4];
            ^
[598/690] Compiling C object 'src/mesa/bbe4a73@@mesa_classic@sta/drivers_common_meta.c.o'.
In file included from ../src/mesa/drivers/common/meta.c:91:0:
../src/compiler/nir/nir.h:2463:1: warning: '__returns_nonnull__' attribute directive ignored [-Wattributes]
 {
 ^
../src/compiler/nir/nir.h:2469:1: warning: '__returns_nonnull__' attribute directive ignored [-Wattributes]
 {
 ^
[670/690] Linking target src/mesa/drivers/dri/libmesa_dri_drivers.so.
FAILED: src/mesa/drivers/dri/libmesa_dri_drivers.so
/opt/buildroot-2020.02.3/output/host/bin/arm-none-linux-gnueabi-g++  -o src/mesa/drivers/dri/libmesa_dri_drivers.so  -Wl,--as-needed -Wl,--no-undefined -Wl,-O1 -shared -fPIC -Wl,--start-group -Wl,-soname,libmesa_dri_drivers.so -Wl,--whole-archive src/mesa/drivers/dri/swrast/libswrast_dri.a src/mesa/drivers/dri/radeon/libr100.a src/mesa/drivers/dri/nouveau/libnouveau_vieux.a -Wl,--no-whole-archive src/mesa/drivers/dri/common/libmegadriver_stub.a src/mesa/drivers/dri/common/libdricommon.a src/mapi/shared-glapi/libglapi.so.0.0.0 src/mesa/libmesa_classic.a src/compiler/glsl/libglsl.a src/compiler/glsl/glcpp/libglcpp.a src/util/libmesa_util.a src/compiler/nir/libnir.a src/compiler/libcompiler.a src/util/libxmlconfig.a -Wl,--build-id=sha1 -Wl,-Bsymbolic -Wl,--gc-sections /opt/buildroot-2020.02.3/output/host/arm-buildroot-linux-gnueabi/sysroot/usr/lib/libdrm.so -lm -pthread -ldl /opt/buildroot-2020.02.3/output/host/arm-buildroot-linux-gnueabi/sysroot/usr/lib/libexpat.so /opt/buildroot-2020.02.3/output/host/arm-buildroot-linux-gnueabi/sysroot/usr/lib/libz.so /opt/buildroot-2020.02.3/output/host/arm-buildroot-linux-gnueabi/sysroot/usr/lib/libdrm_radeon.so /opt/buildroot-2020.02.3/output/host/arm-buildroot-linux-gnueabi/sysroot/usr/lib/libdrm_nouveau.so -Wl,--end-group '-Wl,-rpath,$ORIGIN/common:$ORIGIN/../../../mapi/shared-glapi:$ORIGIN/../..:$ORIGIN/../../../compiler/glsl:$ORIGIN/../../../compiler/glsl/glcpp:$ORIGIN/../../../util:$ORIGIN/../../../compiler/nir:$ORIGIN/../../../compiler' -Wl,-rpath-link,/opt/buildroot-2020.02.3/output/build/mesa3d-19.3.4/build/src/mesa/drivers/dri/common -Wl,-rpath-link,/opt/buildroot-2020.02.3/output/build/mesa3d-19.3.4/build/src/mapi/shared-glapi -Wl,-rpath-link,/opt/buildroot-2020.02.3/output/build/mesa3d-19.3.4/build/src/mesa -Wl,-rpath-link,/opt/buildroot-2020.02.3/output/build/mesa3d-19.3.4/build/src/compiler/glsl -Wl,-rpath-link,/opt/buildroot-2020.02.3/output/build/mesa3d-19.3.4/build/src/compiler/glsl/glcpp -Wl,-rpath-link,/opt/buildroot-2020.02.3/output/build/mesa3d-19.3.4/build/src/util -Wl,-rpath-link,/opt/buildroot-2020.02.3/output/build/mesa3d-19.3.4/build/src/compiler/nir -Wl,-rpath-link,/opt/buildroot-2020.02.3/output/build/mesa3d-19.3.4/build/src/compiler
src/mesa/drivers/dri/common/libmegadriver_stub.a(megadriver_stub.c.o): In function `megadriver_stub_init':
megadriver_stub.c:(.text.startup+0x20): undefined reference to `dladdr'
megadriver_stub.c:(.text.startup+0xb8): undefined reference to `dlsym'
collect2: error: ld returned 1 exit status
[674/690] Compiling C object 'src/egl/cb1d4f8@@EGL@sha/main_eglapi.c.o'.
ninja: build stopped: subcommand failed.
package/pkg-generic.mk:266: recipe for target '/opt/buildroot-2020.02.3/output/build/mesa3d-19.3.4/.stamp_built' failed
make[1]: *** [/opt/buildroot-2020.02.3/output/build/mesa3d-19.3.4/.stamp_built] Error 1
Makefile:84: recipe for target '_all' failed
make: *** [_all] Error 2
$
$

弄了一下午,终于解决这个编译错误了

https://git.busybox.net/buildroot/commit/?id=d3f576d2f37a05275c0d25f855dc24935ff5de5c

修改: ./output/build/mesa3d-19.3.4/src/mesa/drivers/dri/meson.build

libmegadriver_stub, libdricommon, libglapi,

改为:
libdricommon, libmegadriver_stub, libglapi,

即交换编译顺序.

#244 VMWare/Linux/Ubuntu/Fedora/CentOS/U-BOOT » 试一试 Ubuntu 下编译第一个 Hello World 驱动并运行 » 2020-09-07 08:43:58

ubuntu
回复: 0

试一试 Ubuntu 下编译第一个 Hello World 驱动并运行


https://www.geeksforgeeks.org/linux-kernel-module-programming-hello-world-program/


hello.c:

/**
 * @file    hello.c
 * @author  Akshat Sinha
 * @date    10 Sept 2016
 * @version 0.1
 * @brief  An introductory "Hello World!" loadable kernel
 *  module (LKM) that can display a message in the /var/log/kern.log
 *  file when the module is loaded and removed. The module can accept
 *  an argument when it is loaded -- the name, which appears in the
 *  kernel log files.
*/
#include <linux/module.h>     /* Needed by all modules */
#include <linux/kernel.h>     /* Needed for KERN_INFO */
#include <linux/init.h>       /* Needed for the macros */

///< The license type -- this affects runtime behavior
MODULE_LICENSE("GPL");

///< The author -- visible when you use modinfo
MODULE_AUTHOR("Akshat Sinha");

///< The description -- see modinfo
MODULE_DESCRIPTION("A simple Hello world LKM!");

///< The version of the module
MODULE_VERSION("0.1");

static int __init hello_start(void)
{
    printk(KERN_INFO "Loading hello module...\n");
    printk(KERN_INFO "Hello world\n");
    return 0;
}

static void __exit hello_end(void)
{
    printk(KERN_INFO "Goodbye Mr.\n");
}

Makefile:

obj-m = hello.o
all:
        make -C /lib/modules/$(shell uname -r)/build/ M=$(PWD) modules
clean:
        make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean

编译,安装驱动,查看log:

ubuntu@ubuntu:/opt/test3$ make
make -C /lib/modules/5.4.0-42-generic/build/ M=/opt/test3 modules
make[1]: Entering directory '/usr/src/linux-headers-5.4.0-42-generic'
  CC [M]  /opt/test3/hello.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC [M]  /opt/test3/hello.mod.o
  LD [M]  /opt/test3/hello.ko
make[1]: Leaving directory '/usr/src/linux-headers-5.4.0-42-generic'
ubuntu@ubuntu:/opt/test3$
ubuntu@ubuntu:/opt/test3$ sudo insmod hello.ko
ubuntu@ubuntu:/opt/test3$
ubuntu@ubuntu:/opt/test3$ dmesg |tail -n 1
[256200.240481] Hello world
ubuntu@ubuntu:/opt/test3$

#248 Re: 君正Ingenic/X1000/X2000/T10/T20/T30 » 用君正X1000一个UART控制十个N76E003单片机, 用RS485那种硬件协议,给每个单片机编一个地址, 问题不大吧? » 2020-05-02 08:37:09

yobbo 说:

第一,不能直接用ttl电平,不然这么多很容易出问题。
第二,modbus通讯比较慢,即使提高波特率也会存在3.5char的问题。

请教应该使用什么电平呢,用什么电平转换芯片?
3.5char是什么问题呢?

#250 Re: 全志 SOC » Tiny200 SPINAND固件分享 » 2020-04-27 10:43:53

牛叉, 请问有没有配置文件可以分享一下呢?

#251 Re: 全志 SOC » 拆拆 二维码/条码 读头 » 2020-04-10 14:41:59

中华神U, 是我讲过性价比最高的CPU了,没有之一。

#252 Re: 全志 SOC » 新手入门,串口求助 » 2020-04-10 14:04:36

xblzy0423 说:

板子:ZERO V3S  Linux系统
目标,linux入门,先从串口接发送开始,UBOOT等按教程已做好了,在ZERO V3S 已正常跑起来了

https://whycan.cn/t_3313.html
https://whycan.cn/t_2537.html#p19936
https://whycan.cn/t_2428.html#p19336
https://whycan.cn/t_2809.html#p22915

#253 Re: 全志 SOC » 新手求助 rootfs.tar生成 » 2020-04-10 13:57:11

估计解压姿势错误,要在Linux(Ubuntu)用tar 解压, 这样才能保证软链接和执行属性没问题.

把卡插入系统看下文件出了什么问题。

#254 Re: 全志 SOC » 请问有没有哪位朋友用过 A33 Linux5.x IO中断呢? » 2020-04-08 23:53:41

# insmod /mnt/udisk/hello.ko
[   31.697182] hello: loading out-of-tree module taints kernel.
[   31.703544] <1>Hello World
[   31.706404] Mapped int 57
#
#
# cat /proc/interrupts
           CPU0       CPU1       CPU2       CPU3
 18:          0          0          0          0     GICv2  29 Level     arch_timer
 19:        370        294        146        209     GICv2  30 Level     arch_timer
 22:          0          0          0          0     GICv2  50 Level     timer@1c20c00
 23:          0          0          0          0     GICv2  82 Level     1c02000.dma-controller
 24:       1175          0          0          0     GICv2  92 Level     sunxi-mmc
 26:          0          0          0          0     GICv2 103 Level     musb-hdrc.1.auto
 27:          0          0          0          0     GICv2 104 Level     ehci_hcd:usb1
 28:          0          0          0          0     GICv2 105 Level     ohci_hcd:usb2
 34:        166          0          0          0     GICv2  32 Level     ttyS0
 42:          0          0          0          0     GICv2  72 Level     1f00000.rtc
 57:          0          0          0          0  sunxi_pio_edge   4 Edge      pb4_int
 62:          0          0          0          0  sunxi_pio_edge   9 Edge      1c0f000.mmc cd
IPI0:          0          0          0          0  CPU wakeup interrupts
IPI1:          0          0          0          0  Timer broadcast interrupts
IPI2:        710        836         99        271  Rescheduling interrupts
IPI3:          4         23         44         41  Function call interrupts
IPI4:          0          0          0          0  CPU stop interrupts
IPI5:          0          0          0          0  IRQ work interrupts
IPI6:          0          0          0          0  completion interrupts
Err:          0
# [   52.420296] interrupt received (irq: 57)
[   52.424250] gpio pin is low
[   52.427083] interrupt received (irq: 57)
[   52.431010] gpio pin is low
[   52.854042] interrupt received (irq: 57)
[   52.857980] gpio pin is low
[   52.860807] interrupt received (irq: 57)
[   52.864733] gpio pin is low
[   52.886404] interrupt received (irq: 57)
[   52.890338] gpio pin is low
[   52.897023] interrupt received (irq: 57)
[   52.900955] gpio pin is low
[   52.927779] interrupt received (irq: 57)
[   52.931710] gpio pin is low
[   53.154994] interrupt received (irq: 57)
[   53.158927] gpio pin is high
[   53.161838] interrupt received (irq: 57)
[   53.165764] gpio pin is low
[   53.168574] interrupt received (irq: 57)
[   53.172500] gpio pin is low
[   53.577491] interrupt received (irq: 57)
[   53.581424] gpio pin is high
[   53.584343] interrupt received (irq: 57)
[   53.588270] gpio pin is high

#
# cat /proc/interrupts
           CPU0       CPU1       CPU2       CPU3
 18:          0          0          0          0     GICv2  29 Level     arch_timer
 19:        512        351        156        209     GICv2  30 Level     arch_timer
 22:          0          0          0          0     GICv2  50 Level     timer@1c20c00
 23:          0          0          0          0     GICv2  82 Level     1c02000.dma-controller
 24:       1579          0          0          0     GICv2  92 Level     sunxi-mmc
 26:          0          0          0          0     GICv2 103 Level     musb-hdrc.1.auto
 27:          0          0          0          0     GICv2 104 Level     ehci_hcd:usb1
 28:          0          0          0          0     GICv2 105 Level     ohci_hcd:usb2
 34:        207          0          0          0     GICv2  32 Level     ttyS0
 42:          0          0          0          0     GICv2  72 Level     1f00000.rtc
 57:         12          0          0          0  sunxi_pio_edge   4 Edge      pb4_int
 62:          0          0          0          0  sunxi_pio_edge   9 Edge      1c0f000.mmc cd
IPI0:          0          0          0          0  CPU wakeup interrupts
IPI1:          0          0          0          0  Timer broadcast interrupts
IPI2:        710        897        100        271  Rescheduling interrupts
IPI3:          5         26         44         41  Function call interrupts
IPI4:          0          0          0          0  CPU stop interrupts
IPI5:          4          0          0          0  IRQ work interrupts
IPI6:          0          0          0          0  completion interrupts
Err:          0
#

试了一下 linux4.20 居然可以触发中断, 估计后面被改出问题了吧.

#255 Re: DIY/综合/Arduino/写字机/3D打印机/智能小车/平衡车/四轴飞行/MQTT/物联网 » AIR724模块, 合宙拼团: 一个4G模块+一个4G开发板 = 19.9元 » 2020-04-07 18:32:01

Gentlepig 说:

请教个问题,ec200、air720这类模组,都是跑的linux吗?

有可能是个RTOS, 当然也很可能是Linux, 因为里面都实现了完整的TCP/IP/RNDIS协议栈.

#256 Re: 全志 SOC » 荔枝派执行qmake后得到Makefile,接着执行make后报错,求老师们指点 » 2020-04-07 13:51:45

zhang235hai 说:

执行之后出现这个
zhang@ubuntu:~$ /home/zhang/buildroot-2018.08.2/output/host/bin/arm-linux-gnueabihf-g++
/home/zhang/buildroot-2018.08.2/output/host/bin/arm-linux-gnueabihf-g++.br_real: No such file or directory
zhang@ubuntu:~$

/home/zhang/buildroot-2018.08.2/output/host/bin/arm-linux-gcc
/home/zhang/buildroot-2018.08.2/output/host/bin/arm-linux-g++

再试一试这两个。

#258 Re: 全志 SOC » 荔枝派执行qmake后得到Makefile,接着执行make后报错,求老师们指点 » 2020-04-07 13:40:13

/home/zhang/buildroot-2018.08.2/output/host/bin/arm-linux-gnueabihf-g++

这个可以执行吗?

#259 Re: 全志 SOC » 请问有没有哪位朋友用过 A33 Linux5.x IO中断呢? » 2020-04-07 11:41:33

拉轰的脚踏车 说:

用 devmem 去读 PB_CFG0 寄存器




看是否处于中断复用?


查了一下, PB_CFG0  地址应该是 0x01C20824

insmod hello.ko 之前:
devmem 0x01C20824: 0x77477733

insmod hello.ko 之后:
devmem 0x01C20824: 0x77447733

看来这个PB4的复用应该没有错误, 只能检查别的问题了。




看来还是去 Icenowy 的仓库围观一下:
https://github.com/Icenowy/linux/commits/a33-cedrus-pr

https://github.com/Icenowy/linux/commits/a33-best-practice

#260 Re: 全志 SOC » 请问有没有哪位朋友用过 A33 Linux5.x IO中断呢? » 2020-04-07 10:55:16

https://github.com/torvalds/linux/blob/master/drivers/pinctrl/sunxi/pinctrl-sun8i-a33.c

          SUNXI_FUNCTION_IRQ_BANK(0x4, 0, 4)),    /* PB_EINT4 */

改为:

          SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 4)),    /* PB_EINT4 */


也没有什么用, 向各路江湖豪杰求救!

#261 Re: VMWare/Linux/Ubuntu/Fedora/CentOS/U-BOOT » 学渣请教一个C语言 #, ## 宏语法的问题 » 2020-04-07 10:04:19

shaoxi2010 说:

#把宏参数作为一个字符串,##用于宏参数贴合

原来如此

shaoxi2010 说:

还有展开的结果应该是PINCTRL_PIN(PB_BASE + 4, “PB4”)

看起来应该是这样了, 感谢大佬。

#262 VMWare/Linux/Ubuntu/Fedora/CentOS/U-BOOT » 学渣请教一个C语言 #, ## 宏语法的问题 » 2020-04-07 09:04:58

ubuntu
回复: 6

https://github.com/torvalds/linux/blob/master/drivers/pinctrl/sunxi/pinctrl-sunxi.h#L32

#define SUNXI_PINCTRL_PIN(bank, pin)		\
	PINCTRL_PIN(P ## bank ## _BASE + (pin), "P" #bank #pin)

所以这个宏函数:
SUNXI_PINCTRL_PIN(B, 4)


展开应该是:
PINCTRL_PIN(PB_BASE + 4, PB4)



那么问题来了, 请教 一个#, 和两个#有什么区别呢?

#263 Re: 全志 SOC » 请问有没有哪位朋友用过 A33 Linux5.x IO中断呢? » 2020-04-06 19:56:34

PB4 用 sysfs 控制输出高低电平正常:

#PB4 = 32 + 4 = 36
echo 36 > /sys/class/gpio/export

#设置为输出
echo "out" > /sys/class/gpio/gpio36/direction

#PB4输出高电平
echo 1 > /sys/class/gpio/gpio36/value

#PB4输出低电平
echo 0 > /sys/class/gpio/gpio36/value

hello.c

#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/input.h>
#include <linux/input-polldev.h>
#include <linux/input/touchscreen.h>
#include <linux/i2c.h>
#include <linux/gpio.h>
#include <linux/interrupt.h>

#define GPIO 36    //PG0
#define GPIO_INT_NAME  "pb4_int"

#define GPIO_HIGH gpio_get_value(GPIO)
#define GPIO_LOW (gpio_get_value(GPIO) == 0)


MODULE_LICENSE("Dual BSD/GPL");

short int irq_any_gpio    = 0;
int count =0;

enum { falling, rising } type;
static irqreturn_t r_irq_handler(int irq, void *dev_id)
 {
    count++;
    printk("interrupt received (irq: %d)\n", irq);
    if (irq == gpio_to_irq(GPIO))
    {

        type = GPIO_LOW ? falling : rising;

        if(type == falling)
        {
            printk("gpio pin is low\n");
        }
        else
            printk("gpio pin is high\n");

    }

    return IRQ_HANDLED;
}

void r_int_config(void) {

   if (gpio_request(GPIO, GPIO_INT_NAME ))
   {
      printk("GPIO request failure: %s\n", GPIO_INT_NAME );
      return;
   }

   if ( (irq_any_gpio = gpio_to_irq(GPIO)) < 0 ) {
      printk("GPIO to IRQ mapping failure %s\n",GPIO_INT_NAME );
      return;
   }

   printk(KERN_NOTICE "Mapped int %d\n", irq_any_gpio);

   if (request_irq(irq_any_gpio,(irq_handler_t ) r_irq_handler, IRQF_TRIGGER_FALLING , GPIO_INT_NAME, NULL))
   {
      printk("Irq Request failure\n");
      return;
   }

   return;
}

static void release_hello(void) {

   free_irq(gpio_to_irq(GPIO), NULL);
    gpio_free(GPIO);;
   return;
}

static int init_hello(void)
{
        printk("<1>Hello World\n");
    r_int_config();
        return 0;
}

module_init(init_hello);    // Do some better naming
module_exit(release_hello);

Makefile

Makefile
#
# Makefile for kernel test
#
PWD         := $(shell pwd)
KVERSION    := $(shell uname -r)
KERNEL_DIR   = /usr/src/linux-headers-$(KVERSION)/

MODULE_NAME  = hello
obj-m       := $(MODULE_NAME).o

all:
        make -C $(KERNEL_DIR) M=$(PWD) modules
clean:
        make -C $(KERNEL_DIR) M=$(PWD) clean

编译指令:

ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make  -C /home/ren/A33/mainline/linux/ M=${PWD} modules

安装模块:

insmod hello.ko

然后短路 PB4 & GND, 然而还是纹丝不动.

#266 Re: 全志 SOC » 请问有没有哪位朋友用过 A33 Linux5.x IO中断呢? » 2020-04-06 17:11:01

https://github.com/torvalds/linux/blob/master/drivers/pinctrl/sunxi/pinctrl-sun8i-a33.c

https://patchwork.kernel.org/patch/8572141/

diff --git a/drivers/pinctrl/sunxi/pinctrl-sun8i-a33.c b/drivers/pinctrl/sunxi/pinctrl-sun8i-a33.c
index 00265f0..8b381d6 100644
--- a/drivers/pinctrl/sunxi/pinctrl-sun8i-a33.c
+++ b/drivers/pinctrl/sunxi/pinctrl-sun8i-a33.c
@@ -485,6 +485,7 @@  static const struct sunxi_pinctrl_desc sun8i_a33_pinctrl_data = {
 	.pins = sun8i_a33_pins,
 	.npins = ARRAY_SIZE(sun8i_a33_pins),
 	.irq_banks = 2,
+	.irq_bank_base = 1,
 };

2016 的bug patch 也没有并入?

#267 Re: DIY/综合/Arduino/写字机/3D打印机/智能小车/平衡车/四轴飞行/MQTT/物联网 » 发个树莓派 ov5647 摄像头资料 » 2020-04-06 16:56:26

微凉VeiLiang 说:

可以,我买了这个,直接可以用在荔枝派的mipi接口上,还能对焦。 https://item.taobao.com/item.htm?id=566547808242

这个貌似就是荔枝派zero 开发板用的那个封装, 这个数据线是 D0/D1/D2/D3,  上面树莓派只有 D0/D1

#269 Re: 全志 SOC » V3s/S3 Linux 测试 轮询/中断 GPIO 按钮驱动程序 / 旋转编码器 等 » 2020-04-06 16:43:34

https://github.com/torvalds/linux/blob/master/drivers/pinctrl/sunxi/pinctrl-sun8i-a33.c

https://patchwork.kernel.org/patch/8572141/

diff --git a/drivers/pinctrl/sunxi/pinctrl-sun8i-a33.c b/drivers/pinctrl/sunxi/pinctrl-sun8i-a33.c
index 00265f0..8b381d6 100644
--- a/drivers/pinctrl/sunxi/pinctrl-sun8i-a33.c
+++ b/drivers/pinctrl/sunxi/pinctrl-sun8i-a33.c
@@ -485,6 +485,7 @@  static const struct sunxi_pinctrl_desc sun8i_a33_pinctrl_data = {
 	.pins = sun8i_a33_pins,
 	.npins = ARRAY_SIZE(sun8i_a33_pins),
 	.irq_banks = 2,
+	.irq_bank_base = 1,
 };

2016 的bug patch 也没有并入?

#270 全志 SOC » 请问有没有哪位朋友用过 A33 Linux5.x IO中断呢? » 2020-04-06 16:36:48

ubuntu
回复: 7

原帖: https://whycan.cn/t_2393.html#p37627

我的A33 linux5.x 按 4# 的操作步奏,中断申请到了, 但是根本不触发。

arch/arm/boot/dts/sun8i-a23-a33.dtsi

                pio: pinctrl@1c20800 {
                        /* compatible gets set in SoC specific dtsi file */
                        reg = <0x01c20800 0x400>;
                        
....

                        key_pins: key_pins@0 {
                                pins = "PB5";
                                function = "gpio_in";
                                allwinner,drive = <0>;
                                allwinner,pull = <1>;
                        };



arch/arm/boot/dts/sun8i-a33.dtsi

        keys{
                compatible = "gpio-keys";
                pinctrl-names = "default";
                pinctrl-0 = <&key_pins>;
                #address-cells = <1>;
                #size-cells = <0>;
                autorepeat;

                g-keys_up {
                        label = "GPIO KEY_UP";
                        linux,code = <103>; /* KEY_UP, see /usr/include/linux/input-event-codes.h */
//                        gpios = <&pio 1 5 1>; /* PA7 GPIO_ACTIVE_LOW */

                        interrupt-parent = <&pio>;
                        interrupts = <1 5 IRQ_TYPE_EDGE_FALLING>;//PB0
                };

                /*status = "okay";*/
        };

        iio-hwmon {
                compatible = "iio-hwmon";
                io-channels = <&ths>;
        };

根本不触发:

# cat /proc/interrupts
           CPU0       CPU1       CPU2       CPU3
 18:          0          0          0          0     GICv2  29 Level     arch_timer
 19:        401       1735        205        225     GICv2  30 Level     arch_timer
 22:          0          0          0          0     GICv2  50 Level     timer@1c20c00
 23:          0          0          0          0     GICv2  82 Level     1c02000.dma-controller
 25:       4072          0          0          0     GICv2  92 Level     sunxi-mmc
 26:          0          0          0          0     GICv2 103 Level     musb-hdrc.1.auto
 27:          0          0          0          0     GICv2 104 Level     ehci_hcd:usb1
 28:          0          0          0          0     GICv2 105 Level     ohci_hcd:usb2
 34:       1705          0          0          0     GICv2  32 Level     ttyS0
 56:          0          0          0          0  sunxi_pio_edge   5 Edge      GPIO KEY_UP
 60:          0          0          0          0  sunxi_pio_edge   9 Edge      1c0f000.mmc cd
IPI0:          0          0          0          0  CPU wakeup interrupts
IPI1:          0          0          0          0  Timer broadcast interrupts
IPI2:        749        723        125       1223  Rescheduling interrupts
IPI3:          1         12         22         43  Function call interrupts
IPI4:          0          0          0          0  CPU stop interrupts
IPI5:          0          0          0          0  IRQ work interrupts
IPI6:          0          0          0          0  completion interrupts
Err:          0

#271 Re: 全志 SOC » V3s/S3 Linux 测试 轮询/中断 GPIO 按钮驱动程序 / 旋转编码器 等 » 2020-04-06 16:34:58

我的A33 linux5.x 按 4# 的操作步奏,中断申请到了, 但是根本不触发。

arch/arm/boot/dts/sun8i-a23-a33.dtsi

                pio: pinctrl@1c20800 {
                        /* compatible gets set in SoC specific dtsi file */
                        reg = <0x01c20800 0x400>;
                        
....

                        key_pins: key_pins@0 {
                                pins = "PB5";
                                function = "gpio_in";
                                allwinner,drive = <0>;
                                allwinner,pull = <1>;
                        };



arch/arm/boot/dts/sun8i-a33.dtsi

        keys{
                compatible = "gpio-keys";
                pinctrl-names = "default";
                pinctrl-0 = <&key_pins>;
                #address-cells = <1>;
                #size-cells = <0>;
                autorepeat;

                g-keys_up {
                        label = "GPIO KEY_UP";
                        linux,code = <103>; /* KEY_UP, see /usr/include/linux/input-event-codes.h */
//                        gpios = <&pio 1 5 1>; /* PA7 GPIO_ACTIVE_LOW */

                        interrupt-parent = <&pio>;
                        interrupts = <1 5 IRQ_TYPE_EDGE_FALLING>;//PB0
                };

                /*status = "okay";*/
        };

        iio-hwmon {
                compatible = "iio-hwmon";
                io-channels = <&ths>;
        };

根本不触发:

# cat /proc/interrupts
           CPU0       CPU1       CPU2       CPU3
 18:          0          0          0          0     GICv2  29 Level     arch_timer
 19:        401       1735        205        225     GICv2  30 Level     arch_timer
 22:          0          0          0          0     GICv2  50 Level     timer@1c20c00
 23:          0          0          0          0     GICv2  82 Level     1c02000.dma-controller
 25:       4072          0          0          0     GICv2  92 Level     sunxi-mmc
 26:          0          0          0          0     GICv2 103 Level     musb-hdrc.1.auto
 27:          0          0          0          0     GICv2 104 Level     ehci_hcd:usb1
 28:          0          0          0          0     GICv2 105 Level     ohci_hcd:usb2
 34:       1705          0          0          0     GICv2  32 Level     ttyS0
 56:          0          0          0          0  sunxi_pio_edge   5 Edge      GPIO KEY_UP
 60:          0          0          0          0  sunxi_pio_edge   9 Edge      1c0f000.mmc cd
IPI0:          0          0          0          0  CPU wakeup interrupts
IPI1:          0          0          0          0  Timer broadcast interrupts
IPI2:        749        723        125       1223  Rescheduling interrupts
IPI3:          1         12         22         43  Function call interrupts
IPI4:          0          0          0          0  CPU stop interrupts
IPI5:          0          0          0          0  IRQ work interrupts
IPI6:          0          0          0          0  completion interrupts
Err:          0

#272 Re: 全志 SOC » V3s/S3 Linux 测试 轮询/中断 GPIO 按钮驱动程序 / 旋转编码器 等 » 2020-04-06 10:11:11

牛叉,学习了, 正需要这个demo到A33测试, 晚点过来报告。

#273 VMWare/Linux/Ubuntu/Fedora/CentOS/U-BOOT » 嵌入式Linux通讯用 libssl RSA 加密感觉挺不错的 » 2020-04-06 10:09:19

ubuntu
回复: 4

https://blog.csdn.net/RUN32875094/article/details/79306256

#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<openssl/rsa.h>
#include<openssl/pem.h>
#include<openssl/err.h>
 
#define PRIKEY "prikey.pem"
#define PUBKEY "pubkey.pem"
#define BUFFSIZE 4096
 
/************************************************************************
 * RSA加密解密函数
 *
 * file: test_rsa_encdec.c
 * gcc -Wall -O2 -o test_rsa_encdec test_rsa_encdec.c -lcrypto -lssl
 *
 * author: tonglulin@gmail.com by www.qmailer.net
 ************************************************************************/
 
char *my_encrypt(char *str, char *pubkey_path)
{
    RSA *rsa = NULL;
    FILE *fp = NULL;
    char *en = NULL;
    int len = 0;
    int rsa_len = 0;
 
    if ((fp = fopen(pubkey_path, "r")) == NULL) {
        return NULL;
    }
 
    /* 读取公钥PEM,PUBKEY格式PEM使用PEM_read_RSA_PUBKEY函数 */
    if ((rsa = PEM_read_RSAPublicKey(fp, NULL, NULL, NULL)) == NULL) {
        return NULL;
    }
 
    RSA_print_fp(stdout, rsa, 0);
 
    len = strlen(str);
    rsa_len = RSA_size(rsa);
 
    en = (char *)malloc(rsa_len + 1);
    memset(en, 0, rsa_len + 1);
 
    if (RSA_public_encrypt(rsa_len, (unsigned char *)str, (unsigned char*)en, rsa, RSA_NO_PADDING) < 0) {
        return NULL;
    }
 
    RSA_free(rsa);
    fclose(fp);
 
    return en;
}
 
char *my_decrypt(char *str, char *prikey_path)
{
    RSA *rsa = NULL;
    FILE *fp = NULL;
    char *de = NULL;
    int rsa_len = 0;
 
    if ((fp = fopen(prikey_path, "r")) == NULL) {
        return NULL;
    }
 
    if ((rsa = PEM_read_RSAPrivateKey(fp, NULL, NULL, NULL)) == NULL) {
        return NULL;
    }
 
    RSA_print_fp(stdout, rsa, 0);
 
    rsa_len = RSA_size(rsa);
    de = (char *)malloc(rsa_len + 1);
    memset(de, 0, rsa_len + 1);
 
    if (RSA_private_decrypt(rsa_len, (unsigned char *)str, (unsigned char*)de, rsa, RSA_NO_PADDING) < 0) {
        return NULL;
    }
 
    RSA_free(rsa);
    fclose(fp);
 
    return de;
}
 
int main(int argc, char *argv[])
{
    char *src = "hello, world!";
    char *en = NULL;
    char *de = NULL;
 
    printf("src is: %s\n", src);
 
    en = my_encrypt(src, PUBKEY);
    printf("enc is: %s\n", en);
 
    de= my_decrypt(en, PRIKEY);
    printf("dec is: %s\n", de);
 
    if (en != NULL) {
        free(en);
    }
 
    if (de != NULL) {
        free(de);
    }
 
    return 0;
}

#274 Re: 全志 SOC » v3s matrix keypad 设备树怎么写? » 2020-04-06 09:32:05

请问大佬,问题最后解决了吗?

#276 Re: 技术人生/软件使用技巧/破解经验/技术吐槽/灌水 » 现在用arm9做产品用什么芯片好? » 2020-04-06 09:24:55

liuchangyin 说:

v3s如何?看着最近在涨价啊

估计疫情导致供应链紧张吧,后面应该慢慢缓解,目前好几家芯片都开始炒作涨价了。

#278 Re: 全志 SOC » F1C100S使用主线uboot如何更改默认终端串口 » 2020-04-03 15:22:13

#define CONFIG_CONS_INDEX       1  //UART0
#define CONFIG_CONS_INDEX       2  //UART1
#define CONFIG_CONS_INDEX       3  //UART2

改这个只能影响u-boot 的 spl 串口输出, 如果u-boot输出还得改 dts 文件:

diff --git a/arch/arm/dts/suniv-f1c100s-licheepi-nano.dts b/arch/arm/dts/suniv-f1c100s-licheepi-nano.dts
index 9c111e6228..45658d2b1d 100644
--- a/arch/arm/dts/suniv-f1c100s-licheepi-nano.dts
+++ b/arch/arm/dts/suniv-f1c100s-licheepi-nano.dts
@@ -15,11 +15,12 @@

        aliases {
                serial0 = &uart0;
+               serial2 = &uart2;
                spi0 = &spi0;
        };

        chosen {
-               stdout-path = "serial0:115200n8";
+               stdout-path = "serial2:115200n8";
        };
 };

@@ -47,6 +48,18 @@
        status = "okay";
 };

+&uart1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart1_pins_a>;
+       status = "okay";
+};
+
+&uart2 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart2_pins_e>;
+       status = "okay";
+};
+
 &usb_otg {
        dr_mode = "otg";
        status = "okay";
diff --git a/arch/arm/dts/suniv.dtsi b/arch/arm/dts/suniv.dtsi
index 10da83b53a..d3b937a16d 100644
--- a/arch/arm/dts/suniv.dtsi
+++ b/arch/arm/dts/suniv.dtsi
@@ -125,6 +125,16 @@
                                pins = "PE0", "PE1";
                                function = "uart0";
                        };
+
+                       uart1_pins_a: uart-pins-pa {
+                               pins = "PA2", "PA3";
+                               function = "uart1";
+                       };
+
+                       uart2_pins_e: uart-pins-pe-uart2 {
+                               pins = "PE7", "PE8";
+                               function = "uart2";
+                       };
                };

                timer@1c20c00 {
diff --git a/arch/arm/include/asm/arch-sunxi/gpio.h b/arch/arm/include/asm/arch-sunxi/gpio.h
index b0a946d3b7..09c1a78adc 100644
--- a/arch/arm/include/asm/arch-sunxi/gpio.h
+++ b/arch/arm/include/asm/arch-sunxi/gpio.h
@@ -176,6 +176,9 @@ enum sunxi_gpio_number {
 #define SUNXI_GPD_LVDS0                3

 #define SUNIV_GPE_UART0                5
+#define SUNIV_GPA_UART1                5
+#define SUNIV_GPE_UART2                3
+
 #define SUN5I_GPE_SDC2         3
 #define SUN8I_GPE_TWI2         3

diff --git a/arch/arm/mach-sunxi/board.c b/arch/arm/mach-sunxi/board.c
index 6afbb7affa..7a44996505 100644
--- a/arch/arm/mach-sunxi/board.c
+++ b/arch/arm/mach-sunxi/board.c
@@ -87,6 +87,14 @@ static int gpio_init(void)
        sunxi_gpio_set_cfgpin(SUNXI_GPE(0), SUNIV_GPE_UART0);
        sunxi_gpio_set_cfgpin(SUNXI_GPE(1), SUNIV_GPE_UART0);
        sunxi_gpio_set_pull(SUNXI_GPE(1), SUNXI_GPIO_PULL_UP);
+#elif CONFIG_CONS_INDEX == 2 && defined(CONFIG_MACH_SUNIV)
+       sunxi_gpio_set_cfgpin(SUNXI_GPA(2), SUNIV_GPA_UART1);
+       sunxi_gpio_set_cfgpin(SUNXI_GPA(3), SUNIV_GPA_UART1);
+       sunxi_gpio_set_pull(SUNXI_GPA(3), SUNXI_GPIO_PULL_UP);
+#elif CONFIG_CONS_INDEX == 3 && defined(CONFIG_MACH_SUNIV)
+       sunxi_gpio_set_cfgpin(SUNXI_GPE(7), SUNIV_GPE_UART2);
+       sunxi_gpio_set_cfgpin(SUNXI_GPE(8), SUNIV_GPE_UART2);
+       sunxi_gpio_set_pull(SUNXI_GPA(8), SUNXI_GPIO_PULL_UP);
 #elif CONFIG_CONS_INDEX == 1 && (defined(CONFIG_MACH_SUN4I) || \
                                 defined(CONFIG_MACH_SUN7I) || \
                                 defined(CONFIG_MACH_SUN8I_R40))
diff --git a/include/configs/suniv.h b/include/configs/suniv.h
index cadb003f02..b1448f49d4 100644
--- a/include/configs/suniv.h
+++ b/include/configs/suniv.h
@@ -29,4 +29,7 @@

 #define CONFIG_HIDE_LOGO_VERSION

+#undef CONFIG_CONS_INDEX
+#define CONFIG_CONS_INDEX       3
+

2020-04-03_152041.png


从 UART2(PE7/PE8)输出搞定!

#279 Re: 全志 SOC » F1C100S使用主线uboot如何更改默认终端串口 » 2020-04-03 11:41:37

diff --git a/arch/arm/dts/suniv.dtsi b/arch/arm/dts/suniv.dtsi
index 10da83b53a..9dd95f38e1 100644
--- a/arch/arm/dts/suniv.dtsi
+++ b/arch/arm/dts/suniv.dtsi
@@ -125,6 +125,16 @@
                                pins = "PE0", "PE1";
                                function = "uart0";
                        };
+
+                       uart1_pins_a: uart-pins-pa {
+                               pins = "PA2", "PA3";
+                               function = "uart1";
+                       };
+
+                       uart2_pins_a: uart-pins-pe-uart2 {
+                               pins = "PE7", "PE8";
+                               function = "uart2";
+                       };
                };

                timer@1c20c00 {
diff --git a/arch/arm/include/asm/arch-sunxi/gpio.h b/arch/arm/include/asm/arch-sunxi/gpio.h
index b0a946d3b7..09c1a78adc 100644
--- a/arch/arm/include/asm/arch-sunxi/gpio.h
+++ b/arch/arm/include/asm/arch-sunxi/gpio.h
@@ -176,6 +176,9 @@ enum sunxi_gpio_number {
 #define SUNXI_GPD_LVDS0                3

 #define SUNIV_GPE_UART0                5
+#define SUNIV_GPA_UART1                5
+#define SUNIV_GPE_UART2                3
+
 #define SUN5I_GPE_SDC2         3
 #define SUN8I_GPE_TWI2         3

diff --git a/arch/arm/mach-sunxi/board.c b/arch/arm/mach-sunxi/board.c
index 6afbb7affa..7a44996505 100644
--- a/arch/arm/mach-sunxi/board.c
+++ b/arch/arm/mach-sunxi/board.c
@@ -87,6 +87,14 @@ static int gpio_init(void)
        sunxi_gpio_set_cfgpin(SUNXI_GPE(0), SUNIV_GPE_UART0);
        sunxi_gpio_set_cfgpin(SUNXI_GPE(1), SUNIV_GPE_UART0);
        sunxi_gpio_set_pull(SUNXI_GPE(1), SUNXI_GPIO_PULL_UP);
+#elif CONFIG_CONS_INDEX == 2 && defined(CONFIG_MACH_SUNIV)
+       sunxi_gpio_set_cfgpin(SUNXI_GPA(2), SUNIV_GPA_UART1);
+       sunxi_gpio_set_cfgpin(SUNXI_GPA(3), SUNIV_GPA_UART1);
+       sunxi_gpio_set_pull(SUNXI_GPA(3), SUNXI_GPIO_PULL_UP);
+#elif CONFIG_CONS_INDEX == 3 && defined(CONFIG_MACH_SUNIV)
+       sunxi_gpio_set_cfgpin(SUNXI_GPE(7), SUNIV_GPE_UART2);
+       sunxi_gpio_set_cfgpin(SUNXI_GPE(8), SUNIV_GPE_UART2);
+       sunxi_gpio_set_pull(SUNXI_GPA(8), SUNXI_GPIO_PULL_UP);
 #elif CONFIG_CONS_INDEX == 1 && (defined(CONFIG_MACH_SUN4I) || \
                                 defined(CONFIG_MACH_SUN7I) || \
                                 defined(CONFIG_MACH_SUN8I_R40))
diff --git a/include/configs/suniv.h b/include/configs/suniv.h
index cadb003f02..b1448f49d4 100644
--- a/include/configs/suniv.h
+++ b/include/configs/suniv.h
@@ -29,4 +29,7 @@

 #define CONFIG_HIDE_LOGO_VERSION

+#undef CONFIG_CONS_INDEX
+#define CONFIG_CONS_INDEX       3
+
 #endif /* __CONFIG_H */

从 UART2(PE7/PE8)输出,  刚刚改完, 还没测试呢, 可能有坑。

#281 Re: 全志 SOC » 自制F1C200S板子连接电脑USB显示无法识别 » 2020-04-03 11:29:34

MK-2020 说:

谢谢!已经解决。

请问是如何解决的?

#282 Re: 全志 SOC » F1C100S使用主线uboot如何更改默认终端串口 » 2020-04-03 11:27:59

这个文件 include/configs/suniv.h 还得加上:

#define CONFIG_CONS_INDEX       1  //UART0
#define CONFIG_CONS_INDEX       2  //UART1
#define CONFIG_CONS_INDEX       3  //UART2

参考: https://whycan.cn/t_1417.html

#283 Re: 全志 SOC » 【视频分享】制作荔枝派Zero开发板(全志V3s) TF/SD卡启动盘 » 2020-03-31 19:01:49

carl 说:

已经解决了,就是因为分区的原因,之前分区的时候将GPT 搞坏了,重新全部分区之后解决的(diskgenius重新格式化)

原来如此!

#284 Re: 技术人生/软件使用技巧/破解经验/技术吐槽/灌水 » 疫情之下阿里云促销力度挺大的,有没有朋友关注一下? » 2020-03-31 16:38:51

sy373466062 说:

问一下,那续费的时候还是按照现在的优惠来的吗?  还是续费就恢复到原价了?

别怕,有可能一年后价格更便宜,而已云服务器数据迁移很容易。

到时候再建一个新账号,

反正阿里云的新账号又不绑定手机号码, 手机号只用安全验证只用, 一个手机号可以注册多个新账号。

#286 Re: VMWare/Linux/Ubuntu/Fedora/CentOS/U-BOOT » 试一试刚刚买的阿里云69元ubuntu服务器 » 2020-03-31 10:39:04

illusion 说:

好帖,写的非常详细!

随手记录一下过程, 怕过几天又什么都记不起了, 在晕哥这里留点足迹。





克隆u-boot并恢复到 v2017.11 的 tag:

git clone https://github.com/u-boot/u-boot
git reset --hard v2017.11

上面 github 在国内太慢了, 试一试gitee的镜像:

git clone https://gitee.com/mirrors/u-boot
git reset --hard v2017.11

#288 Re: 全志 SOC » buildroot 以太网问题 » 2020-03-31 09:45:52

这个日志 Starting dropbear sshd 应该是

/etc/init.d/XXX 开机初始化脚本里面显示出来的, 找到对应的dropbear 命令行修改一下。

dropbear 命令行我记得有后台运行的参数, 你找一下。

#289 Re: 全志 SOC » buildroot 以太网问题 » 2020-03-31 09:28:05

ps 显示所有进程, 看 dropbear 有没有在跑。

#290 Re: VMWare/Linux/Ubuntu/Fedora/CentOS/U-BOOT » 试一试刚刚买的阿里云69元ubuntu服务器 » 2020-03-31 08:45:34

sea18c 说:

10分钟,这么快呀,我用自己的16线程服务器都要差不多30分钟,是不是我的服务器太差呀,ubuntu你对服务器熟悉吗,帮看下我的服务器是不是要升级了。
16x Intel(R)Xeon(R) CPU E5-2440 v2 @ 1.9GHz(1Socket)   内存是16G

感觉不用这么久, 你是不是编译x86版本了?


dso_2019 说:

ubuntu 选择哪个版本好点

Ubuntu18.04, 这个是 LTS 长支持版本



刚刚收到阿里云的推销短信, 需要下手的要快一点了, 今天最后一天, 明天恢复原价。

#291 Re: 全志 SOC » 【视频分享】制作荔枝派Zero开发板(全志V3s) TF/SD卡启动盘 » 2020-03-31 00:45:47

[    1.405767] VFS: Cannot open root device "mmcblk0p2" or unknown-block(179,2): error -6



第二个分区有问题, 或者卡坏, 或者文件系统代码没有编译进来.

#294 Re: 全志 SOC » v3s linux3.4 驱动位置 » 2020-03-30 22:25:18

全志 linux 3.4 的 sdk 用 自己搞的设备树 ---- sys_config.fex

#295 Re: VMWare/Linux/Ubuntu/Fedora/CentOS/U-BOOT » 试一试刚刚买的阿里云69元ubuntu服务器 » 2020-03-30 21:21:32

sea18c 说:

编译linux 要多久呢

具体没记录, 估计全新编译10分钟左右.

#296 Re: VMWare/Linux/Ubuntu/Fedora/CentOS/U-BOOT » 试一试刚刚买的阿里云69元ubuntu服务器 » 2020-03-30 19:44:03

mobaxterm ssh 登录进去 Up/Down/Tab 无法使用的解决方案:

打开 /etc/passwd

找到

ren:x:1000:1000::/home/ren:/bin/sh

改为:

ren:x:1000:1000::/home/ren:/bin/bash

#297 Re: VMWare/Linux/Ubuntu/Fedora/CentOS/U-BOOT » 试一试刚刚买的阿里云69元ubuntu服务器 » 2020-03-30 18:29:49

dso_2019 说:

用云服务器编译快一些吗

个人感觉还行, 主要是方便, 家里搞完到办公室继续玩, 手机也可以ssh操控, 不用担心断网连不上的问题.

#298 Re: VMWare/Linux/Ubuntu/Fedora/CentOS/U-BOOT » 试一试刚刚买的阿里云69元ubuntu服务器 » 2020-03-30 17:40:20

还是没解决, 用 widora 的加速器下载了 linux:

然后接着:
sudo apt-get update;sudo apt-get install git-core gnupg flex bison gperf build-essential \
zip curl zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 \
lib32ncurses5-dev x11proto-core-dev libx11-dev lib32z-dev ccache \
libgl1-mesa-dev libxml2-utils xsltproc unzip u-boot-tools gawk samba gcc-arm-linux-gnueabihf -y

#299 Re: VMWare/Linux/Ubuntu/Fedora/CentOS/U-BOOT » 试一试刚刚买的阿里云69元ubuntu服务器 » 2020-03-30 16:38:29

装个软件包试一试: sudo apt-get install libcurl4-openssl-dev

ubuntu:/home/ren/A33$ sudo apt-get install libcurl4-openssl-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
  libcurl4-doc libidn11-dev libkrb5-dev libldap2-dev librtmp-dev libssh2-1-dev
The following NEW packages will be installed:
  libcurl4-openssl-dev
0 upgraded, 1 newly installed, 0 to remove and 218 not upgraded.
Need to get 294 kB of archives.
After this operation, 1,399 kB of additional disk space will be used.
Get:1 http://mirrors.tencentyun.com/ubuntu bionic-security/main amd64 libcurl4-openssl-dev amd64 7.58.0-2ubuntu3.8 [294 kB]
Fetched 294 kB in 0s (890 kB/s)
Selecting previously unselected package libcurl4-openssl-dev:amd64.
(Reading database ... 168100 files and directories currently installed.)
Preparing to unpack .../libcurl4-openssl-dev_7.58.0-2ubuntu3.8_amd64.deb ...
Unpacking libcurl4-openssl-dev:amd64 (7.58.0-2ubuntu3.8) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
Setting up libcurl4-openssl-dev:amd64 (7.58.0-2ubuntu3.8) ...

#300 Re: VMWare/Linux/Ubuntu/Fedora/CentOS/U-BOOT » 试一试刚刚买的阿里云69元ubuntu服务器 » 2020-03-30 16:29:02

克隆几次都报一个错误:

$sudo git clone https://gitee.com/mirrors/linux
Cloning into 'linux'...
remote: Enumerating objects: 9149, done.
remote: Counting objects: 100% (9149/9149), done.
remote: Compressing objects: 100% (5116/5116), done.
error: RPC failed; curl 56 GnuTLS recv error (-110): The TLS connection was non-properly terminated.
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed

看看这些能不能解决吧
https://zhuanlan.zhihu.com/p/53961303
https://www.cnblogs.com/sddai/p/10209121.html

#301 Re: VMWare/Linux/Ubuntu/Fedora/CentOS/U-BOOT » 试一试刚刚买的阿里云69元ubuntu服务器 » 2020-03-30 16:06:06

8. mobaxterm 登陆进去, 克隆一个Linux:

mkdir ~/A33/
cd ~/A33
git clone https://gitee.com/mirrors/linux

9. 编译A33, 参考 https://whycan.cn/t_3643.html#p33345

#克隆
git clone https://gitee.com/mirrors/linux

cd linux

#默认配置
ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make sunxi_defconfig

#手动配置
ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make menuconfig

#编译
ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make -j3



下面这两个就是你需要的文件了:

arch/arm/boot/zImage
arch/arm/boot/dts/sun8i-a33-sinlinx-sina33.dtb

在 mobaxterm 左边的文件树里面可以下载.

#302 Re: 全志 SOC » v3s buildroot QT5 不生成libqjpeg.so » 2020-03-30 15:45:39

Gentlepig 说:

搭车问个问题:
用buildroot制作的带qt5.6的文件系统,运行qt程序后提示:
nuc972:/# ./mnt/nfs/serial                                                                         
Failed to load the library: udev, supported version(s): 1 and 0

运行程序后插上Usb鼠标,没反应。先插上usb鼠标,再运行程序,就有鼠标了。

这个不会 sad

#303 VMWare/Linux/Ubuntu/Fedora/CentOS/U-BOOT » 试一试刚刚买的阿里云69元ubuntu服务器 » 2020-03-30 15:44:42

ubuntu
回复: 18

69元阿里云服务器购买参考这里: https://whycan.cn/t_3969.html

1. 添加用户: sudo useradd ren

2. 重设ren密码: sudo passwd ren

3. 建立用户目录:

sudo mkdir /home/ren/ -p
sudo mkdir /home/ren/.ssh -p
sudo chown -R ren:ren /home/ren/

4. 生成秘钥: ssh-keygen -t rsa -b 4096 -C "10000@vip.qq.com"
私钥: id_rsa
公钥: id_rsa.pub

5. 公钥拷贝到目录: sudo cp /home/ren/.ssh/id_rsa.pub /home/ren/.ssh/authorized_keys

6. 用私钥 ssh 连接服务器, 推荐 mobaxterm:
2020-03-30_154146.png

7. 现在新用户可以为所欲为了。

页脚

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

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