How to build your own custom Galaxy Camera kernel

Search This thread

AdamOutler

Retired Senior Recognized Developer
Feb 18, 2011
5,224
9,826
Miami, Fl̨̞̲̟̦̀̈̃͛҃҅͟orida
Hey guys, Samsung's repository at opensource.samsung.com is fubar. Team "Hey, just got up" would like to make building a kernel easier for you.

Introduction
Elite Recognized Developer Rebellos and myself decided to make an easy-to-work-with repository. We've applied several changes which result in no fuss with making kernel. It is our hope that this increases development on the Samsung Galaxy Camera. Feel free to fork this repository and build your own with tweaks!


Getting Started
Prerequisites: You will need an Ubuntu desktop/laptop computer. You can get Ubuntu here: http://www.ubuntu.com/download/desktop

Installing Software Essentials
First, you will want to install a couple of packages from the terminal. These packages are the build essentials and git, as well as abootimg for packaging.
Code:
sudo apt-get install build-essential git abootimg
Now you need the source code. Download the source code with this command:
Code:
git clone https://github.com/adamoutler/EK-GC100_Galaxy_Camera.git


Building the Kernel
Run the following commands to build the kernel and package it into Odin and Heimdall flashable formats.
Code:
cd EK-GC100_Galaxy_Camera
make gc1pq_00_defconfig; make -j8;
abootimg --create boot.img -f tools/testing/bootimgpack/bootimg.cfg -r tools/testing/bootimgpack/initrd.img -k arch/arm/boot/zImage
tar -H ustar -c boot.img >boot.tar; md5sum boot.tar >> boot.tar;mv boot.tar boot.tar.md5; gzip boot.tar.md5 -c -v > boot.tar.md5.gz

Congratulations! You've built a Heimdall-flashable boot.bin and a Odin-flashable boot.tar.md5.gz . This file will boot your device into Linux and Android. It's that simple.

Source
Change Logs are available here: https://github.com/adamoutler/EK-GC100_Galaxy_Camera/commits/master
All source code is available here: https://github.com/adamoutler/EK-GC100_Galaxy_Camera

Thanks
To Elite Recognized Developer Chainfire for sharing his knowledge about Samsung Kernels and their problems https://plus.google.com/104711040110222472212/posts/2JRZQsqhDSc
To Elite Recognized Developers Rebellos and Entropy512 for helping me to learn git. I usually work with Subversion. This was my first time with Git.

Downloads
As of 9JAN2012 the only changes we have made to the source are to make the build process work and turn on UART logging for Open Galaxy Bootloader debugging. These are the resulting files as of today's build.
Heimdall flashable boot.img: http://d-h.st/x2X
Odin flashable boot.tar.md5.gz: http://d-h.st/jPz
 
Last edited:

Entropy512

