页次: 1
没有,只有mmc0
&mmc0 {
pinctrl-0 = <&mmc0_pins_a>;
pinctrl-names = "default";
broken-cd;
bus-width = <4>;
vmmc-supply = <®_vcc3v3>;
status = "okay";
};
我是按这贴配置的
把 buildroot-v3s-20171122.zip解压后 拷贝到 buidroot目录成 .config 文件
https://whycan.cn/t_561.html
https://github.com/torvalds/linux/blob/master/arch/arm/boot/dts/sun8i-v3s-licheepi-zero.dts
这个 CONFIG_LEDS_GPIO 驱动有没有勾选?
打开linux目录下的.CONFIG如下
这样是不是算勾选
#
# LED drivers
#
# CONFIG_LEDS_BCM6328 is not set
# CONFIG_LEDS_BCM6358 is not set
# CONFIG_LEDS_LM3530 is not set
# CONFIG_LEDS_LM3642 is not set
# CONFIG_LEDS_PCA9532 is not set
CONFIG_LEDS_GPIO=y
# CONFIG_LEDS_LP3944 is not set
# CONFIG_LEDS_LP3952 is not set
# CONFIG_LEDS_LP5521 is not set
看下是哪一级目录或者文件没有 /sys/class/leds/licheepi:red:usr/brightness
我进入/sys/class/leds/看了一下,下边是空的,
licheepi:red:usr/brightness这个我还看不懂
感觉是内核中是不是没有东西勾选
是不是U-boot 或buildroot中有项我没做到,我都是按默认项
Pause for a time equal to the total of the args given, where each arg can
have an optional suffix of (s)econds, (m)inutes, (h)ours, or (d)ays
./led.sh: line 27: can't create /sys/class/leds/licheepi:blue:usr/brightness: nonexistent directory
./led.sh: line 27: can't create /sys/class/leds/licheepi:red:usr/brightness: nonexisteconds, (m)inutes, (h)ours, or (d)ays
./led.sh: line 27: can't create /sys/class/leds/licheepi:green:usr/brightness: nonexistent directory
./led.sh: line 27: can't create /sys/class/leds/licheepi:blue:usr/brightness: nonexistent directory
^CBusyBox v1.27.2 (2020-04-10 22:45:52 CST) multi-call binary.
这个目录 /sys/ 里面有内容吗?
有的,下面几个目录中都有,LEDS没有
# ls
connect_wx.sh init.sh iperf_c.sh usart
hello ins_8192.sh root
# cd ..
# ls
bin lib lost+found opt run tmp
dev lib32 media proc sbin usr
etc linuxrc mnt root sys var
# cd sys
# ls
backlight graphics mem ptp spi_master
bdi hwmon misc pwm thermal
block i2c-adapter mmc_host regulator tty
bsg i2c-dev mtd rtc udc
dma ieee80211 net scsi_device vc
drm input phy scsi_disk vtconsole
extcon leds power_supply scsi_host watchdog
gpio mdio_bus pps sound
# cd leds
# ls
#
led.sh 脚本是啥?
这个目录 /sys/ 里面有内容吗?
官方代码,板子上的led灯的 我放在root目录下
源码如下
===============
#!/bin/sh
trap 'echo "INTERRUPTED!";rgb_off; exit' INT
trap 'echo "TERMED!";rgb_off; exit' TERM
rgb()
{
echo 1 > /sys/class/leds/licheepi:red:usr/brightness
sleep $1
echo 0 > /sys/class/leds/licheepi:red:usr/brightness
echo 1 > /sys/class/leds/licheepi:green:usr/brightness
sleep $1
echo 0 > /sys/class/leds/licheepi:green:usr/brightness
echo 1 > /sys/class/leds/licheepi:blue:usr/brightness
sleep $1
echo 0 > /sys/class/leds/licheepi:blue:usr/brightness
}
rgb_off()
{
echo 0 > /sys/class/leds/licheepi:red:usr/brightness
echo 0 > /sys/class/leds/licheepi:green:usr/brightness
echo 0 > /sys/class/leds/licheepi:blue:usr/brightness
}
while true;
do
rgb $1;
done
因为不新手,可能有些描述不一定正确
板子:Zero v3s
系统:linux +U-BOOT+buildroot ,全按荔枝派Zero教程做的系统
Linux version 4.13.0-licheepi-zero (gcc version 4.8.4 (Ubuntu/Linaro 4.8.4-2ubuntu1~14.04.1))
问题1: USB识别
usb识别为下图
请问这个是虚拟USB吗?要驱动吗?多次试装驱动不成功
问题2: nonexistent directory
运行led.sh,出象如下问题,怎么对能让它运行
# sh ./led.sh
./led.sh: line 27: can't create /sys/class/leds/licheepi:red:usr/brightness: nonexistent directory
BusyBox v1.27.2 (2020-04-10 22:45:52 CST) multi-call binary.
Usage: sleep [N]...
Pause for a time equal to the total of the args given, where each arg can
have an optional suffix of (s)econds, (m)inutes, (h)ours, or (d)ays
./led.sh: line 27: can't create /sys/class/leds/licheepi:red:usr/brightness: nonexistent directory
./led.sh: line 27: can't create /sys/class/leds/licheepi:green:usr/brightness: nonexistent directory
BusyBox v1.27.2 (2020-04-10 22:45:52 CST) multi-call binary.
测试了一下leds下没权限,chmod -R 777 leds 也不行
# cd /sys/class/leds/
# mkdir test
mkdir: can't create directory 'test': Operation not permitted
#
问题3:待定
问题4:待定
问题4:待定
按教程使能了串口1 和串口1
板子ZERO V3S LINUX
==========
用命令 打开正常
# stty -F /dev/ttyS1 speed 115200 cs8 -parenb -cstopb
115200
#
====
我自己写的串口打不开,请指导
用我写的程序打不开,
log
# ./usart ttys1 0
fd= -1
SetupSerial 1: Bad file descriptor
Set Port Exactly!
SetupSerial 1: Bad file descriptor
=================
应该是我用open打开失败
我程序代码如下
int main(int argc, char **argv)
{
int fd = -1; //文件描述符,先定义一个与程序无关的值,防止fd为任意值导致程序出bug
int err; //返回调用函数的状态
int len;
int i;
char rcv_buf[256];
char send_buf[256];
fd=open("/dev/ttys1",O_RDWR | O_NOCTTY | O_NDELAY);
printf("fd= %d\n",fd);
do
{
err = UART0_Init(fd,115200,0,8,1,'N');
printf("Set Port Exactly!\n");
sleep(1);
}while(FALSE == err || FALSE == fd);
结贴,问题解决了
解决方法:最原始最暴力方法,重新U-BOOT
问题:USART0已正常通讯 ,现要想增加USART1 和USART2
按教程
首先在dts里使能UART:
sun8i-v3s.dtsi:
uart0_pins_a: uart0@0 { pins = "PB8", "PB9";function = "uart0";bias-pull-up; };
uart1_pins_a: uart1@0 { pins = "PE21", "PE22";function = "uart1";bias-pull-up; };
uart2_pins_a: uart2@0 { pins = "PB0", "PB1";function = "uart2";bias-pull-up; };
sun8i-v3s-licheepi-zero.dts:
&uart0 { pinctrl-0 = <&uart0_pins_a>;pinctrl-names = "default";status = "okay"; };
&uart1 { pinctrl-0 = <&uart1_pins_a>;pinctrl-names = "default";status = "okay"; };
&uart2 { pinctrl-0 = <&uart2_pins_a>;pinctrl-names = "default";status = "okay"; };
在u-boot中开始编译
cd u-boot
ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make LicheePi_Zero_defconfig
ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make -j2
编译不通过,LOG如下
OBJCOPY u-boot-nodtb.bin
SHIPPED dts/dt.dtb
OBJCOPY u-boot.srec
SYM u-boot.sym
CAT u-boot-dtb.bin
COPY u-boot.dtb
COPY u-boot.bin
MKIMAGE u-boot.img
MKIMAGE u-boot-dtb.img
CC spl/common/spl/spl.o
LD spl/common/spl/built-in.o
CC spl/lib/display_options.o
LD spl/lib/built-in.o
LD spl/u-boot-spl
OBJCOPY spl/u-boot-spl-nodtb.bin
COPY spl/u-boot-spl.bin
MKSUNXI spl/sunxi-spl.bin
BINMAN u-boot-sunxi-with-spl.bin
binman: Device tree 'u-boot.dtb' does not have a 'binman' node
make: *** [u-boot-sunxi-with-spl.bin] 错误 1
root@wolf-ubuntu:/home/wolf/u-boot#
我还需要修改那个地方才能u-boot通过编译
ARCH=arm make menuconfig这步我没执行,是不是这个需配置,在那项中配置
谢谢
你的根文件系统有问题, 系统一个个试过都没有运行权限, 仔细看log
是zImage文件还是UBOOT文件出错
我是按贴子中生成rootfs文件的
我是直接解压工具提取文件到SD卡的
板子:Zero v3s
系统nux
按群里教程做的 rootfs.tar为么BIN下文件全空的
系统一直重启
我是按贴子中生成rootfs文件的
我是直接解压工具提取文件到SD卡的
https://whycan.cn/files/members/3/Vorentwurf_26_05_18.png
2020-04-07 28楼更新:
-------------------------------------------
官方git仓库本站下载: BlueberryPI_V3s_368d2eff57bfb12d3ee274370fe14749.7z转换后DXP版本下载: BlueberryPI_PCB_AD_DXP.7z (仅供参考)
AD 20打开出错,AD 15打开第4页是空的?
还是乱码
是不是我AD问题?
页次: 1