页次: 1
部分rules文件内容
# 解决 /sys/class/pwm/pwmchip0/export 和/ sys/class/pwm/pwmchip0/unexport 读写问题
SUBSYSTEM=="pwm", KERNEL=="pwmchip*", RUN+="/usr/bin/chmod 0666 /sys%p/export", RUN+="/usr/bin/chmod 0666 /sys%p/unexport"
但执行PWM通道导出后
echo 0 > /sys/class/pwm/pwmchip0/export
新增的/sys/class/pwm/pwmchip0/pwm0还是没有写权限
ls -l /sys/class/pwm/pwmchip0/pwm0/
total 0
-r--r--r-- 1 root root 4096 Jul 5 01:54 capture
-rw-r--r-- 1 root root 4096 Jul 5 01:54 duty_cycle
-rw-r--r-- 1 root root 4096 Jul 5 01:54 enable
-rw-r--r-- 1 root root 4096 Jul 5 01:54 period
-rw-r--r-- 1 root root 4096 Jul 5 01:54 polarity
drwxr-xr-x 2 root root 0 Jul 5 01:54 power
-rw-r--r-- 1 root root 4096 Jul 5 01:54 uevent
万能的坑友,有没有办法用udev规则解决这个问题
想基于芒果派MQ quad作为智能小车主控板,看手册自带6路PWM,引出的有4路,但使用时PWM并没有波形
请大神帮忙看看
/*
* Allwinner Technology CO., Ltd. sun8iw19p1 soc board.
*
* soc board support.
*/
/dts-v1/;
#include "sun50iw9p1.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/pwm/pwm.h>
/{
model = "sun50iw9";
compatible = "allwinner,h616", "arm,sun50iw9p1";
soc@03000000 {
sdc0: sdmmc@04020000 {
pinctrl-0 = <&sdc0_pins_a>;
bus-width = <4>;
cd-gpios = <&pio PF 6 6 1 3 0xffffffff>;
cd-used-24M;
/*non-removable;*/
/*broken-cd;*/
/*cd-inverted*/
/*data3-detect;*/
cap-sd-highspeed;
sd-uhs-sdr50;
sd-uhs-ddr50;
sd-uhs-sdr104;
no-sdio;
no-mmc;
sunxi-power-save-mode;
/*sunxi-dis-signal-vol-sw;*/
max-frequency = <150000000>;
ctl-spec-caps = <0x8>;
vmmc-supply = <®_dldo1>;
vqmmc33sw-supply = <®_dldo1>;
vdmmc33sw-supply = <®_dldo1>;
vqmmc18sw-supply = <®_aldo1>;
vdmmc18sw-supply = <®_aldo1>;
status = "okay";
};
sdc1: sdmmc@04021000 {
pinctrl-0 = <&sdc1_pins_a>;
bus-width = <4>;
no-mmc;
no-sd;
cap-sd-highspeed;
/*sd-uhs-sdr12*/
/*sd-uhs-sdr25*/
sd-uhs-sdr50;
sd-uhs-ddr50;
sd-uhs-sdr104;
/*sunxi-power-save-mode;*/
sunxi-dis-signal-vol-sw;
sdio-used-1v8;
cap-sdio-irq;
keep-power-in-suspend;
ignore-pm-notify;
max-frequency = <150000000>;
ctl-spec-caps = <0x8>;
status = "okay";
};
gmac1: eth@05030000 {
phy-mode = "rmii";
status = "okay";
};
ac200: ac200 {
tv_used = <1>;
tv_twi_used = <1>;
tv_twi_id = <3>;
tv_twi_addr = <16>;
tv_pwm_ch = <5>;
status = "okay";
};
leds {
compatible = "gpio-leds";
pinctrl-0 = <&gpio_pins_a>;
pinctrl-1 = <&gpio_pins_b>;
pinctrl-names = "default", "sleep";
status = "okay";
rpwm {
label = "rpwm";
gpios = <&pio PI 1 1 0xffffffff 0xffffffff 0>; // PI1
};
lpwm {
label = "lpwm";
gpios = <&pio PH 4 1 0xffffffff 0xffffffff 0>; // PH4
};
};
srf04@0 {
compatible = "devantech,srf04";
pinctrl-0 = <&srf04_pins_a &srf04_pins_b>;
pinctrl-1 = <&srf04_pins_c>;
pinctrl-names = "default", "sleep";
trig-gpios = <&pio PI 2 1 0xffffffff 0xffffffff 0>; // PI2
echo-gpios = <&pio PI 15 6 0xffffffff 0xffffffff 0>; // PI15
};
rotary: rotary-encoder {
compatible = "rotary-encoder";
pinctrl-0 = <&rotary_pins_a>;
pinctrl-1 = <&rotary_pins_b>;
pinctrl-names = "default", "sleep";
gpios = <&pio PI 0 6 0xffffffff 0xffffffff 1>, <&pio PI 7 6 0xffffffff 0xffffffff 0>; //PI0 PI7
linux,axis = <0>; /* REL_X */
rotary-encoder,encoding = "gray";
rotary-encoder,relative-axis;
};
backlight: backlight {
compatible = "pwm-backlight";
// enable-gpios = <&pio PI 12 1 GPIO_ACTIVE_HIGH>;
pwms = <&pwm 2 50000 PWM_POLARITY_INVERTED>;
brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>;
// default-brightness-level = <8>;
status = "okay";
};
wlan:wlan {
compatible = "allwinner,sunxi-wlan";
clocks = <&clk_losc_out>;
pinctrl-0 = <&clk_losc_pins_a>;
pinctrl-names = "default";
wlan_busnum = <0x1>;
wlan_power;
wlan_io_regulator;
wlan_regon = <&pio PG 18 1 1 1 0>;
wlan_hostwake = <&pio PG 15 6 1 1 0>;
chip_en;
power_en;
status = "okay";
};
bt:bt {
compatible = "allwinner,sunxi-bt";
clocks = <&clk_losc_out>;
bt_power;
bt_io_regulator;
bt_rst_n = <&pio PG 19 1 1 1 0>;
status = "okay";
};
btlpm:btlpm {
compatible = "allwinner,sunxi-btlpm";
uart_index = <0x1>;
bt_wake = <&pio PG 17 1 0xffffffff 0xffffffff 1>;
bt_hostwake = <&pio PG 16 6 0xffffffff 0xffffffff 0>;
status = "okay";
};
addr_mgt:addr_mgt {
compatible = "allwinner,sunxi-addr_mgt";
type_addr_wifi = <0x0>;
type_addr_bt = <0x0>;
type_addr_eth = <0x0>;
status = "okay";
};
r_pio: pinctrl@07022000 {
s_twi0_pins_a: s_twi0@0 {
allwinner,pins = "PL0", "PL1";
allwinner,pname = "s_twi0_scl", "s_twi0_sda";
allwinner,function = "s_twi0";
allwinner,muxsel = <3>;
allwinner,drive = <1>;
allwinner,pull = <1>;
};
s_twi0_pins_b: s_twi0@1 {
allwinner,pins = "PL0", "PL1";
allwinner,function = "io_disabled";
allwinner,muxsel = <7>;
allwinner,drive = <1>;
allwinner,pull = <0>;
};
};
pio: pinctrl@0300b000 {
gpio_pins_a: gpio@0 {
allwinner,pins = "PI1", "PH4";
allwinner,function = "gpio_out";
allwinner,muxsel = <1>;
allwinner,drive = <1>;
allwinner,pull = <0>;
};
gpio_pins_b: gpio@1 {
allwinner,pins = "PI1", "PH4";
allwinner,function = "io_disabled";
allwinner,muxsel = <7>;
allwinner,drive = <1>;
allwinner,pull = <0>;
};
srf04_pins_a: srf04@0 {
allwinner,pins = "PI2";
allwinner,function = "gpio_out";
allwinner,muxsel = <1>;
allwinner,drive = <1>;
allwinner,pull = <0>;
};
srf04_pins_b: srf04@1 {
allwinner,pins = "PI15";
allwinner,function = "gpio_in";
allwinner,muxsel = <6>;
allwinner,drive = <1>;
allwinner,pull = <0>;
};
srf04_pins_c: srf04@1 {
allwinner,pins = "PI2", "PI15";
allwinner,function = "io_disabled";
allwinner,muxsel = <7>;
allwinner,drive = <1>;
allwinner,pull = <0>;
};
rotary_pins_a: rotary@0 {
allwinner,pins = "PI0", "PI7";
allwinner,function = "gpio_in";
allwinner,muxsel = <6>;
allwinner,drive = <1>;
allwinner,pull = <0>;
};
rotary_pins_b: rotary@1 {
allwinner,pins = "PI0", "PI7";
allwinner,function = "io_disabled";
allwinner,muxsel = <7>;
allwinner,drive = <1>;
allwinner,pull = <0>;
};
spi0_pins_a: spi0@0 {
allwinner,pins = "PC0", "PC2", "PC4";
allwinner,pname = "spi0_sclk", "spi0_mosi","spi0_miso";
allwinner,function = "spi0";
allwinner,muxsel = <4>;
allwinner,drive = <1>;
allwinner,pull = <0>;
};
spi0_pins_b: spi0@1 {
allwinner,pins = "PC3", "PC7";
allwinner,pname = "spi0_cs0", "spi0_cs1";
allwinner,function = "spi0";
allwinner,muxsel = <4>;
allwinner,drive = <1>;
allwinner,pull = <1>; // only CS should be pulled up
};
spi0_pins_c: spi0@2 {
allwinner,pins = "PC0", "PC2", "PC3", "PC4", "PC7";
allwinner,function = "io_disabled";
allwinner,muxsel = <7>;
allwinner,drive = <1>;
allwinner,pull = <0>;
};
spi1_pins_a: spi1@0 {
allwinner,pins = "PH6", "PH7", "PH8";
allwinner,pname = "spi1_sclk", "spi1_mosi", "spi1_miso";
allwinner,function = "spi1";
allwinner,muxsel = <4>;
allwinner,drive = <1>;
allwinner,pull = <0>;
};
spi1_pins_b: spi1@1 {
allwinner,pins = "PH5", "PH9";
allwinner,pname = "spi1_cs0", "spi1_cs1";
allwinner,function = "spi1";
allwinner,muxsel = <4>;
allwinner,drive = <1>;
allwinner,pull = <1>; // only CS should be pulled up
};
spi1_pins_c: spi1@2 {
allwinner,pins = "PH5", "PH6", "PH7", "PH8", "PH9";
allwinner,function = "io_disabled";
allwinner,muxsel = <7>;
allwinner,drive = <1>;
allwinner,pull = <0>;
};
twi2_pins_a: twi2@0 {
allwinner,pins = "PI9", "PI10";
allwinner,pname = "twi2_scl", "twi2_sda";
allwinner,function = "twi2";
allwinner,muxsel = <5>;
allwinner,drive = <1>;
allwinner,pull = <0>;
};
twi2_pins_b: twi2@1 {
allwinner,pins = "PI9", "PI10";
allwinner,function = "io_disabled";
allwinner,muxsel = <7>;
allwinner,drive = <1>;
allwinner,pull = <0>;
};
sdc0_pins_a: sdc0@0 {
allwinner,pins = "PF0", "PF1", "PF2",
"PF3", "PF4", "PF5";
allwinner,function = "sdc0";
allwinner,muxsel = <2>;
allwinner,drive = <3>;
allwinner,pull = <1>;
};
sdc1_pins_a: sdc1@0 {
allwinner,pins = "PG0", "PG1", "PG2",
"PG3", "PG4", "PG5";
allwinner,function = "sdc1";
allwinner,muxsel = <0x02>;
allwinner,drive = <3>;
allwinner,pull = <1>;
};
uart0_pins_a: uart0@0 {
allwinner,pins = "PH0", "PH1";
allwinner,pname = "uart0_tx", "uart0_rx";
allwinner,function = "uart0";
allwinner,muxsel = <0x02>;
allwinner,drive = <1>;
allwinner,pull = <1>;
};
uart0_pins_b: uart0@1 {
allwinner,pins = "PH0", "PH1";
allwinner,function = "uart0"; /* io_disabled */
allwinner,muxsel = <0x07>;
allwinner,drive = <1>;
allwinner,pull = <0>;
};
uart1_pins_a: uart1@0 {
allwinner,pins = "PG6", "PG7", "PG8", "PG9";
allwinner,pname = "uart1_tx", "uart1_rx",
"uart1_rts", "uart1_cts";
allwinner,function = "uart1";
allwinner,muxsel = <0x02>;
allwinner,drive = <1>;
allwinner,pull = <1>;
};
uart1_pins_b: uart1@1 {
allwinner,pins = "PG6", "PG7", "PG8", "PG9";
allwinner,function = "io_disabled";
allwinner,muxsel = <0x07>;
allwinner,drive = <1>;
allwinner,pull = <0>;
};
uart2_pins_a: uart2@0 {
allwinner,pins = "PI5", "PI6";
allwinner,pname = "uart2_tx", "uart2_rx";
allwinner,function = "uart2";
allwinner,muxsel = <0x03>;
allwinner,drive = <1>;
allwinner,pull = <1>;
};
uart2_pins_b: uart2@1 {
allwinner,pins = "PI5", "PI6";
allwinner,function = "io_disabled";
allwinner,muxsel = <0x07>;
allwinner,drive = <1>;
allwinner,pull = <0>;
};
uart5_pins_a: uart5@0 {
allwinner,pins = "PH2", "PH3";
allwinner,pname = "uart5_tx", "uart5_rx";
allwinner,function = "uart5";
allwinner,muxsel = <0x02>;
allwinner,drive = <1>;
allwinner,pull = <1>;
};
uart5_pins_b: uart5@1 {
allwinner,pins = "PH2", "PH3";
allwinner,function = "io_disabled";
allwinner,muxsel = <0x07>;
allwinner,drive = <1>;
allwinner,pull = <0>;
};
pwm1_pin_a: pwm1@0 {
allwinner,pins = "PI11";
allwinner,function = "pwm1";
allwinner,muxsel = <0x05>;
allwinner,drive = <1>;
allwinner,pull = <0>;
allwinner,data = <0>;
};
pwm1_pin_b: pwm1@1 {
allwinner,pins = "PI11";
allwinner,function = "io_disabled";
allwinner,muxsel = <0x07>;
allwinner,drive = <1>;
allwinner,pull = <0>;
allwinner,data = <0>;
};
pwm2_pin_a: pwm2@0 {
allwinner,pins = "PI12";
allwinner,function = "pwm2";
allwinner,muxsel = <0x05>;
allwinner,drive = <1>;
allwinner,pull = <0>;
allwinner,data = <0>;
};
pwm2_pin_b: pwm2@1 {
allwinner,pins = "PI12";
allwinner,function = "io_disabled";
allwinner,muxsel = <0x07>;
allwinner,drive = <1>;
allwinner,pull = <0>;
allwinner,data = <0>;
};
pwm3_pin_a: pwm3@0 {
allwinner,pins = "PI13";
allwinner,function = "pwm3";
allwinner,muxsel = <0x05>;
allwinner,drive = <1>;
allwinner,pull = <0>;
allwinner,data = <0>;
};
pwm3_pin_b: pwm3@1 {
allwinner,pins = "PI13";
allwinner,function = "io_disabled";
allwinner,muxsel = <0x07>;
allwinner,drive = <1>;
allwinner,pull = <0>;
allwinner,data = <0>;
};
pwm4_pin_a: pwm4@0 {
allwinner,pins = "PI14";
allwinner,function = "pwm4";
allwinner,muxsel = <0x05>;
allwinner,drive = <1>;
allwinner,pull = <0>;
allwinner,data = <0>;
};
pwm4_pin_b: pwm4@1 {
allwinner,pins = "PI14";
allwinner,function = "io_disabled";
allwinner,muxsel = <0x07>;
allwinner,drive = <1>;
allwinner,pull = <0>;
allwinner,data = <0>;
};
pwm5_pin_a: pwm5@0 {
allwinner,pins = "PA12";
allwinner,function = "pwm5";
allwinner,muxsel = <0x02>;
allwinner,drive = <0xffffffff>;
allwinner,pull = <0>;
allwinner,data = <0xffffffff>;
};
pwm5_pin_b: pwm5@1 {
allwinner,pins = "PA12";
allwinner,function = "io_disabled";
allwinner,muxsel = <0x07>;
allwinner,drive = <0xffffffff>;
allwinner,pull = <0>;
allwinner,data = <0xffffffff>;
};
standby_red: standby@0 {
allwinner,pins = "PH6";
allwinner,function = "gpio_out";
allwinner,muxsel = <1>;
allwinner,data = <1>;
allwinner,drive = <0>;
allwinner,pull = <0>;
};
standby_blue: standby@1 {
allwinner,pins = "PH7";
allwinner,function = "gpio_out";
allwinner,muxsel = <1>;
allwinner,data = <0>;
allwinner,drive = <2>;
allwinner,pull = <2>;
};
standby_bt: standby@2 {
allwinner,pins = "PG16";
allwinner,function = "gpio_in";
allwinner,muxsel = <0>;
allwinner,data = <0>;
allwinner,drive = <0>;
allwinner,pull = <0>;
};
t_irq_a: t_irq@0 {
allwinner,pins = "PI16";
allwinner,function = "gpio_in";
allwinner,muxsel = <6>;
allwinner,data = <0>;
allwinner,drive = <0>;
allwinner,pull = <0>;
};
};
twi2: twi@0x05002800{
clock-frequency = <200000>;
pinctrl-0 = <&twi2_pins_a>;
pinctrl-1 = <&twi2_pins_b>;
status = "disable";
};
twi5: twi@0x07081400{
clock-frequency = <200000>;
pinctrl-0 = <&s_twi0_pins_a>;
pinctrl-1 = <&s_twi0_pins_b>;
status = "okay";
};
/*----------------------------------------------------------------------------------
*resistance gpadc configuration
*channel_num: Maxinum number of channels supported on the platform.
*channel_select: channel enable setection. channel0:0x01 channel1:0x02 channel2:0x04 channel3:0x08
*channel_data_select: channel data enable. channel0:0x01 channel1:0x02 channel2:0x04 channel3:0x08.
*channel_compare_select: compare function enable channel0:0x01 channel1:0x02 channel2:0x04 channel3:0x08.
*channel_cld_select: compare function low data enable setection: channel0:0x01 channel1:0x02 channel2:0x04 channel3:0x08.
*channel_chd_select: compare function hig data enable setection: channel0:0x01 channel1:0x02 channel2:0x04 channel3:0x08.
*----------------------------------------------------------------------------------*/
gpadc:gpadc{
channel_num = <1>;
channel_select = <0x01>;
channel_data_select = <0>;
channel_compare_select = <0x01>;
channel_cld_select = <0x01>;
channel_chd_select = <0>;
channel0_compare_lowdata = <1700000>;
channel0_compare_higdata = <1200000>;
key_cnt = <5>;
key0_vol = <115>;
key0_val = <115>;
key1_vol = <240>;
key1_val = <114>;
key2_vol = <360>;
key2_val = <139>;
key3_vol = <480>;
key3_val = <28>;
key4_vol = <600>;
key4_val = <102>;
status = "disable";
};
/*
*usb_used: usb controller enable. 0-disable, 1-enable.
*usb_port_type: usb mode. 0-device, 1-host, 2-otg.
*usb_detect_type: usb hotplug detect mode. 0-none, 1-vbus/id detect, 2-id/dpdm detect.
*/
usbc0:usbc0@0 {
device_type = "usbc0";
usb_port_type = <0x0>;
usb_detect_type = <0x1>;
usb_detect_mode = <0x0>;
usb_id_gpio;
usb_det_vbus_gpio;
usb_drv_vbus_gpio;
usb_host_init_state = <0x0>;
usb_regulator_io = "nocare";
usb_wakeup_suspend = <0x2>;
usb_luns = <0x3>;
usb_serial_unique = <0x0>;
usb_serial_number = "20080411";
status = "okay";
};
usbc1:usbc1@0 {
device_type = "usbc1";
usb_drv_vbus_gpio = <&pio PH 8 0 1 0xffffffff 0xffffffff>;
usb_host_init_state = <0x1>;
usb_regulator_io = "nocare";
usb_wakeup_suspend = <0x2>;
status = "okay";
};
usbc2:usbc2@0 {
device_type = "usbc2";
usb_drv_vbus_gpio;
usb_host_init_state = <0x1>;
usb_regulator_io = "nocare";
usb_wakeup_suspend = <0x2>;
status = "okay";
};
usbc3:usbc3@0 {
device_type = "usbc3";
usb_drv_vbus_gpio;
usb_host_init_state = <0x1>;
usb_regulator_io = "nocare";
usb_wakeup_suspend = <0x2>;
status = "okay";
};
/* audio dirver module */
codec:codec@0x05096000 {
adcdrc_cfg = <0x00>;
adchpf_cfg = <0x00>;
dacdrc_cfg = <0x00>;
dachpf_cfg = <0x00>;
fmin_gain = <0x03>;
linein_gain = <0x03>;
digital_vol = <0x00>;
lineout_vol = <0x1a>;
/* CVBS audio output enable control */
gpio-spk = <&pio PH 5 1 1 1 1>;
pa_ctl_level = <0x01>;
pa_msleep_time = <0x64>;
ramp_func_used = <0x01>;
/* codec regulator about */
avcc-supply = <®_aldo1>;
vcc33_audio-supply = <®_dldo1>;
status = "okay";
};
spdif:spdif-controller@0x05093000{
status = "disabled";
};
dmic:dmic-controller@0x05095000{
status = "disabled";
};
ahub_codec:ahub_codec@0x05097000{
status = "okay";
};
ahub_daudio0:ahub_daudio0@0x05097000{
/* for choose the corresponding pins */
pinctrl-0 = <&ahub_daudio0_pins_c>;
pinctrl-1 = <&ahub_daudio0_pins_d>;
pinconfig = <0x01>;
frametype = <0x00>;
pcm_lrck_period = <0x20>;
slot_width_select = <0x20>;
daudio_master = <0x04>;
audio_format = <0x01>;
signal_inversion = <0x01>;
tdm_config = <0x01>;
mclk_div = <0x00>;
status = "okay";
};
ahub_daudio1:ahub_daudio1@0x05097000{
pinconfig = <0x00>;
frametype = <0x00>;
pcm_lrck_period = <0x20>;
slot_width_select = <0x20>;
daudio_master = <0x04>;
audio_format = <0x01>;
signal_inversion = <0x01>;
tdm_config = <0x01>;
mclk_div = <0x01>;
status = "okay";
};
ahub_daudio2:ahub_daudio2@0x05097000{
pinconfig = <0x01>;
frametype = <0x00>;
pcm_lrck_period = <0x20>;
slot_width_select = <0x20>;
daudio_master = <0x04>;
audio_format = <0x01>;
signal_inversion = <0x01>;
tdm_config = <0x01>;
mclk_div = <0x04>;
status = "disabled";
};
ahub_daudio3:ahub_daudio3@0x05097000{
pinconfig = <0x01>;
frametype = <0x00>;
pcm_lrck_period = <0x20>;
slot_width_select = <0x20>;
daudio_master = <0x04>;
audio_format = <0x01>;
signal_inversion = <0x01>;
tdm_config = <0x01>;
mclk_div = <0x04>;
status = "disabled";
};
snddaudio0:sound@0{
status = "okay";
};
sndhdmi:sound@1{
status = "okay";
};
snddaudio2:sound@2{
status = "disabled";
};
snddaudio3:sound@3{
/* acx00-codec throught mfd_add_devices */
/*
sunxi,snddaudio-codec = "acx00-codec";
sunxi,snddaudio-codec-dai = "acx00-dai";
*/
status = "disabled";
};
sndspdif:sound@4{
status = "disabled";
};
snddmic:sound@5{
status = "disabled";
};
sndcodec:sound@6{
status = "disabled";
};
sndahub:sound@7{
status = "disabled";
};
gpio_para {
device_type = "gpio_para";
status = "disabled";
compatible = "allwinner,sunxi-init-gpio";
gpio_num = <1>;
gpio_pin_1 = <&pio PH 6 1 0xffffffff 0xffffffff 1>;
normal_led = "gpio_pin_1";
easy_light_used = <1>;
normal_led_light = <1>;
};
/*----------------------------------------------------------------------------------
disp init configuration
disp_mode (0:screen0<screen0,fb0>)
screenx_output_type (0:none; 1:lcd; 2:tv; 3:hdmi;5:vdpo)
screenx_output_mode (used for hdmi output, 0:480i 1:576i 2:480p 3:576p 4:720p50)
(5:720p60 6:1080i50 7:1080i60 8:1080p24 9:1080p50 10:1080p60)
screenx_output_format (for hdmi, 0:RGB 1:yuv444 2:yuv422 3:yuv420)
screenx_output_bits (for hdmi, 0:8bit 1:10bit 2:12bit 2:16bit)
screenx_output_eotf (for hdmi, 0:reserve 4:SDR 16:HDR10 18:HLG)
screenx_output_cs (for hdmi, 0:undefined 257:BT709 260:BT601 263:BT2020)
screenx_output_dvi_hdmi (for hdmi, 0:undefined 1:dvi mode 2:hdmi mode)
screen0_output_range (for hdmi, 0:default 1:full 2:limited)
screen0_output_scan (for hdmi, 0:no data 1:overscan 2:underscan)
screen0_output_aspect_ratio (for hdmi, 8-same as original picture 9-4:3 10-16:9 11-14:9)
fbx format (4:RGB655 5:RGB565 6:RGB556 7:ARGB1555 8:RGBA5551 9:RGB888 10:ARGB8888 12:ARGB4444)
fbx pixel sequence (0:ARGB 1:BGRA 2:ABGR 3:RGBA)
fb0_scaler_mode_enable(scaler mode enable, used FE)
fbx_width,fbx_height (framebuffer horizontal/vertical pixels, fix to output resolution while equal 0)
lcdx_backlight (lcd init backlight,the range:[0,256],default:197
lcdx_yy (lcd init screen bright/contrast/saturation/hue, value:0~100, default:50/50/57/50)
lcd0_contrast (LCD contrast, 0~100)
lcd0_saturation (LCD saturation, 0~100)
lcd0_hue (LCD hue, 0~100)
framebuffer software rotation setting:
disp_rotation_used: (0:disable; 1:enable,you must set fbX_width to lcd_y,
set fbX_height to lcd_x)
degreeX: (X:screen index; 0:0 degree; 1:90 degree; 3:270 degree)
degreeX_Y: (X:screen index; Y:layer index 0~15; 0:0 degree; 1:90 degree; 3:270 degree)
----------------------------------------------------------------------------------*/
disp: disp@01000000 {
disp_init_enable = <1>;
disp_mode = <0>;
screen0_output_type = <3>;
screen0_output_mode = <10>;
screen0_output_format = <0>;
screen0_output_bits = <0>;
screen0_output_eotf = <4>;
screen0_output_cs = <257>;
screen0_output_dvi_hdmi = <2>;
screen0_output_range = <2>;
screen0_output_scan = <0>;
screen0_output_aspect_ratio = <8>;
screen1_output_type = <2>;
screen1_output_mode = <11>;
screen1_output_format = <1>;
screen1_output_bits = <0>;
screen1_output_eotf = <4>;
screen1_output_cs = <260>;
screen1_output_dvi_hdmi = <0>;
screen1_output_range = <2>;
screen1_output_scan = <0>;
screen1_output_aspect_ratio = <8>;
dev0_output_type = <4>;
dev0_output_mode = <10>;
dev0_screen_id = <0>;
dev0_do_hpd = <1>;
dev1_output_type = <2>;
dev1_output_mode = <11>;
dev1_screen_id = <1>;
dev1_do_hpd = <1>;
dev2_output_type = <0>;
def_output_dev = <0>;
hdmi_mode_check = <1>;
fb0_format = <0>;
fb0_width = <1280>;
fb0_height = <720>;
fb1_format = <0>;
fb1_width = <0>;
fb1_height = <0>;
chn_cfg_mode = <1>;
disp_para_zone = <1>;
/* VCC-LCD */
/*dc1sw-supply = <®_sw>;*/
/* VCC-LVDS and VCC-HDMI */
/*bldo1-supply = <®_bldo1>;*/
/* VCC-TV */
/*cldo4-supply = <®_cldo4>;*/
};
/*----------------------------------------------------------------------------------
;tv configuration
;dac_src (dac no,support dac_src0~dac_src3,dac num max is 4)
;interface (interface type,1<->cvbs,2<->YPBPR,4<->SVIDEO)
;dac_type (0<->composite,1<->luma,2<->chroma,3<->reserved,4<->y/green,
; 5<->u/pb/blue,6<->v/pr/red)
;NOTE: tv0,tv1 can not use the same dac_src.
;---------------------------------------------------------------------------------*/
tv0: tv0@01c94000 {
status = "okay";
dac_src0 = <0>;
dac_type0 = <0>;
interface = <1>;
/*tv_power = "cldo4";*/
};
/*----------------------------------------------------------------------------------
;lcd0 configuration
;lcd_if: 0:hv(sync+de); 1:8080; 2:ttl; 3:lvds; 4:dsi; 5:edp; 6:extend dsi
;lcd_hv_if 0:Parallel RGB; 8:Serial RGB; 10:Dummy RGB; 11: RGB Dummy;12:CCIR656
;lcd_hv_clk_phase 0:0 degree;1:90 degree;2:180 degree;3:270 degree
;lcd_hv_sync_polarity 0:vs low,hs low; 1:vs high,hslow; 2:vs low,hs high; 3:vs high,hs high
;lcd_hv_syuv_seq 0:YUYV; 1:YVYU; 2:UYVY; 3:VYUY
;lcd_cpu_if 0:18bit/1 cycle parallel(RGB666); 4:16bit/1cycle parallel (RGB565)
; 6:18bit/3 cycle parallel(RGB666); 7:16bit/2cycle parallel (RGB565)
;lcd_cpu_te 0:frame auto trigger; 1:frame triggered by te rising edge; 2:frame triggered by te falling edge;
;lcd_dsi_if 0:video mode; 1: Command mode; 2:video burst mode
;lcd_dsi_te 0:frame auto trigger; 1:frame triggered by te rising edge; 2:frame triggered by te falling edge;
;lcd_x: lcd horizontal resolution
;lcd_y: lcd vertical resolution
;lcd_width: width of lcd in mm
;lcd_height: height of lcd in mm
;lcd_dclk_freq: in MHZ unit
;lcd_pwm_freq: in HZ unit
;lcd_pwm_pol: lcd backlight PWM polarity
;lcd_pwm_max_limit lcd backlight PWM max limit(<=255)
;lcd_hbp: hsync back porch(pixel) + hsync plus width(pixel);
;lcd_ht: hsync total cycle(pixel)
;lcd_vbp: vsync back porch(line) + vysnc plus width(line)
;lcd_vt: vysnc total cycle(line)
;lcd_hspw: hsync plus width(pixel)
;lcd_vspw: vysnc plus width(pixel)
;lcd_lvds_if: 0:single link; 1:dual link
;lcd_lvds_colordepth: 0:8bit; 1:6bit
;lcd_lvds_mode: 0:NS mode; 1:JEIDA mode
;lcd_frm: 0:disable; 1:enable rgb666 dither; 2:enable rgb656 dither
;lcd_io_phase: 0:noraml; 1:intert phase(0~3bit: vsync phase; 4~7bit:hsync phase;
; 8~11bit:dclk phase; 12~15bit:de phase)
;lcd_gamma_en lcd gamma correction enable
;lcd_bright_curve_en lcd bright curve correction enable
;lcd_cmap_en lcd color map function enable
;deu_mode 0:smoll lcd screen; 1:large lcd screen(larger than 10inch)
;lcdgamma4iep: Smart Backlight parameter, lcd gamma vale * 10;
; decrease it while lcd is not bright enough; increase while lcd is too bright
;smart_color 90:normal lcd screen 65:retina lcd screen(9.7inch)
;Pin setting for special function ie.LVDS, RGB data or vsync
; name(donot care) = port:PD12<pin function><pull up or pull down><drive ability><output level>
;Pin setting for gpio:
; lcd_gpio_X = port:PD12<pin function><pull up or pull down><drive ability><output level>
;Pin setting for backlight enable pin
; lcd_bl_en = port:PD12<pin function><pull up or pull down><drive ability><output level>
;fsync setting, pulse to csi
;lcd_fsync_en (0:disable fsync,1:enable)
;lcd_fsync_act_time (active time of fsync, unit:pixel)
;lcd_fsync_pol (0:positive;1:negative)
;gpio config: <&pio for cpu or &r_pio for cpus, port, port num, pio function,
pull up or pull down(default 0), driver level(default 1), data>
;For dual link lvds: use lvds2link_pins_a and lvds2link_pins_b instead
;For rgb24: use rgb24_pins_a and rgb24_pins_b instead
;For lvds1: use lvds1_pins_a and lvds1_pins_b instead
;For lvds0: use lvds0_pins_a and lvds0_pins_b instead
;----------------------------------------------------------------------------------*/
lcd0: lcd0@01c0c000 {
lcd_used = <0>;
lcd_driver_name = "default_lcd";
lcd_backlight = <50>;
lcd_if = <0>;
lcd_x = <1280>;
lcd_y = <800>;
lcd_width = <150>;
lcd_height = <94>;
lcd_dclk_freq = <70>;
lcd_pwm_used = <0>;
lcd_pwm_ch = <0>;
lcd_pwm_freq = <50000>;
lcd_pwm_pol = <0>;
lcd_pwm_max_limit = <255>;
lcd_hbp = <20>;
lcd_ht = <1418>;
lcd_hspw = <10>;
lcd_vbp = <10>;
lcd_vt = <814>;
lcd_vspw = <5>;
lcd_lvds_if = <0>;
lcd_lvds_colordepth = <0>;
lcd_lvds_mode = <0>;
lcd_frm = <0>;
lcd_hv_clk_phase = <0>;
lcd_hv_sync_polarity= <0>;
lcd_gamma_en = <0>;
lcd_bright_curve_en = <0>;
lcd_cmap_en = <0>;
deu_mode = <0>;
lcdgamma4iep = <22>;
smart_color = <90>;
lcd_pin_power = "bldo1";
lcd_power = "dc1sw";
/*lcd_bl_en = <&pio PD 27 1 0 3 1>;*/
pinctrl-0 = <&rgb24_pins_a>;
pinctrl-1 = <&rgb24_pins_b>;
};
/*----------------------------------------------------------------------------------
;hdmi configuration
;hdmi_used: if hdmi is used
;hdmi_hdcp_enable: if hdmi hdcp function enable
;hdmi_cts_compatibility:if hdmi cts test compatibility enable
;hdmi_power: power name for hdmi
;--------------------------------------------------------------------------------*/
hdmi: hdmi@06000000 {
hdmi_used = <1>;
hdmi_power_cnt = <2>;
hdmi_power0 = "vcc-hdmi";
hdmi_power1 = "vdd-hdmi";
hdmi_hdcp_enable = <1>;
hdmi_hdcp22_enable = <1>;
hdmi_cts_compatibility = <0>;
hdmi_cec_support = <1>;
hdmi_cec_super_standby = <0>;
hdmi_skip_bootedid = <1>;
ddc_en_io_ctrl = <0>;
power_io_ctrl = <0>;
};
};
box_start_os0 {
compatible = "allwinner,box_start_os";
start_type = <0x1>;
irkey_used = <0x0>;
pmukey_used = <0x0>;
pmukey_num = <0x0>;
led_power = <0x0>;
led_state = <0x0>;
pinctrl-0 = <&standby_blue>;
pinctrl-1 = <&standby_red>;
/* pinctrl-2 = <&standby_bt>;*/
};
gpu: gpu@0x01800000 {
gpu_idle = <1>;
dvfs_status = <0>;
operating-points = <
/* KHz uV */
600000 950000
576000 950000
540000 950000
504000 950000
>;
};
};
&aliases {
pmu0 = &pmu0;
standby_param = &standby_param;
};
&s_cir0 {
s_cir0_used = <1>;
ir_power_key_code0 = <0x40>;
ir_addr_code0 = <0xfe01>;
ir_power_key_code1 = <0x1a>;
ir_addr_code1 = <0xfb04>;
ir_power_key_code2 = <0xf2>;
ir_addr_code2 = <0x2992>;
ir_power_key_code3 = <0x57>;
ir_addr_code3 = <0x9f00>;
ir_power_key_code4 = <0xdc>;
ir_addr_code4 = <0x4cb3>;
ir_power_key_code5 = <0x18>;
ir_addr_code5 = <0xff00>;
ir_power_key_code6 = <0xdc>;
ir_addr_code6 = <0xdd22>;
ir_power_key_code7 = <0x0d>;
ir_addr_code7 = <0xbc00>;
ir_power_key_code8 = <0x4d>;
ir_addr_code8 = <0x4040>;
wakeup-source;
status = "disabled";
};
&cpu_trips{
cpu_crit: cpu_crit@0 {
temperature = <115000>;
type = "critical";
hysteresis = <0>;
};
};
&twi5 {
no_suspend = <1>;
status = "okay";
pmu0: pmu{
compatible = "x-powers,axp1530";
reg = <0x36>;
/* interrupt-parent = <&nmi_intc>;
interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
interrupt-controller;
#interrupt-cells = <1>;*/
wakeup-source;
standby_param: standby_param {
vcc-dram = <0x4>;
};
regulators{
reg_dcdc1: dcdc1 {
regulator-name = "axp1530-dcdc1";
regulator-min-microvolt = <500000>;
regulator-max-microvolt = <3400000>;
regulator-step-delay-us = <25>;
regulator-final-delay-us = <50>;
regulator-always-on;
};
reg_dcdc2: dcdc2 {
regulator-name = "axp1530-dcdc2";
regulator-min-microvolt = <500000>;
regulator-max-microvolt = <1540000>;
regulator-step-delay-us = <25>;
regulator-final-delay-us = <50>;
regulator-ramp-delay = <200>; /* FIXME */
regulator-always-on;
};
reg_dcdc3: dcdc3 {
regulator-name = "axp1530-dcdc3";
regulator-min-microvolt = <1500000>;
regulator-max-microvolt = <1500000>;
regulator-step-delay-us = <25>;
regulator-final-delay-us = <50>;
regulator-always-on;
};
reg_aldo1: ldo1 {
regulator-name = "axp1530-aldo1";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
regulator-step-delay-us = <25>;
regulator-final-delay-us = <50>;
regulator-always-on;
};
reg_dldo1: ldo2 {
regulator-name = "axp1530-dldo1";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
regulator-step-delay-us = <25>;
regulator-final-delay-us = <50>;
regulator-always-on;
};
};
};
};
&cpu0 {
cpu-supply = <®_dcdc2>;
};
&uart0 {
status = "okay";
};
&uart1 {
status = "okay";
};
&uart2 {
status = "okay";
};
&uart3 {
status = "disabled";
};
&uart4 {
status = "disabled";
};
&uart5 {
status = "okay";
};
&spi0 {
pinctrl-0 = <&spi0_pins_a &spi0_pins_b>;
pinctrl-1 = <&spi0_pins_c>;
pinctrl-names = "default", "sleep";
spi_slave_mode = <0>;
spi1_cs_number = <1>;
status = "okay";
spi-nor@0 {
#address-cells = <1>;
#size-cells = <1>;
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <40000000>;
status = "disabled";
};
spi-nand@0 {
#address-cells = <1>;
#size-cells = <1>;
compatible = "spi-nand";
reg = <0>;
spi-max-frequency = <50000000>;
status = "okay";
boot@0 {
label = "boot";
reg = <0x0000000 0x0100000>;
};
ubi0@100000 {
label = "ubi0";
reg = <0x0100000 0x0000000>;
};
};
};
&spi1 {
pinctrl-0 = <&spi1_pins_a &spi1_pins_b>;
pinctrl-1 = <&spi1_pins_c>;
pinctrl-names = "default", "sleep";
spi_slave_mode = <0>;
spi1_cs_number = <2>;
status = "okay";
ili9341@0 {
compatible = "ilitek,ili9341";
reg = <0>;
status = "okay";
spi-max-frequency = <50000000>;
rotate = <270>;
bgr;
fps = <30>;
buswidth = <8>;
dc-gpios = <&pio PH 10 1 0xffffffff 0xffffffff 0>; // PH10
debug = <0>;
backlight = <&backlight>;
};
tsc2046@1 {
reg = <1>; /* CS1 */
compatible = "ti,tsc2046";
pinctrl-names = "default";
pinctrl-0 = <&t_irq_a>;
interrupt-parent = <&pio>;
interrupts = <PI 16 IRQ_TYPE_LEVEL_LOW>;
spi-max-frequency = <1000000>;
pendown-gpio = <&pio PI 16 6 0xffffffff 0xffffffff 0>; // PI16
ti,x-min = /bits/ 16 <0>;
ti,x-max = /bits/ 16 <320>;
ti,y-min = /bits/ 16 <0>;
ti,y-max = /bits/ 16 <240>;
ti,x-plate-ohms = /bits/ 16 <40>;
ti,pressure-max = /bits/ 16 <255>;
wakeup-source;
status = "okay";
};
};
&pwm {
pwm-number = <5>;
pwm-base = <0x0>;
pwms = <&pwm1>,<&pwm2>, <&pwm3>, <&pwm4>, <&pwm5>;
status = "okay";
};
&pwm1 {
pinctrl-names = "active", "sleep";
pinctrl-0 = <&pwm1_pin_a>;
pinctrl-1 = <&pwm1_pin_b>;
status = "okay";
};
&pwm2 {
pinctrl-names = "active", "sleep";
pinctrl-0 = <&pwm2_pin_a>;
pinctrl-1 = <&pwm2_pin_b>;
status = "okay";
};
&pwm3 {
pinctrl-names = "active", "sleep";
pinctrl-0 = <&pwm3_pin_a>;
pinctrl-1 = <&pwm3_pin_b>;
status = "okay";
};
&pwm4 {
pinctrl-names = "active", "sleep";
pinctrl-0 = <&pwm4_pin_a>;
pinctrl-1 = <&pwm4_pin_b>;
status = "okay";
};
&pwm5 {
pinctrl-names = "active", "sleep";
pinctrl-0 = <&pwm5_pin_a>;
pinctrl-1 = <&pwm5_pin_b>;
status = "okay";
};
&twi2 {
clock-frequency = <200000>;
pinctrl-0 = <&twi2_pins_a>;
pinctrl-1 = <&twi2_pins_b>;
status = "okay";
mpu6050@68 {
compatible = "invensense,mpu6050";
reg = <0x68>;
status = "okay";
interrupt-parent = <&pio>;
interrupts = <PI 8 IRQ_TYPE_LEVEL_LOW>; // PI8
orientation = <0xff 0 0 0 1 0 0 0 0xff>;
};
vl53l0x@29 {
compatible = "st,vl53l0x";
reg = <0x29>;
interrupt-parent = <&pio>;
interrupts = <PI 3 IRQ_TYPE_EDGE_FALLING>; //PI3
status = "okay";
};
};
挂载根文件系统失败了
[ 1.410000] musb-hdrc musb-hdrc.2.auto: MUSB HDRC host driver
[ 1.420000] musb-hdrc musb-hdrc.2.auto: new USB bus registered, assigned bus number 3
[ 1.420000] usb usb3: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.04
[ 1.430000] usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 1.440000] usb usb3: Product: MUSB HDRC host driver
[ 1.450000] usb usb3: Manufacturer: Linux 5.4.213 musb-hcd
[ 1.450000] usb usb3: SerialNumber: musb-hdrc.2.auto
[ 1.460000] hub 3-0:1.0: USB hub found
[ 1.460000] hub 3-0:1.0: 1 port detected
[ 1.470000] using random self ethernet address
[ 1.470000] using random host ethernet address
[ 1.480000] usb0: HOST MAC 42:90:99:e4:7b:25
[ 1.480000] usb0: MAC 7a:49:54:a3:6c:d4
[ 1.480000] using random self ethernet address
[ 1.490000] using random host ethernet address
[ 1.490000] g_ether gadget: Ethernet Gadget, version: Memorial Day 2008
[ 1.500000] g_ether gadget: g_ether ready
[ 1.510000] ubi0: default fastmap pool size: 50
[ 1.510000] ubi0: default fastmap WL pool size: 25
[ 1.520000] ubi0: attaching mtd1
[ 2.540000] ubi0: scanning is finished
[ 2.550000] ubi0: attached mtd1 (name "ubi0", size 127 MiB)
[ 2.560000] ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
[ 2.570000] ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 2048
[ 2.570000] ubi0: VID header offset: 2048 (aligned 2048), data offset: 4096
[ 2.580000] ubi0: good PEBs: 1016, bad PEBs: 0, corrupted PEBs: 0
[ 2.590000] ubi0: user volume: 5, internal volumes: 1, max. volumes count: 128
[ 2.590000] ubi0: max/mean erase counter: 1/0, WL threshold: 128, image sequence number: 1676903150
[ 2.600000] ubi0: available PEBs: 0, total reserved PEBs: 1016, PEBs reserved for bad PEB handling: 20
[ 2.610000] sun6i-rtc 1c20400.rtc: setting system clock to 1970-01-01T00:19:03 UTC (1143)
[ 2.620000] ALSA device list:
[ 2.620000] No soundcards found.
[ 2.630000] ubi0: background thread "ubi_bgt0d" started, PID 773
[ 2.640000] List of all partitions:
[ 2.640000] 1f00 1024 mtdblock0
[ 2.640000] (driver?)
[ 2.650000] 1f01 130048 mtdblock1
[ 2.650000] (driver?)
[ 2.660000] No filesystem could mount root, tried:
[ 2.660000] ubifs
[ 2.660000]
[ 2.660000] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[ 2.660000] CPU: 0 PID: 1 Comm: swapper Not tainted 5.4.213 #0
[ 2.660000] Hardware name: Allwinner sun8i Family
[ 2.660000] [<c010dd28>] (unwind_backtrace) from [<c010afe4>] (show_stack+0x10/0x14)
[ 2.660000] [<c010afe4>] (show_stack) from [<c011b3b0>] (panic+0xf4/0x314)
[ 2.660000] [<c011b3b0>] (panic) from [<c0a01608>] (mount_block_root+0x260/0x284)
[ 2.660000] [<c0a01608>] (mount_block_root) from [<c0a017b0>] (prepare_namespace+0x9c/0x190)
[ 2.660000] [<c0a017b0>] (prepare_namespace) from [<c07b07f4>] (kernel_init+0x8/0x110)
[ 2.660000] [<c07b07f4>] (kernel_init) from [<c01010e8>] (ret_from_fork+0x14/0x2c)
[ 2.660000] Exception stack(0xc3437fb0 to 0xc3437ff8)
[ 2.660000] 7fa0: 00000000 00000000 00000000 00000000
[ 2.660000] 7fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 2.660000] 7fe0: 00000000 00000000 00000000 00000000 00000013 00000000
[ 2.660000] Rebooting in 5 seconds..
v4l2-ctl -d /dev/video0 --list-formats-ext
ioctl: VIDIOC_ENUM_FMT
Type: Video Capture Multiplanar
[0]: 'NV12' (Y/CbCr 4:2:0)
Size: Stepwise 64x64 - 1920x1920 with step 1/1
v4l2-ctl -d /dev/video1 --list-formats-ext
ioctl: VIDIOC_ENUM_FMT
Type: Video Capture Multiplanar
[0]: 'MPG4' (MPEG-4 Part 2 ES, compressed)
Size: Stepwise 96x64 - 1920x1920 with step 1/1
[1]: 'H263' (H.263, compressed)
Size: Stepwise 96x64 - 1920x1920 with step 1/1
[2]: 'H264' (H.264, compressed)
Size: Stepwise 96x64 - 1920x1920 with step 1/1
[3]: 'VP80' (VP8, compressed)
Size: Stepwise 96x64 - 1920x1920 with step 1/1
摄像头支持格式枚举如上,但无法抓取码流,有人知道怎么弄吗
编译f1c100s时发生错误
../../../../build_dir/target-arm_arm926ej-s_musl_eabi/NetworkManager-1.32.2/meson.build:239: WARNING: Consider using the built-in warning_level option instead of using "-Wall".
../../../../build_dir/target-arm_arm926ej-s_musl_eabi/NetworkManager-1.32.2/meson.build:239: WARNING: Consider using the built-in warning_level option instead of using "-Wextra".
Found pkg-config: /home/leo/HandsomeMod/staging_dir/host/bin/pkg-config (1.7.3)
Using 'PKG_CONFIG_PATH' from environment with value: '/home/leo/HandsomeMod/staging_dir/target-arm_arm926ej-s_musl_eabi/usr/lib/pkgconfig:/home/leo/HandsomeMod/staging_dir/target-arm_arm926ej-s_musl_eabi/usr/share/pkgconfig'
Run-time dependency uuid found: YES 2.36.1
Found CMake: /home/leo/HandsomeMod/staging_dir/host/bin/cmake (3.19.1)
Run-time dependency libelogind found: NO (tried pkgconfig and cmake)
Using 'PKG_CONFIG_PATH' from environment with value: '/home/leo/HandsomeMod/staging_dir/target-arm_arm926ej-s_musl_eabi/usr/lib/pkgconfig:/home/leo/HandsomeMod/staging_dir/target-arm_arm926ej-s_musl_eabi/usr/share/pkgconfig'
Run-time dependency libudev found: YES 243
Using 'PKG_CONFIG_PATH' from environment with value: '/home/leo/HandsomeMod/staging_dir/target-arm_arm926ej-s_musl_eabi/usr/lib/pkgconfig:/home/leo/HandsomeMod/staging_dir/target-arm_arm926ej-s_musl_eabi/usr/share/pkgconfig'
Run-time dependency dbus-1 found: YES 1.13.12
Using 'PKG_CONFIG_PATH' from environment with value: '/home/leo/HandsomeMod/staging_dir/target-arm_arm926ej-s_musl_eabi/usr/lib/pkgconfig:/home/leo/HandsomeMod/staging_dir/target-arm_arm926ej-s_musl_eabi/usr/share/pkgconfig'
Run-time dependency libndp found: YES 1.7
Run-time dependency jansson found: NO (tried pkgconfig and cmake)
Run-time dependency libsystemd found: NO (tried pkgconfig and cmake)
Run-time dependency libsystemd-login found: NO (tried pkgconfig and cmake)
Run-time dependency systemd found: NO (tried pkgconfig and cmake)
Using 'PKG_CONFIG_PATH' from environment with value: '/home/leo/HandsomeMod/staging_dir/target-arm_arm926ej-s_musl_eabi/usr/lib/pkgconfig:/home/leo/HandsomeMod/staging_dir/target-arm_arm926ej-s_musl_eabi/usr/share/pkgconfig'
Run-time dependency gio-unix-2.0 found: YES 2.66.4
Using 'PKG_CONFIG_PATH' from environment with value: '/home/leo/HandsomeMod/staging_dir/target-arm_arm926ej-s_musl_eabi/usr/lib/pkgconfig:/home/leo/HandsomeMod/staging_dir/target-arm_arm926ej-s_musl_eabi/usr/share/pkgconfig'
Run-time dependency gmodule-2.0 found: YES 2.66.4
Library dl found: YES
Using 'PKG_CONFIG_PATH' from environment with value: '/home/leo/HandsomeMod/staging_dir/target-arm_arm926ej-s_musl_eabi/usr/lib/pkgconfig:/home/leo/HandsomeMod/staging_dir/target-arm_arm926ej-s_musl_eabi/usr/share/pkgconfig'
Run-time dependency udev found: YES 243
Run-time dependency nss found: NO (tried pkgconfig and cmake)
Using 'PKG_CONFIG_PATH' from environment with value: '/home/leo/HandsomeMod/staging_dir/target-arm_arm926ej-s_musl_eabi/usr/lib/pkgconfig:/home/leo/HandsomeMod/staging_dir/target-arm_arm926ej-s_musl_eabi/usr/share/pkgconfig'
Run-time dependency gnutls found: YES 3.7.1
Has header "pppd/pppd.h" : YES
Program pppd /sbin/pppd /usr/sbin/pppd found: NO
../../../../build_dir/target-arm_arm926ej-s_musl_eabi/NetworkManager-1.32.2/meson.build:572:4: ERROR: Assert failed: pppd required but not found, please provide a valid pppd path or use -Dppp=false to disable it
A full log can be found at /home/leo/HandsomeMod/build_dir/target-arm_arm926ej-s_musl_eabi/NetworkManager-1.32.2/openwrt-build/meson-logs/meson-log.txt
Makefile:157: recipe for target '/home/leo/HandsomeMod/build_dir/target-arm_arm926ej-s_musl_eabi/NetworkManager-1.32.2/.configured_a17fb5ef857664f03cd0ce37cc5ea591' failed
make[3]: *** [/home/leo/HandsomeMod/build_dir/target-arm_arm926ej-s_musl_eabi/NetworkManager-1.32.2/.configured_a17fb5ef857664f03cd0ce37cc5ea591] Error 1
make[3]: Leaving directory '/home/leo/HandsomeMod/feeds/handsomefeed/utils/network-manager'
time: package/feeds/handsomefeed/network-manager/compile#11.12#0.71#12.15
ERROR: package/feeds/handsomefeed/network-manager failed to build.
package/Makefile:112: recipe for target 'package/feeds/handsomefeed/network-manager/compile' failed
make[2]: *** [package/feeds/handsomefeed/network-manager/compile] Error 1
make[2]: Leaving directory '/home/leo/HandsomeMod'
package/Makefile:108: recipe for target '/home/leo/HandsomeMod/staging_dir/target-arm_arm926ej-s_musl_eabi/stamp/.package_compile' failed
make[1]: *** [/home/leo/HandsomeMod/staging_dir/target-arm_arm926ej-s_musl_eabi/stamp/.package_compile] Error 2
make[1]: Leaving directory '/home/leo/HandsomeMod'
/home/leo/HandsomeMod/include/toplevel.mk:228: recipe for target 'world' failed
make: *** [world] Error 2
使用buildroot制作文件系统,通常使用rootfs.ext4来作为文件系统固件,这种方式需要提前预设一个固件size,而这个size在固件没有编译完成之前是无法知道它的确切大小,一般都会设置稍大点的值,但也会需要空白填充,占用固件空间。
那有没有办法不指定大小,由编译出来的文件系统大小来自动确定size?有,squashfs就是,该文件系统为压缩只读文件系统,体积小,安全,文件系统出现问题,还可以通过恢复出厂设置来还原系统,还可以防止小白删库跑路,当然防不了大神。
单单squashfs还不够,毕竟这个部分是只读,还需要overlay分区来支持读写。
下面上教程,
1. 在buildroot里面添加支持
BR2_TARGET_ROOTFS_SQUASHFS=y
BR2_TARGET_ROOTFS_SQUASHFS4_GZIP=y
这一步会最终会生成output/images/rootfs.squashfs
2. 固件打包
image boot.vfat {
vfat {
files = {
"Image",
"sun50i-h5-prince-pc2.dtb",
"boot.scr"
}
}
size = 32M
}
image sdcard.img {
hdimage {
}
partition spl {
in-partition-table = "no"
image = "sunxi-spl.bin"
offset = 8192
}
partition u-boot {
in-partition-table = "no"
image = "u-boot.itb"
offset = 40K
size = 1M # 1MB - 40K
}
partition boot {
partition-type = 0xC
bootable = "true"
image = "boot.vfat"
}
partition rootfs {
partition-type = 0x83
image = "rootfs.squashfs"
}
partition overlay {
partition-type = 0x83
size = 16000M
}
}
overlay 大小可以指定比TF卡大小大,第一次开机文件系统重建会校准
3. 内核支持
CONFIG_SQUASHFS=y
CONFIG_SQUASHFS_FILE_CACHE=y
# CONFIG_SQUASHFS_FILE_DIRECT is not set
CONFIG_SQUASHFS_DECOMP_SINGLE=y
# CONFIG_SQUASHFS_DECOMP_MULTI is not set
# CONFIG_SQUASHFS_DECOMP_MULTI_PERCPU is not set
CONFIG_SQUASHFS_XATTR=y
CONFIG_SQUASHFS_ZLIB=y
# CONFIG_SQUASHFS_LZ4 is not set
# CONFIG_SQUASHFS_LZO is not set
# CONFIG_SQUASHFS_XZ is not set
# CONFIG_SQUASHFS_ZSTD is not set
# CONFIG_SQUASHFS_4K_DEVBLK_SIZE is not set
# CONFIG_SQUASHFS_EMBEDDED is not set
CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3
4. 重建文件系统
init_sys()
{
mount -n -t ext4 /dev/mmcblk0p3 -o rw,noatime /overlay
ret=$?
echo "ret:$ret"
if [ $ret -ne 0 ];then
echo "Start format /dev/mmcblk0p3"
mkfs.ext4 /dev/mmcblk0p3
mount -n -t ext4 /dev/mmcblk0p3 -o rw,noatime /overlay
echo "Format & mount /dev/mmcblk0p3 success"
fi
mkdir -p /overlay/upper /overlay/work
mount -n -t overlay overlayfs:/overlay -o rw,noatime,lowerdir=/,upperdir=/overlay/upper,workdir=/overlay/work /mnt
mount -n /proc -o noatime,--move /mnt/proc
pivot_root /mnt /mnt/rom
mount -n /rom/dev -o noatime,--move /dev
mount -n /rom/dev/shm -o noatime,--move /dev/shm
mount -n /rom/tmp -o noatime,--move /tmp
mount -n /rom/sys -o noatime,--move /sys
mount -n /rom/run -o noatime,--move /run
mount -n /rom/media -o noatime,--move /media
}
将以上shell命令做成脚本,放在文件系统下,比如叫/usr/bin/overlayfs,在/etc/inittab里面下添加
::sysinit:/usr/bin/overlayfs
默认文件系统要先创建/overlay和/rom两个目录
不足,这样做出来的固件确实比.ext4小了不少,但是不像openwrt的emmc固件那么简洁,后续再改进吧
https://github.com/aodzip/buildroot-tiny200
项目已经移动到这里继续开发,今天刚推送了128M全量镜像的烧录方法
楼主真给力
spi nand用的爽爽的,就是linux-5.4的otg支持还没弄好openwrt-sunxi-cortexa7v3sspinand-sun8i-v3s-licheepi-zero-spinand-ubifs-ubispinand_img.gz
在这里找找看有没有你的机型,自己调一个黑苹果出来也行,需要熟悉opencore/clover
https://github.com/daliansky/Hackintosh.git
首先分享一个v3s镜像打包脚本,从openwrt移植过来,把文件解压到v3s开发目录,指定内核路径,u-boot路径,buildroot路径(需要生成root.ext4),然后执行./build_img.sh,就会生成img固件,可以dd到tf卡,也可以通过图形化烧录工具etcher进行烧录,编译出来的固件一般默认文件系统大小为60M,烧录完成需要在板上运行resize2fs
packv3s_20200408-0126.zip
问题:
遇到一个这样的使用场景,需要将USB虚拟成网卡,并给电脑分配IP地址,进入强制门户认证,弹出网页。同时虚拟出一个U盘,可以在此读写文件,但是我用荔枝派4.14源码配置的时候找不到这样的组合,需要怎么实现
这个怎么玩?
首先要支持 cdc acm
USB Gadget Support --->
<*> USB Gadget functions configurable through configfs
* Abstract Control Model (CDC ACM)
* RNDIS
<*> USB Gadget precomposed configurations (CDC Composite Device (Ethernet and ACM)) --->
在/etc/inittab console::respawn:/sbin/getty -L console 0 vt100 # GENERIC_SERIAL下增加一条
ttyGS0::respawn:/sbin/getty -L ttyGS0 115200 vt100 # GENERIC_SERIAL
注ttyGS0就是USB虚拟出来的串口,我将USB复合成cdc acm + rndis设备,方便网络访问
这个 esp8089 驱动是你自己编译的吗,从哪里下载的?
https://github.com/al177/esp8089.git
这里有,我移植到f1c100s了,然鹅并没有什么卵用
页次: 1