Senior Recognized Developer
Aug 31, 2007
14,088
25,086
Owego, NY
Couple additional tips (for all, I've already given you these on gtalk...)

Keep initramfs in a second repo
Git doesn't like empty directories but initramfs needs them. Some people use .gitignore but this is less obvious than putting in a file called EMPTY_DIRECTORY - This strategy comes from LinuxBozo, who is an utterly awesome developer and honestly a lot of the stuff I know I learned from him. As a result, I call setting up initramfs this way "LinuxBozoizing the directory strategy"
See https://github.com/Entropy512/kernel_n8013_ics/blob/master/build_kernel_n8013.sh for an example of a file that autobuilds the kernel and pulls in the initramfs from another repo. Inspiration for that comes from multiple sources - LinuxBozo, h8rift, and gtg465x for some of the initial concepts, and gokhanmoral for how to do Exynos 4412 boot images. You can probably replace mkbootimg with abootimg though - good idea there!
 

fatbuccha

Senior Member
Nov 8, 2008
409
40
Calgary
hi adam, do you think we can activate smart dock mode by adding a 40.2k ohm resistor on a usb otg id pin. I Want to use otg and charging at the same time for my gcam, i read in s3 forum that they were able to do it and since gcam and s3 has identical specs.

I checked your source and found under \drivers\misc\max77693-muic.c it has these option, i dunno if it was compiled in the stock rom, is this kernel related?

Thanks

Sent from my GT-I9100 using xda app-developers app
 

AdamOutler

Retired Senior Recognized Developer
Feb 18, 2011
5,224
9,826
Miami, Fl̨̞̲̟̦̀̈̃͛҃҅͟orida
hi adam, do you think we can activate smart dock mode by adding a 40.2k ohm resistor on a usb otg id pin. I Want to use otg and charging at the same time for my gcam, i read in s3 forum that they were able to do it and since gcam and s3 has identical specs.

I checked your source and found under \drivers\misc\max77693-muic.c it has these option, i dunno if it was compiled in the stock rom, is this kernel related?

Thanks

Sent from my GT-I9100 using xda app-developers app

USB and charging should be 100% kernel.
 
  • Like
Reactions: fatbuccha

fatbuccha

Senior Member
Nov 8, 2008
409
40
Calgary
@adam thanks, i tried making the cable with the resistors, but it didn't work. It said unsupported ADC 0X10 and this should be the smart dock mode on your source.

Is your source for 4.1.1 or 4.1.2? Coz maybe i need to update to 4.1.2, i am still on 4.1.1

Already tried 4x10k ohm and 1x39k + 1x1.2k still wont work. If i connect the resistors, it will charge the phone but loose Otg and if no resistor only otg mode... any idea why this is happening?

Sent from my GT-I9100 using xda app-developers app
 

fatbuccha

Senior Member
Nov 8, 2008
409
40
Calgary
@pileiba sad to say it doesnt work, already bought one of those but it only provides power on the usb device connected not charging the phone, i hope mr adam can comment on this, really want this to work...

Sent from my GT-I9100 using xda app-developers app
 

fatbuccha

Senior Member
Nov 8, 2008
409
40
Calgary
If i add a 40.2k resistors, it does charge the phone but lose OTG function. Check the log and i think it did detect the 40.2k resistor but it is unsupported. Wierd part is, the source from adam has a support for this resistor, thanks for the link, will try to find some clues there

Sent from my GT-I9100 using xda app-developers app
 

twerd

New member
Jul 3, 2015
1
0
Hi, noob here.
We want to get a 120 fps preview stream from the camera (S6 or any other device with a camera capable
of high frame rate) and do processing on this stream. It doesnt need to go to the screen for display.
Is this tutorial relevant for that kind of process? Any idea how we would go about getting the data rate
we are looking for?
 

Top Liked Posts

  • There are no posts matching your filters.
  • 4
    Couple additional tips (for all, I've already given you these on gtalk...)

    Keep initramfs in a second repo
    Git doesn't like empty directories but initramfs needs them. Some people use .gitignore but this is less obvious than putting in a file called EMPTY_DIRECTORY - This strategy comes from LinuxBozo, who is an utterly awesome developer and honestly a lot of the stuff I know I learned from him. As a result, I call setting up initramfs this way "LinuxBozoizing the directory strategy"
    See https://github.com/Entropy512/kernel_n8013_ics/blob/master/build_kernel_n8013.sh for an example of a file that autobuilds the kernel and pulls in the initramfs from another repo. Inspiration for that comes from multiple sources - LinuxBozo, h8rift, and gtg465x for some of the initial concepts, and gokhanmoral for how to do Exynos 4412 boot images. You can probably replace mkbootimg with abootimg though - good idea there!
    3
    Hey guys, Samsung's repository at opensource.samsung.com is fubar. Team "Hey, just got up" would like to make building a kernel easier for you.

    Introduction
    Elite Recognized Developer Rebellos and myself decided to make an easy-to-work-with repository. We've applied several changes which result in no fuss with making kernel. It is our hope that this increases development on the Samsung Galaxy Camera. Feel free to fork this repository and build your own with tweaks!


    Getting Started
    Prerequisites: You will need an Ubuntu desktop/laptop computer. You can get Ubuntu here: http://www.ubuntu.com/download/desktop

    Installing Software Essentials
    First, you will want to install a couple of packages from the terminal. These packages are the build essentials and git, as well as abootimg for packaging.
    Code:
    sudo apt-get install build-essential git abootimg
    Now you need the source code. Download the source code with this command:
    Code:
    git clone https://github.com/adamoutler/EK-GC100_Galaxy_Camera.git


    Building the Kernel
    Run the following commands to build the kernel and package it into Odin and Heimdall flashable formats.
    Code:
    cd EK-GC100_Galaxy_Camera
    make gc1pq_00_defconfig; make -j8;
    abootimg --create boot.img -f tools/testing/bootimgpack/bootimg.cfg -r tools/testing/bootimgpack/initrd.img -k arch/arm/boot/zImage
    tar -H ustar -c boot.img >boot.tar; md5sum boot.tar >> boot.tar;mv boot.tar boot.tar.md5; gzip boot.tar.md5 -c -v > boot.tar.md5.gz

    Congratulations! You've built a Heimdall-flashable boot.bin and a Odin-flashable boot.tar.md5.gz . This file will boot your device into Linux and Android. It's that simple.

    Source
    Change Logs are available here: https://github.com/adamoutler/EK-GC100_Galaxy_Camera/commits/master
    All source code is available here: https://github.com/adamoutler/EK-GC100_Galaxy_Camera

    Thanks
    To Elite Recognized Developer Chainfire for sharing his knowledge about Samsung Kernels and their problems https://plus.google.com/104711040110222472212/posts/2JRZQsqhDSc
    To Elite Recognized Developers Rebellos and Entropy512 for helping me to learn git. I usually work with Subversion. This was my first time with Git.

    Downloads
    As of 9JAN2012 the only changes we have made to the source are to make the build process work and turn on UART logging for Open Galaxy Bootloader debugging. These are the resulting files as of today's build.
    Heimdall flashable boot.img: http://d-h.st/x2X
    Odin flashable boot.tar.md5.gz: http://d-h.st/jPz
    1
    hi adam, do you think we can activate smart dock mode by adding a 40.2k ohm resistor on a usb otg id pin. I Want to use otg and charging at the same time for my gcam, i read in s3 forum that they were able to do it and since gcam and s3 has identical specs.

    I checked your source and found under \drivers\misc\max77693-muic.c it has these option, i dunno if it was compiled in the stock rom, is this kernel related?

    Thanks

    Sent from my GT-I9100 using xda app-developers app

    USB and charging should be 100% kernel.