ROM Android: Kernel MediaTek
Jump to navigation
Jump to search
Download
Sumber source code kernel mediatek
- https://android.googlesource.com/kernel/mediatek/
- https://android.googlesource.com/kernel/mediatek/+/android-4.4.4_r4
- https://android.googlesource.com/kernel/mediatek/+/android-4.4.4_r3
cd ~ git clone https://android.googlesource.com/kernel/mediatek -b android-mediatek-sprout-3.4-kitkat-mr2
Hasilnya
Cloning into 'mediatek'... remote: Sending approximately 516.28 MiB ... remote: Counting objects: 43838, done remote: Finding sources: 100% (54/54) Receiving objects: 100% (2472039/2472039), 516.18 MiB | 33.00 KiB/s, done. remote: Total 2472039 (delta 2079684), reused 2472008 (delta 2079684) Resolving deltas: 100% (2080161/2080161), done. Checking connectivity... done. Checking out files: 100% (41604/41604), done.
Hasilnya akan di simpan di folder
cd ~ mediatek
Cek apakah source code module yang dibutuhkan ada
Lakukan dari komputer / PC
adb devices adb shell ls /sys/modul | more
Dari hasil yang keluar tampaknya file berikut ini penting, terutama saat mengcompile Custom ROM
ccci ccci_plat hid hid_apple hid_ntrig mali mtk_fm_drv mtk_stp_bt_soc mtk_stp_gps_soc mtk_stp_wmt_soc mtk_wmt_detect mtk_wmt_wifi_soc scsi_wait_scan wlan_mt.ko
Lakukan
cd ~ cd mediatek
Lakukan
grep -r fm_drv *
Hasilnya
drivers/misc/mediatek/fmradio/inc/fm_err.h:typedef enum fm_drv_err_t { drivers/misc/mediatek/fmradio/inc/fm_err.h:} fm_drv_err_t; drivers/misc/mediatek/fmradio/Makefile:obj-$(BUILD_MODULE) += mtk_fm_drv.o drivers/misc/mediatek/fmradio/Makefile: mtk_fm_drv-objs += $(mt6628-objs) drivers/misc/mediatek/fmradio/Makefile: obj-$(BUILD_MODULE) += mtk_fm_drv.o drivers/misc/mediatek/fmradio/Makefile: mtk_fm_drv-objs += $(mt6620-objs) drivers/misc/mediatek/fmradio/Makefile: obj-$(BUILD_MODULE) += mtk_fm_drv.o drivers/misc/mediatek/fmradio/Makefile: mtk_fm_drv-objs += $(mt6627-objs) drivers/misc/mediatek/fmradio/Makefile: obj-$(BUILD_MODULE) += mtk_fm_drv.o drivers/misc/mediatek/fmradio/Makefile: mtk_fm_drv-objs += $(mt6627-objs) drivers/misc/mediatek/fmradio/Makefile: obj-$(BUILD_MODULE) += mtk_fm_drv.o drivers/misc/mediatek/fmradio/Makefile: mtk_fm_drv-objs += $(mt6630-objs) drivers/misc/mediatek/fmradio/Makefile:obj-$(BUILD_MODULE) += mtk_fm_drv.o drivers/misc/mediatek/fmradio/Makefile:mtk_fm_drv-objs := core/fm_module.o \ drivers/misc/mediatek/common_detect/drv_init/conn_drv_init.c:#include "fm_drv_init.h" drivers/misc/mediatek/common_detect/drv_init/conn_drv_init.c: tmp_ret = do_fm_drv_init(chip_id); drivers/misc/mediatek/common_detect/drv_init/inc/fm_drv_init.h:extern int do_fm_drv_init(int chip_id); drivers/misc/mediatek/common_detect/drv_init/Makefile: obj-y += fm_drv_init.o drivers/misc/mediatek/common_detect/drv_init/fm_drv_init.c:#include "fm_drv_init.h" drivers/misc/mediatek/common_detect/drv_init/fm_drv_init.c:int do_fm_drv_init(int chip_id)
grep -r stp_bt_soc *
Hasilnya
TIDAK ADA
grep -r stp_gps_soc *
Hasilnya
TIDAK ADA
grep -r stp_wmt_soc *
Hasilnya
TIDAK ADA
grep -r wmt_detect *
Hasilnya
drivers/misc/mediatek/common_detect/wmt_detect.h:#include "wmt_detect_pwr.h" drivers/misc/mediatek/common_detect/wmt_detect.h:extern int wmt_detect_ext_chip_detect(void); drivers/misc/mediatek/common_detect/wmt_detect.h:extern int wmt_detect_ext_chip_pwr_on(void); drivers/misc/mediatek/common_detect/wmt_detect.h:extern int wmt_detect_ext_chip_pwr_off(void); drivers/misc/mediatek/common_detect/wmt_detect_pwr.h:extern int wmt_detect_chip_pwr_ctrl (int on); drivers/misc/mediatek/common_detect/wmt_detect_pwr.h:extern int wmt_detect_sdio_pwr_ctrl (int on); drivers/misc/mediatek/common_detect/wmt_detect_pwr.h:extern int wmt_detect_read_ext_cmb_status (void); drivers/misc/mediatek/common_detect/wmt_detect_pwr.c:#include "wmt_detect.h" drivers/misc/mediatek/common_detect/wmt_detect_pwr.c:static int wmt_detect_dump_pin_conf (void) drivers/misc/mediatek/common_detect/wmt_detect_pwr.c:int _wmt_detect_set_output_mode (unsigned int id) drivers/misc/mediatek/common_detect/wmt_detect_pwr.c:int _wmt_detect_set_input_mode (unsigned int id) drivers/misc/mediatek/common_detect/wmt_detect_pwr.c:int _wmt_detect_output_low (unsigned int id) drivers/misc/mediatek/common_detect/wmt_detect_pwr.c: /*_wmt_detect_set_output_mode(id);*/ drivers/misc/mediatek/common_detect/wmt_detect_pwr.c:int _wmt_detect_output_high (unsigned int id) drivers/misc/mediatek/common_detect/wmt_detect_pwr.c: /*_wmt_detect_set_output_mode(id);*/ drivers/misc/mediatek/common_detect/wmt_detect_pwr.c:int _wmt_detect_read_gpio_input (unsigned int id) drivers/misc/mediatek/common_detect/wmt_detect_pwr.c: _wmt_detect_set_input_mode(id); drivers/misc/mediatek/common_detect/wmt_detect_pwr.c:static int wmt_detect_chip_pwr_on (void) drivers/misc/mediatek/common_detect/wmt_detect_pwr.c: _wmt_detect_set_output_mode(COMBO_LDO_PIN); drivers/misc/mediatek/common_detect/wmt_detect_pwr.c: _wmt_detect_output_low(COMBO_LDO_PIN); drivers/misc/mediatek/common_detect/wmt_detect_pwr.c: _wmt_detect_set_output_mode(COMBO_PMU_PIN); drivers/misc/mediatek/common_detect/wmt_detect_pwr.c: _wmt_detect_output_low(COMBO_PMU_PIN); drivers/misc/mediatek/common_detect/wmt_detect_pwr.c: _wmt_detect_set_output_mode(COMBO_RST_PIN); drivers/misc/mediatek/common_detect/wmt_detect_pwr.c: _wmt_detect_output_low(COMBO_RST_PIN); drivers/misc/mediatek/common_detect/wmt_detect_pwr.c: _wmt_detect_set_output_mode(COMBO_WIFI_EINT_PIN); drivers/misc/mediatek/common_detect/wmt_detect_pwr.c: _wmt_detect_output_low(COMBO_WIFI_EINT_PIN); drivers/misc/mediatek/common_detect/wmt_detect_pwr.c: _wmt_detect_output_high(COMBO_LDO_PIN); drivers/misc/mediatek/common_detect/wmt_detect_pwr.c: _wmt_detect_output_high(COMBO_PMU_PIN); drivers/misc/mediatek/common_detect/wmt_detect_pwr.c: _wmt_detect_output_high(COMBO_RST_PIN); drivers/misc/mediatek/common_detect/wmt_detect_pwr.c:static int wmt_detect_chip_pwr_off (void) drivers/misc/mediatek/common_detect/wmt_detect_pwr.c: _wmt_detect_set_output_mode(COMBO_RST_PIN); drivers/misc/mediatek/common_detect/wmt_detect_pwr.c: _wmt_detect_output_low(COMBO_RST_PIN); drivers/misc/mediatek/common_detect/wmt_detect_pwr.c: _wmt_detect_set_output_mode(COMBO_RST_PIN); drivers/misc/mediatek/common_detect/wmt_detect_pwr.c: _wmt_detect_output_low(COMBO_RST_PIN); drivers/misc/mediatek/common_detect/wmt_detect_pwr.c: _wmt_detect_set_output_mode(COMBO_PMU_PIN); drivers/misc/mediatek/common_detect/wmt_detect_pwr.c: _wmt_detect_output_low(COMBO_PMU_PIN); drivers/misc/mediatek/common_detect/wmt_detect_pwr.c:int wmt_detect_read_ext_cmb_status (void) drivers/misc/mediatek/common_detect/wmt_detect_pwr.c: retval = _wmt_detect_read_gpio_input(COMBO_WIFI_EINT_PIN); drivers/misc/mediatek/common_detect/wmt_detect_pwr.c:int wmt_detect_chip_pwr_ctrl (int on) drivers/misc/mediatek/common_detect/wmt_detect_pwr.c: retval = wmt_detect_chip_pwr_off(); drivers/misc/mediatek/common_detect/wmt_detect_pwr.c: wmt_detect_dump_pin_conf(); drivers/misc/mediatek/common_detect/wmt_detect_pwr.c: retval = wmt_detect_chip_pwr_on(); drivers/misc/mediatek/common_detect/wmt_detect_pwr.c:int wmt_detect_sdio_pwr_ctrl (int on) drivers/misc/mediatek/common_detect/wmt_detect.c:#include "wmt_detect.h" drivers/misc/mediatek/common_detect/wmt_detect.c:static int wmt_detect_open(struct inode *inode, struct file *file) drivers/misc/mediatek/common_detect/wmt_detect.c:static int wmt_detect_close(struct inode *inode, struct file *file) drivers/misc/mediatek/common_detect/wmt_detect.c:static ssize_t wmt_detect_read(struct file *filp, char __user *buf, size_t count, loff_t *f_pos) drivers/misc/mediatek/common_detect/wmt_detect.c:wmt_detect_write ( drivers/misc/mediatek/common_detect/wmt_detect.c:static long wmt_detect_unlocked_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) drivers/misc/mediatek/common_detect/wmt_detect.c: retval = wmt_detect_ext_chip_pwr_on(); drivers/misc/mediatek/common_detect/wmt_detect.c: retval = wmt_detect_ext_chip_detect(); drivers/misc/mediatek/common_detect/wmt_detect.c: retval = wmt_detect_ext_chip_pwr_off(); drivers/misc/mediatek/common_detect/wmt_detect.c: .open = wmt_detect_open, drivers/misc/mediatek/common_detect/wmt_detect.c: .release = wmt_detect_close, drivers/misc/mediatek/common_detect/wmt_detect.c: .read = wmt_detect_read, drivers/misc/mediatek/common_detect/wmt_detect.c: .write = wmt_detect_write, drivers/misc/mediatek/common_detect/wmt_detect.c: .unlocked_ioctl = wmt_detect_unlocked_ioctl, drivers/misc/mediatek/common_detect/wmt_detect.c:int wmt_detect_ext_chip_pwr_on(void) drivers/misc/mediatek/common_detect/wmt_detect.c: if (0 != wmt_detect_chip_pwr_ctrl(1)) drivers/misc/mediatek/common_detect/wmt_detect.c: if (0 != wmt_detect_sdio_pwr_ctrl(1)) drivers/misc/mediatek/common_detect/wmt_detect.c:int wmt_detect_ext_chip_pwr_off(void) drivers/misc/mediatek/common_detect/wmt_detect.c: wmt_detect_sdio_pwr_ctrl(0); drivers/misc/mediatek/common_detect/wmt_detect.c: return wmt_detect_chip_pwr_ctrl(0); drivers/misc/mediatek/common_detect/wmt_detect.c:int wmt_detect_ext_chip_detect(void) drivers/misc/mediatek/common_detect/wmt_detect.c: bgfEintStatus = wmt_detect_read_ext_cmb_status();; drivers/misc/mediatek/common_detect/wmt_detect.c:static int wmt_detect_init(void) drivers/misc/mediatek/common_detect/wmt_detect.c:static void wmt_detect_exit (void) drivers/misc/mediatek/common_detect/wmt_detect.c:module_init(wmt_detect_init); drivers/misc/mediatek/common_detect/wmt_detect.c:module_exit(wmt_detect_exit); drivers/misc/mediatek/common_detect/Makefile: obj-y += wmt_detect.o drivers/misc/mediatek/common_detect/Makefile: obj-y += wmt_detect_pwr.o drivers/misc/mediatek/common_detect/Makefile: obj-$(CONFIG_MTK_COMBO) += mtk_wmt_detect.o drivers/misc/mediatek/common_detect/Makefile: mtk_wmt_detect-objs := wmt_detect.o drivers/misc/mediatek/common_detect/Makefile: mtk_wmt_detect-objs += sdio_detect.o drivers/misc/mediatek/common_detect/Makefile: mtk_wmt_detect-objs += wmt_detect_pwr.o drivers/misc/mediatek/common_detect/sdio_detect.c:#include "wmt_detect.h" drivers/misc/mediatek/common_detect/drv_init/gps_drv_init.c:#include "wmt_detect.h" drivers/misc/mediatek/common_detect/drv_init/conn_drv_init.c:#include "wmt_detect.h" drivers/misc/mediatek/common_detect/drv_init/common_drv_init.c:#include "wmt_detect.h" drivers/misc/mediatek/common_detect/drv_init/bluetooth_drv_init.c:#include "wmt_detect.h" drivers/misc/mediatek/common_detect/drv_init/wlan_drv_init.c:#include "wmt_detect.h" drivers/misc/mediatek/common_detect/drv_init/fm_drv_init.c:#include "wmt_detect.h"
grep -r wmt_wifi_soc *
Hasilnya
drivers/misc/mediatek/conn_soc/common/linux/pub/wmt_chrdev_wifi.c:int mtk_wcn_wmt_wifi_soc_init(void) drivers/misc/mediatek/conn_soc/common/linux/pub/wmt_chrdev_wifi.c:void mtk_wcn_wmt_wifi_soc_exit(void) drivers/misc/mediatek/conn_soc/common/linux/pub/wmt_chrdev_wifi.c:EXPORT_SYMBOL(mtk_wcn_wmt_wifi_soc_init); drivers/misc/mediatek/conn_soc/common/linux/pub/wmt_chrdev_wifi.c:EXPORT_SYMBOL(mtk_wcn_wmt_wifi_soc_exit); drivers/misc/mediatek/common_detect/drv_init/wlan_drv_init.c: ret = mtk_wcn_wmt_wifi_soc_init(); drivers/misc/mediatek/common_detect/drv_init/inc/wlan_drv_init.h:extern int mtk_wcn_wmt_wifi_soc_init(void);
grep -r scsi_wait_scan *
Hasilnya
drivers/scsi/Kconfig: scsi_wait_scan module to ensure that all scans have completed. drivers/scsi/Kconfig:# scsi_wait_scan is a loadable module which waits until all the async scans are drivers/scsi/Kconfig:# discovery schemes, or if a transport driver does not support scsi_wait_scan.) drivers/scsi/scsi_scan.c:/* Only exported for the benefit of scsi_wait_scan */ drivers/scsi/Makefile:obj-$(CONFIG_SCSI_WAIT_SCAN) += scsi_wait_scan.o drivers/scsi/scsi_wait_scan.c: * scsi_wait_scan.c
grep -r wlan_mt *
Hasilnya
drivers/misc/mediatek/conn_soc/drv_wlan/mt_wifi/wlan/Makefile:MODULE_NAME := wlan_mt drivers/misc/mediatek/combo/drv_wlan/mt6630/Makefile:MODULE_NAME := wlan_mt6630 drivers/misc/mediatek/combo/drv_wlan/mt6620/wlan/Makefile:MODULE_NAME := wlan_mt6620
cek pack
cd ~/mediatek/.git/objects/pack ls
Akan keluar dua file
pack-5e2cd1c8f09391c09a228f514449da0228f3a96f.idx pack-5e2cd1c8f09391c09a228f514449da0228f3a96f.pack
Check branch master
cd ~/mediatek/ git checkout master
Akan keluar
Already on 'master' Your branch is up-to-date with 'origin/master'.
Check HEAD
git rev-parse HEAD
Hasilnya
610ba0c10976208568a21fde3626ab847d484999
Siapkan folder baru mediatek-kernel
cd ~ git init mediatek-kernel
Hasilnya
Initialized empty Git repository in /home/onno/mediatek-kernel/.git/
Isi dengan .pack mediatek
cd ~ cp mediatek/.git/objects/pack/* mediatek-kernel/.git/objects/pack
Extract .pack
cd ~/mediatek-kernel git checkout -b master 610ba0c10976208568a21fde3626ab847d484999
Check hasil
cd ~/mediatek-kernel ls -lh
Coba Alternatif Cara Extract
Asumsi kernel mediatek hasil git ada di folder
~/mediatek/
Ujicoba membuka source code kernel
mkdir mediatek-kernel cd mediatek-kernel/ cp ~/mediatek/.git/objects/pack/pack-5e2cd1c8f09391c09a228f514449da0228f3a96f.* . cd ~ mv mediatek-kernel tmp-kernel mkdir mediatek-kernel
cd ~ git init mediatek-kernel
Initialized empty Git repository in /home/onno/mediatek-kernel/.git/
cd mediatek-kernel/ git unpack-objects < ~/tmp-kernel/pack-5e2cd1c8f09391c09a228f514449da0228f3a96f.pack
Unpacking objects: 100% (2472039/2472039), done.
Hasilnya
cd ~/mediatek-kernel/.git/objects ls
Keluar
00 08 10 18 20 28 30 38 40 48 50 58 60 68 70 78 80 88 90 98 a0 a8 b0 b8 c0 c8 d0 d8 e0 e8 f0 f8 info 01 09 11 19 21 29 31 39 41 49 51 59 61 69 71 79 81 89 91 99 a1 a9 b1 b9 c1 c9 d1 d9 e1 e9 f1 f9 pack 02 0a 12 1a 22 2a 32 3a 42 4a 52 5a 62 6a 72 7a 82 8a 92 9a a2 aa b2 ba c2 ca d2 da e2 ea f2 fa 03 0b 13 1b 23 2b 33 3b 43 4b 53 5b 63 6b 73 7b 83 8b 93 9b a3 ab b3 bb c3 cb d3 db e3 eb f3 fb 04 0c 14 1c 24 2c 34 3c 44 4c 54 5c 64 6c 74 7c 84 8c 94 9c a4 ac b4 bc c4 cc d4 dc e4 ec f4 fc 05 0d 15 1d 25 2d 35 3d 45 4d 55 5d 65 6d 75 7d 85 8d 95 9d a5 ad b5 bd c5 cd d5 dd e5 ed f5 fd 06 0e 16 1e 26 2e 36 3e 46 4e 56 5e 66 6e 76 7e 86 8e 96 9e a6 ae b6 be c6 ce d6 de e6 ee f6 fe 07 0f 17 1f 27 2f 37 3f 47 4f 57 5f 67 6f 77 7f 87 8f 97 9f a7 af b7 bf c7 cf d7 df e7 ef f7 ff
Tampaknya masih belum ada effek untuk source code kernel mediatek
Untuk menambahkan / update
git remote add -f origin https://android.googlesource.com/kernel/mediatek