Changes between Version 5 and Version 6 of ArtemisInstall


Ignore:
Timestamp:
Mar 21, 2011, 10:39:21 AM (9 years ago)
Author:
pespin
Comment:

moved to Devices/HTCArtemis/InstallGuide

Legend:

Unmodified
Added
Removed
Modified
  • ArtemisInstall

    v5 v6  
    1 = Introduction =
    2 This guide applies to the HTC Artemis (P3300), which runs WinCE
    31
    4 This guide will show you how to have a running SHR system, using haret bootloader and booting from SD card
    5 
    6 Kernel comes from linwizard/wing-linux project.
    7 
    8 
    9 ----
    10 
    11 = Build =
    12 
    13 == You will need ==
    14  * For now, a Linux installation on your PC.eg., Ubuntu.
    15  * A working OpenEmbedded tree (with SHR Makefile)
    16 
    17 == Configuring stuff ==
    18 
    19 From now on, we'll conside that ''/OE'' is the root path of your OE tree.
    20 
    21 === Setting machine ===
    22 
    23 in ''/OE/conf/local.conf'', add (or replace in case you arelady have some MACHINE var):
    24 {{{
    25 MACHINE="htcartemis"
    26 }}}
    27 
    28 
    29 === Creating new branch ===
    30 
    31 As we will be modifying some OE stuff, it's better to create a separate git branch for it. For instance, in ''/OE/shr-unstable/openembedded/'' we'll do:
    32 {{{
    33 $ git branch artemis master # creates a branch for all the artemis stuff we'll add
    34 $ git checkout artemis # switch to the desired artemis branch to start using it.
    35 }}}
    36 
    37 === Patching ===
    38 At the moment of writing this  patch, htcartemis OE support is not present in upstream, you'll need to apply all the patches in this dir, in order:
    39 [http://pespin.espeweb.net/patches/artemis/]
    40 
    41 and after those are applied, you need to apply this little one too:
    42 [http://pespin.espeweb.net/patches/0002-xorg-xserver-common.inc-change-DISTRO_XORG_CONFIG_MA.patch]
    43 
    44 '''Be aware that the last patch at this moment breaks buildage of SHR distro for other machines in the branch we are using, so remember switching to master branch before building for other machines'''
    45 
    46 
    47 How to apply patches? It's easy. Move to ''/OE/shr-unstable/openemebedded'', download all the patches above and then run:
    48 {{{
    49 $ for p in `ls *.patch`; do git apply $p; done
    50 }}}
    51 
    52 === Bitbaking image and kernel ===
    53 
    54 just run this in ''/OE/shr-unstable'':
    55 {{{
    56 . ./setup-env
    57 bitbake shr-lite-image
    58 }}}
    59 
    60 This can take some time. From few hours to some days, depending on the computer you are building on.
    61 
    62 === Getting the generated image and kernel ===
    63 
    64 Once it has finished without errors, you'll find them in ''/OE/shr-unstable/tmp/deploy/images/htcartemis/''
    65 
    66 Kernel image has usually a .bin extension.
    67 rootfs image has usually a .tar.gz extension.
    68 
    69 
    70 ----
    71 
    72 = Installation =
    73 
    74 == You will need ==
    75  * For now, a Linux installation on your PC.eg., Ubuntu.
    76  * a microSD
    77  * [http://pespin.espeweb.net/artemis/images/vfat/haret-0.5.2.exe haret] bootloader
    78 
    79 
    80 == Formatting your MicroSD card ==
    81 
    82 Put your SD card into your reader, and attach your reader to your PC.
    83 
    84 '''Note: You cannot format your MicroSD card in the phone. Ensure you use a reader.'''
    85 
    86 Basically you will format the card in to two partitions:
    87 * 1st partition: <vfat> (about 64MB of space needed) where we'll put all the necessary stuff for haret to boot linux from WinCE: haret binary, haret config file, kernel binary, initramfs.cio.gz
    88 * 2nd partition: <ext2/3/4> rootfs partition
    89 
    90 == Filling the vfat partition ==
    91 
    92 Let's suppouse your vfat partition is mounted in ''/media/sd1'':
    93 
    94 You'll finish having something similar to this:
    95 {{{
    96 -rwxr-xr-x    1 root     root         255 Jan 31 03:12 default.txt
    97 -rwxr-xr-x    1 root     root      157.0K Aug 26 21:00 haret-pre-0.5.2.exe
    98 -rwxr-xr-x    1 root     root        4.0M Jan  1  2000 initramfs.cpio.gz
    99 -rwxr-xr-x    1 root     root        1.5M Aug 26 22:34 zImage
    100 }}}
    101 
    102 === Writing haret settings ===
    103 in ''/media/sd1/default.txt'', write:
    104 {{{
    105 set MTYPE 1462
    106 set KERNEL "zImage"
    107 set INITRD "initramfs.cpio.gz"
    108 set CMDLINE "quiet root=/dev/mmcblk0p2 init=/sbin/init rootdelay=5 loglevel=8 console=tty0 video=omapfb:accel gsm-wizard.noreset=1 gsm-wizard.noload=1 5"
    109 log "earlylog.txt"
    110 bootlinux
    111 }}}
    112 
    113 === Acquiring haret ===
    114 
    115 At the time when this guide is being written, the webpage where haret project is suppoused to be hosted is down for maintenance.
    116 You can download it from [http://pespin.espeweb.net/artemis/images/vfat/haret-0.5.2.exe here].
    117 
    118 Put it in ''/media/sd1/haret-0.5.2.exe''.
    119 
    120 === Acquiring initramfs ===
    121 
    122 At the moment I haven't tried to generate initramfs using OpenEmbedded. You can get one from [http://pespin.espeweb.net/artemis/images/vfat/initramfs.cpio.gz here] thought.
    123 
    124 Put it in ''/media/sd1/initramfs.cpio.gz''
    125 
    126 
    127 === Acquiring the kernel ===
    128 
    129 Get it from your tmp/deploy/images/htcartemis/zImage-htcartemis-... once it has been built by OE.
    130 
    131 Rename it to zImage and put it in as ''/media/sd1/zImage''
    132 
    133 
    134 == Filling the ext partition ==
    135 
    136 Extracting SHR image into root filesystem.
    137 
    138 Let's suppouse you mounted the ext partition (2nd partion in your SD) into ''/media/sd2''.
    139 
    140 Simply extract the tarball to it as root (very important) For instance,if the shr-image was downloaded in /home/user/Downloads/full-htcartemis.tar.gz do:
    141 
    142 {{{
    143  cd /media/sd2
    144  sudo tar xvzpf home/user/Downloads/full-htcartemis.tar.gz
    145  cd
    146 }}}
    147 
    148 Then unmount the SD card. Ensure that you wait for the SD card to be unmounted before removing it or the reader. Then put the SD card into your phone.
    149 
    150 == Booting the phone from WinCE ==
    151 
    152 Once your WinCE OS is fully loaded, go to the file explorer and open it. Navigate to your microSD vfat partition and you'll find there the haret executable you did install there before. Just run it, and a menu with a "run" button will appear. Press it, and haret will boot the linux kernel with the rootfs on the 2nd partition.
    153 
    154 
    155 Now, wait a ''very long'' time for SHR post-install configuration screen to come up.
    156 
    157 You'll finally see XServer appear.
    158 
    159 
    160 ----
    161 
    162 = Post-install configuration =
    163 
    164 === Network tweaks ===
    165 
    166 I don't know why usb0 network interface is not initialize correctly, and there's nothing in /etc/resolv.conf, so we need this in '''/etc/init.d/htcartemis''':
    167 
    168 {{{
    169 #! /bin/sh
    170 case "$1" in
    171 start)         
    172         echo "Running PESPIN init script"
    173 
    174         ifconfig usb0 192.168.2.202 >/log-pespin-ifconfig-exec  2>&1
    175 
    176         echo "nameserver 209.67.222.222" > /etc/resolv.conf
    177         echo "nameserver 208.67.220.220" >> /etc/resolv.conf
    178 
    179         route add default gw 192.168.2.200 metric 8
    180        
    181         ;;
    182 esac
    183 
    184 
    185 exit 0
    186 }}}
    187 
    188 
    189 Then link it to runlevel 5:
    190 
    191 {{{
    192 ln -s /etc/init.d/htcartemis /etc/rc5.d/S89htcartemis
    193 }}}
    194 
    195 
    196 
    197 === GUI tweaks ===
    198 
    199 In '''/etc/profile.d/elementary.sh''', set the following variables:
    200 
    201 {{{
    202 export ELM_SCALE=1
    203 export ELM_FINGER_SIZE=40
    204 }}}
    205