[-]
Who's Online
There are currently 2049 online users. [Complete List]
» 1 Member(s) | 2048 Guest(s)
Avatar

[-]
Latest Threads
ZH960 Tablet Bricked
Last Post: luis mar que
2024-03-20 19:52
» Replies: 15
» Views: 9690
User What is the effect of food intake o...
Last Post: fildena150as
2024-03-13 16:37
» Replies: 0
» Views: 23
Thanks, I've been looking for this for a...
Last Post: StevenRip
2024-02-25 05:00
» Replies: 0
» Views: 16
[SOLVED] Need ROM for ZH960-MB-V4.1
Last Post: ery1988
2024-02-21 08:59
» Replies: 0
» Views: 77
NEED ROM ZH960-MB-V4.1
Last Post: ery1988
2024-02-21 08:53
» Replies: 18
» Views: 13534
Budget phone choice help needed
Last Post: sabir7272
2024-02-10 06:52
» Replies: 4
» Views: 4184
ZH960-MB-V3.1 SOLVE
Last Post: Pranav1
2023-12-20 20:22
» Replies: 77
» Views: 33574
Need ROM for SONIM XP7S Android 5.1.1
Last Post: Alpa
2023-11-29 22:17
» Replies: 0
» Views: 69
Need rom for X101 Mt6592
Last Post: carencell
2023-11-24 21:30
» Replies: 3
» Views: 2038
Gizbeat 101: Get your MTK6589 MTK6577 MT...
Last Post: Alexia78
2023-11-13 11:28
» Replies: 8
» Views: 22263
ZH960-MB-V3.1
Last Post: Giankyworld81
2023-11-01 19:35
» Replies: 21
» Views: 15358
Need rom for a tablet with board id "K10...
Last Post: oliver2
2023-10-24 20:23
» Replies: 6
» Views: 5130
How to Connect open public wifi
Last Post: oliverben45
2023-10-24 16:03
» Replies: 11
» Views: 8788
I NEED FILE FOR ITEL MOBILE PHONE AND TO...
Last Post: Meghnad45
2023-10-22 02:38
» Replies: 1
» Views: 1375
NEED Help Bricked my phone.
Last Post: Meghnad45
2023-10-22 02:36
» Replies: 4
» Views: 4784
Introduction
Last Post: ezrahidaya
2023-10-14 14:38
» Replies: 3
» Views: 1295
Needs help to root a china tablet brand ...
Last Post: ezrahidaya
2023-10-14 14:37
» Replies: 1
» Views: 166
Any tips to stay awake?
Last Post: ezrahidaya
2023-10-14 14:35
» Replies: 6
» Views: 4868
Need ROM for china TAb MT6797
Last Post: ezrahidaya
2023-10-14 14:34
» Replies: 1
» Views: 309
need this stock firmware for my tablet M...
Last Post: ramzii888
2023-10-14 02:20
» Replies: 4
» Views: 4449
Encryption Unsuccessful - Reset Android
Last Post: Aakriti
2023-10-13 16:51
» Replies: 3
» Views: 12374
betools
Last Post: egdeim
2023-09-21 12:41
» Replies: 4
» Views: 5019
[Movie Suggestion] Automata with Antonio...
Last Post: GottaGetX
2023-09-07 09:19
» Replies: 3
» Views: 4087





Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
kernel building mt6582....ramblings
#1
ramblings as I am not organised just doing online notes to myself in no particular order

Having bought a new PC and installed Xubuntu 64 bit on it, its time to look if I can build a kernel for my phone.....mt6582



Building a Kernel from source{Mediatek}
CREDITS
######
MasterAwesome

2) one of the differences is I won't try an emulator

because I know how to mod a recovery image, I shall inject my new kernel and use mobileuncle or fastboot to flash the new recovery

--- no need to worry about kernel modules in recovery mode

3) I have already looked.....there is no config anywhere in my /proc or system files.....but I can get lsmod output off phone to see what modules are currently running on it.


now to have time to do it.....can anyone give me their spare time?
giggles

one of the things we need is a toolchain

EDIT
Just found out a gotcha....can't use 4.7 need to use 4.6

Code:
git clone https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6

this produces a folder called.......150 Mb unpacked size
/home//arm-eabi-4.6/

