Translations of this page?:

Yeeloong PMON Full User Guide

1 Introduction of PMON

This product uses PMON (Prom Monitor) as the basic input and output system (BIOS). There are a lot of features in PMON including hardware initialization, Operating System guide and hardware testing, program debugging, etc. It provides multiple ways to load Operating System (can be loaded via USB key, tftp server and hard-disk, etc.). It also provides basic testing tools for internal storage, Serial port, Monitor, Network, Hard-disk, etc. Besides, PMON has a built-in debugging device that can track every single step of loaded programs and set up breakpoint, etc. PMON also supports software upgrade.

2 PMON User Manual

2.1 PMON Start-up Flow

After connecting to the adapter, press the start button on the main board, the main board will start to operate. According to configuration of the environment variables of the ShowBootMenu, PMON start-up flow would be different. If the value of ShowBootMenu is “yes”, default hard-disk will search /boot.cfg or /boot/ boot.cfg:

  • if available, it will show relevant menu for users to select the starting kernel after reading contents.
  • if not available, check if “al” in the environment variables is set.
    • if “al” is set, operate the kernel with “al” setup instruction.
    • if “al” is not set, enter PMON console interface (or can always press <Del> to enter PMON console interface before reading boot.cfg.)

If ShowBootMenu doesn't exists or the value is not “yes” i.e. BootMenu doesn't work, PMON will automatically search /boot.cfg or /boot/boot.cfg

  • if found, it will automatically read the content instructed default starting index to operate the relevant kernel.
  • if not found, check if “al” in the environment variables is set.
    • if “al” is set, operate the kernel with “al” setup instruction.
    • if “al” is not set, enter PMON console interface (or can always press <Del> to enter PMON console interface before reading boot.cfg.)



2.1.1 Value of ShowBootMenu is Yes

In this situation, as explained earlier if Hard-disk exists /boot.cfg or /boot/boot.cfg, enter into the following interface (Picture 1).

Picture 1 BootMenu

As shown in Picture 1, when users don't process anything, PMON will automatically run the kernel with an arrow (i.e. “rays” in the picture) within an assigned period of time (29 sec from the picture). If user press <Enter>, PMON will load and enter into the selected kernel (i.e. “rays” in the picture). Use the arrow keys to select which kernel to load. Press <c> to enter into the PMON console. However, if users press any other keys that are not mentioned above, the Booting system in [*] second(s) will disappear and wait for users to use the arrow keys to select the kernel and press <Enter> to load and run.

boot.cfg file format will be introduced as below (explained by extracting a classic boot.cfg file content as an example):

timeout 30 
default 0 
showmenu 1 

title rays 
     kernel /dev/fs/ext2@wd0/boot/vmlinux 
     args console=tty root=/dev/hda1  

title debian 
     kernel /dev/fs/ext2@wd0g/boot/vmlinux-8.9 
     args console=tty root=/dev/hda7 

title rescue 
     kernel /dev/fs/ext2@wd0/boot/rescue 
     args console=tty 

Definition of each tag:
timeout: the value following timeout indicates the default system overtime duration, i.e. value of * in Booting system in [*] second(s)
default: the value following default indicates the system index of default start-up, 0 is the 1st one, the rest maybe deduced by analogy
showmenu: if it shows 1, BootMenu will be displayed while 0 is not
title: it's the name of appointed start-up kernel displayed in BootMenu
kernel: it's where the kernel of the corresponding title
args: it's some activation parameter passing to kernel when kernel starts

If boot.cfg doesn't exist (i.e. not inside root directory or /boot directory or simply doesn't exist), the system will show “The boot.cfg not existed!System will try default entry from al.”. Try to load the kernel appointed in al environment variable and run the kernel by conjugating the start-up parameter appointed by karg environment variable. Configuration of al and karg is as below:

 ① PMON>set  al  string ⇓

