Port-mips archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
NetBSD 9.0 failed to build kernel for kernel=LINKITSMART7688
L.S.
Trying to build NetBSD v9 for the LINKITSMART (with MIPS MT7688 processer)
I was stopped by an compiler error
nice ./build.sh -m evbmips -a mipsel -O ../obj-evbmips/ -T
../tools-evbmips/ -U -r -j 3 tools kernel=LINKITSMART7688 release
--- ralink_gpio.o ---
/k/base/bld/netbsd-9/src/sys/arch/mips/ralink/ralink_gpio.c: In
function 'ra_gpio_toggle_LED.part.7':
/k/base/bld/netbsd-9/src/sys/arch/mips/ralink/ralink_gpio.c:1591:34:
error: array subscript is above array bounds [-Werror=array-bounds]
ra_gpio_pin_write(sc, led_array1[led_index++], 0);
~~~~~~~~~~^~~~~~~~~~~~~
--- ralink_intr.o ---
# compile LINKITSMART7688/ralink_intr.o
/k/base/bld/netbsd-9/src/../tools-evbmips/bin/mipsel--netbsd-gcc -G 0
-mno-abicalls -msoft-float -ffixed-24 -ffreestanding
-fno-zero-initialized-in-bss -fno-delete-null-pointer-checks -O2
-fno-strict-aliasing -fno-common -std=gnu99 -Werror -Wall -Wno-main
-Wno-format-zero-length -Wpointer-arith -Wmissing-prototypes
-Wstrict-prototypes -Wold-style-definition -Wswitch -Wshadow
-Wcast-qual -Wwrite-strings -Wno-unreachable-code -Wno-pointer-sign
-Wno-attributes -Wno-sign-compare -march=mips32r2
--sysroot=/k/base/bld/netbsd-9/src/../obj-evbmips/destdir.evbmips
-Devbmips -I. -I/k/base/bld/netbsd-9/src/sys/external/bsd/libnv/dist
-I/k/base/bld/netbsd-9/src/sys/../common/lib/libx86emu
-I/k/base/bld/netbsd-9/src/sys/../common/lib/libc/misc
-I/k/base/bld/netbsd-9/src/sys/../common/include
-I/k/base/bld/netbsd-9/src/sys/arch -I/k/base/bld/netbsd-9/src/sys
-nostdinc -DCOMPAT_UTILS -DMIPS3_ENABLE_CLOCK_INTR -DMIPS32R2
-DCOM_REGMAP -DRALINK_CONSOLE_EARLY -DRALINK_CONADDR=RA_UART2_BASE
-DCONSPEED=57600 -DDIAGNOSTIC -DCOMPAT_44
-DRALINK_ETH_MACADDR=00:00:aa:bb:cc:dd -D_KERNEL -D_KERNEL_OPT
-std=gnu99 -I/k/base/bld/netbsd-9/src/sys/lib/libkern/../../../common/lib/libc/quad
-I/k/base/bld/netbsd-9/src/sys/lib/libkern/../../../common/lib/libc/string
-I/k/base/bld/netbsd-9/src/sys/lib/libkern/../../../common/lib/libc/arch/mips/string
-I/k/base/bld/netbsd-9/src/sys/external/bsd/libnv/dist -c
/k/base/bld/netbsd-9/src/sys/arch/mips/ralink/ralink_intr.c -o
ralink_intr.o
--- ralink_gpio.o ---
cc1: all warnings being treated as errors
*** [ralink_gpio.o] Error code 1
nbmake: stopped in
/k/base/bld/netbsd-9/obj-evbmips/sys/arch/evbmips/compile/LINKITSMART7688
1 error
nbmake: stopped in
/k/base/bld/netbsd-9/obj-evbmips/sys/arch/evbmips/compile/LINKITSMART7688
ERROR: Failed to make all in
"/k/base/bld/netbsd-9/src/../obj-evbmips/sys/arch/evbmips/compile/LINKITSMART7688"
*** BUILD ABORTED ***
Using below fix (without validating if it functions correctly) I
managed to finish the build
successfully:
netbsd-9/src/sys/arch/mips/ralink$ cvs diff
Index: ralink_gpio.c
===================================================================
RCS file: /cvsroot/src/sys/arch/mips/ralink/ralink_gpio.c,v
retrieving revision 1.7
diff -u -p -r1.7 ralink_gpio.c
--- ralink_gpio.c 3 Jun 2019 06:04:20 -0000 1.7
+++ ralink_gpio.c 10 Mar 2020 10:41:28 -0000
@@ -1588,8 +1588,10 @@ ra_gpio_toggle_LED(void *arg)
}
/* Light next LED */
- ra_gpio_pin_write(sc, led_array1[led_index++], 0);
-
+ led_index++;
+ if (led_index < (sizeof(led_array1))) {
+ ra_gpio_pin_write(sc, led_array1[led_index], 0);
+ }
#if 0
if (led_index == 4) {
led_timing_hack = 1;
Does this help / can some of the more expert NetBSD developers pick this up?
--
Ciao, Eric Koorn
Home |
Main Index |
Thread Index |
Old Index