and the kernel source for our cross compile stuff

Code:
git clone https://github.com/kashifmin/MT6582-KK-KERNEL.git

produces a folder called...............size unpacked is 2.4 Gb

I repeat 2400 Mb in case you think its a typo

/home//MT6582-KK-KERNEL/
You, linr76, Athos, lovely like this post
Reply
#2
huh, since when are MTK kernel sources open?
interesting stuff, i'd like to read more of your proceedings.
i am personally hoping to start some development of my own when Xiaomi finally releases kernel source code for MI3.
You like this post
my phones current and past:
Brand phones:
  • Samsung Galaxy Apollo/Leo/3 - retired, 2x Samsung Galaxy S - gone, Samsung Galaxy Note - stolen Sad , Samsung Galaxy Grand Duos - retired
  • Samsung Galaxy S3

  • Samsung Galaxy S4 black edition (work issue)
China phones:
  • Pinphone 3 (never received), Smarty A8 (MTK6515 HTC Chacha clone), iNew V3 - sold
  • Xiaomi Redmi 1s - Wife's daily driver
  • Xiaomi MI3 64GB with MagicSim on dual bootMIUI v5 (4.8.22) /CM11
Others:
  • ZTE Open (FirefoxOS) - now running ICS! -retired from duty.
Reply
#3
a quick google against phone and github produces this
[Only registered and activated users can see links Click here to register]

and don't get excited but mi2 is here
[Only registered and activated users can see links Click here to register]

is it close enough?
You like this post
Reply
#4
(2014-08-27, 17:39)aus9 Wrote: [Only registered and activated users can see links Click here to register]

and don't get excited but mi2 is here
[Only registered and activated users can see links Click here to register]

is it close enough?
Nope mi2 is snapdragon 600 and pretty much completely different. Source for mi3 should be available until end of year.
Some efforts were already made, search cancro
You and aus9 like this post
my phones current and past:
Brand phones:
  • Samsung Galaxy Apollo/Leo/3 - retired, 2x Samsung Galaxy S - gone, Samsung Galaxy Note - stolen Sad , Samsung Galaxy Grand Duos - retired
  • Samsung Galaxy S3

  • Samsung Galaxy S4 black edition (work issue)
China phones:
  • Pinphone 3 (never received), Smarty A8 (MTK6515 HTC Chacha clone), iNew V3 - sold
  • Xiaomi Redmi 1s - Wife's daily driver
  • Xiaomi MI3 64GB with MagicSim on dual bootMIUI v5 (4.8.22) /CM11
Others:
  • ZTE Open (FirefoxOS) - now running ICS! -retired from duty.
Reply
#5
stumbling block is a missing header.....it is not found anywhere
well not in the kernel source
here are the details and cross compile instructions so far....oh and I changed to Linaro toolchain

Code:
# commands done in same shell, no persistence at this stage
export TARGET_PRODUCT=A9CL
export PATH=/home/gordon/android-toolchain-eabi/bin:$PATH
export ARCH_MTK_PLATFORM=mt6582
export TARGET_BUILD_VARIANT=user
export TARGET_PRODUCT=A9CL
export MTK_ROOT_CUSTOM=/home/gordon/$KS/mediatek/custom/
export TARGET_KERNEL_VERSION=mt6582
export CROSS_COMPILE=arm-eabi-
export ARCH=arm
KS=MT6582-KK-KERNEL
DN=mt6582
cd $KS
cp mediatek/config/$DN/autoconfig/kconfig/platform kernel/.config
cd kernel
make prepare

# fix errors of gcc name not found
ln -s /home/gordon/android-toolchain-eabi/bin/arm-linux-androideabi-gcc   /home/gordon/android-toolchain-eabi/bin/arm-eabi-gcc