after setting al environment variable, if boot.cfg doesn't exist, PMON will automically load the kernel appointed by $al and run. “string” is the parameter of command “load”, e.g:

 set  al  [[mailto:ext2@wd0| /dev/fs/ext2@wd0/boot/vmlinux]] -2.6.22-7inch ⇓

will automatically load the 1st partition of the hard-disk /boot/vmlinux-2.6.22-7inch,and then run.

 ② PMON> set  karg  "argument  string"  ⇓

to set kernel parameter of the automatic start-up, e.g:

 set  karg  "console=tty1 root=/dev/hda1" ⇓

If al hasn't configured, or wrongly configured, system will go to PMON console, use command “load” to get into the hard-disk non-automatic start-up process, explained as below:

 ①PMON>load  [[mailto:ext2@wd0| /dev/fs/ext2@wd0/boot/vmlinux]] -2.6.22-7inch  ⇓

Through loading kernel in hard-disk, “ext2” indicates file system type of the hard-disk partition, “boot” indicates kernel path, “vmlinux-2.6.22-vmlinux” indicates kernel name. “wd0” indicates the 1st “ext2” partition, the rest maybe deduced by analogy. Notice: here only calculate the ext2 partition, i.e. partition name is wd0b, if the 3rd ext2 partition, partition name will be wd0c, the rest maybe deduced by analogy. Take an example, if we have four partitions, 1st is ext2 partition, 2nd is swap partition, 3rd is fat32 partition, 4th is ext2 partition. I.e. the 1st ext2 partition name is wd0a (wd0 is the short name), the 2nd ext2 partition (which is the 4th partition physically speaking) name is wd0b.

 ② PMON>g  console=tty  [root=/dev/hdaN]  ⇓

Start to run kernel, parameter of command “g” is the kernel command parameter. Default parameter is:

 console=tty1 root=/dev/hda1 

