2008-01-31

Petition to ABC for Linux plug-in of online video streaming service "full episodes"

by Forrest Sheng Bao http://fsbao.net
(Digg it: http://digg.com/linux_unix/Petition_to_ABC_for_Linux_plug_in_of_online_video_streaming)

My friend, do you use Linux? And you also wanna watch ABC's TV show, such as Lost, for free, legally? So, post your petitions online and provide feedback to ABC via their web form. Let them hear our voice. BBC has begun to carry out Firefox video streaming plug-in for Linux user. Now it the time to ask ABC.

1) Sign this petition: http://www.ipetitions.com/petition/LinuxABC

2) Leave your voice at ABC feedback form http://dynamic.abc.go.com/streaming/feedback

Put stuff like this in their feedback form:

Dear ABC,

I like your TV shows and I like enjoying them for free via "full episodes", legally. But as a Linux fan, I hope ABC can develop plug-in for Linux ASAP. Though Linux share on desktop computers is not as high as Windows, there are still a lot of people using Linux. (Just see how many Dell's Linux laptops or Asus's Eee PCs have been sold.) We all like ABC and hope ABC won't abandon us.

Now BBC has begun to carry out Firefox video streaming plug-in for Linux user, as well as other support to Linux. We think that both of us don't wanna see that we are "forced" to watch the video not of ABC.

Cheers,
Forrest

2008-01-23

Strong AI stalls?

by Forrest Sheng Bao http://fsbao.net

(I am very foolish and naive. So there will be tons of errors in this article. Welcome to figure them out to me.)

Last Xmas(2007), my sister Christina Zhang came from Canada to see me (coz Texas is warmer). She asked me what Artificial Intelligence is. It's fairly hard to explain AI to a high school student. But I think at least I don't understand AI well enough to explain to a kid instantly.

Today I got my textbook "Elements of the theory of computation" whose cover is a famous (I prefer to use the word I created, ZB) guy, Alan Turing. So I went to Wikipedia again and read his introduction which has been read by me many times. I surfed from one link to another and found a paper.

In 1980, a guy in UC Berkeley, John Searle, published a paper titled:
"Minds, Brains and Programs" on the journal "Behavioral and Brain Sciences"
http://www.bbsonline.org/Preprints/OldArchive/bbs.searle2.html

He defined two terms, "strong AI" and "weak/cautious AI".

To "weak AI", he said: "According to weak AI, the principal value of the computer in the study of the mind is that it gives us a very powerful tool. For example, it enables us to formulate and test hypotheses in a more rigorous and precise fashion."

To "strong AI", he said: "But according to strong AI, the computer is not merely a tool in the study of the mind; rather, the appropriately programmed computer really is a mind, in the sense that computers given the right programs can be literally said to understand and have other cognitive states."

In my words, automated reasoning and problem solving are among the fields of "strong AI". Looks like the works of John McCarthy decades ago on puzzle solving. "weak AI" considers that it is not possible to build a precise human mind but an optimized/approximated one. It is more popular now and rapidly developing, such as pattern recognition, computer vision, etc.

I saw a review, stating that strong AI stalls now (or develops very slowly) while weak AI has many widely credited applicable results. Yeah, it's true. Lots of laptops nowadays are equipped by a finger print recognition system.

I was shocked. This matches my feeling when I first joined KRLab(Knowledge Representation Lab). But the problem is, the requirements to planning and scheduling from industries are growing, such as airports or NASA. So it is funny. The world needs faster reasoning agents while we can't build them. For instance, it takes 30 years for John McCarthy to figure out the idea of "default." (According to Dr. Gelfond's slides of "Intelligent System"). It also took many years for us to distinguish the concepts default negation and true negation (Gelfond & Lifschitz).

You know LISP? You know Prolog? A long time ago... Of course, 50 years are not long to the history, but long enough to Computer Science.

Why? Do we need a new theory of computation? Do we need the next Alan Turing?

Now the basis of strong AI is from logic, precisely, the non-monotonic logic. The famous language Prolog stands for "Programming in Logic." That's why someone considered that the foundation of AI was formed when Aristotle concluded how human beings think on mountains of Greece. What I wonder is, whether this idea is correct.

