Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

porting B2G to SGS2 GT-I9100G device #215

Open
changyihsin opened this issue Mar 13, 2012 · 22 comments
Open

porting B2G to SGS2 GT-I9100G device #215

changyihsin opened this issue Mar 13, 2012 · 22 comments

Comments

@changyihsin
Copy link
Contributor

SGS2 has several models and uses different hardware platforms. It needs some porting efforts to support B2G on these models.
I have studied some materials from Internet, below are current status about this issue,

The device can be Rooted by flashing the kernel built from below URL.
https://github.com/AOSP-TEAM/android_kernel_samsung_i9100g
I also create a rooted initramfs when building the kernel. Following effort will be modifying device related files.

@arky
Copy link
Contributor

arky commented Mar 14, 2012

Definitely interested in this.

Related bug:
#163 (comment)

My Recent blog post on this:
http://playingwithsid.blogspot.com/2012/03/samsung-galaxy-s2-gt-i9100g-review.html

@changyihsin
Copy link
Contributor Author

Hi Arky,

I am glad to know that you are interested in this issue.
I am still working on porting B2G to this platform.

The first step is to flash kernel image built from AOSP source code.
You can checkout it from above URL.
Before building I9100G kernel, you can specify source path of initramfs in
the kernel configuration file.
The initramfs can be extracted from custom kernel(superatmos in my case) using the tool in below url
https://github.com/mistadman/Extract-Kernel-Initramfs.
I use heimdall to flash kernel to device. You can also use ODIN if you like.
After flashing kernel, you should be able to have a rooted I9100G.

@arky
Copy link
Contributor

arky commented Mar 19, 2012

@changyihsin

Last time I used that script for extract to kernel, it spewed loads of errors. Will try to run this tonight.

AOSP builds takes me about 3+ nights on my ubuntu computer, if they are not library errors. :(

Will keep you posted on this.

@ochameau
Copy link

I did more or less the same and ended up with a failing kernel (boot screen with a yellow triangle error icon)
I built kernel from opensource.samsung.com and extracted initramfs from an original kernel.

There can be many many errors. Is there a way to see some bootlog or anything that would tell me what's wrong ?
(instead of having only this failing bootscreen ...)

PS: https://github.com/mistadman/Extract-Kernel-Initramfs fails on debian as "grep -P" doesn't work there because they disable perl regexp :( (It might be failing for the same reason on some ubuntu versions)
@arky I was able to unpack a kernel on windows using asmzis - http://forum.xda-developers.com/archive/index.php/t-1152220.html

@changyihsin
Copy link
Contributor Author

@ochameau
You can use dmesg or logcat to check error messages.

@ochameau
Copy link

The thing is that my device is stuck in this booglog screen with the yellow triangle. The kernel doesn't seem to work at all, so that adb can't connect on my device :(

@changyihsin
Copy link
Contributor Author

@ochameau
I am not sure if it's related to firmware version. The firmware version of my I9100G is GINGERBREAD.ZCKI1.
I also met problem when flashing kernel image built from source code in opensource.samsung.com.
You can try to use kernel source located in below URL.
https://github.com/AOSP-TEAM/android_kernel_samsung_i9100g
Inside the source code, you can find a build.sh script, please modify it according to your compiler environment.

@ochameau
Copy link

Thanks! I'll give a try to AOSP kernel.

Otherwise, do you know any way to get some log messages?
(When a kernel doesn't work)

Like:

  • connecting the device via usb and listen with some special tools in order to get the bootlog,
  • using an emulator,
  • install a kernel via kexec or something similar,
  • ... ?

@arky
Copy link
Contributor

arky commented Mar 28, 2012

@ochameau @changyihsin

Any update on this? Were you able to flash the ASOP kernel?

@changyihsin
Copy link
Contributor Author

@arky @ochameau

You can checkout the source code from my repo located in git@github.com:changyihsin/B2G.git
Build procedure,
make config-galaxy-s2-i9100g
make kernel
make gonk
make
heimdall flash --kernel ./boot/kernel-android-galaxy-s2-i9100g/arch/arm/boot/zImage
make flash-only
make install-gaia

I have tried it on my I9100G with China version firmware I9100GZCKI1.

@arky
Copy link
Contributor

arky commented Mar 30, 2012

@changyihsin Battling build errors :)

Switched to your branch, attempting fresh build

@arky
Copy link
Contributor

arky commented Mar 30, 2012

Notice file: external/libpng/NOTICE -- out/host/linux-x86/obj/NOTICE_FILES/src//lib/libpng.a.txt
Notice file: external/bzip2/NOTICE -- out/host/linux-x86/obj/NOTICE_FILES/src//lib/libbz.a.txt
make[1]: *** No rule to make target out/host/linux-x86/framework/dx.jar', needed byout/host/linux-x86/obj/EXECUTABLES/dx-tests_intermediates/dx-tests'. Stop.
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory `/home/arky/src/B2G/glue/gonk'

@arky
Copy link
Contributor

arky commented Mar 30, 2012

Possible workaround for now: Move cts directory from the android source and continued the android sdk build.

@arky
Copy link
Contributor

arky commented Apr 12, 2012

@changyihsin

Quick question about clockwork mod. It doesn't work on this device.

Can you suggestion alternative kernel or method to back up the stock kernel.

@arky
Copy link
Contributor

arky commented Apr 12, 2012

@changyihsin @cgjones

It worked perfectly on GT-I9100G, consider merging into main samsung builds tree.

PS:Used GT-I9100G_ClockworkMod-Recovery-5.0.2.8.tar built by Teamhacksung codeworkx.

@changyihsin
Copy link
Contributor Author

@arky
Thank you for sharing information. I am checking it.

@niclashoyer
Copy link

How is the status of this issue? Is it now possible to run B2G on a i1900G? If so, can someone post instructions on how to do it?

Maybe we should change the link that points here from Mozilla MDN.

@changyihsin
Copy link
Contributor Author

@niclashoyer
You can checkout the source code from my repo located in git@github.com:changyihsin/B2G.git and switch to branch GS2-I9100G-hacked-01. Then following below procedure to build the firmware. It is based on gingerbread version. The basic function should be worked fine with this repo. You can play music/video and wifi, but we still have problems running phone app.

Build procedure,
make config-galaxy-s2-i9100g
make kernel
make gonk
make
heimdall flash --kernel ./boot/kernel-android-galaxy-s2-i9100g/arch/arm/boot/zImage
make flash-only
make install-gaia

@arky
Copy link
Contributor

arky commented Jun 6, 2012

@changyihsin Have you updated your repo to match the changes in the upstream https://github.com/mozilla-b2g/B2G source tree?

@ochameau
Copy link

@changyihsin @arky any update about this?
Is there a way to build up-to-date images for i9100g?

@changyihsin
Copy link
Contributor Author

@arky @ochameau
Currently, I am working on the other features for b2g project. May spend some of time to port b2g ICS version with new build tree on I9100G later. You can also refer to the porting guide located in https://wiki.mozilla.org/B2G/Porting and try to hack it.

@arky
Copy link
Contributor

arky commented Jun 15, 2012

@changyihsin Thank you for doing this. Much appreciated.

Please post an comment when you want me to do the build testing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants