2014年5月19日 星期一

Update timezone on Ubuntu Server


1. Check Timezone
$ cat /etc/timezone
  Etc/UTC
2. sudo dpkg-reconfigure tzdata
  select Asia
  select Taipei

Refer: http://www.christopherirish.com/2012/03/21/how-to-set-the-timezone-on-ubuntu-server/

2014年5月14日 星期三

Redmine - Implementation


  • System installation
    • Basic installation
      • standard installation
        • Ubuntu Linux(or  MS Windows)
        • Apache
        • MySQL (or Postgre SQL)
        • Redmine
        • Ruby & Rails
      • bitnami installation
        • packed installer
        • Virtual Machine (*)
          • VMWare and VirtualBox are all workable.
    • Email setup
      • Modify configuration.yml under /opt/bitnami/apps/redmine/htdocs/config
      • Fill up the SMTP information (our SMTP server or Email)
    • Subversion integration
      • Link the exist repository
      • Link between Revision and Issue
        • Standard link
          • Go to specified revision under Repository page
          • Add the Issue id releated.
        • Subversion message log
          • #XXX will be translated to a link refer to the Issud ID XXX
        • Issue comment log
          • rXXX will be translated to a link refer to the Revision ID XXX.
    • System backup/restore
      • Backup items
        • Redmine database
          • For MySQL:
            • mysqldump -u root -p XXX bitnami_redmine > sqldump.sql
        • Attached files
          • rsync -a /opt/bitnami/apps/redmine/htdocs/files /mnt/storage/redmine/files

  • Work Flow
    • Issue reporting flow
      • Bug fix flow
        • Reporter creates an issue with “New” state and assign to TaskOwner
        • TaskOwner assigns the issue to the Developer (TaskOwner may be the issue owner). 
        • Developer changes the state to “In Progress” when handling.  
        • Developer changes the state to “Resolved” or “Rejected” then assigned to Verifier
          • Resolved: Solution provided for verification. 
            • Verifier changes the state to “Closed” and changes the assignee to NULL if the solution has been verified. 
            • Verifier changes the state to “ReOpen” and assign back to Developer if the solution is not workable. 
          •  Rejected: Invalid testing procedure or Work As Design issue. 
            • Verifier changes the assignee to NULL if he/she agree with that. 
            • Verifier changes the state to “ReOpen” and assign back to Developer if the Rejected” reason if not acceptable.
        • Reporter/Verifier has right to change state from “Closed” to “ReOpen” and assign to Developer if the same issue happens again.
    • Project management of a development flow
      • TaskOwner Creates ToDo list
        • Creates issues with "Feature" category
        • Setting constraints between issues.
        • Fills up the estimated start/end date and working hours of the issue
        • Checks the Gantt Chart 
      • TaskOwner Create Roadmap
        • Create Versions and assign feature issues to specified Version 
      • Team work (TaskOwner)
        • Assign specified issue to Developer
        • Update the start/end date of the issue and related issues.
        • Checks the Gantt Chart.

Redmine - Project Management & Issue Tracking system



  • Issue Tracking system comparison
    • Not Free
      • JIRA (project management feature as well)
      • basecamp (project management feature as well)
    • Cost Free
      • Trac (project management feature as well)
        • Written by Python
      • Redmine (project management feature as well)
        • Written by Ruby & Rails
      • Mantis
      • Bugzilla

  • Roles in Redmine (For our design flow)
    • Manager
      • Project administrator (Permission Controller)
    • Task Owner
      • Main Developer, Version creator.
    • Developer
      • Issue fixer
    • Reporter
      • Main issue reporter
    • Verifier
      • Solution verifier

  • Issue state in Redmine (For our design flow)
    • New
    • In Progress
    • Resolved
      • Solution provided
    • Feedback
      • Needs more informaiton
    • Closed (issue finished)
      • Solution verified
    • Rejected (issue finished)
      • Due to some reason, the issue has been terminated
    • ReOpen
      • Issue happens again.

2014年4月13日 星期日

Using VirtualBox raw disk on Win7



  1. Offline the Physical Disk 0 and clear the read-only flag
    1. run diskpart.exe
    2. run "SELECT DISK 0" -- 0 is the physical disk I would like to use.
    3. run "OFFLINE DISK"
    4. run "ATTRIBUTES DISK CLEAR READONLY"
    5. run "ATTRIBUTES DISK" to check the readonly flag has been cleared.
  2. Create the raw disk in the Virtualbox Host - Ubuntu-Local
    1. Open up a command prompt.
    2. cd C:\Program Files\Oracle\VirtualBox
    3. VBoxManage internalcommands createrawvmdk -filename "G:\Ubuntu.vmdk" -rawdisk "\\.\PhysicalDrive0"
    4. VBoxManage storageattach "Ubuntu-Local" --storagectl "IDE" --port 0 --device 0 --type hdd --medium G:\Ubuntu.vmdk
      (Noted: You are able to create this by VirtualBox GUI, but be sure to run as an administrator when launching VirtualBox GUI)
  3.  Run VirtualBox as an administrator


2014年3月25日 星期二

Linux - data transfer between kernel/user space


  • put_user(x, ptr)
    - Write a simple value into user space
    • x - Value to copy to user space
    • ptr - Destination address in user space
  • get_user(x, ptr)
    - Get a simple variable from user space
    • x - Variable to store result
    • ptr - Source address in user space
  • copy_to_user(void __user *to, const void *from, unsigned long n);
    - Copy a block of data into user space
  • copy_from_user(void *to, const void __user *from, unsigned long n);
    - Copy a block of data from user space

2014年3月18日 星期二

Android build instruction


  1. build
    1. m - build all modules from the top of the tree
    2. mm - build all of the modules in current directory
    3. mmm - build all of the modules in the supplied directory
  2. make
    1. make systemimage - system.img
    2. make ramdisk - ramdisk.img
    3. make userdataimage - userdata.img
    4. make snod - build system.img quickly without checking the dependency
  3. misc
    1. croot - change directory to the top of the tree
    2. cgrep - grep on all local c/c++ files
    3. jgrep - grep on all local java files
    4. resgrep - grep on all local res/*.xml files
    5. godir - go to directory containing a file.
    6. printconfig - print the current build configuraiton

2014年3月17日 星期一

Linux init.rc (android)


Trigger sequence
   "early-init" -> "init" -> "early-fs" -> "fs" -> "post-fs" -> "early-boot" -> "boot"

At the end of "boot" trigger, start corresponding services
   class_start core
   class_start main