Besides, strong AI costs much time on knowledge representation. But this is a tough work. It's hard to represent a container, a closed container, a container with a lip.

Can someone give me an answer, why strong AI stalls? What is the crack to the next revolution?

I need to figure this out before choosing the title of my Ph.D. dissertation.

2008-01-20

Salute to Martin Luther King, Jr.

by Forrest Sheng Bao http://fsbao.net

"Let freedom ring. And when this happens, and when we allow freedom ring—when we let it ring from every village and every hamlet, from every state and every city, we will be able to speed up that day when all of God's children—black men and white men, Jews and Gentiles, Protestants and Catholics—will be able to join hands and sing in the words of the old Negro spiritual: "Free at last! Free at last! Thank God Almighty, we are free at last!" - Martin Luther King, I have a dream

"E Plurbus Unum" (Out of Many, One!) - The words on every coin of US

Tomorrow, is the Martin Luther King Day. There are many holidays in United States named by a people, such as the Washington Day and the Columbus Day, they are all important guys to this country. So is Martin Luther King, Jr.

I like Martin Luther King Day, not because I don't need to go to classes tomorrow, but because I admire his work on the creed of this nation, that all man are created equal and equally have the unalienable right on the pursuit of happiness. I can't agree with him any more.

I like Martin Luther King, not only on the Martin Luther King Day, but also when watching the movie about the Declaration of Independence, such as "The Pursuit of Happyness" or "National Treasure". I told myself, the real national treasure of this nation is the belief to freedom and equality.

He lives in my heart forever. Everything about racial equality reminds me about him. When I became a research assistant of Texas Tech, I was required to sign a form and attend a class about equal opportunity. I recalled his name in my mind again and again and again. He caved the belief of equality and freedom into every American. It is because the American Civil Rights Movement, you can see such sentences on this land "We are an equal opportunity employer", "We are an equal opportunity lender", "We are an equal opportunity school" etc.

So, I don't wanna say any more. One just need to read, or listen, or watch the video of his "I have a dream" again, then can have the feeling to memory him. And this is a naturally-inspired feeling.

May God bless you and may God take care of his Promised Land where freedom rings.

Here are something about "I have a dream":
Video at YouTube: http://youtube.com/watch?v=PbUtL_0vAJk
Full text at U.S. Department of State: http://usinfo.state.gov/infousa/government/overview/38.html

2008-01-18

Compositions I like

by Forrest Sheng Bao http://fsbao.net

Chinese origin in 2006-12-27

There are two major reasons I study German. One is the advanced technology of Germany. The other is the music, both pop and classic, in Germany and Austria.

I like music. Generally, I am a choosy pop music fan, also a choosy classic music fan- that I need musics to make me excited.

I don't like most pop songs that young people like. Most pop song nowadays are garbage, meaningless, art-free, and lacking of humor sense. BTW, I hate many pussy pop musics from China mainland, Taiwan, Hong Kong, or even Korean and Japan, about love between boys and girls, some stuff like that.

If you wanna make me love one pop song, either the lyric is fun, or the rhythmic is fun. I prefer many German bands. I can work fast when hearing the heavy mental melody, just as soldiers are brave when hearing the marches. The two ones I like the most are Amerika (America) by Rammstein and Deustchland (Germany) by Die Prinzen (The Prince). For example, Amerika is quite humorous. It wanna represent the fact that we all live in America coz the entire world is now effected by the United States. So one scene is that band members are surrounding a box, maybe a piano, on which there is a poster of Star Trek, a famous US Sci-Fi TV shows.

PS: Funny, the titles of these two songs are the name of the two countries speaking the only two languages that I can understand beyond my native language, Chinese.

Since there are not enough pop music that I like to listen, in most of the time, I listen to classic musics. Mozart, Beethoven and Dvořák are composers I like the most. The Eine Kleine nachtmusik of Mozart ("A little night music", Serenade for strings in G major), The 5 Symphony of Beethoven(famous for the four-note "short-short-short-long" motif twice, lkisten) and "From the New World" of Dvořák (Symphony No. 9, in E Minor, named because Dvořák composed in United States, the new world to Europe), are three symphonies most frequently played on my computer. I like these compositions for their melody make me full of energy, so that I am not tired any more.

