瑞雪年

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: :: 订阅 订阅 :: 管理 ::

 Q5 upgrade tool flash the u-boot.bin, zImage and initramfs into NAND, their location are 0x0002, 0x0202 and 0x1000;

And unzip the rootfs.tar.gz and home.tar.gz into inner SD, the partions of the inner SD are structed 1. rootfs(ext3), 2. home(ext3), 3. swap.

Normally while Q5 starts, the cmdline is "console=ttySAC0,115200n8 root=/dev/mmcblk0p1 rootwait splash", the zImage loaded, then boot the system on the inner SD.

While "Alt" down, the cmdline is "console=ttySAC0,115200n8 rdinit=/sbin/init", after load zImage, the initramfs is loaded, and there is a "upgrade" tool on the ramfs under /bin is executed, the "upgrade" tool will check the /dev/mmcblk1p1 for the rom file SmartQ, then load the rom file, extract it and check crc, then flash them on their location.

ps. and I guess, u-boot.bin can also read SmartQ on mmcblk1p1,  and load the zImage and initramfs from the rom file, so that while the files on the NAND are destoried, it can also bootstrap, and flash them again.

posted on 2009-04-30 22:10  瑞雪年  阅读(513)  评论(0编辑  收藏  举报