Index: head/sysutils/u-boot-beaglebone/Makefile =================================================================== --- head/sysutils/u-boot-beaglebone/Makefile (revision 375241) +++ head/sysutils/u-boot-beaglebone/Makefile (revision 375242) @@ -1,39 +1,39 @@ # $FreeBSD$ PORTNAME= u-boot PORTVERSION= 2014.10 CATEGORIES= sysutils MASTER_SITES= ftp://ftp.denx.de/pub/u-boot/ PKGNAMESUFFIX= -beaglebone MAINTAINER= ian@FreeBSD.org COMMENT= Cross-build U-Boot loader for BeagleBone and BeagleBone Black LICENSE= GPLv2 BUILD_DEPENDS= arm-none-eabi-gcc:${PORTSDIR}/devel/arm-none-eabi-gcc NO_ARCH= yes WRKSRC= ${WRKDIR}/u-boot-${PORTVERSION} USES= gmake tar:bzip2 SSP_UNSAFE= yes # cross-LD does not support -fstack-protector U_BOOT_DIR= share/u-boot/${PORTNAME}${PKGNAMESUFFIX} -PLIST_FILES= ${U_BOOT_DIR}/bb-uboot.img \ +PLIST_FILES= ${U_BOOT_DIR}/u-boot.img \ ${U_BOOT_DIR}/MLO \ ${U_BOOT_DIR}/README MAKE_ARGS+= ARCH=arm \ CROSS_COMPILE=arm-none-eabi- do-configure: - (cd ${WRKSRC}; ${GMAKE} am335x_evm_config) + (cd ${WRKSRC}; ${GMAKE} am335x_boneblack_defconfig) do-install: ${MKDIR} ${STAGEDIR}/${PREFIX}/${U_BOOT_DIR} ${CP} ${WRKSRC}/MLO ${STAGEDIR}/${PREFIX}/${U_BOOT_DIR} - ${CP} ${WRKSRC}/u-boot.img ${STAGEDIR}/${PREFIX}/${U_BOOT_DIR}/bb-uboot.img + ${CP} ${WRKSRC}/u-boot.img ${STAGEDIR}/${PREFIX}/${U_BOOT_DIR}/u-boot.img ${CP} ${.CURDIR}/pkg-descr ${STAGEDIR}/${PREFIX}/${U_BOOT_DIR}/README .include Index: head/sysutils/u-boot-beaglebone/files/patch-include_configs_am335x__evm.h =================================================================== --- head/sysutils/u-boot-beaglebone/files/patch-include_configs_am335x__evm.h (revision 375241) +++ head/sysutils/u-boot-beaglebone/files/patch-include_configs_am335x__evm.h (revision 375242) @@ -1,85 +1,79 @@ --- include/configs/am335x_evm.h.orig 2014-10-14 08:47:15 UTC +++ include/configs/am335x_evm.h -@@ -479,4 +479,82 @@ +@@ -479,4 +479,76 @@ #endif #endif /* NOR support */ +/***************************************************************************** + * FreeBSD customizations from here down. + ****************************************************************************/ + -+/* No watchdog. (Why?) */ -+#undef CONFIG_HW_WATCHDOG -+#undef CONFIG_OMAP_WATCHDOG -+#undef CONFIG_SPL_WATCHDOG_SUPPORT -+ +/* Add the API and ELF features needed for ubldr. */ +#ifndef CONFIG_SPL_BUILD +#define CONFIG_API +#define CONFIG_CMD_ELF +#define CONFIG_CMD_ENV_EXISTS +#define CONFIG_EFI_PARTITION -+#define CONFIG_PREBOOT +#define CONFIG_SYS_MMC_MAX_DEVICE 2 +#endif + -+/* SPL loads bb-uboot.img. */ -+#ifdef CONFIG_SPL_BUILD -+#undef CONFIG_SPL_FAT_LOAD_PAYLOAD_NAME -+#define CONFIG_SPL_FAT_LOAD_PAYLOAD_NAME "bb-uboot.img" -+#endif -+ +/* Save the env to the fat partition. */ +#ifndef CONFIG_SPL_BUILD +#undef CONFIG_ENV_IS_NOWHERE +#undef CONFIG_ENV_IS_IN_NAND ++#undef CONFIG_ENV_IS_IN_MMC +#define CONFIG_ENV_IS_IN_FAT +#define CONFIG_FAT_WRITE +#define FAT_ENV_INTERFACE "mmc" +#define FAT_ENV_DEVICE_AND_PART "0" -+#define FAT_ENV_FILE "uboot.env" ++#define FAT_ENV_FILE "u-boot.env" +#endif + +/* Create a small(ish) boot environment for FreeBSD. */ +#ifndef CONFIG_SPL_BUILD +#undef CONFIG_EXTRA_ENV_SETTINGS +#define CONFIG_EXTRA_ENV_SETTINGS \ -+ "bootfile=bbubldr\0" \ -+ "fdt_file=undefined\0" \ -+ "fatdev=mmc 0:1\0" \ -+ "loadaddr=0x88000000\0" \ -+ "loaderdev=disk\0" \ -+ "uenv_file=bb-uEnv.txt\0" \ -+ \ -+ "fatboot=" \ -+ "env exists user_fatboot && run user_fatboot; " \ ++ "loadaddr=88000000\0" \ ++ "Fatboot=" \ ++ "env exists loaderdev || env set loaderdev ${fatdev}; " \ ++ "env exists UserFatboot && run UserFatboot; " \ ++ "echo Booting from: ${fatdev} ${bootfile}; " \ + "fatload ${fatdev} ${loadaddr} ${bootfile} && bootelf; " \ + "\0" \ -+ "netboot=" \ -+ "env exists user_netboot && run user_netboot; " \ ++ "Netboot=" \ ++ "env exists loaderdev || env set loaderdev net; " \ ++ "env exists UserNetboot && run UserNetboot; " \ + "dhcp ${loadaddr} ${bootfile} && bootelf; " \ + "\0" \ -+ "preboot=" \ -+ "env exists setfdt && run setfdt; " \ -+ "env exists uenv_import && run uenv_import; " \ -+ "env exists user_preboot && run user_preboot; " \ ++ "Preboot=" \ ++ "env exists bootfile || bootfile=ubldr; " \ ++ "env exists uenv_file || uenv_file=uEnv.txt; " \ ++ "env exists SetupFdtfile && run SetupFdtfile; " \ ++ "env exists SetupFatdev && run SetupFatdev; " \ ++ "env exists SetupUenv && run SetupUenv; " \ ++ "env exists UserPreboot && run UserPreboot; " \ + "\0" \ -+ "setfdt=" \ ++ "SetupFdtfile=" \ + "if test ${board_name} = A335BONE; then " \ -+ "env set fdt_file bbone.dtb; " \ ++ "env set fdt_file beaglebone.dtb; " \ + "elif test ${board_name} = A335BNLT; then " \ -+ "env set fdt_file bboneblk.dtb; " \ -+ "else " \ -+ "echo WARNING: Could not determine device tree to use; " \ ++ "env set fdt_file beaglebone-black.dtb; " \ + "fi; " \ + "\0" \ -+ "uenv_import=" \ ++ "SetupFatdev=" \ ++ "env exists fatdev || " \ ++ "fatsize ${fatdev:=mmc 0} ${bootfile} || " \ ++ "fatdev='mmc 1'; " \ ++ "\0" \ ++ "SetupUenv=" \ + "fatload ${fatdev} ${loadaddr} ${uenv_file} && " \ + "env import -t ${loadaddr} ${filesize}; " \ + "\0" + +#undef CONFIG_BOOTCOMMAND -+#define CONFIG_BOOTCOMMAND "run fatboot" ++#define CONFIG_BOOTCOMMAND "run Fatboot" ++#undef CONFIG_PREBOOT ++#define CONFIG_PREBOOT "run Preboot" +#endif + #endif /* ! __CONFIG_AM335X_EVM_H */