# fix missing headers
ln -s /home/gordon/MT6582-KK-KERNEL/mediatek/platform/mt6582/kernel/core/include/mach/timex.h /home/gordon/MT6582-KK-KERNEL/mediatek/kernel/include/mach/timex.h
ln -s /home/gordon/MT6582-KK-KERNEL/mediatek/platform/mt6582/kernel/core/include/mach/memory.h /home/gordon/MT6582-KK-KERNEL/mediatek/kernel/include/mach/memory.h
ln -s /home/gordon/MT6582-KK-KERNEL/mediatek/platform/mt6582/kernel/core/include/mach/irqs.h /home/gordon/MT6582-KK-KERNEL/mediatek/kernel/include/mach/irqs.h
ln -s /home/gordon/MT6582-KK-KERNEL/mediatek/platform/mt6582/kernel/core/include/mach/mt_irq.h /home/gordon/MT6582-KK-KERNEL/mediatek/kernel/include/mach/mt_irq.h
ln -s /home/gordon/MT6582-KK-KERNEL/mediatek/platform/mt6582/kernel/core/include/mach/x_define_irq.h /home/gordon/MT6582-KK-KERNEL/mediatek/kernel/include/mach/x_define_irq.h

# no more make prepare errors
make menuconfig  # no changes at this stage
make zImage

# fix zImage errors
ln -s /home/gordon/MT6582-KK-KERNEL/mediatek/platform/mt6582/kernel/core/include/mach/mt_spm_idle.h /home/gordon/MT6582-KK-KERNEL/mediatek/kernel/include/mach/mt_spm_idle.h

# unresolved error no dfo_boot.h

thanks for reading
linr76 likes this post
Reply
#6
ok so I found the header but its for the wrong kernel mt6572 but still no joy
make zImage fails for a related df0* object

code tidied up so its easier to reaad
Code:
KS=MT6582-KK-KERNEL
DN=mt6582

# fix errors in Linaro bin
cd /home/gordon/android-toolchain-eabi/bin
ln -s arm-linux-androideabi-ld.bfd arm-eabi-ld.bfd
ln -s arm-linux-androideabi-gcc    arm-eabi-gcc
cd ~

# fix missing headers
cd $KS/mediatek
S1=platform/mt6582/kernel/core/include/mach
L2=kernel/include/mach
ln -s $S1/timex.h        $L2/timex.h
ln -s $S1/memory.h       $L2/memory.h
ln -s $S1/irqs.h         $L2/irqs.h
ln -s $S1/mt_irq.h       $L2/mt_irq.h
ln -s $S1/x_define_irq.h $L2/x_define_irq.h
ln -s $S1/mt_spm_idle.h  $L2/mt_spm_idle.h
ln -s $S1/mt_devinfo.h   $L2/mt_devinfo.h
ln -s $S1/entry-macro.S  $L2/entry-macro.S
cd ~


# commands done in same shell, no persistence at this stage
export TARGET_PRODUCT=A9CL
export PATH=/home/gordon/android-toolchain-eabi/bin:$PATH
export ARCH_MTK_PLATFORM=mt6582
export TARGET_BUILD_VARIANT=user
export TARGET_PRODUCT=A9CL
export MTK_ROOT_CUSTOM=/home/gordon/$KS/mediatek/custom/
export TARGET_KERNEL_VERSION=mt6582
export CROSS_COMPILE=arm-eabi-
export ARCH=arm
cd $KS
cp mediatek/config/$DN/autoconfig/kconfig/platform kernel/.config
cd kernel
make prepare
# do not proceed unless no errors
# make menuconfig  # no changes at this stage
# make zImage

# unresolved error no dfo_boot.h
# google and borrow the header from mt6572
# inject it and sym link it

I can not edit first post, but that is not important

If you are on Linux there are a number of Linaro toolchains to choose from

I chose the simplest cos I am a simple person .....giggles

[Only registered and activated users can see links Click here to register]

click on d/l link = android-toolchain-eabi-4.9-2014.07-x86.tar.bz2

good luck

now we look to see if we can choose a different custom kernel within the kernel source

eg

#ifndef __ARCH_ARM_MACH_MT6575 visible from
/home/gordon/MT6582-KK-KERNEL/mediatek/custom/bird82_tb_td_a_kk/kernel/core/src/board-custom.h

mine is mt6582 so we can't use that one

2) Can't use same pathway for next kernel
but
/home/gordon/MT6582-KK-KERNEL/mediatek/custom/banyan_addon_x86/factory/init.rc

contents includes
chmod 0777 /dev/mt6516
and
mount yaffs2 mtd@system /system

Nope....my partition does not use yaffs nor do I have such dev

