1.8V出问题了
DDR3是1.5V的,我换过DCDC也是一样的,300块板子,大约有10片左右有这个问题,
交换过X3芯片和板子也是一样的问题,
芯片有问题,换到哪块板子都是一样的问题。
芯片没问题,换到哪块板子都没问题。
\0\0
U-Boot SPL 2019.10 (Jan 17 2021 - 08:57:38 +0800)
DRAM: 0 MiB
### ERROR ### Please RESET the board ###
\0
U-Boot SPL 2019.10 (Jan 17 2021 - 08:57:38 +0800)
DRAM: 128 MiB
Failed to set core voltage! Can't set CPU frequency
Trying to boot from MMC1
MMC: no card present
spl: mmc init failed with error: -123
SPL: failed to boot from all boot devices
### ERROR ### Please RESET the board ###
\0
U-Boot SPL 2019.10 (Jan 17 2021 - 08:57:38 +0800)
DRAM: 128 MiB
Failed to set core voltage! Can't set CPU frequency
Trying to boot from MMC1
MMC: no card present
spl: mmc init failed with error: -123
SPL: failed to boot from all boot devices
### ERROR ### Please RESET the board ###
\0
U-Boot SPL 2019.10 (Jan 17 2021 - 08:57:38 +0800)
DRAM: 128 MiB
Failed to set core voltage! Can't set CPU frequency
Trying to boot from MMC1
MMC: no card present
spl: mmc init failed with error: -123
SPL: failed to boot from all boot devices
### ERROR ### Please RESET the board ###
\0
U-Boot SPL 2019.10 (Jan 17 2021 - 08:57:38 +0800)
DRAM: 0 MiB
### ERROR ### Please RESET the board ###
换u-boot 2019.10 也是一样的问题
github好解决 buildroot咋解决?
链接: https://pan.baidu.com/s/1p6840CRWLbxuXUX67mbopg
提取码: i4sy 复制这段内容后打开百度网盘手机App,操作更方便哦
试一试这个 dl.tar
我个人感觉比较全了.
新唐ARM9系列芯片手册大全
http://whycan.com/t_4553.html
(出处:哇酷开发者社区)
下载: CFF Explorer.7z
@路人甲 你用的是不是Ubuntu18.04/20.04?
要不要试一试嘛14.04或16.04?
非常感谢, 还真是这个问题, 用 ubuntu14.04 就好了
先装以下软件: http://www.sochip.com.cn/s3/index.php?title=Initializing_the_Build_Environment
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 lib32z1-dev ccache \
libgl1-mesa-dev libxml2-utils xsltproc unzip u-boot-tools gawk -y
然后执行
source build/envsetup.sh; zmake all
就可以了。
all_objects = /opt/v3s/linux/s3linux/core/wifi//wifi_ap.o
all_pre_libs =
install_targets = /opt/v3s/linux/s3linux/out/sun8iw8p1-linaro-5.3/linux/common/buildroot//target/usr/lib/libwifi_ap.so
ALL_MODULES= libwifi_ap.so
TARGET_CLEAN = /opt/v3s/linux/s3linux/core/wifi//libwifi_ap.so /opt/v3s/linux/s3linux/out/sun8iw8p1-linaro-5.3/linux/common/buildroot//target/usr/lib/libwifi_ap.so
private_asflags =
private_cflags = -fPIC -g --sysroot=/opt/v3s/linux/s3linux/out/sun8iw8p1-linaro-5.3/linux/common/buildroot//staging -lc -I/opt/v3s/linux/s3linux/core/include -D_GNU_SOURCE -Wall -Wno-unused-function -Wno-unused-variable -Wno-unused-but-set-variable -Wno-unused-label -ffunction-sections -fdata-sections -DUSE_LOG_LIB_GLOG
private_cppflags =
private_ldflags = -lpthread --shared -Wl,--gc-sections -Wl,-rpath-link=/opt/v3s/linux/s3linux/out/sun8iw8p1-linaro-5.3/linux/common/buildroot//target/usr/lib -Wl,--no-whole-archive -L/opt/v3s/linux/s3linux/out/sun8iw8p1-linaro-5.3/linux/common/buildroot//target/usr/lib
private_arflags = -rcs
-----------------END----------------------
CC /opt/v3s/linux/s3linux/core/wifi//wifi_ap.o
LD /opt/v3s/linux/s3linux/core/wifi//libwifi_ap.so
COPY /opt/v3s/linux/s3linux/core/wifi//libwifi_ap.so to /opt/v3s/linux/s3linux/out/sun8iw8p1-linaro-5.3/linux/common/buildroot//target/usr/lib/libwifi_ap.so
make: Leaving directory '/opt/v3s/linux/s3linux'
[zeta] Build squashfs rootfs ...
-bash: /opt/v3s/linux/s3linux/out/sun8iw8p1-linaro-5.3/linux/common/buildroot//images/../host/usr/bin/fakeroot: No such file or directory
请问这个错误如何解决?
参考: https://shellcodes.org/ASM/为什么非0xAA55结尾的软盘镜像QEMU无法启动.html
boot.asm 代码:
;; filename: boot.asm
org 07c00h
mov ax, cs
mov ds, ax
mov es, ax
hello_entry:
mov bp, msg
mov cx, 18 ; 显示字符长度
mov ah, 13h ; 在 Teletype 模式下显示字符串
mov al, 01h ; 光标位置不变
mov bh, 0 ; 显示页,图形模式下 BH 必须为 0
mov bl, 0fh ; 文字颜色,0F 为白色
mov dh, 0 ; 显示行
mov dl, 0 ; 显示列
int 10h
ret
msg: db "hello whycan.com",0dh,0ah,0
jmp $
arychen 说:SSD是不是不经常写的话故障率不高?
想着办公室就用SSD+低功耗主板CPU搭一个文件/GIT服务器好了,本地代码管理速度应该更快吧,还比硬盘更省电哈如果不是考虑代码大小或者代码保密性的话,最好还是用gitee coding 或者 github之类的。
自己搭建看起来方便又简单,实际上要考虑很多,至少要最好:
1. 至少有一个磁盘组raid1,用来防止另一块硬盘突然挂掉。
2. 至少要写个脚本或者什么软件进行自动将git仓库定期备份到云端(网盘之类的)
3. 如果放在家里的话,最好还要弄个UPS防止突然断电。
4. 放在家里面的话,还要弄个DDNS,注册个域名,绑定电信宽带的动态公网IP。放在公司就需要跟公司申请端口
git本身就是分布式的存储, 每个git仓库都是一个完整备份,
还可以通过 git remote add xxx githu.com/xxx/x.git 这种形式添加N个远程仓库,
可以通过一个命令把本地修改同步到N个远程仓库:
https://stackoverflow.com/questions/5785549/able-to-push-to-all-git-remotes-with-the-one-command
把这个文件 board/widora/mangopi/r3/devicetree/linux/devicetree.dts
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 = "disabled";
};
改为
status = "okay";
就可以了。
请问如果我添加了一个开机画面文件: board/widora/mangopi/r3/splash.png
应该如何拷贝到 output/images 呢?
修改 board/allwinner/suniv-f1c100s/scripts/genimage.sh 这个文件吗?
可以的, 我就是这么干的
修改 board/allwinner/suniv-f1c100s/scripts/genimage.sh:
#!/bin/bash
set -e
SELFDIR=`dirname \`realpath ${0}\``
[ $# -eq 2 ] || {
echo "SYNTAX: $0 <u-boot-with-spl image> <genimage.cfg>"
echo "Given: $@"
exit 1
}
cp ${SELFDIR}/../splash/splash.bmp ${1}/ -rf
${SELFDIR}/mknanduboot.sh ${1}/${2} ${1}/u-boot-sunxi-with-nand-spl.bin
support/scripts/genimage.sh ${1} -c board/allwinner/sun8i-v3s/genimage-sdcard.cfg
support/scripts/genimage.sh ${1} -c board/allwinner/sun8i-v3s/genimage-nor.cfg
support/scripts/genimage.sh ${1} -c board/allwinner/sun8i-v3s/genimage-nand.cfg
support/scripts/genimage.sh ${1} -c board/allwinner/sun8i-v3s/genimage-flasher.cfg
添加这一行: cp ${SELFDIR}/../splash/splash.bmp ${1}/ -rf
然后 board/allwinner/sun8i-v3s/genimage-sdcard.cfg 添加一行 splash.bmp 就可以了。
请问楼主如果TF有两个分区,执行ums命令:
=> ums 0 mmc 0
** Invalid partition 1 **会出现这个错误, 应该怎么破?
把这个判断强行屏蔽起来就好了
diff --git a/arch/arm/mach-sunxi/Kconfig b/arch/arm/mach-sunxi/Kconfig
index b7cb87a98f..3a46b14b05 100644
--- a/arch/arm/mach-sunxi/Kconfig
+++ b/arch/arm/mach-sunxi/Kconfig
@@ -262,6 +262,7 @@ config MACH_SUN8I_V3S
select SUNXI_DRAM_DW
select SUNXI_DRAM_DW_16BIT
select SUPPORT_SPL
+ select SUNXI_DE2
config MACH_SUN8I_S3
bool "sun8i (Allwinner S3)"
diff --git a/cmd/usb_mass_storage.c b/cmd/usb_mass_storage.c
index c5c6899787..635246baf8 100644
--- a/cmd/usb_mass_storage.c
+++ b/cmd/usb_mass_storage.c
@@ -56,7 +56,7 @@ static int ums_init(const char *devtype, const char *devnums_part_str)
char *s, *t, *devnum_part_str, *name;
struct blk_desc *block_dev;
disk_partition_t info;
- int partnum;
+ int partnum = 0;
int ret = -1;
struct ums *ums_new;
@@ -71,13 +71,12 @@ static int ums_init(const char *devtype, const char *devnums_part_str)
devnum_part_str = strsep(&t, ",");
if (!devnum_part_str)
break;
-
partnum = blk_get_device_part_str(devtype, devnum_part_str,
&block_dev, &info, 1);
-
+#if 0
if (partnum < 0)
goto cleanup;
-
+#endif
/* Check if the argument is in legacy format. If yes,
* expose all partitions by setting the partnum = 0
* e.g. ums 0 mmc 0
diff --git a/disk/part.c b/disk/part.c
index 4cc2fc19f7..36818af610 100644
--- a/disk/part.c
+++ b/disk/part.c
@@ -580,8 +580,8 @@ int blk_get_device_part_str(const char *ifname, const char *dev_part_str,
if (part != PART_AUTO) {
ret = part_get_info(*dev_desc, part, info);
if (ret) {
- printf("** Invalid partition %d **\n", part);
- goto cleanup;
+ printf("** Invalid partition %d test **\n", part);
+// goto cleanup;
}
} else {
/*
@@ -632,7 +632,7 @@ int blk_get_device_part_str(const char *ifname, const char *dev_part_str,
" (expect \"" BOOT_PART_TYPE "\")\n",
info->type);
ret = -1;
- goto cleanup;
+// goto cleanup;
}
(*dev_desc)->log2blksz = LOG2((*dev_desc)->blksz);
奇怪, 我的dfu刷nor之后是这样的:
U-Boot SPL 2020.07 (Oct 09 2020 - 17:01:22 +0800)
DRAM: 64 MiB
Trying to boot from MMC1
Card did not respond to voltage select!
spl: mmc init failed with error: -95
Trying to boot from MMC2
Card did not respond to voltage select!
spl: mmc init failed with error: -95
Trying to boot from sunxi SPI
U-Boot 2020.07 (Oct 09 2020 - 17:01:22 +0800) Allwinner Technology
CPU: Allwinner F Series (SUNIV)
Model: Allwinner F1C100s Generic Device
DRAM: 64 MiB
MMC: mmc@1c0f000: 0, mmc@1c10000: 1
Setting up a 800x480 lcd console (overscan 0x0)
In: serial
Out: vga
Err: vga
Allwinner mUSB OTG (Peripheral)
Hit any key to stop autoboot: 0
Booting from FEL...
unknown raw ID 82e625a8
List of MTD devices:
No MTD device found
SF: Detected w25q128 with page size 256 Bytes, erase size 4 KiB, total 16 MiB
DFU waiting on SPI-NOR...
Card did not respond to voltage select!
Card did not respond to voltage select!
Card did not respond to voltage select!
unknown raw ID 82e62328
List of MTD devices:
No MTD device found
SF: Detected w25q128 with page size 256 Bytes, erase size 4 KiB, total 16 MiB
Booting from SPI-NOR...
device 0 offset 0x70000, size 0x10000
SF: 65536 bytes @ 0x70000 Read: OK
device 0 offset 0x80000, size 0x580000
SF: 5767168 bytes @ 0x80000 Read: OK
## Flattened Device Tree blob at 80700000
Booting using the fdt blob at 0x80700000
Loading Device Tree to 816f9000, end 816ffc6c ... OK
Cannot setup simplefb: node not found
Starting kernel ...
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 5.4.66 (whycan@ubuntu) (gcc version 8.4.0 (Buildroot 2020.02.4-00002-g2e2c3d224a)) #1 Fri Oct 9 10:45:59 CST 2020
[ 0.000000] CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=0005317f
[ 0.000000] CPU: VIVT data cache, VIVT instruction cache
[ 0.000000] OF: fdt: Machine model: Widora MangoPi R3
[ 0.000000] Memory policy: Data cache writeback
[ 0.000000] cma: Reserved 16 MiB at 0x83000000
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 16256
[ 0.000000] Kernel command line: console=ttyS0,115200 earlyprintk rootwait consoleblank=0 net.ifnames=0 biosdevname=0 root=/dev/mtdblock3 overlayfsdev=/dev/mtdblock4
[ 0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes, linear)
[ 0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes, linear)
[ 0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[ 0.000000] Memory: 38736K/65536K available (6144K kernel code, 248K rwdata, 1680K rodata, 1024K init, 225K bss, 10416K reserved, 16384K cma-reserved)
[ 0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[ 0.000000] random: get_random_bytes called from start_kernel+0x254/0x444 with crng_init=0
[ 0.000048] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
[ 0.000136] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[ 0.000898] Console: colour dummy device 80x30
[ 0.001007] Calibrating delay loop... 203.16 BogoMIPS (lpj=1015808)
[ 0.070261] pid_max: default: 32768 minimum: 301
[ 0.070785] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[ 0.070831] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[ 0.072790] CPU: Testing write buffer coherency: ok
[ 0.074907] Setting up static identity map for 0x80100000 - 0x80100058
[ 0.076229] devtmpfs: initialized
[ 0.088171] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[ 0.088235] futex hash table entries: 256 (order: -1, 3072 bytes, linear)
[ 0.092581] pinctrl core: initialized pinctrl subsystem
[ 0.095307] NET: Registered protocol family 16
[ 0.099095] DMA: preallocated 256 KiB pool for atomic coherent allocations
[ 0.101486] cpuidle: using governor menu
[ 0.146254] SCSI subsystem initialized
[ 0.146645] usbcore: registered new interface driver usbfs
[ 0.146863] usbcore: registered new interface driver hub
[ 0.147061] usbcore: registered new device driver usb
[ 0.147570] mc: Linux media interface: v0.10
[ 0.147728] videodev: Linux video capture interface: v2.00
[ 0.147852] pps_core: LinuxPPS API ver. 1 registered
[ 0.147873] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[ 0.147936] PTP clock support registered
[ 0.149023] ion_parse_dt_heap_common: id 4 type 4 name cma align 1000
[ 0.150038] Advanced Linux Sound Architecture Driver Initialized.
[ 0.152634] clocksource: Switched to clocksource timer
[ 0.184349] thermal_sys: Registered thermal governor 'step_wise'
[ 0.185126] NET: Registered protocol family 2
[ 0.186738] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes, linear)
[ 0.186828] TCP established hash table entries: 1024 (order: 0, 4096 bytes, linear)
[ 0.186882] TCP bind hash table entries: 1024 (order: 0, 4096 bytes, linear)
[ 0.186932] TCP: Hash tables configured (established 1024 bind 1024)
[ 0.187249] UDP hash table entries: 256 (order: 0, 4096 bytes, linear)
[ 0.187318] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes, linear)
[ 0.187830] NET: Registered protocol family 1
[ 0.190554] NetWinder Floating Point Emulator V0.97 (double precision)
[ 0.192441] Initialise system trusted keyrings
[ 0.193207] workingset: timestamp_bits=30 max_order=14 bucket_order=0
[ 0.215059] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[ 0.215677] jffs2: version 2.2. (NAND) (SUMMARY) © 2001-2006 Red Hat, Inc.
[ 0.330481] Key type asymmetric registered
[ 0.330523] Asymmetric key parser 'x509' registered
[ 0.330703] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 249)
[ 0.330731] io scheduler mq-deadline registered
[ 0.330747] io scheduler kyber registered
[ 0.346354] suniv-f1c100s-pinctrl 1c20800.pinctrl: initialized sunXi PIO driver
[ 0.370872] Serial: 8250/16550 driver, 8 ports, IRQ sharing disabled
[ 0.377160] suniv-f1c100s-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pa not found, using dummy regulator
[ 0.378512] printk: console [ttyS0] disabled
[ 0.398826] 1c25400.serial: ttyS0 at MMIO 0x1c25400 (irq = 28, base_baud = 6250000) is a 16550A
[ 0.831398] printk: console [ttyS0] enabled
[ 0.841222] suniv-f1c100s-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pd not found, using dummy regulator
[ 0.862505] panel-simple panel: panel supply power not found, using dummy regulator
[ 0.872238] SCSI Media Changer driver v0.25
[ 0.878154] suniv-f1c100s-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pc not found, using dummy regulator
[ 0.891020] spi-nor spi0.0: w25q128 (16384 Kbytes)
[ 0.897112] 5 fixed-partitions partitions found on MTD device spi0.0
[ 0.903585] Creating 5 MTD partitions on "spi0.0":
[ 0.908395] 0x000000000000-0x000000070000 : "u-boot"
[ 0.916874] 0x000000070000-0x000000080000 : "dtb"
[ 0.925100] 0x000000080000-0x000000600000 : "kernel"
[ 0.933612] 0x000000600000-0x000000d00000 : "rom"
[ 0.941697] 0x000000d00000-0x000001000000 : "overlay"
[ 0.950826] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 0.957480] ehci-platform: EHCI generic platform driver
[ 0.963210] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[ 0.969438] ohci-platform: OHCI generic platform driver
[ 0.975283] usbcore: registered new interface driver usb-storage
[ 0.982286] usb_phy_generic usb_phy_generic.0.auto: usb_phy_generic.0.auto supply vcc not found, using dummy regulator
[ 0.996003] i2c /dev entries driver
[ 1.000157] suniv-f1c100s-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pd not found, using dummy regulator
[ 1.013953] suniv-f1c100s-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pe not found, using dummy regulator
[ 1.024945] sun4i-csi 1cb0000.csi: Packed (RAW) format enabled.
[ 1.032813] sunxi-wdt 1c20ca0.watchdog: Watchdog enabled (timeout=16 sec, nowayout=0)
[ 1.042862] suniv-f1c100s-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pf not found, using dummy regulator
[ 1.080801] sunxi-mmc 1c0f000.mmc: initialized, max. request size: 16384 KB
[ 1.090260] usbcore: registered new interface driver usbhid
[ 1.095950] usbhid: USB HID core driver
[ 1.100117] sunxi-cedar 1c0e000.video-codec: sunxi cedar version 0.01alpha
[ 1.107455] sunxi-cedar 1c0e000.video-codec: cedar-ve the get irq is 20
[ 1.119301] debugfs: Directory '1c23c00.codec' with parent 'F1C100s Audio Codec' already present!
[ 1.133256] sun4i-codec 1c23c00.codec: Codec <-> 1c23c00.codec mapping ok
[ 1.149178] NET: Registered protocol family 17
[ 1.153855] Key type dns_resolver registered
[ 1.159288] Loading compiled-in X.509 certificates
[ 1.177998] sun4i-drm soc:display-engine: bound 1e00000.display-frontend (ops 0xc073b3d8)
[ 1.187051] sun4i-drm soc:display-engine: bound 1e60000.display-backend (ops 0xc073ac18)
[ 1.196657] sun4i-drm soc:display-engine: bound 1c0c000.lcd-controller (ops 0xc07397b8)
[ 1.205217] sun4i-drm soc:display-engine: bound 1c0a000.tv-encoder (ops 0xc073a4d8)
[ 1.212994] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[ 1.219596] [drm] No driver support for vblank timestamp query.
[ 1.227356] [drm] Initialized sun4i-drm 1.0.0 20150629 for soc:display-engine on minor 0
[ 1.236391] [drm] kms: can't enable cloning when we probably wanted to.
[ 1.308254] Console: switching to colour frame buffer device 100x30
[ 1.347156] sun4i-drm soc:display-engine: fb0: sun4i-drmdrmfb frame buffer device
[ 1.355715] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[ 1.373530] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[ 1.380288] ALSA device list:
[ 1.383395] #0: F1C100s Audio Codec
[ 1.387651] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
[ 1.396377] cfg80211: failed to load regulatory.db
[ 1.405754] random: fast init done
[ 1.412139] List of all partitions:
[ 1.415808] 1f00 448 mtdblock0
[ 1.415819] (driver?)
[ 1.422427] 1f01 64 mtdblock1
[ 1.422434] (driver?)
[ 1.429054] 1f02 5632 mtdblock2
[ 1.429062] (driver?)
[ 1.435691] 1f03 7168 mtdblock3
[ 1.435698] (driver?)
[ 1.442233] 1f04 3072 mtdblock4
[ 1.442239] (driver?)
[ 1.448815] No filesystem could mount root, tried:
[ 1.448822] ext3
[ 1.453773] ext2
[ 1.455700] ext4
[ 1.457622] squashfs
[ 1.459544] vfat
[ 1.461811]
[ 1.465291] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(31,3)
[ 1.473628] CPU: 0 PID: 1 Comm: swapper Not tainted 5.4.66 #1
[ 1.479356] Hardware name: Allwinner suniv Family
[ 1.484139] [<c010e6a8>] (unwind_backtrace) from [<c010b9c4>] (show_stack+0x10/0x14)
[ 1.491891] [<c010b9c4>] (show_stack) from [<c011702c>] (panic+0xe8/0x2e4)
[ 1.498779] [<c011702c>] (panic) from [<c090135c>] (mount_block_root+0x2bc/0x31c)
[ 1.506264] [<c090135c>] (mount_block_root) from [<c0901568>] (prepare_namespace+0x128/0x188)
[ 1.514794] [<c0901568>] (prepare_namespace) from [<c06f9cb0>] (kernel_init+0x8/0x108)
[ 1.522713] [<c06f9cb0>] (kernel_init) from [<c01010e0>] (ret_from_fork+0x14/0x34)
[ 1.530261] Exception stack(0xc2839fb0 to 0xc2839ff8)
[ 1.535309] 9fa0: 00000000 00000000 00000000 00000000
[ 1.543477] 9fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 1.551640] 9fe0: 00000000 00000000 00000000 00000000 00000013 00000000
[ 1.558250] ---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(31,3) ]---
终于看到有人提这个问题了, 还以为是我自己的电脑环境有问题 https://communities.vmware.com/thread/620959
不是,是一款视频信号解码芯片。
https://www.analog.com/media/en/technical-documentation/data-sheets/ADV7280.PDF
刚刚翻了一下手册, 明明就是一个 adc 芯片.
模拟信号进来, 通用并口的数字信号出去, 主控芯片支持摄像头的都会支持这个ADV7280芯片。
这个应该是 ADC 模数转换芯片吧?采集CVBS(TV)信号转为BT.656格式数字信号。
建议用f1c100s/f1c200s, 这个都支持:
Widora TINY200 R2 体验版开源开发包,修复了大部分F1C100s/F1C200s的遗留问题
http://whycan.cn/t_5061.html#p51424
(出处:哇酷开发者社区【全志 V3S/F1C100s/X3】)
https://whycan.cn/t_3294.html
https://whycan.cn/t_3722.html
https://whycan.cn/t_3724.html
E:\Python37\python.exe -m pip install termios
# i2cdetect -y 0
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: 20 -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
大神们,帮忙看下,esp8089还是用不了
# modprobe esp8089.ko config=crystal_26M_en=2
[ 122.207413] Set sdio block size 512 failed: -110)
[ 122.222972] first error exit
[ 122.236528] eagle_sdio: probe of mmc0:0001:1 failed with error -110
我用这个驱动: https://github.com/al177/esp8089
一样的错误
ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make Sinlinx_SinA33_defconfig
然后修改 .config 打开 CONFIG_SUPPORT_EMMC_BOOT 开关.
出现以下错误:
U-Boot SPL 2020.04 (Jun 20 2020 - 01:31:43 -0700)
DRAM: 128 MiB
Failed to set core voltage! Can't set CPU frequency
Trying to boot from MMC2
U-Boot SPL 2020.04 (Jun 20 2020 - 01:31:43 -0700)
DRAM: 128 MiB
Failed to set core voltage! Can't set CPU frequency
Trying to boot from MMC2
U-Boot SPL 2020.04 (Jun 20 2020 - 01:31:43 -0700)
DRAM: 128 MiB
Failed to set core voltage! Can't set CPU frequency
Trying to boot from MMC2
U-Boot SPL 2020.04 (Jun 20 2020 - 01:31:43 -0700)
DRAM: 128 MiB
Failed to set core voltage! Can't set CPU frequency
Trying to boot from MMC2
(重复几百遍)
U-Boot SPL 2020.04 (Jun 20 2020 - 01:31:43 -0700)
DRAM: 128 MiB
Failed to set core voltage! Can't set CPU frequency
Trying to boot from MMC2
unable to select a mode
spl: mmc init failed with error: -524
SPL: failed to boot from all boot devices
### ERROR ### Please RESET the board ###
(然后卡在此处)
https://whycan.cn/t_4735.html#p47906
根据楼主的帖子提示, 然后我在Linux下面如下操作,貌似u-boot有显示了,虽然启动还有点问题。
mmc bootpart enable 7 0 /dev/mmcblk2
dd if=/dev/mmcblk0 of=/dev/mmcblk2 bs=1M count=200
只是偶尔才能启动u-boot:
Connecting to COM18...
Connected.
1 USB Device(s) found
scanning usb for storage devices... 0 Storage Device(s) found
Hit any key to stop autoboot: 0
switch to partitions #0, OK
mmc1(part 0) is current device
Scanning mmc 1:1...
Found U-Boot script /boot.scr
reading /boot.scr
286 bytes read in 20 ms (13.7 KiB/s)
## Executing script at 43100000
Card did not respond to voltage select!
mmc_init: -95, time 28
** Bad device mmc 0 **
Card did not respond to voltage select!
mmc_init: -95, time 30
** Bad device mmc 0 **
SCRIPT FAILED: continuing...
reading /sun8i-x3-smallwit-card-taurus.dtb
24930 bytes read in 32 ms (760.7 KiB/s)
Card did not respond to voltage select!
mmc_init: -95, time 30
Device 0: device type unknown
... is now current device
** Bad device usb 0 **
** Bad device usb 0 **
using musb-hdrc, OUT ep1out IN ep1in STATUS ep2in
MAC de:ad:be:ef:00:01
HOST MAC de:ad:be:ef:00:00
RNDIS ready
The remote end did not respond in time.missing environment variable: pxeuuid
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/01-de-ad-be-ef-00-01
using musb-hdrc, OUT ep1out IN ep1in STATUS ep2in
MAC de:ad:be:ef:00:01
HOST MAC de:ad:be:ef:00:00
RNDIS ready
The remote end did not respond in time.missing environment variable: bootfile
Retrieving file: pxelinux.cfg/00000000
using musb-hdrc, OUT ep1out IN ep1in STATUS ep2in
MAC de:ad:be:ef:00:01
HOST MAC de:ad:be:ef:00:00
RNDIS ready
The remote end did not respond in time.missing environment variable: bootfile
Retrieving file: pxelinux.cfg/0000000
using musb-hdrc, OUT ep1out IN ep1in STATUS ep2in
MAC de:ad:be:ef:00:01
HOST MAC de:ad:be:ef:00:00
RNDIS ready
The remote end did not respond in time.missing environment variable: bootfile
Retrieving file: pxelinux.cfg/000000
using musb-hdrc, OUT ep1out IN ep1in STATUS ep2in
MAC de:ad:be:ef:00:01
HOST MAC de:ad:be:ef:00:00
RNDIS ready
The remote end did not respond in time.missing environment variable: bootfile
Retrieving file: pxelinux.cfg/00000
using musb-hdrc, OUT ep1out IN ep1in STATUS ep2in
MAC de:ad:be:ef:00:01
HOST MAC de:ad:be:ef:00:00
RNDIS ready
The remote end did not respond in time.missing environment variable: bootfile
Retrieving file: pxelinux.cfg/0000
using musb-hdrc, OUT ep1out IN ep1in STATUS ep2in
MAC de:ad:be:ef:00:01
HOST MAC de:ad:be:ef:00:00
RNDIS ready
The remote end did not respond in time.missing environment variable: bootfile
Retrieving file: pxelinux.cfg/000
using musb-hdrc, OUT ep1out IN ep1in STATUS ep2in
MAC de:ad:be:ef:00:01
HOST MAC de:ad:be:ef:00:00
RNDIS ready
The remote end did not respond in time.missing environment variable: bootfile
Retrieving file: pxelinux.cfg/00
using musb-hdrc, OUT ep1out IN ep1in STATUS ep2in
MAC de:ad:be:ef:00:01
HOST MAC de:ad:be:ef:00:00
RNDIS ready
The remote end did not respond in time.missing environment variable: bootfile
Retrieving file: pxelinux.cfg/0
using musb-hdrc, OUT ep1out IN ep1in STATUS ep2in
MAC de:ad:be:ef:00:01
HOST MAC de:ad:be:ef:00:00
RNDIS ready
The remote end did not respond in time.missing environment variable: bootfile
Retrieving file: pxelinux.cfg/default-arm-sunxi
using musb-hdrc, OUT ep1out IN ep1in STATUS ep2in
MAC de:ad:be:ef:00:01
HOST MAC de:ad:be:ef:00:00
RNDIS ready
The remote end did not respond in time.missing environment variable: bootfile
Retrieving file: pxelinux.cfg/default-arm
using musb-hdrc, OUT ep1out IN ep1in STATUS ep2in
MAC de:ad:be:ef:00:01
HOST MAC de:ad:be:ef:00:00
RNDIS ready
The remote end did not respond in time.missing environment variable: bootfile
Retrieving file: pxelinux.cfg/default
using musb-hdrc, OUT ep1out IN ep1in STATUS ep2in
MAC de:ad:be:ef:00:01
HOST MAC de:ad:be:ef:00:00
RNDIS ready
The remote end did not respond in time.Config file not found
using musb-hdrc, OUT ep1out IN ep1in STATUS ep2in
MAC de:ad:be:ef:00:01
HOST MAC de:ad:be:ef:00:00
RNDIS ready
The remote end did not respond in time.using musb-hdrc, OUT ep1out IN ep1in STATUS ep2in
MAC de:ad:be:ef:00:01
HOST MAC de:ad:be:ef:00:00
RNDIS ready
The remote end did not respond in time.
=>
=>
=>
即使这样,还不能引导Linux
谢谢晕哥以及楼上几位,我终于搞明白了。原来emmc有芯片级的boot,RPMB,GPP,UDA等分区,是正常情况下不可见的(或者选择其中一个)。我们平常访问和创建文件系统的是UDA分区。我板子上默认使能的是boot0分区启动,所以我无论怎么烧写uboot,其实都是烧到UDA分区,下次上电还是从boot0分区启动老的uboot。
参考:
https://www.cnblogs.com/helloworldtoyou/p/6053460.html?utm_source=itdadao&utm_medium=referral
https://www.cnblogs.com/arnoldlu/p/10762009.html解决方法:
打开uboot的CONFIG_SUPPORT_EMMC_BOOT
在uboot设置从UDA(7)启动
mmc partconf 1 0 7 0现在终于可以正常从emmc启动uboot了
我的u-boot v2017.11 没有这个配置,看来要更新代码了: CONFIG_SUPPORT_EMMC_BOOT
我的 X3(A33)板子遇到同样尴尬的问题。
从TF卡启动,u-boot和Linux都可以识别和读写eMMC, 就是无法从eMMC启动.
先 mark 慢慢看
https://whycan.cn/t_4735.html#p47906
根据楼主的帖子提示, 然后我在Linux下面如下操作,貌似u-boot有显示了,虽然启动还有点问题。
mmc bootpart enable 7 0 /dev/mmcblk2
dd if=/dev/mmcblk0 of=/dev/mmcblk2 bs=1M count=200
环境变量, 本站有帖, 你找一下。
翻遍网络,终于找到写boot0和boot1的方法了:
这样就可以为所欲为写boot0:
echo 0 > /sys/block/mmcblk2boot0/force_ro
dd if=/dev/zero of=/dev/mmcblk2boot0 bs=1M count=4
这样就可以为所欲为写boot1:
echo 0 > /sys/block/mmcblk2boot1/force_ro
dd if=/dev/zero of=/dev/mmcblk2boot1 bs=1M count=48
我这块eMMC boot0 最大就4M, boot1 最大48M, 根据命令行反馈推测的:
# dd if=/dev/zero of=/dev/mmcblk2boot0 bs=1M count=5
dd: error writing '/dev/mmcblk2boot0': No space left on device
5+0 records in
4+0 records out
# dd if=/dev/zero of=/dev/mmcblk2boot2 bs=1M count=50
dd: error writing '/dev/mmcblk2boot2': No space left on device
50+0 records in
49+0 records out
http://trac.gateworks.com/wiki/MMC
https://www.cnblogs.com/Cqlismy/p/12214305.html
# set boot partition to boot0
mmc bootpart enable 1 0 /dev/mmcblk2
# set boot partition to boot1
mmc bootpart enable 2 0 /dev/mmcblk2
# set boot partition to user
mmc bootpart enable 7 0 /dev/mmcblk2
上面三个执行任意一个, 然后再烧录eMMC:
dd if=/dev/mmcblk0 of=/dev/mmcblk2 bs=1M count=200
均不能启动, 这个eMMC有点难度啊。
找到一个A64的帖子参考, 先围观一下: https://whycan.cn/t_4437.html
感谢提醒, buildroot找到工具了:
# BR2_PACKAGE_MMC_UTILS is not set
https://www.embeddedartists.com/wp-content/uploads/2020/04/Working_with_eMMC.pdf
https://manpages.debian.org/testing/mmc-utils/mmc.1.en.html
还是迷路了, 不知道用哪个子命令。
http://trac.gateworks.com/wiki/MMC
卡特定数据(CSD)寄存器(EXT_CSD [179])用于配置加电时选择的分区。可以在Linux中通过mmc-utils应用程序进行配置,也可以在U-Boot中通过mmc partconf命令进行配置(请参见下文)。
感谢提醒, buildroot找到工具了:
# BR2_PACKAGE_MMC_UTILS is not set
https://www.cnblogs.com/helloworldtoyou/p/6053460.html
在同事的帮助下才知道emmc有boot1,boot2以及RPMB(Replay Protected Memory Block),GPAP(General Purpose Area Partitions,最多可以有4个),UDA(User Data Area)分区。而我们一般只知道UDA分区。
我们通常对emmc进行分区,也只是对UDA分区。boot1,boot2,RPMB分区是固定的,我们并不能控制器大小和分区格式。如下图所示(图片摘自网络):
....
这坑有点深了, 要研究一下了。
请教大家,A33 接了 eMMC, Linux识别到 boot0, boot1 是什么操作?eMMC特有的分区?
[ 1.585115] mmc2: new DDR MMC card at address 0001
[ 1.591821] mmcblk2: mmc2:0001 8GTF4R 7.28 GiB
[ 1.597900] mmcblk2boot0: mmc2:0001 8GTF4R partition 1 4.00 MiB
[ 1.605394] mmcblk2boot1: mmc2:0001 8GTF4R partition 2 4.00 MiB
[ 1.613083] mmcblk2: p1 p2
通过TF卡烧录 eMMC, 然而重新上电并没有反应:
dd if=/dev/mmcblk0 of=/dev/mmcblk2 bs=1M count=300
建议用: arm-2014.05-29-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2
这个绝对可以的, 经过实战检验的:
ubuntu18.04 x64需要安装32bit的依赖包:
sudo apt-get install lib32ncurses5 lib32z1 -y
很多你以为是知识,其实只是知道,与刷抖音、头条差不多,不要因此而感动自己。
不要夸大自己的付出,而贬底别人的付出,这总觉得不公平。
也不要夸大自己的收获,,这易觉得满足。既然选择了技术这条路线,“学而实习之,不亦乐乎。有朋自远方来不亦乐乎。人不知而不愠,不亦君子乎”更适合。
学到的东西能在现实中实用(习)到,很开心呀,到群里与搞技术的朋友沟通,也更开心了。如果你是天才,你的知识比我们这些凡人都强,也不要生气,给我们讲解,就是君子了。相对其它行业,我们理工科更客观些,对就是对、错就是错,别人能做到的,你只要努力也能做到(只要有硬件环境)。
大佬这么会说话,出书吧!
貌似有生成event设备哦:
[ 1.787947] usb 2-1: new full-speed USB device number 2 using ohci-platform
[ 1.986709] random: crng init done
[ 2.062430] input: Manufacturer Barcode Reader as /devices/platform/soc/1c1a400.usb/usb2/2-1/2-1:1.0/0003:E851:1000.0001/input/input2
[ 2.129338] hid-generic 0003:E851:1000.0001: input: USB HID v1.01 Keyboard [Manufacturer Barcode Reader] on usb-1c1a400.usb-1/input0
[ 4.091240] jffs2: notice: (75) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found.
一组16位定时器2带有3路输入捕获功能,9个输入管脚可供选择
定时器2及输入捕获
定时器2是一个16位的向上计数器,由高8位寄存器(TH2)和低8位寄存器(TL2)组成。通过配置寄存器RCMP2H和
RCMP2L,设置 ̅̅ ̅̅̅(T2CON.0)后,定时器2能工作在比较模式和自动重载模式下。定时器2具有3通道输入
捕获模块,可用于测量输入脉冲宽度或周期。3通道捕获结果分别存放在寄存器C0H 及 C0L, C1H 及 C1L, C2H
及 C2L中。定时器2的时钟来自系统时钟的分频,总共具有8级分频,可适用于更多应用需求。当TR2
(T2CON.2) 置 1,定时器使能;TR2置0时,定时器关闭。下列寄存器用于控制定时器2功能。刚刚翻了一下 N76E003 手册, 定时器2可以使用捕获外设。
谢大佬, 找到例程了:
https://github.com/OpenNuvoton/N76E003-BSP/tree/master/Sample_Code/Timer2_AutoReload_Capture
就是定时器2的捕获例程:
/*---------------------------------------------------------------------------------------------------------*/
/* */
/* Copyright(c) 2017 Nuvoton Technology Corp. All rights reserved. */
/* */
/*---------------------------------------------------------------------------------------------------------*/
//***********************************************************************************************************
// Nuvoton Technoledge Corp.
// Website: http://www.nuvoton.com
// E-Mail : MicroC-8bit@nuvoton.com
// Date : Apr/21/2017
//***********************************************************************************************************
//***********************************************************************************************************
// File Function: N76E003 Timer2 Capture Mode demo code
//***********************************************************************************************************
#include "N76E003.h"
#include "Common.h"
#include "Delay.h"
#include "SFR_Macro.h"
#include "Function_define.h"
//***************** The Following is in define in Fucntion_define.h ***************************
//****** Always include Function_define.h call the define you want, detail see main(void) *******
//***********************************************************************************************
#if 0
////-------------------- Timer2 Capture define --------------------
////--- Falling Edge -----
//#define IC0_P12_CAP0_FallingEdge_Capture CAPCON1&=0xFC;CAPCON3&=0xF0;CAPCON0|=SET_BIT4;CAPCON2|=SET_BIT4
//#define IC1_P11_CAP0_FallingEdge_Capture CAPCON1&=0xFC;CAPCON3&=0xF0;CAPCON3|=0x01;CAPCON0|=SET_BIT4;CAPCON2|=SET_BIT4
//#define IC2_P10_CAP0_FallingEdge_Capture CAPCON1&=0xFC;CAPCON3&=0xF0;CAPCON3|=0x02;CAPCON0|=SET_BIT4;CAPCON2|=SET_BIT4
//#define IC3_P00_CAP0_FallingEdge_Capture CAPCON1&=0xFC;CAPCON3&=0xF0;CAPCON3|=0x03;CAPCON0|=SET_BIT4;CAPCON2|=SET_BIT4
//#define IC3_P04_CAP0_FallingEdge_Capture CAPCON1&=0xFC;CAPCON3&=0xF0;CAPCON3|=0x04;CAPCON0|=SET_BIT4;CAPCON2|=SET_BIT4
//#define IC4_P01_CAP0_FallingEdge_Capture CAPCON1&=0xFC;CAPCON3&=0xF0;CAPCON3|=0x05;CAPCON0|=SET_BIT4;CAPCON2|=SET_BIT4
//#define IC5_P03_CAP0_FallingEdge_Capture CAPCON1&=0xFC;CAPCON3&=0xF0;CAPCON3|=0x06;CAPCON0|=SET_BIT4;CAPCON2|=SET_BIT4
//#define IC6_P05_CAP0_FallingEdge_Capture CAPCON1&=0xFC;CAPCON3&=0xF0;CAPCON3|=0x07;CAPCON0|=SET_BIT4;CAPCON2|=SET_BIT4
//#define IC7_P15_CAP0_FallingEdge_Capture CAPCON1&=0xFC;CAPCON3&=0xF0;CAPCON3|=0x08;CAPCON0|=SET_BIT4;CAPCON2|=SET_BIT4
//#define IC0_P12_CAP1_FallingEdge_Capture CAPCON1&=0xF3;CAPCON3&=0x0F;CAPCON0|=SET_BIT5;CAPCON2|=SET_BIT5
//#define IC1_P11_CAP1_FallingEdge_Capture CAPCON1&=0xF3;CAPCON3&=0x0F;CAPCON3|=0x10;CAPCON0|=SET_BIT5;CAPCON0|=SET_BIT5
//#define IC2_P10_CAP1_FallingEdge_Capture CAPCON1&=0xF3;CAPCON3&=0x0F;CAPCON3|=0x20;CAPCON0|=SET_BIT5;CAPCON2|=SET_BIT5
//#define IC3_P00_CAP1_FallingEdge_Capture CAPCON1&=0xF3;CAPCON3&=0x0F;CAPCON3|=0x30;CAPCON0|=SET_BIT5;CAPCON2|=SET_BIT5
//#define IC3_P04_CAP1_FallingEdge_Capture CAPCON1&=0xF3;CAPCON3&=0x0F;CAPCON3|=0x40;CAPCON0|=SET_BIT5;CAPCON2|=SET_BIT5
//#define IC4_P01_CAP1_FallingEdge_Capture CAPCON1&=0xF3;CAPCON3&=0x0F;CAPCON3|=0x50;CAPCON0|=SET_BIT5;CAPCON2|=SET_BIT5
//#define IC5_P03_CAP1_FallingEdge_Capture CAPCON1&=0xF3;CAPCON3&=0x0F;CAPCON3|=0x60;CAPCON0|=SET_BIT5;CAPCON2|=SET_BIT5
//#define IC6_P05_CAP1_FallingEdge_Capture CAPCON1&=0xF3;CAPCON3&=0x0F;CAPCON3|=0x70;CAPCON0|=SET_BIT5;CAPCON2|=SET_BIT5
//#define IC7_P15_CAP1_FallingEdge_Capture CAPCON1&=0xF3;CAPCON3&=0x0F;CAPCON3|=0x80;CAPCON0|=SET_BIT5;CAPCON2|=SET_BIT5
//#define IC0_P12_CAP2_FallingEdge_Capture CAPCON1&=0x0F;CAPCON4&=0xF0;CAPCON0|=SET_BIT6;CAPCON2|=SET_BIT6
//#define IC1_P11_CAP2_FallingEdge_Capture CAPCON1&=0x0F;CAPCON4&=0xF0;CAPCON4|=0x10;CAPCON0|=SET_BIT6;CAPCON2|=SET_BIT6
//#define IC2_P10_CAP2_FallingEdge_Capture CAPCON1&=0x0F;CAPCON4&=0xF0;CAPCON4|=0x20;CAPCON0|=SET_BIT6;CAPCON2|=SET_BIT6
//#define IC3_P00_CAP2_FallingEdge_Capture CAPCON1&=0x0F;CAPCON4&=0xF0;CAPCON4|=0x30;CAPCON0|=SET_BIT6;CAPCON2|=SET_BIT6
//#define IC3_P04_CAP2_FallingEdge_Capture CAPCON1&=0x0F;CAPCON4&=0xF0;CAPCON4|=0x40;CAPCON0|=SET_BIT6;CAPCON2|=SET_BIT6
//#define IC4_P01_CAP2_FallingEdge_Capture CAPCON1&=0x0F;CAPCON4&=0xF0;CAPCON4|=0x50;CAPCON0|=SET_BIT6;CAPCON2|=SET_BIT6
//#define IC5_P03_CAP2_FallingEdge_Capture CAPCON1&=0x0F;CAPCON4&=0xF0;CAPCON4|=0x60;CAPCON0|=SET_BIT6;CAPCON2|=SET_BIT6
//#define IC6_P05_CAP2_FallingEdge_Capture CAPCON1&=0x0F;CAPCON4&=0xF0;CAPCON4|=0x70;CAPCON0|=SET_BIT6;CAPCON2|=SET_BIT6
//#define IC7_P15_CAP2_FallingEdge_Capture CAPCON1&=0x0F;CAPCON4&=0xF0;CAPCON4|=0x80;CAPCON0|=SET_BIT6;CAPCON2|=SET_BIT6
////----- Rising edge ----
//#define IC0_P12_CAP0_RisingEdge_Capture CAPCON1&=0xFC;CAPCON1|=0x01;CAPCON3&=0xF0CAPCON0|=SET_BIT4;CAPCON2|=SET_BIT4;
//#define IC1_P11_CAP0_RisingEdge_Capture CAPCON1&=0xFC;CAPCON1|=0x01;CAPCON3&=0xF0;CAPCON3|=0x01;CAPCON0|=SET_BIT4;CAPCON2|=SET_BIT4;
//#define IC2_P10_CAP0_RisingEdge_Capture CAPCON1&=0xFC;CAPCON1|=0x01;CAPCON3&=0xF0;CAPCON3|=0x02;CAPCON0|=SET_BIT4;CAPCON2|=SET_BIT4;
//#define IC3_P00_CAP0_RisingEdge_Capture CAPCON1&=0xFC;CAPCON1|=0x01;CAPCON3&=0xF0;CAPCON3|=0x03;CAPCON0|=SET_BIT4;CAPCON2|=SET_BIT4;
//#define IC3_P04_CAP0_RisingEdge_Capture CAPCON1&=0xFC;CAPCON1|=0x01;CAPCON3&=0xF0;CAPCON3|=0x04;CAPCON0|=SET_BIT4;CAPCON2|=SET_BIT4;
//#define IC4_P01_CAP0_RisingEdge_Capture CAPCON1&=0xFC;CAPCON1|=0x01;CAPCON3&=0xF0;CAPCON3|=0x05;CAPCON0|=SET_BIT4;CAPCON2|=SET_BIT4;
//#define IC5_P03_CAP0_RisingEdge_Capture CAPCON1&=0xFC;CAPCON1|=0x01;CAPCON3&=0xF0;CAPCON3|=0x06;CAPCON0|=SET_BIT4;CAPCON2|=SET_BIT4;
//#define IC6_P05_CAP0_RisingEdge_Capture CAPCON1&=0xFC;CAPCON1|=0x01;CAPCON3&=0xF0;CAPCON3|=0x07;CAPCON0|=SET_BIT4;CAPCON2|=SET_BIT4;
//#define IC7_P15_CAP0_RisingEdge_Capture CAPCON1&=0xFC;CAPCON1|=0x01;CAPCON3&=0xF0;CAPCON3|=0x08;CAPCON0|=SET_BIT4;CAPCON2|=SET_BIT4;
//#define IC0_P12_CAP1_RisingEdge_Capture CAPCON1&=0xF3;CAPCON1|=0x04;CAPCON3&=0x0FCAPCON0|=SET_BIT5;CAPCON2|=SET_BIT5;
//#define IC1_P11_CAP1_RisingEdge_Capture CAPCON1&=0xF3;CAPCON1|=0x04;CAPCON3&=0x0F;CAPCON3|=0x10;CAPCON0|=SET_BIT5;CAPCON2|=SET_BIT5;
//#define IC2_P10_CAP1_RisingEdge_Capture CAPCON1&=0xF3;CAPCON1|=0x04;CAPCON3&=0x0F;CAPCON3|=0x20;CAPCON0|=SET_BIT5;CAPCON2|=SET_BIT5;
//#define IC3_P00_CAP1_RisingEdge_Capture CAPCON1&=0xF3;CAPCON1|=0x04;CAPCON3&=0x0F;CAPCON3|=0x30;CAPCON0|=SET_BIT5;CAPCON2|=SET_BIT5;
//#define IC3_P04_CAP1_RisingEdge_Capture CAPCON1&=0xF3;CAPCON1|=0x04;CAPCON3&=0x0F;CAPCON3|=0x40;CAPCON0|=SET_BIT5;CAPCON2|=SET_BIT5;
//#define IC4_P01_CAP1_RisingEdge_Capture CAPCON1&=0xF3;CAPCON1|=0x04;CAPCON3&=0x0F;CAPCON3|=0x50;CAPCON0|=SET_BIT5;CAPCON2|=SET_BIT5;
//#define IC5_P03_CAP1_RisingEdge_Capture CAPCON1&=0xF3;CAPCON1|=0x04;CAPCON3&=0x0F;CAPCON3|=0x60;CAPCON0|=SET_BIT5;CAPCON2|=SET_BIT5;
//#define IC6_P05_CAP1_RisingEdge_Capture CAPCON1&=0xF3;CAPCON1|=0x04;CAPCON3&=0x0F;CAPCON3|=0x70;CAPCON0|=SET_BIT5;CAPCON2|=SET_BIT5;
//#define IC7_P15_CAP1_RisingEdge_Capture CAPCON1&=0xF3;CAPCON1|=0x04;CAPCON3&=0x0F;CAPCON3|=0x80;CAPCON0|=SET_BIT5;CAPCON2|=SET_BIT5;
//#define IC0_P12_CAP3_RisingEdge_Capture CAPCON1&=0x0F;CAPCON1|=0x10;CAPCON4&=0xF0;CAPCON0|=SET_BIT6;CAPCON2|=SET_BIT6;
//#define IC1_P11_CAP3_RisingEdge_Capture CAPCON1&=0x0F;CAPCON1|=0x10;CAPCON4&=0xF0;CAPCON4|=0x01;CAPCON0|=SET_BIT6;CAPCON2|=SET_BIT6;
//#define IC2_P10_CAP3_RisingEdge_Capture CAPCON1&=0x0F;CAPCON1|=0x10;CAPCON4&=0xF0;CAPCON4|=0x02;CAPCON0|=SET_BIT6;CAPCON2|=SET_BIT6;
//#define IC3_P00_CAP3_RisingEdge_Capture CAPCON1&=0x0F;CAPCON1|=0x10;CAPCON4&=0xF0;CAPCON4|=0x03;CAPCON0|=SET_BIT6;CAPCON2|=SET_BIT6;
//#define IC3_P04_CAP3_RisingEdge_Capture CAPCON1&=0x0F;CAPCON1|=0x10;CAPCON4&=0xF0;CAPCON4|=0x04;CAPCON0|=SET_BIT6;CAPCON2|=SET_BIT6;
//#define IC4_P01_CAP3_RisingEdge_Capture CAPCON1&=0x0F;CAPCON1|=0x10;CAPCON4&=0xF0;CAPCON4|=0x05;CAPCON0|=SET_BIT6;CAPCON2|=SET_BIT6;
//#define IC5_P03_CAP3_RisingEdge_Capture CAPCON1&=0x0F;CAPCON1|=0x10;CAPCON4&=0xF0;CAPCON4|=0x06;CAPCON0|=SET_BIT6;CAPCON2|=SET_BIT6;
//#define IC6_P05_CAP3_RisingEdge_Capture CAPCON1&=0x0F;CAPCON1|=0x10;CAPCON4&=0xF0;CAPCON4|=0x07;CAPCON0|=SET_BIT6;CAPCON2|=SET_BIT6;
//#define IC7_P15_CAP3_RisingEdge_Capture CAPCON1&=0x0F;CAPCON1|=0x10;CAPCON4&=0xF0;CAPCON4|=0x08;CAPCON0|=SET_BIT6;CAPCON2|=SET_BIT6;
////-----BOTH edge ----
//#define IC0_P12_CAP0_BothEdge_Capture CAPCON1&=0xFC;CAPCON1|=0x02;CAPCON3&=0xF0;CAPCON0|=SET_BIT4;CAPCON2|=SET_BIT4
//#define IC1_P11_CAP0_BothEdge_Capture CAPCON1&=0xFC;CAPCON1|=0x02;CAPCON3&=0xF0;CAPCON3|=0x01;CAPCON0|=SET_BIT4;CAPCON2|=SET_BIT4
//#define IC2_P10_CAP0_BothEdge_Capture CAPCON1&=0xFC;CAPCON1|=0x02;CAPCON3&=0xF0;CAPCON3|=0x02;CAPCON0|=SET_BIT4;CAPCON2|=SET_BIT4
//#define IC3_P00_CAP0_BothEdge_Capture CAPCON1&=0xFC;CAPCON1|=0x02;CAPCON3&=0xF0;CAPCON3|=0x03;CAPCON0|=SET_BIT4;CAPCON2|=SET_BIT4
//#define IC3_P04_CAP0_BothEdge_Capture CAPCON1&=0xFC;CAPCON1|=0x02;CAPCON3&=0xF0;CAPCON3|=0x04;CAPCON0|=SET_BIT4;CAPCON2|=SET_BIT4
//#define IC4_P01_CAP0_BothEdge_Capture CAPCON1&=0xFC;CAPCON1|=0x02;CAPCON3&=0xF0;CAPCON3|=0x05;CAPCON0|=SET_BIT4;CAPCON2|=SET_BIT4
//#define IC5_P03_CAP0_BothEdge_Capture CAPCON1&=0xFC;CAPCON1|=0x02;CAPCON3&=0xF0;CAPCON3|=0x06;CAPCON0|=SET_BIT4;CAPCON2|=SET_BIT4
//#define IC6_P05_CAP0_BothEdge_Capture CAPCON1&=0xFC;CAPCON1|=0x02;CAPCON3&=0xF0;CAPCON3|=0x07;CAPCON0|=SET_BIT4;CAPCON2|=SET_BIT4
//#define IC7_P15_CAP0_BothEdge_Capture CAPCON1&=0xFC;CAPCON1|=0x02;CAPCON3&=0xF0;CAPCON3|=0x08;CAPCON0|=SET_BIT4;CAPCON2|=SET_BIT4
//#define IC0_P12_CAP1_BothEdge_Capture CAPCON1&=0xF3;CAPCON1|=0x08;CAPCON3&=0x0F;CAPCON0|=SET_BIT5;CAPCON2|=SET_BIT5
//#define IC1_P11_CAP1_BothEdge_Capture CAPCON1&=0xF3;CAPCON1|=0x08;CAPCON3&=0x0F;CAPCON3|=0x10;CAPCON0|=SET_BIT5;CAPCON2|=SET_BIT5;
//#define IC2_P10_CAP1_BothEdge_Capture CAPCON1&=0xF3;CAPCON1|=0x08;CAPCON3&=0x0F;CAPCON3|=0x20;CAPCON0|=SET_BIT5;CAPCON2|=SET_BIT5;
//#define IC3_P00_CAP1_BothEdge_Capture CAPCON1&=0xF3;CAPCON1|=0x08;CAPCON3&=0x0F;CAPCON3|=0x30;CAPCON0|=SET_BIT5;CAPCON2|=SET_BIT5;
//#define IC3_P04_CAP1_BothEdge_Capture CAPCON1&=0xF3;CAPCON1|=0x08;CAPCON3&=0x0F;CAPCON3|=0x40;CAPCON0|=SET_BIT5;CAPCON2|=SET_BIT5;
//#define IC4_P01_CAP1_BothEdge_Capture CAPCON1&=0xF3;CAPCON1|=0x08;CAPCON3&=0x0F;CAPCON3|=0x50;CAPCON0|=SET_BIT5;CAPCON2|=SET_BIT5;
//#define IC5_P03_CAP1_BothEdge_Capture CAPCON1&=0xF3;CAPCON1|=0x08;CAPCON3&=0x0F;CAPCON3|=0x60;CAPCON0|=SET_BIT5;CAPCON2|=SET_BIT5;
//#define IC6_P05_CAP1_BothEdge_Capture CAPCON1&=0xF3;CAPCON1|=0x08;CAPCON3&=0x0F;CAPCON3|=0x70;CAPCON0|=SET_BIT5;CAPCON2|=SET_BIT5;
//#define IC7_P15_CAP1_BothEdge_Capture CAPCON1&=0xF3;CAPCON1|=0x08;CAPCON3&=0x0F;CAPCON3|=0x80;CAPCON0|=SET_BIT5;CAPCON2|=SET_BIT5;
//#define IC0_P12_CAP3_BothEdge_Capture CAPCON1&=0x0F;CAPCON1|=0x20;CAPCON4&=0xF0;CAPCON0|=SET_BIT6;CAPCON2|=SET_BIT6;
//#define IC1_P11_CAP3_BothEdge_Capture CAPCON1&=0x0F;CAPCON1|=0x20;CAPCON4&=0xF0;CAPCON4|=0x01;CAPCON0|=SET_BIT6;CAPCON2|=SET_BIT6;
//#define IC2_P10_CAP3_BothEdge_Capture CAPCON1&=0x0F;CAPCON1|=0x20;CAPCON4&=0xF0;CAPCON4|=0x02;CAPCON0|=SET_BIT6;CAPCON2|=SET_BIT6;
//#define IC3_P00_CAP3_BothEdge_Capture CAPCON1&=0x0F;CAPCON1|=0x20;CAPCON4&=0xF0;CAPCON4|=0x03;CAPCON0|=SET_BIT6;CAPCON2|=SET_BIT6;
//#define IC3_P04_CAP3_BothEdge_Capture CAPCON1&=0x0F;CAPCON1|=0x20;CAPCON4&=0xF0;CAPCON4|=0x04;CAPCON0|=SET_BIT6;CAPCON2|=SET_BIT6;
//#define IC4_P01_CAP3_BothEdge_Capture CAPCON1&=0x0F;CAPCON1|=0x20;CAPCON4&=0xF0;CAPCON4|=0x05;CAPCON0|=SET_BIT6;CAPCON2|=SET_BIT6;
//#define IC5_P03_CAP3_BothEdge_Capture CAPCON1&=0x0F;CAPCON1|=0x20;CAPCON4&=0xF0;CAPCON4|=0x06;CAPCON0|=SET_BIT6;CAPCON2|=SET_BIT6;
//#define IC6_P05_CAP3_BothEdge_Capture CAPCON1&=0x0F;CAPCON1|=0x20;CAPCON4&=0xF0;CAPCON4|=0x07;CAPCON0|=SET_BIT6;CAPCON2|=SET_BIT6;
//#define IC7_P15_CAP3_BothEdge_Capture CAPCON1&=0x0F;CAPCON1|=0x20;CAPCON4&=0xF0;CAPCON4|=0x08;CAPCON0|=SET_BIT6;CAPCON2|=SET_BIT6;
//#define TIMER2_IC2_DISABLE CAPCON0&=~SET_BIT6
//#define TIMER2_IC1_DISABLE CAPCON0&=~SET_BIT5
//#define TIMER2_IC0_DISABLE CAPCON0&=~SET_BIT4
///*----------------------------------------------------------------------------------------------------------
//* Timer2 mode define
//------------------------------------------------------------------------------------------------------------*/
//#define TIMER2_CAP0_Capture_Mode T2CON&=~SET_BIT0;T2MOD=0x89
//#define TIMER2_CAP1_Capture_Mode T2CON&=~SET_BIT0;T2MOD=0x8A
//#define TIMER2_CAP2_Capture_Mode T2CON&=~SET_BIT0;T2MOD=0x8B
///*----------------------------------------------------------------------------------------------------------
//* Timer devider define
//----------------------------------------------------------------------------------------------------------*/
//#define TIMER2_DIV_4 T2MOD|=0x10;T2MOD&=0x9F
//#define TIMER2_DIV_16 T2MOD|=0x20;T2MOD&=0xAF
//#define TIMER2_DIV_32 T2MOD|=0x30;T2MOD&=0xBF
//#define TIMER2_DIV_64 T2MOD|=0x40;T2MOD&=0xCF
//#define TIMER2_DIV_128 T2MOD|=0x50;T2MOD&=0xDF
//#define TIMER2_DIV_256 T2MOD|=0x60;T2MOD&=0xEF
//#define TIMER2_DIV_512 T2MOD|=0x70
#endif
/************************************************************************************************************
* Timer2 Capture interrupt subroutine
************************************************************************************************************/
void Capture_ISR (void) interrupt 12
{
clr_CAPF0; // clear capture0 interrupt flag
P1 = C0L; // For capture mode CxL/CxH with data capture from I/O pin
P2 = C0H;
P12 = ~P12; //toggle GPIO1 to show int
printf("\n TM2 CAP 0x%bX",C0H);
clr_TF2;
}
/************************************************************************************************************
* Main function
************************************************************************************************************/
void main (void)
{
Set_All_GPIO_Quasi_Mode;
InitialUART0_Timer3(115200);
P00_Input_Mode;
P00 = 1;
TIMER2_CAP0_Capture_Mode;
IC3_P00_CAP0_BothEdge_Capture;
set_ECAP; //Enable Capture interrupt
set_TR2; //Triger Timer2
set_EA;
while(1);
}
不知道是电源问题还是当时没接天线问题, 现在已经可以正常上网了。
客服说这里可以查流量: http://sim.openluat.com/
但是我发现跑了一个晚上, 流量使用还是 0, 难道流量统计延迟这么大?
还发现居然有api可以调用查卡的信息: http://sim.openluat.com/apiinterface
问题重现了, 就是没插天线的问题, 插上天线就好了, 看来4G对信号要求很高.
不知道是电源问题还是当时没接天线问题, 现在已经可以正常上网了。
客服说这里可以查流量: http://sim.openluat.com/
但是我发现跑了一个晚上, 流量使用还是 0, 难道流量统计延迟这么大?
还发现居然有api可以调用查卡的信息: http://sim.openluat.com/apiinterface
实现代码不方便放出来了,不过思路还是很简单的。先在串口发送中断进入时修改到2分之一fifo,将发送置位,在最后中断触发先修改fifo到empty触发,再去判断lsr的最后位有没有发送,接着置位为接收。和ti的实现不同全志串口呵呵呵...
我的RS485 驱动控制GPIO半双工控制问题也解决了, 在此抛砖引玉: https://whycan.cn/t_4012.html#p39120
再找到一篇好文: Linux-485收发切换延迟的解决方法
3.1 由应用程序控制是否打开串口设备的485功能
在串口驱动里切换485方向对性能有一些影响。
而某些应用可能只需要标准串口,不需要支持485模式。
因此最好由应用程序来控制,是使用标准串口还是支持485模式的串口。
这主要利用ioctl()实现。
应用程序在初始化打开串口时,禁用/使能串口的485模式
fd = open(...);
init_serial(fd, ...);
struct serial_rs485 rs485conf;
rs485conf.flags |= SER_RS485_ENABLED; // 使能本串口485模式,默认禁用
ioctl(fd, TIOCSRS485, &rs485conf);
驱动程序中对使能了485模式的串口作特殊处理。
利用struct uart_8250_port结构体中的struct serial_rs485 rs485成员判断串口是否支持485模式。
在serial_8250.h中有定义rs485数据成员,以及设置此数据成员的成员函数rs485_config
我觉得国产芯片的主要问题是生态不够,初学者没有持别好找的和质量高的资源!上手较难。当然,有量的不在这个讨论中。有量的客户,厂家会提供好的技术支持。我们这种DIY的,基本上没办法。前段时间,买了个LICHEE ZERO,就想配个5寸的屏,搞个HMI,与下位机,通过RS232通讯,用QT写界面。一点有用的资源都找不到! 当然,自己也有问题,本身也比较菜。
代理机制问题,可以说也是全志的问题,
假如某个代理花巨资搞开发板培育市场,
其他代理就租个小房子卖芯片,
你想想谁的成本更低,
开发时哪家技术好找哪家 ,
量产时哪家便宜找哪家,
这种情况下劣币驱良币,
优秀的代理商活不下去,都变成了佛系代理了。
谢谢作者分享。
我试了一下, 模拟器有点bug, 退出窗口(进程)的时候没有先通知 线程退出,
导致出现错误提示:
QThread: Destroyed while thread is still running
Invalid parameter passed to C runtime function.
Invalid parameter passed to C runtime function.
然后我改了一点点:
MainWindow::~MainWindow()
{
gui_thread.exit(0);
Sleep(50);
delete ui;
}
然而还是一样的问题, 跟踪了一下
gui_thread.exit(0);
根本不能这样结束线程.
看来得想别的线程通讯方法才行。
路人甲 说:apollo800 说:我早就因为这个原因放弃了F1C100s,USB驱动没有,有点说不过去呀,我当初还傻傻地等那个群主说下周就发,等了。。。。,果断放弃了
主线Linux下USB驱动确实有点问题,
但是bsp linux USB驱动基本正常了:
https://whycan.cn/t_1626.htmlf1c100s 性价比很好,还是有可圈可点之处的。
rndis 驱动正常,但mass_storage驱动不行
这就尴尬了.
我早就因为这个原因放弃了F1C100s,USB驱动没有,有点说不过去呀,我当初还傻傻地等那个群主说下周就发,等了。。。。,果断放弃了
主线Linux下USB驱动确实有点问题,
但是bsp linux USB驱动基本正常了:
https://whycan.cn/t_1626.html
f1c100s 性价比很好,还是有可圈可点之处的。
路人甲 说:真的是很烦 说:就是搜A20才找到这个版块的, 刚接触全志的芯片, 看了不少帖子, 总算是前进了一步
直接用 buildroot 可以编译出官方烧录镜像 img文件?
是的. 最后生成的sdcard.img 就可以直接烧录进去
>>> Executing post-image script board/cubietech/cubieboard2/post-image.sh
vfat(boot.vfat): adding file 'zImage' as 'zImage' ...
vfat(boot.vfat): adding file 'sun7i-a20-cubieboard2.dtb' as 'sun7i-a20-cubieboard2.dtb' ...
vfat(boot.vfat): adding file 'boot.scr' as 'boot.scr' ...
hdimage(sdcard.img): adding partition 'u-boot' from 'u-boot-sunxi-with-spl.bin' ...
hdimage(sdcard.img): adding partition 'boot' (in MBR) from 'boot.vfat' ...
hdimage(sdcard.img): adding partition 'rootfs' (in MBR) from 'rootfs.ext4' ...
hdimage(sdcard.img): writing MBR
https://github.com/buildroot/buildroot/blob/master/board/cubietech/cubieboard2/
看了一下这不是全志官方烧录软件PhoenixSuit的套路,
不能用 PhoenixSuit 软件烧录 sdcard.img 文件吧,
是不是用 dd 命令直接写到TF卡?
晕哥 说:就是搜A20才找到这个版块的, 刚接触全志的芯片, 看了不少帖子, 总算是前进了一步
直接用 buildroot 可以编译出官方烧录镜像 img文件?
didi 说:apollo800 说:这个我也找了很久,真需要这种呀,现在还有一种是emmc的,走的也是SD卡的协议,
http://www.360doc.com/content/16/1112/11/38024613_605833100.shtmleMMC本来就兼容SDIO协议吧,
市场上的 eMMC都是BGA封装,容量动不动就2G/4G起,价格也是20多人民币起,
如果有 10块钱以内的 SD NAND还是挺不错的,
比起SPI NAND来, SD NAND软件复杂度大大降低.http://www.360doc.com/content/16/1112/11/38024613_605833100.shtml
可以用SPI模式读eMMC吗?那样又可以少了几根线。
是的,从前AVR都是这么干的,AVR没有SDIO,再以前8051也是这么干,因为他连SPI都要软件模拟时序。
对,按照上面的步骤一步一步,可以把 Ethernet 搞定。
达克罗德 说:framebuffer驱动我还是花了几个晚上功夫的,为了不用xboot的dts还有driver架构,把reset,clock等好几个模块都改了一遍。如果再来一遍V3S的话,应该容易很多,因为两芯片同出一源代码很类似。
不过不打算继续自己搞裸奔了,可重用性太低,累死人。准备直接用xboot或者RTOS这样的平台来开发后续产品,开发驱动有标准,代码容易复用,功能也更强大。比如说切换V3S和F1C100S对xboot来说非常简单,上层完全不用改
目前我把xboot优化到1.3MB大小(带文件系统和图形库),启动到logo只需要0.85s(F1C100S),基本满足需要。V3S没测,上电应该更快。如果V3S和F1C100S支持QSPI就完美了。。。
:lol:现在才看到,原来你已搞定,能分享下代码吗?我信息里面有我邮箱
我也想试试能不能启动之后能不能先初始化spi,提高下spi访问速度,之后spi拷贝速度会高点,没有qspi确实硬伤啊
没有quad spi,但是貌似有dual spi吧。
寄存器 SPI_INTCTL中,
SS_OWNER==1,由软件控制cs。其实在spi驱动中,设置了这个后,需要片选的时候,直接设置对应的GPIO就行了吧?
ss_sel,选择当前片选。明明有4个硬件片选的,究竟是哪几个引脚?pin_mux怎样设置?
ss_level,设置cs的高低
https://blog.csdn.net/manfeel/article/details/43635529
这个博客貌似讲得很透彻
晕哥 说:Qt for Application Development是根据商业和开源许可证双重许可的。商业Qt许可证授予您在不需要任何开源许可证义务的情况下以您自己的条件创建和分发软件的全部权利。凭借商业许可,您还可以访问官方Qt支持并与Qt公司建立密切的战略关系,以确保您的发展目标得以实现。
Qt for Application Development也可以在GPL和LGPLv3开源许可下使用。Qt工具和一些库仅在GPL下可用。有关详细信息,请参见对比图表 Qt开源许可非常适用于开源项目,如开源分发,学生/学术目的,业余爱好项目,没有外部分发的内部研究项目,或其他可以满足所有(L)GPL义务的项目。
商业授权价格不清楚,但是如果使用 LGPLv3 授权,可以不用公开项目源码.
LGPLv3不能使用Qt Charts和Qt Data Visualization,而且估计出货时还要为每台机器给钱的吧
按照LGPLv3协议,如果不使用 Qt Charts和Qt Data Visualization 应该不用钱吧.
./drivers/of/fdt.c
static int __init __fdt_scan_reserved_mem(unsigned long node, const char *uname,
int depth, void *data)
{
... ...status = of_get_flat_dt_prop(node, "status", NULL);
if (status && strcmp(status, "okay") != 0 && strcmp(status, "ok") != 0)
return 0;err = __reserved_mem_reserve_reg(node, uname);
if (err == -ENOENT && of_get_flat_dt_prop(node, "size", NULL))
fdt_reserved_mem_save_node(node, uname, 0, 0);/* scan next node */
return 0;
}
如果设备树的 status 值不等于 okay 后者 ok, 那么就直接退出了。
所以,如果要启动这个设备,在设备树必须 status = okay 或者 ok.
$ grep \"okay\" -r ./drivers/of --include *.c
./drivers/of/dynamic.c: status_state = !strcmp(prop->value, "okay") ||
./drivers/of/dynamic.c: old_status_state = !strcmp(old_prop->value, "okay") ||
./drivers/of/fdt.c: if (status && strcmp(status, "okay") != 0 && strcmp(status, "ok") != 0)
./drivers/of/base.c: * Returns true if the status property is absent or set to "okay" or "ok",
./drivers/of/base.c: if (!strcmp(status, "okay") || !strcmp(status, "ok"))
./drivers/of/base.c: * Returns true if the status property is absent or set to "okay" or "ok",
我搜一下设备树相关代码,貌似有新发现.