There are another two composers, not that "classic" I don't know how to classify their works. One is the Greece composer Yanni. The other is the "March King" John Sousa.

I knew Yanni from the MP3 player of a friend, Lavi Chen, in Pennsylvania State University. I heard the Santorini (listen) , one of Yanni's most famous work, from his MP3 player. Then I asked him, "Who made it"? Lavi said, Yanni. So I googled on the Internet and listened samples of his music. The "Mozart effect" in his works attracted me as Mozart's composition. So I ordered a CD collection covering many parts of his famous concert "Yanni at Acropolis". I also like the "dreaming" titles of his compositions, such as "Nice to meet you", "You only live once", "One Man's Dream", "Keys to imagination".

John Sousa's works are so famous and widely played that I knew who composed them many years after I heard the "Star And Stripes Forever", his most famous march. As the effect of other marches, his works make me vigorous and durable, like "Gladiator March", "Hands Across The Sea", etc.

Oh, yeah, I almost forget the operas. Actually I just like a part of a opera rather than the entire work. For example, the overture of "William Tell" by Rossini, based on the play of Schiller, the overture of "Le nozze di Figaro" (The Marriage of Figaro) by Mozart, the "Brindisi" (The Drinking Song?) of "La Traviata"(The Woman Who Strayed/The Fallen One) by Verdi, "Nessun Dorma(No one sleeps)" in "Turandot" by Puccini.

Musical play is a new form of music but very similar to opera. There is one composer I like. Well, he is too famous, Webber. Maybe you will ask who he is. Well, I think you definitely heard the song, "Don't cry for Me Argentina" of "Madonna". This song is from one of Webber's famous musical play, "Evita". I really don't like "Cats", coz I can't understand the plot. Fool is as fool does. But I like "Evita" and "The Phantom of the Opera" very much. What a pity, I only watched movies written based on them, not the real musical play.

Well, what's next? I am too tired, so allow me to finish in "Con te partirò"(Time to Say Goodbye). I like the version sung by Sarah Brightman and Andrea Bocelli. Here is one: http://www.youtube.com/watch?v=d_0FsKiS8rg

2008-01-17

Amerika on Uncyclopedia (in Sim. Chinese)

by Forrest Sheng Bao http://fsbao.net

Q: Forrest, why don't you write your blog in English today?
A: This article is fun if and only if, \iff, you can read it in Chinese, coz most contents are from Chinese version Uncyclopedia, related too much with Chinese culture and up-to-date pop culture.

Wikipedia比较中立,但是Uncyclopedia就比较恶搞,而且把世界上各种丢人的事情超级夸张

写伪基百科的人绝对不比些维基百科的人没文化,他们知道很多著名的艺术作品,如描绘反美主义时,引用了著名反共小说《动物庄园》“ 依預言之書《動物莊園》所建立的反美主義十誡,被汪洋大海的人民群眾讚譽為'「反美主義指南」。”看伪基百科,绝对让你比看维基百科还要有文化。

这帮人绝对是Web 2.0时代诞生的新人类,关于美国的国歌,他们引用了YouTube上一个德国摇滚乐队创作的笑话美国的歌曲We all live in Amerika(America拼作德语写法Amerika).
http://www.youtube.com/watch?v=6unDcYBQSpQ
这个歌什么意思呢? 意思就是,美国对整个世界的影响太大了,各个民族的都生活在美国文化的影响下,乃至恶搞到穆斯林向炼油厂朝拜,所以大家都生活在美国了

伪基百科对于美国的解释超级巧妙,通过对朝鲜,刚果,和xx国国名虚伪的描述,说明美国国会也决定把自己作的不好的事情加入国名中,如虐待战俘,歧视穆斯林:“美国国务院指出,朝鲜民主主义人民共和国、刚果民主主义共和国等国“国名”里全是“民主”、“人民”,而其“政府”根本就不民主、不自由,甚至截然相反,这是很大的讽刺,所以建议美国国会也通过类似国名的法案,把國名定為美立坚民主主义人民、法制、自由、人权、不虐待战俘、不歧视黑人、不仇视穆斯林合众国”