3) other one is also not mine as this pathway exist
/home/gordon/MT6582-KK-KERNEL/mediatek/custom/common/kernel/wifi/mt592x/

so I can't use "common" in my export pathway

I am no closer than before but I have eliminated all but mt6582 as potential custom kernel configs

grrrrrrrrrrr
You like this post
Reply
#7
Hi.. i compiled with this command

./makeMtk bird82_tb_td_a_kk n k

but error for this
make[2]: *** [sub-make] Error 2
out/target/product/bird82_tb_td_a_kk/obj/KERNEL_OBJ/kernel_bird82_tb_td_a_kk.bin does NOT exist!


how ti fix ?
You like this post
Reply
#8
Please my mobile lenovo a328 mt6582 KitKat kernel I have update lolipop kernel please guide
Reply
#9
Hi,aus9:
Do you have solved these build errors, now. Could you share some experience about this MT6582 Source code building, or if there are some other solution on MT6582 platform.
You like this post
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
Thumbs Up [Tutorial] How to format your NAND Flash MT6589, MT6577, MT6582, MT6572 akwangwu 47 285,041 2019-03-18, 08:11
Last Post: abrahim
  [Tutorial] Ultimate no-root backup CWM MT6582 MT6592 MT6589 MT6589T MT6577 MT6595 Sniper47 39 114,634 2018-04-17, 05:30
Last Post: lentmain
  [How To] Make a scatter file MT6595, MT6582, MT6589, MT6592, MT6577, MT6589T, MT6572 GizBeat 17 92,340 2017-01-17, 01:38
Last Post: lilili10
  [Tutorial] How To Fix Repair Invalid IMEI Tutorial On MT6582 MT6589 MT6592 Sniper47 34 148,910 2015-10-22, 18:39
Last Post: frozenbytes
  [Tutorial] MT6592 MT6589 MT6582 MT6572 MTK Change / Create / Generate Invalid IMEI GizBeat 0 8,727 2014-10-12, 14:50
Last Post: GizBeat

Forum Jump:


