Skip to content

Commit

Permalink
Merge branch '2019-04-03-master-imports'
Browse files Browse the repository at this point in the history
- Important Khadas VIM2 fix
- Build fix for macOS Mojave
- Build fix for gcc-4.7 for host tools.
  • Loading branch information
trini committed Apr 3, 2019
2 parents 7252274 + d7edeba commit 05fa129
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 3 deletions.
7 changes: 7 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,9 @@ DARWIN_MINOR_VERSION = $(shell sw_vers -productVersion | cut -f 2 -d '.')
os_x_before = $(shell if [ $(DARWIN_MAJOR_VERSION) -le $(1) -a \
$(DARWIN_MINOR_VERSION) -le $(2) ] ; then echo "$(3)"; else echo "$(4)"; fi ;)

os_x_after = $(shell if [ $(DARWIN_MAJOR_VERSION) -ge $(1) -a \
$(DARWIN_MINOR_VERSION) -ge $(2) ] ; then echo "$(3)"; else echo "$(4)"; fi ;)

# Snow Leopards build environment has no longer restrictions as described above
HOSTCC = $(call os_x_before, 10, 5, "cc", "gcc")
HOSTCFLAGS += $(call os_x_before, 10, 4, "-traditional-cpp")
Expand All @@ -300,6 +303,10 @@ HOSTLDFLAGS += $(call os_x_before, 10, 5, "-multiply_defined suppress")
# in some host tools which is a problem then ... so disable ASLR for these
# tools
HOSTLDFLAGS += $(call os_x_before, 10, 7, "", "-Xlinker -no_pie")

# macOS Mojave (10.14.X)
# Undefined symbols for architecture x86_64: "_PyArg_ParseTuple"
HOSTLDFLAGS += $(call os_x_after, 10, 14, "-lpython -dynamclib", "")
endif

# Decide whether to build built-in, modular, or both.
Expand Down
3 changes: 3 additions & 0 deletions configs/khadas-vim2_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@ CONFIG_DEBUG_UART_BASE=0xc81004c0
CONFIG_DEBUG_UART_CLOCK=24000000
CONFIG_IDENT_STRING=" khadas-vim2"
CONFIG_DEBUG_UART=y
CONFIG_NR_DRAM_BANKS=1
CONFIG_OF_BOARD_SETUP=y
CONFIG_CONSOLE_MUX=y
CONFIG_MISC_INIT_R=y
# CONFIG_DISPLAY_CPUINFO is not set
# CONFIG_DISPLAY_BOARDINFO is not set
# CONFIG_CMD_BDI is not set
Expand All @@ -30,6 +32,7 @@ CONFIG_MTD=y
CONFIG_DM_ETH=y
CONFIG_ETH_DESIGNWARE=y
CONFIG_PHY=y
CONFIG_MESON_GXL_USB_PHY=y
CONFIG_PINCTRL=y
CONFIG_PINCTRL_MESON_GXL=y
CONFIG_DM_REGULATOR_FIXED=y
Expand Down
2 changes: 1 addition & 1 deletion drivers/phy/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ config PHY_STM32_USBPHYC

config MESON_GXL_USB_PHY
bool "Amlogic Meson GXL USB PHYs"
depends on PHY && ARCH_MESON && MESON_GXL
depends on PHY && ARCH_MESON && (MESON_GXL || MESON_GXM)
imply REGMAP
help
This is the generic phy driver for the Amlogic Meson GXL
Expand Down
9 changes: 8 additions & 1 deletion lib/bch.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@
#include <errno.h>
#if defined(__FreeBSD__)
#include <sys/endian.h>
#elif defined(__APPLE__)
#include <machine/endian.h>
#include <libkern/OSByteOrder.h>
#else
#include <endian.h>
#endif
Expand All @@ -70,7 +73,11 @@
#include <string.h>

#undef cpu_to_be32
#if defined(__APPLE__)
#define cpu_to_be32 OSSwapHostToBigInt32
#else
#define cpu_to_be32 htobe32
#endif
#define DIV_ROUND_UP(n,d) (((n) + (d) - 1) / (d))
#define kmalloc(size, flags) malloc(size)
#define kzalloc(size, flags) calloc(1, size)
Expand Down Expand Up @@ -116,7 +123,7 @@ struct gf_poly_deg1 {
};

#ifdef USE_HOSTCC
#if !defined(__DragonFly__) && !defined(__FreeBSD__)
#if !defined(__DragonFly__) && !defined(__FreeBSD__) && !defined(__APPLE__)
static int fls(int x)
{
int r = 32;
Expand Down
3 changes: 2 additions & 1 deletion tools/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,8 @@ HOST_EXTRACFLAGS += -include $(srctree)/include/compiler.h \
-I$(srctree)/tools \
-DUSE_HOSTCC \
-D__KERNEL_STRICT_NAMES \
-D_GNU_SOURCE
-D_GNU_SOURCE \
-std=gnu99

__build: $(LOGO-y)

Expand Down

0 comments on commit 05fa129

Please sign in to comment.