他们这样描述美国爱好打仗的对外政策:“上联:拳打南山敬老院;下联:脚踢北海育婴堂;横批:天下无敌”

美国的国歌被恶搞成《星条旗永无错》,影射苏萨的著名进行曲《星条旗永不落》(第一段还是真实版本,后面3段分别嘲笑美国在朝鲜,越南和伊拉克的失败,甚至把胡戈恶搞的“大杀器”都引入了):

啊!在晨曦初现时,你可看见 是什么让我们如此骄傲? 在黎明的最后一道曙光中欢呼, 是谁的旗帜在激战中始终高扬! 烈火熊熊,炮声隆隆, 我们看到要塞上那面英勇的旗帜 在黑暗过后依然耸立! 啊!你说那星条旗是否会静止, 在自由的土地上飘舞, 在勇者的家园上飞扬?

啊!在晨曦初现时,你可看见 是什么让我们如此骄傲? 在集中营中为所欲为, 谁让我们在战场上节节败退! 烈火熊熊,炮声隆隆, 我们削平了上甘岭的山头, 它怎应该依然耸立! 啊!你说那星条旗是否会有一天, 与太极旗一同, 在高丽的全境飞扬?

啊!在晨曦初现时,你可看见 是什么让我们如此骄傲? 在美莱村我们尽情扫射, 只因有些人可能名叫越共! 烈火熊熊,炮声隆隆, 尽管要塞上那南越的旗帜降下 我们美军依然要自称英雄! 啊!你说那星条旗是否会有一天, 能重新插上堡垒, 在越南的国土上飞扬?

啊!在晨曦初现时,你可看见 是什么让我们如此骄傲? 到底有无大杀器,当然可以不管, 只要我的主脑能喝到石油! 烈火熊熊,炮声隆隆, 我们只看到油井边那面英勇的旗帜 在萨达姆死后依然耸立! 啊!你说那星条旗是否会停止扩散, 在伊拉克的土地上飘舞, 在美利坚的新国土上飞扬?

2008-01-14

Connecting to Remote Linux Desktop via SSH with X11 Forwarding

by Forrest Sheng Bao http://fsbao.net

Update (2013-09-09): If you have trouble with full screen on Mac OS X, my friend Dr. Changzhi Li has a suggestion: "In X11 preference, enable Full Screen Mode under 'output', then it gives you full screen and complete control of Linux desktop."

There are two advantages of Linux, compared with many other operating systems, such as Windows and Mac OS X. The first advantage is the ultimate B/S architecture. Thus, every program is either a server or a program running on a server. When clicking my mouse, I am talking to a server program called X Server on my box. When surfing the Internet, I am using Firefox, a browser running on X Server. The second advantage is that you can always find many choices to achieve one goal. When I wanna connect to my Linux box remotely with a graphic desktop environment, I have many choices: VNC (or VNC over SSH, VNC over VPN), SSH with X-window forwarding, xdmcp, etc. Here we will discuss how to connect to your Linux desktop via "ssh -X". It's very easy, you just need to type two more letters than common SSH connection.

Why "ssh -X"? Because the graphic rendering job is done on your SSH client (and thus your X server) so the data to transfer thru network is not huge. You won't feel the screen laggy even when you play movies. This won't add to your SSH server much load, for the same reason. A lot of job is done by your X server (your SSH client). So, this is a very efficient solution for remote desktop. You even can run big commercial graphic software, like Xilinx ISE or Mathworks MATLAB, remotely. And, this supports multi-client, no matter using different username or same username, since you are connecting to a server, both SSH server and X server.

Of course, you need to properly install and configure your SSH server, which is on the same machine running your Linux graphic desktop environment (KDE, GNOME, Xfce, or whatever). Obviously, you MUST install your SSH server program. You can install it via "sudo apt-get install openssh-server" on Ubuntu Linux 7.10. I think you can easily figure out how to do so on other Linux distributions. Then edit the file /etc/ssh/ssh_config. Make these lines be in that configuration file:
ForwardAgent yes
ForwardX11 yes
ForwardX11Trusted yes

Now open /etc/ssh/sshd_config. Attention, the file name is sshd_config, not the same as previous one. Make sure this line be in this configuration file
X11Forwarding yes

Restart your SSH server. Now, go to your client computer, from which you will connect to this computer.

I have no idea on how to do next on Windows. If your client computer runs on Linux or Mac OS X, or other OS with X server running, go ahead.

If your client computer runs on Mac OS X, make sure that you have installed X11 for Mac OS X. Go to "Application"- > "Utilities" to start X11 and you will see an xterm terminal in front of you by default. If no such window, click "Applications" - > "Terminal".

Now let's simply type
ssh -X user_name@the_server_IP_or_hostname.domainame
. For example, if my server is www.example.com and my username is NSF, I simply type
ssh -X NSF@www.example.com
. Accept the RAS key and enter your password.

Have logged in? Ok, the big show is coming. If your desktop is GNOME, then just type
gnome-session
. What do you see? The GNOME desktop is in front of you. If your desktop is others, such as KDE or Xfce, please refer to their docs on how to start them.

Try to do something, and you will really find that the networked remote desktop is very fast. You can even play movies. No delay, right? As I just said before, the graphic rendering job is done at your client so the data to transfer thru network is not huge. It's just like when you play a 3D network game, like World of Warcraft, only some instructions are transferred thru the Internet but not all 3D objects.

This is my desktop connecting to remote Linux box from a Mac. The left-top corner lays Xlinx ISE. The left-bottom is playing 2008 New Years Concert. I put the Mac info page over the Linux desktop. Like it? DIY, now!

2008-01-12

Deploying u-boot, Linux kernel and GPE onto Mini2440, powered by SAMSUNG S3C2440

by Forrest Sheng Bao http://fsbao.net/

An American company of my friend is selling such kit in US and Canada. Their webpage is: http://www.andahammer.com. I heavily referred this article from Kernel Lab: http://labs.kernelconcepts.de/Publications/Micro24401/





Some Terminology

One killer application of Linux is to be used as the operating system of an embedded system. ARM-based CPUs are killer partners of embedded Linux. In this article, we will discuss how to deploy the basic system (bootloader, Linux kernel, and graphic desktop system) onto an ARM development board, using SAMSUNG S3C2440X processor.

The default mini2440 comes with vivi, a bootloader provided Samsung, a long time ago. It sucks. I prefer to gear up my system all by open source stuffs. So, in this article, I am gonna tell you how to depoly u-boot (the bootload), Linux kernel (the operating system) and GPE (the graphic embedded environment) on to mini2440. This article is still under construction. Please give me comments and I will improve it.

You can jump to Step 1 directly to skip the background information below.

The bootloader: Unlike regular computer, most embedded systems don't have a firmware out-of-box like CMOS, Openfirmware or EFI, etc. Instead, you need to install the bootloader yourself or it is burned onto the board already. Generally, to a naked system, people use JTAG protocol to burn a bootloader. A bootloader can provide a interface for users to control the system as well as basic system tools, such as writing data into flash or transferring files from the host machine. In this article, the bootloader on the board by default is vivi and we are gonna replace it by u-boot. Since you have vivi on-board by default, you don't need JTAG. You can use vivi to download and write u-boot into flash memory.

The Operating System: I assume you know what an operating system is and what Linux is. The kernel version here is 2.6.31.

The Root Filesystem : Other than the Linux kernel, most embedded Linux system contain things such as a graphic environment as on most PDAs. The collection of all those files is called the Root Filesystem. It generally is stored in the flash partition called root. Attention, here "Root" is not equal to the /root directory and here "filesystem" is not a software to manager files on storage devices. The Root Filesystem is in the form of an image to be written into the flash memory.

There is no need to re-construct the Root Filesystem for writing a new file or porting an application onto the board. Once the Root Filesystem has been deployed, you can copy files from the PC to the board through Ethernet or removable media.

Just as KDE or GNOME, which are the desktop environment on PCs, Qtopia or GPE are the desktop environment for embedded Linux. They are the collections of some basic embedded applications, such as address book, email client, calendar, image viewer and media player.

Before you start

