Linux compiles mplayer to play badapp and compiles fbv to load pictures (based on V3S)
1. Preparation before compilation:
1.linux5.10 kernel
2.2018.02bulidroot
3.v3s board
2.linux kernel configuration
1. Modify the device tree (under linux-5.10/arch/arm/boot/dts/)
1. Modify sun8i-v3s Add the following code to the location of the last dma of the dtsi file:
codec_analog: codec-analog@01c23000 { compatible = "allwinner,sun8i-v3s-codec-analog"; reg = <0x01c23000 0x4>; }; codec: codec@01c22c00 { #sound-dai-cells = <0>; compatible = "allwinner,sun8i-v3s-codec"; reg = <0x01c22c00 0x400>; interrupts = <GIC_SPI 29 IRQ_TYPE_LEVEL_HIGH>; clocks = <&ccu CLK_BUS_CODEC>, <&ccu CLK_AC_DIG>; clock-names = "apb", "codec"; resets = <&ccu RST_BUS_CODEC>; dmas = <&dma 15>, <&dma 15>; dma-names = "rx", "tx"; allwinner,codec-analog-controls = <&codec_analog>; status = "disabled"; };
2. Modify sun8i-v3s-licheepi-zero-dock DTS file
Add the following at the end:
&codec { allwinner,audio-routing = "Headphone", "HP", "Headphone", "HPCOM", "MIC1", "Mic", "Mic", "HBIAS"; status = "okay"; };
After modifying the equipment tree, it changes to:
3. Configure the devices in the Linux kernel:
Enter the kernel folder:
make ARCH=arm menuconfig
The configuration is as follows:
Enter sound card support and configure as follows:
Then enter the inverted canced linux
4. Compile kernel:
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- -j16 make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- -j16 INSTALL_MOD_PATH=out modules make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- -j16 INSTALL_MOD_PATH=out modules_install Compile device tree: make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- dtbs
2. Configure builderoot:
1. Configure mplayer, fbv and alsa packages as follows:
After entering builderoot:
make menuconfig
The configuration is as follows:
2. Compile the root file system
make If the package download fails, you can get the download link to windows After downloading (the version to be downloaded is the same as the one to be downloaded) Put buildroot of dl Under folder
4. Compile tinyalsa (if you are familiar with alsa configuration, you don't need to compile this one)
1. Download tinyalsa:
https://codeload.github.com/tinyalsa/tinyalsa/zip/refs/heads/master
2. Compile tinyalsa
set up gcc(use buildroot Cross compilation chain inside gcc) export CC=/home/book/lichee-pi/buildroot-2018.08.2/output/host/bin/arm-linux-gnueabihf-gcc Set the directory of generated files (it is recommended to create one under the initial directory) work (folder) export prefix=/home/book/lichee-pi/model/audio/tinyalsa-master/work export CROSS_COMPILE=arm-linux- make sudo make install
Finally, there is a bin folder in the work folder. Create an aduio folder for the files in it for easy use (it can also be called under the / usr/bin file of the board)
4. Burning
1. Format the root file system of sd card
2. zImage and sun8i-v3s-licheepi-zero-dock of linux kernel The DTB (device tree) is placed in the first fat16 directory.
3. Use sudo tar -xvf rootfs -C / the second ext4 block directory (df -h is usually the longest one in sdb2)
4. Put bad_ Put the avi file of apple into the root file directory, such as the root directory
5. Put the previous audio folder into the root directory
6. Check whether there is codec sound card in the startup information
5. Play badapp with mplayer
1. Set sound card
cd audio # store tinyalsa's folder
. / tinymix contents # to view the corresponding settings of the sound card
. / tinymix set 1 63 # set maximum sound
Turn on the microphone, etc
./tinymix set 2 1 1
./tinymix set 6 1 1
./tinymix set 7 1 1
./tinymix set 8 1 1
./tinymix set 9 1 1
./tinymix set 10 1 1
./tinymix set 11 1 1
Here you can write an automatic configuration by referring to wifi configuration
2. Play apple
mplayer bad_apple_30.avi -vo fbdev -ao oss -framedrop #vo is the setting screen. ao is the setting sound card. We use oss to simulate the sound card. We can use alsa. We can use pcm to suggest oss (tinycap (arecord) for recording and tinyplay (aplay) for playing music)
You can see the play:
6. Use fbv to open the picture
fbv love.jpg
M. N adjustable direction F can scale wxad picture moving direction.