Related
This is a complementary guide to [Guide] How to compile and install CM10 for Samsung i9000
Want to add support for another filesystem to the CM10 kernel?
Add a module?
Maybe slim things a bit by removing some stuff?
All fine, but where to start?
Since CM9, the kernel source code should be integrated with CM's source code.
So, if you are building CM10, you should already have a kernel folder in the source code.
So, where's the config file used to build the i9000 kernel?
Well, it's here: ~/android/system/kernel/samsung/aries/arch/arm/configs/cyanogenmod_galaxysmtd_defconfig
You can edit the file directly in a text editor (if you know what you're doing) and it looks something like this:
Code:
CONFIG_EXPERIMENTAL=y
CONFIG_KERNEL_LZMA=y
# CONFIG_SWAP is not set
CONFIG_SYSVIPC=y
CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y
CONFIG_CGROUPS=y
CONFIG_CGROUP_DEBUG=y
CONFIG_CGROUP_FREEZER=y
CONFIG_CGROUP_CPUACCT=y
CONFIG_RESOURCE_COUNTERS=y
CONFIG_CGROUP_SCHED=y
CONFIG_RT_GROUP_SCHED=y
CONFIG_INITRAMFS_SOURCE="source/usr/galaxysmtd_initramfs.list"
...
You can just edit the text file, but sometimes it's not that easy to find/do what you want because the labels aren't very user-friendly.
It's easy to make several types of mistakes.
... but there is a better way to do it, using the menuconfig tool.
To use menuconfig, just do:
Code:
cd ~/android/system/kernel/samsung/aries
make menuconfig
You should now have a text GUI to access all the options that is much easier and safer to use:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Now you need to load the i9000 configuration file.
Select "Load an Alternate Configuration File" at the bottom of the menu
Point to the i9000 default kernel config file: arch/arm/configs/cyanogenmod_galaxysmtd_defconfig
After you hit OK, you'll open the i9000 config file. Make the changes you want and exit. You'll be asked if you want to save the changes.
NOTE: I've had some issues with make menuconfig producing "strange" files.
Do:
Code:
grep CONFIG_USB_G_ANDROID kernel/samsung/aries/arch/arm/configs/cyanogenmod_galaxysmtd_defconfig
and confirm the result is:
Code:
CONFIG_USB_G_ANDROID=y
If it's not, menuconfig "missbehaved".
(There's a backup of the original config in kernel/samsung/aries/arch/arm/configs/cyanogenmod_galaxysmtd_defconfig.old)
Final step: Tidy things up:
Code:
cd ~/android/system/kernel/samsung/aries
make mrproper
That's it.
Build away.
(Don't forget to do a "make installclean" and cleaning things up before building)
For more information on CM's kernel building, see this: http://wiki.cyanogenmod.com/wiki/Integrated_kernel_building
another great summary! thank you!
USB
EDIT: This comment is now obsolete.
--------------
NOTE: While everything builds nicely and is functional, somehow the USB support seems to be gone in the builds produced. Charging still works but ADB and Storage don't.
There's something missing.
If you know what it is, drop a line.
pmos69 said:
NOTE: While everything builds nicely and is functional, somehow the USB support seems to be gone in the builds produced. Charging still works but ADB and Storage don't.
There's something missing.
If you know what it is, drop a line.
Click to expand...
Click to collapse
Did you enable/disable things in the config file? It is not as easy to change things by just changing the config file, often the underlying source code also needs to be changed if you want to enable certain features...
Did you somehow add fast charge support?
kasper_h said:
Did you enable/disable things in the config file? It is not as easy to change things by just changing the config file, often the underlying source code also needs to be changed if you want to enable certain features...
Did you somehow add fast charge support?
Click to expand...
Click to collapse
Just made simple tests enabling simple features, like enabling btrfs filesystem support.
At first I was enabling stuff like swap and zRam, but then thought about what you are saying and went for simple tests.
Just enabling btrfs filesystem support, triggers the behaviour.
I think any change may do it.
Maybe just saving the config file in menuconfig does it.
Sent from my GT-I9000 using xda premium
pmos69 said:
Just made simple tests enabling simple features, like enabling btrfs filesystem support.
At first I was enabling stuff like swap and zRam, but then thought about what you are saying and went for simple tests.
Just enabling btrfs filesystem support, triggers the behaviour.
I think any change may do it.
Maybe just saving the config file in menuconfig does it.
Sent from my GT-I9000 using xda premium
Click to expand...
Click to collapse
I often change stuff in defconfig, but I always do it for code I added to the source. Never had a problem with USB after that. So in principle, it should work...
kasper_h said:
I often change stuff in defconfig, but I always do it for code I added to the source. Never had a problem with USB after that. So in principle, it should work...
Click to expand...
Click to collapse
Make menuconfig + make mrproper are making a mess.
Code:
diff -d <(sort kernel/samsung/aries/arch/arm/configs/cyanogenmod_galaxysmtd_defconfig.old) <(sort kernel/samsung/aries/arch/arm/configs/cyanogenmod_galaxysmtd_defconfig)|grep CONFIG_USB_G_ANDROID
< CONFIG_USB_G_ANDROID=y
> # CONFIG_USB_G_ANDROID is not set
WTF?
Back to hand-editing the config file, I guess...
Edit: Just tried it again, starting from the original config, and it's not happening this time... Building now.
Maybe I did something dumb before? (happens a lot)
pmos69 said:
Make menuconfig + make mrproper are making a mess.
Code:
diff -d <(sort kernel/samsung/aries/arch/arm/configs/cyanogenmod_galaxysmtd_defconfig.old) <(sort kernel/samsung/aries/arch/arm/configs/cyanogenmod_galaxysmtd_defconfig)|grep CONFIG_USB_G_ANDROID
< CONFIG_USB_G_ANDROID=y
> # CONFIG_USB_G_ANDROID is not set
WTF?
Back to hand-editing the config file, I guess...
Edit: Just tried it again, starting from the original config, and it's not happening this time... Building now.
Maybe I did something dumb before? (happens a lot)
Click to expand...
Click to collapse
That is the way you learn quickest: by making mistake. I tell this to my students everyday when the ruin experiments
kasper_h said:
That is the way you learn quickest: by making mistake. I tell this to my students everyday when the ruin experiments
Click to expand...
Click to collapse
Well, don't know what happened (but it happened quite a few times).
Working fine now...
Nice howto, thanks. Have one question. I want to build kernel for ypg1, really similar device to i9000. So what to do next when I have zImage and modules. I mean have only kernel source and toolchain without whole Android sources. I need to make installable pkg but don't know how.
I'm looking for step by step how to build kernel, build recovery etc.
Sent from my GT-I9001 using xda app-developers app
oisis said:
Nice howto, thanks. Have one question. I want to build kernel for ypg1, really similar device to i9000. So what to do next when I have zImage and modules. I mean have only kernel source and toolchain without whole Android sources. I need to make installable pkg but don't know how.
I'm looking for step by step how to build kernel, build recovery etc.
Sent from my GT-I9001 using xda app-developers app
Click to expand...
Click to collapse
I think there are a few how-to's on that in the cm wiki.
I've not looked much into it, sorry.
Guess you'll only have to sync the kernel sources + device specific trees and only build the kernel.
oisis said:
Nice howto, thanks. Have one question. I want to build kernel for ypg1, really similar device to i9000. So what to do next when I have zImage and modules. I mean have only kernel source and toolchain without whole Android sources. I need to make installable pkg but don't know how.
I'm looking for step by step how to build kernel, build recovery etc.
Sent from my GT-I9001 using xda app-developers app
Click to expand...
Click to collapse
You could take a look at my github (github.com/kasperhettinga). I use a kernel building script (developed by stratosk) that does not require the whole source code of cm10 but will build a flashable zip using a separate ramdisk (also originating from the work of stratosk).
Verstuurd van mijn GT-I9000
Could you describe how to, after make when i have zImage and modules, pack everything to img to have CWM installable zip? I don't have this device but would like to learn it. Thanks a lot.
oisis said:
Could you describe how to, after make when i have zImage and modules, pack everything to img to have CWM installable zip? I don't have this device but would like to learn it. Thanks a lot.
Click to expand...
Click to collapse
I adapted the teamhacksung buildscript so it automatically creates a CWM-zip:
https://github.com/kasperhettinga/buildscript
I have a zImage built from CM10 kernel sources in Cygwin and I want to inject it into the CM10 boot.img.
Anyone has any idea how I can do that?
I tried to extract the boot.img from one of the nightlies using the dsxida's android kitchen, but it seems that it does not have ramdisk and the extracted zImage file is 0 bytes.
hey man i ve been trying to compile the kernel for my galaxy s2 and downloaded all the things recomended from the cyanogenmod github
these are the steps that i follow:
1. cd into my kernel root directory.
2. make cyanogenmod_i9100g_defconfig
3. make menuconfig
4. make -j5
after a few seconds i get this error
Code:
CHK include/linux/version.h
CHK include/generated/utsrelease.h
make[1]: `include/generated/mach-types.h' is up to date.
CALL scripts/checksyscalls.sh
CHK include/generated/compile.h
/home/incarnation95/cm10kernel/t1/scripts/gen_initramfs_list.sh: Cannot open '/home/incarnation95/home/incarnation95/cm10kernel/t1/usr/i9100g_initramfs.list'
make[1]: *** [usr/initramfs_data.cpio] Error 1
make: *** [usr] Error 2
[email protected]:~/cm10kernel/t1$
do you know how to tackle this problem?
please help i am really in a mess due to this.
previously i compiled a stock kernel, in stock kernel the compillation process went very good but it didnt boot
i really want to make this aosp kernel, and this is the only guide which indicates compilling an aosp kernel
hope you could sort out my problem.
thanks in advance
incarnation95 said:
hey man i ve been trying to compile the kernel for my galaxy s2 and downloaded all the things recomended from the cyanogenmod github
these are the steps that i follow:
1. cd into my kernel root directory.
2. make cyanogenmod_i9100g_defconfig
3. make menuconfig
4. make -j5
after a few seconds i get this error
Code:
CHK include/linux/version.h
CHK include/generated/utsrelease.h
make[1]: `include/generated/mach-types.h' is up to date.
CALL scripts/checksyscalls.sh
CHK include/generated/compile.h
/home/incarnation95/cm10kernel/t1/scripts/gen_initramfs_list.sh: Cannot open '/home/incarnation95/home/incarnation95/cm10kernel/t1/usr/i9100g_initramfs.list'
make[1]: *** [usr/initramfs_data.cpio] Error 1
make: *** [usr] Error 2
[email protected]:~/cm10kernel/t1$
do you know how to tackle this problem?
please help i am really in a mess due to this.
previously i compiled a stock kernel, in stock kernel the compillation process went very good but it didnt boot
i really want to make this aosp kernel, and this is the only guide which indicates compilling an aosp kernel
hope you could sort out my problem.
thanks in advance
Click to expand...
Click to collapse
These steps should resolve it
1. open the .config file that is created after you do make cyanogenmod_i9100g_defconfig
2. check the path of the file i9100g_initramfs.list and gen_initramfs_list.sh
3. edit the .config file to make sure the actual path matches to that in the .config file.
4. make -j5
5. Enjoy the new kernel !!
msri3here said:
These steps should resolve it
1. open the .config file that is created after you do make cyanogenmod_i9100g_defconfig
2. check the path of the file i9100g_initramfs.list and gen_initramfs_list.sh
3. edit the .config file to make sure the actual path matches to that in the .config file.
4. make -j5
5. Enjoy the new kernel !!
Click to expand...
Click to collapse
2. CONFIG_INITRAMFS_SOURCE="source/usr/i9100g_initramfs.list" (THIS WAS THERE BY DEFAULT)
I MADE IT CONFIG_INITRAMFS_SOURCE="~/home/incarnation95/cm10kernel/t1/usr/i9100g_initramfs.list"
as the location was.
i dont think we really have to define the path of gen_initramfs_list.sh or do we? and if yes then where?
There you have the problem...remove the "source/" from the path in the .config file
This path is defined by default and just needs customization for our device...
Sent from my GT-I9000 using xda premium
msri3here said:
There you have the problem...remove the "source/" from the path in the .config file
This path is defined by default and just needs customization for our device...
Sent from my GT-I9000 using xda premium
Click to expand...
Click to collapse
O thanks mate it really worked
Thanks a ton. Was tryna find sol. Since 3 days
Sent from my GT-I9100G using Tapatalk 2
---------- Post added at 11:32 PM ---------- Previous post was at 10:42 PM ----------
now after getting over those errors i am getting this error now :/
Code:
//home/incarnation95/Downloads/arm-2011.03/bin/arm-none-eabi-ld: cannot open linker script file /arch/arm/mach-omap2/sec_omap.lds: No such file or directory
make[1]: *** [arch/arm/mach-omap2/mailbox_mach.o] Error 1
make: *** [arch/arm/mach-omap2] Error 2
and weird thing is the files exists :/
Hi guys-
I know this isn't the right subforum, but I'm not allowed to post in the right subforum, so hopefully someone will move this thread
I have been building kernels for my note 2. I have built a ton of kernels from garwynn's community kernel (somewhat modified- I patched it up to linux 3.0.69, and am working up the steam to handpatch in the new 0.70 commit, which is a bit larger. )
My latest project is to get stweaks to work. I am not sure what it means by "No kernel support" (if it would tell me what it wanted, I would turn it on =D ).
I decided to troubleshoot by building a kernel that I knew had support- the Perseus S3.
I flashed the Perseus S3 prebuilt kernel, and it worked fine.
I git cloned the Perseus source tree. I got a copy of the Perseus release's kernel config from /proc/config.gz on the phone running the working Perseus kernel. I built the kernel using that config with no modifications. I took apart the release file and packaged the ramdisk out of that with my newly-built kernel and modules so that I'd have /res and all of its contents available.
It boots great, it runs great- but Stweaks says "No kernel support". /res is mounted on the phone and has uci.sh and stweaks and all the config files in it. I used the same kernel config that the kernel in the Perseus release has (and THAT one makes stweaks happy).
No kernel modules got left out (actually, I wound up with more modules than the release version had, which seems odd if they were built off the same config file- but they're not old leftover modules; I did a make distclean before I built it).
I imagine I'm missing something simple here, but what? Or, a better questions: "What exactly does Stweaks mean by "No kernel support"? It's the same source code as the kernel that works (supposedly), compiled with all the same config options (definitely).
I'm actually marching off to github to look up the answer myself, but I reckon someone can answer this in 10 seconds, and slogging through all the stweaks source code will be no fun (I have an unfriendly relationship with java ).
Thanks!
Actually, it turns out that this was a quick slog through github. This is the function in stweaks that checks for "kernel support" - which is a bit of a laugh once you see how it makes this complex decision
Code:
private boolean isKernelSupportOk() {
Boolean isOk = false;
Log.i(LOG_TAG, "Searching siyah script...");
File file = new File("/res/uci.sh");
if (file.exists())
{
Log.i(LOG_TAG, "Kernel script(s) found.");
if (file.canExecute())
{
Log.i(LOG_TAG, "Kernel script(s) OK.");
isOk = true;
}
else
{
Log.e(LOG_TAG, "Kernel script(s) NOT OK!");
}
}
else
{
Log.e(LOG_TAG, "Kernel script(s) NOT found!");
}
return isOk;
}
It works! I am not sure how the permissions on uci.sh keeps getting changed, but I had perseus.sh fix it at boot time (that gets called by init, and remounts / rw).
hi, how did you fix your's STwekas ? i have problem with permisions... on ubuntu it is ok, but when i flash it to phone permisions are bad and i have "Sorry, no kernel support" :/
Hey guys, so a lot of you have be eagerly anticipating the release of PAC-4.4. Others of you may be seeking pac for a device that is not supported at this moment. So I thought I would take this opportunity to write a guide on how to compile PAC.
In order to compile Android, I recommend that you use a Linux distro. For the purposes of this guide, I shall be using Ubuntu 13.10. It is pretty easy to set up, even as a dual boot with windows.
The first thing you need to do, once you have installed Ubuntu, is to set it up to be able to compile Android. There are a lot of guides that show you how to do this, and this guide has pretty clear instructions. Follow all of his directions until you reach the point where he tells you to initialize the repository (The command he has as an example there is repo init -u git://github.com/AOKP/platform_manifest.git -b jb-mr2. Do not run this command or you will have downloaded the AOKP sources instead of the PAC sources)
To download the pac sources, we need to initialize the repository first. For this guide, I will be downloading the pac source to ~/android/pac. Run:
Code:
mkdir -p ~/android/pac
cd ~/android/pac
repo init -u git://github.com/PAC-man/pacman.git -b pac-4.4
Now it is time to download the source itself. Keep in mind that the source is rather large (~10+ GB), so you might want to make yourself a cup of tea (or 10 cups if you have a crappy isp) while waiting. Run:
Code:
repo sync
Now, it is time to do the actually compiling. If your device is already supported by PAC, please skip directly to post 3. Else, go to post 2.
Adding Support for a device
To add support for your device, the first thing you need to do is to hunt down your device tree. If you are not sure where your device tree is located, google it or ask in your device's subforum. Now, it is time to add the files required to build.
From the root of directory where you have downloaded the pac source (~/android/pac), go to the vendor/pac directory. This is where we will be making the changes necessary to build for your device. Here are the files that need to be modified/added. Obviously, substitute your devices codename for CODENAME.
1. dependencies/CODENAME.dependencies
This file grabs your device and kernel tree. Look at the dependencies file of a device that is similar to yours to figure out what you need to place in here. A list of all the devices we support and their respective codenames can be found here. Again, if you are unsure about what to place here, you may want to ask for help in your devices subforum. Whenever possible, try to use the CM device tree. For the vendor files, keep the account name as "Pinky-Inky-and-Clyde" but change the repository to the appropriate OEM (check here for repos). Do not worry if the vendor files for your device are not in that repository. We will be adding them later.
Here is a sample CODENAME.dependencies file for a Samsung device (note that the account names are case sensitive):
Code:
[
{
"account": "Pinky-Inky-and-Clyde",
"repository": "proprietary_vendor_samsung",
"target_path": "vendor/samsung",
"revision": "cm-11.0"
},
{
"account": "CyanogenMod",
"repository": "android_device_samsung_CODENAME",
"target_path": "device/samsung/CODENAME",
"revision": "cm-11.0"
},
{
"account": "CyanogenMod",
"repository": "android_kernel_samsung_CODENAME",
"target_path": "kernel/samsung/CODENAME",
"revision": "master"
},
{
"account": "CyanogenMod",
"repository": "android_hardware_samsung",
"target_path": "hardware/samsung",
"revision": "cm-11.0"
}
]
Once you have done this, go to the root of your pac source (~/android/pac for this guide), and run
Code:
./vendor/pac/tools/getdependencies.py CODENAME
This will attempt to create the file .repo/local_manifests/roomservice.xml and then sync up the sources. If you have to make changes to your dependencies, please remove the roomservice.xml file and re-run the script again to ensure that no incorrect repositories are left lingering.
Go to the vendor files directory (~/android/pac/vendor/YOUR_OEM), and search for the vendor files of your device. If they are not there, you will have to search for them online and copy them into the folder.
Alternatively, if your device has an extract-files.sh script, in the device tree (located in device/OEM/CODENAME), you can hook up your device via usb and run that command to grab the vendor files directly from your device. In this case, connect your device and run:
Code:
cd device/OEM/CODENAME
./extract-files.sh
2. products/pac_CODENAME.mk
Again, look at the same file for a device that is similar to yours and make the appropriate changes for your device.
Here is a sample pac_CODENAME.mk file for a hdpi device:
Code:
# Check for target product
ifeq (pac_CODENAME,$(TARGET_PRODUCT))
# OVERLAY_TARGET adds overlay asset source
OVERLAY_TARGET := pa_hdpi
# PAC device overlay
PRODUCT_PACKAGE_OVERLAYS += vendor/pac/overlay/pac/hdpi_480x800
# PAC boot logo
PRODUCT_COPY_FILES += \
vendor/pac/prebuilt/common/bootlogo/pac_logo_480x800.rle:root/logo.rle
# Copy bootanimation
PRODUCT_COPY_FILES += \
vendor/pac/prebuilt/480x800/bootanimation.zip:system/media/bootanimation.zip
# include PAC common configuration
include vendor/pac/config/pac_common.mk
# Inherit CM device configuration
$(call inherit-product, device/samsung/CODENAME/cm.mk)
PRODUCT_NAME := pac_CODENAME
endif
Note: for the PAC device overlay, look inside vendor/pac/overlay/pac for the available overlays. Likewise, for the bootanimation and boot logo, look in their respective directories for the available sizes.
3. vendorsetup.sh
Add a line that looks something like this in the appropriate area of this file (under the appropriate OEM, and in alphabetical order, please).
Code:
add_lunch_combo pac_CODENAME-userbebug
--- The below files are not necessary for successful compilation, but are required if you submit your device for official PAC support. ---
4. Contributors
5. Nightly.xml
6. XDAThreads
7. devices-breakdown.xml
For these files, follow the format of the other devices.
Building PAC
Now that we got all of the housekeeping out of the way, it is time to build the rom!
Open up a terminal and change directory to the base of where you downloaded the PAC source to begin compiling. Run (substitute your device's codename for CODENAME):
Code:
./build-pac.sh CODENAME
There are some additional options available in the build script. To see them all, simply run:
Code:
./build-pac.sh
If everything goes well, your build should be starting. Go take a walk or something while it is building. This may take a while if you have a computer with weak specs.
Submitting your device for official support
Once you have successfully built PAC for your device and tested it, you can submit your changes to our gerrit for official support and automatic nightly builds.
In order to do this, you need to first sign up on our gerrit and get your ssh keys set up. So head on over to http://review.pac-rom.com/ to register for an account. Next, we need to generate an ssh key pair in order to push changes to gerrit. To check if you already have a key pair generated, run
Code:
ls ~/.ssh
If it shows a id_rsa.pub, you already have your keys generated and you can skip to the adding your ssh key to gerrit part.
On the other hand, if there is nothing in your .ssh folder, run
Code:
ssh-keygen -t rsa -C "[email protected]"
When you run this command, it will ask you where you want to save this file. Just hit enter. Next, it will ask you for a passphrase for your private key. Enter a passphrase here that you can remember.
Now, it is time to add your public key to our gerrit. To copy your public key over, run:
Code:
sudo apt-get install xclip
xclip -sel clip < ~/.ssh/id_rsa.pub
(Alternatively, you can cat the file and just copy it, but the above mentioned way avoids any missing characters while copying.)
Now, login to our gerrit and go to your account settings > ssh public keys. Click on add, and paste the key and save.
It is time to upload your changes. We have a script to make this process easier. To grab the script, run:
Code:
cd ~/bin
wget http://pac-rom.com/downloads/pac-review
chmod a+x pac-review
Now, run:
Code:
cd ~/android/pac
cd vendor/pac
git add -A
git commit
This should open up a text editor (probably nano) where you can put a commit message. For our purposes, just write something along the lines of "Add support for ___." To save the file, hit Ctrl + o. To exit, hit Ctrl + x. Then, run:
Code:
pac-review -p
Follow the prompts and your changes should be automatically pushed and a link will show to your change on gerrit.
If you realize that you made a mistake in your commit, DO NOT submit a new change. Instead, make your changes, then run:
Code:
git add -A
git commit --amend
Update your commit message if necessary and then push with the pac-review script. This will create a new patchset on our gerrit instead of creating a new commit.
And that is all! If you have any questions, dont hesitate to ask them here. Ill try to get back to you as soon as possible
Hey iurnait, I didn't find any instructions on pac's github on how to clone the entire trees. Please help.
Ateekujjawal said:
Hey iurnait, I didn't find any instructions on pac's github on how to clone the entire trees. Please help.
Click to expand...
Click to collapse
cd into the directory where you are working, and then run
Code:
repo init -u git://github.com/PAC-man/pacman.git -b pac-4.4
then run
Code:
repo sync
iurnait said:
cd into the directory where you are working, and then run
Code:
repo init -u git://github.com/PAC-man/pacman.git -b pac-4.4
then run
Code:
repo sync
Click to expand...
Click to collapse
By doing this, will I get all the packages_apps_settings,frameworks_av etc.
Ateekujjawal said:
By doing this, will I get all the packages_apps_settings,frameworks_av etc.
Click to expand...
Click to collapse
this will grab everything needed to compile
How can I use linaro toolchain to compile pacman and where to download it.
Simplest Method you found here:
http://forum.xda-developers.com/showthread.php?t=2644910
You need only one a Machine with a Ubuntu ready,
Is this method also usable for the LG P990 (Optimus 2x) ?
If so, any special things I should look out for with this old device?
Sent from my LG P990 running CM11 (thnx tonyp) via xda-developers app
DavidLouwers said:
Is this method also usable for the LG P990 (Optimus 2x) ?
If so, any special things I should look out for with this old device?
Sent from my LG P990 running CM11 (thnx tonyp) via xda-developers app
Click to expand...
Click to collapse
If you can find your device here: https://github.com/PAC-man/android_vendor_pac/blob/pac-4.4/devices-breakdown.xml
it will work
@DavidLouwers
talk with tonyp and penguin77 if the device repos work PAC 4.4
You can only one use the Kernel/Device/Vendor Tree... (if you planned to run as nightly in jenkins) If tonyp use for her [email protected] other modified repos was normally is in PAC or Cyanogenmod... it can build but you must modifing default.xml in .repo/manifests. But then you can not add to nighlys...
if you want help, ask me, i had this device before and maintained PAC for p990
MetaIIica said:
@DavidLouwers
talk with tonyp and penguin77 if the device repos work PAC 4.4
You can only one use the Kernel/Device/Vendor Tree... (if you planned to run as nightly in jenkins) If tonyp use for her [email protected] other modified repos was normally is in PAC or Cyanogenmod... it can build but you must modifing default.xml in .repo/manifests. But then you can not add to nighlys...
if you want help, ask me, i had this device before and maintained PAC for p990
Click to expand...
Click to collapse
Thanks, I will! I will do everything in my power to make PAC ROM available for my phone! I used to have your PAC 4.3 ROM, which I loved, and that's the reason I really want a KitKat PAC ROM, because KitKat is optimised for phones with low memory, so it'd be awesome to have PAC 4.4 for the old P990.
I shall try to gather the penguins and port PAC to P990!
Langes said:
If you can find your device here: github site, can't post it because I'm a new member :/
it will work
Click to expand...
Click to collapse
Sadly enough, P990 isn't on it, but with the help of Metallica and the penguins, maybe we'll be able to make PAC available for the P990 anyway!
Ateekujjawal said:
How can I use linaro toolchain to compile pacman and where to download it.
Click to expand...
Click to collapse
http://forum.xda-developers.com/showthread.php?t=2348366
For now, there is only cm11 available for the note 3.
Does this matter?
If not, I can try to make it
Gesendet von meinem SM-N9005 mit Tapatalk
Thumper_ said:
For now, there is only cm11 available for the note 3.
Does this matter?
If not, I can try to make it
Gesendet von meinem SM-N9005 mit Tapatalk
Click to expand...
Click to collapse
If there is a working cm 11 tree available, have a look at the second post on how to add PAC support. It shouldnt be too difficult considering you already have cm11
Sent from my Nexus 7 using Tapatalk
Thumper_ said:
For now, there is only cm11 available for the note 3.
Does this matter?
If not, I can try to make it
Gesendet von meinem SM-N9005 mit Tapatalk
Click to expand...
Click to collapse
Would be great if you built it and shared the build..not much available for the note 3 yet
Sent from my SM-N900P using Tapatalk
nelsonator1982 said:
Would be great if you built it and shared the build..not much available for the note 3 yet
Sent from my SM-N900P using Tapatalk
Click to expand...
Click to collapse
Just downloading the repo
Let's see what I can do.
Gesendet von meinem SM-N9005 mit Tapatalk
Can't get it
where should I place the pac_CODENAME.mk ?
Then the dependencies?
Suppose, I am building for c1905, then the dependencies must be in /device/sony/c1905/c1905.dependencies?
Then
Is this pac_c1905.mk okay?
Code:
# Check for target product
ifeq (pac_c1905,$(TARGET_PRODUCT))
# OVERLAY_TARGET adds overlay asset source
OVERLAY_TARGET := pa_hdpi
# PAC device overlay
PRODUCT_PACKAGE_OVERLAYS += vendor/pac/overlay/pac/hdpi_480x854
# PAC boot logo
PRODUCT_COPY_FILES += \
vendor/pac/prebuilt/common/bootlogo/pac_logo_480x854.rle:root/logo.rle
# Copy bootanimation
PRODUCT_COPY_FILES += \
vendor/pac/prebuilt/480x854/bootanimation.zip:system/media/bootanimation.zip
# include PAC common configuration
include vendor/pac/config/pac_common.mk
# Inherit CM device configuration
$(call inherit-product, device/sony/c1905/cm.mk)
PRODUCT_NAME := pac_c1905
endif
Help Me out. I am trying to build for Xperia M.
Hi all.
I'd like to build CM10.2.1 from scratch with a few extras like up to date OpenSSH/OpenSSL.
The problem I have no idea whether this is (still) possible and where to start from.
I can see a number of tutorials on how to do it for CM11 or CM12. But there seems to be none for CM10.2.1.
Useless to say, I need CM10.2.1.
Is there any hint on how to?
Uqbar said:
Hi all.
I'd like to build CM10.2.1 from scratch with a few extras like up to date OpenSSH/OpenSSL.
The problem I have no idea whether this is (still) possible and where to start from.
I can see a number of tutorials on how to do it for CM11 or CM12. But there seems to be none for CM10.2.1.
Useless to say, I need CM10.2.1.
Is there any hint on how to?
Click to expand...
Click to collapse
Was there a release by CM of 10.2.1 ? I don't remember.. the earlier or first builds of CM (far as I remember) were from cm11...
MidnightDevil said:
Was there a release by CM of 10.2.1 ? I don't remember.. the earlier or first builds of CM (far as I remember) were from cm11...
Click to expand...
Click to collapse
http://download.cyanogenmod.org/?device=flo&type=stable
Uqbar said:
http://download.cyanogenmod.org/?device=flo&type=stable
Click to expand...
Click to collapse
You're right, I never ran across those. Our n7 came natively with Android 4.3, which would be CM10.3 from my understanding. Are you able to find a manifest for that version? I'm guessing if there have it there, the source code should be somewhere too. Have you tried looking at manifests to see what's the branch name for the code version you're looking for?
MidnightDevil said:
You're right
Click to expand...
Click to collapse
I knew.
MidnightDevil said:
Are you able to find a manifest for that version?
Click to expand...
Click to collapse
If I knew where to find a manifest file I was already half way.
MidnightDevil said:
I'm guessing if there have it there, the source code should be somewhere too.
Click to expand...
Click to collapse
"There" is the whole internet for me. Unless there is some more detailed hint.
MidnightDevil said:
Have you tried looking at manifests to see what's the branch name for the code version you're looking for?
Click to expand...
Click to collapse
Google allows me to find a lot of things. I only would like to get directions for the whole process, not single bits of information.
I mean, here I have directions for CM11 on Nexus 4. But the manifest is just "copy past these lines there", no explanation, no details. just "do it!". But I need to customize the process and the data for flo!
Uqbar said:
I knew.
If I knew where to find a manifest file I was already half way.
Click to expand...
Click to collapse
The manifests and readme files for each release are available on CM's github at https://github.com/CyanogenMod/android - just change the branch in the dropdown to the one you require (so the ones you're looking for would be at https://github.com/CyanogenMod/android/tree/cm-10.2 ).
Then you're probably fine following any instructions you've got on how to build for this device (e.g. CM's own guide at http://wiki.cyanogenmod.org/w/Build_for_flo), changing any branch references (from cm-11.0 to cm-10.2) as appropriate; for example to initialize the repo you'd use
Code:
$ repo init -u git://github.com/CyanogenMod/android.git -b cm-10.2
I'd suggest trying to build stock CM10.2 for flo from those instructions first, then once you've resolved any errors that crop up and got it building you can look at adding/amending the bits you want.
hopscotchjunkie said:
The manifests and readme files for each release are available on CM's github at https://github.com/CyanogenMod/android - just change the branch in the dropdown to the one you require (so the ones you're looking for would be at https://github.com/CyanogenMod/android/tree/cm-10.2 ).
Then you're probably fine following any instructions you've got on how to build for this device (e.g. CM's own guide at http://wiki.cyanogenmod.org/w/Build_for_flo), changing any branch references (from cm-11.0 to cm-10.2) as appropriate; for example to initialize the repo you'd use
Code:
$ repo init -u git://github.com/CyanogenMod/android.git -b cm-10.2
I'd suggest trying to build stock CM10.2 for flo from those instructions first, then once you've resolved any errors that crop up and got it building you can look at adding/amending the bits you want.
Click to expand...
Click to collapse
Thanks for the hints. In the meanwhile I have found the CM wiki and am studying it.
I'd need to know whether with these directions I will be able to update (for example) the OpenSSH/OpenSSL packages. I can also manually adapt everything (I am not a real newbie) but I'd like to know it in advance.
Thanks again for the infos.
UPDATE! I started following directions from the CM wiki. During the "repo sync" for CM 10.2 I have got stuck because of a DMCA takedown. This is the repo (android_external_svox) and this is the notice. The GitHub is asking me for a password I obviously don't know.
So basically I need to skip that. But don't know how to. Any extra hint?
Code:
...
Fetching project CyanogenMod/android_packages_apps_SpeechRecorder
Fetching projects: 99% (393/396)
Password for 'https://github.com':
remote: Repository unavailable due to DMCA takedown.
remote: See the takedown notice for more details:
remote: https://github.com/github/dmca/blob/master/2014-12-22-Cambridge-Mobile.md.
fatal: Authentication failed for 'https://github.com/CyanogenMod/android_external_svox/'
New update
I managed to get past the error even if I don't know whether that package (svox) will block my build.
The wiki says to:
Code:
cd ~/android/system/vendor/cm
./get-prebuilts
Unluckily for me neither that directory exists, not the script itself (get-prebuilts) exists.
I used "find" to case insensitively look for it within the ~/android/system tree. No way.
3rd update
Uqbar said:
I managed to get past the error even if I don't know whether that package (svox) will block my build.
The wiki says to:
Code:
cd ~/android/system/vendor/cm
./get-prebuilts
Unluckily for me neither that directory exists, not the script itself (get-prebuilts) exists.
I used "find" to case insensitively look for it within the ~/android/system tree. No way.
Click to expand...
Click to collapse
After having just skipped the above steps, I've (of course!) got this:
Code:
...
Repository synced!
Looking for dependencies
Adding dependencies to manifest
Adding dependency: CyanogenMod/android_kernel_google_msm -> kernel/google/msm
Using default branch for android_kernel_google_msm
Syncing dependencies
Fetching project CyanogenMod/android_kernel_google_msm
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
curl: (22) The requested URL returned error: 404 Not Found
Server does not provide clone.bundle; ignoring.
remote: Counting objects: 2496694, done.
remote: Compressing objects: 100% (406478/406478), done.
remote: Total 2496694 (delta 2065580), reused 2496690 (delta 2065578)
Receiving objects: 100% (2496694/2496694), 614.32 MiB | 1.67 MiB/s, done.
Resolving deltas: 100% (2065580/2065580), done.
From https://github.com/CyanogenMod/android_kernel_google_msm
* [new branch] cm-10.2 -> github/cm-10.2
* [new tag] cm-10.2-M1 -> cm-10.2-M1
* [new tag] cm-10.2.0 -> cm-10.2.0
* [new tag] cm-10.2.1 -> cm-10.2.1
Fetching projects: 100% (1/1), done.
Checking out files: 100% (41694/41694), done.
Done
build/core/product_config.mk:238: *** _nic.PRODUCTS.[[device/asus/flo/cm.mk]]: "frameworks/native/build/tablet-7in-xhdpi-2048-dalvik-heap.mk" does not exist. Stop.
** Don't have a product spec for: 'cm_flo'
** Do you have the right repo manifest?
Thus I am stuck untill I get the "get-prebuilts" script run. :crying:
Waiting for either some google result of mine or some merciful help from this community.
ANYKERNEL
tuna (maguro / toro / toroplus)[#WARRANTY]
It is difficult to update all Roms frequently, and it does not always makes sense to compile, download and flash a whole rom, if only some kernel changes are applied.
This kernel will include changes before we add them official to our kernel source on Unlegacy-Android (most of the time security bugfixes)!
Android 5.1, Android 6.0 and Android 7.x
This Kernel should work on all Android 5.1, Android 6.0 and Android 7.xRoms
Android 4.4
On Android 4.4 we need a different kernel, 4.4 Kernel includes "KitKat" tag on zip name.
What else to say
Kernel compiled using GCC 4.7
Anykernel based on Anykernel2 by @osm0sis ( https://github.com/osm0sis/AnyKernel2 ) - it will dump your boot.img and replace the zImage and add proper kernel modules.
Roms with default libion
LineageOS (unofficial)
lineage-13.0_maguro-6.0.1-20180130-2235.zip and newer
lineage-13.0_toro-6.0.1-20180130-2258.zip and newer
lineage-13.0_toroplus-6.0.1-20180130-2323.zip and newer
OmniRom (unofficial)
OmniRom 4.4: omni_tuna-4.4.4-20180128-0005.zip and newer
OmniRom 6.0: omni_tuna-6.0.1-20180128-0334.zip and newer
OmniRom 7.x: omni_tuna-7.1.2-20180128-1348.zip and newer
SlimRoms (unofficial)
Slim6: Slim_tuna-6.0.1-20180128-2356.zip and newer
Slim7: Slim_tuna-7.1.2-20180131-1640.zip
Unlegacy-Android:
All official Unlegacy-Android builds starting on 15th feburary use the default libion
On older Roms, using TI's libion, you can use attached kernel from here.
[#DONATETOME]
XDA:DevDB Information
(tuna) Anykernel, Kernel for the Samsung Galaxy Nexus
Contributors
Android-Andi, Ziyan
Source Code: https://github.com/Unlegacy-Android/android_kernel_samsung_tuna/tree/staging
Kernel Special Features: Testing before applying on our source official, CVE fixes
Version Information
Status: Testing
Created 2017-06-23
Last Updated 2018-05-09
Reserved
As requested, here's my setup to compile tuna kernel.
01.05.2020
Follow https://github.com/andi34/android_build-bot/blob/manifest/README.md and https://github.com/andi34/android_build-bot/blob/kernelcompile/README.md
What do you need
Kernel Source (you can get our latest kernel source on SlimRoms, OmniRoms or CyanogenMods github, "tuna kernel")
GCC ( https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/arm/arm-eabi-4.7 )
pvr source, added to omap4-common device repo and hardware_ti_omap4 repo (can be found on SlimRoms, OmniRoms or CyanogenMods github)
you can use my scripts put below (update some paths, marked red )
AnyKernel2 Source from osm0sis (update for tuna needed)
build-gcc4.7.env
Code:
export CROSS_COMPILE=[COLOR="Red"]'/home/andi/android2/kernelcompile/arm-eabi-4.7/bin/arm-eabi-'[/COLOR]
export LDFLAGS=''
export CFLAGS=''
export SUBARCH=arm
export ARCH=arm
export STRIP=[COLOR="Red"]/home/andi/android2/kernelcompile/arm-eabi-4.7/bin/arm-eabi-strip[/COLOR]
alias 'stm'='$STRIP --strip-unneeded *.ko'
compile-tuna.sh
Code:
#!/bin/bash
readonly red=$(tput setaf 1) # red
readonly grn=$(tput setaf 2) # green
readonly ylw=$(tput setaf 3) # yellow
readonly blu=$(tput setaf 4) # blue
readonly cya=$(tput setaf 6) # cyan
readonly txtbld=$(tput bold) # Bold
readonly bldred=$txtbld$red # red
readonly bldgrn=$txtbld$grn # green
readonly bldylw=$txtbld$ylw # yellow
readonly bldblu=$txtbld$blu # blue
readonly bldcya=$txtbld$cya # cyan
readonly txtrst=$(tput sgr0) # Reset
err() {
echo "$txtrst${red}$*$txtrst" >&2
}
warn() {
echo "$txtrst${ylw}$*$txtrst" >&2
}
info() {
echo "$txtrst${grn}$*$txtrst"
}
setbuildjobs() {
# Set build jobs
JOBS=$(expr 0 + $(grep -c ^processor /proc/cpuinfo))
info "Set build jobs to $JOBS"
}
info "Kernel source path: $KERNELSOURCE"
info "PVR Source path: $PVRSAUCE"
info "Working directory: $WORKINGDIR"
info "resulting zImage and modules stored at: $WORKINGOUTDIR"
setbuildjobs
info "Moving to kernel source"
cd $KERNELSOURCE
info "Import toolchain environment setup"
info "Toolchain: $TOOLCHAIN"
source $SAUCE/build-$TOOLCHAIN.env
info "Create a buid directory, known as KERNEL_OUT directory"
# then always use "O=$SAUCE/tuna" in kernel compilation
info "create working directory"
mkdir -p $WORKINGDIR
warn "Make sure the kernel source clean on first compilation"
make O=$WORKINGDIR mrproper
warn "Rebuild the kernel after a change, maybe we want to reset the compilation counter"
echo 0 > $WORKINGDIR/.version
info "Import kernel config file: $DEFCONFIGNAME"
make O=$WORKINGDIR $DEFCONFIGNAME
info "Change kernel configuration if needed using:"
info " make O=$WORKINGDIR menuconfig "
info "lets build the kernel"
make -j$JOBS O=$WORKINGDIR
if [ -f $WORKINGDIR/arch/arm/boot/zImage ]; then
info "Copying the resulting zImage and modules to: $WORKINGOUTDIR"
info "Creating directory..."
mkdir -p $WORKINGOUTDIR
mkdir -p $WORKINGOUTDIR/modules
cp $WORKINGDIR/arch/arm/boot/zImage $WORKINGOUTDIR/
find $WORKINGDIR/ -type f -name *.ko -exec cp {} $WORKINGOUTDIR/modules/ \;
info "Files moved!"
info "Pointing KERNELDIR to KERNEL_OUT directory"
export KERNELDIR=$WORKINGDIR
warn "Make sure the PVR source clean."
warn "Running 'make clean'..."
make clean -C $PVRSAUCE/build/linux2/omap4430_android
info "Building the PVR module..."
make -j8 -C $PVRSAUCE/build/linux2/omap4430_android TARGET_PRODUCT="blaze_tablet" BUILD=release TARGET_SGX=540 PLATFORM_VERSION=4.1
info "Copying the resulting PVR module to: $WORKINGOUTDIR"
cp -fr $PVRSAUCE/binary2_omap4430_android_release/target/pvrsrvkm.ko $WORKINGOUTDIR/modules/pvrsrvkm_sgx540_120.ko
mv $PVRSAUCE/binary2_omap4430_android_release/target/pvrsrvkm.ko $WORKINGOUTDIR/modules/
warn "Don't leave any module objects in PVR source!"
warn "Running 'make clean'..."
make clean -C $PVRSAUCE/build/linux2/omap4430_android
info "Properly stripping the kernel modules for smaller size (implified as stm command inside build.env)..."
cd $WORKINGOUTDIR/modules
stm
info "####################"
info "# Done! #"
info "####################"
else
warn "####################"
warn "# FAILED! #"
warn "####################"
fi
cd $SAUCE
tuna_k.sh
Code:
#!/bin/bash
[COLOR="Red"]SAUCE=~/android2/kernelcompile
PVRSAUCE=~/android2/official/omap4/stable/pvr-source/eurasiacon
KERNELSOURCE=~/android2/official/kernel/android_kernel_ti_omap4[/COLOR]
TOOLCHAIN="gcc4.7"
DEFCONFIGNAME=tuna_kitkat_defconfig
WORKINGDIR=$SAUCE/tuna-kitkat
WORKINGOUTDIR=$WORKINGDIR-bin
. `dirname $0`/compile-tuna.sh
tuna_m.sh
Code:
#!/bin/bash
[COLOR="Red"]SAUCE=~/android2/kernelcompile
PVRSAUCE=~/android2/official/omap4/stable/pvr-source/eurasiacon
KERNELSOURCE=~/android2/official/kernel/android_kernel_ti_omap4[/COLOR]
TOOLCHAIN="gcc4.7"
DEFCONFIGNAME=tuna_defconfig
WORKINGDIR=$SAUCE/tuna-marshmallow
WORKINGOUTDIR=$WORKINGDIR-bin
. `dirname $0`/compile-tuna.sh
Hey together!
We started preparing a common 3.0 omap4 kernel.
I have started applying some small stuff to our current kernel (also reverts some previous commits) which needs testing.
The kernel should work on all L, M and N Roms. Please let me know if you face any new issues.
Android-Andi said:
Hey together!
We started preparing a common 3.0 omap4 kernel.
I have started applying some small stuff to our current kernel (also reverts some previous commits) which needs testing.
Click to expand...
Click to collapse
Thanks for your hard work. I flashed your kernel onto DU 11.5 (Android 7.12). It boots fine and I'm writing this post with this configuration. I will test it during the next days. First difference: Nightlight now works...
Android-Andi said:
Want to support development? You can consider donating, we've spent countless of hours with this
Click to expand...
Click to collapse
@Android-Andi @Ziyan Thank you for your work! I have donated $10 and I hope others will join me to support our developers
Android-Andi said:
Please let me know if you face any new issues.
Click to expand...
Click to collapse
It's running very well but I'm getting battery drain cause of missing deep-sleep-cycles.
@guest4711 maguro?
On toro or toroplus issues i need a dmesg always because i own a maguro only.
Android-Andi said:
@guest4711 maguro?
Click to expand...
Click to collapse
Yes, good old maguro (with baseband I9250XXLJ1, see #3).
@guest4711 attached kernel reverts "cpufreq: interactive: sync with p-android-omap-3.0-dev", let's see if this fixes your issue.
double, ignore
Android-Andi said:
@guest4711 attached kernel reverts "cpufreq: interactive: sync with p-android-omap-3.0-dev", let's see if this fixes your issue.
Click to expand...
Click to collapse
Ok, I'll test it. Simple dirty flashing without any wiping?
guest4711 said:
Ok, I'll test it. Simple dirty flashing without any wiping?
Click to expand...
Click to collapse
Yeah if it's not that i have another idea. My maguro was almost empty, only could quick test wifi, camera, audio yesterday. Charging it now and going to work on it later again.
Android-Andi said:
Yeah if it's not that i have another idea. My maguro was almost empty, only could quick test wifi, camera, audio yesterday. Charging it now and going to work on it later again.
Click to expand...
Click to collapse
Ok. Quick tries to enter deep sleeping show "some devices failed to suspend" in dmesg, see attached log.
guest4711 said:
Ok. Quick tries to enter deep sleeping show "some devices failed to suspend" in dmesg, see attached log.
Click to expand...
Click to collapse
Would it help to log the same with "DU kernel" and post it here? Or do you need other logs too?
guest4711 said:
Would it help to log the same with "DU kernel" and post it here? Or do you need other logs too?
Click to expand...
Click to collapse
One more to test.
Android-Andi said:
One more to test.
Click to expand...
Click to collapse
Keep quite, please - the cpus are sleeping...
One more attached. Almost spend the whole day with it.
Have fun with it!
Android-Andi said:
One more attached. Almost spend the whole day with it.
Have fun with it!
Click to expand...
Click to collapse
Thank you. Installed and running, but need a while for testing it.
Have a nice weekend!
Another one, adds a bunch of zram changes (not enabled - shouldn't hurt) and core parts from galaxy tab2 (shouldn't hurt tuna, but we need to test).