[Q] Overclocking 530 [Need kernel!] - Galaxy Tab 4 Q&A, Help & Troubleshooting

I am truly surprised that there has not been any interest in overclocking these devices. With the low processor speed and relatively slow GPU I know these devices have potential to be greatly improved if bumped up a bit! We just need someone to take a little time to modify the kernel. Could someone please kindly do this? I was even going to do the work and try modifying it myself but I do not have a PC at the moment and could not find a way on android. I love to play the most demanding games and by removing most of the bloat and tweaking kernel settings I have managed to get almost everything running smoothly except for Nova 3 which runs smooth half the time and lags like hell the other half. Someone please make us an overclock kernel! Pretty please!

Would it be possible to use a kernel from another device that has been modified for over clocking? Are kernels device specific or no? Any help here would be greatly appreciated guys.

I think Kernels are device specific.

GeeKerGurL said:
Would it be possible to use a kernel from another device that has been modified for over clocking? Are kernels device specific or no? Any help here would be greatly appreciated guys.
Click to expand...
Click to collapse
I think kernels are device specific.
To modify a kernel, you need to use github and modify the kernel sources, adding new values for cpu frequency, voltage, gpu frequencies, memory etc.
I think it is a bit complex, and not to be tampered with unless you know what you are doing.
Here are some more details on this topic:
http://xda-university.com/as-a-developer/adding-features-to-your-kernel
I am also hoping and waiting for a rom with a kernel that supports overclocking on the T530. But I think as long as the developers still are busy with getting basic stuff to work in the 4.4.4 and 5.02 based roms, this will be their highest priority. Sure, the 4.4.2 custom roms have this stuff working, but I think its always more fun for the developer to work with the newest os versions. ... and since these developers dont get payed for their work, their only motivation is to do what they enjoy doing.

amyren said:
I think kernels are device specific.
To modify a kernel, you need to use github and modify the kernel sources, adding new values for cpu frequency, voltage, gpu frequencies, memory etc.
I think it is a bit complex, and not to be tampered with unless you know what you are doing.
Here are some more details on this topic:
http://xda-university.com/as-a-developer/adding-features-to-your-kernel
I am also hoping and waiting for a rom with a kernel that supports overclocking on the T530. But I think as long as the developers still are busy with getting basic stuff to work in the 4.4.4 and 5.02 based roms, this will be their highest priority. Sure, the 4.4.2 custom roms have this stuff working, but I think its always more fun for the developer to work with the newest os versions. ... and since these developers dont get payed for their work, their only motivation is to do what they enjoy doing.
Click to expand...
Click to collapse
Thanks! Are you saying there is overclocking support in a 4.4.2 rom for this device?

GeeKerGurL said:
Thanks! Are you saying there is overclocking support in a 4.4.2 rom for this device?
Click to expand...
Click to collapse
I doubt it, but I have not tested it yet. I have just flashed the twrp recovery 2.8.5.0 and going to download and try one of those roms. So in a few days I will know.

The LG G2 Mini does use the same CPU as the T530, and it apearently runs very well overcloked to 1.6Ghz.
http://forum.xda-developers.com/g2-mini/development/kernel-kool-aid-1-0-t3049325
There is a link to the github source for the kernel, so perhaps some of the changes made there also can be applied to the T530.
It seems that what we need now is anyone that have the knowledge, interest and time to make an overclocked kernel.
The KOOL AID kernel also supports underclocking, so it can even be used to save battery time.

moto g too up to 1600mhz, but benchmark is same as 1200. Could you post screenshots with 1200 and 1600?

amyren said:
The LG G2 Mini does use the same CPU as the T530, and it apearently runs very well overcloked to 1.6Ghz.
http://forum.xda-developers.com/g2-mini/development/kernel-kool-aid-1-0-t3049325
There is a link to the github source for the kernel, so perhaps some of the changes made there also can be applied to the T530.
It seems that what we need now is anyone that have the knowledge, interest and time to make an overclocked kernel.
The KOOL AID kernel also supports underclocking, so it can even be used to save battery time.
Click to expand...
Click to collapse
I'm trying, I just screwed up the toolchain path somehow (that's error message I get whenever I try to build), I've tried fixing it a couple times without any luck, and also while I used to have a decent amount of free time to work on this, this past week has been a never-ending nightmare, with absolutely no free time whatsoever.

thisisapoorusernamechoice said:
I'm trying, I just screwed up the toolchain path somehow (that's error message I get whenever I try to build), I've tried fixing it a couple times without any luck, and also while I used to have a decent amount of free time to work on this, this past week has been a never-ending nightmare, with absolutely no free time whatsoever.
Click to expand...
Click to collapse
Thanks, nice to know that someone is looking into this.
Hope you find more time later, and good luck
---------- Post added at 08:52 PM ---------- Previous post was at 08:12 PM ----------
sub77 said:
moto g too up to 1600mhz, but benchmark is same as 1200. Could you post screenshots with 1200 and 1600?
Click to expand...
Click to collapse
I do not have the LG G2 Mini, I just stumbled upon that post because I was searching for devices with the same CPU to check if any of them managed to overclock it.
If you read that thread, there are some comments that Ifind interesting, like the claim that this cpu was made to be 1.6Ghz originally: http://forum.xda-developers.com/showpost.php?p=59298136&postcount=5
Comment from the OP on that matter: http://forum.xda-developers.com/showpost.php?p=59304553&postcount=17
There is a screenshot of a antutu benchmark (around 20000): http://forum.xda-developers.com/showpost.php?p=59302338&postcount=14 I think this device normally will give antutu rating around 16000
Feedback from one user, happy with the speed boost: http://forum.xda-developers.com/showpost.php?p=59300598&postcount=11
I also found a website claiming that the Xiaomi Redmi is shipped with this cpu MSM8226 clocked at 1.6Ghz, but Xiaomi is falsely claiming it is an MSM8228.
Read this and judge yourself: http://en.miui.com/thread-45689-1-1.html

Being a newbie on compiling I did try to compile a kernel using this Guide: http://forum.xda-developers.com/showthread.php?t=2486098
Here is the console output I get:
*************
make ARCH=arm CROSS_COMPILE=/home/amyren/toolchains/arm-eabi-4.7/bin/arm-eabi- > compileLog
sound/soc/codecs/audience/Kconfig:40:warning: type of 'SND_SOC_ES_SLIM' redefined from 'boolean' to 'tristate'
sound/soc/codecs/audience/Kconfig:43:warning: type of 'SND_SOC_ES_I2C' redefined from 'boolean' to 'tristate'
sound/soc/codecs/audience/Kconfig:44:warning: choice value used outside its choice group
sound/soc/codecs/audience/Kconfig:41:warning: choice value used outside its choice group
.config:87:warning: unexpected data
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.
****************
The log file itself looks like this:
*******
HOSTCC scripts/basic/fixdep
HOSTCC scripts/kconfig/conf.o
HOSTCC scripts/kconfig/zconf.tab.o
HOSTLD scripts/kconfig/conf
scripts/kconfig/conf --silentoldconfig Kconfig
*
* Restart config...
*
*
* Linux/arm 3.4.0 Kernel Configuration
*
SOC specific random number generation (ARCH_RANDOM) [N/y/?] (NEW) aborted!
Console input/output is redirected. Run 'make oldconfig' to update configuration.
********
Now, if I try to to run 'make oldconfig' it will output some error similar to that above, and then I get about a million questions I must answer to go on, like
'SOC specific random number generation (ARCH_RANDOM) [N/y/?] '
This was done according to the Guide, apart from I did not have my source from github, but I downloaded from opensource.samsung.com and extracted the kernel.
The config file I copied into .config was named msm8226-sec_matissewifi_defconfig, was this correct or should I have used msm8226-sec_matissewifi_defconfig?
I might try again tomorrow, cause I'm downloading a kernel from github right now, but it takes forever to download..
Any ideas on what I did do wrong?

amyren said:
Any ideas on what I did do wrong?
Click to expand...
Click to collapse
you need 2 configs or a patch.
$ make mrproper
$ make ARCH=arm msm8226-sec_defconfig VARIANT_DEFCONFIG=msm8226-sec_matissewifi_defconfig
$ make menuconfig (or xconfig, gconfig )
$ make all
if finished copy the modules devicetreeblob, get a initrd matching your rom and make a boot.img.
i prefer building with a build environment like cyanogenmod, but you can find good build scripts, too.
for kernel compiling you can use a 4.9 toolchain.

sub77 said:
you need 2 configs or a patch.
$ make mrproper
$ make ARCH=arm msm8226-sec_defconfig VARIANT_DEFCONFIG=msm8226-sec_matissewifi_defconfig
$ make menuconfig (or xconfig, gconfig )
$ make all
if finished copy the modules devicetreeblob, get a initrd matching your rom and make a boot.img.
i prefer building with a build environment like cyanogenmod, but you can find good build scripts, too.
for kernel compiling you can use a 4.9 toolchain.
Click to expand...
Click to collapse
Thanks for the reply.
I manage to make it compile, but I dont know about the devicetreeblob and initrd.
So I did the steps that you advised.
But I noticed some messages on screen refering to the path of the 4.7 toolchain, so I just tried to do it by the way mentioned in the guide, but using the .config file generated by the command 'make ARCH=arm msm8226-sec_defconfig VARIANT_DEFCONFIG=msm8226-sec_matissewifi_defconfig'
Now I did a zimage file, and I used the zimage tool to recreate a new boot.img file from the one I was currently using (stockless).
I replaced the boot.img in the rom with my new one.
And the result, was kind of what I was expecting... The rom doesnt boot, but goes into download mode instead. So I have reinstalled my the stockless again.
My goal was to try to compile a kernel suitable for overclocking. I'm on the stockless rom (4.4.2), and I wanted a try the new kernel there.
I will attach the source files I have modified for the overclocking, you can take a look if you want.
And if they look ok, it would be even better if you could compile them into a working kernel.
regards
edit: I also attached the boot.img file from the stockless v5 rom

sub77 said:
you need 2 configs or a patch.
$ make mrproper
$ make ARCH=arm msm8226-sec_defconfig VARIANT_DEFCONFIG=msm8226-sec_matissewifi_defconfig
$ make menuconfig (or xconfig, gconfig )
$ make all
if finished copy the modules devicetreeblob, get a initrd matching your rom and make a boot.img.
i prefer building with a build environment like cyanogenmod, but you can find good build scripts, too.
for kernel compiling you can use a 4.9 toolchain.
Click to expand...
Click to collapse
When I perform the command "make ARCH=arm msm8226-sec_defconfig VARIANT_DEFCONFIG=msm8226-sec_matissewifi_defconfig" there are lots of warnings. Is this normal?
HOSTCC scripts/basic/fixdep
HOSTCC scripts/kconfig/conf.o
SHIPPED scripts/kconfig/zconf.tab.c
SHIPPED scripts/kconfig/zconf.lex.c
SHIPPED scripts/kconfig/zconf.hash.c
HOSTCC scripts/kconfig/zconf.tab.o
HOSTLD scripts/kconfig/conf
sound/soc/codecs/audience/Kconfig:40:warning: type of 'SND_SOC_ES_SLIM' redefined from 'boolean' to 'tristate'
sound/soc/codecs/audience/Kconfig:43:warning: type of 'SND_SOC_ES_I2C' redefined from 'boolean' to 'tristate'
sound/soc/codecs/audience/Kconfig:44:warning: choice value used outside its choice group
sound/soc/codecs/audience/Kconfig:41:warning: choice value used outside its choice group
arch/arm/configs/msm8226-sec_defconfig:320:warning: override: reassigning to symbol MSM_CPP
arch/arm/configs/msm8226-sec_defconfig:483:warning: override: reassigning to symbol SWITCH
arch/arm/configs/msm8226-sec_defconfig:484:warning: override: reassigning to symbol COMPACTION
warning: (SND_SOC_MSM8226) selects DOLBY_DAP which has unmet direct dependencies (SOUND && !M68K && !UML && SND && SND_SOC && SND_SOC_MSM8974)
KCONFIG_SELINUX((null))
KCONFIG_LOG_SELINUX((null))
KCONFIG_TIMA((null))
KCONFIG_VARIANT(arch/arm/configs/msm8226-sec_matissewifi_defconfig)
arch/arm/configs/msm8226-sec_matissewifi_defconfig:42:warning: override: reassigning to symbol INPUT_GPIO
arch/arm/configs/msm8226-sec_matissewifi_defconfig:46:warning: override: reassigning to symbol MSM_CPP
arch/arm/configs/msm8226-sec_matissewifi_defconfig:87:warning: unexpected data
arch/arm/configs/msm8226-sec_matissewifi_defconfig:99:warning: override: reassigning to symbol MSM_PIL_PRONTO
arch/arm/configs/msm8226-sec_matissewifi_defconfig:100:warning: override: reassigning to symbol WCNSS_CORE
arch/arm/configs/msm8226-sec_matissewifi_defconfig:101:warning: override: reassigning to symbol WCNSS_CORE_PRONTO
arch/arm/configs/msm8226-sec_matissewifi_defconfig:102:warning: override: reassigning to symbol WCNSS_MEM_PRE_ALLOC
arch/arm/configs/msm8226-sec_matissewifi_defconfig:112:warning: override: reassigning to symbol CFG80211
arch/arm/configs/msm8226-sec_matissewifi_defconfig:119:warning: override: reassigning to symbol MODULES
arch/arm/configs/msm8226-sec_matissewifi_defconfig:120:warning: override: reassigning to symbol MODULE_UNLOAD
arch/arm/configs/msm8226-sec_matissewifi_defconfig:121:warning: override: reassigning to symbol MODULE_FORCE_UNLOAD
KCONFIG_DEBUG((null))
warning: (SND_SOC_MSM8226) selects DOLBY_DAP which has unmet direct dependencies (SOUND && !M68K && !UML && SND && SND_SOC && SND_SOC_MSM8974)
#
# configuration written to .config
#

