2010年12月12日星期日

notes

该死的天气,让原本的计划全部都泡汤了!

日常琐碎的生活会让你无法停下脚步,不停地追啊追啊,却不知道目标在哪里。必须有时间冷静地思考一下生活。有时候感觉很失落,为什么我身边的朋友一个个离我越来越远,联系越拉越少,甚至除了客套的话都没有什么话说,这难道是因为我们长大了么?我们的价值观也会随着我的长大逐渐流走么?我会因为我心爱的人而放弃我的原则么?那些梦想会被遗忘么?我不知道,我不敢回答。

在人生的旅途中,我不停地认识自我,不停地追寻什么是真实的,什么是对的,什么是错的,即使可能答案并不存在。我面临的很多很多选择,我尽力使我的选择是对的,我知道正是那些我们的选择才造就了我们是什么样的人。

对于爱情,我始终相信真爱,我始终保持最纯真的那一部分,尽量不去伤害任何人,不欺骗。即使自己痛苦。尽管有时候不知道怎样表达,不知道应该怎样去做。







网易163/126邮箱百分百兼容iphone ipad邮件收发

2010年11月14日星期日

最近11

最近很乱。

先是去世博会,很不爽,第一天去南京路被雨淋了,感冒,第三天,排石油馆5小时,没进去;
然后整科技项目,报专利,整体做文件;
接着发着烧去深圳EVS25,累得够呛,酒店隔音效果差,没睡好觉,感冒一直没有好;
回来,没有提前通知宿舍就不让住了,被赶到一小房间里,最郁闷的是一舍友晚上打呼噜,没法睡好觉;
就赶快找房子。
然后,办公室又要搬;

项目很多,人太少,整天就整些杂碎事了,手上的项目一拖再拖;
好想一心忙项目啊!




网易163/126邮箱百分百兼容iphone ipad邮件收发

2010年9月28日星期二

谷岳