Before you start, you will need
  1. A mini2440 development board, with or without a 3.5"/7" LCD.
  2. A software called minicom on your PC
  3. The u-boot image, Linux kernel image, and GPE image, as well as the USB-downloader program to transfer files from your Linux PC to the NAND flash on mini2440 via a USB cable. All those files you need are here: http://labs.kernelconcepts.de/Projects/Micro2440/#Downloads
  4. A non-cross RS232 cable (both female heads) and a USB type-A-to-type-B cable (one head is the regular USB head as on your USB flash/thumb drive, and the other one is the little square one, like the one to connect your printer.)

Step 1: Setting up the minicom

  1. Install minicom(for example, via command "sudo apt-get install minicom")
  2. On a shell prompt, type "minicom -s"
  3. Use up and down arrow to select "Serial port setup"
  4. If you wanna setup something, press the button corresponding to that item. After you finished, press Enter to exit. Besure to configure "Bps/Par/Bits" and "Hardware Flow Control" as same as the snapshot. You can save this configuration as default so that you don't need to set it again next time.
  5. Then select "Exit" and press Enter. Don't select "Exit from Minicom", otherwise you are out of minicom.

Please note that your serial port does NOT have to be /dev/ttyUSB0, since I used a USB-to-RS2323 converter. It is only my case. In your case, it could be /dev/ttyS1 or /dev/ttyS0. But make sure set all the reset parameters as I did.

Step 2: Replacing vivi by u-boot



The mini2440 comes with two flashes, the NOR flash and the NAND flash. The NOR flash stores vivi by default. So I am NOT gonna overwrite it, in case I need it. I am gonna overwrite the NAND flash by u-boot, Linux kernel 2.6.31 and GPE.


I will boot the board from NOR flash, using vivi in it to write u-boot into NAND flash. And then, I will reboot the board from NAND flash, and use u-boot to finish all the rest.


Turn the boot selection switch to NOR flash on the board. Connect mini2440 with PC using minicom via RS232. Power on the board and you shall see this boot-up menu:

##### FriendlyARM BIOS for 2440 #####
[x] bon part 0 320k 2368k
[v] Download vivi 
[k] Download linux kernel 
[y] Download root_yaffs image 
[c] Download root_cramfs image 
[a] Absolute User Application
[n] Download Nboot 
[e] Download Eboot 
[i] Download WinCE NK.nb0 
[w] Download WinCE NK.bin 
[d] Download & Run 
[f] Format the nand flash 
[p] Partition for Linux 
[b] Boot the system 
[s] Set the boot parameters 
[t] Print the TOC struct of wince 
[u] Backup NAND Flash to HOST through USB(upload) 
[r] Restore NAND Flash from HOST through USB 
[q] Goto shell of vivi 
Enter your selection: q
Press q and Enter at the prompt and switch to vivi promp.


Now connect PC with mini2440's USB device port, via a USB cable. Make the compiled u-boot image handy. Tell vivi that you need 239016 Bytes space in the RAM to load something from the USB, starting at 0x31000000
Supervivi> load ram 0x31000000 239016 u
USB host is connected. Waiting a download. 
On another shell window, use following command to download u-boot into the RAM of mini2440
$ sudo ./s3c2410_boot_usb u-boot.bin 
Enter root password when prompted, and you shall see this output on the shell
csum = 0xd542
send_file: addr = 0x33f80000, len = 0x0003a5a8
Error downloading program
Please ignore the error.

Now go back to vivi. You shall see follows
Now, Downloading [ADDRESS:31000000h,TOTAL:239026]
RECEIVED FILE SIZE:  239026 (233KB/S, 1S)
Downloaded file at 0x31000000, size = 239016 bytes


Now we are ready to write u-boot from the RAM to NAND flash. Execute the code starting at RAM location 0x31000000:
Supervivi> go 0x31000000
go to 0x31000000
  argument 0 = 0x00000000
  argument 1 = 0x00000000
  argument 2 = 0x00000000
  argument 3 = 0x00000000

U-Boot 1.3.2-dirty-moko12 (Apr 16 2009 - 18:14:52)