Of course, on top of hard-disk start-up process, there are two more ways to start-up (precondition: the situation mentioned earlier, neither boot.cfg or al exists or the set up is wrong, it will go to PMON console, or simply press <Del> to enter into the PMON console before reading boot.cfg or al.

1. tftp server start-up process:

 ① PMON>ifaddr  rtl0  xxx.xxx.xxx.xxx  ⇓

xxx.indicates the IP address, rtl0 indicates 8139 Ethernet Adapter e.g.

 PMON>ifaddr  rtl0  172.16.11.134  ⇓

This set up IP address temporarily and will be disappeared when system restart. To set up permanently please use ifconfig environment variable. e.g.

 PMON>set  ifconfig  rtl0:172.16.11.134 

It's to set the IP of this machine as 172.16.11.134. IP address should be varied according to your network environment, contact your network administrator if there is any problem.

 ② PMON>setmac  xx:xx:xx:xx:xx:xx    ⇓

Set up MAC address, xx:xx:xx:xx:xx:xx indicates the MAC address necessary to set up. e.g.

 PMON>setmac  00:23:2e:44:13:10{{wiki:graphics10}}    ⇓
 ③ PMON>load  tftp://xxx.xxx.xxx.xxx/vmlinux-2.6.22-7inch ⇓

xx:xx:xx:xx:xx:xx indicates the server IP address of where the kernel is, vmlinux-2.6.22-7inch is the kernel name needed to download, can be random, according to your tftp server's kernel name. Kernel usually is put in the tftp server /tftpboot directory

 ④ PMON>g  console=tty    ⇓

Same as above, it's to give command parameter to run kernel.

2. USB CD-ROM Driver Mounting Process

 ① PMON>load  /dev/fs/ext2@usb0/boot/vmlinux  ⇓ 
 ② PMON>g  console=tty    ⇓ 

PMON supports reading boot.cfg from USB-disk to select the running kernel, press <u> before system boot (i.e. before reading boot.cfg), PMON will search boot.cfg in the USB-disk instead of searching from the default hard-disk directory or under /boot.



2.1.2 ShowBootmenu hasn't set up or ShowBootMenu set up is not Yes:

In this situation, PMON will search boot.cfg from the root directory of hard-disk (wd0) or under /boot. But unlike when the set up of ShowBootMenu is set as Yes, BootMenu will not be displayed once boot.cfg is found, instead, it will read file's default tag value to run the kernel appointed by this index value by default. Similar to setting ShowBootMenu, if PMON cannot find boot.cfg or boot.cfg format is wrong, it will search whether al environment variable is set or not, if al exists with the right configuration, it will load the kernel appointed by al and run, otherwise, it will enter into PMON shell.



2.1.3 Possible Problems and Solutions

2.1.3.1 Cannot find boot.cfg or boot.cfg wrong format

Only support the root directory of hard-disk wd0 or search boot.cfg under /boot, put boot.cfg in either the two mentioned location. Boot.cfg format has two indications:

  1. spelling mistake e.g. defualt instead of default;
  2. if there is no spelling mistake, maybe the appointed kernel doesn't exist.

In this case users can follow boot.cfg format implication again and check / modify.

2.1.3.2 IP Address setup

Load by tftp server requires IP address, but IP address is not required if booting from hard-disk. If IP address is required, this address and tftp server's ip address should be in the same network segment. If IP address is not configured, when loading kernel on tftp server will appear “Can`t assign requested address” to remind you to set up IP address.

2.1.3.3 MAC Address Configuration

Use hexadecimal (0,1,2,3,4,5,6,7,8,9,a,b,c,d,e,f)to set the MAC address, leave the last two digits as “00” generally, others can be set freely. If the 1st setup is failed (notification will be given), try to change any one of the 10 digits to other number/letter.

2.1.3.4 Fail to Load Kernel

In case of booting by hard-disk or USB-disk, path maybe incorrect. If loading kernel from tftp server, IP or MAC address maybe incorrect, or unable to access tftp server (not in the same network segment or incorrect server configuration), maybe the appointed kernel on tftp server doesn't exist.

2.1.3.5 Unable to Run Operating System

Able to load kernel normally but unable to run the Operating System after running command “g”.
Case 1: Exception occurred, it is suggest to return to command line “pmon” or restart. Ensure the loading kernel is correct and command “load” is successfully complete, try to load again if necessary.
Case 2: No more reaction after typing a few lines, can be due to an error of loading kernel, or no appointed console=tty in kernel command line parameter, leading to bug inside the kernel or its output serial port device and crash.
Case 3: When kernel runs and ready to mount root file system, report problems like “root” device is not found, panic, etc. Ensure the root partition appointed by kernel command line parameter is correct, hard-disk partition is not damaged.
Case 4: error after init process execution, frequent problems include: fsck error or incorrect fstab content leading to unable to mount certain partition or time error leading to repeat fsck, etc, for more details please go to Debian Operating System relevant document.

2.2 PMON Basic Command Introduction

Under “PMON>” DOS Prompt, keyboard can be used to input command and use PMON features. When read command output, if output is more than 1 screen, press <space> to flip the page and <Enter> to skip the line.

1.”h” command to check all PMON command and its command explanation, “h” command format:

 PMON>h ⇓

If you want to check specified command and its description, insert “h” command under DOS Prompt of PMON command e.g. to check command “load” , format should be:

 PMON>h  load   ⇓

2. Command “load”: to download program and data (e.g. from hard-disk, USB-disk and tftp server to download kernel), upgrade PMON, support fat and ext2 file format. Command format is:

 PMON>load  [[mailto:ext2@wd0| /dev/fs/ext2@wd0/boot/vmlinux]] -2.6.22-7inch ⇓

3. Command “reboot”: Restart computer. Format:

 PMON>reboot ⇓

4. Command “date”: to check or set up time. Format:

 PMON>date  [yyyymmddhhmm.ss] ⇓

yyymmddhhmm.ss format is year, month, date, minute, second

5.Command “ifaddr” : to set up IP address. Format:

 PMON>ifaddr  rtl0  xxx.xxx.xxx.xxx    ⇓        

6. Command “ping”: to ensure whether local host machine can exchange data with other machine (both sending and receiving). Format:

 PMON>ping  xxx.xxx.xxx.xxx ⇓

7. Command “set” : to display and configure environment variable. Format:

 PMON>set ⇓ 

(If no parameter is added, you can check all the variable set up)

 PMON>set  al  string ⇓ 

(to set up PMON automatic start up variable)

 PMON>set  ifconfig  rtl0:xxx.xxx.xxx.xxx ⇓ 

(to set up IP address)

8. Command “unset”: cancel variable set up by command “set”. Format:

 PMON>unset  al   ⇓

9. Command “ifm”: configure network mode, select: auto、10Mbps and 100Mbps. Format:

 PMON>ifm  ⇓ 

(to check network mode)

 PMON>ifm auto ⇓ 

(to select network mode automatically)

 PMON>ifm 10 ⇓ 

(to select 10Mbps mode)

 PMON>ifm 100 ⇓ 

(to select 100Mbps mode)

10. Command “setmac”: to set up MAC address (MAC address indicates Media Access Control), if there is no parameter, it will check the current MAC address, this command will modify 8139 Ethernet Adapter and ROM content directly, will be effective once restart. Format:

 PMON>setmac  [xx:xx:xx:xx:xx:xx]  ⇓

11. Command “dir”: to check files / directory distribution of specific path.

 dir (wd0,0)/   

(to check the files / directory distribution of the 1st partition root directory of wd0 hard-disk)

 dir (usb0b,0)/boot 

(to check the file distribution of the 2nd partition /boot of USB-disk with 0 as serial number.)



2.3 PMON Upgrade

There are two ways to upgrade PMON if PMON saved on removable EEPROM chip of the main board:

(1) via dedicated programming unit to upgrade: remove EEPROM chip and put into the PMON image file burnt by programming unit. Remember to select the right chip model number when burning.

(2) software upgrade: use command “load” to complete. -r option on command “load” can load binary file, -f addr can load the content and burn in a specified location, it's usually 0xbfc00000 in main board.
Example:

 load  -r  -f  bfc00000  tftp://xx.xx.xx.xx/gzrom.bin   ⇓

Via network download and upgrade PMON, gzrom.bin is the upgrade PMON image. Similarly you can load via hard-disk, etc.

:!: Non-professionals are not suggested to upgrade PMON, upgrade fail will possibly lead to main board failed to start-up.



2.4 test Menu

If your main board has problem, you can manually input command for testing on the PMON's Command Shell.

 ① PMON>test  1 ⇓

Test CPU floating point number calculation: if CPU floating point units operate normally, the following output should be appeared:

 ② PMON>test  2 ⇓ 

Test Memory

 ③ PMON>test  4  ⇓   

Test network

Before testing network, you should configure the IP address, ensure network connection is normal. In this example, the fixed IP address is 192.168.2.231, hence it's necessary to add the same IP address on the subnet server, also remember to set up the main board IP addresss as 192.168.2.0 network segment.

Input command “test 4” is same as command “ping” during network testing, the following output will be resulted if the network is connected:

If the network connection has problem, output should be as below:

 ④ PMON>test  8  ⇓ 

test CPU frequency

After inputing such command, the CPU frequency will appear on the monitor as below (in which s输入该命令后,会在显示器上显示出CPU的频率,如下图(其中bus frequency is not accurate):

 ⑤ PMON>test  32  ⇓ 

test PCI equipment

When testing PCI equipment, if PCI equipment is normal, the monitor will display output like: each PCI's bus number, device number, function number, and PCI device adrress assignment.

 ⑥ PMON>test  64 ⇓  

test display

 ⑦ PMON>test  128           

test hard-disk

when there is no hard-disk, the output is:

begin  harddisk  test get  harddisk  info: 

can  not  found  harddisk 

press  <Enter>  to  continue  !!  

In normal situation, the output should be:


begin  harddisk  test 

get  harddisk  info: 

LBA,  xxxdMB,  xxxcyl,xxxhead,  xxxsec,  xxxsectors (xxx are numbers) 

start  harddisk  read  write  test 

…………… and then go through reading / writing test on the hard-disk

 ⑧  PMON>test  256 ⇓ 

test keyboard

Normally the output should be:

keyboard  test check  keyboard... ok 

test  kbd  leds 

………………….  

If testing failed, the output will be:

 keyboard  test check  keyboard... failed 
 ⑨  PMON>test  512{{wiki:graphics46}}   ⇓  

test serial port as below:

while testing, it will print a letter “a” on the serial port

 PMON>test  4096 ⇓ 

test all the options

By running this one command, it will run all the above 1 to 9 command and execute all the testing.

2.5 PMON Command List

GUI
gui start gui progress
Boot and Load
boot boot oload load memory from hostport
load load file
Misc
call call function devls list devices
flush flush caches reboot reboot system
poweroff power off system flash program flash memory
tr transparent mode
MyCmds
pnpr pnpr LDN(logic device NO) index pnpw pnpw LDN(logic device NO) index value
pcs select pci dev function d1 dump address byte
d2 dump address half world d4 dump address world
d8 dump address double word m1 modify address byte
m2 mofify address half world m4 modify address world
m8 modify address double word setvga set vga_available
writefb write fb setkbd set kbd_available
initkbd kbd_initialize tlbset tlbset viraddr phyaddr [-x]
cache cache [0 1] erase cache [0 1]
program cache [0 1] newmt new memory test
test hardware test serial hardware test
Debugger
c continue execution t trace (single step)
to trace (step over) db delete break point(s)
b set break point(s) g start execution (go)
sym define symbol ls list symbols
r display/set register l list (disassemble) memory
bt stack backtrace
Shell
more paginator h on-line help
sh command shell vers print version info
eval evaluate and print result stty set tty options
hi display command history date get/set date and time
about about PMON2000
Network
ifaddr Configure Network Interface ping ping remote host
Memory
m modify memory d display memory
compare compare memory to memory copy copy memory to memory
fill fill memory search search memory
mt simple memory test
Pci
pcicfg pci config space pciscan scan pci bus
memt
nmt Memory test wm write memory
space test
sread read memory sset modify memory
USB commands
usb general usb commands
cs5536 debug
rdmsr msr read test wrmsr msr write test
powerdebug for debug the power state of sm712 graphic kdecreg KB3310 EC reg read test
wrecreg KB3310 EC reg write test rdbat KB3310 smbus battery reg read test
rdfan KB3310 smbus fan reg read test xbiwr for debug write data to xbi interface of ec
xbird for debug read data from xbi interface ec testvideo for debug read data from xbi interface of ec
Realtek 8139
ifm Set 8139 interface mode setmac Set mac address into 8139 eeprom
reprom dump rtl8139 eprom content



2.6 PMON system recover function

Power on and switch on, the monitor will display as Picture 0-1. Press <Tab> and then enter the recover interface as shown in Picture 0-2.

2.6.1 Hard-disk Recovery

Press “W” to enter Keyboard recovery as Picture 1-1, hard-disk recovery system support HD version, but not SSD version. Hard disk recovery needs to download a system recovery file from a partition on the local hard disk, after running the file, enter into a system recovery prompt user interface, shown in Picture 1-2. Press “U” to upgrade system (support U storage upgrade system at the moment); press “R to enter the selection user interface of the recovery system shown in Picture 1-3.

  1. Press”1” to select configuration recovery.
  2. Press”2” to select main partition and configuration partition recovery.
  3. Press”3” to select system full recovery, including main partition, configuration partition and user partition. To choose this option, users may lose some data.
  4. Press”4” is for hard disk recovery system, same function as #3, but it will be different if using U storage recovery system.

Hard disk system recovery process: if you cannot find the system recovery file, prompt windows will pop up as shown in Picture 1-4.

Picture 1-1

Picture 1-2

Picture 1-3

Picture 1-4


2.6.2 USB Storage

After entering the user interface as shown in Picture 0-2, press “U” to start U storage system recovery. Prompt window will pop up as shown in Picture 2-1.

  • Press “R” to stop U storage system recovery and restart.
  • Press “C” to download system recovery file from U storage, run and enter into an user interface of system recovery as shown in Picture 1-2. Press “U” to read system file patch, upgrade system. Press “R” to start and enter into a selection interface of the system recovery as shown in Picture 2-3.
  1. Press”1” to select configuration recovery.
  2. Press”2” to select main partition and configuration partition recovery.
  3. Press”3” to select system full recovery, including main partition, configuration partition and user partition. *To choose this option, users may lose some data.*
  4. Press”4” to format the hard disk and other hidden partition on top of the whole system recovery.

During U storage recovery, if there is no device or no system recovery file at the U-storage, prompt interface will pop up as shown in Picture 2-2.

Picture 2-1

Picture 2-2

2.6.3 Server Recovery

Server recovery is suitable for users on LAN, need to develop tftp server and http server, we recommend personal user to use U storage recovery. After entering Picture 0-2 interface, press “V” to enter server recovery's configuration interface as shown in Picture 3-1.

Picture 3-1

  • Press “I” to enter local IP address configuration (as Picture 3-2) and configuration of tftp server IP address (as Picture 3-3), and then download the recovery file from tftp server and run. After running the file, Picture 1-2 interface will pop up, press “U” to upgrade system.
  • Press “R” to start and enter a system recovery selection interface (as Picture 1-3):
    1. Press “1” to select configuration partition recovery
    2. Press “2” to select main partition and configuration partition recovery
    3. Press “3” to to select system full recovery, including main partition, configuration partition and user partition. *To choose this option, users may lose some data.*
    4. Press”4” is the same as pressing “4” for server recovery

Press the key and confirm, enter the server IP address again (as Picture 3-4), go back and start to recover.

  1. Press”R” to restart system
  2. Press “S” : if you already configured local IP address and tftp server IP address and no need to further modify, you can press “S” directly and dowloand recovery file.

Remark: when setting up IP address, “back” key is not supported.

Picture 3-2

Picture 3-3

Picture 3-4



3 PMON Source Code Access

PMON source code can be accessed in dev.lemote.com, the source code version system is managed by git, hence you can get the source code by using git clone command. See below the command:

git clone git://dev.lemote.com/pmon.git

then users can develop a specified version of tag via “Checkout”, for details of git developers can visit git manual, here we recommend git_SCM_book.pdf.



4 PMON Programming Environment and its Configuration

1. Firstly, download cross compiling environment mips-elf.tar.gz from http://dev.lemote.com/code/pmon

2. Compress the downloaded mips-elf.tar.gz file to /usr/local/comp/ and use the following command:

 tar -xpf mips-elf.tar.gz -C / 

3. Configure Path and the command is as below:

 Export PATH=/usr/local/comp/mips-elf/gcc-2.95.3/bin/:$PATH 

4. Compile pmoncfg tool required to generate PMON configuration and the command is as below:

   cd pmon_dir 

   cd tools/pmoncfg 

   make  

   cp pmoncfg /usr/bin 

Remark: pmon_dir means the PMON source code located in the directory after clone from the server (mentioned in 1.3).

5. Run pmoncfg to configure PMON Bonito environment (pmoncfg will produce some help document and put in the directory: pmon_dir/Targets/dir_corresponding_to_your_target_hardware /compile
Remark: dir_corresponding_to_your_target_hardware means relevant file directory of hardware platform e.g. 8.9” laptop is Bonito2F7inch and the command is as below:

   cd pmon_dir 

   cd Targets/dir_corresponding_to_your_target_hardware/conf 

   pmoncf Bonito 

6. Compile and produce the necessary PMON images

   cd pmon_dir 

   cd zloader. dir_corresponding_to_your_target_hardware  

   make tgt=rom 

the result is in the zloader. dir_corresponding_to_your_target_hardware (for 8.9” laptop : zloader.2f7inch)directory produced default name as gzrom.bin PMON images.

Remarks:make tgt=? has three options:

  • rom: produce gzrom.bin file, and then burn to flash rom on main board (can be implemented by command “load” supported by PMON console on the main board, e.g. load -r -f bfc00000 tftp://172.16.0.30/gzrom.bin)
  • ram: produce gzram file, and then load it to run in the old PMON console, the difference between ram and rom is that it only be downloaded at internal stomage to run online, once the electricity is cut, the system will still load the old PMON images from flash rom and run on internal storage. It can prevent error leading to system unable to start normally when testing the new PMON hence it's impossible to continue to test otherwise you will need to burn and write PMON images to flash rom on main board.
  • sim: this option is not supported at the moment.



5 PMON Environment Variable

The function of PMON environment variable is to process configurable operation, e.g. start-up method configuration (auto / manual start-up), FTP server IP auto / manual configuration, descriptions of some frequent usages of environment configuration variable are as below:

al is to configure to boot kernel i.e. to point out which kernel to boot, e.g. /dev/fs/ext2@wd0/boot/vmlinux , the parameter means to appoint PMON startup number as wd0 hard-disk while the file format is ext2 (/boot folder of the 1st partition) and the name of the kernel document is vmlinux, the rest maybe deduced by analogy.

karg is to configure the parameter transmitting to kernel when the kernel starts e.g.”console=tty root=/dev/hda1”

ShowBootMenu the environment variable to switch on / off parameter, yes means that you need to display BootMenu so that users can read and select the kernel to run. If it is not yes or there is no parameter, it means to read the default kernel start-up on /boot/boot.cfg or boot.cfg. If the above boot.cfg doesn't exist, it will boot kernel appointed by al, if al is not configured, or wrongly configured, or doesn't exist, it will return to PMON console.

novga the environment variable to switch on / off parameter, if it exists, it will debug all the log and display on serial port. If it doesn't exist, it will display driver initialization and then debug log and display it on the monitor.

ifconfig the environment variable to configure tftp service automatically, e.g. rtl0:172.16.1.205



6 How to embed a picture into PMON

1.First, you should use 'load' command to write a picture into flash chip.
tftp method:

  load -r -f xxxxxxxx tftp:%%//%%ip_addr/picture.bmp.gz

USB-Disk method:

  load -r -f xxxxxxxx /dev/fs/ext2@usb0/path/picture.bmp.gz

Remark: xxxxxxxx is physical address, ip_addr is IP address, such as 172.16.0.30, path is file path, picture is the name of picture.

2.PMON display the picture by the video_display_bitmap function of fb/cfb_console.c file. the prototype of this function is video_display_bitmap(ulong bmp_image, int x, int y). The parameter, bmp_image, specifies the data address of picture's path, that is the xxxxxxxx above. The parameter, x, is x coordinate of the picture, and y is the y coordinate of the picture.

Let's taking the picture of PMON's Logo for example, picture: 448 x 224 x 8, bmp format.

First, compress this picture:

  gzip logo.bmp 

and next use 'load' command to write a picture into flash chip, the data address start from bfc60000.

  load -r -f bfc60000 tftp://ip_address/logo.bmp.gz 

then you can use video_display_bitmap()function to display this picture, e.g. video_display_bitmap(bfc60000,0,0), this means the picture will be displayed on the (0,0) coordinate of the screen.

Remark:

The Color Bit Depth of picture in PMON is 8bit(256), bmp format.

and if the picture's width and height should be 8 integral multiples, you will get better display effect.


Personal Tools