Modify

Opened 3 years ago

Last modified 3 years ago

#18340 new defect

Compilling BB 14.07 for Lantiq xway stops with error

Reported by: sailer.aleks@… Owned by: developers
Priority: normal Milestone: Barrier Breaker 14.07
Component: kernel Version: Barrier Breaker 14.07
Keywords: lantiq vpe undefined reference Cc:

Description

Two weeks ago or so I had to reload source of BB. Since that time this problem have been occuring:

 CC      init/version.o
  LD      init/built-in.o
arch/mips/built-in.o:/home/alex/barrier_breaker/build_dir/target-mips_34kc+dsp_uClibc-0.9.33.2/linux-lantiq_xway/linux-3.10.49/arch/mips/lantiq/softdog_vpe.c:75: undefined reference to `vpe1_wdog_ctr'
arch/mips/built-in.o:/home/alex/barrier_breaker/build_dir/target-mips_34kc+dsp_uClibc-0.9.33.2/linux-lantiq_xway/linux-3.10.49/arch/mips/lantiq/softdog_vpe.c:75: undefined reference to `vpe1_wdog_ctr'
arch/mips/built-in.o: In function `keep_alive_vpe0':
/home/alex/barrier_breaker/build_dir/target-mips_34kc+dsp_uClibc-0.9.33.2/linux-lantiq_xway/linux-3.10.49/arch/mips/lantiq/softdog_vpe.c:69: undefined reference to `vpe1_wdog_timeout'
/home/alex/barrier_breaker/build_dir/target-mips_34kc+dsp_uClibc-0.9.33.2/linux-lantiq_xway/linux-3.10.49/arch/mips/lantiq/softdog_vpe.c:69: undefined reference to `vpe1_wdog_timeout'
arch/mips/built-in.o:/home/alex/barrier_breaker/build_dir/target-mips_34kc+dsp_uClibc-0.9.33.2/linux-lantiq_xway/linux-3.10.49/arch/mips/lantiq/softdog_vpe.c:47: undefined reference to `vpe1_wdog_ctr'
arch/mips/built-in.o:/home/alex/barrier_breaker/build_dir/target-mips_34kc+dsp_uClibc-0.9.33.2/linux-lantiq_xway/linux-3.10.49/arch/mips/lantiq/softdog_vpe.c:47: undefined reference to `vpe1_wdog_ctr'
arch/mips/built-in.o: In function `keep_alive_vpe0':
/home/alex/barrier_breaker/build_dir/target-mips_34kc+dsp_uClibc-0.9.33.2/linux-lantiq_xway/linux-3.10.49/arch/mips/lantiq/softdog_vpe.c:69: undefined reference to `vpe1_wdog_timeout'
/home/alex/barrier_breaker/build_dir/target-mips_34kc+dsp_uClibc-0.9.33.2/linux-lantiq_xway/linux-3.10.49/arch/mips/lantiq/softdog_vpe.c:69: undefined reference to `vpe1_wdog_timeout'
make[5]: *** [vmlinux] Error 1
make[5]: Leaving directory `/home/alex/barrier_breaker/build_dir/target-mips_34kc+dsp_uClibc-0.9.33.2/linux-lantiq_xway/linux-3.10.49'
make[4]: *** [/home/alex/barrier_breaker/build_dir/target-mips_34kc+dsp_uClibc-0.9.33.2/linux-lantiq_xway/linux-3.10.49/.image] Error 2
make[4]: Leaving directory `/home/alex/barrier_breaker/target/linux/lantiq'
make[3]: *** [install] Error 2
make[3]: Leaving directory `/home/alex/barrier_breaker/target/linux'
make[2]: *** [target/linux/install] Error 2
make[2]: Leaving directory `/home/alex/barrier_breaker'
make[1]: *** [/home/alex/barrier_breaker/staging_dir/target-mips_34kc+dsp_uClibc-0.9.33.2/stamp/.target_install] Error 2
make[1]: Leaving directory `/home/alex/barrier_breaker'
make: *** [world] Error 2

Attachments (1)

0153-lantiq-VPE-softdog.patch (5.2 KB) - added by anonymous 3 years ago.
Modified version of "0153-lantiq-VPE-softdog.patch"

Download all attachments as: .zip

Change History (9)

comment:1 Changed 3 years ago by anonymous

As a workaround downloaded r42763 I used before. Everything is OK.

comment:2 Changed 3 years ago by anonymous

I think I figured out, what the actual problem is about this:

The patch "target/linux/lantiq/patches-3.10/0153-lantiq-VPE-softdog.patch" unconditionally adds "softdog_vpe.o" to the object files to be built. However when you have a look at the related sources (softdog_vpe.c) you can see that the symbols mentioned in the linker's error message are used there (i.e. "vpe1_wdog_ctr" and "vpe1_wdog_timeout").

The problem is that the object file containing these references is included in the built depending on the configuration variable "CONFIG_MIPS_VPE_LOADER". So if that variable is not set, "vpe.o" will not be built and the references are not available to the linker.

Since "softdog_vpe.o" is built nevertheless, this causes the linker error because it depends on these references.

My solution was to simply adjust the "0153-lantiq-VPE-softdog.patch" also building "softdog_vpe.o" depending on "CONFIG_MIPS_VPE_LOADER", i.e. something like this:

obj-y := irq.o clk.o prom.o

obj-$(CONFIG_MIPS_VPE_LOADER) += softdog_vpe.o

Changed 3 years ago by anonymous

Modified version of "0153-lantiq-VPE-softdog.patch"

comment:3 Changed 3 years ago by anonymous

Thank you for quick response.
Your fix works fine.

comment:4 Changed 3 years ago by jernej@…

CCing.

comment:5 Changed 3 years ago by corsarangelo@…

Hi,
I still have the issue...

Compiling highlighting:

arch/mips/built-in.o:/home/angelo/Software/openwrt/barrier_breaker/build_dir/target-mips_34kc+dsp_uClibc-0.9.33.2/linux-lantiq_xway/linux-3.10.49/arch/mips/lantiq/softdog_vpe.c:75: undefined reference to `vpe1_wdog_ctr'
arch/mips/built-in.o:/home/angelo/Software/openwrt/barrier_breaker/build_dir/target-mips_34kc+dsp_uClibc-0.9.33.2/linux-lantiq_xway/linux-3.10.49/arch/mips/lantiq/softdog_vpe.c:75: undefined reference to `vpe1_wdog_ctr'
arch/mips/built-in.o: In function `keep_alive_vpe0':
/home/angelo/Software/openwrt/barrier_breaker/build_dir/target-mips_34kc+dsp_uClibc-0.9.33.2/linux-lantiq_xway/linux-3.10.49/arch/mips/lantiq/softdog_vpe.c:69: undefined reference to `vpe1_wdog_timeout'

and I don't how fix it.
I put inside
/home/angelo/Software/openwrt/barrier_breaker/target/linux/lantiq/patches-3.10
the file 0153-lantiq-VPE-softdog.patch
from this thread but without any luck.

Can someone help me ?

comment:6 Changed 3 years ago by anonymous

Hi,
I solved my issue... I messed up the original Makefile and the patch cannot be applied :)
Now I can compile all the firmware.

comment:7 Changed 3 years ago by fernando.arconada@…

Can you explain the proccess to solve it? I'm in the same point

comment:8 Changed 3 years ago by anonymous

Your Makefile should look like this:

# Copyright (C) 2010 John Crispin <blogic@openwrt.org>
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 as published
# by the Free Software Foundation.

obj-y := irq.o clk.o prom.o

obj-$(CONFIG_MIPS_VPE_LOADER) += softdog_vpe.o
obj-$(CONFIG_EARLY_PRINTK) += early_printk.o

obj-$(CONFIG_SOC_TYPE_XWAY) += xway/
obj-$(CONFIG_SOC_FALCON) += falcon/

If you previously applied the "wrong" patch, the attachment in this ticket won't work

Daniele

Add Comment

Modify Ticket

Action
as new .
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.