谷岳
  

  

  出生:1980年
  出生地:北京(美国籍)
  身份:环球旅行者
  谷岳0-11岁在中国,11-24岁美国(其中一年在中国留学),24-26岁在世界流浪,26-31岁在中国。谷岳在北京出生、共在北京住了17年,在共美国14年
  2003年,美籍华裔青年谷岳(Kyle Johnson)辞了工作,卖掉几乎所有家当,从西雅图出发开始旅行。带着一只背包,三台相机,和一张单程机票,试图离开喧嚣和既定的生活,寻找生命中的真实和美丽。他花了两年零一星期,走了18个国家,最终回到出生地——北京。
  这次旅行前,谷岳已经有过两次让他上了瘾的长途旅行。一次是18岁时类似"成人礼"的欧洲行,一呆就是6个月。另一次是从北京搭火车去西藏,他想买张学生票,就找了个办假证的买学生证,本想要个人大的,拿到一张北大的,随身携带假证,他在西藏呆了两个月。西藏之行他读了〈在路上〉,没能看完,但对搭车一幕始终不忘。凯鲁亚克描述了他生平最精彩的搭车旅行,一辆卡车,后面平板上趴着六七个小伙子,司机是两个金发年轻农民,路上见谁都乐意带上。"我们要去洛杉矶!"这群小伙子嚷嚷着。"你们去那儿干吗?""我们也不知道,管他呢。"后来的环球旅行,谷岳经历了生平最挣扎的搭车旅行。第一站新西兰,为了省钱他决定搭顺风车,可即使对着飞驰而过的汽车伸出大拇指这么简单的动作,他也做不出来,这是个祈求的动作,需要极大的谦卑,他觉得自己太低声下气了。后来做了个大牌子,也依然难以将它伸出去,尝试、放弃、放弃、尝试,一个40开外的女士主动搭载了他,之后他对新西兰民族甚至整个世界,充满了信心。这是真正踏上旅途的人才能体会的挣扎与欣喜,整天在房间旅行的人无福享用。
  这次旅行,可能有逃避的意思。谷岳刚大学毕业,在西雅图的通用汽车公司工作,在美国小学上到大学,大公司可能是人生段落的一个中止点。同龄人整天想着怎样在30岁之前升职,4、50岁时挣够钱提前退休,到时有一个房子,几台车子,一个老婆,几个孩子,可是快乐吗?自由吗?所有的愉悦来自别人的羡慕,忽略发自内心的渴望。听上去就像头脑一热,谷岳服从自由召唤,辞职上路。刚离开公司的几日,总会惯性地想着工作,真正到达新西兰,他躺在奥克兰的一个海边栈桥,看着蓝天,云特别近,突然意识到,已经是在路上。
  在老挝万荣,谷岳遇到一个浅褐色眼睛的美丽女孩Noa。他们参加一个小派对,聊到很晚,送她回旅馆的时候他们在布满大坑的街上慢慢走,谷岳觉得胃里像打了个结,手掌全是汗,停到旅馆门口台阶前时心跳飞快,满脑子搜索勇气,但一瞬间勇气好象又蒸发掉了,他们还在交谈,说的什么却全记不得。看着Noa的眼睛,谷岳突然弯腰,吻了她的嘴唇。他移开一点点,Noa说:"真没想到。"然后笑了。他们在芭那度过了两天,之后在去印度之前,谷岳在一条浅河边向她告别,他们最后一次亲吻,她站在河岸上,朝着站在河中狭长独木舟上的他挥手。这可能是谷岳旅行的一个小缩影,他遇到的友善的人,愤怒的人,喜欢的人,厌恶的人,明明知道互相可能永不再见,但依旧共同体会与珍藏那短暂的幸福,伤感,失落,欣喜,抱怨,发疯……
  不像凯鲁亚克那般疯狂,谷岳最多在越南的一个前美空军基地,躲避安全人员的追踪,在杂草和大坑中奔跑;或在巴基斯坦被当成孤身一人前去寻找本•拉登的美国人。也不同于匆忙度假的人,夫妻因为没有确认酒店而争吵,丈夫随时随地打开笔记本查收邮件,孩子大哭大闹,谷岳疑惑地看着他们,为什么不肯享受旅途的宁静?甚至与整日混在路上的其他背包客也不同,他听完一个日本人骑车环美一周,加拿大泛舟抵达北极的传奇,一边感慨他的勇敢一边想知道他是不是还记得旅行的目的地。在青年旅社,一个花白头发的单身汉在一群年轻人中显得格外孤独,他一辈子都漂泊四方,居无定所,更换工作、友伴和性。这种感觉在印度时格外明显,钱所剩无几,新鲜感渐渐消退,原本几个月的旅行打算拖延到了1年零8个月,谷岳真害怕自己又头脑一热,就在此度过余生。他打算前往终点,北京。
  从巴基斯坦越过边境,他从新疆吐鲁番坐了42小时火车到达北京西站。身上还有800多美元,一个老大哥的训诫:千万不要一文不名的结束旅行,生活总要重新启动。选择北京是潜意识的,这是他的出生地。他也不认为自己是嬉皮士或"垮掉的一代"当代版,他自认为是主流青年,他的继父是美国60年代的嬉皮士遗老,而嬉皮士的后代大都积极上进。他暂时留在了北京,但再也不想穿上西装,旅行让他沾染了文艺气,打算搞电影。他不会呆着不动,虽然没想好,但一直在谋划下一次出行。生活也许像一个大病房,大多数人都甘心呆在里面,懒于更换病床。谷岳可能没有走出病房的大门,但他将病床从靠暖气片的地方更换到了靠窗的位置。
  火车离北京越来越近,谷岳却出乎意料地平静,这是憧憬了很久的时刻,但脑子里空空的,什么也没有。他走下站台,没人知道他是谁,没人知道他都干了什么,他背着一个又旧又脏的背囊,穿着一双更旧更脏的鞋子。
  在09夏天一路只依靠陌生人的帮助,搭便车,经过1万6千多公里、13个国家,穿越中国、中亚和欧洲,直到柏林。在那里等待他们的就是谷岳的女友伊卡。



全国最低价,天天在家冲照片,24小时发货上门!

2010年7月12日星期一

OpenEmbedded / Angstrom : use the demo root filesystem

OpenEmbedded / Angstrom : use the demo root filesystem

Boot to the installed rootfs

Check Load Linux with u-boot chapter in the u-boot page to know how to load a Linux kernel.

Once loaded, the Linux kernel tries to mount a root file system ; command line parameters can indicate a location of such a rootfs. This option can be specified during the build process of through a u-boot environment variable.

