本文來源電子發(fā)燒友社區(qū),作者:jf_06445065, 帖子地址:https://bbs.elecfans.com/jishu_2291062_1_1.html
背景
因?yàn)槲冶救耸亲鲆粢曨l處理基礎(chǔ)技術(shù)的,所以通常拿到一塊板子后首先想到的是嘗試把視頻能力用起來,例如視頻的編碼,視頻的解碼,看一看編碼的畫質(zhì)如何,解碼性能如何,然后再進(jìn)行下一步。
既然要嘗試使用,那么首先就考慮裝一個(gè)操作系統(tǒng)吧,第一件事是參考說明文檔,去下載一個(gè)Fedora,然后刷到sd卡里面。
嘗試使用
根據(jù)說明文檔看,我下載的Fedora不可以直接刷到sd里面,因?yàn)樗母袷绞沁@樣的:
Fedora-riscv64-jh7100-developer-xfce-Rawhide-20211226-214100.n.0-sda.raw.zst
要先安裝一下zstd,然后
zstd Fedora-riscv64-jh7100-developer-xfce-Rawhide-20211226-214100.n.0-sda.raw.zst -o Fedora-riscv64-jh7100-developer-xfce-Rawhide-20211226-214100.n.0-sda.raw
然后用dd將Fedora-riscv64-jh7100-developer-xfce-Rawhide-20211226-214100.n.0-sda.raw寫到SD卡即可
插入sd卡以后,用USB type-c接口的電源線插到板子上上電,插入HDMI鏈接到顯示器,稍等一會就能夠看到Fedora的啟動界面,登錄提示頁面,按照手冊中寫的用戶名密碼輸入后即可進(jìn)入系統(tǒng)。
看一下系統(tǒng)的cpu信息
[riscv@fedora-starfive ~]$ cat //proc/cpuinfo
processor : 0
hart : 1
isa : rv64imafdc
mmu : sv39
uarch : sifive,u74-mc
processor : 1
hart : 0
isa : rv64imafdc
mmu : sv39
uarch : sifive,u74-mc```
還是個(gè)雙核。看板子的介紹是支持視頻編碼的
嘗試使用FFmpeg自動識別環(huán)境
但是手冊里面并未說明該如何跑起來,于是我嘗試用ffmpeg來跑一下。
[riscv@fedora-starfive ~]$ git clone git://source.ffmpeg.org/ffmpeg.git
正克隆到 'ffmpeg'...
remote: Enumerating objects: 666444, done.
remote: Counting objects: 100% (666444/666444), done.
remote: Compressing objects: 100% (130415/130415), done.
remote: Total 666444 (delta 539474), reused 661607 (delta 534726)
接收對象中: 100% (666444/666444), 131.55 MiB | 58.00 KiB/s, 完成.
處理 delta 中: 100% (539474/539474), 完成.
正在更新文件: 100% (7781/7781), 完成.
[riscv@fedora-starfive ~]$ cd ffmpeg/
[riscv@fedora-starfive ffmpeg]$ ls
Changelog CONTRIBUTING.md COPYING.LGPLv2.1 doc INSTALL.md libavfilter libpostproc LICENSE.md presets tests
compat COPYING.GPLv2 COPYING.LGPLv3 ffbuild libavcodec libavformat libswresample MAINTAINERS README.md tools
configure COPYING.GPLv3 CREDITS fftools libavdevice libavutil libswscale Makefile RELEASE
[riscv@fedora-starfive ffmpeg]$ cd ..
[riscv@fedora-starfive ~]$ mkdir build_ffmpeg
[riscv@fedora-starfive ~]$ cd build_ffmpeg/
[riscv@fedora-starfive build_ffmpeg]$ ../ffmpeg/configure --disable-everything --enable-ffmpeg --enable-decoder=h264,mpeg4 --enable-hwaccels
install prefix /usr/local
source path src
C compiler gcc
C library glibc
ARCH riscv (generic)
big-endian no
runtime cpu detection yes
debug symbols yes
strip symbols yes
optimize for size no
optimizations yes
static yes
shared no
postprocessing support no
network support yes
threading support pthreads
safe bitstream reader yes
texi2html enabled no
perl enabled yes
pod2man enabled yes
makeinfo enabled yes
makeinfo supports HTML yes
xmllint enabled yes
External libraries:
alsa iconv libxcb_shape libxcb_xfixes zlib
bzlib libxcb libxcb_shm lzma
External libraries providing hardware acceleration:
cuda_llvm v4l2_m2m
Libraries:
avcodec avdevice avfilter avformat avutil swresample swscale
Programs:
ffmpeg ffprobe
Enabled decoders:
h263 h264 mpeg4
Enabled encoders:
Enabled hwaccels:
Enabled parsers:
h263 mpeg4video
Enabled demuxers:
Enabled muxers:
Enabled protocols:
Enabled filters:
aformat atrim hflip transpose vflip
anull format null trim
Enabled bsfs:
Enabled indevs:
Enabled outdevs:
License: LGPL version 2.1 or later
config_components.h is unchanged
libavutil/avconfig.h is unchanged
libavfilter/filter_list.c is unchanged
libavcodec/codec_list.c is unchanged
libavcodec/parser_list.c is unchanged
libavcodec/bsf_list.c is unchanged
libavformat/demuxer_list.c is unchanged
libavformat/muxer_list.c is unchanged
libavdevice/indev_list.c is unchanged
libavdevice/outdev_list.c is unchanged
libavformat/protocol_list.c is unchanged
ffbuild/config.sh is unchanged
后來經(jīng)過咨詢技術(shù)支持老師,給的反饋是需要自己重新buildroot,需要加載OMX相應(yīng)的模塊才能開啟硬件codec模塊。也就是說文檔里面提到的支持的音視頻處理相關(guān)的功能默認(rèn)是不支持的,需要自己重新DIY一下,starfive官方提供的Fedora默認(rèn)是用不起來的。
思考與總結(jié):
**既然文檔里面說支持了,至少BSP應(yīng)該是需要直接提供出來的,而不是讓用戶DIY
既然starfive的提供的開發(fā)板里面元器件都是固定的,提供的基礎(chǔ)能力都是固定的,擴(kuò)展接口也是固定的,完全可以提供一個(gè)開箱即用的操作系統(tǒng)而不是讓用戶拿到板子后再去琢磨怎么build一下支持上**
參考一下樹莓派的做法,最起碼的開箱即用
-
RISC-V
+關(guān)注
關(guān)注
48文章
2886瀏覽量
53026 -
賽昉科技
+關(guān)注
關(guān)注
3文章
181瀏覽量
15552
發(fā)布評論請先 登錄
賽昉科技2025:引領(lǐng)RISC-V駛?cè)霐?shù)據(jù)中心深水區(qū)
RISC-V實(shí)現(xiàn)數(shù)據(jù)中心應(yīng)用突破,賽昉科技BMC芯片重磅亮相
2025 RISC-V產(chǎn)業(yè)發(fā)展大會 | 賽昉科技全景展示規(guī)模化商用成果
賽昉科技重磅發(fā)布新產(chǎn)品,RISC-V實(shí)現(xiàn)數(shù)據(jù)中心規(guī)模化商用突破
【作品合集】賽昉科技VisionFive 2單板計(jì)算機(jī)開發(fā)板測評
5?款?RISC-V?單板計(jì)算機(jī)測試:性能、基準(zhǔn)測試、特性及見解
賽昉科技入駐RuyiSDK開發(fā)者社區(qū),雙平臺協(xié)同推進(jìn)RISC-V生態(tài)
賽昉科技徐滔:以精準(zhǔn)場景牽引,RISC-V搶灘數(shù)據(jù)中心百萬顆市場
賽昉科技聯(lián)合合見工軟實(shí)現(xiàn)國產(chǎn)一致性NoC IP與RISC-V核在大規(guī)模網(wǎng)絡(luò)中的適配
【VisionFive 2單板計(jì)算機(jī)試用體驗(yàn)】環(huán)境搭建與點(diǎn)燈實(shí)驗(yàn)
“核心技術(shù)突破+關(guān)鍵應(yīng)用支撐”,賽昉加速RISC-V生態(tài)突圍
【VisionFive 2單板計(jì)算機(jī)試用體驗(yàn)】VisionFive 2一個(gè)霸氣的游戲機(jī)
【VisionFive 2單板計(jì)算機(jī)試用體驗(yàn)】RISC-V架構(gòu)卡片計(jì)算機(jī)初體驗(yàn)
權(quán)威評測:Orange Pi RV2等5?款?RISC-V?單板計(jì)算機(jī)測試-性能、基準(zhǔn)測試、功能和見解
【賽昉科技昉·星光RISC-V單板計(jì)算機(jī)試用體驗(yàn)】FFmpeg環(huán)境測試
評論