[OpenWrt-Devel] u-boot/lantiq: gcc7 incompatibility: resets when trying to access network

Martin Schiller ms at dev.tdt.de
Mon Sep 24 07:14:54 EDT 2018


Hi,

I've got some problems with the lantiq uboot in combination with the 
(default) gcc 7.x compiler.

Setting "OPTFLAGS" in uboot's config.mk to "-O2" or the default "-Os" 
leads to the following behaviour:

The uboot compiles well, but when you try o access the ethernet network 
(ping/tftboot) the device do a RESET:

(tested on a Lantiq VRX268 v1.2)

----------------------------------------------------
....
VR2020 # ping 192.168.1.20
ltq_phy: addr 1, link 0, speed 10, duplex 0
ltq_phy: addr 17, link 0, speed 10, duplex 0
ltq_phy: addr 18, link 0, speed 10, duplex 0
ltq_phy: addr 19, link 1, speed 100, duplex 1
ltq_phy: addr 20, link 0, speed 10, duplex 0
Using ltq-eth device

ROM VER: 1.1.4
CFG 04
_�
ROM VER: 1.1.4
CFG 04
EEPROM Data OK
UART

----------------------------------------------------

doing the same with "OPTFLAGS" set to "-O1" everything works fine:

----------------------------------------------------
...
VR2020 # ping 192.168.1.20
ltq_phy: addr 1, link 0, speed 10, duplex 0
ltq_phy: addr 17, link 0, speed 10, duplex 0
ltq_phy: addr 18, link 0, speed 10, duplex 0
ltq_phy: addr 19, link 1, speed 100, duplex 1
ltq_phy: addr 20, link 0, speed 10, duplex 0
Using ltq-eth device
host 192.168.1.20 is alive
VR2020 #
----------------------------------------------------

When using gcc 6.x or 5.x, "OPTFLAGS=-Os" also works.

Any ideas how to get "OPTFLAGS=-Os" working again with gcc 7.x?

- Martin

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list