normal. without dt.img it wont boot.

sub77 said:
normal. without dt.img it wont boot.
Click to expand...
Click to collapse
Thanks, where can I get that file, and how can I apply it?
It was not mentioned in the guide I was using

sub77 said:
normal. without dt.img it wont boot.
Click to expand...
Click to collapse
Thanks, where can I get that file, and how can I apply it?
It was not mentioned in the guide I was using
edit: found out that I need something called the dtbtool in order to create the dt.img
I found an archive with that tool inside, but I'm not sure if this is a universal tool, or if there are different variants for different hardware.
And then I will need the intrd.img, I still need to figure out how to get that.

amyren said:
Thanks, where can I get that file, and how can I apply it?
It was not mentioned in the guide I was using
edit: found out that I need something called the dtbtool in order to create the dt.img
I found an archive with that tool inside, but I'm not sure if this is a universal tool, or if there are different variants for different hardware.
And then I will need the intrd.img, I still need to figure out how to get that.
Click to expand...
Click to collapse
its universal. look at mkbootimg.mk located in any cm device tree.
---------- Post added at 07:22 AM ---------- Previous post was at 07:21 AM ----------
sub77 said:
its universal. look at mkbootimg.mk located in any cm device tree.
Click to expand...
Click to collapse
extract your roms boot.img and take its ramdisk.

sub77 said:
its universal. look at mkbootimg.mk located in any cm device tree.
---------- Post added at 07:22 AM ---------- Previous post was at 07:21 AM ----------
extract your roms boot.img and take its ramdisk.
Click to expand...
Click to collapse
Thanks. However, it seems like every answer I get generates new questiones
Using a spilt tool, I got the ramdisk extracted, resulting in this file: boot.img-ramdisk.cpio.gz
That file is about 1.5MB, is this the correct file, and I can just rename it into intrd.img?
Or... if I extract it I will get another file at 3.5MB, named boot.img-ramdisk.cpio
Then I copy the dtbTool to my kernel source folder and run this command, and get the following output with an error:
./dtbTool -o ~/dt_files/dt.img -s 2048 -p ./scripts/dtc/ ./arch/arm/boot/
DTB combiner:
Input directory: './arch/arm/boot/'
Output file: '/root/dt_files/dt.img'
Found file: msm8226-sec-matissewifi-r00.dtb ... chipset: 3339255553, platform: 0, rev: 131072
Found file: msm8226-sec-matissewifi-r02.dtb ... chipset: 3339255553, platform: 2, rev: 131072
Found file: msm8226-sec-matissewifi-r03.dtb ... chipset: 3339255553, platform: 3, rev: 131072
Found file: msm8226-sec-matissewifi-r01.dtb ... chipset: 3339255553, platform: 1, rev: 131072
=> Found 4 unique DTB(s)
Generating master DTB... error writing output file, please rerun: size mismatch 583680 vs -593
EDIT: It turned out that all I needed to do was to go to the root folder and create the folder dt_files first. But I must say that error message was far from helpful: "size mismacth". But anyway I've got my dt.img file now. Next thing is to locate the tool an dfigure i\out how to use it to create the boot.img file.

Finally, I managed to put together a boot.img file and packed it into a rom.zip and it actually boots.
Didnt notice much to my changes though, so I need to study some more..

Related

[Q] Trying to recompile Hastarin for SuperRAM with CIFS: Issues

