add iphone3g support
PATCH 1/1 add iphone3g support
hi,
Android was ported to the some apple devices(iphones,ipod etc...) Fortunately the kernel is standard enough to be able to run some
GNU/Linux distributions such as SHR.
So Chris Spehn(Lopi on irc) tried an htcdream shr-image on the iphone3g
and got it working modifying the configurations files.
Then I helped him to add all theses configuration files to openembedded.
Chris Spehn is part of the iX project ( http://www.ixproject.org )
He did all the testing and the configurations files, I just helped to make
the openembedded patches.
Note that I didn't have an iphone3g for testing the changes.
Denis.
PATCH 1/4 Add initial support for iphone3g(machine config and kernel)
Android was ported to Apple's iDevices including the iPhone3G by the iDroid Project ( http://www.idroidproject.org/wiki/Main_Page ) Their kernel is standard enough to be able to run GNU/Linux distributions
such as SHR
--- conf/machine/iphone3g.conf | 27 + recipes/linux/linux-iphone/iphone3g/defconfig | 1570 +++++++++++++++++++++++++ recipes/linux/linux-iphone_git.bb | 15 + 3 files changed, 1612 insertions(+), 0 deletions(-) create mode 100644 conf/machine/iphone3g.conf create mode 100755 recipes/linux/linux-iphone/iphone3g/defconfig create mode 100644 recipes/linux/linux-iphone_git.bb
conf/machine/iphone3g.conf new file +27 -0
@@ -0,0 +1,27 @@ +#@TYPE: Machine +#@NAME: iPhone3G +#@DESCRIPTION: Machine configuration for the iPhone3G + +TARGET_ARCH = "arm" + +require conf/machine/include/tune-arm1176jzf-s.inc + +MACHINE_DISPLAY_WIDTH_PIXELS = "320" +MACHINE_DISPLAY_HEIGHT_PIXELS = "480" +MACHINE_DISPLAY_ORIENTATION = "0" + +MACHINE_FEATURES = "kernel26 touchscreen screen wifi ext2 phone gps usbgadget bluetooth" + +PREFERRED_PROVIDER_virtual/kernel = "linux-iphone" + +PREFERRED_PROVIDER_virtual/xserver = "xserver-xorg" + +XSERVER = " \ + xserver-xorg \ + xserver-xorg-extension-glx \ + xserver-xorg-extension-dri \ + xf86-input-evdev \ + xf86-video-fbdev \ +" + +IMAGE_FSTYPES ?= "tar.bz2"
recipes/linux/linux-iphone/iphone3g/defconfig new file +1570 -0
1,570 lines not on this page · raw message
recipes/linux/linux-iphone_git.bb new file +15 -0
@@ -0,0 +1,15 @@ +require linux.inc +DEPENDS += "android-image-utils-native" + +PV = "2.6.32+${PR}+gitr${SRCREV}" +PR = "r0" + +COMPATIBLE_MACHINE = "iphone3g" + +SRCREV = "f8ba07d9ba4b72bb6b29bc0ba42ceb9b1f771e04" + +SRC_URI = "\ + git://github.com/iDroid-Project/kernel_common.git;protocol=git;branch=android-2.6.32-iphone \ + file://defconfig \ +" +S = "${WORKDIR}/git"
Signature · 1 line
1.7.0.4
Re: [PATCH 1/4] Add initial support for iphone3g(machine config and kernel)
Hello.
Quoted 11 lines · Denis 'GNUtoo' Carikli
Android was ported to Apple's iDevices including the iPhone3G by the iDroid Project ( http://www.idroidproject.org/wiki/Main_Page ) Their kernel is standard enough to be able to run GNU/Linux distributions
such as SHRSigned-off-by Chris 'Lopi' Spehn <[email protected]>Signed-off-by Denis 'GNUtoo' Carikli <[email protected]>--- conf/machine/iphone3g.conf | 27 + recipes/linux/linux-iphone/iphone3g/defconfig | 1570 +++++++++++++++++++++++++ recipes/linux/linux-iphone_git.bb | 15 +
I usually split this up in twpo commits. One for the amchine file the other one for the kernel. No strong feelings on this though.
Quoted 14 lines
3 files changed, 1612 insertions(+), 0 deletions(-) create mode 100644 conf/machine/iphone3g.conf create mode 100755 recipes/linux/linux-iphone/iphone3g/defconfig create mode 100644 recipes/linux/linux-iphone_git.bbconf/machine/iphone3g.conf new file +3
-0@@ -0,0 +1,27 @@ +#@TYPE: Machine +#@NAME: iPhone3G +#@DESCRIPTION: Machine configuration for the iPhone3G
conf/machine/iphone3g.conf line 13
Quoted 10 lines
conf/machine/iphone3g.conf new file +10
-0+ +TARGET_ARCH = "arm" + +require conf/machine/include/tune-arm1176jzf-s.inc + +MACHINE_DISPLAY_WIDTH_PIXELS = "320" +MACHINE_DISPLAY_HEIGHT_PIXELS = "480" +MACHINE_DISPLAY_ORIENTATION = "0" + +MACHINE_FEATURES = "kernel26 touchscreen screen wifi ext2 phone gps usbgadget bluetooth"
For what do you need ext2 here? Is the project that far that it actually reflashes the device to run ext2 on the internal nand or does the iphone has a secret SD controller I don't know about? :)
Machine and kernel recipes are looking good.
regards
Stefan Schmidt
Re: [PATCH 1/4] Add initial support for iphone3g(machine config and kernel)
The file system is currently emulated. We mount the loopback image formatted as ext2 from the iOS partition. I think I misunderstood what ext2 actually does in the machine configuration file. Although, in the future the iDroid project plans to partition the NAND. When this will get done, I have no idea. I could probably remove gps and bluetooth from MACHINE_FEATURES as well since I have not implemented those features yet.
Quoted 59 lines · Stefan Schmidt
Hello.
Quoted 11 lines · Denis 'GNUtoo' Carikli
Android was ported to Apple's iDevices including the iPhone3G by the iDroid Project ( http://www.idroidproject.org/wiki/Main_Page ) Their kernel is standard enough to be able to run GNU/Linux distributions such as SHR
Signed-off-by Chris 'Lopi' Spehn <[email protected]>Signed-off-by Denis 'GNUtoo' Carikli <[email protected]>---
conf/machine/iphone3g.conf | 27 + recipes/linux/linux-iphone/iphone3g/defconfig | 1570 +++++++++++++++++++++++++ recipes/linux/linux-iphone_git.bb | 15 +I usually split this up in twpo commits. One for the amchine file the other one for the kernel. No strong feelings on this though.
Quoted 14 lines
3 files changed, 1612 insertions(+), 0 deletions(-)create mode 100644
conf/machine/iphone3g.conf
create mode 100755 recipes/linux/linux-iphone/iphone3g/defconfig create mode 100644 recipes/linux/linux-iphone_git.bbconf/machine/iphone3g.conf new file +3
-0@@ -0,0 +1,27 @@ +#@TYPE: Machine +#@NAME: iPhone3G +#@DESCRIPTION: Machine configuration for the iPhone3Gconf/machine/iphone3g.conf line 13
Quoted 10 lines
conf/machine/iphone3g.conf new file +10
-0+ +TARGET_ARCH = "arm" + +require conf/machine/include/tune-arm1176jzf-s.inc + +MACHINE_DISPLAY_WIDTH_PIXELS = "320" +MACHINE_DISPLAY_HEIGHT_PIXELS = "480" +MACHINE_DISPLAY_ORIENTATION = "0" + +MACHINE_FEATURES = "kernel26 touchscreen screen wifi ext2 phone gps usbgadget bluetooth"For what do you need ext2 here? Is the project that far that it actually reflashes the device to run ext2 on the internal nand or does the iphone has a secret SD controller I don't know about? :)
Machine and kernel recipes are looking good.
Acked-by Stefan Schmidt <[email protected]>regards
Stefan Schmidt_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
Re: [PATCH 1/4] Add initial support for iphone3g(machine config and kernel)
Hello.
Quoted 7 lines · Chris Spehn
The file system is currently emulated. We mount the loopback image formatted as ext2 from the iOS partition. I think I misunderstood what ext2 actually does in the machine configuration file. Although, in the future the iDroid project plans to partition the NAND. When this will get done, I have no idea. I could probably remove gps and bluetooth from
MACHINE_FEATURESas well since I have not implemented those features yet.
Thanks for the explanation. Its no big deal to leave them in for now even if the kernel support is not ready yet. GNUtoo, its up to you if you want to commit the patch or remove the features before commiting.
regards
Stefan Schmidt
PATCH 2/4 netbase: add iphone3g support
In reply to Denis 'GNUtoo' CarikliWithout that patch, the user can't ssh into his device,
because usb0 is not up on the device side
--- recipes/netbase/netbase/iphone3g/interfaces | 20 ++++++++++++++++++++ recipes/netbase/netbase_4.21.bb | 2 +- 2 files changed, 21 insertions(+), 1 deletions(-) create mode 100644 recipes/netbase/netbase/iphone3g/interfaces
recipes/netbase/netbase/iphone3g/interfaces new file +20 -0
@@ -0,0 +1,20 @@ +# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8) + +# The loopback interface +auto lo +iface lo inet loopback + +# Ethernet/RNDIS gadget (g_ether) +# ... or on host side, usbnet and random hwaddr +auto usb0 +iface usb0 inet static + address 192.168.0.202 + netmask 255.255.255.0 + network 192.168.0.0 + up route add default gw 192.168.0.200 metric 8 + up echo nameserver 208.67.222.222 > /etc/resolv.conf + up echo nameserver 208.67.220.220 >> /etc/resolv.conf + down route del default gw 192.168.0.200 metric 8 + +auto wlan0 +iface wlan0 inet dhcp
recipes/netbase/netbase_4.21.bb +1 -1
@@ -2,7 +2,7 @@ DESCRIPTION = "This package provides the necessary \ infrastructure for basic TCP/IP based networking." SECTION = "base" LICENSE = "GPLv2" -PR = "r49" +PR = "r50" inherit update-rc.d
Signature · 1 line
1.7.0.4
Re: [PATCH 2/4] netbase: add iphone3g support
Hello.
Quoted 5 lines · Denis 'GNUtoo' Carikli
Without that patch, the user can't ssh into his device,
because usb0 is not up on the device sideSigned-off-by Chris 'Lopi' Spehn <[email protected]>Signed-off-by Denis 'GNUtoo' Carikli <[email protected]>
regards
Stefan Schmidt
PATCH 3/4 xserver-xorg-conf: add iphone3g support
In reply to Denis 'GNUtoo' Carikli--- .../xserver-xorg-conf/iphone3g/xorg.conf | 31 ++++++++++++++++++++ recipes/xorg-xserver/xserver-xorg-conf_0.1.bb | 2 +- 2 files changed, 32 insertions(+), 1 deletions(-) create mode 100644 recipes/xorg-xserver/xserver-xorg-conf/iphone3g/xorg.conf
recipes/xorg-xserver/xserver-xorg-conf/iphone3g/xorg.conf new file +31 -0
@@ -0,0 +1,31 @@ +Section "Device" + Identifier "Builtin Default fbdev Device 0" + Driver "fbdev" + Option "ShadowFB" "on" + #Option "Rotate" "CW" # comment for disabling rotation +EndSection + +Section "Screen" + Identifier "Builtin Default fbdev Screen 0" + Device "Builtin Default fbdev Device 0" +EndSection + + +Section "InputDevice" + Identifier "touchscreen" + Driver "evdev" + Option "Device" "/dev/input/event2" + Option "Calibration" "0 4602 0 7306" + Option "ReportingMode" "Raw" + Option "SendCoreEvents" "On" + Option "GrabDevices" "True" + Option "InvertY" "0" + Option "SwapAxes" "0" +EndSection + + +Section "ServerLayout" + Identifier "Builtin Default Layout" + Screen "Builtin Default fbdev Screen 0" + InputDevice "touchscreen" "CorePointer" "AlwaysCore" +EndSection
recipes/xorg-xserver/xserver-xorg-conf_0.1.bb +1 -1
@@ -1,5 +1,5 @@ DESCRIPTION = "Machine specific xorg.conf files" -PR = "r37" +PR = "r38" SRC_URI = "file://xorg.conf"
Signature · 1 line
1.7.0.4
Re: [PATCH 3/4] xserver-xorg-conf: add iphone3g support
Hello.
Quoted 21 lines · Denis 'GNUtoo' Carikli
Signed-off-by Chris 'Lopi' Spehn <[email protected]>Signed-off-by Denis 'GNUtoo' Carikli <[email protected]>--- .../xserver-xorg-conf/iphone3g/xorg.conf | 31 ++++++++++++++++++++ recipes/xorg-xserver/xserver-xorg-conf_0.1.bb | 2 +- 2 files changed, 32 insertions(+), 1 deletions(-) create mode 100644 recipes/xorg-xserver/xserver-xorg-conf/iphone3g/xorg.confrecipes/xorg-xserver/xserver-xorg-conf/iphone3g/xorg.conf new file +7
-0@@ -0,0 +1,31 @@ +Section "Device" + Identifier "Builtin Default fbdev Device 0" + Driver "fbdev" + Option "ShadowFB" "on" + #Option "Rotate" "CW" # comment for disabling rotation +EndSection +
recipes/xorg-xserver/xserver-xorg-conf/iphone3g/xorg.conf line 17
Quoted 10 lines
recipes/xorg-xserver/xserver-xorg-conf/iphone3g/xorg.conf new file +10
-0+Section "Screen" + Identifier "Builtin Default fbdev Screen 0" + Device "Builtin Default fbdev Device 0" +EndSection + + +Section "InputDevice" + Identifier "touchscreen" + Driver "evdev" + Option "Device" "/dev/input/event2"
Are you sure that it always is event2? The nodes are assigned dynamically normally and we have /dev/touchscreen to work around this
recipes/xorg-xserver/xserver-xorg-conf/iphone3g/xorg.conf line 18
Quoted 1 line
recipes/xorg-xserver/xserver-xorg-conf/iphone3g/xorg.conf new file +1
-0+ Option "Calibration" "0 4602 0 7306"
Why here? We happen to use the pointercal file for this.
regards
Stefan Schmidt
Re: [PATCH 3/4] xserver-xorg-conf: add iphone3g support
I think Jama mentioned this to me on irc in #openmoko-cdevel, but I simply forgot about it. I can make a pointercal file instead of using the xorg.conf option.
Quoted 50 lines · Stefan Schmidt
Hello.
Quoted 21 lines · Denis 'GNUtoo' Carikli
Signed-off-by Chris 'Lopi' Spehn <[email protected]>Signed-off-by Denis 'GNUtoo' Carikli <[email protected]>---
.../xserver-xorg-conf/iphone3g/xorg.conf | 31 ++++++++++++++++++++ recipes/xorg-xserver/xserver-xorg-conf_0.1.bb | 2 +-2 files changed, 32 insertions(+), 1 deletions(-)create mode 100644
recipes/xorg-xserver/xserver-xorg-conf/iphone3g/xorg.confrecipes/xorg-xserver/xserver-xorg-conf/iphone3g/xorg.conf new file +7
-0@@ -0,0 +1,31 @@ +Section "Device" + Identifier "Builtin Default fbdev Device 0" + Driver "fbdev" + Option "ShadowFB" "on" + #Option "Rotate" "CW" # comment for disabling rotation +EndSection +recipes/xorg-xserver/xserver-xorg-conf/iphone3g/xorg.conf line 17
Quoted 10 lines
recipes/xorg-xserver/xserver-xorg-conf/iphone3g/xorg.conf new file +10
-0+Section "Screen" + Identifier "Builtin Default fbdev Screen 0" + Device "Builtin Default fbdev Device 0" +EndSection + + +Section "InputDevice" + Identifier "touchscreen" + Driver "evdev" + Option "Device" "/dev/input/event2"Are you sure that it always is event2? The nodes are assigned dynamically normally and we have
/dev/touchscreento work around thisrecipes/xorg-xserver/xserver-xorg-conf/iphone3g/xorg.conf line 18
Quoted 1 line
recipes/xorg-xserver/xserver-xorg-conf/iphone3g/xorg.conf new file +1
-0+ Option "Calibration" "0 4602 0 7306"Why here? We happen to use the pointercal file for this.
regards
Stefan Schmidt_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
Re: [PATCH 3/4] xserver-xorg-conf: add iphone3g support
Hello.
Quoted 3 lines · Chris Spehn
I think Jama mentioned this to me on irc in #openmoko-cdevel, but I simply forgot about it. I can make a pointercal file instead of using the xorg.conf option.
The hardcoded input device worries me a bit more then the ts calibration. :)
The other three pathces are fine to go in via GNUtoo. And if you can tell my why it always will be the same device this one is fine, too. :)
regards
Stefan Schmidt
Re: [PATCH 3/4] xserver-xorg-conf: add iphone3g support
When I was using Ubuntu and other distributions, the touch screen was always located under /dev/input/event1. For some reason, SHR places it under /dev/input/event2. I can't tell you why either because I have no idea. I can tell you that every time I have booted SHR the touchscreen has been located under event2.
Quoted 20 lines · Stefan Schmidt
Hello.
Quoted 3 lines · Chris Spehn
I think Jama mentioned this to me on irc in #openmoko-cdevel, but I simply forgot about it. I can make a pointercal file instead of using the xorg.conf option.
The hardcoded input device worries me a bit more then the ts calibration. :)
The other three pathces are fine to go in via GNUtoo. And if you can tell my why it always will be the same device this one is fine, too. :)
regards
Stefan Schmidt_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
PATCH 4/4 alsa-state: add iphone3g support
In reply to Denis 'GNUtoo' CarikliThe state file has 121 controls(yes 121).
So this patch makes sound work out of the box, without
making the user mess with this 121 controls(if he does he would spend hours trying to figure out how to make it work)
--- recipes/alsa/alsa-state.bb | 2 +- recipes/alsa/alsa-state/iphone3g/asound.state | 1084 +++++++++++++++++++++++++ 2 files changed, 1085 insertions(+), 1 deletions(-) create mode 100644 recipes/alsa/alsa-state/iphone3g/asound.state
recipes/alsa/alsa-state.bb +1 -1
@@ -7,7 +7,7 @@ DESCRIPTION = "Alsa Scenario Files" LICENSE = "MIT" PV = "0.2.0" -PR = "r21" +PR = "r22" SRC_URI = "\ file://asound.conf \
recipes/alsa/alsa-state/iphone3g/asound.state new file +1084 -0
1,084 lines not on this page · raw message
Signature · 1 line
1.7.0.4
Re: [PATCH 4/4] alsa-state: add iphone3g support
Hello.
Quoted 7 lines · Denis 'GNUtoo' Carikli
The state file has 121 controls(yes 121).
So this patch makes sound work out of the box, without
making the user mess with this 121 controls(if he does he would spend hours trying to figure out how to make it work)Signed-off-by Chris 'Lopi' Spehn <[email protected]>Signed-off-by Denis 'GNUtoo' Carikli <[email protected]>
regards
Stefan Schmidt
Quoted 3 lines · Denis 'GNUtoo' Carikli
Android was ported to the some apple
devices(iphones,ipod etc...)Fortunately the kernel is standard enough to be able to run some
GNU/Linux distributions such as SHR.
...
Quoted 6 lines
Chris Spehn is part of the iX project ( http://www.ixproject.org )
He did all the testing and the configurations files, I just helped to make
the openembedded patches.Note that I didn't have an iphone3g for testing the changes.
There is an iphone3g in this household... Is testing possible without permanent modifications to the iphone? The above website is "suspended" and it's hard to imagine, given that there is no SDHC card in the iPhone.
If it's possible I would like to talk the iphone owner into trying it :-D
Vitus
Signature · 2 lines
Vitus Jensen, Hannover, Germany, Universe (current) pgp public key available from keyservers
Another person pays for the website hosting and domain name. I asked him if he would transfer the domain name to me, but he hasn't responded yet via email. There are a few requirements to run SHR on the iPhone:
1) The iPhone must be jailbroken. You must use redsn0w or any of the pwn varietes (QuickPWN, PwnageTool, etc.) You can reverse this by restoring with iTunes.
2) At the very least, you have to copy the SHR image to the iPhone.
3) You can load the bootloader, OpeniBoot, into ram without installing it and boot the distribution manually.
4) You must extract the multi touch firmware, download the wifi firmware, and place them inside the ramdisk.
However, it's much easier to use a Cydia application called "Bootlace" to automatically install OpeniBoot, get the firmware files, and download the android images to the phone. You can use the uninstall feature in Bootlace to remove everything but the jailbreak. This simplifies the process quite a bit. You would only be required to copy the SHR image over via ssh or with a tool called ifuse on Linux as well as copy the firmware files to your computer to place inside the ramdisk. You could then manually boot the distribution with OpeniBoot console. If he is already jailbroken you could return the device and he would never know you did it. If you have any questions about the process I can explain more in detail. I'm extremely tired so I apologize in advance if I overlooked something or gave a poor explanation.
Chris
Quoted 32 lines · Vitus Jensen
Quoted 3 lines · Denis 'GNUtoo' Carikli
Android was ported to the some apple
devices(iphones,ipod etc...)Fortunately the kernel is standard enough to be able to run some GNU/Linux distributions such as SHR....
Quoted 7 lines
Chris Spehn is part of the iX project ( http://www.ixproject.org )
He did all the testing and the configurations files, I just helped to make the openembedded patches.
Note that I didn't have an iphone3g for testing the changes.
There is an iphone3g in this household... Is testing possible without permanent modifications to the iphone? The above website is "suspended" and it's hard to imagine, given that there is no SDHC card in the iPhone.
If it's possible I would like to talk the iphone owner into trying it :-D
Vitus
--
Vitus Jensen, Hannover, Germany, Universe (current) pgp public key available from keyservers_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel