Hirdetés

2024. május 4., szombat

Gyorskeresés

Hozzászólások

(#34) DrojDtroll


DrojDtroll
addikt

Sign in
Register
Home
Projects
Help
Search:
iX

Overview
Activity
Issues
News
Documents
Wiki
Unofficial Development Guide

Technical documentation
08/18/2010

# Guide to configuring and installing iX.
# Anything that starts with # is a comment line
# You need an Ubuntu 9.10 install or virtual machine to complete this guide.
# You need the following zip file: www.jump.fm/YXJUF
# Written by Lopi

##############################################################################################################################################
Compile Ubuntu from the armel Karmic repository. Insert the tar into an image. Run the image in qemu (arm emulator) to finish configuration.
##############################################################################################################################################

# Make a new directory on your Desktop called ubuntu. Change to the ubuntu directory.
mkdir ubuntu

#Extract the contents of touch.zip to your Desktop
# Move the files from touch.zip into the ubuntu folder.
mv xorg.conf ~/Desktop/ubuntu/
mv xserver-xorg-input-evdev_2.3.2-5ubuntu1_armel.deb ~/Desktop/ubuntu

# Install rootstock
sudo apt-get install rootstock

# Generate armel tar for karmic
sudo rootstock --fqdn ix --login ix --password ix --dist karmic

# Create an image file named iX.img
dd if=/dev/zero of=iX.img bs=1MB count=0 seek=1024

# Make the iX.img filesystem ext2
mkfs.ext2 -F iX.img

# Get the vmlinuz kernel to run iX.img in qemu
sudo wget http://ports.ubuntu.com/ubuntu-ports/dists/lucid/main/installer-armel/current/images/versatile/netboot/vmlinuz

# Make a new directory called debmount. We will use this directory to mount iX.img.
mkdir debmount

# Mount the iX.img to debmount
sudo mount -o loop iX.img debmount

# Extract the contents of armel.tar to debmount
sudo tar -C debmount/ -zxf NameOfArmel.tar

# Copy xorg.conf and xserver-xorg-input-evdev_2.3.2-5ubuntu1_armel.deb to /root/ of iX.img
cp -f xorg.conf debmount/root/
cp -f xserver-xorg-input-evdev_2.3.2-5ubuntu1_armel.deb debmount /root/

# Unmount debmount
sudo umount debmount

# Now that we have an image ready to configure. We will emulate the iPhone using qemu to further configure the image.
sudo qemu-system-arm -M versatilepb -cpu cortex-a8 -kernel ./vmlinuz -hda iX.img -net user -net nic -m 256 -append "root=/dev/sda mem=256M devtmpfs.mount=0 rw"

# Once the image boots up. Login with ix:ix
# Use DHCP to connect to the network
sudo dhclient eth0

# Install xorg
sudo apt-get install xorg

# Install a window manager. Use xfce4 or icewm. I have been using xfce4.
sudo apt-get install xfce4

# Install nano to edit configuration files
sudo apt-get install nano

# Install cellwriter
sudo apt-get install cellwriter

# Change the root password
sudo passwd root

# Become root
su

# Edit tty1.conf to automatically login.
nano /etc/init/tty1.conf
#Put the following at the end of the file:
exec /bin/login -f root < /dev/tty1 > /dev/tty1 2>&1
# Control + O saves the file. Enter confirms the filename. Control + X exits the file.
Press Control+O. Press Enter. Press Control+X.

# Change to the root directory
cd /root

# Edit .bashrc to make x start at boot
nano .bashrc
#Put the following at the end of the file
if [ $(tty) == "/dev/tty1" ]; then
startx
fi
# Control + O saves the file. Enter confirms the filename. Control + X exits the file.
Press Control+O. Press Enter. Press Control+X.

# Install wireless-tools to use iwconfig
apt-get install wireless-tools

# Install openssh-server
apt-get install openssh-server

# Configure wifi interfaces file
sudo nano /etc/network/interfaces
# Add the following lines to the end of the file.
auto wlan0
iface wlan0 inet dhcp

# Configure wifi at boot
sudo nano /root/.bashrc
# Add the following lines to the end of the file.
sleep 5
iwconfig wlan0 essid ssid
iwconfig wlan0 key s:ASCIIKEY
dhclient wlan0

# Change directory to /root/ and install evdev.
cd root
dpkg -i xserver-xorg-input-evdev_2.3.2-5ubuntu1_armel.deb

# Copy xorg.conf file to /etc/X11/
cp -f xorg.conf /etc/X11/

# Shut down the system
poweroff

# Wait until QEMU says "System halted" and click the x to exit. You can also Control + C in your terminal.
# Make a directory called backup. Copy the image you created to the directory backup.
mkdir backup ; cp iX.img backup

#################################################################################################
How to boot the freshly created Ubuntu image on your iPhone.

Required Files: initrd.img.gz - Needs to be on your Desktop.
zImage - Needs to be on your Desktop.
oibc - Needs to be on your Desktop.
iX.img - Needs to be in /private/var on your iPhone.

Note: zImage is the kernel we use in Android. You should already have this file.
You need to get initrd.img.gz from James.
oibc comes from downloading OpeniBoot
iX.img is the Ubuntu image you created
#################################################################################################

# Make sure you have the required files on your Desktop.
cd /home/user/Desktop
ls

# We need to power off the iPhone and turn it back on.
Do this by holding the power button. Slide to poweroff.
Once your iPhone is turned off. Hold the power button for a few seconds to turn it back on.

# You should now be sitting at the OpeniBoot screen on your iPhone.
Boot into OpeniBoot console.

# You need to do this a couple seconds after selecting OpeniBoot console. This may take a few tries.
sudo ./oibc

# Openiboot console should now be loaded in your terminal and on your iPhone.
# We need to transfer the kernel.
!zImage

# Set OpeniBoot to use the file we uploaded as the kernel.
kernel

# We need to upload the ramdisk.
!initrd.img.gz

# Set OpeniBoot to use the file we uploaded as the ramdisk.
ramdisk

# Tell the kernel to boot Ubuntu
boot "root=/dev/ram0 init=/init rw"

######################################################################################################
How to test sound:
(1) iX must be currently running on your iDevice
(2) You must have an ssh session open on your device
######################################################################################################

#Plug in a pair of headphones once iX has booted
# Install mpg321
apt-get install mpg321

# wget an mp3 file
wget file.mp3

# Play the mp3 with mpg321
mpg321 -v -o alsa file.mp3

Files

Hosted by Nick Pack

Copyright © 2000-2024 PROHARDVER Informatikai Kft.