Index: head/sysutils/u-boot-cubox-hummingboard/Makefile =================================================================== --- head/sysutils/u-boot-cubox-hummingboard/Makefile (revision 393756) +++ head/sysutils/u-boot-cubox-hummingboard/Makefile (revision 393757) @@ -1,47 +1,51 @@ # $FreeBSD$ PORTNAME= u-boot PORTVERSION= 2013.10 +PORTREVISION= 1 CATEGORIES= sysutils PKGNAMESUFFIX= -cubox-hummingboard MAINTAINER= ian@FreeBSD.org COMMENT= Cross-build U-Boot loader for SolidRun Cubox LICENSE= GPLv2 -BUILD_DEPENDS= arm-none-eabi-gcc:${PORTSDIR}/devel/arm-none-eabi-gcc +BUILD_DEPENDS= ${CROSS_GCC}:${PORTSDIR}/devel/arm-none-eabi-gcc492 +CROSS_GCC= arm-none-eabi-gcc-4.9.2 + USE_GITHUB= yes GH_ACCOUNT= SolidRun GH_PROJECT= u-boot-imx6 GH_TAGNAME= e4bc4c3 NO_ARCH= yes USES= gmake SSP_UNSAFE= yes # cross-build static linking dies with -fstack-protector U_BOOT_DIR= share/u-boot/${PORTNAME}${PKGNAMESUFFIX} PLIST_DIRS= ${U_BOOT_DIR} share/u-boot PLIST_FILES= ${U_BOOT_DIR}/u-boot.imx \ ${U_BOOT_DIR}/README MAKE_ARGS+= ARCH=arm \ + CC=${CROSS_GCC} \ CROSS_COMPILE=arm-none-eabi- \ - HOSTCC=clang + HOSTCC=cc do-configure: cd ${WRKSRC}; ${GMAKE} ${MAKE_ARGS} mx6_cubox-i_config # The build results in two output files: SPL, and u-boot.img. # Combine them into a single u-boot.imx so that there is only one file to be # copied onto the boot media starting at a 1K offset on the disk. IMXFILE= ${STAGEDIR}/${PREFIX}/${U_BOOT_DIR}/u-boot.imx do-install: ${MKDIR} ${STAGEDIR}/${PREFIX}/${U_BOOT_DIR} dd bs=1k oseek=0 conv=sync of=${IMXFILE} if=${WRKSRC}/SPL dd bs=1k oseek=41 conv=sync of=${IMXFILE} if=${WRKSRC}/u-boot.img ${CP} ${.CURDIR}/pkg-descr ${STAGEDIR}/${PREFIX}/${U_BOOT_DIR}/README .include Index: head/sysutils/u-boot-cubox-hummingboard/files/patch-board_solidrun_mx6__cubox-i_mx6__cubox-i.c =================================================================== --- head/sysutils/u-boot-cubox-hummingboard/files/patch-board_solidrun_mx6__cubox-i_mx6__cubox-i.c (revision 393756) +++ head/sysutils/u-boot-cubox-hummingboard/files/patch-board_solidrun_mx6__cubox-i_mx6__cubox-i.c (revision 393757) @@ -1,51 +1,51 @@ --- board/solidrun/mx6_cubox-i/mx6_cubox-i.c.orig 2014-09-16 12:12:11 UTC +++ board/solidrun/mx6_cubox-i/mx6_cubox-i.c @@ -443,6 +443,7 @@ static void detect_board(void) hb_cuboxi_ = 1; config_sys_prompt = config_sys_prompt_hummingboard; } + } int board_early_init_f(void) @@ -498,15 +499,19 @@ int board_init(void) } static char const *board_type = "uninitialized"; -+static char const *fdt_board; ++static char const *fdt_board = "uninitialized"; int checkboard(void) { + if (hb_cuboxi_ == 0) { puts("Board: MX6-CuBox-i\n"); board_type = "mx6-cubox-i"; + fdt_board = "cubox-i"; } else { puts("Board: MX6-HummingBoard\n"); board_type = "mx6-hummingboard"; + fdt_board = "hummingboard"; } return 0; } @@ -521,10 +526,20 @@ static const struct boot_mode board_boot int board_late_init(void) { + const char *fdt_soc; int cpurev = get_cpu_rev(); setenv("cpu",get_imx_type((cpurev & 0xFF000) >> 12)); setenv("board",board_type); + if (((cpurev & 0xFF000) >> 12) == MXC_CPU_MX6Q) + fdt_soc = "imx6q"; + else + fdt_soc = "imx6dl"; + if (getenv("fdt_soc") == NULL) + setenv("fdt_soc", fdt_soc); + if (getenv("fdt_board") == NULL) + setenv("fdt_board", fdt_board); + #ifdef CONFIG_CMD_BMODE add_board_boot_modes(board_boot_modes); #endif