Blu R1 HD is ready for the devs!

N00b-un-2

Senior Member
Jan 29, 2011
213
224
0
Glendale
ryancuda.blogspot.com
I'm not really a developer, but I like messing with stuff. Got it to compile I think!

Code:
unzip -o ../Downloads/kernel-source.zip 
gedit kernel-3.18/drivers/mmc/core/mmc.c
	took out @xuchunsheng code blocks
mkdir tools/tools

export PATH=/home/adam/android-ndk-r12b/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin:$PATH&&export CROSS_COMPILE=arm-linux-androideabi-&&export ARCH=arm

drvs=~/build/kernel-3.18/drivers
miscmtk=$drvs/misc/mediatek
export CPATH=$miscmtk/base/power/mt6735/:$miscmtk/btcvsd/:$miscmtk/cmdq/v2/mt6735/:$miscmtk/ext_disp/mt6735/:$miscmtk/fingerprint/gfx1xm/:$miscmtk/gpio/mt6735/:$miscmtk/i2c/mt6735/:$miscmtk/m4u/mt6735/mt6753/:$miscmtk/power/mt6735/:$miscmtk/uart/mt6735/:$miscmtk/video/mt6735/dispsys:$miscmtk/video/mt6735/videox/:$drvs/mmc/host/mediatek/mt6735/:$drvs/pinctrl/mediatek/:$drvs/spi/mediatek/mt6735/:$drvs/watchdog/mediatek/wdt/mt6735/

make p6601_defconfig
make -j4 zImage
CPATH thing seems a little weird, but I guess it gets through those troublesome includes. Maybe there's something supposed to be in the build.ini that they didn't give us.
Code:
  OBJCOPY arch/arm/boot/Image
  Kernel: arch/arm/boot/Image is ready
  LDS     arch/arm/boot/compressed/vmlinux.lds
  AS      arch/arm/boot/compressed/head.o
  GZIP    arch/arm/boot/compressed/piggy.gzip
  CC      arch/arm/boot/compressed/misc.o
  CC      arch/arm/boot/compressed/decompress.o
  CC      arch/arm/boot/compressed/string.o
  SHIPPED arch/arm/boot/compressed/hyp-stub.S
  SHIPPED arch/arm/boot/compressed/lib1funcs.S
  SHIPPED arch/arm/boot/compressed/ashldi3.S
  SHIPPED arch/arm/boot/compressed/bswapsdi2.S
  AS      arch/arm/boot/compressed/hyp-stub.o
  AS      arch/arm/boot/compressed/lib1funcs.o
  AS      arch/arm/boot/compressed/ashldi3.o
  AS      arch/arm/boot/compressed/bswapsdi2.o
  AS      arch/arm/boot/compressed/piggy.gzip.o
  LD      arch/arm/boot/compressed/vmlinux
  OBJCOPY arch/arm/boot/zImage
  Kernel: arch/arm/boot/zImage is ready
So... I've gotten about as far as you have, but after I run make zImage, it fails on

Code:
No rule to make target 'net/netfilter/xt_HL.o
What is your dev box like? what OS, where did you download the toolchain from, etc.

---------- Post added at 04:29 PM ---------- Previous post was at 04:16 PM ----------

FYI...
http://www.arm.com/products/processors/cortex-a/cortex-a53-processor.php


the CPU does support 64 bit architecture. Looks like, if we can get an arm64 kernel to cross compile, we could build out 64 bit AOSP source against that. Technically 64 bit is totally possible on this device. as for now, I'm more concerned about successfully compiling the kernel itself though.
Once I do that, my first goal is to bake in double tap to wake.
 
  • Like
Reactions: jrk190 and kal250

jrk190

Senior Member
Sep 4, 2012
1,395
167
0
McLeansville
CPATH thing seems a little weird, but I guess it gets through those troublesome includes. Maybe there's something supposed to be in the build.ini that they didn't give us.


So... I've gotten about as far as you have, but after I run make zImage, it fails on



What is your dev box like? what OS, where did you download the toolchain from, etc.

---------- Post added at 04:29 PM ---------- Previous post was at 04:16 PM ----------

FYI...
http://www.arm.com/products/processors/cortex-a/cortex-a53-processor.php


the CPU does support 64 bit architecture. Looks like, if we can get an arm64 kernel to cross compile, we could build out 64 bit AOSP source against that. Technically 64 bit is totally possible on this device. as for now, I'm more concerned about successfully compiling the kernel itself though.
Once I do that, my first goal is to bake in double tap to wake.
And memory management. Jesus. This phone is great but the moment I try to open an app everything hits the fan.
 

N00b-un-2

Senior Member
Jan 29, 2011
213
224
0
Glendale
ryancuda.blogspot.com
hmmm... despite the unlocked bootloader, looks like this phone is still FAR from a Nexus. I just tried to fastboot flash zimage zImage my freshly baked kernel and... bootloops. tried to restore using SPFT... still bootlooping. Might be bricked, can't get into recovery anymore.
 

kal250

Senior Member
Mar 12, 2007
482
126
0
hmmm... despite the unlocked bootloader, looks like this phone is still FAR from a Nexus. I just tried to fastboot flash zimage zImage my freshly baked kernel and... bootloops. tried to restore using SPFT... still bootlooping. Might be bricked, can't get into recovery anymore.
Well that sux.... I really want some sign of hope :crying:
 

N00b-un-2

Senior Member
Jan 29, 2011
213
224
0
Glendale
ryancuda.blogspot.com
Well that sux.... I really want some sign of hope :crying:
not to worry. All that means is that the zImage needs to be packed in the boot.img and can't be flashed with fastboot. The safer thing to do definitely would have been to unpack the boot.img from the stock rom and replace the zImage on it and then fastboot boot boot.img. No risk of bricking there... That being said, my phone is in fact hard bricked now and needs to be replaced. Oh well. Can't make an omelette without breaking a few eggs.
 

