In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly explains "how to apply Fedora7 embedded system", interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Let's take you to learn "How to apply Fedora7 embedded system"!
Build and install miniGUI 1.6.2
First of all, you should prepare and download some compressed packages:
Development library: libminigui-str-1.6.2.tar.gz
Resource file: minigui-res-str-1.6.tar.gz
Sample program: mg-samples-str-1.6.2.tar.gz
It is recommended to run miniGUI program in qvfb, which is more convenient, qvfb download address:
http://www.minigui.com/downloads/dep-libs/qvfb-1.0.tar.gz
I am using Fedora 7 embedded system, so there may be differences between other systems and here, such as compilation errors, etc. This is related to the version of gcc, glibc. Encounter problems to solve problems, I am also after all kinds of difficulties to compile successfully, multi-search multi-thinking.
(1) Fedora 7 embedded system installation minigui-res-str-1.6.tar.gz: Resources used by MiniGUI, including basic fonts, icons, bitmaps, and mouse cursors.
Installation command:
[root@Fedora7]#tar -zxf minigui-res-str-1.6.tar.gz
[root@Fedora7]#cd minigui-res-str-1.6
[root@Fedora7]#make install
(2) Fedora 7 embedded system installation libminigui-str-1.6.2.tar.gz: MiniGUI library source code.
Decompression command:
[root@Fedora7]#tar -zxf libminigui-str-1.6.2.tar.gz
There is a bug here. After unpacking, go to libminigui-str-1.6.2/src/kernel and open the init.c file.
Delete or comment out the following lines
#ifdef __LINUX__
else {
pthread_kill_other_threads_np ();
}
#endif
Save exit and go back to/libminigui-str-1.6.2 and install:
[root@Fedora7]#cd libminigui-str-1.6.2
[root@Fedora7]#./ configure
[root@Fedora7]#make
[root@Fedora7]#make install
(3) Add libminigui to the library search path:
Go to/etc/ld.so.conf.d and create a minigui.conf, write/usr/local/lib
This can be done using the command:
[root@Fedora7]#echo /usr/local/lib > /etc/ld.so.conf.d/minigui.conf
(If you are not using Fedora 7 embedded system, there may not be/etc/ld.so.conf.d directory, only/etc/ld.so.conf, but the same effect, add/usr/local/lib at the end of this file)
(4)*** To flush the system shared library cache, load libminigui, you can use the command
[root@Fedora7]#ldconfig
This command takes more than ten seconds to execute. Wait patiently. Of course, you can restart the system without using the refresh command.
(5) Compile sample program
Extract and compile mg-smaples-str-1.6.2.tar.gz:
[root@Fedora7]#tar -zxf mg-smaples-str-1.6.2.tar.gz
[root@Fedora7]#./ configure
[root@Fedora7]#make
Configure minigui
Minigui has two operating modes in Linux: fbcon and qvfb.
fbcon:Frame Buffer Console
qvfb: Qt Virtual Frame Buffer
Look at the name to know that fbcon runs under the console, in this mode you can not open Linux X graphical interface, inconvenient to use. fbcon is a virtual console with a frame buffer, and minigui programs run in qvfb just as we run commands in Terminal under the graphical interface. I have tried both modes, and the detailed configuration is as follows:
(1) FBC mode
Open MiniGUI.cfg
[root@Fedora7]# gedit /usr/local/etc/MiniGUI.cfg
Note this paragraph:
[system]
# GAL engine
gal_engine=fbcon
# IAL engine
ial_engine=fbcon
mdev=/dev/mouse
mtype=IMPS2
gal_engine and ial_engine values should be set to fbcon, minigui installed after the default settings are like this, so you do not have to change. Note that the mouse settings, my Fedora7 mouse device file is not here/dev/mouse, but/dev/input/mouse, so I created a symbolic link to/dev/mouse
After the configuration file MiniGUI.cfg is done, you need to turn on the frame buffer support of the linux kernel. This is modified in the boot loader. I use the grub now ***. Modification method:
[root@Fedora7]# vim /boot/grub/menu.lst
Add a paragraph to menu.lst:
title MiniGUI 1.6.2
root(hd0,0)
kernel /vmlinuz-2.6.21-1.3194.fc7 ro root=/dev/VolGroup00/LogVol00 vga=0x0317 fb:on
initrd /initrd-2.6.21-1.3194.fc7.img
The root(hd0,0) and kernel, initrd sections here need to be filled in in combination with your own system and partition situation, the easiest way is to find a Linux startup item and change it, vga= 0x0317 fb:on behind the kernel item is to set the display resolution and turn on the frame buffer.
Display mode comparison table:
640x480800x6001024x7681280x1024
8 bit color 0x301 0x303 0x305 0x307
15 bit color 0x310 0x313 0x316 0x319
16 bit color 0x311 0x314 0x317 0x31 A
24 bit color 0x312 0x315 0x318 0x31 B
Restart the system Select title MiniGUI 1.6.2 in grub
After logging in, you can run mg-smaples-str-1.6.2/src, run a helloworld to try the effect, if there is no problem normal display window on all OK.
(2) qvfb mode
Unzip and install qvfb-1.0.tar.gz downloaded:
[root@Fedora7]# tar zxf qvfb-1.0.tar.gz
[root@Fedora7]# cd qvfb-1.0
[root@Fedora7]# ./ configure
[root@Fedora7]# make
[root@Fedora7]# make install
Open MiniGUI.cfg
[root@Fedora7]# gedit /usr/local/etc/MiniGUI.cfg
Note the paragraph:
[system]
# GAL engine
gal_engine=qvfb
# IAL engine
ial_engine=qvfb
mdev=/dev/mouse
mtype=IMPS2
[fbcon]
defaultmode=1024x768-16bpp
[qvfb]
defaultmode=640x480-16bpp
display=0
gal_engine and ial_engine values should be set to qvfb, minigui installation default setting is fbcon, so you have to change it. Also pay attention to the defaultmode in the [qvfb] paragraph, this is the display resolution and color depth you need to use, and the qvfb setting should be consistent with this, otherwise minigui will run or report an initialization failure error.
Then you can use qvfb to experience miniGUI:
[root@Fedora7]# qvfb &
Add the & symbol to make the shell return immediately after the qvfb process is opened, otherwise it will block the shell process, and you need to open another shell to run the minigui program. After qvfb runs, set the virtual display resolution in qvfb: File-->Configure. Note that the Size and Depth to be set are consistent with the resolution and color depth in MiniGUI.cfg.
qvfb set up after you can run mg-smaples-str-1.6.2/src example, run a helloworld try the effect, Good luck!
Install Chinese fonts
The new open source version Minigui 1.6.2 does not provide a Chinese font library, which can be borrowed from minigui-res-1.3.3.tar.gz.
Extract minigui-res-1.3.3.tar.gz Copy the font folder to/usr/local/lib/minigui/res/overwrite the original font file (*** or rename the previous backup to font-bak for later recovery)
Modify some paragraphs in MiniGUI.cfg as follows:
[systemfont]
font_number=6
font0=rbf-fixed-rrncnn-8-16-ISO8859-1
font1=*-fixed-rrncnn-*-16-GB2312
font2=*-Courier-rrncnn-*-16-GB2312
font3=*-SansSerif-rrncnn-*-16-GB2312
font4=*-Times-rrncnn-*-16-GB2312
font5=*-Helvetica-rrncnn-*-16-GB2312
default=0
wchar_def=1
fixed=1
caption=2
menu=3
control=3
[rawbitmapfonts]
font_number=4
name0=rbf-fixed-rrncnn-8-16-ISO8859-1
fontfile0=/usr/local/lib/minigui/res/font/8x16-iso8859-1.bin
name1=rbf-fixed-rrncnn-16-16-GB2312-0
fontfile1=/usr/local/lib/minigui/res/font/song-16-gb2312.bin
name2=rbf-fixed-rrncnn-6-12-ISO8859-1
fontfile2=/usr/local/lib/minigui/res/font/6x12-iso8859-1.bin
name3=rbf-fixed-rrncnn-12-12-GB2312-0
fontfile3=/usr/local/lib/minigui/res/font/song-12-gb2312.bin
At this point, I believe that everyone has a deeper understanding of "how to apply Fedora7 embedded system", may wish to actually operate it! Here is the website, more related content can enter the relevant channels for inquiry, pay attention to us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.