Users browsing this thread: 1 Guest(s)
[-]
Tech & Science
[Sci-Am] Wegovy Is First Weight-Loss Drug Approved for Heart...
Last Post: Scientific American
Yesterday 12:44
» Replies: 0
» Views: 9
[Harvard] Herbaria’s use and importance grows with climate c...
Last Post: Harvard
Yesterday 12:44
» Replies: 0
» Views: 11
[Sci-Am] Contributors to Scientific American’s April 2024 Is...
Last Post: Scientific American
2024-03-27 22:49
» Replies: 0
» Views: 4
[Sci-Am] Cannibal Cells Inspire Cancer Treatment Improvement
Last Post: Scientific American
2024-03-27 09:07
» Replies: 0
» Views: 1
[Harvard] Harvard physicists create a new phase of matter
Last Post: Harvard
2024-03-27 09:07
» Replies: 0
» Views: 3
[Sci-Am] Readers Respond to the December 2023 Issue
Last Post: Scientific American
2024-03-26 19:41
» Replies: 0
» Views: 5
[Sci-Am] Inside the AI Competition That Decoded an Ancient H...
Last Post: Scientific American
2024-03-25 16:06
» Replies: 0
» Views: 34
[Sci-Am] See Every Bit of Outer Space We’ve Brought Back to ...
Last Post: Scientific American
2024-03-25 01:40
» Replies: 0
» Views: 36
[Sci-Am] Poem: ‘SnapShot, 1968’
Last Post: Scientific American
2024-03-24 10:31
» Replies: 0
» Views: 10
[Sci-Am] Your Next Flight's Fuel Could Be Made By Microbes
Last Post: Scientific American
2024-03-23 19:46
» Replies: 0
» Views: 28
[Sci-Am] Florida’s Surgeon General Shows the Danger of Polit...
Last Post: Scientific American
2024-03-23 05:30
» Replies: 0
» Views: 41
[Sci-Am] The Science behind Humpback Whales’ Eerie Songs
Last Post: Scientific American
2024-03-22 15:51
» Replies: 0
» Views: 51
[Sci-Am] Astronomers Are Snapping Baby Pictures of Planets b...
Last Post: Scientific American
2024-03-22 01:50
» Replies: 0
» Views: 56
[Sci-Am] A ‘Havana Syndrome’ Investigation in Congress Rests...
Last Post: Scientific American
2024-03-20 22:36
» Replies: 0
» Views: 70
[Sci-Am] What’s behind NASA’s Commercial Lunar Hits and Miss...
Last Post: Scientific American
2024-03-20 09:11
» Replies: 0
» Views: 57
[Sci-Am] Microplastics Linked to Heart Attack, Stroke and De...
Last Post: Scientific American
2024-03-19 18:34
» Replies: 0
» Views: 32
[Sci-Am] How the Seven Bridges of Königsberg Spawned New Mat...
Last Post: Scientific American
2024-03-19 04:51
» Replies: 0
» Views: 28
[Sci-Am] Biden’s State of the Union Promises Big Job Gains f...
Last Post: Scientific American
2024-03-18 14:15
» Replies: 0
» Views: 24
[Sci-Am] Paying Attention to Sensations Can Help Reset the M...
Last Post: Scientific American
2024-03-18 00:26
» Replies: 0
» Views: 28
[Sci-Am] How Arguments that Embryos Are People Pose a Threat...
Last Post: Scientific American
2024-03-17 10:12
» Replies: 0
» Views: 34
[Sci-Am] NASA’s Hopes for Space Solar Power Are Looking Dim
Last Post: Scientific American
2024-03-16 19:58
» Replies: 0
» Views: 33
[Sci-Am] Deepwater Sharks Are Threatened by Demand for Liver...
Last Post: Scientific American
2024-03-16 06:21
» Replies: 0
» Views: 35
[Sci-Am] The Amazing Aerial Adventures of the 'Flying Femini...
Last Post: Scientific American
2024-03-15 16:28
» Replies: 0
» Views: 45
[Sci-Am] We Need Small Astronomy as Much as Big Astronomy
Last Post: Scientific American
2024-03-15 02:13
» Replies: 0
» Views: 39
[Sci-Am] Two Giant U.S. Telescopes Are Threatened by Federal...
Last Post: Scientific American
2024-03-14 11:57
» Replies: 0
» Views: 12
[Harvard] Did fermented foods fuel brain growth?
Last Post: Harvard
2024-03-14 11:57
» Replies: 0
» Views: 23
[Sci-Am] What Are the Benefits of Sleeping Alone?
Last Post: Scientific American
2024-03-13 22:27
» Replies: 0
» Views: 8
[Sci-Am] Is Raw Milk Cheese Safe to Eat?
Last Post: Scientific American
2024-03-13 08:41
» Replies: 0
» Views: 5
[Sci-Am] Why Do So Many Mental Illnesses Overlap?
Last Post: Scientific American
2024-03-12 17:56
» Replies: 0
» Views: 6
[Sci-Am] Sora Is OpenAI’s New Text-to-Video Generator. Here’...
Last Post: Scientific American
2024-03-12 03:40
» Replies: 0
» Views: 10
[Sci-Am] Is This the Earliest Evidence of Human Cannibalism?
Last Post: Scientific American
2024-03-11 13:29
» Replies: 0
» Views: 13
[Sci-Am] This New Antivenom Defangs the Toxins of Cobras, Bl...
Last Post: Scientific American
2024-03-10 09:19
» Replies: 0
» Views: 21
[Sci-Am] Florida Surgeon General Risks Making a Dangerous Me...
Last Post: Scientific American
2024-03-09 19:15
» Replies: 0
» Views: 20
[Sci-Am] A Sexbot Gains Sentience in an Eerie New Novel
Last Post: Scientific American
2024-03-08 16:14
» Replies: 0
» Views: 36
[Sci-Am] A Solar Eclipse, Cancer Treatments and Robots with ...
Last Post: Scientific American
2024-03-08 01:32
» Replies: 0
» Views: 51
[Sci-Am] By Preserving Resources, We’re Protecting People, T...
Last Post: Scientific American
2024-03-07 10:49
» Replies: 0
» Views: 44
[Sci-Am] Even 'Twilight Zone' Coral Reefs Aren't Safe from B...
Last Post: Scientific American
2024-03-06 20:41
» Replies: 0
» Views: 52