为了要做图形学的作业,又不想用windows,研究了一下framebuffer。大牛们的文章都很棒,我就不献丑了,整理一下资料:
Framebuffer原理、使用、测试系列文章
此文作为讲原理的文章还是相当到位的,对内核中framebuffer的结构有了一定的了解,但是这上面的代码却非常令人费解,完全没有注释。
Examples(English)
代码入门(中文版)
这个链接里面的代码注释非常棒,而且由浅入深,一下子就看懂了。
有了上面两篇文章framebuffer基本上都会用了,其他的也还不错,可以参考一下:
Framebuffer 画点,画线,画多边形,画圆
Framebuffer HOWTO
2010年5月10日星期一
2010年5月9日星期日
First time blinking LED
I try for several days, and successful killed pre-installed WinCE in my board and blinked my LED. This was really exciting. And it should be the beginning of happiness. So I want to make a memo to remember this great time.
To make jtag work on Linux your need nothing to do. But if you want to make it work under Windows you need to install the device driver by copying the jtag.sys into the system32 dir and install it under the control panel.
The next thing need to mention is to setup the arm-linux-gcc. Just copy the whole directory of arm-linux-gcc under the /usr/arm directory. And export the environment as:
$ export PATH = $PATH:/usr/arm/gcc-3.4.5-glibc-2.3.6/bin
And change the /etc/environment file into
PATH=”/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/arm/gcc-3.4.5-glibc-2.3.6/bin”
Then I just use the example the book gived me, and write a Makefile and make.
That was easy. However, I got some problems write the program to the NAND flash on my board. Later I figure out that. I got “K9F1G08” on my board which is not support by SJF2440. So I have to switch my work to Windows. With “H-JTAG” I use the config file “hfc”, it gives me as an example. Just have to change the “K9F1208” into “K9F1G08”. The most horrible thing is the “H-JTAG” call “program” when he referred burn or download to NAND FLASH. That mislead me, and waste me a lot of time. Download it and earse it immediately. SILLY.
However still did not understand how the initscript works, waiting for answers from my Mentor now.
To make jtag work on Linux your need nothing to do. But if you want to make it work under Windows you need to install the device driver by copying the jtag.sys into the system32 dir and install it under the control panel.
The next thing need to mention is to setup the arm-linux-gcc. Just copy the whole directory of arm-linux-gcc under the /usr/arm directory. And export the environment as:
$ export PATH = $PATH:/usr/arm/gcc-3.4.5-glibc-2.3.6/bin
And change the /etc/environment file into
PATH=”/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/arm/gcc-3.4.5-glibc-2.3.6/bin”
Then I just use the example the book gived me, and write a Makefile and make.
That was easy. However, I got some problems write the program to the NAND flash on my board. Later I figure out that. I got “K9F1G08” on my board which is not support by SJF2440. So I have to switch my work to Windows. With “H-JTAG” I use the config file “hfc”, it gives me as an example. Just have to change the “K9F1208” into “K9F1G08”. The most horrible thing is the “H-JTAG” call “program” when he referred burn or download to NAND FLASH. That mislead me, and waste me a lot of time. Download it and earse it immediately. SILLY.
However still did not understand how the initscript works, waiting for answers from my Mentor now.
MBR analysis
A master boot record (MBR), or partition sector, is the 512-byte boot sector that is the first sector ("LBA Sector 0") of a partitioned data storage device such as a hard disk.
----Wikipedia
00 ~ 1BD 446byte boot code area
1BE ~ 1CD 16 byte partition 1
1CE ~ 1DD 16 byte partition 2
1DE ~ 1ED 16 byte partiion 3
1EE ~ 1FD 16 byte partition 4
1FE ~ 1FF 2 byte sigatur(55AA)
1. That's why there is only 4 physical partition.
2. The sigatur must be 55AA, otherwise the MBR is not available.
In 1BE ~ 1CD,
00~00 0x80 -- bootable 0x00 -- otherwise
01~03 CHS start address
04~04 partition type (83--linux 82--linux swap)
05~07 CHS end address
08~0B LBA start
0C~0F sector number
That's why there is only
----Wikipedia
00 ~ 1BD 446byte boot code area
1BE ~ 1CD 16 byte partition 1
1CE ~ 1DD 16 byte partition 2
1DE ~ 1ED 16 byte partiion 3
1EE ~ 1FD 16 byte partition 4
1FE ~ 1FF 2 byte sigatur(55AA)
1. That's why there is only 4 physical partition.
2. The sigatur must be 55AA, otherwise the MBR is not available.
In 1BE ~ 1CD,
00~00 0x80 -- bootable 0x00 -- otherwise
01~03 CHS start address
04~04 partition type (83--linux 82--linux swap)
05~07 CHS end address
08~0B LBA start
0C~0F sector number
That's why there is only
Daemonize
a daemon (pronounced /ˈdeɪmən/ or /ˈdiːmən/)[1] is a computer program that runs in the background, rather than under the direct control of a user; they are usually initiated as background processes.
In a Unix environment, the parent process of a daemon is often (but not always) the init process (PID=1). Processes usually become daemons by forking a child process and then having their parent process immediately exit, thus causing init to adopt the child process.
Example of Daemonize
http://www.itp.uzh.ch/~dpotter/howto/daemonize
In a Unix environment, the parent process of a daemon is often (but not always) the init process (PID=1). Processes usually become daemons by forking a child process and then having their parent process immediately exit, thus causing init to adopt the child process.
Example of Daemonize
http://www.itp.uzh.ch/~dpotter/howto/daemonize
Can't create hard links as you want
In Unix like system, it's not possible for your create a hard link everywhere you like. For example, hard links cannot be created between directories. Also, they cannot be created between files in different filesystems.
That means if there is a file "/home/xxx/hello", you can't just create a hard link in /boot or /tmp, if you separate /home as a solo tree.
because that confuse the OS,
reference: http://www.cyberciti.biz/tips/why-isnt-it-possible-to-create-hard-links-across-file-system-boundaries.html
That means if there is a file "/home/xxx/hello", you can't just create a hard link in /boot or /tmp, if you separate /home as a solo tree.
because that confuse the OS,
[freakrobot@acm lisp]$ ln /home/freakrobot/Code/lisp/dbmanage.lisp /boot
ln: creating hard link `/boot/dbmanage.lisp' => `/home/freakrobot/Code/lisp/dbmanage.lisp': Invalid cross-device link
reference: http://www.cyberciti.biz/tips/why-isnt-it-possible-to-create-hard-links-across-file-system-boundaries.html
订阅:
博文 (Atom)