*EDIT*
Solved, new thread with download here: http://forum.xda-developers.com/showthread.php?t=887567
*/EDIT*
Hey everyone,
I'm trying to re-compile the Hastarin kernel for DarkStone1337's SuperRAM 1.5 to include CIFS support. I've compiled many a linux kernel, but never for Android, so can anyone point out what I'm doing wrong? Here are the commands I've run through:
Added android-ndk-r5/toolchains/arm-eabi-4.4.0/prebuilt/linux-x86/bin to PATH
git clone git://gitorious.org/~hastarin/linux-on-wince-htc/hastarins-linux_on_wince_htc.git
Grabbed DarkStone1337's patch from: http://pastebin.com/6qjkb4Hh
Renamed hastarins-linux_on_wince_htc to "a" to match the patch
patch -p0 < patch.txt (This did report a pre-mature ending on the patch, but everything appears to have patched OK)
make
The result:
arch/arm/mach-msm/built-in.o: In function `dex_cb_interrupt':
/files/Software/Android/hastarin/source/a/arch/arm/mach-msm/dex_comm.c:248: undefined reference to `notify_vbus_change_intr'
make: *** [.tmp_vmlinux1] Error 1
Click to expand...
Click to collapse
Any ideas?
Thanks,
B.
Hi!
Try using this toolchain instead! http://www.codesourcery.com/sgpp/lite/arm/portal/release1293
Then follow these commands to build the kernel:
make clean
make ARCH=arm htcleo_defconfig
Then change what is necessary to add the CIFS support
make ARCH=arm CROSS_COMPILE=/path-to-toolchain/bin/arm-none-linux-gnueabi- zImage
Taken from: http://htc-linux.org/wiki/index.php?title=QuickDeveloperStartGuide#Kernel
Then follow the same guide I linked to, to create the modules.
Hey Darkstone i saw the thread for SuperRAM 1.5 has been closed requested by you. Was there a major reason? Are we not supposed to use it anymore or was it put on hold. just asking because Im still testing it out and its been rock solid after several reboots.
PENKO956 said:
Hey Darkstone i saw the thread for SuperRAM 1.5 has been closed requested by you. Was there a major reason? Are we not supposed to use it anymore or was it put on hold. just asking because Im still testing it out and its been rock solid after several reboots.
Click to expand...
Click to collapse
prob due to folks refusing to read and do a little research before posting common problem Roth common fixes...
DarkStone1337 said:
Hi!
Try using this toolchain instead! http://www.codesourcery.com/sgpp/lite/arm/portal/release1293
Then follow these commands to build the kernel:
make clean
make ARCH=arm htcleo_defconfig
Then change what is necessary to add the CIFS support
make ARCH=arm CROSS_COMPILE=/path-to-toolchain/bin/arm-none-linux-gnueabi- zImage
Taken from: http://htc-linux.org/wiki/index.php?title=QuickDeveloperStartGuide#Kernel
Then follow the same guide I linked to, to create the modules.
Click to expand...
Click to collapse
First off, thanks a ton for responding, this was very helpful. Secondly, sorry for the threadjackers. Lastly, this both works, and doesn't. The following works fine:
# git clone git://gitorious.org/~hastarin/linux-on-wince-htc/hastarins-linux_on_wince_htc.git
# make CROSS_COMPILE=/files/Software/Android/CodeSourcery/Sourcery_G++_Lite/bin/arm-none-linux-gnueabi- ARCH=arm clean
# make CROSS_COMPILE=/files/Software/Android/CodeSourcery/Sourcery_G++_Lite/bin/arm-none-linux-gnueabi- ARCH=arm htcleo_defconfig
# make CROSS_COMPILE=/files/Software/Android/CodeSourcery/Sourcery_G++_Lite/bin/arm-none-linux-gnueabi- ARCH=arm zImage -j 4
Click to expand...
Click to collapse
But when I try to make an exact copy of the kernel you created for SuperRAM 1.5 (without modifying for CIFS), it doesn't, so I must be doing something wrong. Here was my process there:
# git clone git://gitorious.org/~hastarin/linux-on-wince-htc/hastarins-linux_on_wince_htc.git
# mv hastarins-linux_on_wince_htc a
# cd a
# patch -p0 < patch
(Stripping trailing CRs from patch.)
patching file a/arch/arm/mach-msm/qdsp6_1550/q6audio.c
(Stripping trailing CRs from patch.)
patching file a/drivers/video/msm/gpu/kgsl/kgsl_ringbuffer.c
patch unexpectedly ends in middle of line
patch: **** malformed patch at line 786:
# make CROSS_COMPILE=/files/Software/Android/CodeSourcery/Sourcery_G++_Lite/bin/arm-none-linux-gnueabi- ARCH=arm clean
# make CROSS_COMPILE=/files/Software/Android/CodeSourcery/Sourcery_G++_Lite/bin/arm-none-linux-gnueabi- ARCH=arm htcleo_defconfig
# cp ../../config ./.config (This config was pulled from SuperRAM 1.5's /proc/config.gz)
# make CROSS_COMPILE=/files/Software/Android/CodeSourcery/Sourcery_G++_Lite/bin/arm-none-linux-gnueabi- ARCH=arm menuconfig
# make CROSS_COMPILE=/files/Software/Android/CodeSourcery/Sourcery_G++_Lite/bin/arm-none-linux-gnueabi- ARCH=arm zImage -j 4
arch/arm/mach-msm/built-in.o: In function `dex_cb_interrupt':
/files/Software/Android/hastarin/source/a/arch/arm/mach-msm/dex_comm.c:248: undefined reference to `notify_vbus_change_intr'
make: *** [.tmp_vmlinux1] Error 1
Click to expand...
Click to collapse
Any additional help would be appreciated. Also, is there a reason (performance, size, etc) CIFS is not included by default? I've noticed a lot of other builds are like that, too.
*EDIT* Is it possible I need to checkout a specific version of Hastarin's kernel?
Thanks,
B.
I posted this in the main thread before it was closed -
insmod: init_module 'cifs.ko' failed (Exec format error)
and I looked in dmesg -
cifs: version magic '2.6.32.15r8.6-gb02686c preempt mod_unload ARMv7' should be '2.6.32.15-g2ef5752.dirty preempt mod_unload ARMv7'
Looks like this might be a side effect of the custom kernel and the magic not matching up with the cifs.ko from hastarin. Could this be recompiled with the correct kernel?
Looks like the cifs.ko that was included in the build was the stock module from hastarin - so when you do recompile it, could you post the module as well? I'd love to help, but I don't have a whole lot of experience with compiling kernels.
Thanks.
indecided said:
I posted this in the main thread before it was closed -
insmod: init_module 'cifs.ko' failed (Exec format error)
and I looked in dmesg -
cifs: version magic '2.6.32.15r8.6-gb02686c preempt mod_unload ARMv7' should be '2.6.32.15-g2ef5752.dirty preempt mod_unload ARMv7'
Looks like this might be a side effect of the custom kernel and the magic not matching up with the cifs.ko from hastarin. Could this be recompiled with the correct kernel?
Looks like the cifs.ko that was included in the build was the stock module from hastarin - so when you do recompile it, could you post the module as well? I'd love to help, but I don't have a whole lot of experience with compiling kernels.
Thanks.
Click to expand...
Click to collapse
Hi indecided,
This is the post I'm looking to resolve for everyone. Once I figure this out, I'll post how to patch the SuperRAM 1.5 to support CIFS.
Thanks,
B.
this is great news and i'm looking forward to this - i hope your efforts can accomplish this - it probably won't be easy, which is why hastarin and darkstone might have needed to focus their efforts on other things first -- i'm not being negative, i'm just saying that if you guys get this to work it might be an impressive thing you did. I need it bad too.
OK, unfortunately I've hit a bit of a roadblock. I've got the kernel to compile using nearly all the same config settings as DarkStone with CIFS added, but upon booting the kernel the phone acts as if there is 0% battery and instantly shuts itself off. I'm guessing it has to do with the one problem I had in compiling explained below.
The only difference in the configs for compiling were (removed CIFS info):
# diff MY.config DARKSTONES.config
119,120c119
< CONFIG_SLOW_WORK=y
< # CONFIG_SLOW_WORK_DEBUG is not set
---
> # CONFIG_SLOW_WORK is not set
241,242c240
< CONFIG_HTC_BATTCHG=y
< # CONFIG_HTC_BATTCHG_SMEM is not set
---
> # CONFIG_HTC_BATTCHG is not set
Click to expand...
Click to collapse
So basically, DarkStone's version had SLOW_WORK and HTC_BATTCHG disabled. I have no idea how he accomplished this. No matter what I set SLOW_WORK to, the compilation always changes it back. And if I try to disable HTC_BATTCHG, the kernel errors out with the message from my previous posts.
I'm also not entirely sure the patch DarkStone posted is complete (unless he responds otherwise) because it does end prematurely and was perhaps cut off by pastebin.
I wish I knew what else to try, but I'm not knowledgable enough to know why it thinks the battery is at 0%. I'm guessing it has something to do with the BATTCHG config, but I have no way around it at the moment.
Thanks,
B.
sorry to disturb here, but if you where to successfully recompile, what will be the benefit?
thanks you
there should be tons of warnings though correct?
Fmstrat said:
Any additional help would be appreciated. Also, is there a reason (performance, size, etc) CIFS is not included by default? I've noticed a lot of other builds are like that, too.
*EDIT* Is it possible I need to checkout a specific version of Hastarin's kernel?
Thanks,
B.
Click to expand...
Click to collapse
Hi! Sorry to hear you're having issues with building the kernel.
Here is a properly formatted patch that I've made: http://www.multiupload.com/FDJ4FXZ4L9
I used the eb_oldcam branch (or was it oldcam_eb? I've forgotten )
Try using the htcleo_hastarinconfig as the defconfig file.
I recommended that toolchain because Hastarin and myself have experienced issues with other toolchains causing the proximity/light sensor to eat up more battery during standby.
Hope this helps!
-------
Oh and Merry Christmas folks!
dapoharoun said:
sorry to disturb here, but if you where to successfully recompile, what will be the benefit?
thanks you
Click to expand...
Click to collapse
Ability to mount shares computers over wifi for playing media.
Fmstrat said:
Ability to mount shares computers over wifi for playing media.
Click to expand...
Click to collapse
It's like having a 4 terabyte sdcard. If you have say a 30,000 song collection, and you connect to your home computer via wifi at home you click the songs and they play instantly. For me, I click any one of my 3000 movies and they play on my hd2 in 10 seconds, and I can fast forward and rewind almost instantly.
If you are on the road and have a vpn to your computer and you 'mount the home share remotely' you now have a "virtual sd card" with 30,000 songs that play when you click the songs after about a 6 second lag.
DarkStone1337 said:
Hi! Sorry to hear you're having issues with building the kernel.
Here is a properly formatted patch that I've made: http://www.multiupload.com/FDJ4FXZ4L9
I used the eb_oldcam branch (or was it oldcam_eb? I've forgotten )
Try using the htcleo_hastarinconfig as the defconfig file.
I recommended that toolchain because Hastarin and myself have experienced issues with other toolchains causing the proximity/light sensor to eat up more battery during standby.
Hope this helps!
-------
Oh and Merry Christmas folks!
Click to expand...
Click to collapse
Good news everyone. It's working.
Thanks DarkStone for all your input, using the default config and eb_oldcam worked with the new patch you provided on the first try this time (Btw, I am using the toolchain you recommended now). I do have one last question though, how do I get it to load cifs.ko on boot? Android doesn't appear to have any modprobe.conf or anything similar that I see, so I must be missing something. I have to insmod it manually right now.
*EDIT*: I ended up rebuilding it directly into the kernel instead of a module for now, which works. I know that's not "proper" but that will ensure CIFS is always loaded even if the build doesn't load it by default. If you know a better way, I'm all ears Thanks again! */EDIT*
For everyone else, this is not an EXACT copy of the SuperRAM kernel that DarkStone used, but it's pretty close and seems to be the config they recommend going forward. Rather than post it here right now, I'll give it out as a Christmas gift later today in the Development forum since it will really apply to any RAM release going forward that uses Hastarin's kernel and post a link here. This will give me some time to test and ensure nothing goes weird.
Thanks,
B.
OK, it's all done: Download, installation instructions, and FAQ
I've also opened a thread back in the Android Development section since this is no longer a Q&A: http://forum.xda-developers.com/showthread.php?t=887567
Thanks,
B.

cyanogenmod development

I want to port cyanogenmod to archos
Are there any developers who know how to download the source of cnm and archos firmware
I'm a game developer and I have no experience with drivers but we can compare are achos devices with other cnm supported devices, the nexus s has the same processor, so we don't have to create a driver for that
Compare list (Update 24 June)
processor is the same as in the droid 2
touchscreen = ?
sound hardware =
screen hardware =
You should take a look at the [DEVELOPEMENT] Cyanogen thread on the Dev subforum - think they'll be pretty happy to see you over there!
fisha21 said:
You should take a look at the [DEVELOPEMENT] Cyanogen thread on the Dev subforum - think they'll be pretty happy to see you over there!
Click to expand...
Click to collapse
Yes, but I'm a newcomer and I can't post a replay there
coen22 said:
Yes, but I'm a newcomer and I can't post a replay there
Click to expand...
Click to collapse
im the thread starter at the post above
Just post 6 posts and you can post at dev section
Lennb said:
im the thread starter at the post above
Just post 6 posts and you can post at dev section
Click to expand...
Click to collapse
Thx, but what do think of my idea
coen22 said:
Thx, but what do think from my idea
Click to expand...
Click to collapse
Im happy, if anyone want to help, but
we need a guy who really have android developement knowledge
Anyone?
I still can't reply to the main thread of cyanogenmod [DEV]
The first thing we have to do is a hardware research
the archos gen8 devices have a
First
Processor: Arm cortex-A8 <-- same as galaxy s, and nexus s
Screen: <--- ?
Then
Touchscreen: <--- ?
Later
Camera: <--- ?
Camera A43: <--- ?
WiFi: <--- ?
Sound: <--- ?
Software buttons
I think we should first make the processor and the screen working, then we are able to debug the device using adb
And we are able to view debug codes on archos
Because all drivers are included in the kernel, what would be the outcome of running say AOSP gingerbread on top of the current kernel?
Archos didn't make much changes to the kernel and the system compared to other manufactures like HTC and it's Sense ROM.
Sorry for this rant, but I cant help myself.
Guys, stop the nonsense regarding not being an android dev and thusnot being able to get anything done. Are you not capable of learning? Please dont reply with negative until you ve tried.
I'm a linuxadmin. It took me 2 hours to get a CM build just by following the instructions. How much longer would it take to rip the drivers ad add them to the image? My guess is that if you start with CM 6 (froyo?) you ll be done in a few days.
So please stop begging for an android dev and all the idle talk of how you think you might get things to work. Just get started with the cyanogenmod build guide already!
Again sorry for the rant
wvl0 said:
Sorry for this rant, but I cant help myself.
Guys, stop the nonsense regarding not being an android dev and thusnot being able to get anything done. Are you not capable of learning? Please dont reply with negative until you ve tried.
I'm a linuxadmin. It took me 2 hours to get a CM build just by following the instructions. How much longer would it take to rip the drivers ad add them to the image? My guess is that if you start with CM 6 (froyo?) you ll be done in a few days.
So please stop begging for an android dev and all the idle talk of how you think you might get things to work. Just get started with the cyanogenmod build guide already!
Again sorry for the rant
Click to expand...
Click to collapse
Ho year sure, downloading sources for a supported device and building the entire thing is not rocket science and can be easily done by following the wiki.
But building one for an unsupported device is an other story.
It requires a good knowledge and a lot of spare time.
The knowledge can be learned online but it requires a lot more spare time too and many of us don't have that spare time, unfortunately.
do you?
I'm not here to lecture people on how they spend their time. I simply want to point out that waiting for a dev to come along to fix your woes isn't the right way to get a project started. Besides, all the time spent on forum posts will nicely accumulate into a plentiful amount of time that can be spent on learning.
If there is an dev interested in building a rom, they will. No need to create some kind of placeholder containing information you think someone might want.
The open source way is to scratch your own itch.
Just on the technical side of things. If you port the cyanogen froyo version, you should simply be able to use the same drivers archos uses. So there isn't going to be any development involved, just compiling stuff.
As to your last question, I surely don't have to reply.
wvl0 said:
I'm not here to lecture people on how they spend their time.
Click to expand...
Click to collapse
I see , what are you here for ?
I simply want to point out that waiting for a dev to come along to fix your woes isn't the right way to get a project started. Besides, all the time spent on forum posts will nicely accumulate into a plentiful amount of time that can be spent on learning.
If there is an dev interested in building a rom, they will. No need to create some kind of placeholder containing information you think someone might want.
The open source way is to scratch your own itch.
Just on the technical side of things. If you port the cyanogen froyo version, you should simply be able to use the same drivers archos uses. So there isn't going to be any development involved, just compiling stuff.
As to your last question, I surely don't have to reply.
Click to expand...
Click to collapse
Well that was one of the useless posts found on this thread. Thank you for adding yours to the list
Hey guys, please join us at the Developer Thread.]
Its better to have only one thread
sibere said:
I see , what are you here for ?
Well that was one of the useless posts found on this thread. Thank you for adding yours to the list
Click to expand...
Click to collapse
Touché. I guess I'll just add what I learned then.
How to get your buildsystem up and running on Ubuntu Oneiric 64bit.
Before following this guide: http://wiki.cyanogenmod.com/index.php?title=Compile_CyanogenMod_for_Sholes
Do this first, just to avoid having to install individual packages later on:
Code:
add-apt-repository "deb http://archive.canonical.com/ maverick partner"
Code:
apt-get install bison build-essential curl flex g++-4.3-multilib gcc-4.3-multilib git-core g++-multilib gnupg gperf lib32ncurses5-dev lib32readline5-dev lib32z1-dev libc6-dev-i386 libesd0-dev libncurses5-dev libsdl1.2-dev libsdl-dev libwxgtk2.6-dev ncurses-dev pngcrush schedtool squashfs-tools sun-java6-jdk zip zlib1g-dev
I think I ran into compile issues with gcc-4.6, so I switched over to 4.4
Code:
rm /usr/bin/gcc
ln -s /usr/bin/gcc-4.4 /usr/bin/gcc
rm /usr/bin/g++
ln -s /usr/bin/g++-4.4 /usr/bin/g++
Then following this guide to get ADB running with your tablet:
http://forum.xda-developers.com/archive/index.php/t-892847.html
Now you can follow the Sholes build guide.
You might run into compile issues. This bug report includes a fix:
http://code.google.com/p/cyanogenmod/issues/detail?id=2455
and in case you run into this one:
frameworks/base/core/java/android/widget/ListView.java:3631: warning 13: Method android.widget.ListView.getCheckItemIds: (at)Deprecated annotation and (at)deprecated doc tag do not match
Checking API: checkapi-last
(unknown): error 17: Field org.apache.http.protocol.HTTP.EXPECT_CONTINUE has changed value from "100-Continue" to "100-continue"​
Solve it by:
The error here is that someone needs to change the "100-continue" line on line 63 of file external/apache-http/src/org/apache/http/protocol/HTTP.java to "100-Continue"​
And there's this one too:
Code:
host Executable: acp (out/host/linux-x86/obj/EXECUTABLES/acp_intermediates/acp)
host SharedLib: libneo_cs (out/host/linux-x86/obj/lib/libneo_cs.so)
host C++: libutils <= frameworks/base/libs/utils/RefBase.cpp
frameworks/base/libs/utils/RefBase.cpp: In member function ‘void android::RefBase::weakref_type::trackMe(bool, bool)’:
frameworks/base/libs/utils/RefBase.cpp:483:67: error: passing ‘const android::RefBase::weakref_impl’ as ‘this’ argument of ‘void android::RefBase::weakref_impl::trackMe(bool, bool)’ discards qualifiers [-fpermissive]
make: *** [out/host/linux-x86/obj/STATIC_LIBRARIES/libutils_intermediates/RefBase.o] Error 1
make: *** Waiting for unfinished jobs....
Which can be fixed by edditing frameworks/base/libs/utils/Android.mk
Change the line:
Code:
LOCAL_CFLAGS += -DLIBUTILS_NATIVE=1 $(TOOL_CFLAGS)
To:
Code:
LOCAL_CFLAGS += -DLIBUTILS_NATIVE=1 $(TOOL_CFLAGS) -fpermissive
This should give you a few files that possibly can be flashed to our tablets:
Code:
Install system fs image: out/target/product/generic/system.img
Target ram disk: out/target/product/generic/ramdisk.img
Target userdata fs image: out/target/product/generic/userdata.img
Happy Hacking.
[edit]
Here's the result, just in case anyone is brave enough to flash it.
http://www.megaupload.com/?d=7PCNF69Z
[/edit]
[edit 2]
I guess the next step would be editing the img files to order to add the necessary drivers.
You need YAFFS2 support to mount these files. YAFFS2 isn't included in this version of ubuntu however.
So get yaffs2:
Code:
git clone ssh://www.aleph1.co.uk/home/aleph1/git/yaffs2
..and get a nice old kernel, considering the current version in git doesn't support 2.6.39 cleanly.
Code:
wget http://www.kernel.org/pub/linux/kernel/v2.6/longterm/v2.6.35/linux-2.6.35.13.tar.bz2
untar your kernel sources.
then follow the instructions included with YAFFS:
Code:
cd yaffs-dir
./patch-ker.sh c m linux-tree
complains that linux-tree/fs/yaffs2 already exists
rm -rf linuux-tree/fs/yaffs2
./patch-ker.sh c m linux-tree
Copy your /boot/config-XXX to the directory you unpacked your kernel tarball.
run a:
Code:
make oldconfig
Now add YAFFS to your config using
Code:
make menuconfig
(Filesystems->Miscellaneous filesystems->yaffs)
..compile and reboot ubuntu into your own kernel containing yaffs2 support
mount your img files with
Code:
mount -o loop -t yaffs2 filename mountpoint
[/edit 2]
[edit 3]
So apparently building cyanogenmod doesn't mean you're building a full rom, you have to do the kernel seperately (as far as I can tell ATM):
http://wiki.cyanogenmod.com/index.php?title=Building_Kernel_from_source
there was no /proc/config.gz, so i ripped the urkdroid kernel .config file instead
also getting an arm toolchain working seemed tedious, so I followed the advice in on the wiki and got one from:
http://www.codesourcery.com/sgpp/lite/arm/portal/subscription3053
Had to tell the compile process where to find the arm compiler. Think I'm actually using one I downloaded from Ubuntu's repository instead of the one from the above link - oh well.
Code:
[email protected]:~/android/kernel/cm-kernel# make ARCH=arm CROSS_COMPILE=/usr/bin/arm-linux-gnueabi- -j`grep 'processor' /proc/cpuinfo | wc -l`
[/edit 3]
wvl0 said:
Touché. I guess I'll just add what I learned then.
How to get your buildsystem up and running on Ubuntu Oneiric 64bit.
Before following this guide: http://wiki.cyanogenmod.com/index.php?title=Compile_CyanogenMod_for_Sholes
Do this first, just to avoid having to install individual packages later on:
Code:
add-apt-repository "deb http://archive.canonical.com/ maverick partner"
Code:
apt-get install bison build-essential curl flex g++-4.3-multilib gcc-4.3-multilib git-core g++-multilib gnupg gperf lib32ncurses5-dev lib32readline5-dev lib32z1-dev libc6-dev-i386 libesd0-dev libncurses5-dev libsdl1.2-dev libsdl-dev libwxgtk2.6-dev ncurses-dev pngcrush schedtool squashfs-tools sun-java6-jdk zip zlib1g-dev
I think I ran into compile issues with gcc-4.6, so I switched over to 4.4
Code:
rm /usr/bin/gcc
ln -s /usr/bin/gcc-4.4 /usr/bin/gcc
rm /usr/bin/g++
ln -s /usr/bin/g++-4.4 /usr/bin/g++
Then following this guide to get ADB running with your tablet:
http://forum.xda-developers.com/archive/index.php/t-892847.html
Now you can follow the Sholes build guide.
You might run into compile issues. This bug report includes a fix:
http://code.google.com/p/cyanogenmod/issues/detail?id=2455
and in case you run into this one:
frameworks/base/core/java/android/widget/ListView.java:3631: warning 13: Method android.widget.ListView.getCheckItemIds: (at)Deprecated annotation and (at)deprecated doc tag do not match
Checking API: checkapi-last
(unknown): error 17: Field org.apache.http.protocol.HTTP.EXPECT_CONTINUE has changed value from "100-Continue" to "100-continue"​
Solve it by:
The error here is that someone needs to change the "100-continue" line on line 63 of file external/apache-http/src/org/apache/http/protocol/HTTP.java to "100-Continue"​
And there's this one too:
Code:
host Executable: acp (out/host/linux-x86/obj/EXECUTABLES/acp_intermediates/acp)
host SharedLib: libneo_cs (out/host/linux-x86/obj/lib/libneo_cs.so)
host C++: libutils <= frameworks/base/libs/utils/RefBase.cpp
frameworks/base/libs/utils/RefBase.cpp: In member function ‘void android::RefBase::weakref_type::trackMe(bool, bool)’:
frameworks/base/libs/utils/RefBase.cpp:483:67: error: passing ‘const android::RefBase::weakref_impl’ as ‘this’ argument of ‘void android::RefBase::weakref_impl::trackMe(bool, bool)’ discards qualifiers [-fpermissive]
make: *** [out/host/linux-x86/obj/STATIC_LIBRARIES/libutils_intermediates/RefBase.o] Error 1
make: *** Waiting for unfinished jobs....
Which can be fixed by edditing frameworks/base/libs/utils/Android.mk
Change the line:
Code:
LOCAL_CFLAGS += -DLIBUTILS_NATIVE=1 $(TOOL_CFLAGS)
To:
Code:
LOCAL_CFLAGS += -DLIBUTILS_NATIVE=1 $(TOOL_CFLAGS) -fpermissive
This should give you a few files that possibly can be flashed to our tablets:
Code:
Install system fs image: out/target/product/generic/system.img
Target ram disk: out/target/product/generic/ramdisk.img
Target userdata fs image: out/target/product/generic/userdata.img
Happy Hacking.
[edit]
Here's the result, just in case anyone is brave enough to flash it.
http://www.megaupload.com/?d=7PCNF69Z
[/edit]
[edit 2]
I guess the next step would be editing the img files to order to add the necessary drivers.
You need YAFFS2 support to mount these files. YAFFS2 isn't included in this version of ubuntu however.
So get yaffs2:
Code:
git clone ssh://www.aleph1.co.uk/home/aleph1/git/yaffs2
..and get a nice old kernel, considering the current version in git doesn't support 2.6.39 cleanly.
Code:
wget http://www.kernel.org/pub/linux/kernel/v2.6/longterm/v2.6.35/linux-2.6.35.13.tar.bz2
untar your kernel sources.
then follow the instructions included with YAFFS:
Code:
cd yaffs-dir
./patch-ker.sh c m linux-tree
complains that linux-tree/fs/yaffs2 already exists
rm -rf linuux-tree/fs/yaffs2
./patch-ker.sh c m linux-tree
Copy your /boot/config-XXX to the directory you unpacked your kernel tarball.
run a:
Code:
make oldconfig
Now add YAFFS to your config using
Code:
make menuconfig
(Filesystems->Miscellaneous filesystems->yaffs)
..compile and reboot ubuntu into your own kernel containing yaffs2 support
mount your img files with
Code:
mount -o loop -t yaffs2 filename mountpoint
[/edit 2]
[edit 3]
So apparently building cyanogenmod doesn't mean you're building a full rom, you have to do the kernel seperately (as far as I can tell ATM):
http://wiki.cyanogenmod.com/index.php?title=Building_Kernel_from_source
there was no /proc/config.gz, so i ripped the urkdroid kernel .config file instead
also getting an arm toolchain working seemed tedious, so I followed the advice in on the wiki and got one from:
http://www.codesourcery.com/sgpp/lite/arm/portal/subscription3053
Had to tell the compile process where to find the arm compiler. Think I'm actually using one I downloaded from Ubuntu's repository instead of the one from the above link - oh well.
Code:
[email protected]:~/android/kernel/cm-kernel# make ARCH=arm CROSS_COMPILE=/usr/bin/arm-linux-gnueabi- -j`grep 'processor' /proc/cpuinfo | wc -l`
[/edit 3]
Click to expand...
Click to collapse
That looks very good
wvl0 said:
Touché. I guess I'll just add what I learned then.
How to get your buildsystem up and running on Ubuntu Oneiric 64bit.
Before following this guide: http://wiki.cyanogenmod.com/index.php?title=Compile_CyanogenMod_for_Sholes
Click to expand...
Click to collapse
This may be my misunderstanding but I thought this guide only teaches you how to compile your own cyanogen build for the Motorola Sholes. It even states that you need a sholes with a working copy of cyanogenmod installed. This guide will only work for devices which are already supported by the cyanogenmod team, and is not a guide to build for unsupported devices. At least, that was my understanding from spending most of a day crawling around the cyanogenmod wiki.
Part of the build process involves pulling proprietary system files from the device. I guess one starting point would be to work out which files these are, then obtain the files from the archos. However, this stuff takes time to learn and I have very little to spare, like most. But then, neither am I asking someone else to do it, or sitting waiting for it.
If it comes, it comes...
Building for a compatible CPU architecture should at least give you a semi bootable ROM, after that you have to get the drivers in.
Considering we have the source and are using the same kernel versions, we can just recompile the drivers for our kernel.
wvl0 said:
Building for a compatible CPU architecture should at least give you a semi bootable ROM, after that you have to get the drivers in.
Considering we have the source and are using the same kernel versions, we can just recompile the drivers for our kernel.
Click to expand...
Click to collapse
Thank, you guys!
Could you please joyn my Thread for CM Developement, so other guys could help?
One thread is better than two
Finally, guys with Knowledge work on a CM, how can i help?
You could help by completely taking over, 'cause I don't want a cyanogen rom per se, I just want to show people that you don't have to be a developer to compile a rom.
wvl0 said:
You could help by completely taking over, 'cause I don't want a cyanogen rom per se, I just want to show people that you don't have to be a developer to compile a rom.
Click to expand...
Click to collapse
Okey, i understand^^
Could you tell me a few steps to compile the CM ?, i think the drivers we'll do later

[GUIDE][ICS] Compile Cyanogenmod 9 on Mac OS X Lion

There are a lot of toturials for building CM9 on ubuntu or CM7 on Mac but I couldn't find a decent toturial for building CM9 on Mac (specially Lion). Development in AOSP/CM land is rapid and guides frequently need updating. I had to spend a little time to figure everything out and I decided to share it here.
This tutorial is for building CM9 (ICS) for Galaxy Nexus GSM (maguro) on Mac OS X Lion 10.7.3 using Xcode 4.3 and homebrew . You can easily make the instructions work for most other cm9 devices, but I wouldn't know anything about that.
DISCLAIMER: I'm not responsible if you blow yourself up, blah blah blah
However, I've tried to make this as noob friendly as possible because, well I'm a noob myself
Instrunctions:
UPADTE (MAY 29TH) : The Xcode 4.3 default compiler (llvm-gcc) used to be incompatible with CM9. Thanks to jocelyn and topprospect, the LLVM compatibility patches from mainline AOSP are now merged into CM9. Therefore, you can now use Xcode 4.3 and its command line tools without installing another compiler. However, since GCC is still the only officially supported compiler, incompatibilites with llvm-gcc could still be introduced with future updates. Therefore, if your build fails, it might be worth it to try installing and compiling with GCC 4.2. See the Troubleshooting section for more info.
Now that we have Xcode 4.3 and Xcode command line tools (CLT) installed, let's continue.
Open Terminal and run
Code:
java
if you don't have Java, you will get a prompt asking you to download and install Java. Go ahead and install it.
If you don't have adb and fastboot working, download the android-sdk from google (version r18 as of now) and put it in /usr/local/ and rename the folder to "android-sdk".
Install the homebrew package manager
Code:
/usr/bin/ruby -e "$(/usr/bin/curl -fsSL https://raw.github.com/mxcl/homebrew/master/Library/Contributions/install_homebrew.rb)"
To make sure that homebrew and android-sdk executables are in $PATH:
Code:
touch ~/.bash_profile && echo "PATH=/usr/local/bin:/usr/local/sbin:$PATH:/usr/local/android-sdk/tools:/usr/local/android-sdk/platform-tools" >> ~/.bash_profile
Relaunch Terminal for the change to take effect.
At this point you can run
Code:
brew doctor
to detect any problems there might be (Homebrew may instruct you to use the xcode-select utility to select the xcode installation path). Hopefully, your system is raring to brew
Now we have to install a bunch of packages:
Code:
brew install git coreutils findutils gnu-sed gnupg pngcrush repo
We now need to create a couple of symlinks so that the gnu versions of 'sed' and 'find' are used rather than the osx provided versions :
Code:
ln -s /usr/local/bin/gfind /usr/local/bin/find && ln -s /usr/local/bin/gsed /usr/local/bin/sed && ln -s /usr/local/bin/gstat /usr/local/bin/stat
It's time to create a case sensitive image which will hold our working directory:
Code:
hdiutil create -type SPARSE -fs "Case-sensitive Journaled HFS+" -size 40g -volname "android" -attach ~/Desktop/Android
Now we have a disk image in ~/Desktop/Android. Mount it if it's not mounted already. (Don't be picky about the size, the image will only take as much as space as its contents).
Now we need to create a working directory inside the mounted volume:
Code:
cd /Volumes/android && mkdir cm9 && cd cm9
We can initialize and download the source now:
Code:
repo init -u git://github.com/CyanogenMod/android.git -b ics && repo sync && say 'finished'
Now we need to get the required proprietry files for our device. We can get these from the device itself. Connect your phone (make sure USB Debugging is enabled) and run the following (for maguro):
Code:
cd /Volumes/android/cm9/device/samsung/maguro/ && ./extract-files.sh
[If you see errors in the output from extract-files.sh, see the Troubleshooting section below]
For Google devices,we can also get them directly from google. For maguro, download the 3 files and extract them to /Volumes/android/cm9. Then,
Code:
cd /Volumes/android/cm9
/Volumes/android/cm9/extract-broadcom-maguro.sh
/Volumes/android/cm9/extract-imgtec-maguro.sh
/Volumes/android/cm9/extract-samsung-maguro.sh
We also need the prebuilts (like ROM manager and Term.apk):
Code:
/Volumes/android/cm9/vendor/cm/get-prebuilts
You can optionally tell the build to use the ccache tool. CCache acts as a compiler cache that can be used to speed-up rebuilds :
Code:
export USE_CCACHE=1 && /Volumes/android/cm9/prebuilt/darwin-x86/ccache/ccache -M 20G
Default is 1GB. Anything between 20GB-50GB should be fine.
Before starting the build, we need to workaround an issue with Lion and compiling the QEMU emulator.
[This step doesn't seem to be needed anymore. QEMU is automatically ignored on OS X/Darwin]
If you build now, you're probably gonna get kernel build errors regarding the missing elf.h header (this error might be device specific). Fortunately, we already have this file downloaded, so we only need to copy it to /usr/local/include:
Code:
cp /Volumes/android/cm9/external/elfutils/libelf/elf.h /usr/local/include
FINALLY, we are ready to build:
Code:
cd /Volumes/android/cm9 && source build/envsetup.sh && brunch
Pick your device from the list and enter the number. For maguro, you could use "brunch maguro" instead and skip the menu. Depending on your system, this will take 30min-4hours.
You should now see a beautiful zip file waiting to be flashed:
{
"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"
}
​Troubleshooting:
The extract script for maguro seems to be a little outdated, as it doesn't pull the gps proprietary blob. You can either use the google provided scripts, or add koush's git repository for your device to your local_manifest.xml.
As explained above, the CM9 source is currently compatible with llvm-gcc. In the future, if llvm-gcc fails to build correctly, you should try installing and compiling using GCC4.2 (the Xcode 3 compiler). You can install apple-gcc4.2 from homebrew:
Code:
brew install https://raw.github.com/Homebrew/homebrew-dupes/master/apple-gcc42.rb
This version of gcc can happily coexist with Xcode 4.x .
So now you have GCC 4.2 installed, but it won't be used unless we update the corresposing environment variables:
Code:
export CC=/usr/local/bin/gcc-4.2 && export CXX=/usr/local/bin/g++-4.2
Notice that using the export command is temporary. If you relaunch Terminal, you will need to set these again. However, this is a good thing, because changing these values permanently (by putting them in ~/.bash_profile) can interfere with other builds.
If you use this method, the build might fail while compiling "external/zlib/x86/adler32.c". It appears that a recent change in zlib has introduced an incompatibility with gcc 4.2. you have to revert the following 2 commits:
Code:
cd external/zlib
git revert dd6786cae3f4493faa6661d5f74db587932f15d7
git revert 13bf40af68236c961542bdee1d4b7c0176bf15a0
Alternatively, you can add topprospect's zlib on github (which has those commits reverted) to your local_manifast.xml. Simply run:
Code:
nano /Volumes/android/cm9/.repo/local_manifest.xml
and add the following line
Code:
<project name="dferg/android_external_zlib" path="external/zlib" remote="github" />
If you get a build error, and your error is not covered here, copy the last 20-30 lines of the build output AND the output from the following command into pastebin and post the link. Hopefully me or someone else will help you.
Code:
echo -e "\nENV:\n$(env)\n\nWHICH GCC\n:$(which gcc)\n\nWHICH G++:\n$(which g++)\n\nWHICH CC:\n$(which cc)\n\nWHICH C++:\n$(which c++)\n\nBREW DOCTOR:\n$(brew doctor)\n\nBREW LIST:\n$(brew list)\n\n/USR/BIN:\n$(ls -l /usr/bin | grep gcc)\n\n/USR/LOCAL/BIN:\n$(ls -l /usr/local/bin | grep gcc)\n\n"
​Notes/Extras:
To quickly setup your environment, add an alias like the following to ~/.bash_profile:
Code:
alias cm9env="hdiutil attach PATH-TO-DISK-IMAGE -mountpoint /Volumes/android && cd /Volumes/android/cm9 && source ./build/envsetup.sh && export USE_CCACHE=1"
alias cm9build="cm9env && make clobber && reposync && brunch maguro"
Now you can save time by using "cm9env" to get your environment setup or "cm9build" to compile a clean updated build.
To clear your output directory for a new build, run "make clobber". You probably don't need this if you've only changed a few lines of code.
To cherry pick yet-to-be-merged changes from the gerrit instance:
1. Pick an open commit from CM Gerrit
2. Under list of Patch Sets pick the latest and open cherry-pick tab
3. Check what Git repository the url is pointing e.g. http://review.cyanog...frameworks_base
4. In your CM9 working tree go to the corresponding directory, which in this case is something like ~/your-working-directory/frameworks/base/
5. Now simply paste the whole line seen in CM Gerrit cherry-pick tab e.g. "git fetch http://review.cyanog....rameworks_base refs/changes/00/13100/4 && git cherry-pick FETCH_HEAD"
It should be now included in your next compiled build. When doing repo sync again, cherry picks will be lost.[CREDIT Fihlvein from xda]
Click to expand...
Click to collapse
Enjoy your custom built CM9!
I updated OP with some updated info about Xcode 4.3.
Nice work man. Very helpful.
conantroutman said:
Nice work man. Very helpful.
Click to expand...
Click to collapse
thanks! I'll try to keep this topic updated as issues with mac are introduced/resolved.
Nice write up. Thanks.
Before I start again from scratch I have a question. Does this guide apply to previous versions of mac os x (mine is 10.6.8)? I used the official android initializing build environment page & cm7 wiki page for the instructions to setup my build environment.
Also, any tips to switch from macports to homebrew?
In the past I've had to cherry pick to get my OS X build environment set up for CM9. The compile from source fails because I started with macports instead of homebrew (bad idea). I tried to switch to homebrew without success. Any tips to switch from macports to homebrew?
For the sake of keeping this page on topic a pm response is ok if that is what you prefer.
Hi thanks for this !! Helpful one question what do i change so i can do AOSP instead of cm9??
grad061980 said:
Nice write up. Thanks.
Before I start again from scratch I have a question. Does this guide apply to previous versions of mac os x (mine is 10.6.8)? I used the official android initializing build environment page & cm7 wiki page for the instructions to setup my build environment.
Also, any tips to switch from macports to homebrew?
In the past I've had to cherry pick to get my OS X build environment set up for CM9. The compile from source fails because I started with macports instead of homebrew (bad idea). I tried to switch to homebrew without success. Any tips to switch from macports to homebrew?
For the sake of keeping this page on topic a pm response is ok if that is what you prefer.
Click to expand...
Click to collapse
Yes, this guide should work fine on Snow Leopard. It mostly depends on your Xcode version. If you have Xcode 3, you can skip step 1 entirely, since you already have gcc4.2 as part of Xcode.
If you have access to Xcode 4.2 and above, you will need to install gcc4.2 separately, as explained in the guide.
Now regarding Macports, I strongly suggest that you completely uninstall Macports before installing homebrew. Instructions are here: http://guide.macports.org/chunked/installing.macports.uninstalling.html
WonkyYew said:
Hi thanks for this !! Helpful one question what do i change so i can do AOSP instead of cm9??
Click to expand...
Click to collapse
Full instructions are available on android.com : http://source.android.com/source/initializing.html
If you are using this guide, you need to change the repo initialization command to :
Code:
repo init -u https://android.googlesource.com/platform/manifest
and then do repo sync. You can setup ccache as usual. I don't think AOSP has the "brunch command", so you have to use launch and then make.
Run "lunch" and select an option from the menu. You can find more info about the options here: http://source.android.com/source/building.html. For maguro, you should use "full_maguro-userdebug".
To start the build, use
Code:
make -j$(sysctl -n hw.ncpu)
@ArmanUV. Sounds good & thanks for the input. I'll give the link to macports uninstall a go.
Im a real noob, whats the advantage of compiling from source?
Thanks for the help man !
Hi, thanks for your guide, setting up the repo was no problem at all!
But: I'm getting the following error when building.
Code:
external/zlib/x86/adler32.c: In function ‘adler32_MMX’:
external/zlib/x86/adler32.c:747: error: can't find a register in class ‘GENERAL_REGS’ while reloading ‘asm’
external/zlib/x86/adler32.c:747: error: ‘asm’ operand has impossible constraints
make: *** [out/host/darwin-x86/obj/STATIC_LIBRARIES/libz_intermediates/adler32.o] Error 1
make: *** Waiting for unfinished jobs....
Seems to be a problem with the compiler, but I'm on xcode 4.3 and I've installed gcc-4.2 and set the env vars. Any help?
ArmanUV,
Thanks so much for posting this guide. Very helpful!
Are you having any trouble with errors like this?
Code:
external/zlib/x86/adler32.c: In function ‘adler32_MMX’:
external/zlib/x86/adler32.c:747: error: can't find a register in class ‘GENERAL_REGS’ while reloading ‘asm’
external/zlib/x86/adler32.c:747: error: ‘asm’ operand has impossible constraints
Googling for this error implies that the fix is to use a version of GCC > 4.2. But there does not seem to be a GCC 4.4 in Homebrew.
Thanks again for the guide!
EDIT: Sorry for the double post with empyyy. Seems like there is someone else having my same issue!
topprospect said:
ArmanUV,
Thanks so much for posting this guide. Very helpful!
Are you having any trouble with errors like this?
Code:
external/zlib/x86/adler32.c: In function ‘adler32_MMX’:
external/zlib/x86/adler32.c:747: error: can't find a register in class ‘GENERAL_REGS’ while reloading ‘asm’
external/zlib/x86/adler32.c:747: error: ‘asm’ operand has impossible constraints
Googling for this error implies that the fix is to use a version of GCC > 4.2. But there does not seem to be a GCC 4.4 in Homebrew.
Thanks again for the guide!
EDIT: Sorry for the double post with empyyy. Seems like there is someone else having my same issue!
Click to expand...
Click to collapse
empyyy said:
Hi, thanks for your guide, setting up the repo was no problem at all!
But: I'm getting the following error when building.
Code:
external/zlib/x86/adler32.c: In function ‘adler32_MMX’:
external/zlib/x86/adler32.c:747: error: can't find a register in class ‘GENERAL_REGS’ while reloading ‘asm’
external/zlib/x86/adler32.c:747: error: ‘asm’ operand has impossible constraints
make: *** [out/host/darwin-x86/obj/STATIC_LIBRARIES/libz_intermediates/adler32.o] Error 1
make: *** Waiting for unfinished jobs....
Seems to be a problem with the compiler, but I'm on xcode 4.3 and I've installed gcc-4.2 and set the env vars. Any help?
Click to expand...
Click to collapse
You guys seem to have the same issue. What sort of Xcode configuration are you using? Can you post the output from "which gcc","which g++", "gcc -v", "g++ -v" and "cc -v"?
ArmanUV said:
You guys seem to have the same issue. What sort of Xcode configuration are you using? Can you post the output from "which gcc","which g++", "gcc -v", "g++ -v" and "cc -v"?
Click to expand...
Click to collapse
I am on Lion 10.7.4 with Xcode 4.3.2. Here is the output that you asked for:
Code:
# echo -n "which gcc: "; which gcc; echo -n "which g++: "; which g++; echo ""; echo "gcc -v:"; gcc -v; echo ""; echo "g++ -v:"; g++ -v; echo ""; echo "cc -v:"; cc -v
which gcc: /usr/bin/gcc
which g++: /usr/bin/g++
gcc -v:
Using built-in specs.
Target: i686-apple-darwin11
Configured with: /private/var/tmp/llvmgcc42/llvmgcc42-2336.9~22/src/configure --disable-checking --enable-werror --prefix=/Applications/Xcode.app/Contents/Developer/usr/llvm-gcc-4.2 --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-prefix=llvm- --program-transform-name=/^[cg][^.-]*$/s/$/-4.2/ --with-slibdir=/usr/lib --build=i686-apple-darwin11 --enable-llvm=/private/var/tmp/llvmgcc42/llvmgcc42-2336.9~22/dst-llvmCore/Developer/usr/local --program-prefix=i686-apple-darwin11- --host=x86_64-apple-darwin11 --target=i686-apple-darwin11 --with-gxx-include-dir=/usr/include/c++/4.2.1
Thread model: posix
gcc version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.9.00)
g++ -v:
Using built-in specs.
Target: i686-apple-darwin11
Configured with: /private/var/tmp/llvmgcc42/llvmgcc42-2336.9~22/src/configure --disable-checking --enable-werror --prefix=/Applications/Xcode.app/Contents/Developer/usr/llvm-gcc-4.2 --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-prefix=llvm- --program-transform-name=/^[cg][^.-]*$/s/$/-4.2/ --with-slibdir=/usr/lib --build=i686-apple-darwin11 --enable-llvm=/private/var/tmp/llvmgcc42/llvmgcc42-2336.9~22/dst-llvmCore/Developer/usr/local --program-prefix=i686-apple-darwin11- --host=x86_64-apple-darwin11 --target=i686-apple-darwin11 --with-gxx-include-dir=/usr/include/c++/4.2.1
Thread model: posix
gcc version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.9.00)
cc -v:
Apple clang version 3.1 (tags/Apple/clang-318.0.58) (based on LLVM 3.1svn)
Target: x86_64-apple-darwin11.3.0
Thread model: posix
They are pointing to LLVM, but my CC and CXX variables point to:
Code:
env|grep 4.2
CXX=/usr/local/bin/g++-4.2
CC=/usr/local/bin/gcc-4.2
Do I need to add something to PATH? I'm sure I just missed something obvious in your instructions.. Thanks for helping!
topprospect said:
I am on Lion 10.7.4 with Xcode 4.3.2. Here is the output that you asked for:
Do I need to add something to PATH? I'm sure I just missed something obvious in your instructions.. Thanks for helping!
Click to expand...
Click to collapse
Everything checks out. I'm away from my main machine so I can't run a test build, but I suspect that a recent change is causing problems.
Now, regarding the compiler, Setting CC/CXX *should* take care of everything, but I am currently not 100% sure that somewhere in a makefile, these environment variables aren't being ignored. Since I wrote the guide, I noticed a lot of clang warnings in the build, which means that CC/CXX is not honored and /usr/bin/cc and /usr/bin/c++ is being used.
A more robust method of making sure gcc-4.2 is being used is creating symlinks to gcc-4.2 and g++-4.2 :
Code:
ln -s /usr/local/bin/gcc-4.2 /usr/local/bin/gcc
ln -s /usr/local/bin/gcc-4.2 /usr/local/bin/cc
ln -s /usr/local/bin/g++-4.2 /usr/local/bin/c++
ln -s /usr/local/bin/g++-4.2 /usr/local/bin/g++
Obviousely, a systemic method like this has its downsides but it may be the only choice without having to change CM code (especially since I lack the knowledge to do so )
[I recently found out that master aosp is no longer using CC/CXX to find the compiler (see ./build/core/combo/). Instead, it uses "gcc" and "g++" directly, which means that llvm-gcc will be used no matter what env variable you have. Fortunately, unlike cm9, master aosp is supposed to build fine with llvm-gcc (except for qemu, which doesn't matter for device images). ]
ArmanUV said:
Everything checks out. I'm away from my main machine so I can't run a test build, but I suspect that a recent change is causing problems.
Now, regarding the compiler, Setting CC/CXX *should* take care of everything, but I am currently not 100% sure that somewhere in a makefile, these environment variables aren't being ignored. Since I wrote the guide, I noticed a lot of clang warnings in the build, which means that CC/CXX is not honored and /usr/bin/cc and /usr/bin/c++ is being used.
A more robust method of making sure gcc-4.2 is being used is creating symlinks to gcc-4.2 and g++-4.2 :
Code:
ln -s /usr/local/bin/gcc-4.2 /usr/local/bin/gcc
ln -s /usr/local/bin/gcc-4.2 /usr/local/bin/cc
ln -s /usr/local/bin/g++-4.2 /usr/local/bin/c++
ln -s /usr/local/bin/g++-4.2 /usr/local/bin/g++
Click to expand...
Click to collapse
Okay, just tried this. I created a new dir (/Volumes/Android/bin) that simply houses those softlinks you recommended. Then I put /Volumes/Android/bin at the beginning of my PATH. That should fix it without breaking the rest of the system, e.g. homebrew.
The GENERAL_REGS problem still exists though. Pretty sure b/c gcc 4.2.1 doesn't understand this construct properly (need a newer version of gcc).
So I backed out the change that introduced this adler32.c.
https://github.com/CyanogenMod/android_external_zlib/commit/13bf40af68236c961542bdee1d4b7c0176bf15a0
The compile is getting farther now. I have to run to work so I'll post later if it succeeds.
The weird thing is: This change was made back in December. Why would it have worked for you?
topprospect said:
The compile is getting farther now. I have to run to work so I'll post later if it succeeds.
Click to expand...
Click to collapse
Build works (and boots!) with the following:
Code:
cd external/zlib
git revert dd6786cae3f4493faa6661d5f74db587932f15d7
git revert 13bf40af68236c961542bdee1d4b7c0176bf15a0
Note the 1st revert is just to avoid massive conflicts seen when reverting the 2nd one by itself. The 2nd revert is the one that really matters here.
So this isn't really a solution.. Seems like we need to move to a newer version of gcc or figure out a patch to adler32.c that makes it gcc 4.2 compatible.
topprospect said:
Build works (and boots!) with the following:
Code:
cd external/zlib
git revert dd6786cae3f4493faa6661d5f74db587932f15d7
git revert 13bf40af68236c961542bdee1d4b7c0176bf15a0
Click to expand...
Click to collapse
The first revert works fine, however the second one gives me the following error:
Code:
$ git revert 13bf40af68236c961542bdee1d4b7c0176bf15a0
error: could not revert 13bf40a... Implement vectorized adler32 and optimized slhash
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'
hint: and commit the result with 'git commit'
error: Could not parse conflict hunks in zlib.h
empyyy said:
The first revert works fine, however the second one gives me the following error:
Code:
$ git revert 13bf40af68236c961542bdee1d4b7c0176bf15a0
error: could not revert 13bf40a... Implement vectorized adler32 and optimized slhash
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'
hint: and commit the result with 'git commit'
error: Could not parse conflict hunks in zlib.h
Click to expand...
Click to collapse
Well, run git status. You'll see that the only conflict is in the comments in zlib.h. So, you can just ignore it.
topprospect said:
Okay, just tried this. I created a new dir (/Volumes/Android/bin) that simply houses those softlinks you recommended. Then I put /Volumes/Android/bin at the beginning of my PATH. That should fix it without breaking the rest of the system, e.g. homebrew.
The GENERAL_REGS problem still exists though. Pretty sure b/c gcc 4.2.1 doesn't understand this construct properly (need a newer version of gcc).
So I backed out the change that introduced this adler32.c.
https://github.com/CyanogenMod/android_external_zlib/commit/13bf40af68236c961542bdee1d4b7c0176bf15a0
The compile is getting farther now. I have to run to work so I'll post later if it succeeds.
The weird thing is: This change was made back in December. Why would it have worked for you?
Click to expand...
Click to collapse
topprospect said:
Build works (and boots!) with the following:
Code:
cd external/zlib
git revert dd6786cae3f4493faa6661d5f74db587932f15d7
git revert 13bf40af68236c961542bdee1d4b7c0176bf15a0
Note the 1st revert is just to avoid massive conflicts seen when reverting the 2nd one by itself. The 2nd revert is the one that really matters here.
So this isn't really a solution.. Seems like we need to move to a newer version of gcc or figure out a patch to adler32.c that makes it gcc 4.2 compatible.
Click to expand...
Click to collapse
Nice find. I tried to compile this morning and I ran into the same issue. This is what I don't understand: I did a couple of builds about a week ago without running into this issue. But, the latest commits on zlib are from 2 months ago.
Amazingly, the Xcode 4.3 toolchain (clang and llvm-gcc) builds this external/zlib/adler32.c just fine.
An alternative to this problem is to install an up to date gcc 4.7 :
Code:
brew install https://raw.github.com/Homebrew/homebrew-dupes/master/gcc.rb
and then create symlinks to gcc-4.7/g++-4.7. I have not tested this yet.

[B928] OC kernel 0.1 [one-hit wonder]

This will not be worked on any longer thanks to Huawei's incompetence. I'm glad my main phone isn't by them. I leave my 0.2 diff attached (which did make my phone faster FWIW - and has fsync() control. Not of use to me, but people who use a modified libsqlite would like it...). Feel free to apply it and see if you can somehow fix dhd.ko loading.
Hi,
Not one for names, so this shall be known as "OC kernel" This is built from the ICS U8800pro source that Huawei put out.
Install at your own risk; I take no responsibilty for any damage that may occur through the usage of this kernel.
Features:
ADB as root
Overclocking enabled (thanks to genokolar)
Undervolting interface added (from genokolar, who took it from a SE kernel modder somewhere) - I think SetXperia can use it
SIO I/O scheduler added
SmartassV2 cpufreq scheduler (AnDyX mod) - although I think ondemand does a bit better IMO
sysfs entry to turn off keypad lights (I wrote an applet for this some time back, I'll dig it out later)
Logcat is always enabled now as the ServiceMenu toggle doesn't work anymore
Minimum display backlight is set to 15, but I think Android needs a framework change to use it. You could try RootDim
Kernel actually builds (and Bluetooth works)
ZRAM (+ swap) support. ZRAM is optimized for Android (taken from Siyah kernel). I'll write up the instructions on enabling this later
CIFS as module
Extras:
Change schedulers and phone speed:
Use a tool like No Frills CPU or SetCPU.
Turn off button lights:
Install the ButtonLight widget and add it to your main screen. I've published the source before in another thread; seek it out if you're after its (bad) code.
It's buggy the first few times you run it, but works fine after that.
Dim screen to 14:
The minimum backlight level is now set to 15. RootDim from the Play Store lets you set it to that.
Mount Windows shares:
Grab CifsMounter and point it to the cifs.ko in /system/lib/modules. You may also need to insmod nls_utf8.ko and md4.ko.
Enable ZRAM (taken from Siyah kernel):
(Note I've not used ZRAM so I have nothing to say on its stability, good or bad)
Grab a BusyBox binary from somewhere
Run the following commands:
Code:
echo 90 > /proc/sys/vm/swappiness #You must set the swappiness high to ensure that the compressed RAM is accessed first!
echo $SIZE > /sys/devices/virtual/block/zram0/disksize #Set size to whatever you wish. 100MB is 104857600 = 100 * 1024 * 1024
busybox mkswap /dev/block/zram0
busybox swapon /dev/block/zram0
Dump the lines in install-recovery.sh if you want to be ZRAMMed every time you boot the phone (although in that case, make sure you have
Code:
busybox swapoff /dev/block/zram0 > /dev/null 2>&1 #Use > /dev/null 2>&1 for every busybox command in install-recovery.sh as it will discard any messages outputted
echo 1 > /sys/devices/virtual/block/zram0/reset
before the lines above)
Install:
Flash the attached ZIP in CWM recovery. You should backup your original boot.img and /system/lib/modules first
Source:
Take http://www.huaweidevice.com/worldwi...=toDownloadFile&flay=software&softid=NDY3NTU= and apply attached diff
at last..xaaxxaa!!but why with modules too???whats their use?
pikachukaki said:
at last..xaaxxaa!!but why with modules too???whats their use?
Click to expand...
Click to collapse
'cause I add a new module - cifs (used by CifsMounter if you want to mount Windows shares) - and because the modules that are originally in /system/lib/modules need to be replaced so that they can load with this kernel (I don't know what those modules do, but I'd rather play it safe)
qwerty12 said:
'cause I add a new module - cifs (used by CifsMounter if you want to mount Windows shares) - and because the modules that are originally in /system/lib/modules need to be replaced so that they can load with this kernel (I don't know what those modules do, but I'd rather play it safe)
Click to expand...
Click to collapse
Boot normally change io to sio and smartassv2...1500mhz lets check..good work..i envy you and i want your guide on compiling...xaaxax im off to bed!!
fps is locked!!xaaxax
pikachukaki said:
Boot normally change io to sio and smartassv2...1500mhz lets check..good work..i envy you and i want your guide on compiling...xaaxax im off to bed!!
fps is locked!!xaaxax
Click to expand...
Click to collapse
I'll write it up sometime - but bear in mind I'm not an expert at this
Regarding FPS: do the install-recovery.sh trick
Only thing I modify in initramfs is the ro.secure setting so that ADB can be ran as root
qwerty12 said:
I'll write it up sometime - but bear in mind I'm not an expert at this
Regarding FPS: do the install-recovery.sh trick
Only thing I modify in initramfs is the ro.secure setting so that ADB can be ran as root
Click to expand...
Click to collapse
You did a great job i couldnt even compile the kernel without changes!!you did great!!
the difference is obvious !!
Sent from my U8800Pro using xda premium
Pika When U add This Kernet To ur ROM?
As expected from qwerty12!
Great job!
I'll also request a guide on how to build the kernel like pika asked.
Hope you continue to improve the kernel! A thanks is simply not enough to thank you for your work, but thanks again
husen4u said:
Pika When U add This Kernet To ur ROM?
Click to expand...
Click to collapse
I wont!just d/w it and flash it!simple!
Sent from my U8800Pro using xda premium
Now what you suggest oc ics or kalo gb?
Sent from my U8800pro using xda app-developers app
husen4u said:
Now what you suggest oc ics or kalo gb?
Sent from my U8800pro using xda app-developers app
Click to expand...
Click to collapse
From now on i wont ever go back to GB ever again! if our luck changes and someone release cm9 i will forget what gb is!! there are some small bugs but the rom is usable for everyday!!
Moihack said:
As expected from qwerty12!
Great job!
Click to expand...
Click to collapse
Thank you
I'll also request a guide on how to build the kernel like pika asked.
Click to expand...
Click to collapse
Certainly, sir.
Hope you continue to improve the kernel! A thanks is simply not enough to thank you for your work, but thanks again
Click to expand...
Click to collapse
Unfortunately I won't be working on this anymore unless Huawei get back to my request for the source to the the dhd.ko module (which they may not have to comply with because the license for the module states "Unless you and Broadcom execute a separate written software license agreement governing use of this software" so the U8800pro version may not be under GPL). I made (well, found on the Internet) more optimizations but the Wi-Fi refuses to turn on because the dhd.ko module refuses to load. Only way I can get something working is to build the source that Huawei give or attempt to force other versions of the bcm source to load, but it's unlikely that would work.
--
Anyway, a small guide.
I used an x86_64 laptop running (X)ubuntu 12.04.1 to follow these steps. This page was a great resource.
Prerequisites:
A computer running GNU/Linux (a Mac should work in theory - the same toolchain we use is built for it, too, but I have no idea how OS X works)
git installed (apt-get install --no-install-recommends git-core is enough under Ubuntu)
sudo apt-get install flex bison gperf build-essential libncurses5-dev zlib1g-dev ia32-libs lib32z1-dev lib32ncurses5-dev gcc-multilib g++-multilib abootimg
Getting ADB working
One of the best things to do is getting ADB set up, as you then have easy communication with the device. It's not essential but you'll just end up wasting time transferring files through other, longer means.
Grab the Linux platform tools ZIP from here: http://www.hariadi.org/android/manually-download-of-android-sdk-tools-and-sdk-platform-tools/. Extract the adb binary from the zip file, preferably to somewhere in your $PATH. chmod 755 it. chown, if necessary.
Next, open http://aur.archlinux.org/packages/an/android-udev/android-udev.tar.gz and, doing all this as root (sudo in Terminal etc.), place 51-android.rules in /lib/udev/rules.d/ (not the best place - but it works), chmod 644 it and chown root:root it.
Next, execute /usr/sbin/groupadd adbusers, followed by gpasswd -a USERNAME adbusers, USERNAME being the user you normally log on with.
Restart (while you can force Linux to see the new group through the, well, newgrp command udev will not "see" the new rule, despite how much you try with udevadm).
That should be ADB set up (give it a test, remembering to enable USB debugging mode on the phone first!).
On to preparing your workarea.
--
Create a new folder in your home folder and cd to it. This folder will house the prebuilt folder of toolchains and other stuff, and the kernel source in a folder of its own.
In this folder, execute git clone --depth 1 https://android.googlesource.com/platform/prebuilt.git and move onto the next step, since the download takes a while. That command grabs the prebuilt toolchain from Google using Git, but doesn't obtain a deep history for each file to make the download quicker.
Open http://www.huaweidevice.com/worldwi...=toDownloadFile&flay=software&softid=NDY3NTU= and save the source to your Downloads directory. After git has finished running, still in the folder with the "prebuilt" folder, execute tar jxf ~/Downloads/HUAWEI_U8800pro<tab - as in actually press tab> and you should have a kernel folder alongside the prebuilt one.
Building the kernel
cd to this new kernel folder.
First things first: make sure that Bluetooth is properly enabled by editing the Makefile. Find the line #ifeq ($(ENABLE_BTLA_VER30),true) and comment out every line in that section except for KBUILD_CFLAGS += -DHUAWEI_BT_BTLA_VER30 so you end up with this:
Code:
#/* < DTS2012020604357 zhangyun 20120206 begin */
# Add Huawei Marco for different BT chip
#ifeq ($(ENABLE_BTLA_VER30),true)
KBUILD_CFLAGS += -DHUAWEI_BT_BTLA_VER30
#endif
#ifeq ($(ENABLE_BLUEZ_VER30),true)
#KBUILD_CFLAGS += -DHUAWEI_BT_BLUEZ_VER30
#endif
#/* DTS2012020604357 zhangyun 20120206 end > */
Commenting out the offending code leaves you with a kernel that builds but a Bluetooth module that won't start up - the same also applies if you try to build with the other define.
You can also make things easier for yourself by replacing the following
Code:
ARCH ?= $(SUBARCH)
CROSS_COMPILE ?= $(CONFIG_CROSS_COMPILE:"%"=%)
with
Code:
ARCH ?= arm
CROSS_COMPILE ?= ../prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-
else you will have to put "ARCH=arm CROSS_COMPILE=../prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-" after "make" each time. Remember this as I'll be assuming that you went for the option to edit the Makefile. I also assume that the prebuilt folder is above the kernel one. Adjust CROSS_COMPILE if necessary.
The ARCH variable is self-explanatory, but the CROSS_COMPILE variable (and the toolchain that it's pointing to) need to be set because the standard GNU development tools that apt installs don't produce output that an ARM processor can understand. So you cross-compile: the tools are for the X86 architecture but produce ARM output. 4.4.3 is chosen because the stock kernel is compiled with GCC 4.4.3 (if you run "adb shell cat /proc/version" you'll see). The arm-eabi-4.4.3 folder is chosen over arm-linux-androideabi-4.4.x because it specifies that magic "3" (I know, bad way to decide but it works), and over i686-android-linux-4.4.3 because we don't want to produce code for the PC.
Get the current configuration in use by the stock kernel (as that's a good point to start from - a known working configuration): http://wiki.cyanogenmod.com/wiki/Building_Kernel_from_source#Configure_the_Build
I'd also recommend placing a copy of .config as arch/arm/configs/<your funky name here> so that if .config gets deleted (make clean etc.) you can run make <the name you gave to the file in arch/arm/configs> and have .config come back again.
(cp arch/arm/configs/<the name you gave to the file> .config if you didn't modify the Makefile to specify the ARM arch.)
Run make oldconfig (not always necessary - generally it's invoked if you've applied a patch that introduces a new config option and the option then needs to go into your .config. Run make menuconfig afterwards and customize away.
When you're done, run make -jX - X as in the number of cores you have + 1. So, in my case, with a quad-core processor and HyperThreading enabled on all of them, "make -j9" works for me. If the compile went OK, you'll be left with a message saying that arch/arm/boot/zImage is ready. If not, run "make" without the -jX argument and make should stop where the error occurs. Have fun fixing the error!
Assuming that you have a new, shiny zImage, it's now time to put it into your boot.img.
Updating your boot.img:
Google have tools for this purpose but I've never used them so I don't know how they work. abootimg works fine for this, however.
Pull the current boot.img off your phone: adb pull /.cust_backup/image/boot.img.. I'd recommend creating a backup somewhere.
Create a new directory to store the boot.img in on your computer and run abootimg -x boot.img (if you had fun enabling every option in the kernel, you'll see why I'm telling you to use the -x option first rather than directly use the -u option). Now run abootimg -u boot.img -k <path to your newly built zImage>.
If this succeeds, yay! If not and you're told it's too big for the boot image, then don't worry. Take the size it's saying that the zImage is and convert that number into hex. Edit bootimg.cfg and change the value of the bootsize setting into the number you just converted into hex. We'll now repack again, but this time running abootimg -u boot.img -f bootimg.cfg -k <path to your newly built zImage>. This should work.
Sending the boot.img to the phone
If your ADB is already running as root, you can do the following to upload the new bootimg:
Code:
adb shell mount -o remount,rw /.cust_backup
adb push boot.img /.cust_backup/image/
adb reboot
If not, just reboot into pink screen mode and copy and paste.
Check System Settings and the version number should've changed. Congratulations!
Extras
Installing the modules:
OK, so you decided to build parts of the kernel as a module and you want to actually, y'know, have the modules present on the device. After building the kernel, execute:
make INSTALL_MOD_STRIP=1 modules_install INSTALL_MOD_PATH=<any folder name here>
If you look in that folder, you'll find the modules neatly wrapped up in folders, along with other text files. These text files are useless on a stock ROM because there's no modprobe - you need BusyBox for that. And since we don't want to have them seperated in folders (this is how the stock kernel does it), the files would be wrong, anyway. If you want to use modprobe and have BusyBox installed, you can run depmod on the phone after transferring the modules.
To get the modules into one folder make the directory "modules" in a folder higher-up to where the modules are stored, and then run for i in `find . | grep ko`; do mv "$i" ../modules/; done to move them into that folder.
At this point, I'd just recommend using my OC_Kernel.zip and replacing the modules in that. Or you can adb push them over to the /system/lib/modules folder (after issuing an "adb remount" - assuming that ADB is running as root in the first place).
Making ADB run as root:
As root on your computer, (we want to preserve permissions) use abootimg to split the boot image and extract the contents of the initrd:
abootimg -x boot.img && mkdir newramdisk && cd newramdisk && zcat ../initrd.img | cpio -i --no-absolute-filenames (--no-absolute-filenames is important! I trashed a Ubuntu install by leaving it out - the initrd contains ARM binaries of core Linux programs and if the initrd.img contains an absolute path of "/" then these files will get placed in /)
Make any changes you desire to the initrd. To have adb run as root, just edit /default.prop and set ro.secure to 0. Make sure that the editor you used didn't leave any backup files.
When you're done, run find . -print | cpio -o -H newc | gzip -n -9 > ../initrd.img and this will put the modified initrd folder back into initrd.img.
After that run cd .. ; abootimg -u boot.img -r initrd.img to actually put the initrd.img back into the boot.img.
If you run into a space error, you can do one of three things:
if you only made a single change (like enabling ADB), check to see that there is no backup file (default.prop~) littered about
you can remove the lengthy comments and copyright notices from the files to make space
you can use the trick we used earlier with abootimg to increase the size number in bootimg.cfg for the initrd
Overclocking:
Just look at the acpuclock C file (and possibly relevant cpufreq changes - but I can't remember) in my "OC kernel" diff. Make sure that the option in the kernel config is selected to limit the speeds to the U8800pro's native 1GHz, otherwise the phone will boot at 2GHz!
Rebuilding the Wi-Fi module:
I hope to be able to write this one since it's apparently needed in some cases, but it depends on if Huawei come through
any idea about this error?
drivers/mfd/pmic8058.c:327: error: rtc_cell_resources causes a section type conflict
drivers/mfd/pmic8058.c:327: error: rtc_cell_resources causes a section type conflict
drivers/mfd/pmic8058.c:241: error: othc0_cell_resources causes a section type conflict
drivers/mfd/pmic8058.c:241: error: othc0_cell_resources causes a section type conflict
drivers/mfd/pmic8058.c:250: error: othc1_cell_resources causes a section type conflict
drivers/mfd/pmic8058.c:250: error: othc1_cell_resources causes a section type conflict
drivers/mfd/pmic8058.c:261: error: othc2_cell_resources causes a section type conflict
drivers/mfd/pmic8058.c:261: error: othc2_cell_resources causes a section type conflict
drivers/mfd/pmic8058.c:183: error: misc_cell_resources causes a section type conflict
drivers/mfd/pmic8058.c:183: error: misc_cell_resources causes a section type conflict
drivers/mfd/pmic8058.c:210: error: thermal_alarm_cell_resources causes a section type conflict
drivers/mfd/pmic8058.c:210: error: thermal_alarm_cell_resources causes a section type conflict
drivers/mfd/pmic8058.c:270: error: batt_alarm_cell_resources causes a section type conflict
drivers/mfd/pmic8058.c:270: error: batt_alarm_cell_resources causes a section type conflict
drivers/mfd/pmic8058.c:152: error: pm8058_charger_resources causes a section type conflict
drivers/mfd/pmic8058.c:152: error: pm8058_charger_resources causes a section type conflict
matteof93 said:
any idea about this error?
drivers/mfd/pmic8058.c:327: error: rtc_cell_resources causes a section type conflict
drivers/mfd/pmic8058.c:327: error: rtc_cell_resources causes a section type conflict
drivers/mfd/pmic8058.c:241: error: othc0_cell_resources causes a section type conflict
drivers/mfd/pmic8058.c:241: error: othc0_cell_resources causes a section type conflict
drivers/mfd/pmic8058.c:250: error: othc1_cell_resources causes a section type conflict
drivers/mfd/pmic8058.c:250: error: othc1_cell_resources causes a section type conflict
drivers/mfd/pmic8058.c:261: error: othc2_cell_resources causes a section type conflict
drivers/mfd/pmic8058.c:261: error: othc2_cell_resources causes a section type conflict
drivers/mfd/pmic8058.c:183: error: misc_cell_resources causes a section type conflict
drivers/mfd/pmic8058.c:183: error: misc_cell_resources causes a section type conflict
drivers/mfd/pmic8058.c:210: error: thermal_alarm_cell_resources causes a section type conflict
drivers/mfd/pmic8058.c:210: error: thermal_alarm_cell_resources causes a section type conflict
drivers/mfd/pmic8058.c:270: error: batt_alarm_cell_resources causes a section type conflict
drivers/mfd/pmic8058.c:270: error: batt_alarm_cell_resources causes a section type conflict
drivers/mfd/pmic8058.c:152: error: pm8058_charger_resources causes a section type conflict
drivers/mfd/pmic8058.c:152: error: pm8058_charger_resources causes a section type conflict
Click to expand...
Click to collapse
Honestly, I have no idea. What toolchain are you using and where was your .config obtained from? Even when the Bluetooth thing was giving me errors, I never once saw that
same toolchain you have used. i have tried with ubuntu 12.04 x64 and ubuntu 10.04 x86 but same problem.....i have obtained my config from my phone using adb command
matteof93 said:
same toolchain you have used. i have tried with ubuntu 12.04 x64 and ubuntu 10.04 x86 but same problem.....i have obtained my config from my phone using adb command
Click to expand...
Click to collapse
I don't know why the same toolchain works on my laptop but not yours :\
Someone with a similar problem (same?) solved it by using an older toolchain: http://forum.xda-developers.com/showpost.php?p=27294383&postcount=7157
thanks thanks thanks.....i saw that post this morning but i did not noticed the post with the solution
UPDATE: NOW KERNEL COMPILED CORRECTLY....this means that tomorrow i know what to do
ZRAM (+ swap) support. ZRAM is optimized for Android (taken from Siyah kernel). I'll write up the instructions on enabling this later
qwerty your owning us some instructions!!xaaxxa
pikachukaki said:
qwerty your owning us some instructions!!xaaxxa
Click to expand...
Click to collapse
Done, check the first post
I also won't be working on this. My email (which does clearly state what I want, even if it's long-winded):
Dear Sir/Madam,
I recently built a kernel for my U8800pro from your sources and it
works fine, except that the Wi-Fi will not start because the dhd.ko
module that comes with the B928 firmware refuses to load into my
modified kernel. After looking around, the bcm4329 source is what I
need to build (usually distributed outside of the kernel); however, it
seems that the U8800pro uses a customized version. After looking at
the strings of the dhd.ko on the B928 firmware, I have seen many
strings that are present in that dhd.ko binary do not appear in:
* bcm_4.218.248.6_7x25_wifi_driver.tar from the Huawei Device website,
despite it having the same version number
* the bcm4329 source in the Qualcomm CodeAurora Git repository
* the bcm4329 source on the NyVIDIA Tegra Git repository
Furthermore, the strings also do not appear in the ICS kernel nor the
Gingerbread one. I can only conclude that Huawei have their own
specialized version of the bcm4329 4.218.248.6 source for the U8800pro
that is distributed outside the kernel. I understand that Qualcomm
allow the option to let the vendor arrange to have the code
distributed under a different license provided that the vendor makes
an agreement beforehand with Qualcomm. Otherwise it becomes GPLed by
default. If Huawei chose to make an agreement, then I have no right to
ask. However, I believe it is still licensed under the GPL for two
reasons:
* Running modinfo on the dhd.ko from the B928 firmware says this:
"license: GPL v2
* Both bcm_4.218.248.6_7x25_wifi_driver.tar.gz and
[S7][SoftWare]S7_Broadcom_BCM4329_4.218.205.0_Open_Source are under
the GPL
I would like to request the source code, please, of the bcm4329
4.218.248.6 source that is modified for the U8800pro if the code is
under the GPL
Best regards
Click to expand...
Click to collapse
was met with the following generic response:
Dear Customer,
Thank you for contacting Huawei device.
This is our website link http://www.huaweidevice.com/worldwide/searchResult.
do?method=execute&searchString=U8800pro where you can download the secure
code for U8800pro to you.
Once again thank you for contacting Huawei device.
Best Regards.
Huawei Device Customer Care Team.
Click to expand...
Click to collapse
Since my U8800pro is not my main phone anymore, I do not have the energy to fight. Nor do I want to work on Huawei's kernel, where you have to be careful about what you change or the Wi-Fi module won't load (and Huawei won't give you the source - which they should do since I'm sure it's under GPL). matteof93 will most likely produce something better or when everyone starts producing their own kernels and make enough improvements to be hit with the same issue as I, they'll start to get more emails and listen
@qwerty at the last command it said that device is busy...also is there any way that you can make it for init.d so it will be easier??thx!!

[NEWS] Linux 4.19 to natively support Samsung Galaxy S

Those who read Phoronix might already know, but Olof Johansson from kernel.org is working on official support for Samsung Galaxy S smartphone.
Most probably, for XDA, they are a bit late to the party, but it still might be fun for tinkerers who'd want to run a Linux distro (any dev still here?).
Now, I'm not an owner/user of I9000 anymore (it was broken by a child I borrowed it to, just for 24h [driven over by bike - WTF], and lies in the closet, due to the sentiment - I've learned a lot of Linux stuff with this phone and I can't part with it), but I'm moved by the fact that there will be official support. This feels so awesome that I'm sad my old brick isn't working anymore ?
I can see the place isn't as lively as I remember, but if there any of you left, then best of luck playing with it ?
Source:
https://www.phoronix.com/scan.php?page=news_item&px=Samsung-Galaxy-S-DT-Linux-4.19
https://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc.git/commit/?h=for-next&id=85b40cf3a868361fed3122a503469f3be7a38b97
PS. Graphics device would still be a problem (SGX540, if I remember?). It's blobbed, so it sucks.
devloz said:
Those who read Phoronix might already know, but Olof Johansson from kernel.org is working on official support for Samsung Galaxy S smartphone.
Most probably, for XDA, they are a bit late to the party, but it still might be fun for tinkerers who'd want to run a Linux distro (any dev still here?).
Now, I'm not an owner/user of I9000 anymore (it was broken by a child I borrowed it to, just for 24h [driven over by bike - WTF], and lies in the closet, due to the sentiment - I've learned a lot of Linux stuff with this phone and I can't part with it), but I'm moved by the fact that there will be official support. This feels so awesome that I'm sad my old brick isn't working anymore
I can see the place isn't as lively as I remember, but if there any of you left, then best of luck playing with it
Source:
https://www.phoronix.com/scan.php?page=news_item&px=Samsung-Galaxy-S-DT-Linux-4.19
https://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc.git/commit/?h=for-next&id=85b40cf3a868361fed3122a503469f3be7a38b97
PS. Graphics device would still be a problem (SGX540, if I remember?). It's blobbed, so it sucks.
Click to expand...
Click to collapse
Giving proper credits is very important.
Obviously, when you submit patches to the linux kernel, somebody (from the kernel's team) has to review them, and merge them if they look good.
That 'somebody' in this case is Olof Johansson. The process is called code-review.
The actual developers are PabloPL and @xc-racer99
source code: https://github.com/PabloPL/linux
further proof: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/log/?qt=grep&q=paweł+chmiel
status: https://github.com/PabloPL/linux/wiki (this is slightly outdated, you can follow the github issues for current status)
P.S: Graphics won't be a problem as desktop environments like MATE and xfce work well even with software rendering.
Thanks for putting this up here, it's possible someone else might notice and help out There's also an associated u-boot port at https://github.com/xc-racer99/u-boot-galaxys4g/wiki
If anyone is interested, I can give instructions on how to boot a basic Debian or Arch Linux installation.
Yep, that's correct that the SGX 540 is blobbed. There's an in-kernel driver, but it's mostly a shim for the proprietary blob which implements the windowing system (surfaceflinger for Android, X for Linux). It would probably be possible to re-used the Pandaboard X window system blobs, but 3D acceleration is a ways off.
xc-racer99 said:
If anyone is interested, I can give instructions on how to boot a basic Debian or Arch Linux installation.
Click to expand...
Click to collapse
Yes, please. That would be very useful!
MYEUHD said:
Yes, please. That would be very useful!
Click to expand...
Click to collapse
Alright, here goes. This is assuming you have all data backed up to somewhere safe.
1) Clone the u-boot port from https://github.com/xc-racer99/u-boot-galaxys4g/ - the v2018.05-aries branch is probably best
Code:
git clone https://github.com/xc-racer99/u-boot-galaxys4g -b v2018.05-aries
cd u-boot-galaxys4g
2) Build u-boot:
Code:
export ARCH=arm CROSS_COMPILE=/path/to/arm/cc
make s5p_aries_defconfig
make -j6
3) The resulting u-boot.bin is the u-boot file to flash:
Code:
heimdall flash --KERNEL u-boot.bin
4) Clone the linux kernel. You can use a variety of branches - linus' branch (aka v4.19 stable), any of the ones from https://github.com/PabloPL/linux/branches - note that I recommend the for-upstream/aries-patches-v2 branch as a base and cherry-pick the commits from the other branches for peripherals you want to use
Code:
git clone https://github.com/PabloPL/linux -b for-upstream/aries-patches-v2
cd linux
5) Build linux. First, make sure that the correct debug uart is defined in the defconfig
Code:
sed -i -- 's/CONFIG_DEBUG_S3C_UART1/CONFIG_DEBUG_S3C_UART2/g' arch/arm/configs/s5pv210_defconfig
export ARCH=arm CROSS_COMPILE=/path/to/arm/cc
make s5pv210_defconfig
make
6) Create the u-boot uImage. Replace fascinate4g.dtb with galaxys.dtb if not using an SGH-T959V/SGH-T959W/SGH-T959P. Note that if not using the i9000 or one of the above models, there could be some minor incompatabilities.
Code:
cat arch/arm/boot/zImage arch/arm/boot/dts/s5pv210-fascinate4g.dtb > zImage-dtb
mkimage -A arm -T kernel -a 30008000 -e 30008000 -O linux -d zImage-dtb -C none uImage
7) Flash the u-boot boot image. This could also be placed in a different place that u-boot knows how to boot from (mmc partition 1/2, sd card partition 1/2)
Code:
heimdall flash --RECOVERY uImage
---------- Post added at 09:45 AM ---------- Previous post was at 09:26 AM ----------
Installing a Linux distro
1) Format the first partition on your SD card as a Linux-compatible filesystem (eg ext4)
2) Arch Linux
a) Download the ARMv7 multi-platform zip from https://archlinuxarm.org/about/downloads
b) Extract the ArchLinuxARM-armv7-latest.tar.gz to the first partition on your SD card
3) Debian
a) From a Debian host, install debootstrap and qemu-arm-static
Code:
# apt install qemu-arm-static debootstrap
b) Bootstrap the system
Code:
# mkdir debian_armhf_stretch
# qemu-debootstrap --arch armhf stretch debian_armhf_stretch http://deb.debian.org/debian/
c) Enter the chroot and configure it
Code:
# chroot debian_armhf_stretch
i) Set password
Code:
passwd <your new password for user root here>
ii) Install any desired packages, eg xfce4
Code:
apt install xfce4
d) Exit the chroot
Code:
exit
e) Copy the contents of debian_armhf_stretch to your SD card. Alternatively, you could have run qemu-debootstrap to setup directly on the SD card
4) Stick your SD card into your phone and boot!
Arch Linux is a minimal, non-GUI install while Debian can be customized as desired. I personally use Debian. Note that if using some things such as wifi or bluetooth, you may need some firmware and/or some of the kernel modules to be copied to their required places.
Update
The aries-patches-v2 branch doesn't have the touchscreen enabled. You'll need to merge the commits from https://github.com/PabloPL/linux/commits/for-upstream/atmel-mxt-fixes
You'll also probably want to follow the instructions in the answers in https://askubuntu.com/questions/369621/how-to-get-the-onscreen-keybord-appear-on-login to install an on-screen keyboard. Make sure when you're running the commands that you're in the debian chroot.
Do I need a serial console to enter the password and login?
Edit: I disabled the password login by following https://superuser.com/questions/969923/automatic-root-login-in-debian-8-0-console-only#970013
But still, debian doesn't boot to xfce4.
Wich dependancies is required for building with ubuntu? The command make -j6 give me 2 errors
MYEUHD said:
Do I need a serial console to enter the password and login?
Edit: I disabled the password login by following https://superuser.com/questions/969923/automatic-root-login-in-debian-8-0-console-only#970013
But still, debian doesn't boot to xfce4.
Click to expand...
Click to collapse
Shouldn't need a serial console to login, although that's how I've been doing it lately. What's the last screen you see? Is it flashing a few different ones (I think this was just when DMA was enabled, I need to check when I get the chance though) or just stuck at the lightdm screen? Come to think of it, the aries-patches-v2 branch doesn't have the touchscreen enabled, so you'll need to manually merge the patches from the branch https://github.com/PabloPL/linux/commits/for-upstream/atmel-mxt-fixes and then you'll need to enable the on-screen keyboard based on the answers in https://askubuntu.com/questions/369621/how-to-get-the-onscreen-keybord-appear-on-login
laharl_22 said:
Wich dependancies is required for building with ubuntu? The command make -j6 give me 2 errors
Click to expand...
Click to collapse
You should just need an ARM cross compiler (eg gcc-6-arm-linux-gnueabihf-base) and possibly build-essential. U-Boot does need a relatively new cross compiler IIRC so the Android GCC 4.8/4.9 based ones probably don't work.
Exactly the sames errors after installing the libs im on ubuntu 18.04 lts amd64 the error text
scripts/kconfig/conf --silentoldconfig Kconfig
CHK include/config.h
CFG u-boot.cfg
GEN include/autoconf.mk.dep
GEN include/autoconf.mk
CHK include/config/uboot.release
CHK include/generated/timestamp_autogenerated.h
UPD include/generated/timestamp_autogenerated.h
CHK include/config.h
CFG u-boot.cfg
CHK include/generated/version_autogenerated.h
CC lib/asm-offsets.s
CC arch/arm/lib/asm-offsets.s
cc1: error: bad value (‘armv5’) for ‘-march=’ switch
cc1: note: valid arguments to ‘-march=’ switch are: nocona core2 nehalem corei7 westmere sandybridge corei7-avx ivybridge core-avx-i haswell core-avx2 broadwell skylake skylake-avx512 bonnell atom silvermont slm knl x86-64 eden-x2 nano nano-1000 nano-2000 nano-3000 nano-x2 eden-x4 nano-x4 k8 k8-sse3 opteron opteron-sse
---------- Post added at 07:37 PM ---------- Previous post was at 06:44 PM ----------
how to fix the bad value please ?
---------- Post added at 08:18 PM ---------- Previous post was at 07:37 PM ----------
anyone can compile tested with 3 version of cross compiler always the sames error
laharl_22 said:
Exactly the sames errors after installing the libs im on ubuntu 18.04 lts amd64 the error text
scripts/kconfig/conf --silentoldconfig Kconfig
CHK include/config.h
CFG u-boot.cfg
GEN include/autoconf.mk.dep
GEN include/autoconf.mk
CHK include/config/uboot.release
CHK include/generated/timestamp_autogenerated.h
UPD include/generated/timestamp_autogenerated.h
CHK include/config.h
CFG u-boot.cfg
CHK include/generated/version_autogenerated.h
CC lib/asm-offsets.s
CC arch/arm/lib/asm-offsets.s
cc1: error: bad value (‘armv5’) for ‘-march=’ switch
cc1: note: valid arguments to ‘-march=’ switch are: nocona core2 nehalem corei7 westmere sandybridge corei7-avx ivybridge core-avx-i haswell core-avx2 broadwell skylake skylake-avx512 bonnell atom silvermont slm knl x86-64 eden-x2 nano nano-1000 nano-2000 nano-3000 nano-x2 eden-x4 nano-x4 k8 k8-sse3 opteron opteron-sse
---------- Post added at 07:37 PM ---------- Previous post was at 06:44 PM ----------
how to fix the bad value please ?
---------- Post added at 08:18 PM ---------- Previous post was at 07:37 PM ----------
anyone can compile tested with 3 version of cross compiler always the sames error
Click to expand...
Click to collapse
Doesn't look like you've properly setup the cross compiler. Have you run
Code:
export ARCH=arm CROSS_COMPILE=</path/to/cc>
where </path/to/cc> is the arm cross compiler toolchain? Note that in my case (Debian Stretch) that is /usr/bin/arm-linux-gnueabi- note that arm-linux-gnueabi- part (including the dash) are required, so the actual gcc path would be /usr/bin/arm-linux-gnueabi-gcc
The error you're getting shows you're trying to use a x86 toolchain to build for an ARM machine.
xc-racer99 said:
Shouldn't need a serial console to login, although that's how I've been doing it lately. What's the last screen you see? Is it flashing a few different ones (I think this was just when DMA was enabled, I need to check when I get the chance though) or just stuck at the lightdm screen? Come to think of it, the aries-patches-v2 branch doesn't have the touchscreen enabled, so you'll need to manually merge the patches from the branch https://github.com/PabloPL/linux/commits/for-upstream/atmel-mxt-fixes and then you'll need to enable the on-screen keyboard based on the answers in https://askubuntu.com/questions/369621/how-to-get-the-onscreen-keybord-appear-on-login.
Click to expand...
Click to collapse
Lightdm wasn't even showing up, all I got was the same non-GUI login that you'd find in Arch.
Surprisingly, when I set autologin-guest to true in lightdm's configuration, it shows up and I can type my username and password to enter xfce4 (using on-screen keyboard).
Thank you for the instructions!
Edit: I just disabled autologin-guest to confirm the issue. Yet, lightdm showed up.
Very wierd...
Edit2: Check the following post for the solution.
If someone is having issues with Lightdm e.g getting a non-GUI login screen, or the phone looping between a black screen (~3s) and u-boot's graphical menu(~0.5s) instead of showing Lightdm,
type the following in the Debian chroot:
Code:
dpkg-reconfigure lightdm
About touchscreen patches
It turns out that those patches (from for-upstream/atmel-mxt-fixes) are not needed to enable touchscreen on Aries phones.
Just look here https://github.com/PabloPL/linux/co...7ff#diff-a55548a61205e9ebe52d79c1251eb46cR361
So like @xc-racer99 said, the best will be to use for-upstream/aries-patches-v2 branch
About compilation problems:
You can try to take toolchain from https://releases.linaro.org/components/toolchain/binaries/latest/arm-linux-gnueabihf/ (i'm using it during development on my ubuntu 16.04).
anyone have the compiled files please?i have tested all i have command not found on cross compiler
laharl_22 said:
anyone have the compiled files please?i have tested all i have command not found on cross compiler
Click to expand...
Click to collapse
Frankly, and with no offense meant, the state of the project is such that if you are unable to compile it on your own, then you probably shouldn't be running it as the potential for messing up your device and hard-bricking it is relatively high (ie I screwed up once and had to apply the unbrickable mod on my device to save it). As well, it's only really useful right now as a development project for someone with time on their hands
If it ever gets to point where it becomes usable, precompiled binaries with instructions on how to flash them will be provided. Don't hold your breath on getting to this point soon (or maybe even ever...)

Categories

Resources