EvilZone
Programming and Scripting => C - C++ => : 11alphamale11 August 22, 2014, 06:42:24 PM
-
Im compiling the google play edition stock kernel for the htc one m8 varient. The kernel is 3.4.0-gb1b6fb1 for android 4.4.4. Im using Ubuntu 14.04.1 LTS. I believe the android kernel is written in C. Forgive if im wrong. I used the following command:
make -j2 ARCH=arm CROSS_COMPILE=/home/richard/Workspace/toolchains/arm-eabi-linaro-4.6.2/bin/arm-eabi-
LD drivers/video/built-in.o
LD drivers/built-in.o
LD vmlinux.o
MODPOST vmlinux.o
GEN .version
CHK include/generated/compile.h
UPD include/generated/compile.h
CC init/version.o
LD init/built-in.o
LD .tmp_vmlinux1
drivers/built-in.o: In function `dwc3_msm_probe':
/home/richard/Workspace/kernel1/drivers/usb/dwc3/dwc3-msm.c:2561: undefined reference to `rom_stockui'
make: *** [.tmp_vmlinux1] Error 1
How can I fix this? Im working on a project that is due in two days. Any help is appreciated! :)
-
"undefined reference to `rom_stockui'"
Did you declare it ?
We need source my man.
-
What kind of source should I provide?
-
The source of your instructions, the source of your build. The tutorial you are following, the sourceforge or git address you are pulling your toolchain and rom source files from.
Do you have a clue what you are doing? What are the circumstances surrounding your desperate attempts at getting someone to solve your work for you? At-least here you are getting responses.
Its kinda insulting when I go out to try and help you and the only google results are your same copied/pasted request. Have you tired hitting up irc?
http://webchat.freenode.net/?channels=android-dev
gedit /home/richard/Workspace/kernel1/drivers/usb/dwc3/dwc3-msm.c
goto line:2561
What does it say?
I dislike with a passion having to sign up for anything online. How many forums besides the ones posted below did you have to sign up today in order to increase your chances at getting your problem solved?
Is it me or do alot of people join this forum just to ask one question?
http://forum.xda-developers.com/htc-one-m8/help/tmpvmlinux1-error-ubuntu-kernel-t2855508
http://software.techassistbox.com/ubuntu-tmpvmlinux1-error-on-ubuntu-kernel-compilation_7528827.html
http://mobility.forumsee.com/a/m/s/p12-9666-0774173--tmp-vmlinux1-error-ubuntu.html
Please tell me your not trying to compile the kernel from an Ubuntu livecd.
-
Heres the kernel source: https://github.com/mrjaydee82/SinLessKerne1-m8-4.4.4 (https://github.com/mrjaydee82/SinLessKerne1-m8-4.4.4)
Im working with sinless rom google play edition with android 4.4.4: http://forum.xda-developers.com/showthread.php?t=2709397 (http://forum.xda-developers.com/showthread.php?t=2709397)
Thanks for responding though. Im not to knowledgeable in c language to effectively fix the errors myself. That is why Im asking for help.
Im using the linaro-arm-eabi-4.10-master toolchain within the kernel source provided: https://github.com/mrjaydee82/SinLessKerne1-m8-4.4.4/tree/master/toolchains/linaro-arm-eabi-4.10-master (https://github.com/mrjaydee82/SinLessKerne1-m8-4.4.4/tree/master/toolchains/linaro-arm-eabi-4.10-master)
Maybe there are other tools I havent downloaded? Im pretty sure Ive got all of them.
-
If you are already using the sinless kernel and already using the sinless rom, why are you trying to compile a different kernel?
Is this kernel your trying to compile?
http://forum.xda-developers.com/showthread.php?t=2706441
The error you see does not have anything to do with programming, its letting you know that you have a undefined reference to `rom_stockui' in /home/richard/Workspace/kernel1/drivers/usb/dwc3/dwc3-msm.c on line 2561
What you need to do is open that file and see what line 2561 says.
Or you could just wait for one of the legitimate android devs do it for you.
-
No. I JUST switched to the sinless kernel. Its giving me the same issue.
Heres a small section of the file dwc3-msm.c containing line 2561.
Heres the
extern int rom_stockui;
static int __devinit dwc3_msm_probe(struct platform_device *pdev)
{
struct device_node *node = pdev->dev.of_node;
struct dwc3_msm *mdwc;
struct resource *res;
void __iomem *tcsr;
unsigned long flags;
int ret = 0;
int len = 0;
u32 tmp[3];
htc_usb_disable = 0;
htc_vbus_backup = 0;
htc_id_backup = 1;
pr_info("%s: ++\n", __func__);
mdwc = devm_kzalloc(&pdev->dev, sizeof(*mdwc), GFP_KERNEL);
if (!mdwc) {
dev_err(&pdev->dev, "not enough memory\n");
return -ENOMEM;
}
platform_set_drvdata(pdev, mdwc);
context = mdwc;
mdwc->dev = &pdev->dev;
wake_lock_init(&mdwc->cable_detect_wlock, WAKE_LOCK_SUSPEND, "msm_usb_cable");
INIT_LIST_HEAD(&mdwc->req_complete_list);
INIT_DELAYED_WORK(&mdwc->chg_work, dwc3_chg_detect_work);
INIT_DELAYED_WORK(&mdwc->resume_work, dwc3_resume_work);
INIT_WORK(&mdwc->restart_usb_work, dwc3_restart_usb_work);
INIT_WORK(&mdwc->usb_block_reset_work, dwc3_block_reset_usb_work);
INIT_WORK(&mdwc->id_work, dwc3_id_work);
INIT_DELAYED_WORK(&mdwc->init_adc_work, dwc3_init_adc_work);
init_completion(&mdwc->ext_chg_wait);
ret = dwc3_msm_config_gdsc(mdwc, 1);
if (ret) {
dev_err(&pdev->dev, "unable to configure usb3 gdsc\n");
goto destroy_wlock;
}
mdwc->xo_clk = clk_get(&pdev->dev, "xo");
if (IS_ERR(mdwc->xo_clk)) {
dev_err(&pdev->dev, "%s unable to get TCXO buffer handle\n",
__func__);
ret = PTR_ERR(mdwc->xo_clk);
goto disable_dwc3_gdsc;
}
ret = clk_prepare_enable(mdwc->xo_clk);
if (ret) {
dev_err(&pdev->dev, "%s failed to vote for TCXO buffer%d\n",
__func__, ret);
goto put_xo;
}
mdwc->core_clk = devm_clk_get(&pdev->dev, "core_clk");
if (IS_ERR(mdwc->core_clk)) { ,<--------Line 2561
dev_err(&pdev->dev, "failed to get core_clk\n");
ret = PTR_ERR(mdwc->core_clk);
goto disable_xo;
Any ideas on where to go from here or how to define the reference to rom_stockui? lol I tried earlier with my minimal c knowledge and created way more problems haha
Im willing to pay if someone could solve this.
-
I would suggest emailing the developer of the kernel. I am pretty sure it should compile with-out issue if your environment is correct and your toolchain matches. You should try a more updated linaro toolchain. I would also suggest using Ubuntu 12.04 lts x64. (has to be 64)
Try reviewing the posts below. Binkybear has developed quite a few android kernels.
http://w11.zetaboards.com/Pwnie_Express/single/?p=8262814&t=9369003
http://binkybear.wordpress.com/2013/07/16/building-a-kernel/
-
"extern int rom_stockui"
extern : mean this value is accessible from every module and come from another module.
This mean you probably haven't the correct config in the kernel or you hadn't download all needed files.
But if i look the code you can probably delete this extern call because it's not use inside the module :)