Here is a sample command line for booting in the proper partition of the NAND FLASH : address indicated in theAddress text field during the flashing process (step #6).

mem=64M console=ttyS0,115200 root=/dev/mtdblock1 rw rootfstype=jffs2 
which leads to the following u-boot command to setup the environment :
setenv bootargs 'mem=64M console=ttyS0,115200 root=/dev/mtdblock1 rw rootfstype=jffs2' saveenv 

Once the Linux kernel and root filesystem loaded, you can access the Linux console through the serial line plugged on DBGU port.
Use the root login account without password.

Fit application set to your needs

While building the rootfs image

The AT91 demo policy is to bring the user more application to figure out what the capacities of the CPU are. We add then more packages at build time. The way to add packages to a base Angstrom image at building time is to add a new recipe, stating that it requires the base recipe, and to modify the ANGSTROM_EXTRA_INSTAL variable. Basically this is exactly the same thing as extending the RDEPENDS variable (Cf. x11-at91sam9-image.bb recipe):

RDEPENDS = "\     [..]      ${ANGSTROM_EXTRA_INSTALL}" 

Check the attached x11-at91sam9-image.bb file.

ANGSTROM_EXTRA_INSTALL += " \     <package_name> \     <another_package_or_task> \     <..> \     " 

The complete process of how to build the rootfs is described in the How to build Angstrom for AT91 from sourceschapter.

This point is discussed in details in this acticle : The correct way to add packages to an OpenEmbedded Image.

With pre-built packets in hands

Referring to the Angstrom Manual, you can check how to install new packages in an existing Angstrom distribution. 5. Installing Software and Package Management. So, there is always the ability to add applications to an already built distribution.

Here is different mean to add packaged applications to a running system.

Install application packages over the network

Reference chapter in the Angstrom manual.

Here is the Opkg official website.

On the target, /etc/opkg/etc/opkg/*.conf files points towards the servers where the device can pull packages from.

Angstrom feeds are discussed in the Angstrom Wiki.

Information on available packages are stored on particular files: the Packages or Packages.gz . This kind of file is downloaded to the target while issuing the opkg update command. 
You can create a custom opkg feed using a web server that is configured to point to the directory where resides compiled packages (*.ipk). Those packages are created during the OpenEmbedded building process. For example generic /armv5te/ compiled packages are located in tmp/deploy/glibc/ipk/armv5te .

tip If you build additional packages, do not forget to run bitbake package-index to update Packages and Packages.gz files in your opkg feed.

Procedure

On the host machine :

  • construct packages
  • run bitbake package-index
  • collect packages in a directory (done by the OpenEmbedded system : in path_to_deploy_dir/glibc/ipk/armv5te/)
  • configure your web server to give access to that directory

On the target

  • configure your Ethernet interface
  • check that you can access the web server and the feed (package directory)
  • run opkg update
  • run opkg list to see if the package you want is in the "available packages" list
  • run opkg install
  • check if the package is installed with the opkg list_installed command

Install application packages from local storage

Reference chapter in the Angstrom manual.

You can pick those packages in the deploy/glibc/ipk/ directory once you built them with bitbake.

You can install .ipk packages from all mass-storage support you can connect to a board.

  • usb key
  • SD/MMC card




[备份]angstrom rootfs for at91

OpenEmbedded / Angstrom : build from sources

How to build Angstrom for AT91

Note that building an entire distribution is a long process. It also requires a big amount of free disk space ; at least :

  • ~650 MByte of source archives downloaded for Internet
  • ~5 GByte of compiled packages and tools

This documentation is largely inspired by the following resources :

To build the binary found in the OpenEmbeddedAngstromGet page, you will have to go through the following steps.

Pre-requires

Here are the reference pages for setting up an OpenEmbedded building environment.

Note however that most of time, on a development host, those packages are often already installed.

Building environment

A step-by-step comprehensive installation is explained in the OpenEmbedded Getting Started page. The following lines have to be considered as an add-on that is AT91 specific or that can facilitate your setup.

Have a look at the OEDirectoryTree to figure out what your working environment tree will look like. In the following procedure, each time we speak about the base directory, we refer to the stuff directory.

Getting BitBake

Take it through the BitBake build tool website and take the latest archive tarball. follow the advice: simply install it in your OEDirectoryTree and make a generic link:

tar xvzf bitbake-1.8.18.tar.gz ln -s bitbake-1.8.18 bitbake 

Getting OpenEmbedded

Once in your OEDirectoryTree, download a snapshot of the OpenEmbedded database using the GIT Souce Code Management tool.

git clone git://git.openembedded.org/openembedded openembedded 
or using HTTP protocol:
git clone http://repo.or.cz/r/openembedded.git openembedded 

warning Make sure to call the directory where you will clone the GIT source openembedded. This name will be used in the following procedure and in the site.conf configuration file.

Then create a local branch based on OpenEmbedded stable/2009 branch:

cd openembedded git checkout -b stable_2009_mybranch origin/stable/2009 cd .. 

For demo root filesystems available in the GettingStarted page, we used the following commit ID :a646269c2ada7691d8a7f7455ba4528c7cca3483 . The stable/2009 branch should be stable enough to be able to build using those instructions even with a more recent HEAD for this branch.

AT91 OpenEmbedded overlay tree

In addition to the upstream recipes, we also have a set of our own recipes or modifications of the original ones. So, the following overlay tree will modify current OE original recipes.

hand note however that the goal of those recipes is to merge the most of it bits into the mainstream OE tree.

DESCRIPTIONSOURCESPATCH
OpenEmbedded databaseWeb interface:
http://cgit.openembedded.org/ 
branch: stable/2009
overlay directory tree archive

Then download and install the overlay tree archive, be sure to be in your OEDirectoryTree and:

wget ftp://ftp.linux4sam.org/pub/oe/linux4sam_x.y/oe_at91sam.tgz tar xvzf oe_at91sam.tgz 

This archive contains the configuration files, recipes that will overload the original ones from the OpenEmbedded project. The oe_env.sh script will allow you to setup local configuration variables needed for your rootfs to build.

Setup local configuration

The local configuration is located in oe_at91sam/conf/local.conf . This configuration file will overload theopenembedded/conf/local.conf one.

hand Read comments in it as it will bring you valuable information and allow you to adapt it to your own environment and building host (directory structure for example). Choose the proper machine type: we will use at91sam9m10g45ek for this setup:

MACHINE ?= "at91sam9m10g45ek" 

Start building

Be sure to always be in your OEDirectoryTree.

To start the building, source the oe_env.sh script:

source ./oe_env.sh 

Then begin building the distribution with a little set of packages:

bitbake base-image 

warning even a minimal image will require a big amount of time because of the cross-toolchain building process.

The console and graphical images are built using the following recipes respectively:

bitbake console-at91sam9-image bitbake x11-at91sam9-image 

Or for AT91SAM9M10 based boards:

bitbake x11-at91sam9m10-image 
This will allow you to take advantage of video features of this chip. This image will include kernel and Gstreamer components needed to use the hardware video decoder.

Tips & tricks

OE Link collection

From the BUG community, here is a very good link collection :
Three Steps for OpenEmbedded N00Bs

Wonder how to customize an OpenEmbedded building based on AT91 SOCs? Here is a simple and clear step by step blog:
Customizing OpenEmbedded

BitBake

BitBake usage:
http://www.uv-ac.de/openembedded/openembedded-3.html#ss3.2 
BitBake User Manual

list tasks provided by a package:

bitbake -c listtasks <package_name> 
You can use one of those tasks to have a fine grained control over the package building.

The structure of a BitBake file explained: BitBake Metadata

Hello World examples

The OpenMoko way: 
http://wiki.openmoko.org/wiki/Building_a_hello_world_application 
http://wiki.openmoko.org/wiki/Application_Development_Crash_Course#Your_First_Application


 ATTACHMENTACTIONSIZEDATEWHOCOMMENT
elseoe_angstrom_at91-2.diff.gzpropsmove194.9 K12 Dec 2008 - 12:56NicolasFerrelinux4sam_1.4_20081212
elseoe_angstrom_at91-3.diff.gzpropsmove195.9 K23 Jul 2009 - 15:17NicolasFerrelinux4sam_1.6_20090723
elseoe_angstrom_at91.diff.gzpropsmove192.5 K15 Apr 2008 - 13:13NicolasFerrelinux4sam_1.2_20080415
r28 - 07 Jun 2010 - 14:23:07 - NicolasFerre