I2C:   ready
DRAM:  64 MB
Flash:  2 MB
NAND:  Bad block table not found for chip 0
Bad block table not found for chip 0
64 MiB
Found Environment offset in OOB..
USB:   S3C2410 USB Deviced
In:    serial
Out:   serial
Err:   serial
MAC: 08:08:11:18:12:27
Hit any key to stop autoboot:  0

When seeing "Hit any key to stop autoboot," press any key on the keyboard. The prompt shall change from Supervivi> to MINI2440 #. Get the information about the NAND flash:
MINI2440 # nand info

Device 0: NAND 64MiB 3,3V 8-bit, page size 512, sector size 16 KiB

Erase everything on the NAND flash:
MINI2440 # nand scrub

NAND scrub: device 0 whole chip
Warning: scrub option will erase all factory set bad blocks!
         There is no reliable way to recover them.
         Use this command only for testing purposes if you
         are sure of what you are doing!

Really scrub this NAND flash? <y/N>
Erasing at 0x3ffc000 -- 100% complete.
Bad block table not found for chip 0
Bad block table not found for chip 0
OK
Please enter a lower case y and press Enter when prompted.

Now create a new partition table
MINI2440 # nand createbbt
Create BBT and erase everything ? 
Skipping bad block at  0x03ff0000                                            
Skipping bad block at  0x03ff4000                                            
Skipping bad block at  0x03ff8000                                            
Skipping bad block at  0x03ffc000                                            

Creating BBT. Please wait ...Bad block table not found for chip 0
Bad block table not found for chip 0
Bad block table written to 0x03ffc000, version 0x01
Bad block table written to 0x03ff8000, version 0x01
and partition the NAND flash using u-boot default configuration. Each partition shall be given a name.
MINI2440 # mtdparts                    

device nand0 <mini2440-nand>, # parts = 4
 #: name                        size            offset          mask_flags
 0: u-boot              0x00040000      0x00000000      0
 1: env                 0x00020000      0x00040000      0
 2: kernel              0x00500000      0x00060000      0
 3: root                0x03aa0000      0x00560000      0

active partition: nand0,0 - (u-boot) 0x00040000 @ 0x00000000

defaults:
mtdids  : nand0=mini2440-nand
mtdparts: <NULL>

Now write u-boot to NAND flash

MINI2440 # nand write 0x31000000 u-boot

NAND write: device 0 offset 0x0, size 0x40000
 262144 bytes written: OK


Reset the on-board switch to NAND flash and reboot mini2440



Step 3: Downloading Linux Kernel



Now you shall see all u-boot informations on the minicom window. Hit any key when you see the promption "Hit any key to stop autoboot."


Now set a NAND flash offset since later you won't want to write stuffs on the area that contains u-boot.
MINI2440 # dynenv set 40000
device 0 offset 0x40000, size 0x3fc0000
45 4e 56 30 - 00 00 04 00
MINI2440 # nand erase kernel

NAND erase: device 0 offset 0x60000, size 0x500000
Erasing at 0x55c000 -- 100% complete.
OK


Copy the Linux kernel image onto an SD card and insert the SD card to the card reader of mini2440. Now initialize the SD card.
MINI2440 # mmcinit
trying to detect SD Card...
Manufacturer:       0x02, OEM "TM"
Product name:       "SD01G", revision 2.3
Serial number:      2486075243
Manufacturing date: 1/2002
CRC:                0x72, b0 = 1
READ_BL_LEN=15, C_SIZE_MULT=7, C_SIZE=365
size = 1642070016


Suppose the Linux kernel image has the filename "uImage." Now load it to the RAM first.
MINI2440 # fatload mmc 0:1 0x31000000 uImage
reading uImage

1945804 bytes read


Write the Linux kernel from RAM to the NAND flash partition called "kernel."
MINI2440 # nand write 0x31000000 kernel

NAND write: device 0 offset 0x60000, size 0x500000
 5242880 bytes written: OK


Step 4: Downloading GPE Embedded Graphic Environment



Well, at this step, you have plenty of choices. You can try Qtopia, etc. But I prefer GPE, which is GPL'ed and small. Things like GPE are called Root Filesystems. You can follow the same steps that you did for downloading Linux kernel. Just write to NAND partition "root" instead of "kernel."


