周's profile宇宙的空间PhotosBlogListsMore Tools Help

Blog


    11/21/2007

    Appliance:Adding disk space under VMware

    If you're using the VMware ® version of this appliance, and you have VMware Workstation, you can add more disk space as follows:

    Image:Bulbgraph.png   These instructions assume you're using the VM ware image generated

    by rBuilder Online™. If you're using an image you created by installing from the ISO images produced by rBuilder, then the assumption about your disk device names, etc. will all be invalid.

      1. Take a snapshot of your existing VM as a safety precaution.
      2. Shutdown the VM cleanly.

        Either use rPath Appliance Agent Web UI or login as root and issue:

        shutdown -h now
      3. Add the new virtual disk in Workstation's VM -> Settings menu.

        Choose SCSI for the virtual hardware.

        Image:Bulbgraph.png   If the existing virtual drive is SCSI, use /dev/sdb in all instructions below. If the existing drive is IDE use /dev/sda. SCSI drives are mapped to /dev/ device entries in order, starting with /dev/sda then /dev/sdb /dev/sdc, etc.

        Make it growable to whatever maximum you desire.

      4. Startup the VM.
      5. Login as root
      6. Create a partition table on the new disk using fdisk. This is an interactive tool, so you're going to need to answer a few questions.
        fdisk /dev/sdb 
        • choose n for "new partition"
        • choose p for "primary"
        • type 1 for the partition number
        • accept the default start and end options (hit Enter twice)
        • choose w to "write the partition table"
      7. Make a filesystem on the new partition
        mkfs.ext3 /dev/sdb1
      8. Mount the filesystem on a temporary location
        mount /dev/sdb1 /mnt
      9. Copy all the /srv contents to the new partition
        cp -rp /srv/* /mnt
      10. Move the old contents out of the way
        mkdir /srv.old; mv /srv/* /srv.old
      11. Add a line to /etc/fstab to cause your new partition to be mounted at boot

        Either use echo to append a line, or use vi to edit if you're comfortable with vi

        echo '/dev/sdb1 /srv  ext3  defaults  1 1' >> /etc/fstab
      12. Reboot
    shutdown -r now

    After rebooting, you can confirm that your disk setup now has the new disk on the /srv directory mount point by typing on the command line:

    df -h

    You should see something like

      Filesystem   Size   Used  Avail Use%  Mounted on
    /dev/sda1 512M 256M 256M 50% /
    none 126M 0 126M 0% /dev/shm
    /dev/sdb1 7.9G 73M 7.5G 1% /srv

    After confirming that the contents have all been copied correctly, you can remove the backup data:

    rm -rf /srv.old

    11/16/2007

    U-BOOT的readme

    U-boot是基于PowerPC, ARM, MIPS等多种处理器上的bootloader,可以安装在boot ROM中,用于初始化或者测试硬件,或者用于装载和运行应用程序。

     where we come from

     - start from 8xxrom sources
    - create PPCBoot project (http://sourceforge.net/projects/ppcboot)
    - clean up code
    - make it easier to add custom boards
    - make it possibile to add other [PowerPC] CPUs            
    - extend functions, especially:
       * Provide extended interface to Linux boot loader
    * S-Record download
    * network boot
    * PCMCIA / CompactFlash / ATA disk /SCSI … boot
    -         create ARMBoot project (http://sourceforge.net/projects/armboot)
    -         add other CPU families(starting with ARM)
    -         create U-Boot project (http://sourceforge.net/projects/u-boot)
     

    Names and Spelling:

     

    文件名以u-boot为开头,例如

    #include <asm/u-boot.h>

    #include <asm-ppc/u-boot.h>

    变量名,预编译常数等都以u_boot或者U_BOOT开头,例如

    U_BOOT_VERSION    u_boot_logo

    IH_OS_U_BOOT       u_boot_hush_start

     Versioning:

     
    U-Boot版本信息由version, sub-versionpatchlevel组成。例如”U-Boot-2.34.5”表示version “2”, sub-version “34”, patchlevel “4”.对于正式的发布版本来说,patchlevel总为“0”.
     
    Directory Hierarchy:
     
    - board        Board dependent files
    - common      Misc architecture independent functions
    - cpu          CPU specific files
    - 74xx_7xx   Files specific to Freescale MPC74xx and 7xx CPUs
    - arm720t    Files specific to ARM 720 CPUs
    - arm920t    Files specific to ARM 920 CPUs
         - at91rm9200 Files specific to Atmel AT91RM9200 CPU
         - imx         Files specific to Freescale MC9328 i.MX CPUs
         - s3c24x0      Files specific to Samsung S3C24X0 CPUs
     - arm925t    Files specific to ARM 925 CPUs
     - arm926ejs Files specific to ARM 926 CPUs
     - arm1136   Files specific to ARM 1136 CPUs
               - i386      Files specific to i386 CPUs
    - ixp        Files specific to Intel Xscale IXP CPUs
    - mcf52x2    Files specific to Freescale ColdFire MCF52x2 CPUs
    - mips       Files specific to MIPS CPUs
    - mpc5xx    Files specific to Freescale MPC5xx CPUs
    - mpc5xxx   Files specific to Freescale MPC5xxx CPUs
              - mpc8xx    Files specific to Freescale MPC8xx CPUs
               - mpc8220   Files specific to Freescale MPC8220 CPUs
               - mpc824x   Files specific to Freescale MPC824x CPUs
               - mpc8260   Files specific to Freescale MPC8260 CPUs
               - nios       Files specific to Altera NIOS CPUs
    - nios2     Files specific to Altera Nios-II CPUs
    - ppc4xx    Files specific to AMCC PowerPC 4xx CPUs
    - pxa       Files specific to Intel Xscale PXA CPUs
    - s3c4bb0   Files specific to Samsung S3C44B0 CPUs
    - sa1100    Files specific to Intel StrongARM SA1100 CPUs
    - disk    Code for disk drive partition handling
    - doc     Documentation
    -         drivers Commonly used device drivers
    -         dtt      Digital Thermometer and Thermostat drivers
    -         examples Example code for standalone applications, etc
    -         include Header Files
    -         lib_arm File generic to ARM   architecture
    -         lib_generic File generic to all   architecture
    -         lib_i386 File generic to i386   architecture
    - lib_m68k File generic to m68k   architecture
    - lib_mips   File generic to MIPS   architecture
    - lib_nios    File generic to NIOS   architecture
    - lib_ppc    File generic to PowerPC architecture
    - net        Networking code
    - post       Power On Self Test
    - rtc        Real Time Clock drivers
    -  tools      Tools to build S-Record or U-Boot images, etc
     
     
    Software Configuration:
     

    Configuration _OPTIONS_:
    由用户指定,以CONFIG_开头
    Configuration_SETTINGS_:
    跟具体硬件相关,以CFG_
     

     

     
    对于已经支持的board,已有默认的configuration,故需要直接make即可,make
    <board_name>_config.
    Example:
    cd u-boot
    make TQM82L_config
    对于Cogent platform,则需要make cogent_mpc8xx_config.

    Configuration Options:

    Configuration取决于boardCPU类型,其信息在include/configs/<board_name>.h
    中,例如include/configs/TQM823L.h
    需要指定如下:
    - CPU Types: 例如CONFIG_MPC860
    - Board Type: 例如 CONFIG_PCIPPC2
    -         CPU Module Type:(如果定义了CONFIG_COGENT),例如CONFIG_CMA286_60_OLD
    -         Motherboard Type:(如果定义了CONFIG_COGENT)例如CONFIG_CMA101
    -         Motherboard I/O Modules: (如果定义了CONFIG_COGENT),例如CONGIG_
    CMA302
    -         Board flavour
    -         MPC824x Family Member
    -         8xx CPU options
    -         859/866/865 CPU options
    -         Linux Kernel Interface:
    -         Serial Ports
    -         Console Interface
    -         Console Baudrate
    -         Interrupt driven serial port input
    -         Console UART Number
    -         Boot Delay
    -         Autoboot Command
    -         Pre-Boot Commands
    -         Serial Download Echo Mode
    -         Kgdb Serial Baudrate
    -         Monitor Functions
    -         Watchdog
    -         U-Boot Version
    -         Real-Time Clock
    -         Timestamp Support
    -         Partition Support
    -         IDE Reset method
    -         ATAPI support
    -         LBA48 support
    -         SCSI support
    -         NETWORK support(PCI and others)
    -         USB support
    -         MMC support
    -         Journaling Flash filesystem support
    -         Keyboard support
    -         Video support
    -         Keyboard support
    -         LCD support
    -         Splash Screen Support
    -         Gzip compressed BMP image support
    -         Compression support
    -         MII/PHY support
    -         Ethernet address
    -         IP address
    -         Server IP address
    -         Boot Recovery mode
    -         DHCP Advanded options
    -         CDP options
    -         Status LED
    -         CAN support
    -         I2C support
    -         SPI support
    -         FPGA support
    -         Configuration management
    -         Vendor Parameter protection
    -         Protected RAM
    -         Error Recovery
    -         Command Interpreter
    -         Default Environment
    -         DataFlash Support
    -         SystemACE Support
    -         TFTP Fixed UDP Port
    -         Show boot progress

    Modem Support:

           
    -         Modem support enable: CONFIG_MODEM_SUPPORT
    -         RTS/CTS Flow control enable: CONFIG_HWFLOW
    -         Modem debug support
    -         Interrupt support(PPC): interrupt_init()timer_interrupt()对于所有PPC结构来说都是通用的。其中,interrupt_init()调用interrupt_init_cpu()对特定CPU进行初始化。在interrupt_init_cpu()中,应设定合适的decrement_count值。timer_interrupt()调用timer_interrupt_cpu()处理特定的CPU定时。如果板上有watchdog/status_led等,在timer_interrupt()后有效。
    -         General
    Configuration Settings:

    Low Level (hardware related) configuration options:
     

    Buildin the Software:
     
    U-BOOT已经在native PPC环境和交叉环境中测试过,包括在LinuxPPC 2000, RedHat  Linux on x86, Solaries 2.6 on SPARC及NetBSD 1.5 on x86。如 果不是使用native PPC environment,那么则需要具有交叉编译工具如前缀“powerpc-linux-”等编译器,链接器,elf文件分析器等工具。这是需要重新定 义Makefile中的CROSS_COMPILE。例如:CROSS_COMPILE = ppc_4xx-,此外,还需要制定U-Boot为特定的board type。
                  make NAME_CONFIG
    最后,运行
                 make all
    来生成U-Boot images。生成的image包括:
               u-boot.bin      是raw binary image
               u-boot            是ELF格式的image
               u-boot.srec   是Motorola(FreeScale)的s-records format
    此外,还需要注意,与GNU mkae不同,在NetBSD下应该使用"gmake"

     U-Boot的移植

         如果使用的platform不存在,则需要将U-BOOT进行移植。步骤如下:   

    1)    为使用的board为Makefile和MAKEALL添加新的configuration option。
    2)    为使用的board新建一个新的目录,该目录下至少应该包含“Makefile”
                          “
    <board>.c”和“flash.c”及“u-boot.lds”
    3)    运行“make <board>_config”
    4)    运行“make”,则会生成“u-boot.srec” image
    5)    Debug and test

    11/12/2007

    MM Combination

    Yao and McGrady are never such strong combination as now. Well, they must have a big post-season in this year, I wish. http://nba-boss.streamos.com/wmedia/nba/nbacom/news/yao_mcgrady_bignight_071111.asx

    how much does it cost to whiten your collar

    The Chinese Academy of Social Sciences recently published a report about how much income you need in order to be classified as white-collar in various Chinese cities. At the top of the list was Hong Kong, where you needed to make at least 18,500 RMB. As for some of the other cities: The benchmarks in some major cities at the upper end are: 8,900 yuan ($1,194) in Macao, 5,350 yuan ($717) in Shanghai, 5,280 yuan ($708) in Shenzhen of Guangdong Province, 4,980 yuan ($668) in Hangzhou of Zhejiang Province and 4,750 yuan ($637) in Guangzhou of Guangdong Province. The Chinese press reports are more detailed: 3780 in Nanjing, 3000 in Dalian, 1900 in Chengdu, 1000 in Xining, and last but not least, 900 in Lhasa. If you like mountains and don't mind political repression, you could be livin' large in Lhasa!