diff options
author | sgalabov <sgalabov@FreeBSD.org> | 2016-02-29 07:27:49 +0000 |
---|---|---|
committer | sgalabov <sgalabov@FreeBSD.org> | 2016-02-29 07:27:49 +0000 |
commit | ac10683bf2d5a35b0658d48d697ccb24e84ad119 (patch) | |
tree | 6d56406f4f66342b70a3b5bc3b747d44a15ed30c /sys/boot/common | |
parent | 8b886cf3a72e7ac9a7a9b625f43e0deb76ed2952 (diff) | |
download | FreeBSD-src-ac10683bf2d5a35b0658d48d697ccb24e84ad119.zip FreeBSD-src-ac10683bf2d5a35b0658d48d697ccb24e84ad119.tar.gz |
These changes attempt to put things in order before the introduction of MIPS
ubldr.
The changes are mostly dealing with removing unnecessary casts from the U-Boot
API (we're passing only pointers, no obvious reason to cast them to uint32_t),
cleaning up some compiler warnings and using the proper printf format
specifiers in order to be able to compile cleanly for both 32-bit and 64-bit
MIPS targets.
Reviewed by: imp
Approved by: adrian (mentor)
Sponsored by: Smartcom - Bulgaria AD
Differential Revision: https://reviews.freebsd.org/D5312
Diffstat (limited to 'sys/boot/common')
-rw-r--r-- | sys/boot/common/Makefile.inc | 2 | ||||
-rw-r--r-- | sys/boot/common/dev_net.c | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/sys/boot/common/Makefile.inc b/sys/boot/common/Makefile.inc index d647fe3..bce0eb5 100644 --- a/sys/boot/common/Makefile.inc +++ b/sys/boot/common/Makefile.inc @@ -20,6 +20,8 @@ SRCS+= load_elf64.c reloc_elf64.c SRCS+= load_elf64.c reloc_elf64.c .elif ${MACHINE_ARCH} == "mips64" || ${MACHINE_ARCH} == "mips64el" SRCS+= load_elf64.c reloc_elf64.c +.elif ${MACHINE_ARCH} == "mips" || ${MACHINE_ARCH} == "mipsel" +SRCS+= load_elf32.c reloc_elf32.c .endif .if defined(LOADER_NET_SUPPORT) diff --git a/sys/boot/common/dev_net.c b/sys/boot/common/dev_net.c index 091ed02..58958e5 100644 --- a/sys/boot/common/dev_net.c +++ b/sys/boot/common/dev_net.c @@ -164,8 +164,7 @@ net_open(struct open_file *f, ...) * info from bootp or other sources. */ d = socktodesc(netdev_sock); - sprintf(temp, "%6D", d->myea, ":"); - setenv("boot.netif.hwaddr", temp, 1); + setenv("boot.netif.hwaddr", ether_sprintf(d->myea), 1); setenv("boot.netif.ip", inet_ntoa(myip), 1); setenv("boot.netif.netmask", intoa(netmask), 1); setenv("boot.netif.gateway", inet_ntoa(gateip), 1); |