kal250

Senior Member
Mar 12, 2007
482
126
0
not to worry. All that means is that the zImage needs to be packed in the boot.img and can't be flashed with fastboot. The safer thing to do definitely would have been to unpack the boot.img from the stock rom and replace the zImage on it and then fastboot boot boot.img. No risk of bricking there... That being said, my phone is in fact hard bricked now and needs to be replaced. Oh well. Can't make an omelette without breaking a few eggs.
You still within your return period with Amazon?? Easier than a warranty claim :rolleyes: I wonder how that works with Prime pricing???
 

kal250

Senior Member
Mar 12, 2007
482
126
0
yeah, just got the phone a couple days ago. wasted no time trying to break it ;)
Yeah, we appreciate the effort!! I wish I had more time on my hands to learn the ins and outs of this stuff. I can spin my way around Windows and PC hardware, but I am a Linux and Android Idiot :eek:
 

AtomicFizzle

Senior Member
Apr 16, 2011
183
49
0
not to worry. All that means is that the zImage needs to be packed in the boot.img and can't be flashed with fastboot. The safer thing to do definitely would have been to unpack the boot.img from the stock rom and replace the zImage on it and then fastboot boot boot.img. No risk of bricking there... That being said, my phone is in fact hard bricked now and needs to be replaced. Oh well. Can't make an omelette without breaking a few eggs.
Well shoot. That was what I was gonna try (just replace the kernel in the stock boot.img), but hadn't had the time yet. Did you try flashing your backed up boot image from the SP flash tool? I thought that tool worked before everything else, you know... when it's off even. I screwed up something a couple of weeks ago and it wouldn't boot at all, and was able to get it back working again.

Btw my build env is pretty basic. Ubuntu 16.04 with the ARM toolchain from the most recent NDK. Guess you figured out whatever was messing up your build.
 

jasonmerc

Senior Member
Dec 14, 2012
1,669
880
143
www.ixquick.com
Hey guys. Made a post about this on the general thread but figured I'd post here as well since this seems to be where the development talk is. Plus it'll help un-clutter the already over-cluttered general thread.

I'm trying to build CM13 from source, using anpage's GitHub repos for both device tree and kernel source. When I do a "lunch [device]" it tells me there are missing dependencies and that it will bail out, however it does not say what the missing dependencies are nor does it bail out. I'm not sure if this is a real issue but this could be a hint.

So far ive run into 2 errors compiling for the R1. The first one being solved by adding a line to the device_p6601.mk file. The second one is the same issue as the first one, only with a different file. I have not been able to figure out how to solve the 2nd error but the first one involved specifying in the device.mk that the screen resolution was mdpi. Here's the unsolvable error I'm getting now:

make: *** No rule to make target '/home/administrator/WORKING_DIRECTORY/out/target/product/p6601/obj/STATIC_LIBRARIES/libminui_intermediates/export_includes', needed by '/home/administrator/WORKING_DIRECTORY/out/target/product/p6601/obj/EXECUTABLES/healthd_intermediates/import_includes'. Stop.

I guess what I'm trying to say is, are we sure the device tree on GitHub is 100% complete? If so, is it 100% compatible with CM sources? I'm not sure how to check because I don't know how to make one.

I'm going to try using this tree and kernel source with compiling pure AOSP Nougat tomorrow and see if I get the same errors. Not sure if the device tree is AOSP compatible but we'll see.
 
  • Like
Reactions: TheLoonyRebel

vampirefo

Senior Member
Apr 3, 2010
3,241
1,631
243
BLU R1 HD
The R1's slogan is "The Rebel In You"


Hi there!

As you may know, there is a 60$ phone in amazon that's pretty much the best budget phone right there with the advantage that amazon is updating security flaws.

We where waiting for the release of the kernel, and after a month of a lot of fighting they release it. Now devs can do their awesome work.

Update:
Seems this kernel allow to compile thanks @ss2man44
https://github.com/anpage/android_kernel_mediatek_mt6735



There's no other BLU device with this chipset and kernel combo. You'll be pretty much pioneers, paving the way for future MT6735 devices with 3.18 kernel.
You'll be gods, cheap gods but still gods!.


So, bring your talent and your friends, we'll be happy to test out your amazing work :good:


Peace!

zip doesn't extract cleanly some problem with arch directory, unzip works.
 
Last edited:

AtomicFizzle

Senior Member
Apr 16, 2011
183
49
0
Tried fastbooting my compiled kernel, but it didn't work. Just goes black and then reboots normally. Btw, the kernel offset is 0x40000000.
Code:
fastboot boot -b 0x40000000 ./zImage-new
creating boot image...
creating boot image - 8366080 bytes
downloading 'boot.img'...
OKAY [  0.794s]
booting...
OKAY [  0.052s]
finished. total time: 0.846s
 

vampirefo

Senior Member
Apr 3, 2010
3,241
1,631
243
Nah, the kernel's fine.

This commit allows it to compile and boot and operate normally. It looks like someone tried to implement a new feature in the MMC driver and left a header out. This code and that header aren't present in any other kernel that I've seen, so I assumed it was safe to revert. Both the internal MMC and the external SD card still work, so :good:

Also, to those of you putting the kernel into a git repo, make sure you delete the broken .git folders strewn about or everything you do in git will take twice as long.

The script that's supposed to append the DTB to the end of the kernel isn't working for me, so I had to append it myself to get it to boot. I'm investigating why this isn't automated now.
Did you figure out the problem of the script that appends the DTB to end of kernel?




Sent from my BLU ENERGY X PLUS using Tapatalk