页次: 1
Bootlin 很高兴地宣布在 Allwinner V3/V3s/S3 平台上发布了对 H.264 视频编码的 Linux 内核支持,以主线 Linux cedrus驱动程序(已支持解码)之上的一系列补丁的形式发布以及专用的用户空间测试工具。
GIT:
https://github.com/bootlin/linux/tree/cedrus/h264-encoding
https://github.com/bootlin/v4l2-cedrus-enc-test
看之前帖子也有相关的,大神们有最新的进展吗?
我用的8.1
下载freetype-2.10.0
./configure CC=arm-linux-gnueabihf-gcc --host=arm-linux --prefix=$PWD/library --with-zlib=no --with-png=no
make
make install
lvgl makefile -- 参照
FREERTYPE_DIR ?= ../freetype-2.10.0
FREERTYPE_INCDIR ?= ../freetype-2.10.0/library/include/freetype2
FREERTYPE_LINK ?= ../freetype-2.10.0/library/lib
CFLAGS ?= -O3 -g0 -I$(LVGL_DIR)/ -I$(MIXML_DIR)/ \
-I$(FREERTYPE_INCDIR)/ -I$(FREERTYPE_LINK)/ \
-I$(FFMPEG_INDIR)/ -I$(FFMPEG_LINK)/ \
-Wall -Wshadow -Wundef \
-Wno-unused-function \
-fno-strict-aliasing -Wno-error=cpp \
-Wno-error=pedantic \
-Wno-error=missing-prototypes -Wdouble-promotion -Wclobbered -Wdeprecated \
-Wempty-body -Wshift-negative-value -Wstack-usage=2048 -Wno-unused-value \
-Wuninitialized -Wmaybe-uninitialized \
-Wextra -Wno-unused-parameter -Wno-missing-field-initializers \
-Wtype-limits -Wsizeof-pointer-memaccess -Wno-format-nonliteral \
-Wpointer-arith -Wno-cast-qual -Wmissing-prototypes -Wunreachable-code \
-Wno-switch-default -Wreturn-type -Wmultichar -Wno-discarded-qualifiers \
-Wformat-security -Wno-ignored-qualifiers -Wno-sign-compare -O3
LDFLAGS ?= -lm -L$(FREERTYPE_LINK)/ -lfreetype \
-L$(FFMPEG_LINK)/ -lavformat -lavcodec -lavutil -lswscale -lm -lpthread
搞定了 谢谢大佬
&pio {
spi0_cs_pins: spi0_cs_pins {
pins = "PC2", "PB2";
function = "gpio_out";
};
};
&spi0 {
/ needed to avoid dtc warning /
#address-cells = <1>;
#size-cells = <0>;
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&spi0_pins &spi0_cs_pins>;
cs-gpios = <&pio 2 2 GPIO_ACTIVE_HIGH>, <&pio 1 2 GPIO_ACTIVE_HIGH>;
spi_nand: spi_nand@0 {
#address-cells = <1>;
#size-cells = <1>;
compatible = "spi-nand";
reg = <0x0>;
spi-max-frequency = <50000000>;
partition@0 {
label = "uboot";
reg = <0x0 0x100000>;
read-only;
};
partition@100000 {
label = "dtb";
reg = <0x100000 0x20000>;
read-only;
};
partition@120000 {
label = "kernel";
reg = <0x120000 0x800000>;
read-only;
};
partition@920000 {
label = "rootfs";
reg = <0x920000 0x79E0000>;
};
};
mb85rs256:mb85rs2mta@1 {
compatible = "jedec,spi-nor";
reg = <0x1>;
spi-max-frequency = <45000000>;
#address-cells = <1>;
#size-cells = <1>;
};
};
LOG
[ 0.853517] sun8i-v3s-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pc not found, using dummy regulator
[ 0.865110] spi-nand spi0.0: GigaDevice SPI NAND was found.
[ 0.870780] spi-nand spi0.0: 128 MiB, block size: 128 KiB, page size: 2048, OOB size: 128
[ 0.879806] 4 fixed-partitions partitions found on MTD device spi0.0
[ 0.886165] Creating 4 MTD partitions on "spi0.0":
[ 0.891040] 0x000000000000-0x000000100000 : "uboot"
[ 0.898358] 0x000000100000-0x000000120000 : "dtb"
[ 0.904275] 0x000000120000-0x000000920000 : "kernel"
[ 0.910170] random: fast init done
[ 0.929055] 0x000000920000-0x000008300000 : "rootfs"
[ 0.934131] mtd: partition "rootfs" extends beyond the end of device "spi0.0" -- size truncated to 0x76e0000
[ 1.081048] random: crng init done
[ 1.177381] m25p80 spi0.1: mb85rs2mta (256 Kbytes)
[ 1.183734] usbcore: registered new interface driver rndis_wlan
[ 1.190289] usbcore: registered new interface driver cdc_ether
[ 1.196164] usbcore: registered new interface driver rndis_host
[ 1.202158] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 1.208680] ehci-platform: EHCI generic platform driver
[ 1.214235] ehci-platform 1c1a000.usb: EHCI Host Controller
[ 1.219914] ehci-platform 1c1a000.usb: new USB bus registered, assigne
不废话
主线5.2.0 想挂个FRAM CS选的PB2
单独的FRAM 或者 单独的SPI NAND都是可以的,但是同时就是不行
DTS
&pio {
spi0_cs_pins: spi0_cs_pins {
pins = "PC2", "PB2";
function = "gpio_out";
};
};
&spi0 {
/* needed to avoid dtc warning */
#address-cells = <1>;
#size-cells = <0>;
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&spi0_pins &spi0_cs_pins>;
cs-gpios = <&pio 2 2 GPIO_ACTIVE_HIGH>, <&pio 1 2 GPIO_ACTIVE_HIGH>;
spi_nand: spi_nand@0 {
#address-cells = <1>;
#size-cells = <1>;
compatible = "spi-nand";
reg = <0>;
spi-max-frequency = <50000000>;
partition@0 {
label = "uboot";
reg = <0x0 0x100000>;
read-only;
};
partition@100000 {
label = "dtb";
reg = <0x100000 0x20000>;
read-only;
};
partition@120000 {
label = "kernel";
reg = <0x120000 0x800000>;
read-only;
};
partition@920000 {
label = "rootfs";
reg = <0x920000 0x79E0000>;
};
};
mb85rs256:mb85rs2mta@0 {
compatible = "jedec,spi-nor";
reg = <0x0>;
spi-max-frequency = <25000000>;
#address-cells = <1>;
#size-cells = <1>;
};
};
LOG:
0.791005] printk: console [ttyS0] enabled
[ 0.816903] 1c28800.serial: ttyS1 at MMIO 0x1c28800 (irq = 34, base_baud = 1500000) is a U6_16550A
[ 0.852444] sun8i-v3s-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pc not found, using dummy regulator
[ 0.864037] spi-nand spi0.0: GigaDevice SPI NAND was found.
[ 0.869702] spi-nand spi0.0: 128 MiB, block size: 128 KiB, page size: 2048, OOB size: 128
[ 0.878622] 4 fixed-partitions partitions found on MTD device spi0.0
[ 0.885073] Creating 4 MTD partitions on "spi0.0":
[ 0.889908] 0x000000000000-0x000000100000 : "uboot"
[ 0.897741] 0x000000100000-0x000000120000 : "dtb"
[ 0.903663] 0x000000120000-0x000000920000 : "kernel"
[ 0.909452] random: fast init done
[ 0.928650] 0x000000920000-0x000008300000 : "rootfs"
[ 0.933722] mtd: partition "rootfs" extends beyond the end of device "spi0.0" -- size truncated to 0x76e0000
[ 1.081055] random: crng init done
[ 1.177988] sun6i-spi 1c68000.spi: chipselect 0 already in use
[ 1.183898] spi_master spi0: spi_device register error /soc/spi@1c68000/mb85rs2mta@0
[ 1.191667] spi_master spi0: Failed to create SPI device for /soc/spi@1c68000/mb85rs2mta@0
@zhang235hai
我刚刚也试了试,确实一样的错
解决了
楼主这句话:
修改arch/arm/mach-sunxi/Makefile,添加obj-$(CONFIG_SPL_SPINAND_SUNXI) += spl_spinand_sunxi.o
修改下
修改arch/arm/mach-sunxi/Makefile,
在
ifdef CONFIG_SPL_BUILD
里添加
obj-$(CONFIG_SPL_SPINAND_SUNXI) += spl_spinand_sunxi.o
示例
# SPDX-License-Identifier: GPL-2.0+
#
# (C) Copyright 2012 Henrik Nordstrom <henrik@henriknordstrom.net>
#
# Based on some other Makefile
# (C) Copyright 2000-2003
# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
obj-y += board.o
obj-y += clock.o
obj-y += cpu_info.o
obj-y += dram_helpers.o
obj-y += pinmux.o
obj-$(CONFIG_SUN6I_PRCM) += prcm.o
obj-$(CONFIG_AXP_PMIC_BUS) += pmic_bus.o
obj-$(CONFIG_MACH_SUNIV) += clock_sun6i.o
obj-$(CONFIG_MACH_SUN4I) += clock_sun4i.o
obj-$(CONFIG_MACH_SUN5I) += clock_sun4i.o
obj-$(CONFIG_MACH_SUN6I) += clock_sun6i.o
obj-$(CONFIG_MACH_SUN7I) += clock_sun4i.o
obj-$(CONFIG_MACH_SUN50I) += clock_sun6i.o
ifdef CONFIG_MACH_SUN8I_A83T
obj-y += clock_sun8i_a83t.o
else
obj-$(CONFIG_MACH_SUN8I) += clock_sun6i.o
endif
obj-$(CONFIG_MACH_SUN9I) += clock_sun9i.o gtbus_sun9i.o
obj-$(CONFIG_SUN50I_GEN_H6) += clock_sun50i_h6.o
ifndef CONFIG_ARM64
obj-y += timer.o
endif
ifdef CONFIG_SPL_BUILD
obj-$(CONFIG_MACH_SUNIV) += dram_suniv.o
obj-$(CONFIG_DRAM_SUN4I) += dram_sun4i.o
obj-$(CONFIG_DRAM_SUN6I) += dram_sun6i.o
obj-$(CONFIG_DRAM_SUN8I_A23) += dram_sun8i_a23.o
obj-$(CONFIG_DRAM_SUN8I_A33) += dram_sun8i_a33.o
obj-$(CONFIG_DRAM_SUN8I_A83T) += dram_sun8i_a83t.o
obj-$(CONFIG_DRAM_SUN9I) += dram_sun9i.o
obj-$(CONFIG_SPL_SPI_SUNXI) += spl_spi_sunxi.o
obj-$(CONFIG_SUNXI_DRAM_DW) += dram_sunxi_dw.o
obj-$(CONFIG_SUNXI_DRAM_DW) += dram_timings/
obj-$(CONFIG_DRAM_SUN50I_H6) += dram_sun50i_h6.o
obj-$(CONFIG_DRAM_SUN50I_H6) += dram_timings/
obj-$(CONFIG_DRAM_SUN50I_H616) += dram_sun50i_h616.o
obj-$(CONFIG_DRAM_SUN50I_H616) += dram_timings/
obj-$(CONFIG_SPL_SPINAND_SUNXI) += spl_spinand_sunxi.o
endif
我又换成了buildroot 2020.08.3 (还保留了bellagio),主线linux5.2,移植了libcedar
# ls /dev/
bus/ ptys7 tty36 ttyr8
cec0 ptys8 tty37 ttyr9
cec1 ptys9 tty38 ttyra
cedar_dev ptysa tty39 ttyrb
console ptysb tty4 ttyrc
cpu_dma_latency ptysc tty40 ttyrd
fb0 ptysd tty41 ttyre
fd/ ptyse tty42 ttyrf
full ptysf tty43 ttys0
gpiochip0 ptyt0 tty44 ttys1
i2c-0 ptyt1 tty45 ttys2
ion ptyt2 tty46 ttys3
kmsg ptyt3 tty47 ttys4
log ptyt4 tty48 ttys5
media0 ptyt5 tty49 ttys6
media1 ptyt6 tty5 ttys7
# gst-launch-1.0 filesrc location=/root/h2demo.mp4 ! qtdemux ! h264parse ! omxh2
64dec ! autovideoconvert ! fbdevsink
WARNING: erroneous pipeline: no element "h264parse"
# gst-inspect-1.0 --gst-debug-level=4 h264parse
0:00:00.003252875 175 0x3ce80 INFO GST_INIT gstmessage.c:128:_priv_gst_message_initialize: init messages
0:00:00.007057209 175 0x3ce80 INFO GST_INIT gstcontext.c:84:_priv_gst_context_initialize: init contexts
0:00:00.008619625 175 0x3ce80 INFO GST_PLUGIN_LOADING gstplugin.c:318:_priv_gst_plugin_initialize: registering 0 static plugins
0:00:00.009887167 175 0x3ce80 INFO GST_PLUGIN_LOADING gstplugin.c:226:gst_plugin_register_static: registered static plugin "staticelements"
0:00:00.010048917 175 0x3ce80 INFO GST_PLUGIN_LOADING gstplugin.c:228:gst_plugin_register_static: added static plugin "staticelements", result: 1
0:00:00.010163542 175 0x3ce80 INFO GST_REGISTRY gstregistry.c:1720:ensure_current_registry: reading registry cache: /root/.cache/gstreamer-1.0/registry.cortex-a7.bin
0:00:00.027715000 175 0x3ce80 INFO GST_REGISTRY gstregistrybinary.c:621:priv_gst_registry_binary_read_cache: loaded /root/.cache/gstreamer-1.0/registry.cortex-a7.bin in 0.017286 seconds
0:00:00.028062625 175 0x3ce80 INFO GST_REGISTRY gstregistry.c:1579:scan_and_update_registry: Validating plugins from registry cache: /root/.cache/gstreamer-1.0/registry.cortex-a7.bin
0:00:00.029380834 175 0x3ce80 INFO GST_REGISTRY gstregistry.c:1678:scan_and_update_registry: Registry cache has not changed
0:00:00.029535042 175 0x3ce80 INFO GST_REGISTRY gstregistry.c:1755:ensure_current_registry: registry reading and updating done, result = 1
0:00:00.029615750 175 0x3ce80 INFO GST_INIT gst.c:806:init_post: GLib runtime version: 2.64.4
0:00:00.029683709 175 0x3ce80 INFO GST_INIT gst.c:808:init_post: GLib headers version: 2.64.4
0:00:00.029729792 175 0x3ce80 INFO GST_INIT gst.c:810:init_post: initialized GStreamer successfully
请问大佬啥原因?
我目前用的v3s,可能沒有開啓硬解碼,lvgl8+ffmpeg
參數:
./configure --enable-cross-compile --cross-prefix=arm-linux-gnueabihf- --arch=arm --target-os=linux --prefix=$PWD/library --disable-all --disable-autodetect --disable-podpages --disable-asm --enable-shared --disable-static --disable-ffmpeg --disable-ffplay --disable-ffprobe --disable-doc --enable-avcodec --enable-avformat --enable-decoders --enable-encoders --enable-demuxers --enable-parsers --enable-protocol='file' --enable-swscale --disable-zlib
lvgl
-lavformat -lavcodec -lavutil -lswscale -lm -lpthread
void lv_example_ffmpeg(void)
{
lv_obj_t * player = lv_ffmpeg_player_create(lv_scr_act());
lv_ffmpeg_player_set_src(player, "/root/h2demo.mp4");
lv_ffmpeg_player_set_auto_restart(player, true);
lv_ffmpeg_player_set_cmd(player, LV_FFMPEG_PLAYER_CMD_START);
lv_obj_center(player);
}
加載的240X400 mp4 h.264 30fps特別卡,cpu 95%
github下载好慢,而且还会断。有没有从百度网盘下载的链接?
git clone https://github.com/xxx.git
改成:
git clone https://github.com.cnpmjs.org/xxx.git
试试这个。
页次: 1