How to build your own custom Galaxy Camera kernel - Galaxy Camera Android Development

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

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!

So is this the first step toward getting a 4.2 Android on here?

Thanks foy you!

Can you make an CWM too???

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

fatbuccha said:
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
Click to expand...
Click to collapse
USB and charging should be 100% kernel.

@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

would this work ? http://www.ebay.com/itm/Micro-USB-H...224134?pt=PDA_Accessories&hash=item1e77e08e86
---------- Post added at 01:23 PM ---------- Previous post was at 01:20 PM ----------
or this http://www.ebay.com/itm/Micro-USB-B..._USB_Cables_Hubs_Adapters&hash=item19d97a5182
or this
http://www.ebay.com/itm/Micro-USB-H...645937?pt=PDA_Accessories&hash=item3ccf669b71

@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

I take it this was the site u got the idea for the resistor ? http://forum.xda-developers.com/showthread.php?t=1953061 ? here is a s3 kernel for reference https://github.com/gokhanmoral/siyahkernel-sgs3 P.S. does it charge the phone if no usb device is connected.

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

Edit: Nevermind. I found it after searching some other devices. I get the feeling this was abandoned.

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?

Related

Ubuntu 11.04 nauty running on Gtab

SUCCESS. I now have Ubuntu 11.04 booting on the Gtab. Using Pershoots kernel and files from the Vega folks, we now have touch screen working. Wireless is not up yet, and have not tested sound.
Thread from the Vegan folks:
http://android.modaco.com/content/a...-com/332887/ubuntu-linux-11-04-natty-on-vega/
From vega get the boot intrd image and the vegan root files.
http://www.adebenham.com/vega/
Follow the instructions to copy and build Pershoots kernel. Edit drivers/video/console/fbcon.c and searching for 'navy' and uncomment the line. This will give you the boot messages on the screen.
Formant the card to ext3. Unzip the vega_root file to an micro sd card of 4GB or better. use unzip -vxf vega_root.tgz
This will take awhile.
Edit /etc/fstab on the card and change mmcblk3p2 to mmcblk2p1
Copy the following files from the staging directory that you made after building Pershoots kernel:
sudo cp location-of-staging-dir location-sd/boot
sudo cp -Rp location-of-staging-dir/system/lib/modules/ location-sd/lib/modules/
Command to build the boot image:
./mkbootimg --kernel zImage --ramdisk initrd.img-2.6.32-custom --cmdline "root=/dev/mmcblk2p1 rootdelay=5 [email protected] [email protected] vmalloc=192M video=tegrafb console=tty0,115200 fbcon=rotate:1 fbcon=font:VGA8x8 usbcore.old_scheme_first=1 cpuid=200102 devicetype=1002 btmac=9c5ed6131a00 tegraboot=nand mtdparts=tegra_nand:[email protected](misc),[email protected](recovery),[email protected](boot),[email protected](system),[email protected](cache),[email protected](bootbmp),[email protected](logodata)" -o boot.img
Once you have the boot image, grab a copy of the boot-karmac.zip file. Replace boot.img in the zip file with the one that you created and rename the zip file.
Power down the Gtab, if need be. Put your micro sd card in that has the ubuntu files. Boot into CWM and go to mounts and mount the usbdrive, and connect to your computer. Copy the zip file that you made to the root of the usbdrive. Unmount the usbdrive from your computer and then umount in CWM. Now use CWM to zip the file into the Gtab and reboot.
You should see text scroll by and and it should boot into Ubuntu.
If you do the updates, it will cause problems with libgc. If you do the updates, then log into a terminal window and do sudo dpkg -i /root/glibc/*.deb
This will restore the glibc files needed.
3-23-11 Update
The latest image from the Vega folks fails due to nvrm_daemon. It causes you to loose the external sd card that your booting from. I'm using the first version that they posted.
I've gotten wireless to see AP's. I had to use the bcm4329 driver from Chenglu.
http://forum.xda-developers.com/showthread.php?t=892308
The Gnome nm-applet does not run, as it has issues with libappmenu.so, so I've not been able to test using it to connect to any AP.
Slow headway.
NMCBR600 said:
SUCCESS. I now have Ubuntu 11.04 booting on the Gtab. Using Pershoots kernel and files from the Vega folks, we now have touch screen working. Wireless is not up yet, and have not tested sound.
Click to expand...
Click to collapse
Interesting! Could you please clarify one thing:
> Unzip the vega_root file to an micro sd card of 4GB or better. Formant the card to ext3. use unzip -vxf vega_root.tgz
Do you reformat the sdcard before or after unzip the files to the card? (I thought formating would destory all content of the card)
THANKS!
Format before unzipping the files.
Awesome
Thanks for the great work
obviously we would need wireless (wifi) to make it all useful but the touch screen working is awesome
do you know if this will be able to run or support any of the following: Now or in the Future
1 usb dvd or cd drives- will they be able to be mounted and or even read/writable
2 flash- will flash video be able to be played in browser etc.
3 wine- would wine be able to be installed and used
I do not know how much of these are possible or impossible but all of them would be great
Thanks again
I'm new to the G tab and haven't had any experience at all with ubuntu, but I always want the latest and greatest thing in terms of tech.
Having said that I'm wondering just what are the possibilities of having ubuntu on the G tab, what can be done with it, how will it effect what I can do with the tablet once it is complete?
Thanks in advance.
doihaveto said:
Thanks for the great work
obviously we would need wireless (wifi) to make it all useful but the touch screen working is awesome
do you know if this will be able to run or support any of the following: Now or in the Future
1 usb dvd or cd drives- will they be able to be mounted and or even read/writable
2 flash- will flash video be able to be played in browser etc.
3 wine- would wine be able to be installed and used
I do not know how much of these are possible or impossible but all of them would be great
Thanks again
Click to expand...
Click to collapse
To add cdrom support, you need to add the modules to the kernel. The cdrom drive will need external power as the usb port does not supply enough power to run external hd or cd drives.
Flash -- if there is an arm version for linux
wine -- would have to compile the source code for arm
Roxxas049 said:
I'm new to the G tab and haven't had any experience at all with ubuntu, but I always want the latest and greatest thing in terms of tech.
Having said that I'm wondering just what are the possibilities of having ubuntu on the G tab, what can be done with it, how will it effect what I can do with the tablet once it is complete?
Thanks in advance.
Click to expand...
Click to collapse
Limited by your imagination and needs.
will wicd work for wireless
in this post about ubuntu on the gtablet
http://forum.xda-developers.com/showthread.php?t=894960
the wireless works only with wicd
would this maybe allow wireless to work in this port
At this time, the driver is not coming up. Running ifconfig does not show wlan0 at all, so I know I have an issue with driver. It does see my Verizon usb modem and my usb ethernet unit. With the ethernet unit, I can get online and surf. Currently, openoffice/librioffice are not available as there are dependencies between the two that cannot be resolved due to missing modules. The camera is not seen and I do not have any audio or power management.
I'll be working on this as I can over the weekend.
Using a 2.6.32 kernel with natty might not be the best idea.. 2.6.38 also has broadcom drivers.. this is great and all. but whats preventing us from stepping away from the android kernel? In specific if you can..
I've pulled the nvida 2.6.36 tree but if fails to compile. Complaints about asm using odd registers cause the compile to fail. At this time, 2.6.32 tree has drivers for the hardware. If I can get the 2.6.36 to compile, I'll try it.
Right now, sound, battery monitoring, camera are not working. Buttons on the side and the volume up/down are also not working. This is a starting point.
Forget about wine. Wine is an API translation layer, program loader plus libraries, it does not emulate x86, you are supposed to have it in the hardware. Wine on Gtab with ARM CPU will not do you any good, unless your windows applications are already compiled under ARM. And for that to happen you will have to wait until Microsoft comes up with windows on ARM first
Try the latest git commit of 2.6.38 - its on rc8 fwiw.. I run it on my server (heh).. I also compiled it using a modded pershoot defconfig (in a silly attempt to see if I could be cooler than 2.6.36 xoom folk - and to get the new cpu stuff)
It did not boot android.... but it did compile with no errors. I think I disabled wifi tho.. so yeah, disable as much as you can... get a basic system running on 2.6.38, then start building up
is there any progress here
just checking to see if there is any progress with wireless and or the kernel and drivers being used, is anyone trying this yet themselves besides op
i find this topic very interesting. I'd love to have this fully functional
I have not had luck with wireless. It looks like there is something missing the the vega image. I have gotten the wireless driver to load, but iwlist scan does not return any AP's. I pulled one of the 11.04 arm images for TI boards and tried to use the kernel that I built. I do not get a graphical screen and I cannot log in at a command prompt as I do not have a root password for that load. I've just built a generic 2.6.38 kernel to test on that image to see what happens.
I'm watching the vega forum on what they are doing.
I'm finding moving from working on x86 processors to arm interesting. As I get more information, I'll update the instructions. I want to get this running so I can use this on at a meeting in the first part of April.
get this running and expect a donate from me! i love android but compared to ubuntu it just doesnt cut it. i know you are using 11.04, but what ever happened to the ubuntu/kubuntu 9.04 (i think) MID Edition? Wasnt it made for arm? Did they stop development on this version?
Also, this may be a bit much to ask but could we get a pre-made image so we can test progress so far?
You guys are great! Keep up the good work!
edit: fixed my grammer
At this time I don't have a site to upload images to. I'm wanting to get the wireless sorted out, but as I make headway, I'll update the information that I posted on the first page. The vegan folks updated their vega image, but I cannot get it to boot. I get errors about inode from the sd card, but I know that the sd card checks out fine with fsck, so I've dropped back to their first image. I'm beginning to think that part of the problem is the modified driver for our wireless chip is different from the stock b43 driver in linux.
Headway
Update at the bottom of post #1. Wireless is working. Also, I tested an external CD drive and it was seen. The usb port did not supply enough power to spin the disk in the drive and I did not have an external power supply with me.
This is great,but....
I am in no way knowledgeable of how to compile all this together, can we get more intensive instruction on how to get this running or can anyone get this done in a way that we can simply get it going by the same methods it takes to get this version running:
http://forum.xda-developers.com/showthread.php?t=894960
download the two files extract files to the sd card and flash the kernel that easy.
if not I may never get this up, I would appreciate it greatly
I could provide a drop box account to share the files if it is needed to get them available online just let me know
thanks

[Q] Nexus S kernel compile and kernel serial console output tracking

Hi,
I am one of those who want to upload custom kernel in my Nexus S (SHW-M200K which is for Korean). When I updated my android by the methods in android source. It worked.
I also downloaded android kernel by using following commands.
$ git clone samsung.git kernel
$ git branch -a
$ git checkout remotes/origin/android-samsung-2.6.35-gingerbread
And, configured the kernel using herring_defconfig without any modification. The compilation was okay, but the device cannot be booted. I used fastboot to flash my new kernel into the device.
I am wondering if I know how to make the device booted with my new kernel.
Second, I want to see the kernel bootlog, the device is not working with my kernel, so I cannot use adb shell dmesg. Is there a way to see device's serial out? and is there a way to configure the kernel to make it show kernel logs to microUSB port?
I googled and found some links, unfortunately I cannot pase the url because I am newbie , but I did not work in my environment. The contents of the link uses 150k resistor to link ID and GND of microUSB ports and links D+/D- to UART port.
I also found some threads about Nexus S's kernel console out, but they have a little message which makes me confused.
I also found microUSB to serial cable, which is named as FlexSerial™ Serial (RS232) Data Cable for Samsung Nexus S, I cannot also attach url links, and you can easily found the module by using google. But I am not sure it will work or not. Is there anybody used this device?
Finally, I will also wonder if I know a specific configuration in kernel to see kernel's serial out?
It would be very nice if you let me know how to do or give me useful links.
Thanks in advance.

Infinity JB 10.4.4.23 Compat-Wireless Drivers for RTL8187 Cards Inside

I posted a question earlier that got no traction regarding compiling the RTL8187 drivers for the infinity for use in backtrack for ARM.
I have since completed the compile and have successfully used the adapter I bought on the tablet with them. What is attached are the compiled compat-wireless drivers, specifically: compat-wireless-3.6.8-1-snpc.tar.bz2
They include the "mac80211.compat08082009.wl_frag+ack_v1.patch" and the "channel-negative-one-maxim.patch"
I am attaching them for those interested or who have a similar need. I am not interested in being bombarded with questions/complaints about it not working for them or whatever. I may post a tutorial later with the problems I ran across and how I compiled these drivers that may help others with different chipsets.
These drivers work successfully with BT5 for ARM on my infinity and an ebay RTL8187L chipset external USB wireless device. To see more ID's they might work check here for RTL8187 PCI ID's that compat-wireless drivers might work for: http://linuxwireless.org/en/users/Drivers/rtl8187
Once in backtrack you will need to MAKE SURE the built in wireless is turned off on the tablet then in terminal with SU:
rmmod bcmdhd.ko
You will have to have the compat-wireless package I referenced above downloaded and uncompress and run: make wlunload in the folder you uncompress it to.
This will get rid of cfg80211.ko rmmod would probably work for that too but I know this works.
Now insmod in the following order:
insmod eeprom_93cx6.ko
insmod compat.ko
insmod cfg80211.ko
insmod mac80211.ko
insmod rtl8187.ko
It can all be scripted, feel free to do so.
With your wireless device plugged in to USB run airmon-ng and you should see your card in the list.
You will have to of course reboot to re-enable the built-in wireless.
Enjoy!
If you ever get the time I would appreciate a brief tutorial on the steps you took to build the modules. I've been struggling with doing this on the nexus 7 for a few days now and don't seem to be making much headway.
Nexus 7
Hi,
Yes please post a tutorial as I'm using a Nexus 7 also.
I already use a modified kernel on my Galaxy Nexus where I don't need to do those modification it's all built in the kernel (http://www.kernel-xp.net/index.php/en/) and would like the same but I would also take your procedure
Thank you!
I am also working on this and need help, to install the compat drivers i need the source code for my kernel but i dont know where or how to unpack the source code so that compat wireless will recognize it, i think it said in /lib/modules/*mykernelsource* if anyone is reading this and can help please reply with instructions thank you
compiling and building modules
alexcass4 said:
I am also working on this and need help, to install the compat drivers i need the source code for my kernel but i dont know where or how to unpack the source code so that compat wireless will recognize it, i think it said in /lib/modules/*mykernelsource* if anyone is reading this and can help please reply with instructions thank you
Click to expand...
Click to collapse
This is something that I am also struggling with. Any help or direction would be much appreciated.

[GUIDE] How to Build and Package a Kernel [D2]

This thread aims to be a comprehensive guide to building and packaging kernels for US Variant Samsung Galaxy SIIIs
In my opinion, a kernel is a great way to get into building things for your device and its pretty easy to do too.
Intro
What is a kernel?
http://en.wikipedia.org/wiki/Kernel_(computing)
This guide is for US SGSIII's (d2att,d2cri,d2mtr,d2spr,d2tmo,d2usc,d2vzw,others?)
It may be possible to adapt this to other devices, but I am not responsible for anything that happens should you try to do this.
This guide assumes you have a general knowledge of the Linux operating system. If you've never used it, you might consider playing around
with it for awhile before attempting this guide.
Click to expand...
Click to collapse
Prerequisites
On all devices you must be rooted, on Verizon SGS3 (d2vzw) you must also have the unlocked (VRALE6) bootloader installed.
This is not the thread for figuring out how to do this. You can use the forum's search function to figure out how to do this on your device.
You'll need a computer or a virtual machine running ubuntu. You may be able to figure out how to get this working on other distributions,
but since ubuntu is generally the most accepted distribution to use for building android things, I'll stick to using that here.
At the time of this writing, I'm using ubuntu 12.10, 64-bit.
You'll need to install some packages on your ubuntu machine:
Code:
sudo apt-get install build-essential git zip unzip
On 64-bit you'll also need some multilib and 32-bit compatibility packages:
Code:
sudo apt-get install gcc-multilib g++-multilib lib32z1-dev
Click to expand...
Click to collapse
Setting up the Build Environment
Next, you'll need a toolchain which is used to actually build the kernel. You may download one of these:
GCC 4.4.3: Download || Mirror
GCC 4.6: Download || Mirror
GCC 4.7: Download || Mirror
If you aren't sure, go for 4.4.3 or 4.6.
4.7 requires some code changes to work. The original kernel developer may or may not have made these changes.
Here is what I needed to do in order for 4.7 to build, boot and have wifi work:
https://github.com/invisiblek/linux-msm-d2/commit/f8d7199d37cfbfa1bcb6b4bcae3fc15ae71fbdea
https://github.com/invisiblek/linux-msm-d2/commit/ea58076501e5874db7b934c215c4dae81ddfd0a6
The toolchains are also available in the android NDK.
*** There are many toolchains out there, some of you may know of the Linaro toolchain which is aimed to optimize your binary even further ***
*** If you choose to use a different toolchain, that is fine. Keep in mind that you may run into issues depending on the toolchain you use ***
You can check what your currently running kernel was built with by issuing these commands:
Code:
adb root
adb shell cat /proc/version
It should return something like:
Linux version 3.4.0-cyanogenmod-gc4f332c-00230-g93fb4aa-dirty ([email protected]) (gcc version 4.7 (GCC) ) #134 SMP PREEMPT Thu Feb 28 00:22:41 CST 2013
Click to expand...
Click to collapse
This shows my particular kernel here was built with GCC 4.7
You can use wget to download one of the links from above, in this instance we'll download version 4.4.3 from the first link:
Code:
wget http://invisiblek.org/arm-eabi-4.4.3.tar.bz2
Extract this to somewhere you will remember, probably your home directory.
Code:
mkdir arm-eabi-4.4.3
tar -xf arm-eabi-4.4.3.tar.bz2 -C arm-eabi-4.4.3/
Click to expand...
Click to collapse
Obtaining Source
Find someone's source to use as a base. This can be a source archive from Samsung, a kernel tree from CyanogenMod, or any other developer around that makes kernels for your device.
TIMEOUT
This is a good spot to stop and take note that the Linux kernel is licensed under the GNU General Public License (GPL): http://www.gnu.org/licenses/gpl-2.0.html
What does this mean you ask? It means that if you plan to share your kernel with the community (if it's good, please do so!) then you MUST share your
source code as well. I am not liable for what you choose to do once you start building kernels, but know this: if you share your kernel and do not
provide source code for it, you will get warnings from XDA for a determined amount of time, after that you may have your threads closed, deleted and
possibly your user account terminated. This is extremely important!
Also, you may run into more problems than just XDA. There are organizations out there that do take action if you consistently refuse to comply with the GPL.
I recommend you read this: http://www.gnu.org/licenses/gpl-2.0.html so that you are familiar with what legalities you are getting yourself into.
The main thing to remember is to share your source code if you decide to share your built kernel.
Click to expand...
Click to collapse
In this instance, we will use CyanogenMod's kernel source for the US Galaxy S3's. You may browse the source code here:
https://github.com/CyanogenMod/android_kernel_samsung_d2
You'll notice that the branch there is cm-10.1
This is the default branch of this repository on github. This means that if you intend to build this branch, you'll need to use it on CM version 10.1. Most
likely it will not function on another version.
To obtain the source code:
Code:
git clone https://github.com/CyanogenMod/android_kernel_samsung_d2
This will take a little while, be patient.
When done, you'll have a directory called android_kernel_samsung_d2, cd into this directory.
Code:
cd android_kernel_samsung_d2
Next, you'll need to set up a couple environment variables. These tell the system two things:
1. What CPU architecture to build for, in this case arm
2. Where to find the toolchain we downloaded earlier, so that the system can cross compile for arm
Code:
export ARCH=arm
export CROSS_COMPILE=~/arm-eabi-4.4.3/bin/arm-eabi-
You'll need to set these variables on each new session. You can modify your Makefile in the root of your kernel tree in order to have these set permanently.
Click to expand...
Click to collapse
Building
At this point you can make any changes to the source code that you want. If this is your first time, I recommend not making any changes and make sure you have a
sane build environment before adding any complications.
When you build a kernel, you need to choose a defconfig. This is a specialized configuration file, specifically tailored for your device.
CyanogenMod names their defconfigs for their devices like so: cyanogen_<device>_defconfig and they are located in arch/arm/configs/
Code:
ls arch/arm/configs/cyanogen*
In this example, we will build for d2vzw.
Set up your tree to build for the d2vzw:
Code:
make cyanogen_d2vzw_defconfig
(do this in your kernel's root directory, in this example it was android_kernel_samsung_d2/ )
Now you are ready to build:
First, determine how many cpu's your computer has. You'll use this number to determine how many jobs the compiler command will use. The more jobs you can use, the more
cpu threads the compile will take advantage of, thus you'll get faster builds. If you don't know, just assume you'll use the number 2. We'll use 2 as an example here.
Code:
make -j2
Where 2 is the number of CPU cores your build system has.
And now we wait...until it's done compiling...
You'll know it successfully compiled when you have this line when it stops:
Kernel: arch/arm/boot/zImage is ready
Click to expand...
Click to collapse
PROTIP:
If it stops somewhere other than "zImage is ready" then you had build errors. Try running the 'make' command with no options after it. This will run the compile on a single thread
and will cause it to stop compiling as soon as it hits an error. When you run it on multiple threads, it definitely goes much faster, but if an error occurs, the console doesn't stop
until it finishes all of its threads. Causing you to have to scroll up and search around for an error
Click to expand...
Click to collapse
Now, assuming the build completed successfully, you have two things you are concerned with: A zImage (the kernel binary itself) and your kernel modules, which get built based
on what was configured in your defconfig.
You'll find your zImage at: arch/arm/boot/zImage
Code:
ls arch/arm/boot/zImage
The modules are scattered all over the place, depending on where the source existed that they were compiled from. We can easily search for them using this command:
Code:
find . -name "*.ko"
If both of the previous commands completed, you are now ready to package your kernel up for testing.
Move up a directory before continuing.
Code:
cd ..
Click to expand...
Click to collapse
Packaging
You may know of an awesome developer by the name of koush.
Well, once upon a time, koush created a rather simple zip, called AnyKernel, that would flash a kernel on a device, regardless of what ramdisk the kernel has on it.
I've taken his zip and modified it for d2 devices and to work with the newer recoveries out there.
This has a script in it that will dump your current boot.img (kernel+ramdisk), unpack it, replace the kernel, repack it and flash it.
It'll also copy any modules to the proper directory (/system/lib/modules) and set permissions appropriately.
You can get a zip here: Download || Mirror
(You can get it here as well: https://github.com/invisiblek/AnyKernel )
(Everyone is invited to use this zip, it'll probably make your life easier to not have to worry about the ramdisk. Enjoy!)
IMPORTANT
This AnyKernel package is for US variations of the Galaxy S3.
NOT the international (I9300) or any other device.
There are checks in the updater-script that will ensure you are running a d2 device before it does anything.
If you were to remove these checks, and not modify the partition that it flashes to later, you could end up with a brick.
If you intend to adapt this package for another device (please, do this! its a very handy script!), make sure you know it well, or ask someone to help you determine your device's
partition scheme before using it.
The risk here is due to the fact that the script doesn't know your device's partition scheme. It is configured specifically for the d2 devices. Flashing it on something else, who's boot
partition is somewhere else, might cause a bad flash to the bootloader partition (bad bad news if this happens).
Just be careful if you want to use this on another device. You won't run into problems if you use this on a d2 device.
EDIT: I made modifications that should make this less likely, but please, if you intend to use this on a different device (which is completely fine!) make sure you configure
the scripts to flash to the proper partitions.
Click to expand...
Click to collapse
Download and extract one of the above, we'll again use the first link for this example:
Code:
wget http://invisiblek.org/AnyKernel_samsung-d2.zip
unzip AnyKernel_samsung-d2.zip -d AnyKernel/
Now we'll copy our newly compiled zImage (still referring to the same kernel directory we used above, your repo might be called something different)
Code:
cp android_kernel_samsung_d2/arch/arm/boot/zImage AnyKernel/kernel/
cp `find android_kernel_samsung_d2 -name "*.ko"` AnyKernel/modules/
Finally we are ready to zip this up and test out flashing it.
Code:
cd AnyKernel
zip ../MyAwesomeKernel.zip -r *
cd ..
You'll now have a file named MyAwesomeKernel.zip which you should be able to flash via custom recovery (TWRP or CWM)
Click to expand...
Click to collapse
Extra Credit/Protips
Learn to use git. It's very powerful and great way to store your code.
Learn to use adb. It's an invaluable tool for any android developer.
Touchwiz and AOSP-based kernels are different. This means you cannot take CyanogenMod's source, build a kernel and expect it to work on a Touchwiz-based ROM.
Build a ROM next: http://wiki.cyanogenmod.org/w/Build_for_d2vzw
Crackflash your own stuff!
ALWAYS NANDROID!
Click to expand...
Click to collapse
Source code for all of my projects can be found here: http://github.com/invisiblek
FAQ
Q: How do I update my source tree to the latest that is available from where I downloaded it?
A: This can be handy if, for instance, you are building a CyanogenMod kernel and they added some patches, after you downloaded the source, that you want to include in your next build. You'll want to cd to your kernel tree and issue a git pull:
Code:
cd android_kernel_samsung_d2
git pull
You may then continue with the building instructions.
This may, however, have other problems if you've made changes to files. You might run into conflicts. I won't cover fixing any of this here, its not in the scope of this thread.
Q: I'm using X as a kernel base, but Y has a patch that I really like. How do I get it in my kernel easily?
A: I'll let you check Google for this answer, but I'll give you a hint use: git cherry-pick
Nice tutorial bro! Always good to learn something new everyday
Really is a good thread,thanks
This guide would have made things too easy for me.
Too easy, indeed. haha
Great job, invisiblek! AnyKernel is the beez neez.
Ok so this is a noob question but I gotta ask anyway lol. Ok so I cloned the kernel source, I made my edits, now how do I push all this to my github?
I already have a github account, I already made a new repo for the kernel. Here's a link to my github if you need it...
https://github.com/ghicks12/d2vzw_kernel.git
spc_hicks09 said:
Ok so this is a noob question but I gotta ask anyway lol. Ok so I cloned the kernel source, I made my edits, now how do I push all this to my github?
I already have a github account, I already made a new repo for the kernel. Here's a link to my github if you need it...
https://github.com/ghicks12/d2vzw_kernel.git
Click to expand...
Click to collapse
git remote add origin git_location_you_created_on_github.git
git push -u origin somebranch
The -u is for first time run only, you can just git push afterwards.
Sent from my SCH-I535
GideonX said:
git remote add origin git_location_you_created_on_github.git
git push -u origin somebranch
The -u is for first time run only, you can just git push afterwards.
Sent from my SCH-I535
Click to expand...
Click to collapse
Thanks! When I run
Code:
git remote add origin https://github.com/ghicks12/d2vzw_kernel.git
I get this back:
Code:
fatal: remote origin already exists.
I'm editing a CM based kernel, not sure if that matters or not?
That just means you added the remote already. Just issue the push command then.
Sent from my SCH-I535
Why is this happening? I don't know what i did wrong
[email protected]:~/cm$ make VARIANT_DEFCONFIG=cyanogen_d2att_defconfig
scripts/kconfig/conf --silentoldconfig Kconfig
drivers/media/video/msm/Kconfig:123:warning: choice value used outside its choice group
drivers/media/video/msm/Kconfig:128:warning: choice value used outside its choice group
***
*** Configuration file ".config" not found!
***
*** Please run some configurator (e.g. "make oldconfig" or
*** "make menuconfig" or "make xconfig").
***
make[2]: *** [silentoldconfig] Error 1
make[1]: *** [silentoldconfig] Error 2
make: *** No rule to make target `include/config/auto.conf', needed by `include/config/kernel.release'. Stop.
[email protected]:~/cm$
Hey. I'm having some problems with some GIT terminology and procedures. I'm a .NET developer and I use TFS and SVN on a daily basis. Forgive me if this is complete off basis from what you'd do with GIT.
What I want to do is merge one branch into another branch. In other words I want to take the latest kernel source from my favorite dev and merge in the latest from cyanogen's 4.3 d2 branch. Is this a rebase thing? It doesn't seem like cherrypicking to me.
I have successfully compiled kernel and made modules.I inserted zImage and modules inside any kernel updater,flashed via TWRP.When reboot stuck in odin and it says could not do normal boot.

Linux kernel building how-to

I got this dang phone because I was told it was compatible with GSM networks and of course I was such a noob then. LOL, since then though I have taught myself a great deal in a short amount of time with endless nights searching all corners of the internet for links, hints, secrets and of course roms and kernels.
I dont care about a rom at this point I want and need a custom kernel for this phone I have no OS but when I run RUU it works fine-ish. I solve each problem as they come up but I am getting so tired of all the nonsense I have to do to this phone.
Unfortunately unless circumstances change I am stuck with it because I have had some major life changes and I cant afford another phone like I am on a romin and egg diet poor.
If someone could just cook up a kernel for this dang phone I will be forever grateful. I will test, logcat whatever u want to make it easier for u just help please this.:fingers-crossed::fingers-crossed:
Device: K2PLCCL pvt ship s-off RL
CID-11111111
Hboot 2.21
Radio 1.12.00.1029
OpenDSP-v10.2.0268.0401
eMMC1024 mb
Fant0m3 said:
I got this dang phone because I was told it was compatible with GSM networks and of course I was such a noob then. LOL, since then though I have taught myself a great deal in a short amount of time with endless nights searching all corners of the internet for links, hints, secrets and of course roms and kernels.
I dont care about a rom at this point I want and need a custom kernel for this phone I have no OS but when I run RUU it works fine-ish. I solve each problem as they come up but I am getting so tired of all the nonsense I have to do to this phone.
Unfortunately unless circumstances change I am stuck with it because I have had some major life changes and I cant afford another phone like I am on a romin and egg diet poor.
If someone could just cook up a kernel for this dang phone I will be forever grateful. I will test, logcat whatever u want to make it easier for u just help please this.:fingers-crossed::fingers-crossed:
Device: K2PLCCL pvt ship s-off RL
CID-11111111
Hboot 2.21
Radio 1.12.00.1029
OpenDSP-v10.2.0268.0401
eMMC1024 mb
Click to expand...
Click to collapse
I can help you through a PM on how to set your computer up properly so you can build a kernel yourself. Can begin building it without modifications then when ready, start adding some patches which in most cases is merely just copying and pasting assuming the patch is compatible.
It really isn't difficult.
You need linux installed firstly if running windows.
Sent from my C525c using Tapatalk
U ROCK!!!!!
Modding.MyMind Won't be from me lol. Just found out this morning that I am going to be a father.
Sent from my C525c using Tapatalk
Congrats man I have a bundle of kids love them all my newest one is 3months....:good:
So u helping me would be amazing. You are using the word not hard about k2plc. Anything and everything about this phone is difficult except the hardware....lol. So I did some real heavy research today about my errors on flashing, why things won't go to my device and why I keep getting mount errors. It's the kernel as we all know, but I don't think it will be as such a daunting task to create one I mean once I know what I am doing.
Brief rundown I was bait and switched into this phone long story there. I have recently had a string of bad luck so I'm strapped to find a new one. Everything that I know I've learned over the last two months with a ton of trial and errors many bricks conquered and many triumphs achieved.
With that said I do get lost a bit on terminology and stuff. But I unlocked bootloader installed adb both wired and wireless.
Super cid phone 2twice two different ways lol. Last one stuck cause I turned off the ota odex. Flashed three roms all with the same problem no data and no mms. So some patients may be in order.
Also about linux I thought it was I am just not SElinux I downloaded this
arm-eabi-4.6-d73a051b1fd1d98f5c2463354fb67898f0090bdb.tar and this just recently and ran them as well. Am I suppesed to run them to phone or computer...the Java commands confuse me like crazy right now as I am still new.
Now back to what I researched. I found this file it talks all about SElinux and how it effects your kernel. Cant we just in some way disable those two or three scripts that is blocking from converting and flashing roms, boots. and zips.
selinuxproject.org/~jmorris/lss2011_slides/caseforseandroid.pdg
PM me modding and I will give you my email...I check that more often.
I've learned that our Kernel is SElinux blocked and u have to know and use proper toolchain to bypass this. sorry cant post links yet
@Fant0m3, I'm pretty sure your device is not using selinux. You can confirm just by opening up es file explorer on your device and selecting, "/", which from their you will see "file_context" amongst others. Our kernel source comes with selinux in it, but selinux is not enabled through the defconfig file from the source. You would have to modify that file, build your kernel, flash/install kernel, then at that point you would have selinux support. However, I seriously doubt your kernel is using selinux.
In addition, do not flash any Rom to your device unless the Rom is specific to your device. You can't just use roms from other devices. It does not work that way. If it did, then there would be no need for the HTC One SV, the HTC One M8, the Samsung Galaxy, etc, etc. There would just be one android phone like you see with the iPhone, however, this is obviously not the case.
The toolchain is required to build your kernel from source. And 4.6 is exactly the one you properly need to build your kernel.
Anyways, hope some of this was helpful/useful insight.
Edit: Open a terminal (ctrl + alt + t). First install the necessary packages; copy paste the code below and hit enter. This will set up your linux system for proper development, like building a kernel for example.
Code:
sudo apt-get update && sudo apt-get install git-core gnupg flex bison gperf libsdl1.2-dev libesd0-dev libwxgtk2.8-dev squashfs-tools build-essential zip curl libncurses5-dev zlib1g-dev openjdk-6-jre openjdk-6-jdk pngcrush schedtool libxml2 libxml2-utils xsltproc lzop libc6-dev schedtool g++-multilib lib32z1-dev lib32ncurses5-dev lib32readline-gplv2-dev gcc-multilib
Sent from my C525c using Tapatalk
@ ModdingMyMind
Okay lol I was half asleep writing that last night.
When I am in recovery mode, I run TWRP 2.7.0.1 and when I bring up the logcat it say Kernel lacks support for reading SElinux. When I was reading that article, which it will not allow me to link yet otherwise I would, it was saying that the kernel was built with linux support but was built with SElinux support.
Either way not that big of deal. I am willing wanting to learn how to build a kernel and hopefully more as I learn and continue to learn
I flashed those other roms before I realized that I shouldn't run them on this phone. But I was under the impression that we can and thats part of the reason we root our phones is to run AOSP roms. The reason we cant with this phone is because there isnt an kernel built to read such open sources. Also and AOSP rom to my understanding is basically just replacing all your visual effects and removing the stock one. Basically the same thing like GOlauncher or NextLauncher does but its better cause u eliminate the processes from your stock rom so it doesnt bog your system down. I could and can be wrong I am a lot with this new found interest in Android applications.
so what is that code you posted. Please forgive me I am a noob and dont get the lingo and kinda need layman's terms for things and explanations. I learn very quick though so explaining the process once should more than suffice. I am only recently divulging into the forums cause I am more comfortable with my abilities and refrained from sounding like a complete NOOB.
Ubuntu?
Okay I have def heard the name did not know and was a bit confused on what it was. Now I know <---- told u NOOB who learns on his own lol. I am downloading now but I already have a program I think that does the same thing "phantomjs" and no relation to my name I have used my online name for 20 years lol.
Now does this program do the same thing and should I even install ubuntu.
What is the best way to designate which device to download stuff to I find this has been coming up lately usually people just say download this...blah blah blah. But never designate the best path or device to use for the download. NOOB remember. I usually figure it out but adds more time to my process as I then have to research something else. I am getting the hang of it though.
Also is there an application out there that will designate what system will run what applications and download them into the corresponding folder to either be transferred to the proper corresponding folder i.e.:
Microsoft applications go to microsoft folder.
Linux goes to a Linux folder or a fold you created for linux apps.
Android goes to a android folder.
Mac goes to some apple folder if u choose to work on Iphones and such.
If not this seems like a very oversighted program that could easily be created/tested/deployed and would be very useful to keep your computer clean.
Excuse me but my mind works a billion times a minute and this is why I want to divulge myself in this stuff because there is never an end to the useful things that could be created.
Why I am on that again why the play store more interactive to your mobile device it seems just a few scripts and build files and they could diagnose what phone is being used and only show and promote to u which applications are compatible with said phone...excuse me for rambling
:silly::cyclops:
To build from source such as a kernel for example it is highly recommended you install a linux distro. I personally use Ubuntu myself.
Your TWRP says their is no SElinux support from the kernel because the kernel used to build the twrp you are currently using was not built with SElinux support itself. The kernel source has to be modified in order to add SElinux support and therefore TWRP to show that there is SElinux support detected. I know, because I had to do this for my TWRP build .
I'm at work so I have only skimmed through some of your posts. Haven't read it all which is why my response is currently short.
Sent from my C525c using Tapatalk
Modderator
Just wanted to say to the moderator that I believe this conversation should be moved i.e. posted in its own thread for linux kernel building I am sure I am not the only noobish person looking for help in doing or building a kernel.
Alright, I'm back. In regards to AOSP. It won't just simply work for any device even if the kernel is modified for proper support. AOSP is a large open source project. Just like CM, OmniRom, etc. The source has to be download, then you must put together a device tree which is basically a bunch of ".mk" files along with things which are needed specifically for your device. Would go in grave detail about this, but that is a tutorial in itself. Nevertheless, once all that has bee setup, you proceed to build the Rom then install to your device and proceed to work out any bugs (which there will be bugs).
I do not use windows. I use linux. Linux is required in order to build/develop kernels, Roms, etc. If you are using windows then you must either split your system for dual booting between windows and linux or you must run a virtual program that will allow for linux to operate on your computer while also running windows at the same time. I HIGHLY RECOMMEND you remove windows and do a clean install of linux if you plan to develop.
Sent from my C525c using Tapatalk
---------- Post added at 10:19 PM ---------- Previous post was at 09:42 PM ----------
To build a kernel, it must be done on linux. You need an arm toolchain. For our kernel source, arm-eabi-4.6 is recommended. To use a different toolchain other than that would require you to make some changes to the kernel source to prevent build errors.
You have to export the path to your toolchain.
Here is a script I use when building my kernel. Study it and it should be helpful for you.
PHP:
#!/bin/bash
#######################################
# Remove prebuilt kernel from last build
#rm ~/cm11/kernel/htc/k2_cl/output/kernel/zImage
if [ -e zImage ]; then
rm zImage
fi
#######################################
#######################################
# Remove logs from last build
rm kernelcompile.log
rm modulecompile.log
#######################################
############################################################
# Set Default Path's here!
TOP_DIR=$PWD
# KERNEL_PATH is the folder where your kernel source is located.
KERNEL_PATH="/home/moddingmymind/cm11/kernel/htc/k2_cl"
# STRIP is the strip brinary from the toolchain to strip unneeded symbols after the build is finished to help reduce size.
STRIP="/home/moddingmymind/arm-eabi-4.6/bin/arm-eabi-strip"
# OUTPUT is the folder where I place my finish builds.
OUTPUT="/home/moddingmymind/cm11/kernel/htc/k2_cl/output"
# Set toolchain path here! This will be the directory to your current toolchain.
TOOLCHAIN="/home/moddingmymind/arm-eabi-4.6/bin/arm-eabi-"
############################################################
#######################################
# KBUILD_BUILD_VERSION will set the name of the final build.
export KBUILD_BUILD_VERSION="JesusFreak"
# KERNELDIR is the path to the folder where your kernel source is located at.
export KERNELDIR=$KERNEL_PATH
#######################################
#echo "Cleaning latest build"
# make is a simple command needed to build makefiles.
# ARCH is simply telling it what type of architecture the machine is.
# CROSS_COMPILE is merely pointing the building process to the actual toolchain needed to make this work.
# The following is simply determining how many processors your computer currently has and applies that to "-j#" where "#" is your total processors. This reflects the speed of your build.
make ARCH=arm CROSS_COMPILE=$TOOLCHAIN -j`grep 'processor' /proc/cpuinfo | wc -l` mrproper
# Making our .config
#Sources will always have a defconfig file. For the kernel, you MUST make your .config file specific to your device or your build WILL fail.
make k2_cl_defconfig
# Make our menuconfig before proceeding with the build.
# This will bring up a window where you can make neceassary changes to your kernel source through a gui implementation prior to building your source.
make menuconfig
# Make Kernel using proper number of processors and store verbose in log file for review.
make -j`grep 'processor' /proc/cpuinfo | wc -l` zImage ARCH=arm CROSS_COMPILE=$TOOLCHAIN >> kernelcompile.log 2>&1 || exit 1
# Make Modules using proper number of processors and store verbose in log file for review
make -j`grep 'processor' /proc/cpuinfo | wc -l` modules ARCH=arm CROSS_COMPILE=$TOOLCHAIN >> modulecompile.log 2>&1 || exit 1
# make ARCH=arm CROSS_COMPILE=$TOOLCHAIN -j4 modules >> modulecompile.log
# Copying kernel modules after making install of modules
sudo make modules_install
mkdir $OUTPUT/tempo;
cp -r '/lib/modules/3.4.10.JesusFreak/kernel' $OUTPUT/tempo/;
sudo rm -rf '/lib/modules/3.4.10.JesusFreak';
find $OUTPUT/tempo/kernel/ -name '*.ko' -exec cp -av {} $OUTPUT/modules/ \;
rm -rf $OUTPUT/tempo;
# Strip modules
cd $OUTPUT/modules
$STRIP --strip-unneeded *.ko
# Copy Kernel Image
rm -f $OUTPUT/$KBUILD_BUILD_VERSION.zip
cp -f $KERNEL_PATH/arch/arm/boot/zImage $OUTPUT/prebuilt/zImage
# CREATE A ZIP which is prebuilt for flashing in the recovery to install and use.
cd $OUTPUT
zip -r $KBUILD_BUILD_VERSION.zip *
# Remove builds after the zip is completed.
rm -f $OUTPUT/prebuilt/zImage
rm -f $OUTPUT/modules/*.ko
Sent from my C525c using Tapatalk
okay sweet
Okay so it seems I should have known this information before even making it this far with my phone lol...
So Ubuntu is not like a emulator I run over windows it is yet another more developer friendly system software correct? If it's true then it would be easier running and familurizing myself with the linux systems and it's applications. I'm dead serious on working towards development. It's finally something to ease the busy mind.
Could u point me in the right direction to what kinda hardware would be best suited for this type work. My business model is almost finished but I need research on the proper systems and costs for the personal business loan that I will be applying for. I'm currently just using dual laptops and a phone.
Yes the one SV. As much as this phone has troubled me it has almost helped in a way because of the frustrations that go along with it.
I am also at work so my grammer is probably horrid as I am on my phone.
Thanks for the patients and lessons this stuff is definitely not for those easily detered.
Hardware isn't a big to do issue when building a kernel. However, it is usually recommended to have a SDD vice HDD. This will run much faster and smoother while handling your sources. It is also suggested to have at least 6 gigs of ram or more. However, I use my laptop which currently only holds 2 gigs of ram and roughly 200 gigs for storage on my computer. In other words, my laptop is very weak, but I can still develop with it without any problems. Just have to be cautious of the laptops temperature to insure I don't kill it lol.
You can go to Ubuntu website. They have the system you can download to install on your computer. They also have a very detailed instruction on how to remove windows properly and how to install ubuntu properly. Make sure you save important stuff as needed because wants you remove windows everything will be lost.
Sent from my C525c using Tapatalk
Sorry
I went a bit MIA for a bit my work schedule, plus my ex wife and everything with my minions got me scattered I am still interested and working on wanting to go down this path and maybe further as I expand my knowledge. I will hopefully soon find some time to jump back in but I will most likely be stuck till this weekend without diving into this project. I do have another laptop that I plan to use for linux and will get it all set up and try to follow steps to with Ubuntu and u @moddingMyMind. Hopefully soon we can get this done. lol.....I was wondering if we could create a more generic one for other to download and flash into their system as well if not its cool I will just stick with mine.
Nah, a generic one won't happen. At best, you could make your patches for your source, then apply those patches to their sources. Build all of them, then create a flashable zip which will systematically determine which device is which as to allow itself to properly determine which kernel it should write to the device as well as to which proper partition. Wouldn't be that hard to put something like that together though.
I'm currently busy myself. I was successful at compiling GraphicsMagick for my device and am currently writing a shell script which will pick up all images from a twrp theme, determine their original sizes one by one, then determine their new sizes and finally making the changes to properly resize each image for it's ending porting results. It's almost done. I just need to figure out a script for handling the ui.xml so I can be complete with my project and thus be able to port TWRP themes in just minutes vices HOURS and even days in some cases if I am taking my sweet time.
Sent from my C525c using Tapatalk
That's awesome I'm still afraid to try a theme for teepee lol that is my life line as of late.
I was thinking though is there an app for your file system that will clean up any repeated files like let's say music or busybox applets and so on and so on. This would save me tons of time and storage space..... I think I may need a how to for dummies book lol... Just when I feel I have it figured out basically then I discover something new Smh...
BTW good luck I can test dummy things if needed as well
Sent from my HTC One SV using XDA Free mobile app
Fant0m3 said:
That's awesome I'm still afraid to try a theme for teepee lol that is my life line as of late.
I was thinking though is there an app for your file system that will clean up any repeated files like let's say music or busybox applets and so on and so on. This would save me tons of time and storage space..... I think I may need a how to for dummies book lol... Just when I feel I have it figured out basically then I discover something new Smh...
BTW good luck I can test dummy things if needed as well
Sent from my HTC One SV using XDA Free mobile app
Click to expand...
Click to collapse
A little trick to saving space with busybox on your phone.... Don't install it with symlinks which creates all those applets. Instead, just grap an app from the play store if you want which will supposedly install busybox and rename the app from .apk to .apk.zip. Extract the contents and you will find the busybox binary. Place the binary in /system/bin and give the binary permissions of either 755 or 777. Then to use busybox applets just type busybox for a list of commands. To use busybox for example would be like this:
busybox mv -f /sdcard/name.txt /sdcard/newname.txt
mv is an applet from busybox which will move files and stuff. But you can also use it to rename files which is what I demonstrated. Much more proficient than having a bunch of applets filling up your folder. However, be cautious when taking this route and using other peoples scripts. Most people, to include myself, will write scripts which may use busybox applets but will not call the applet with 'busybox'. So, if the applet is not symlinked to busybox then you may come across problems with the script. Easy fix though. Just open up the script and find all commands which are calling on busybox applets and just add 'busybox' before it, then save.
Sent from my C525c using Tapatalk
Again I have a dumb question but I'm lost with git hub and the git emulator. I followed a guide for compiling a kernel and I did what it asked but this seems routine any monkey can plug in data I wanna know how to actually download the toolchain and run it. Or is there like a dummies guide to what does what and how it works I have to be missing just simple steps
Sent from HTC One SV
k2plc----cricket version
deodexed-mod pack 5
unlocked-super cid-soff
Open up the terminal on your linux system.
Type and enter,
Code:
git clone https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6
When you enter that, it will clone the toolchain for 4.6 to whatever directory you are currently in, so now sure you change directories if you wish to have the toolchain cloned (downloaded) to a specific location.
Sent from my C525c using Tapatalk
---------- Post added at 07:22 AM ---------- Previous post was at 07:19 AM ----------
To direct the toolchain to your systems path so you can call on it then type and enter:
Code:
export PATH=$(pwd)/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/bin:$PATH
Sent from my C525c using Tapatalk
---------- Post added at 07:25 AM ---------- Previous post was at 07:22 AM ----------
To build your kernel,
Code:
export ARCH=arm
export SUBARCH=arm
export CROSS_COMPILE=arm-eabi-
cd path/to/kernel/source
make k2_plc_cl_defconfig
make zImage
make modules
Now, go experiment lol.
Sent from my C525c using Tapatalk
---------- Post added at 07:28 AM ---------- Previous post was at 07:25 AM ----------
The kernel binary is output as: `arch/arm/boot/zImage
To see where the modules are built go and look at the "buildme.sh" script I use for my kernel and it will show you the directory to grab them. They will be needed or else your WiFi won't work if you install your newly built kernel.
Sent from my C525c using Tapatalk
1045
Don't know if i'm late to the party ,so to get things straight .Is anyone still willing to work on this i'm interested too.

Categories

Resources