contributed by < hankTaro
>
2020 年開發紀錄 / GitHub
2021 年開發紀錄 / GitHub
2022 年開發紀錄 / GitHub
vcam 測試記錄
$ make
make -C /lib/modules/5.19.0-40-generic/build M=/home/hank/linux2023/vcam modules
make[1]: 進入目錄「/usr/src/linux-headers-5.19.0-40-generic」
warning: the compiler differs from the one used to build the kernel
The kernel was built by: x86_64-linux-gnu-gcc (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0
You are using: gcc (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0
CC [M] /home/hank/linux2023/vcam/module.o
CC [M] /home/hank/linux2023/vcam/control.o
CC [M] /home/hank/linux2023/vcam/device.o
CC [M] /home/hank/linux2023/vcam/videobuf.o
CC [M] /home/hank/linux2023/vcam/fb.o
LD [M] /home/hank/linux2023/vcam/vcam.o
MODPOST /home/hank/linux2023/vcam/Module.symvers
CC [M] /home/hank/linux2023/vcam/vcam.mod.o
LD [M] /home/hank/linux2023/vcam/vcam.ko
BTF [M] /home/hank/linux2023/vcam/vcam.ko
Skipping BTF generation for /home/hank/linux2023/vcam/vcam.ko due to unavailability of vmlinux
make[1]: 離開目錄「/usr/src/linux-headers-5.19.0-40-generic」
cc -O2 -Wall -Wextra -pedantic -std=c99 -o vcam-util vcam-util.c
$ sudo fbset -fb /dev/fb0 --info
mode "1920x1080"
geometry 1920 1080 1920 1080 32
timings 0 0 0 0 0 0 0
accel true
rgba 8/16,8/8,8/0,0/0
endmode
Frame buffer device information:
Name : i915drmfb
Address : 0
Size : 8294400
Type : PACKED PIXELS
Visual : TRUECOLOR
XPanStep : 1
YPanStep : 1
YWrapStep : 0
LineLength : 7680
Accelerator : No
$ sudo fbset -fb /dev/fb1 --info
mode "640x480"
geometry 640 480 640 480 24
timings 0 0 0 0 0 0 0
rgba 8/0,8/8,8/16,0/0
endmode
Frame buffer device information:
Name : vcamfb
Address : 0xffffab79cf663000
Size : 921600
Type : PACKED PIXELS
Visual : TRUECOLOR
XPanStep : 1
YPanStep : 1
YWrapStep : 1
LineLength : 1920
Accelerator : No
$ vlc v4l2:///dev/video2
VLC media player 3.0.18 Vetinari (revision 3.0.18-0-ge9eceaed4d)
[000055ecee050a10] main libvlc: 以預設介面執行 VLC。使用「cvlc」指令以無介面方式執行 VLC。
Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
Qt: Session management error: Could not open network socket
[00007fb6d00010e0] v4l2 demux error: cannot open device '/dev/video2': Operation not permitted
[00007fb6d00010e0] v4l2 demux error: cannot open device '/dev/video2': Operation not permitted
[00007fb6d0002750] v4l2 stream error: cannot open device '/dev/video2': Operation not permitted
QObject::~QObject: Timers cannot be stopped from another thread
無法開啟您的輸入:
VLC 無法開啟 MRL「v4l2:///dev/video2」。詳細資訊請閱讀記錄檔。
B: A 你好 我是 B ,我是 自七七人的資深軟體工程師,我會給你一個題目,接著我們就可以開始了
Oct 15, 2023contributed by < hankTaro >
Apr 20, 2023contributed by < hankTaro > 想問老師的問題 :::warning 在 第 6 週測驗題 中的將除法轉換為乘法運算的方法,如何在除數為非 $2^n$ 的狀況下求出商以? 我能理解先求出 $M = 2^N/d$ 的概念,但在再用其與被除數相成後再向右位移 N 位,但在求出 M 的過程不就使用到除法了嗎,在有些硬體不支援除法運算符時,這項方法還有辦法實施嗎? 以及當除數沒有重複使用的狀況下,此方法是不是就顯得多此一舉? :::
Apr 11, 2023contributed by < hankTaro > 測驗 1 說明與改寫 此程式碼運用了大量巨集,因此在對巨集不夠熟悉的其況下會有判讀困難,所以這裡先對於巨集內的程式碼說明,至於將 color 利用對齊在 quiz 3 已有解釋,這邊便不多做解釋 #define rb_gen(x_attr, x_prefix, x_rbt_type, x_type, x_field, x_cmp) \ typedef struct { \ x_type *node; \ int cmp; \
Apr 8, 2023or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up