Initialize SD card
MINI2440 # nand erase root
MINI2440 # mmcinit
trying to detect SD Card...
Manufacturer:       0x02, OEM "TM"
Product name:       "SD01G", revision 2.3
Serial number:      2486075243
Manufacturing date: 1/2002
CRC:                0x72, b0 = 1
READ_BL_LEN=15, C_SIZE_MULT=7, C_SIZE=365
size = 1642070016

Load GPE image to RAM, supposing the filename is gpe-image-micro2440.jffs2.


MINI2440 # fatload mmc 0:1 0x31000000 gpe-image-micro2440.jffs2
reading gpe-image-micro2440.jffs2

39239680 bytes read

Since the GPE image is compiled in JFFS2 filesystem, you need to write it as a JFFS2 image.
MINI2440 # nand write.jffs2 0x31000000 root ${filesize}

NAND write: device 0 offset 0x560000, size 0x256c000

Writing data at 0x2acbe00 -- 100% complete.
 39239680 bytes written: OK


Finalization

Now you are pretty much done. Just do the two last things as follows
MINI2440 # setenv bootcmd nboot.e kernel \; bootm
MINI2440 # saveenv
Saving Environment to NAND...
Erasing Nand...Writing to Nand... done

Now reset your mini2440 and enjoy!


Acknowledgements

Dave Festing, from Christchurch, New Zealand gave me some comments on serial port device name, "# nand erase root before mounting the SD card to upload gpe-image-micro2440.jffs2" and a typo.

2008-01-06

why Dell's Linux laptop is more expensive than Windows' one?

by Forrest Sheng Bao http://fsbao.net

I found something that is really really incredible that Dell's Linux laptop with poor profile is more expensive than Windows one.

You can compare the configuration of Inspiron 1420N with Ubuntu Linux 7.10 and Inspiron 1525 with Windows Vista. I found that the memory of Windows one is 2GB and hard drive capacity is 160 GB, while the memory of Linux one is 1GB and hard drive capacity is 80 GB. Other configurations (CPU, GPU, etc.) are almost the same. But the price of Windows one is \$749 vs. \$754 of Linux one.

I don't care the "instant savings"(\$150 of Windows one). As a consumer, I just care the final price I need to pay. Plus the license fee of Windows Vista, why Linux laptop, with half memory and hard drive capacity, is more expensive than Windows one? Is there any "conspiracy" between Microsoft and Dell to drive users purchase Windows laptop through such price? Does Microsoft wanna make Linux has no price advantage in order to stop the Linux invasion to Windows market? Is this an improper method that even may violate the antitrust laws?

I want a Linux laptop, at least cheaper than the Windows one with same configuration of same brand. The reason is that Linux is free, on price.

=============================================

The default configuration of Inspiron 1420N with Linux(\$754) is:

Intel® Core™ 2 Duo T5450 (1.66GHz/667Mhz FSB/2MB cache)
Ubuntu version 7.10
Anti-glare, widescreen 14.1 inch display (1280x800)
Intel Graphics Media Accelerator X3100
1GB Shared Dual Channel DDR2 at 667MHz
80GB SATA Hard Drive (5400RPM)
24X CD Burner/DVD Combo Drive
Intel® 3945 802.11a/g Mini-card
56Whr Lithium Ion Battery (6 cell)
Integrated High Definition Audio

************************

The default configuration of Inspiron 1525 with Windows(\$749 after instant savings) is:

Intel® Core™ 2 Duo T5450 (1.66GHz/667Mhz FSB/2MB cache)
Genuine Windows ® Vista Home Premium Edition
Glossy, widescreen 15.4 inch display (1280x800)
Intel Graphics Media Accelerator X3100
2GB Shared Dual Channel DDR2 at 667MHz
Size: 160GB SATA Hard Drive (5400RPM)
CD / DVD Writer (DVD+/-RW Drive)
Dell Wireless 1390 802.11g Mini-Card
No Webcam Option
56Whr Lithium Ion Battery (6 cell)
High Definition Audio 2.0



2008-01-05

Two funny clips on YouTube

by Forrest Sheng Bao http://fsbao.net

I found two funny clips on Youtube today.