* [DistroKit] [PATCH] plaform-v7a: barebox v2018.05.0 → v2018.11.0 @ 2018-12-05 7:55 Rouven Czerwinski 2018-12-05 13:15 ` Roland Hieber 2018-12-06 14:39 ` [DistroKit] [PATCH v2] " Rouven Czerwinski 0 siblings, 2 replies; 7+ messages in thread From: Rouven Czerwinski @ 2018-12-05 7:55 UTC (permalink / raw) To: distrokit; +Cc: Rouven Czerwinski, Rouven Czerwinski Drop the beaglebone patch, it will be resurrected in a distrokit-deployment layer. We also add the patch series for the rpi3 to barebox, it can be dropped in the next release. Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de> --- .../platform-v7a/barebox-am335x-mlo.config | 22 +- configs/platform-v7a/barebox-am335x.config | 24 +- configs/platform-v7a/barebox-mx6.config | 32 +- configs/platform-v7a/barebox-rpi2.config | 23 +- .../barebox-rpi3-defaultenv/boot/9p | 10 + .../barebox-rpi3-defaultenv/init/bootsource | 13 + .../nv/linux.bootargs.loglevel | 1 + configs/platform-v7a/barebox-rpi3.config | 600 ++++++++++++++++++ configs/platform-v7a/barebox-vexpress.config | 23 +- ...ne-add-state-entry-for-mmc0-and-mmc1.patch | 35 - ...ease-pengutronix-multi_v7-20180515-1.patch | 22 - .../patches/barebox-2018.05.0/series | 15 - ...ort-opcode-helpers-from-Linux-kernel.patch | 299 +++++++++ ...tch-from-HYP-to-SVC-mode-if-required.patch | 88 +++ ...-monitor-code-to-be-built-without-PS.patch | 37 ++ ...-add-file-for-HYP-mode-related-setup.patch | 193 ++++++ ...-install-secure-monitor-when-entered.patch | 30 + ...tarting-kernel-in-HYP-mode-when-ente.patch | 31 + ...HYP-vectors-at-PBL-and-Barebox-entry.patch | 105 +++ ...sion-IDs-for-Pi-3-Model-B-and-Pi-Zer.patch | 41 ++ ...9-ARM-rpi-add-raspberry-pi-3-support.patch | 141 ++++ .../0010-ARM-rpi-autosize-malloc-area.patch | 25 + ...RM-imx-add-support-for-Udoo-Neo-full.patch | 26 +- ...lease-pengutronix_multiv7-20181122-1.patch | 22 + .../patches/barebox-2018.11.0/series | 24 + configs/platform-v7a/platformconfig | 2 + .../rules/barebox-am335x-mlo.make | 4 +- .../platform-v7a/rules/barebox-am335x.make | 4 +- configs/platform-v7a/rules/barebox-mx6.make | 4 +- configs/platform-v7a/rules/barebox-rpi2.make | 4 +- configs/platform-v7a/rules/barebox-rpi3.make | 104 +++ .../platform-v7a/rules/barebox-vexpress.make | 4 +- 32 files changed, 1905 insertions(+), 103 deletions(-) create mode 100644 configs/platform-v7a/barebox-rpi3-defaultenv/boot/9p create mode 100644 configs/platform-v7a/barebox-rpi3-defaultenv/init/bootsource create mode 100644 configs/platform-v7a/barebox-rpi3-defaultenv/nv/linux.bootargs.loglevel create mode 100644 configs/platform-v7a/barebox-rpi3.config delete mode 100644 configs/platform-v7a/patches/barebox-2018.05.0/0001-beaglebone-add-state-entry-for-mmc0-and-mmc1.patch delete mode 100644 configs/platform-v7a/patches/barebox-2018.05.0/0201-Release-pengutronix-multi_v7-20180515-1.patch delete mode 100644 configs/platform-v7a/patches/barebox-2018.05.0/series create mode 100644 configs/platform-v7a/patches/barebox-2018.11.0/0001-ARM-import-opcode-helpers-from-Linux-kernel.patch create mode 100644 configs/platform-v7a/patches/barebox-2018.11.0/0002-ARM-safely-switch-from-HYP-to-SVC-mode-if-required.patch create mode 100644 configs/platform-v7a/patches/barebox-2018.11.0/0003-ARM-allow-secure-monitor-code-to-be-built-without-PS.patch create mode 100644 configs/platform-v7a/patches/barebox-2018.11.0/0004-ARM-add-file-for-HYP-mode-related-setup.patch create mode 100644 configs/platform-v7a/patches/barebox-2018.11.0/0005-ARM-don-t-try-to-install-secure-monitor-when-entered.patch create mode 100644 configs/platform-v7a/patches/barebox-2018.11.0/0006-ARM-default-to-starting-kernel-in-HYP-mode-when-ente.patch create mode 100644 configs/platform-v7a/patches/barebox-2018.11.0/0007-ARM-install-HYP-vectors-at-PBL-and-Barebox-entry.patch create mode 100644 configs/platform-v7a/patches/barebox-2018.11.0/0008-ARM-rpi-add-revision-IDs-for-Pi-3-Model-B-and-Pi-Zer.patch create mode 100644 configs/platform-v7a/patches/barebox-2018.11.0/0009-ARM-rpi-add-raspberry-pi-3-support.patch create mode 100644 configs/platform-v7a/patches/barebox-2018.11.0/0010-ARM-rpi-autosize-malloc-area.patch rename configs/platform-v7a/patches/{barebox-2018.05.0 => barebox-2018.11.0}/0101-ARM-imx-add-support-for-Udoo-Neo-full.patch (93%) create mode 100644 configs/platform-v7a/patches/barebox-2018.11.0/0201-Release-pengutronix_multiv7-20181122-1.patch create mode 100644 configs/platform-v7a/patches/barebox-2018.11.0/series create mode 100644 configs/platform-v7a/rules/barebox-rpi3.make diff --git a/configs/platform-v7a/barebox-am335x-mlo.config b/configs/platform-v7a/barebox-am335x-mlo.config index 6cebecd..90adc2c 100644 --- a/configs/platform-v7a/barebox-am335x-mlo.config +++ b/configs/platform-v7a/barebox-am335x-mlo.config @@ -1,6 +1,6 @@ # # Automatically generated file; DO NOT EDIT. -# Barebox/arm 2018.05.0-20180515-1 Configuration +# Barebox/arm 2018.11.0-20181122-1 Configuration # CONFIG_ARM=y CONFIG_ARM_USE_COMPRESSED_DTB=y @@ -185,6 +185,7 @@ CONFIG_OF_GPIO=y # # serial drivers # +# CONFIG_SERIAL_DEV_BUS is not set # CONFIG_DRIVER_SERIAL_ARM_DCC is not set CONFIG_DRIVER_SERIAL_NS16550=y CONFIG_DRIVER_SERIAL_NS16550_OMAP_EXTENSIONS=y @@ -337,6 +338,15 @@ CONFIG_BUS_OMAP_GPMC=y # Filesystem support # CONFIG_FS=y +CONFIG_FS_LEGACY=y + +# +# Some selected filesystems still use the legacy FS API. +# + +# +# Consider updating them. +# # CONFIG_FS_CRAMFS is not set # CONFIG_FS_EXT4 is not set CONFIG_FS_RAMFS=y @@ -398,3 +408,13 @@ CONFIG_XYMODEM=y CONFIG_CRC16=y # CONFIG_DIGEST is not set # CONFIG_CRYPTO_KEYSTORE is not set + +# +# Firmware files +# +CONFIG_EXTRA_FIRMWARE_DIR="firmware" + +# +# Host Tools +# +# CONFIG_COMPILE_HOST_TOOLS is not set diff --git a/configs/platform-v7a/barebox-am335x.config b/configs/platform-v7a/barebox-am335x.config index 0c78012..0c3d7e5 100644 --- a/configs/platform-v7a/barebox-am335x.config +++ b/configs/platform-v7a/barebox-am335x.config @@ -1,6 +1,6 @@ # # Automatically generated file; DO NOT EDIT. -# Barebox/arm 2018.05.0-20180515-1 Configuration +# Barebox/arm 2018.11.0-20181122-1 Configuration # CONFIG_ARM=y CONFIG_ARM_LINUX=y @@ -408,6 +408,7 @@ CONFIG_OF_BAREBOX_DRIVERS=y # # serial drivers # +# CONFIG_SERIAL_DEV_BUS is not set # CONFIG_DRIVER_SERIAL_ARM_DCC is not set CONFIG_DRIVER_SERIAL_NS16550=y CONFIG_DRIVER_SERIAL_NS16550_OMAP_EXTENSIONS=y @@ -436,6 +437,7 @@ CONFIG_DRIVER_NET_CPSW=y # # CONFIG_AR8327N_PHY is not set # CONFIG_AT803X_PHY is not set +# CONFIG_DAVICOM_PHY is not set # CONFIG_LXT_PHY is not set # CONFIG_MARVELL_PHY is not set # CONFIG_MICREL_PHY is not set @@ -587,6 +589,7 @@ CONFIG_LED_GPIO_OF=y # CONFIG_LED_GPIO_RGB is not set # CONFIG_LED_GPIO_BICOLOR is not set CONFIG_LED_TRIGGERS=y +# CONFIG_LED_PCA955X is not set # # EEPROM support @@ -649,6 +652,15 @@ CONFIG_BUS_OMAP_GPMC=y # Filesystem support # CONFIG_FS=y +CONFIG_FS_LEGACY=y + +# +# Some selected filesystems still use the legacy FS API. +# + +# +# Consider updating them. +# CONFIG_FS_AUTOMOUNT=y # CONFIG_FS_CRAMFS is not set CONFIG_FS_EXT4=y @@ -732,3 +744,13 @@ CONFIG_DIGEST_HMAC_GENERIC=y # CONFIG_DIGEST_SHA256_ARM is not set CONFIG_CRYPTO_RSA=y CONFIG_CRYPTO_KEYSTORE=y + +# +# Firmware files +# +CONFIG_EXTRA_FIRMWARE_DIR="firmware" + +# +# Host Tools +# +# CONFIG_COMPILE_HOST_TOOLS is not set diff --git a/configs/platform-v7a/barebox-mx6.config b/configs/platform-v7a/barebox-mx6.config index 980b97b..536cbfe 100644 --- a/configs/platform-v7a/barebox-mx6.config +++ b/configs/platform-v7a/barebox-mx6.config @@ -1,6 +1,6 @@ # # Automatically generated file; DO NOT EDIT. -# Barebox/arm 2018.05.0-20180515-1 Configuration +# Barebox/arm 2018.11.0-20181122-1 Configuration # CONFIG_ARM=y CONFIG_ARM_LINUX=y @@ -94,13 +94,17 @@ CONFIG_MACH_UDOO_NEO=y # CONFIG_MACH_VARISCITE_MX6 is not set # CONFIG_MACH_GW_VENTANA is not set # CONFIG_MACH_CM_FX6 is not set +# CONFIG_MACH_ADVANTECH_ROM_742X is not set # CONFIG_MACH_WARP7 is not set # CONFIG_MACH_VF610_TWR is not set +# CONFIG_MACH_ZII_RDU1 is not set # CONFIG_MACH_ZII_RDU2 is not set # CONFIG_MACH_ZII_VF610_DEV is not set +# CONFIG_MACH_ZII_IMX7D_RPU2 is not set # CONFIG_MACH_PHYTEC_PHYCORE_IMX7 is not set # CONFIG_MACH_FREESCALE_MX7_SABRESD is not set # CONFIG_MACH_NXP_IMX6ULL_EVK is not set +# CONFIG_MACH_NXP_IMX8MQ_EVK is not set # # Board specific settings @@ -111,10 +115,7 @@ CONFIG_MACH_UDOO_NEO=y # CONFIG_IMX_IIM=y CONFIG_IMX_IIM_FUSE_BLOW=y -CONFIG_IMX_OCOTP=y -# CONFIG_IMX_OCOTP_WRITE is not set # CONFIG_HABV4 is not set -# CONFIG_ARCH_IMX_USBLOADER is not set CONFIG_ARM_ASM_UNIFIED=y CONFIG_AEABI=y CONFIG_THUMB2_BAREBOX=y @@ -464,6 +465,7 @@ CONFIG_OF_BAREBOX_DRIVERS=y # # serial drivers # +# CONFIG_SERIAL_DEV_BUS is not set # CONFIG_DRIVER_SERIAL_ARM_DCC is not set CONFIG_DRIVER_SERIAL_IMX=y # CONFIG_DRIVER_SERIAL_NS16550 is not set @@ -493,6 +495,7 @@ CONFIG_DRIVER_NET_FEC_IMX=y # # CONFIG_AR8327N_PHY is not set CONFIG_AT803X_PHY=y +# CONFIG_DAVICOM_PHY is not set # CONFIG_LXT_PHY is not set # CONFIG_MARVELL_PHY is not set CONFIG_MICREL_PHY=y @@ -681,6 +684,7 @@ CONFIG_LED_GPIO_OF=y # CONFIG_LED_GPIO_RGB is not set # CONFIG_LED_GPIO_BICOLOR is not set CONFIG_LED_TRIGGERS=y +# CONFIG_LED_PCA955X is not set # # EEPROM support @@ -762,6 +766,15 @@ CONFIG_USB_NOP_XCEIV=y # Filesystem support # CONFIG_FS=y +CONFIG_FS_LEGACY=y + +# +# Some selected filesystems still use the legacy FS API. +# + +# +# Consider updating them. +# CONFIG_FS_AUTOMOUNT=y # CONFIG_FS_CRAMFS is not set CONFIG_FS_EXT4=y @@ -854,3 +867,14 @@ CONFIG_DIGEST_HMAC_GENERIC=y # CONFIG_DIGEST_SHA1_ARM is not set # CONFIG_DIGEST_SHA256_ARM is not set CONFIG_CRYPTO_KEYSTORE=y + +# +# Firmware files +# +CONFIG_EXTRA_FIRMWARE_DIR="firmware" + +# +# Host Tools +# +# CONFIG_COMPILE_HOST_TOOLS is not set +# CONFIG_ARCH_IMX_USBLOADER is not set diff --git a/configs/platform-v7a/barebox-rpi2.config b/configs/platform-v7a/barebox-rpi2.config index 74c52e9..0e2622f 100644 --- a/configs/platform-v7a/barebox-rpi2.config +++ b/configs/platform-v7a/barebox-rpi2.config @@ -1,6 +1,6 @@ # # Automatically generated file; DO NOT EDIT. -# Barebox/arm 2018.05.0-20180515-1 Configuration +# Barebox/arm 2018.11.0-20181122-1 Configuration # CONFIG_ARM=y CONFIG_ARM_LINUX=y @@ -54,6 +54,7 @@ CONFIG_MACH_RPI_COMMON=y # # CONFIG_MACH_RPI is not set CONFIG_MACH_RPI2=y +# CONFIG_MACH_RPI3 is not set CONFIG_BAREBOX_MAX_IMAGE_SIZE=0xffffffff CONFIG_AEABI=y # CONFIG_THUMB2_BAREBOX is not set @@ -369,6 +370,7 @@ CONFIG_ARM_AMBA=y # # serial drivers # +# CONFIG_SERIAL_DEV_BUS is not set # CONFIG_DRIVER_SERIAL_ARM_DCC is not set CONFIG_SERIAL_AMBA_PL011=y # CONFIG_DRIVER_SERIAL_NS16550 is not set @@ -499,6 +501,15 @@ CONFIG_REGULATOR_BCM283X=y # Filesystem support # CONFIG_FS=y +CONFIG_FS_LEGACY=y + +# +# Some selected filesystems still use the legacy FS API. +# + +# +# Consider updating them. +# CONFIG_FS_AUTOMOUNT=y # CONFIG_FS_CRAMFS is not set CONFIG_FS_EXT4=y @@ -575,3 +586,13 @@ CONFIG_DIGEST_MD5_GENERIC=y # CONFIG_DIGEST_SHA1_ARM is not set # CONFIG_DIGEST_SHA256_ARM is not set # CONFIG_CRYPTO_KEYSTORE is not set + +# +# Firmware files +# +CONFIG_EXTRA_FIRMWARE_DIR="firmware" + +# +# Host Tools +# +# CONFIG_COMPILE_HOST_TOOLS is not set diff --git a/configs/platform-v7a/barebox-rpi3-defaultenv/boot/9p b/configs/platform-v7a/barebox-rpi3-defaultenv/boot/9p new file mode 100644 index 0000000..264ffec --- /dev/null +++ b/configs/platform-v7a/barebox-rpi3-defaultenv/boot/9p @@ -0,0 +1,10 @@ +#!/bin/sh + +addpart /dev/nor0 "8M@32M(kernel)" +addpart /dev/nor0 "512k@40M(dtb)" +global.bootm.image="/dev/nor0.kernel" +global.bootm.oftree="/dev/nor0.dtb" + +global linux.bootargs.base="console=ttyAMA0,115200 loglevel=5 ptxdist-devel" + +global linux.bootargs.root="root=/dev/root rootfstype=9p rootflags=trans=virtio" \ No newline at end of file diff --git a/configs/platform-v7a/barebox-rpi3-defaultenv/init/bootsource b/configs/platform-v7a/barebox-rpi3-defaultenv/init/bootsource new file mode 100644 index 0000000..4de7163 --- /dev/null +++ b/configs/platform-v7a/barebox-rpi3-defaultenv/init/bootsource @@ -0,0 +1,13 @@ +#!/bin/sh + +if [ -n "$nv.boot.default" ]; then + exit +fi + +if [ $bootsource = mmc ]; then + global.boot.default="bootchooser net" +elif [ $bootsource = net ]; then + global.boot.default="net bootchooser" +else + global.boot.default="disk0.1 net" +fi diff --git a/configs/platform-v7a/barebox-rpi3-defaultenv/nv/linux.bootargs.loglevel b/configs/platform-v7a/barebox-rpi3-defaultenv/nv/linux.bootargs.loglevel new file mode 100644 index 0000000..705752c --- /dev/null +++ b/configs/platform-v7a/barebox-rpi3-defaultenv/nv/linux.bootargs.loglevel @@ -0,0 +1 @@ +loglevel=5 systemd.log_level=warning systemd.show_status=auto diff --git a/configs/platform-v7a/barebox-rpi3.config b/configs/platform-v7a/barebox-rpi3.config new file mode 100644 index 0000000..0336bdf --- /dev/null +++ b/configs/platform-v7a/barebox-rpi3.config @@ -0,0 +1,600 @@ +# +# Automatically generated file; DO NOT EDIT. +# Barebox/arm 2018.11.0-20181122-1 Configuration +# +CONFIG_ARM=y +CONFIG_ARM_LINUX=y +CONFIG_TEXT_BASE=0x0 + +# +# System Type +# +# CONFIG_ARCH_AT91 is not set +CONFIG_ARCH_BCM283X=y +# CONFIG_ARCH_CLPS711X is not set +# CONFIG_ARCH_DAVINCI is not set +# CONFIG_ARCH_DIGIC is not set +# CONFIG_ARCH_EP93XX is not set +# CONFIG_ARCH_HIGHBANK is not set +# CONFIG_ARCH_IMX is not set +# CONFIG_ARCH_MVEBU is not set +# CONFIG_ARCH_MXS is not set +# CONFIG_ARCH_NETX is not set +# CONFIG_ARCH_NOMADIK is not set +# CONFIG_ARCH_OMAP is not set +# CONFIG_ARCH_PXA is not set +# CONFIG_ARCH_ROCKCHIP is not set +# CONFIG_ARCH_SOCFPGA is not set +# CONFIG_ARCH_S3C24xx is not set +# CONFIG_ARCH_S5PCxx is not set +# CONFIG_ARCH_S3C64xx is not set +# CONFIG_ARCH_VERSATILE is not set +# CONFIG_ARCH_VEXPRESS is not set +# CONFIG_ARCH_TEGRA is not set +# CONFIG_ARCH_UEMD is not set +# CONFIG_ARCH_ZYNQ is not set +# CONFIG_ARCH_QEMU is not set + +# +# Processor Type +# +CONFIG_CPU_32=y +CONFIG_CPU_V7=y +CONFIG_CPU_32v7=y + +# +# processor features +# +# CONFIG_BOOT_ENDIANNESS_SWITCH is not set +CONFIG_ARCH_TEXT_BASE=0x0 +CONFIG_MACH_RPI_COMMON=y + +# +# select Broadcom BCM283X boards to be built +# +# CONFIG_MACH_RPI is not set +# CONFIG_MACH_RPI2 is not set +CONFIG_MACH_RPI3=y +CONFIG_BAREBOX_MAX_IMAGE_SIZE=0xffffffff +CONFIG_AEABI=y +# CONFIG_THUMB2_BAREBOX is not set +# CONFIG_ARM_BOARD_APPEND_ATAG is not set + +# +# ARM specific settings +# +CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y +CONFIG_ARM_EXCEPTIONS=y +CONFIG_ARM_UNWIND=y +# CONFIG_ARM_SEMIHOSTING is not set +CONFIG_ARM_SMCCC=y +CONFIG_ARM_SECURE_MONITOR=y +# CONFIG_ARM_PSCI is not set +CONFIG_DEFCONFIG_LIST="$ARCH_DEFCONFIG" +CONFIG_GREGORIAN_CALENDER=y +CONFIG_HAS_KALLSYMS=y +CONFIG_HAS_MODULES=y +CONFIG_HAS_CACHE=y +CONFIG_HAS_DMA=y +CONFIG_GENERIC_GPIO=y +CONFIG_BLOCK=y +CONFIG_BLOCK_WRITE=y +CONFIG_FILETYPE=y +CONFIG_BINFMT=y +CONFIG_UIMAGE=y +CONFIG_STDDEV=y +CONFIG_BOOT=y + +# +# General Settings +# +CONFIG_LOCALVERSION="" +CONFIG_LOCALVERSION_AUTO=y +CONFIG_BANNER=y +CONFIG_MEMINFO=y +CONFIG_ENVIRONMENT_VARIABLES=y +CONFIG_GLOBALVAR=y +CONFIG_NVVAR=y + +# +# memory layout +# +CONFIG_HAVE_PBL_IMAGE=y +CONFIG_HAVE_PBL_MULTI_IMAGES=y +CONFIG_HAVE_IMAGE_COMPRESSION=y +CONFIG_PBL_IMAGE=y +CONFIG_PBL_MULTI_IMAGES=y +CONFIG_PBL_RELOCATABLE=y +CONFIG_IMAGE_COMPRESSION=y +# CONFIG_IMAGE_COMPRESSION_LZ4 is not set +# CONFIG_IMAGE_COMPRESSION_LZO is not set +# CONFIG_IMAGE_COMPRESSION_GZIP is not set +# CONFIG_IMAGE_COMPRESSION_XZKERN is not set +CONFIG_IMAGE_COMPRESSION_NONE=y +CONFIG_MMU=y +CONFIG_MMU_EARLY=y +CONFIG_BAREBOX_MAX_PBL_SIZE=0xffffffff +CONFIG_BAREBOX_MAX_BARE_INIT_SIZE=0xffffffff +CONFIG_BAREBOX_MAX_PBLX_SIZE=0xffffffff +CONFIG_STACK_SIZE=0x8000 +CONFIG_MALLOC_SIZE=0x0 +# CONFIG_EXPERIMENTAL is not set +# CONFIG_MALLOC_DLMALLOC is not set +CONFIG_MALLOC_TLSF=y +CONFIG_KALLSYMS=y +CONFIG_RELOCATABLE=y +# CONFIG_PANIC_HANG is not set +CONFIG_PROMPT="R-Pi> " +CONFIG_BAUDRATE=115200 +CONFIG_CBSIZE=1024 +CONFIG_SHELL_HUSH=y +# CONFIG_SHELL_SIMPLE is not set +# CONFIG_SHELL_NONE is not set +CONFIG_GLOB=y +CONFIG_GLOB_SORT=y +CONFIG_PROMPT_HUSH_PS2="> " +CONFIG_HUSH_FANCY_PROMPT=y +CONFIG_CMDLINE_EDITING=y +CONFIG_AUTO_COMPLETE=y +CONFIG_MENU=y +CONFIG_PASSWORD=y +CONFIG_PASSWORD_DEFAULT="" +CONFIG_PASSWD_SUM_MD5=y +# CONFIG_PASSWD_SUM_SHA1 is not set +# CONFIG_PASSWD_SUM_SHA256 is not set +# CONFIG_PASSWD_SUM_SHA512 is not set +# CONFIG_PASSWD_CRYPTO_PBKDF2 is not set +CONFIG_DYNAMIC_CRC_TABLE=y +CONFIG_ERRNO_MESSAGES=y +CONFIG_TIMESTAMP=y +CONFIG_BOOTM=y +CONFIG_BOOTM_SHOW_TYPE=y +CONFIG_BOOTM_VERBOSE=y +CONFIG_BOOTM_INITRD=y +CONFIG_BOOTM_OFTREE=y +# CONFIG_BOOTM_OFTREE_UIMAGE is not set +# CONFIG_BOOTM_AIMAGE is not set +# CONFIG_BOOTM_FITIMAGE is not set +CONFIG_BLSPEC=y +CONFIG_FLEXIBLE_BOOTARGS=y +# CONFIG_IMD is not set +# CONFIG_KERNEL_INSTALL_TARGET is not set +CONFIG_CONSOLE_FULL=y +# CONFIG_CONSOLE_SIMPLE is not set +# CONFIG_CONSOLE_NONE is not set +CONFIG_CONSOLE_ACTIVATE_FIRST=y +# CONFIG_CONSOLE_ACTIVATE_ALL is not set +# CONFIG_CONSOLE_ACTIVATE_NONE is not set +# CONFIG_CONSOLE_ALLOW_COLOR is not set +# CONFIG_PBL_CONSOLE is not set +# CONFIG_CONSOLE_RATP is not set +CONFIG_PARTITION=y +CONFIG_PARTITION_DISK=y +CONFIG_PARTITION_DISK_DOS=y +# CONFIG_PARTITION_DISK_EFI is not set +CONFIG_ENV_HANDLING=y +CONFIG_DEFAULT_ENVIRONMENT=y +CONFIG_DEFAULT_COMPRESSION_NONE=y +CONFIG_DEFAULT_ENVIRONMENT_GENERIC_NEW=y +CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/raspberry-pi/env" +# CONFIG_BAREBOXENV_TARGET is not set +# CONFIG_BAREBOXCRC32_TARGET is not set +CONFIG_POLLER=y +# CONFIG_STATE is not set +# CONFIG_BOOTCHOOSER is not set +# CONFIG_RESET_SOURCE is not set + +# +# Debugging +# +CONFIG_COMPILE_LOGLEVEL=6 +CONFIG_DEFAULT_LOGLEVEL=7 +# CONFIG_DEBUG_INFO is not set +# CONFIG_DEBUG_LL is not set +# CONFIG_DEBUG_INITCALLS is not set +CONFIG_HAS_DEBUG_LL=y +CONFIG_COMMAND_SUPPORT=y +CONFIG_COMPILE_HASH=y +CONFIG_COMPILE_MEMORY=y + +# +# Commands +# + +# +# Information +# +CONFIG_CMD_ARM_CPUINFO=y +CONFIG_CMD_DEVINFO=y +# CONFIG_CMD_DMESG is not set +CONFIG_CMD_DRVINFO=y +CONFIG_CMD_HELP=y +CONFIG_LONGHELP=y +CONFIG_CMD_IOMEM=y +# CONFIG_CMD_IMD is not set +CONFIG_CMD_MEMINFO=y +# CONFIG_CMD_ARM_MMUINFO is not set +# CONFIG_CMD_REGULATOR is not set +CONFIG_CMD_VERSION=y +# CONFIG_CMD_MMC_EXTCSD is not set + +# +# Boot +# +CONFIG_CMD_BOOT=y +CONFIG_CMD_BOOTM=y +CONFIG_CMD_BOOTU=y +# CONFIG_CMD_BOOTZ is not set +CONFIG_CMD_GO=y +CONFIG_CMD_LOADB=y +# CONFIG_CMD_LOADS is not set +CONFIG_CMD_LOADY=y +CONFIG_CMD_RESET=y +CONFIG_CMD_UIMAGE=y + +# +# Partition +# +CONFIG_CMD_PARTITION=y +CONFIG_CMD_AUTOMOUNT=y +CONFIG_CMD_MOUNT=y +CONFIG_CMD_UMOUNT=y + +# +# Environment +# +CONFIG_CMD_NV=y +CONFIG_CMD_EXPORT=y +# CONFIG_CMD_DEFAULTENV is not set +CONFIG_CMD_GLOBAL=y +# CONFIG_CMD_LOADENV is not set +CONFIG_CMD_PRINTENV=y +CONFIG_CMD_MAGICVAR=y +CONFIG_CMD_MAGICVAR_HELP=y +CONFIG_CMD_SAVEENV=y + +# +# File +# +CONFIG_CMD_BASENAME=y +CONFIG_CMD_CAT=y +CONFIG_CMD_CD=y +CONFIG_CMD_CP=y +# CONFIG_CMD_CMP is not set +CONFIG_CMD_DIGEST=y +CONFIG_CMD_DIRNAME=y +CONFIG_CMD_FILETYPE=y +CONFIG_CMD_LN=y +CONFIG_CMD_LS=y +CONFIG_CMD_MD5SUM=y +CONFIG_CMD_MKDIR=y +CONFIG_CMD_PWD=y +CONFIG_CMD_READLINK=y +CONFIG_CMD_RM=y +CONFIG_CMD_RMDIR=y +# CONFIG_CMD_SHA1SUM is not set +# CONFIG_CMD_SHA224SUM is not set +# CONFIG_CMD_SHA256SUM is not set +# CONFIG_CMD_SHA384SUM is not set +# CONFIG_CMD_SHA512SUM is not set +CONFIG_CMD_UNCOMPRESS=y + +# +# Shell scripting +# +CONFIG_CMD_FALSE=y +CONFIG_CMD_GETOPT=y +CONFIG_CMD_LET=y +CONFIG_CMD_MSLEEP=y +# CONFIG_CMD_READF is not set +CONFIG_CMD_SLEEP=y +CONFIG_CMD_TEST=y +CONFIG_CMD_TRUE=y + +# +# Console and Framebuffer interaction +# +CONFIG_CMD_CLEAR=y +CONFIG_CMD_ECHO=y +CONFIG_CMD_ECHO_E=y +CONFIG_CMD_EDIT=y +CONFIG_CMD_LOGIN=y +CONFIG_CMD_MENU=y +CONFIG_CMD_MENU_MANAGEMENT=y +# CONFIG_CMD_MENUTREE is not set +CONFIG_CMD_PASSWD=y +CONFIG_PASSWD_MODE_HIDE=y +# CONFIG_PASSWD_MODE_STAR is not set +# CONFIG_PASSWD_MODE_CLEAR is not set +CONFIG_CMD_READLINE=y +CONFIG_CMD_TIMEOUT=y + +# +# Memory +# +CONFIG_CMD_CRC=y +CONFIG_CMD_CRC_CMP=y +CONFIG_CMD_MD=y +CONFIG_CMD_MEMCMP=y +CONFIG_CMD_MEMCPY=y +CONFIG_CMD_MEMSET=y +# CONFIG_CMD_MEMTEST is not set +CONFIG_CMD_MM=y +CONFIG_CMD_MW=y + +# +# Hardware manipulation +# +CONFIG_CMD_CLK=y +CONFIG_CMD_DETECT=y +# CONFIG_CMD_FLASH is not set +CONFIG_CMD_GPIO=y +# CONFIG_CMD_LED is not set +# CONFIG_CMD_POWEROFF is not set +# CONFIG_CMD_SPI is not set +# CONFIG_CMD_LED_TRIGGER is not set +CONFIG_CMD_WD=y +CONFIG_CMD_WD_DEFAULT_TIMOUT=0 + +# +# Miscellaneous +# +# CONFIG_CMD_2048 is not set +# CONFIG_CMD_BAREBOX_UPDATE is not set +# CONFIG_CMD_FIRMWARELOAD is not set +CONFIG_CMD_OF_DUMP=y +CONFIG_CMD_OF_NODE=y +CONFIG_CMD_OF_PROPERTY=y +# CONFIG_CMD_OF_DISPLAY_TIMINGS is not set +# CONFIG_CMD_OF_FIXUP_STATUS is not set +CONFIG_CMD_OFTREE=y +CONFIG_CMD_TIME=y +# CONFIG_CMD_DHRYSTONE is not set +# CONFIG_CMD_SPD_DECODE is not set +# CONFIG_CMD_SEED is not set +# CONFIG_NET is not set + +# +# Drivers +# +CONFIG_OFTREE=y +CONFIG_OFTREE_MEM_GENERIC=y +CONFIG_DTC=y +CONFIG_OFDEVICE=y +CONFIG_OF_GPIO=y +# CONFIG_OF_BAREBOX_DRIVERS is not set +# CONFIG_AIODEV is not set +CONFIG_ARM_AMBA=y + +# +# serial drivers +# +# CONFIG_SERIAL_DEV_BUS is not set +# CONFIG_DRIVER_SERIAL_ARM_DCC is not set +CONFIG_SERIAL_AMBA_PL011=y +# CONFIG_DRIVER_SERIAL_NS16550 is not set +# CONFIG_DRIVER_SERIAL_CADENCE is not set + +# +# SPI drivers +# +CONFIG_SPI=y +# CONFIG_DRIVER_SPI_GPIO is not set +# CONFIG_I2C is not set +# CONFIG_MTD is not set +CONFIG_DISK=y +CONFIG_DISK_WRITE=y + +# +# drive types +# +# CONFIG_DISK_ATA is not set +# CONFIG_DISK_AHCI is not set + +# +# interface types +# +# CONFIG_DISK_INTF_PLATFORM_IDE is not set +# CONFIG_USB_HOST is not set +# CONFIG_USB_GADGET is not set +# CONFIG_USB_MUSB is not set +# CONFIG_VIDEO is not set +CONFIG_MCI=y + +# +# --- Feature list --- +# +# CONFIG_MCI_STARTUP is not set +CONFIG_MCI_INFO=y +CONFIG_MCI_WRITE=y +# CONFIG_MCI_MMC_BOOT_PARTITIONS is not set + +# +# --- MCI host drivers --- +# +# CONFIG_MCI_DW is not set +CONFIG_MCI_BCM283X=y +# CONFIG_MCI_MMCI is not set +# CONFIG_MCI_SPI is not set +CONFIG_HAVE_CLK=y +CONFIG_CLKDEV_LOOKUP=y +CONFIG_COMMON_CLK=y +CONFIG_CLOCKSOURCE_BCM283X=y +CONFIG_CLOCKSOURCE_DUMMY_RATE=1000 + +# +# MFD +# +# CONFIG_MFD_MC13XXX is not set +# CONFIG_MFD_SYSCON is not set + +# +# Misc devices +# +# CONFIG_JTAG is not set +# CONFIG_SRAM is not set +CONFIG_LED=y +CONFIG_LED_GPIO=y +# CONFIG_LED_GPIO_OF is not set +# CONFIG_LED_GPIO_RGB is not set +# CONFIG_LED_GPIO_BICOLOR is not set +CONFIG_LED_TRIGGERS=y + +# +# EEPROM support +# +# CONFIG_EEPROM_AT25 is not set + +# +# Input device support +# +# CONFIG_KEYBOARD_GPIO is not set +CONFIG_WATCHDOG=y +# CONFIG_WATCHDOG_POLLER is not set +# CONFIG_WATCHDOG_DW is not set +CONFIG_WATCHDOG_BCM2835=y +# CONFIG_PWM is not set +# CONFIG_HWRNG is not set + +# +# DMA support +# +CONFIG_GPIOLIB=y + +# +# GPIO +# +# CONFIG_GPIO_74164 is not set +CONFIG_GPIO_BCM283X=y +# CONFIG_GPIO_GENERIC_PLATFORM is not set +# CONFIG_GPIO_IMX is not set +# CONFIG_GPIO_VF610 is not set +# CONFIG_GPIO_MXS is not set +# CONFIG_GPIO_OMAP is not set +# CONFIG_GPIO_PL061 is not set +# CONFIG_GPIO_DESIGNWARE is not set +# CONFIG_W1 is not set +# CONFIG_PINCTRL is not set +# CONFIG_NVMEM is not set + +# +# Bus devices +# +CONFIG_REGULATOR=y +# CONFIG_REGULATOR_FIXED is not set +CONFIG_REGULATOR_BCM283X=y +# CONFIG_RESET_CONTROLLER is not set +# CONFIG_RTC_CLASS is not set + +# +# Firmware Drivers +# +# CONFIG_FIRMWARE_ALTERA_SERIAL is not set +# CONFIG_GENERIC_PHY is not set +# CONFIG_CRYPTO_HW is not set + +# +# Memory controller drivers +# + +# +# Filesystem support +# +CONFIG_FS=y +CONFIG_FS_LEGACY=y + +# +# Some selected filesystems still use the legacy FS API. +# + +# +# Consider updating them. +# +CONFIG_FS_AUTOMOUNT=y +# CONFIG_FS_CRAMFS is not set +CONFIG_FS_EXT4=y +CONFIG_FS_RAMFS=y +CONFIG_FS_DEVFS=y +CONFIG_FS_FAT=y +CONFIG_FS_FAT_WRITE=y +CONFIG_FS_FAT_LFN=y +# CONFIG_FS_BPKFS is not set +# CONFIG_FS_UIMAGEFS is not set +# CONFIG_FS_PSTORE is not set +# CONFIG_FS_SQUASHFS is not set + +# +# ZLIB support disabled +# + +# +# LZ4 support disabled +# + +# +# LZO support disabled +# + +# +# XZ support disabled +# + +# +# ZSTD support disabled +# + +# +# Library routines +# +CONFIG_PARAMETER=y +CONFIG_UNCOMPRESS=y +# CONFIG_ZLIB is not set +# CONFIG_BZLIB is not set +# CONFIG_LZ4_DECOMPRESS is not set +# CONFIG_ZSTD_DECOMPRESS is not set +# CONFIG_XZ_DECOMPRESS is not set +# CONFIG_GENERIC_FIND_NEXT_BIT is not set +CONFIG_PROCESS_ESCAPE_SEQUENCE=y +# CONFIG_LZO_DECOMPRESS is not set +CONFIG_FNMATCH=y +CONFIG_QSORT=y +CONFIG_XYMODEM=y +# CONFIG_RATP is not set +# CONFIG_ALLOW_PRNG_FALLBACK is not set +# CONFIG_CRC_CCITT is not set + +# +# Library gui routines +# +# CONFIG_BAREBOX_LOGO is not set + +# +# Crypto support +# +CONFIG_CRC32=y +CONFIG_CRC16=y +CONFIG_DIGEST=y +CONFIG_MD5=y +CONFIG_SHA1=y +CONFIG_SHA256=y +# CONFIG_DIGEST_CRC32_GENERIC is not set +CONFIG_DIGEST_MD5_GENERIC=y +CONFIG_DIGEST_SHA1_GENERIC=y +# CONFIG_DIGEST_SHA224_GENERIC is not set +CONFIG_DIGEST_SHA256_GENERIC=y +# CONFIG_DIGEST_SHA384_GENERIC is not set +# CONFIG_DIGEST_SHA512_GENERIC is not set +# CONFIG_DIGEST_HMAC_GENERIC is not set +# CONFIG_DIGEST_SHA1_ARM is not set +# CONFIG_DIGEST_SHA256_ARM is not set +# CONFIG_CRYPTO_KEYSTORE is not set + +# +# Firmware files +# +CONFIG_EXTRA_FIRMWARE_DIR="firmware" + +# +# Host Tools +# +# CONFIG_COMPILE_HOST_TOOLS is not set diff --git a/configs/platform-v7a/barebox-vexpress.config b/configs/platform-v7a/barebox-vexpress.config index 826d222..72d5421 100644 --- a/configs/platform-v7a/barebox-vexpress.config +++ b/configs/platform-v7a/barebox-vexpress.config @@ -1,6 +1,6 @@ # # Automatically generated file; DO NOT EDIT. -# Barebox/arm 2018.05.0-20180515-1 Configuration +# Barebox/arm 2018.11.0-20181122-1 Configuration # CONFIG_ARM=y CONFIG_ARM_LINUX=y @@ -364,6 +364,7 @@ CONFIG_ARM_AMBA=y # # serial drivers # +# CONFIG_SERIAL_DEV_BUS is not set # CONFIG_DRIVER_SERIAL_ARM_DCC is not set CONFIG_SERIAL_AMBA_PL011=y # CONFIG_DRIVER_SERIAL_NS16550 is not set @@ -389,6 +390,7 @@ CONFIG_DRIVER_NET_SMC911X=y # # CONFIG_AR8327N_PHY is not set # CONFIG_AT803X_PHY is not set +# CONFIG_DAVICOM_PHY is not set # CONFIG_LXT_PHY is not set # CONFIG_MARVELL_PHY is not set # CONFIG_MICREL_PHY is not set @@ -522,6 +524,15 @@ CONFIG_STATE_DRV=y # Filesystem support # CONFIG_FS=y +CONFIG_FS_LEGACY=y + +# +# Some selected filesystems still use the legacy FS API. +# + +# +# Consider updating them. +# CONFIG_FS_AUTOMOUNT=y # CONFIG_FS_CRAMFS is not set CONFIG_FS_EXT4=y @@ -599,3 +610,13 @@ CONFIG_DIGEST_MD5_GENERIC=y # CONFIG_DIGEST_SHA1_ARM is not set # CONFIG_DIGEST_SHA256_ARM is not set # CONFIG_CRYPTO_KEYSTORE is not set + +# +# Firmware files +# +CONFIG_EXTRA_FIRMWARE_DIR="firmware" + +# +# Host Tools +# +# CONFIG_COMPILE_HOST_TOOLS is not set diff --git a/configs/platform-v7a/patches/barebox-2018.05.0/0001-beaglebone-add-state-entry-for-mmc0-and-mmc1.patch b/configs/platform-v7a/patches/barebox-2018.05.0/0001-beaglebone-add-state-entry-for-mmc0-and-mmc1.patch deleted file mode 100644 index cfca106..0000000 --- a/configs/platform-v7a/patches/barebox-2018.05.0/0001-beaglebone-add-state-entry-for-mmc0-and-mmc1.patch +++ /dev/null @@ -1,35 +0,0 @@ -From: Michael Grzeschik <m.grzeschik@pengutronix.de> -Date: Fri, 10 Jun 2016 14:02:30 +0200 -Subject: [PATCH] beaglebone: add state entry for mmc0 and mmc1 - -Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de> ---- - arch/arm/dts/am335x-bone-common.dtsi | 15 +++++++++++++++ - 1 file changed, 15 insertions(+) - -diff --git a/arch/arm/dts/am335x-bone-common.dtsi b/arch/arm/dts/am335x-bone-common.dtsi -index 0413724e0ca1..6e58714516fd 100644 ---- a/arch/arm/dts/am335x-bone-common.dtsi -+++ b/arch/arm/dts/am335x-bone-common.dtsi -@@ -11,6 +11,21 @@ - linux,stdout-path = &uart0; - }; - -+ bootstate: bootstate { -+ compatible = "barebox,bootstate"; -+ backend-type = "nv"; -+ -+ system0 { -+ default_attempts = <3>; -+ boot = "mmc0"; -+ }; -+ -+ system1 { -+ default_attempts = <3>; -+ boot = "mmc1"; -+ }; -+ }; -+ - cpus { - cpu@0 { - cpu0-supply = <&dcdc2_reg>; diff --git a/configs/platform-v7a/patches/barebox-2018.05.0/0201-Release-pengutronix-multi_v7-20180515-1.patch b/configs/platform-v7a/patches/barebox-2018.05.0/0201-Release-pengutronix-multi_v7-20180515-1.patch deleted file mode 100644 index 4b0c22d..0000000 --- a/configs/platform-v7a/patches/barebox-2018.05.0/0201-Release-pengutronix-multi_v7-20180515-1.patch +++ /dev/null @@ -1,22 +0,0 @@ -From: Roland Hieber <r.hieber@pengutronix.de> -Date: Tue, 15 May 2018 23:44:48 +0200 -Subject: [PATCH] Release pengutronix/multi_v7/20180515-1 - -Signed-off-by: Roland Hieber <r.hieber@pengutronix.de> ---- - Makefile | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/Makefile b/Makefile -index 88c19917394f..11e79cc339f4 100644 ---- a/Makefile -+++ b/Makefile -@@ -1,7 +1,7 @@ - VERSION = 2018 - PATCHLEVEL = 05 - SUBLEVEL = 0 --EXTRAVERSION = -+EXTRAVERSION =-20180515-1 - NAME = None - - # *DOCUMENTATION* diff --git a/configs/platform-v7a/patches/barebox-2018.05.0/series b/configs/platform-v7a/patches/barebox-2018.05.0/series deleted file mode 100644 index 272791c..0000000 --- a/configs/platform-v7a/patches/barebox-2018.05.0/series +++ /dev/null @@ -1,15 +0,0 @@ -# umpf-base: v2018.05.0 -# umpf-name: pengutronix/multi_v7 -# umpf-version: pengutronix/multi_v7/20180515-1 -# umpf-topic: v2018.05.0/customers/pengutronix/beaglebone -# umpf-hashinfo: d1f50bff60c7069caad2df4ef02f672be456f141 -# umpf-topic-range: cd4320e3e86bd2ab7b4a19016ef8df6c5d69a5a5..d1f50bff60c7069caad2df4ef02f672be456f141 -0001-beaglebone-add-state-entry-for-mmc0-and-mmc1.patch -# umpf-topic: v2018.05.0/customers/pengutronix/udoo-neo -# umpf-hashinfo: 772e5039c9a147256a085c76a74cf5cb5c14ec35 -# umpf-topic-range: d1f50bff60c7069caad2df4ef02f672be456f141..183d8e8d0ccf827481923b3872144e2c10ef9fac -0101-ARM-imx-add-support-for-Udoo-Neo-full.patch -# umpf-release: pengutronix/multi_v7/20180515-1 -# umpf-topic-range: 183d8e8d0ccf827481923b3872144e2c10ef9fac..734e18abc455f563837dd6ad0df6fb9378053b00 -0201-Release-pengutronix-multi_v7-20180515-1.patch -# umpf-end diff --git a/configs/platform-v7a/patches/barebox-2018.11.0/0001-ARM-import-opcode-helpers-from-Linux-kernel.patch b/configs/platform-v7a/patches/barebox-2018.11.0/0001-ARM-import-opcode-helpers-from-Linux-kernel.patch new file mode 100644 index 0000000..bd459d0 --- /dev/null +++ b/configs/platform-v7a/patches/barebox-2018.11.0/0001-ARM-import-opcode-helpers-from-Linux-kernel.patch @@ -0,0 +1,299 @@ +From: Lucas Stach <l.stach@pengutronix.de> +Date: Thu, 1 Nov 2018 10:18:37 +0100 +Subject: [PATCH] ARM: import opcode helpers from Linux kernel + +Those are needed to generate some of the ARM SEC and VIRT +opcodes in a portable way. + +Signed-off-by: Lucas Stach <l.stach@pengutronix.de> +Tested-by: Roland Hieber <r.hieber@pengutronix.de> +Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> +--- + arch/arm/include/asm/opcodes-virt.h | 39 +++++ + arch/arm/include/asm/opcodes.h | 231 ++++++++++++++++++++++++++++ + 2 files changed, 270 insertions(+) + create mode 100644 arch/arm/include/asm/opcodes-virt.h + create mode 100644 arch/arm/include/asm/opcodes.h + +diff --git a/arch/arm/include/asm/opcodes-virt.h b/arch/arm/include/asm/opcodes-virt.h +new file mode 100644 +index 000000000000..efcfdf92d9d5 +--- /dev/null ++++ b/arch/arm/include/asm/opcodes-virt.h +@@ -0,0 +1,39 @@ ++/* ++ * opcodes-virt.h: Opcode definitions for the ARM virtualization extensions ++ * Copyright (C) 2012 Linaro Limited ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License along ++ * with this program; if not, write to the Free Software Foundation, Inc., ++ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ++ */ ++#ifndef __ASM_ARM_OPCODES_VIRT_H ++#define __ASM_ARM_OPCODES_VIRT_H ++ ++#include <asm/opcodes.h> ++ ++#define __HVC(imm16) __inst_arm_thumb32( \ ++ 0xE1400070 | (((imm16) & 0xFFF0) << 4) | ((imm16) & 0x000F), \ ++ 0xF7E08000 | (((imm16) & 0xF000) << 4) | ((imm16) & 0x0FFF) \ ++) ++ ++#define __ERET __inst_arm_thumb32( \ ++ 0xE160006E, \ ++ 0xF3DE8F00 \ ++) ++ ++#define __MSR_ELR_HYP(regnum) __inst_arm_thumb32( \ ++ 0xE12EF300 | regnum, \ ++ 0xF3808E30 | (regnum << 16) \ ++) ++ ++#endif /* ! __ASM_ARM_OPCODES_VIRT_H */ +diff --git a/arch/arm/include/asm/opcodes.h b/arch/arm/include/asm/opcodes.h +new file mode 100644 +index 000000000000..a78bf5d2c518 +--- /dev/null ++++ b/arch/arm/include/asm/opcodes.h +@@ -0,0 +1,231 @@ ++/* ++ * arch/arm/include/asm/opcodes.h ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License version 2 as ++ * published by the Free Software Foundation. ++ */ ++ ++#ifndef __ASM_ARM_OPCODES_H ++#define __ASM_ARM_OPCODES_H ++ ++#ifndef __ASSEMBLY__ ++#include <linux/linkage.h> ++extern asmlinkage unsigned int arm_check_condition(u32 opcode, u32 psr); ++#endif ++ ++#define ARM_OPCODE_CONDTEST_FAIL 0 ++#define ARM_OPCODE_CONDTEST_PASS 1 ++#define ARM_OPCODE_CONDTEST_UNCOND 2 ++ ++ ++/* ++ * Assembler opcode byteswap helpers. ++ * These are only intended for use by this header: don't use them directly, ++ * because they will be suboptimal in most cases. ++ */ ++#define ___asm_opcode_swab32(x) ( \ ++ (((x) << 24) & 0xFF000000) \ ++ | (((x) << 8) & 0x00FF0000) \ ++ | (((x) >> 8) & 0x0000FF00) \ ++ | (((x) >> 24) & 0x000000FF) \ ++) ++#define ___asm_opcode_swab16(x) ( \ ++ (((x) << 8) & 0xFF00) \ ++ | (((x) >> 8) & 0x00FF) \ ++) ++#define ___asm_opcode_swahb32(x) ( \ ++ (((x) << 8) & 0xFF00FF00) \ ++ | (((x) >> 8) & 0x00FF00FF) \ ++) ++#define ___asm_opcode_swahw32(x) ( \ ++ (((x) << 16) & 0xFFFF0000) \ ++ | (((x) >> 16) & 0x0000FFFF) \ ++) ++#define ___asm_opcode_identity32(x) ((x) & 0xFFFFFFFF) ++#define ___asm_opcode_identity16(x) ((x) & 0xFFFF) ++ ++ ++/* ++ * Opcode byteswap helpers ++ * ++ * These macros help with converting instructions between a canonical integer ++ * format and in-memory representation, in an endianness-agnostic manner. ++ * ++ * __mem_to_opcode_*() convert from in-memory representation to canonical form. ++ * __opcode_to_mem_*() convert from canonical form to in-memory representation. ++ * ++ * ++ * Canonical instruction representation: ++ * ++ * ARM: 0xKKLLMMNN ++ * Thumb 16-bit: 0x0000KKLL, where KK < 0xE8 ++ * Thumb 32-bit: 0xKKLLMMNN, where KK >= 0xE8 ++ * ++ * There is no way to distinguish an ARM instruction in canonical representation ++ * from a Thumb instruction (just as these cannot be distinguished in memory). ++ * Where this distinction is important, it needs to be tracked separately. ++ * ++ * Note that values in the range 0x0000E800..0xE7FFFFFF intentionally do not ++ * represent any valid Thumb-2 instruction. For this range, ++ * __opcode_is_thumb32() and __opcode_is_thumb16() will both be false. ++ * ++ * The ___asm variants are intended only for use by this header, in situations ++ * involving inline assembler. For .S files, the normal __opcode_*() macros ++ * should do the right thing. ++ */ ++#ifdef __ASSEMBLY__ ++ ++#define ___opcode_swab32(x) ___asm_opcode_swab32(x) ++#define ___opcode_swab16(x) ___asm_opcode_swab16(x) ++#define ___opcode_swahb32(x) ___asm_opcode_swahb32(x) ++#define ___opcode_swahw32(x) ___asm_opcode_swahw32(x) ++#define ___opcode_identity32(x) ___asm_opcode_identity32(x) ++#define ___opcode_identity16(x) ___asm_opcode_identity16(x) ++ ++#else /* ! __ASSEMBLY__ */ ++ ++#include <linux/types.h> ++#include <linux/swab.h> ++ ++#define ___opcode_swab32(x) swab32(x) ++#define ___opcode_swab16(x) swab16(x) ++#define ___opcode_swahb32(x) swahb32(x) ++#define ___opcode_swahw32(x) swahw32(x) ++#define ___opcode_identity32(x) ((u32)(x)) ++#define ___opcode_identity16(x) ((u16)(x)) ++ ++#endif /* ! __ASSEMBLY__ */ ++ ++ ++#ifdef CONFIG_CPU_ENDIAN_BE8 ++ ++#define __opcode_to_mem_arm(x) ___opcode_swab32(x) ++#define __opcode_to_mem_thumb16(x) ___opcode_swab16(x) ++#define __opcode_to_mem_thumb32(x) ___opcode_swahb32(x) ++#define ___asm_opcode_to_mem_arm(x) ___asm_opcode_swab32(x) ++#define ___asm_opcode_to_mem_thumb16(x) ___asm_opcode_swab16(x) ++#define ___asm_opcode_to_mem_thumb32(x) ___asm_opcode_swahb32(x) ++ ++#else /* ! CONFIG_CPU_ENDIAN_BE8 */ ++ ++#define __opcode_to_mem_arm(x) ___opcode_identity32(x) ++#define __opcode_to_mem_thumb16(x) ___opcode_identity16(x) ++#define ___asm_opcode_to_mem_arm(x) ___asm_opcode_identity32(x) ++#define ___asm_opcode_to_mem_thumb16(x) ___asm_opcode_identity16(x) ++#ifndef CONFIG_CPU_ENDIAN_BE32 ++/* ++ * On BE32 systems, using 32-bit accesses to store Thumb instructions will not ++ * work in all cases, due to alignment constraints. For now, a correct ++ * version is not provided for BE32. ++ */ ++#define __opcode_to_mem_thumb32(x) ___opcode_swahw32(x) ++#define ___asm_opcode_to_mem_thumb32(x) ___asm_opcode_swahw32(x) ++#endif ++ ++#endif /* ! CONFIG_CPU_ENDIAN_BE8 */ ++ ++#define __mem_to_opcode_arm(x) __opcode_to_mem_arm(x) ++#define __mem_to_opcode_thumb16(x) __opcode_to_mem_thumb16(x) ++#ifndef CONFIG_CPU_ENDIAN_BE32 ++#define __mem_to_opcode_thumb32(x) __opcode_to_mem_thumb32(x) ++#endif ++ ++/* Operations specific to Thumb opcodes */ ++ ++/* Instruction size checks: */ ++#define __opcode_is_thumb32(x) ( \ ++ ((x) & 0xF8000000) == 0xE8000000 \ ++ || ((x) & 0xF0000000) == 0xF0000000 \ ++) ++#define __opcode_is_thumb16(x) ( \ ++ ((x) & 0xFFFF0000) == 0 \ ++ && !(((x) & 0xF800) == 0xE800 || ((x) & 0xF000) == 0xF000) \ ++) ++ ++/* Operations to construct or split 32-bit Thumb instructions: */ ++#define __opcode_thumb32_first(x) (___opcode_identity16((x) >> 16)) ++#define __opcode_thumb32_second(x) (___opcode_identity16(x)) ++#define __opcode_thumb32_compose(first, second) ( \ ++ (___opcode_identity32(___opcode_identity16(first)) << 16) \ ++ | ___opcode_identity32(___opcode_identity16(second)) \ ++) ++#define ___asm_opcode_thumb32_first(x) (___asm_opcode_identity16((x) >> 16)) ++#define ___asm_opcode_thumb32_second(x) (___asm_opcode_identity16(x)) ++#define ___asm_opcode_thumb32_compose(first, second) ( \ ++ (___asm_opcode_identity32(___asm_opcode_identity16(first)) << 16) \ ++ | ___asm_opcode_identity32(___asm_opcode_identity16(second)) \ ++) ++ ++/* ++ * Opcode injection helpers ++ * ++ * In rare cases it is necessary to assemble an opcode which the ++ * assembler does not support directly, or which would normally be ++ * rejected because of the CFLAGS or AFLAGS used to build the affected ++ * file. ++ * ++ * Before using these macros, consider carefully whether it is feasible ++ * instead to change the build flags for your file, or whether it really ++ * makes sense to support old assembler versions when building that ++ * particular kernel feature. ++ * ++ * The macros defined here should only be used where there is no viable ++ * alternative. ++ * ++ * ++ * __inst_arm(x): emit the specified ARM opcode ++ * __inst_thumb16(x): emit the specified 16-bit Thumb opcode ++ * __inst_thumb32(x): emit the specified 32-bit Thumb opcode ++ * ++ * __inst_arm_thumb16(arm, thumb): emit either the specified arm or ++ * 16-bit Thumb opcode, depending on whether an ARM or Thumb-2 ++ * kernel is being built ++ * ++ * __inst_arm_thumb32(arm, thumb): emit either the specified arm or ++ * 32-bit Thumb opcode, depending on whether an ARM or Thumb-2 ++ * kernel is being built ++ * ++ * ++ * Note that using these macros directly is poor practice. Instead, you ++ * should use them to define human-readable wrapper macros to encode the ++ * instructions that you care about. In code which might run on ARMv7 or ++ * above, you can usually use the __inst_arm_thumb{16,32} macros to ++ * specify the ARM and Thumb alternatives at the same time. This ensures ++ * that the correct opcode gets emitted depending on the instruction set ++ * used for the kernel build. ++ * ++ * Look at opcodes-virt.h for an example of how to use these macros. ++ */ ++#include <linux/stringify.h> ++ ++#define __inst_arm(x) ___inst_arm(___asm_opcode_to_mem_arm(x)) ++#define __inst_thumb32(x) ___inst_thumb32( \ ++ ___asm_opcode_to_mem_thumb16(___asm_opcode_thumb32_first(x)), \ ++ ___asm_opcode_to_mem_thumb16(___asm_opcode_thumb32_second(x)) \ ++) ++#define __inst_thumb16(x) ___inst_thumb16(___asm_opcode_to_mem_thumb16(x)) ++ ++#ifdef CONFIG_THUMB2_BAREBOX ++#define __inst_arm_thumb16(arm_opcode, thumb_opcode) \ ++ __inst_thumb16(thumb_opcode) ++#define __inst_arm_thumb32(arm_opcode, thumb_opcode) \ ++ __inst_thumb32(thumb_opcode) ++#else ++#define __inst_arm_thumb16(arm_opcode, thumb_opcode) __inst_arm(arm_opcode) ++#define __inst_arm_thumb32(arm_opcode, thumb_opcode) __inst_arm(arm_opcode) ++#endif ++ ++/* Helpers for the helpers. Don't use these directly. */ ++#ifdef __ASSEMBLY__ ++#define ___inst_arm(x) .long x ++#define ___inst_thumb16(x) .short x ++#define ___inst_thumb32(first, second) .short first, second ++#else ++#define ___inst_arm(x) ".long " __stringify(x) "\n\t" ++#define ___inst_thumb16(x) ".short " __stringify(x) "\n\t" ++#define ___inst_thumb32(first, second) \ ++ ".short " __stringify(first) ", " __stringify(second) "\n\t" ++#endif ++ ++#endif /* __ASM_ARM_OPCODES_H */ diff --git a/configs/platform-v7a/patches/barebox-2018.11.0/0002-ARM-safely-switch-from-HYP-to-SVC-mode-if-required.patch b/configs/platform-v7a/patches/barebox-2018.11.0/0002-ARM-safely-switch-from-HYP-to-SVC-mode-if-required.patch new file mode 100644 index 0000000..fcd116a --- /dev/null +++ b/configs/platform-v7a/patches/barebox-2018.11.0/0002-ARM-safely-switch-from-HYP-to-SVC-mode-if-required.patch @@ -0,0 +1,88 @@ +From: Lucas Stach <l.stach@pengutronix.de> +Date: Thu, 1 Nov 2018 10:18:38 +0100 +Subject: [PATCH] ARM: safely switch from HYP to SVC mode if required + +This is a port of the Linux safe_svcmode_maskall macro to +the Barebox lowlevel init. + +Signed-off-by: Lucas Stach <l.stach@pengutronix.de> +Tested-by: Roland Hieber <r.hieber@pengutronix.de> +Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> +--- + arch/arm/cpu/lowlevel.S | 18 +++++++++++++++--- + arch/arm/include/asm/system.h | 26 ++++++++++++++++++++++++++ + 2 files changed, 41 insertions(+), 3 deletions(-) + +diff --git a/arch/arm/cpu/lowlevel.S b/arch/arm/cpu/lowlevel.S +index 7696a198e764..43665981e48b 100644 +--- a/arch/arm/cpu/lowlevel.S ++++ b/arch/arm/cpu/lowlevel.S +@@ -1,16 +1,28 @@ + #include <linux/linkage.h> + #include <init.h> + #include <asm/system.h> ++#include <asm/opcodes-virt.h> + + .section ".text_bare_init_","ax" + ENTRY(arm_cpu_lowlevel_init) + /* save lr, since it may be banked away with a processor mode change */ + mov r2, lr ++ + /* set the cpu to SVC32 mode, mask irq and fiq */ + mrs r12, cpsr +- bic r12, r12, #0x1f +- orr r12, r12, #0xd3 +- msr cpsr, r12 ++ eor r12, r12, #HYP_MODE ++ tst r12, #MODE_MASK ++ bic r12, r12, #MODE_MASK ++ orr r12, r12, #(PSR_I_BIT | PSR_F_BIT | SVC_MODE) ++THUMB( orr r12, r12, #PSR_T_BIT ) ++ bne 1f ++ orr r12, r12, #PSR_A_BIT ++ adr lr, 2f ++ msr spsr_cxsf, r12 ++ __MSR_ELR_HYP(14) ++ __ERET ++1: msr cpsr_c, r12 ++2: + + #if __LINUX_ARM_ARCH__ >= 6 + /* +diff --git a/arch/arm/include/asm/system.h b/arch/arm/include/asm/system.h +index 5cf828ea36cb..48242ab473f4 100644 +--- a/arch/arm/include/asm/system.h ++++ b/arch/arm/include/asm/system.h +@@ -60,6 +60,32 @@ + #define CR_AFE (1 << 29) /* Access flag enable */ + #define CR_TE (1 << 30) /* Thumb exception enable */ + ++/* ++ * PSR bits ++ */ ++#define USR_MODE 0x00000010 ++#define FIQ_MODE 0x00000011 ++#define IRQ_MODE 0x00000012 ++#define SVC_MODE 0x00000013 ++#define ABT_MODE 0x00000017 ++#define HYP_MODE 0x0000001a ++#define UND_MODE 0x0000001b ++#define SYSTEM_MODE 0x0000001f ++#define MODE32_BIT 0x00000010 ++#define MODE_MASK 0x0000001f ++ ++#define PSR_T_BIT 0x00000020 ++#define PSR_F_BIT 0x00000040 ++#define PSR_I_BIT 0x00000080 ++#define PSR_A_BIT 0x00000100 ++#define PSR_E_BIT 0x00000200 ++#define PSR_J_BIT 0x01000000 ++#define PSR_Q_BIT 0x08000000 ++#define PSR_V_BIT 0x10000000 ++#define PSR_C_BIT 0x20000000 ++#define PSR_Z_BIT 0x40000000 ++#define PSR_N_BIT 0x80000000 ++ + #ifndef __ASSEMBLY__ + #if __LINUX_ARM_ARCH__ >= 7 + static inline unsigned int current_el(void) diff --git a/configs/platform-v7a/patches/barebox-2018.11.0/0003-ARM-allow-secure-monitor-code-to-be-built-without-PS.patch b/configs/platform-v7a/patches/barebox-2018.11.0/0003-ARM-allow-secure-monitor-code-to-be-built-without-PS.patch new file mode 100644 index 0000000..eed9e52 --- /dev/null +++ b/configs/platform-v7a/patches/barebox-2018.11.0/0003-ARM-allow-secure-monitor-code-to-be-built-without-PS.patch @@ -0,0 +1,37 @@ +From: Lucas Stach <l.stach@pengutronix.de> +Date: Thu, 1 Nov 2018 10:18:39 +0100 +Subject: [PATCH] ARM: allow secure monitor code to be built without PSCI + +The hyp mode handling added in the secure monitor code is also useful +when Barebox doesn't have PSCI control. Allow to build without PSCI. + +Signed-off-by: Lucas Stach <l.stach@pengutronix.de> +Tested-by: Roland Hieber <r.hieber@pengutronix.de> +Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> +--- + arch/arm/cpu/sm_as.S | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/arch/arm/cpu/sm_as.S b/arch/arm/cpu/sm_as.S +index 09580e75de5f..0d01e1bf2435 100644 +--- a/arch/arm/cpu/sm_as.S ++++ b/arch/arm/cpu/sm_as.S +@@ -129,7 +129,9 @@ secure_monitor: + sub sp, sp, #4*4 @ allocate result structure on stack + mov r12, sp + push {r4-r6, r12} ++#ifdef CONFIG_ARM_PSCI + bl psci_entry ++#endif + pop {r4-r6, r12} + ldm r12, {r0-r3} + add sp, sp, #4*4 +@@ -163,6 +165,8 @@ ENTRY(psci_cpu_entry) + mcr p15, 0, r0, c1, c0, 1 @ ACTLR + + bl secure_monitor_stack_setup ++#ifdef CONFIG_ARM_PSCI + bl psci_cpu_entry_c ++#endif + + ENDPROC(psci_cpu_entry) diff --git a/configs/platform-v7a/patches/barebox-2018.11.0/0004-ARM-add-file-for-HYP-mode-related-setup.patch b/configs/platform-v7a/patches/barebox-2018.11.0/0004-ARM-add-file-for-HYP-mode-related-setup.patch new file mode 100644 index 0000000..8047922 --- /dev/null +++ b/configs/platform-v7a/patches/barebox-2018.11.0/0004-ARM-add-file-for-HYP-mode-related-setup.patch @@ -0,0 +1,193 @@ +From: Lucas Stach <l.stach@pengutronix.de> +Date: Thu, 1 Nov 2018 10:18:40 +0100 +Subject: [PATCH] ARM: add file for HYP mode related setup + +This adds routines to add hyp mode vectors and switch back to HYP +mode from SVC. This is needed in both the PBL and Barebox proper. + +Signed-off-by: Lucas Stach <l.stach@pengutronix.de> +Tested-by: Roland Hieber <r.hieber@pengutronix.de> +Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> +--- + arch/arm/cpu/Makefile | 3 + + arch/arm/cpu/hyp.S | 116 ++++++++++++++++++++++++++++++++++ + arch/arm/cpu/sm_as.S | 11 ---- + arch/arm/include/asm/secure.h | 3 + + 4 files changed, 122 insertions(+), 11 deletions(-) + create mode 100644 arch/arm/cpu/hyp.S + +diff --git a/arch/arm/cpu/Makefile b/arch/arm/cpu/Makefile +index 874d723e2cee..0a403bc981c5 100644 +--- a/arch/arm/cpu/Makefile ++++ b/arch/arm/cpu/Makefile +@@ -4,6 +4,9 @@ obj-$(CONFIG_ARM_EXCEPTIONS) += exceptions$(S64).o interrupts$(S64).o + obj-$(CONFIG_MMU) += mmu$(S64).o + lwl-y += lowlevel$(S64).o + obj-pbl-$(CONFIG_MMU) += mmu-early$(S64).o ++obj-pbl-$(CONFIG_CPU_32v7) += hyp.o ++AFLAGS_hyp.o :=-Wa,-march=armv7-a -Wa,-mcpu=all ++AFLAGS_pbl-hyp.o :=-Wa,-march=armv7-a -Wa,-mcpu=all + + obj-y += start.o entry.o + +diff --git a/arch/arm/cpu/hyp.S b/arch/arm/cpu/hyp.S +new file mode 100644 +index 000000000000..1314b56eab25 +--- /dev/null ++++ b/arch/arm/cpu/hyp.S +@@ -0,0 +1,116 @@ ++#include <linux/linkage.h> ++#include <asm/system.h> ++#include <asm/opcodes-virt.h> ++#include <init.h> ++ ++.arch_extension sec ++.arch_extension virt ++ ++__BARE_INIT ++ ++.data ++ .align 2 ++ENTRY(__boot_cpu_mode) ++ .long 0 ++.text ++ ++ENTRY(__hyp_install) ++ mrs r12, cpsr ++ and r12, r12, #MODE_MASK ++ ++ @ Save the initial CPU state ++ adr r0, .L__boot_cpu_mode_offset ++ ldr r1, [r0] ++ str r12, [r0, r1] ++ ++ cmp r12, #HYP_MODE ++ movne pc, lr @ give up if the CPU is not in HYP mode ++ ++ @ Now install the hypervisor stub: ++ adr r12, __hyp_vectors ++ mcr p15, 4, r12, c12, c0, 0 @ set hypervisor vector base (HVBAR) ++ ++ @ Disable all traps, so we don't get any nasty surprise ++ mov r12, #0 ++ mcr p15, 4, r12, c1, c1, 0 @ HCR ++ mcr p15, 4, r12, c1, c1, 2 @ HCPTR ++ mcr p15, 4, r12, c1, c1, 3 @ HSTR ++ ++THUMB( orr r12, #(1 << 30) ) @ HSCTLR.TE ++ mcr p15, 4, r12, c1, c0, 0 @ HSCTLR ++ ++ mrc p15, 4, r12, c1, c1, 1 @ HDCR ++ and r12, #0x1f @ Preserve HPMN ++ mcr p15, 4, r12, c1, c1, 1 @ HDCR ++ ++ @ Make sure NS-SVC is initialised appropriately ++ mrc p15, 0, r12, c1, c0, 0 @ SCTLR ++ orr r12, #(1 << 5) @ CP15 barriers enabled ++ bic r12, #(3 << 7) @ Clear SED/ITD for v8 (RES0 for v7) ++ bic r12, #(3 << 19) @ WXN and UWXN disabled ++ mcr p15, 0, r12, c1, c0, 0 @ SCTLR ++ ++ mrc p15, 0, r12, c0, c0, 0 @ MIDR ++ mcr p15, 4, r12, c0, c0, 0 @ VPIDR ++ ++ mrc p15, 0, r12, c0, c0, 5 @ MPIDR ++ mcr p15, 4, r12, c0, c0, 5 @ VMPIDR ++ bx lr ++ENDPROC(__hyp_install) ++ ++ENTRY(armv7_hyp_install) ++ mov r2, lr ++ ++ bl __hyp_install ++ ++ /* set the cpu to SVC32 mode, mask irq and fiq */ ++ mrs r12, cpsr ++ eor r12, r12, #HYP_MODE ++ tst r12, #MODE_MASK ++ bic r12, r12, #MODE_MASK ++ orr r12, r12, #(PSR_I_BIT | PSR_F_BIT | SVC_MODE) ++THUMB( orr r12, r12, #PSR_T_BIT ) ++ bne 1f ++ orr r12, r12, #PSR_A_BIT ++ adr lr, 2f ++ msr spsr_cxsf, r12 ++ __MSR_ELR_HYP(14) ++ __ERET ++1: msr cpsr_c, r12 ++2: ++ mov pc, r2 ++ENDPROC(armv7_hyp_install) ++ ++ENTRY(armv7_switch_to_hyp) ++ mov r0, lr ++ mov r1, sp @ save SVC copy of LR and SP ++ isb ++ hvc #0 @ for older asm: .byte 0x70, 0x00, 0x40, 0xe1 ++ mov sp, r1 ++ mov lr, r0 @ restore SVC copy of LR and SP ++ ++ bx lr ++ENDPROC(armv7_switch_to_hyp) ++ ++.align 2 ++.L__boot_cpu_mode_offset: ++ .long __boot_cpu_mode - . ++ ++/* The HYP trap is crafted to match armv7_switch_to_hyp() */ ++__hyp_do_trap: ++ mov lr, r0 ++ mov sp, r1 ++ bx lr ++ENDPROC(__hyp_do_trap) ++ ++.align 5 ++__hyp_vectors: ++__hyp_reset: W(b) . ++__hyp_und: W(b) . ++__hyp_svc: W(b) . ++__hyp_pabort: W(b) . ++__hyp_dabort: W(b) . ++__hyp_trap: W(b) __hyp_do_trap ++__hyp_irq: W(b) . ++__hyp_fiq: W(b) . ++ENDPROC(__hyp_vectors) +diff --git a/arch/arm/cpu/sm_as.S b/arch/arm/cpu/sm_as.S +index 0d01e1bf2435..de6cd0406f4f 100644 +--- a/arch/arm/cpu/sm_as.S ++++ b/arch/arm/cpu/sm_as.S +@@ -148,17 +148,6 @@ hyp_trap: + mov pc, lr @ do no switch modes, but + @ return to caller + +-ENTRY(armv7_switch_to_hyp) +- mov r0, lr +- mov r1, sp @ save SVC copy of LR and SP +- isb +- hvc #0 @ for older asm: .byte 0x70, 0x00, 0x40, 0xe1 +- mov sp, r1 +- mov lr, r0 @ restore SVC copy of LR and SP +- +- bx lr +-ENDPROC(armv7_switch_to_hyp) +- + ENTRY(psci_cpu_entry) + mrc p15, 0, r0, c1, c0, 1 @ ACTLR + orr r0, r0, #(1 << 6) @ Set SMP bit +diff --git a/arch/arm/include/asm/secure.h b/arch/arm/include/asm/secure.h +index a4cb1f6c1c44..663d81ea27dd 100644 +--- a/arch/arm/include/asm/secure.h ++++ b/arch/arm/include/asm/secure.h +@@ -5,9 +5,12 @@ + + int armv7_secure_monitor_install(void); + int __armv7_secure_monitor_install(void); ++ + void armv7_switch_to_hyp(void); ++void armv7_hyp_install(void); + + extern unsigned char secure_monitor_init_vectors[]; ++extern int __boot_cpu_mode; + + enum arm_security_state { + ARM_STATE_SECURE, diff --git a/configs/platform-v7a/patches/barebox-2018.11.0/0005-ARM-don-t-try-to-install-secure-monitor-when-entered.patch b/configs/platform-v7a/patches/barebox-2018.11.0/0005-ARM-don-t-try-to-install-secure-monitor-when-entered.patch new file mode 100644 index 0000000..b82de4b --- /dev/null +++ b/configs/platform-v7a/patches/barebox-2018.11.0/0005-ARM-don-t-try-to-install-secure-monitor-when-entered.patch @@ -0,0 +1,30 @@ +From: Lucas Stach <l.stach@pengutronix.de> +Date: Thu, 1 Nov 2018 10:18:41 +0100 +Subject: [PATCH] ARM: don't try to install secure monitor when entered in HYP + mode + +When Barebox has been entered in HYP mode, the CPU is already switched +to the non-secure world and it's not possible for Barebox to install +it's own secure monitor. + +Signed-off-by: Lucas Stach <l.stach@pengutronix.de> +Tested-by: Roland Hieber <r.hieber@pengutronix.de> +Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> +--- + arch/arm/cpu/sm.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/arch/arm/cpu/sm.c b/arch/arm/cpu/sm.c +index cb0bac106b5f..1246d8e3a441 100644 +--- a/arch/arm/cpu/sm.c ++++ b/arch/arm/cpu/sm.c +@@ -184,6 +184,9 @@ int armv7_secure_monitor_install(void) + return -EINVAL; + } + ++ if (__boot_cpu_mode == HYP_MODE) ++ return 0; ++ + mmuon = get_cr() & CR_M; + + vbar = get_vbar(); diff --git a/configs/platform-v7a/patches/barebox-2018.11.0/0006-ARM-default-to-starting-kernel-in-HYP-mode-when-ente.patch b/configs/platform-v7a/patches/barebox-2018.11.0/0006-ARM-default-to-starting-kernel-in-HYP-mode-when-ente.patch new file mode 100644 index 0000000..1de95c1 --- /dev/null +++ b/configs/platform-v7a/patches/barebox-2018.11.0/0006-ARM-default-to-starting-kernel-in-HYP-mode-when-ente.patch @@ -0,0 +1,31 @@ +From: Lucas Stach <l.stach@pengutronix.de> +Date: Thu, 1 Nov 2018 10:18:42 +0100 +Subject: [PATCH] ARM: default to starting kernel in HYP mode when entered in + HYP + +When Barebox has been entered in HYP mode, there is a high chance that +the kernel is intended to be started in HYP mode also. Get this +default into place. + +Signed-off-by: Lucas Stach <l.stach@pengutronix.de> +Tested-by: Roland Hieber <r.hieber@pengutronix.de> +Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> +--- + arch/arm/cpu/sm.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/arch/arm/cpu/sm.c b/arch/arm/cpu/sm.c +index 1246d8e3a441..6fad30adabc9 100644 +--- a/arch/arm/cpu/sm.c ++++ b/arch/arm/cpu/sm.c +@@ -262,6 +262,9 @@ static int sm_init(void) + bootm_secure_state_names, + ARRAY_SIZE(bootm_secure_state_names)); + ++ if (__boot_cpu_mode == HYP_MODE) ++ bootm_secure_state = ARM_STATE_HYP; ++ + return 0; + } + device_initcall(sm_init); +\ No newline at end of file diff --git a/configs/platform-v7a/patches/barebox-2018.11.0/0007-ARM-install-HYP-vectors-at-PBL-and-Barebox-entry.patch b/configs/platform-v7a/patches/barebox-2018.11.0/0007-ARM-install-HYP-vectors-at-PBL-and-Barebox-entry.patch new file mode 100644 index 0000000..10615e9 --- /dev/null +++ b/configs/platform-v7a/patches/barebox-2018.11.0/0007-ARM-install-HYP-vectors-at-PBL-and-Barebox-entry.patch @@ -0,0 +1,105 @@ +From: Lucas Stach <l.stach@pengutronix.de> +Date: Thu, 1 Nov 2018 10:18:43 +0100 +Subject: [PATCH] ARM: install HYP vectors at PBL and Barebox entry + +If the CPU was already in HYP mode when entering the PBL, install a +simple trap handler to allow to get back from SVC to HYP before +switching to HYP mode. + +As the vectors are part of the currently running binary, we need to +do the same setup when starting the real Barebox binary, as the PBL +setup vectors might get overwritten. To do this we trap into HYP mode +just before jumping to Barebox and then re-do the vector setup and +SVC switch as the first thing in Barebox proper. + +Signed-off-by: Lucas Stach <l.stach@pengutronix.de> +Tested-by: Roland Hieber <r.hieber@pengutronix.de> +Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> +--- + arch/arm/cpu/lowlevel.S | 5 +++++ + arch/arm/cpu/start-pbl.c | 4 ++++ + arch/arm/cpu/start.c | 5 +++++ + arch/arm/cpu/uncompress.c | 4 ++++ + 4 files changed, 18 insertions(+) + +diff --git a/arch/arm/cpu/lowlevel.S b/arch/arm/cpu/lowlevel.S +index 43665981e48b..3b52644e43e1 100644 +--- a/arch/arm/cpu/lowlevel.S ++++ b/arch/arm/cpu/lowlevel.S +@@ -8,6 +8,11 @@ ENTRY(arm_cpu_lowlevel_init) + /* save lr, since it may be banked away with a processor mode change */ + mov r2, lr + ++#ifdef CONFIG_CPU_32v7 ++ /* careful: the hyp install corrupts r0 and r1 */ ++ bl __hyp_install ++#endif ++ + /* set the cpu to SVC32 mode, mask irq and fiq */ + mrs r12, cpsr + eor r12, r12, #HYP_MODE +diff --git a/arch/arm/cpu/start-pbl.c b/arch/arm/cpu/start-pbl.c +index 16159d7f9d51..48a808645671 100644 +--- a/arch/arm/cpu/start-pbl.c ++++ b/arch/arm/cpu/start-pbl.c +@@ -26,6 +26,7 @@ + #include <asm/barebox-arm-head.h> + #include <asm-generic/memory_layout.h> + #include <asm/sections.h> ++#include <asm/secure.h> + #include <asm/cache.h> + #include <asm/mmu.h> + #include <asm/unaligned.h> +@@ -98,5 +99,8 @@ __noreturn void barebox_single_pbl_start(unsigned long membase, + else + barebox = (void *)barebox_base; + ++ if (IS_ENABLED(CONFIG_CPU_V7) && __boot_cpu_mode == HYP_MODE) ++ armv7_switch_to_hyp(); ++ + barebox(membase, memsize, boarddata); + } +diff --git a/arch/arm/cpu/start.c b/arch/arm/cpu/start.c +index 64bd942ad764..a79d64eaa6e6 100644 +--- a/arch/arm/cpu/start.c ++++ b/arch/arm/cpu/start.c +@@ -24,6 +24,7 @@ + #include <asm/barebox-arm-head.h> + #include <asm-generic/memory_layout.h> + #include <asm/sections.h> ++#include <asm/secure.h> + #include <asm/unaligned.h> + #include <asm/cache.h> + #include <asm/mmu.h> +@@ -147,6 +148,10 @@ __noreturn void barebox_non_pbl_start(unsigned long membase, + unsigned long barebox_base = arm_mem_barebox_image(membase, + endmem, + barebox_size); ++ ++ if (IS_ENABLED(CONFIG_CPU_V7)) ++ armv7_hyp_install(); ++ + if (IS_ENABLED(CONFIG_RELOCATABLE)) + relocate_to_adr(barebox_base); + +diff --git a/arch/arm/cpu/uncompress.c b/arch/arm/cpu/uncompress.c +index 43b49b42120b..048bca0c9599 100644 +--- a/arch/arm/cpu/uncompress.c ++++ b/arch/arm/cpu/uncompress.c +@@ -27,6 +27,7 @@ + #include <asm/barebox-arm-head.h> + #include <asm-generic/memory_layout.h> + #include <asm/sections.h> ++#include <asm/secure.h> + #include <asm/cache.h> + #include <asm/mmu.h> + #include <asm/unaligned.h> +@@ -105,5 +106,8 @@ void __noreturn barebox_multi_pbl_start(unsigned long membase, + + pr_debug("jumping to uncompressed image at 0x%p\n", barebox); + ++ if (IS_ENABLED(CONFIG_CPU_V7) && __boot_cpu_mode == HYP_MODE) ++ armv7_switch_to_hyp(); ++ + barebox(membase, memsize, boarddata); + } diff --git a/configs/platform-v7a/patches/barebox-2018.11.0/0008-ARM-rpi-add-revision-IDs-for-Pi-3-Model-B-and-Pi-Zer.patch b/configs/platform-v7a/patches/barebox-2018.11.0/0008-ARM-rpi-add-revision-IDs-for-Pi-3-Model-B-and-Pi-Zer.patch new file mode 100644 index 0000000..9aa90b5 --- /dev/null +++ b/configs/platform-v7a/patches/barebox-2018.11.0/0008-ARM-rpi-add-revision-IDs-for-Pi-3-Model-B-and-Pi-Zer.patch @@ -0,0 +1,41 @@ +From: Enrico Joerns <ejo@pengutronix.de> +Date: Thu, 1 Nov 2018 10:18:44 +0100 +Subject: [PATCH] ARM: rpi: add revision IDs for Pi 3 Model B and Pi Zero + +Signed-off-by: Enrico Joerns <ejo@pengutronix.de> +Signed-off-by: Lucas Stach <l.stach@pengutronix.de> +Tested-by: Roland Hieber <r.hieber@pengutronix.de> +Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> +--- + arch/arm/boards/raspberry-pi/rpi-common.c | 2 ++ + arch/arm/mach-bcm283x/include/mach/mbox.h | 4 ++++ + 2 files changed, 6 insertions(+) + +diff --git a/arch/arm/boards/raspberry-pi/rpi-common.c b/arch/arm/boards/raspberry-pi/rpi-common.c +index 6e375bc984de..3baed6525586 100644 +--- a/arch/arm/boards/raspberry-pi/rpi-common.c ++++ b/arch/arm/boards/raspberry-pi/rpi-common.c +@@ -174,6 +174,8 @@ const struct rpi_model rpi_models_old_scheme[] = { + const struct rpi_model rpi_models_new_scheme[] = { + RPI_MODEL(0, "Unknown model", NULL), + RPI_MODEL(BCM2836_BOARD_REV_2_B, "2 Model B", rpi_b_plus_init), ++ RPI_MODEL(BCM2837_BOARD_REV_3_B, "3 Model B", rpi_b_plus_init), ++ RPI_MODEL(BCM2835_BOARD_REV_ZERO, "Zero", rpi_b_plus_init), + }; + + static int rpi_board_rev = 0; +diff --git a/arch/arm/mach-bcm283x/include/mach/mbox.h b/arch/arm/mach-bcm283x/include/mach/mbox.h +index 2b5aea88ee0a..0d1ac074e328 100644 +--- a/arch/arm/mach-bcm283x/include/mach/mbox.h ++++ b/arch/arm/mach-bcm283x/include/mach/mbox.h +@@ -129,6 +129,10 @@ struct bcm2835_mbox_tag_hdr { + + /* RPi 2 */ + #define BCM2836_BOARD_REV_2_B 0x4 ++/* RPi 3 */ ++#define BCM2837_BOARD_REV_3_B 0x8 ++/* Zero */ ++#define BCM2835_BOARD_REV_ZERO 0x9 + + /* + * 0x2..0xf from: diff --git a/configs/platform-v7a/patches/barebox-2018.11.0/0009-ARM-rpi-add-raspberry-pi-3-support.patch b/configs/platform-v7a/patches/barebox-2018.11.0/0009-ARM-rpi-add-raspberry-pi-3-support.patch new file mode 100644 index 0000000..8e8d76a --- /dev/null +++ b/configs/platform-v7a/patches/barebox-2018.11.0/0009-ARM-rpi-add-raspberry-pi-3-support.patch @@ -0,0 +1,141 @@ +From: Lucas Stach <l.stach@pengutronix.de> +Date: Thu, 1 Nov 2018 10:18:45 +0100 +Subject: [PATCH] ARM: rpi: add raspberry pi 3 support + +This adds basic support at the same feature level as the other +supported raspberry pi boards. + +Signed-off-by: Lucas Stach <l.stach@pengutronix.de> +Tested-by: Roland Hieber <r.hieber@pengutronix.de> +Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> +--- + arch/arm/boards/raspberry-pi/lowlevel.c | 14 ++++++++++++-- + arch/arm/configs/rpi_defconfig | 2 ++ + arch/arm/dts/Makefile | 1 + + arch/arm/dts/bcm2837-rpi-3.dts | 16 ++++++++++++++++ + arch/arm/mach-bcm283x/Kconfig | 6 ++++++ + arch/arm/mach-bcm283x/core.c | 1 + + images/Makefile.bcm283x | 4 ++++ + 7 files changed, 42 insertions(+), 2 deletions(-) + create mode 100644 arch/arm/dts/bcm2837-rpi-3.dts + +diff --git a/arch/arm/boards/raspberry-pi/lowlevel.c b/arch/arm/boards/raspberry-pi/lowlevel.c +index cbc6caa4b9ed..34c9350920e9 100644 +--- a/arch/arm/boards/raspberry-pi/lowlevel.c ++++ b/arch/arm/boards/raspberry-pi/lowlevel.c +@@ -1,7 +1,7 @@ ++#include <asm/barebox-arm.h> ++#include <asm/cache.h> + #include <common.h> + #include <linux/sizes.h> +-#include <asm/barebox-arm.h> +-#include <asm/barebox-arm-head.h> + #include <mach/platform.h> + + extern char __dtb_bcm2835_rpi_start[]; +@@ -23,3 +23,13 @@ ENTRY_FUNCTION(start_raspberry_pi2, r0, r1, r2) + + barebox_arm_entry(BCM2835_SDRAM_BASE, SZ_512M, fdt); + } ++ ++extern char __dtb_bcm2837_rpi_3_start[]; ++ENTRY_FUNCTION(start_raspberry_pi3, r0, r1, r2) ++{ ++ void *fdt = __dtb_bcm2837_rpi_3_start + get_runtime_offset(); ++ ++ arm_cpu_lowlevel_init(); ++ ++ barebox_arm_entry(BCM2835_SDRAM_BASE, SZ_512M, fdt); ++} +diff --git a/arch/arm/configs/rpi_defconfig b/arch/arm/configs/rpi_defconfig +index f3aef4290425..cd88b4ac751c 100644 +--- a/arch/arm/configs/rpi_defconfig ++++ b/arch/arm/configs/rpi_defconfig +@@ -1,9 +1,11 @@ + CONFIG_ARCH_BCM283X=y + CONFIG_MACH_RPI=y + CONFIG_MACH_RPI2=y ++CONFIG_MACH_RPI3=y + CONFIG_AEABI=y + CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y + CONFIG_ARM_UNWIND=y ++CONFIG_IMAGE_COMPRESSION_NONE=y + CONFIG_MMU=y + CONFIG_MALLOC_TLSF=y + CONFIG_KALLSYMS=y +diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile +index 1caeca35b484..4e063902c635 100644 +--- a/arch/arm/dts/Makefile ++++ b/arch/arm/dts/Makefile +@@ -71,6 +71,7 @@ pbl-dtb-$(CONFIG_MACH_PHYTEC_SOM_RK3288) += rk3288-phycore-som.dtb.o + pbl-dtb-$(CONFIG_MACH_REALQ7) += imx6q-dmo-edmqmx6.dtb.o + pbl-dtb-$(CONFIG_MACH_RPI) += bcm2835-rpi.dtb.o + pbl-dtb-$(CONFIG_MACH_RPI2) += bcm2836-rpi-2.dtb.o ++pbl-dtb-$(CONFIG_MACH_RPI3) += bcm2837-rpi-3.dtb.o + pbl-dtb-$(CONFIG_MACH_SABRELITE) += imx6q-sabrelite.dtb.o imx6dl-sabrelite.dtb.o + pbl-dtb-$(CONFIG_MACH_SABRESD) += imx6q-sabresd.dtb.o + pbl-dtb-$(CONFIG_MACH_FREESCALE_IMX6SX_SABRESDB) += imx6sx-sdb.dtb.o +diff --git a/arch/arm/dts/bcm2837-rpi-3.dts b/arch/arm/dts/bcm2837-rpi-3.dts +new file mode 100644 +index 000000000000..d6ffc369122c +--- /dev/null ++++ b/arch/arm/dts/bcm2837-rpi-3.dts +@@ -0,0 +1,16 @@ ++#include <arm64/broadcom/bcm2837-rpi-3-b.dts> ++ ++/ { ++ chosen { ++ stdout-path = &uart0; ++ }; ++ ++ memory { ++ reg = <0x0 0x0>; ++ }; ++}; ++ ++&uart0 { ++ status = "okay"; ++ /delete-node/ bluetooth; ++}; +diff --git a/arch/arm/mach-bcm283x/Kconfig b/arch/arm/mach-bcm283x/Kconfig +index 1457f114ccaa..af2f88c47acb 100644 +--- a/arch/arm/mach-bcm283x/Kconfig ++++ b/arch/arm/mach-bcm283x/Kconfig +@@ -19,6 +19,12 @@ config MACH_RPI2 + select CPU_V7 + select MACH_RPI_COMMON + ++config MACH_RPI3 ++ bool "RaspberryPi 3 (BCM2837/CORTEX-A53)" ++ select CPU_V7 ++ select MACH_RPI_COMMON ++ select ARM_SECURE_MONITOR ++ + endmenu + + config MACH_RPI_DEBUG_UART_BASE +diff --git a/arch/arm/mach-bcm283x/core.c b/arch/arm/mach-bcm283x/core.c +index fddcb0d1a1d4..26f0996b1cb8 100644 +--- a/arch/arm/mach-bcm283x/core.c ++++ b/arch/arm/mach-bcm283x/core.c +@@ -41,6 +41,7 @@ static int bcm2835_clk_init(void) + clk = clk_fixed("uart0-pl0110", 3 * 1000 * 1000); + clk_register_clkdev(clk, NULL, "uart0-pl0110"); + clk_register_clkdev(clk, NULL, "20201000.serial"); ++ clk_register_clkdev(clk, NULL, "3f201000.serial"); + + clk = clk_fixed("bcm2835-cs", 1 * 1000 * 1000); + clk_register_clkdev(clk, NULL, "bcm2835-cs"); +diff --git a/images/Makefile.bcm283x b/images/Makefile.bcm283x +index d59ef043f05c..d14e648926ac 100644 +--- a/images/Makefile.bcm283x ++++ b/images/Makefile.bcm283x +@@ -9,3 +9,7 @@ image-$(CONFIG_MACH_RPI) += barebox-raspberry-pi-1.img + pblx-$(CONFIG_MACH_RPI2) += start_raspberry_pi2 + FILE_barebox-raspberry-pi-2.img = start_raspberry_pi2.pblx + image-$(CONFIG_MACH_RPI2) += barebox-raspberry-pi-2.img ++ ++pblx-$(CONFIG_MACH_RPI3) += start_raspberry_pi3 ++FILE_barebox-raspberry-pi-3.img = start_raspberry_pi3.pblx ++image-$(CONFIG_MACH_RPI3) += barebox-raspberry-pi-3.img +\ No newline at end of file diff --git a/configs/platform-v7a/patches/barebox-2018.11.0/0010-ARM-rpi-autosize-malloc-area.patch b/configs/platform-v7a/patches/barebox-2018.11.0/0010-ARM-rpi-autosize-malloc-area.patch new file mode 100644 index 0000000..da498ba --- /dev/null +++ b/configs/platform-v7a/patches/barebox-2018.11.0/0010-ARM-rpi-autosize-malloc-area.patch @@ -0,0 +1,25 @@ +From: Lucas Stach <l.stach@pengutronix.de> +Date: Thu, 1 Nov 2018 10:18:46 +0100 +Subject: [PATCH] ARM: rpi: autosize malloc area + +Autosize the malloc area according to the available RAM size. + +Signed-off-by: Lucas Stach <l.stach@pengutronix.de> +Tested-by: Roland Hieber <r.hieber@pengutronix.de> +Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> +--- + arch/arm/configs/rpi_defconfig | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/arch/arm/configs/rpi_defconfig b/arch/arm/configs/rpi_defconfig +index cd88b4ac751c..2bb615849324 100644 +--- a/arch/arm/configs/rpi_defconfig ++++ b/arch/arm/configs/rpi_defconfig +@@ -7,6 +7,7 @@ CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y + CONFIG_ARM_UNWIND=y + CONFIG_IMAGE_COMPRESSION_NONE=y + CONFIG_MMU=y ++CONFIG_MALLOC_SIZE=0x0 + CONFIG_MALLOC_TLSF=y + CONFIG_KALLSYMS=y + CONFIG_PROMPT="R-Pi> " diff --git a/configs/platform-v7a/patches/barebox-2018.05.0/0101-ARM-imx-add-support-for-Udoo-Neo-full.patch b/configs/platform-v7a/patches/barebox-2018.11.0/0101-ARM-imx-add-support-for-Udoo-Neo-full.patch similarity index 93% rename from configs/platform-v7a/patches/barebox-2018.05.0/0101-ARM-imx-add-support-for-Udoo-Neo-full.patch rename to configs/platform-v7a/patches/barebox-2018.11.0/0101-ARM-imx-add-support-for-Udoo-Neo-full.patch index 06c356b..9f99a39 100644 --- a/configs/platform-v7a/patches/barebox-2018.05.0/0101-ARM-imx-add-support-for-Udoo-Neo-full.patch +++ b/configs/platform-v7a/patches/barebox-2018.11.0/0101-ARM-imx-add-support-for-Udoo-Neo-full.patch @@ -26,10 +26,10 @@ Forwarded: id:20170627190317.19253-1-uwe@kleine-koenig.org create mode 100644 arch/arm/dts/imx6sx-udoo-neo-full.dts diff --git a/arch/arm/boards/Makefile b/arch/arm/boards/Makefile -index 30f4c299f1a1..f70fbac8f379 100644 +index c737cf34138c..9aee9bf0993a 100644 --- a/arch/arm/boards/Makefile +++ b/arch/arm/boards/Makefile -@@ -135,6 +135,7 @@ obj-$(CONFIG_MACH_TX51) += karo-tx51/ +@@ -137,6 +137,7 @@ obj-$(CONFIG_MACH_TX51) += karo-tx51/ obj-$(CONFIG_MACH_TX53) += karo-tx53/ obj-$(CONFIG_MACH_TX6X) += karo-tx6x/ obj-$(CONFIG_MACH_UDOO) += udoo/ @@ -254,10 +254,10 @@ index 000000000000..e78c2685fd78 + imx6sx_barebox_entry(fdt); +} diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile -index e60e0ea0c6be..b87e27c8c263 100644 +index 4e063902c635..3d34a78f7878 100644 --- a/arch/arm/dts/Makefile +++ b/arch/arm/dts/Makefile -@@ -93,6 +93,7 @@ pbl-dtb-$(CONFIG_MACH_TX6X) += imx6dl-tx6u.dtb.o +@@ -97,6 +97,7 @@ pbl-dtb-$(CONFIG_MACH_TX6X) += imx6dl-tx6u.dtb.o pbl-dtb-$(CONFIG_MACH_TX6X) += imx6q-tx6q.dtb.o pbl-dtb-$(CONFIG_MACH_TURRIS_OMNIA) += armada-385-turris-omnia-bb.dtb.o pbl-dtb-$(CONFIG_MACH_UDOO) += imx6q-udoo.dtb.o @@ -276,10 +276,10 @@ index 000000000000..9203d40207c5 +/{ +}; diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig -index 9052a94ea071..9ec95bb6df09 100644 +index 63a92bd5bd1d..ab515ecf2286 100644 --- a/arch/arm/mach-imx/Kconfig +++ b/arch/arm/mach-imx/Kconfig -@@ -377,6 +377,10 @@ config MACH_UDOO +@@ -380,6 +380,10 @@ config MACH_UDOO bool "Freescale i.MX6 UDOO Board" select ARCH_IMX6 @@ -291,22 +291,22 @@ index 9052a94ea071..9ec95bb6df09 100644 bool "Variscite i.MX6 Quad SOM" select ARCH_IMX6 diff --git a/arch/arm/mach-imx/include/mach/esdctl.h b/arch/arm/mach-imx/include/mach/esdctl.h -index 66dcc8974cfb..bd6092febca4 100644 +index bc6c7339535e..18c4a2836007 100644 --- a/arch/arm/mach-imx/include/mach/esdctl.h +++ b/arch/arm/mach-imx/include/mach/esdctl.h -@@ -137,6 +137,7 @@ void __noreturn imx51_barebox_entry(void *boarddata); - void __noreturn imx53_barebox_entry(void *boarddata); - void __noreturn imx6q_barebox_entry(void *boarddata); - void __noreturn imx6ul_barebox_entry(void *boarddata); +@@ -141,6 +141,7 @@ void __noreturn imx6ul_barebox_entry(void *boarddata); + void __noreturn vf610_barebox_entry(void *boarddata); + void __noreturn imx8mq_barebox_entry(void *boarddata); + void __noreturn imx7d_barebox_entry(void *boarddata); +#define imx6sx_barebox_entry(boarddata) imx6ul_barebox_entry(boarddata) void imx_esdctl_disable(void); #endif diff --git a/images/Makefile.imx b/images/Makefile.imx -index 90da95d4d025..6420490811f9 100644 +index 341ce8506d88..c32f78b7e184 100644 --- a/images/Makefile.imx +++ b/images/Makefile.imx -@@ -275,6 +275,11 @@ CFG_start_imx6q_sabresd.pblx.imximg = $(board)/freescale-mx6-sabresd/flash-heade +@@ -271,6 +271,11 @@ CFG_start_imx6q_sabresd.pblx.imximg = $(board)/freescale-mx6-sabresd/flash-heade FILE_barebox-freescale-imx6q-sabresd.img = start_imx6q_sabresd.pblx.imximg image-$(CONFIG_MACH_SABRESD) += barebox-freescale-imx6q-sabresd.img diff --git a/configs/platform-v7a/patches/barebox-2018.11.0/0201-Release-pengutronix_multiv7-20181122-1.patch b/configs/platform-v7a/patches/barebox-2018.11.0/0201-Release-pengutronix_multiv7-20181122-1.patch new file mode 100644 index 0000000..bd444f0 --- /dev/null +++ b/configs/platform-v7a/patches/barebox-2018.11.0/0201-Release-pengutronix_multiv7-20181122-1.patch @@ -0,0 +1,22 @@ +From: Rouven Czerwinski <r.czerwinski@pengutronix.de> +Date: Thu, 22 Nov 2018 12:09:22 +0100 +Subject: [PATCH] Release pengutronix_multiv7/20181122-1 + +Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de> +--- + Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile b/Makefile +index 60a5d5ce11f4..b55ca4b03129 100644 +--- a/Makefile ++++ b/Makefile +@@ -1,7 +1,7 @@ + VERSION = 2018 + PATCHLEVEL = 11 + SUBLEVEL = 0 +-EXTRAVERSION = ++EXTRAVERSION =-20181122-1 + NAME = None + + # *DOCUMENTATION* diff --git a/configs/platform-v7a/patches/barebox-2018.11.0/series b/configs/platform-v7a/patches/barebox-2018.11.0/series new file mode 100644 index 0000000..e056b0c --- /dev/null +++ b/configs/platform-v7a/patches/barebox-2018.11.0/series @@ -0,0 +1,24 @@ +# umpf-base: v2018.11.0 +# umpf-name: pengutronix_multiv7 +# umpf-version: pengutronix_multiv7/20181122-1 +# umpf-topic: v2018.11.0/customers/pengutronix/rpi3 +# umpf-hashinfo: 1bdd9ef32c272ba5501e24ba643107855dd5149c +# umpf-topic-range: d1f223eddbcde31ba2a3f34fc0a1a14f40ea7130..1bdd9ef32c272ba5501e24ba643107855dd5149c +0001-ARM-import-opcode-helpers-from-Linux-kernel.patch +0002-ARM-safely-switch-from-HYP-to-SVC-mode-if-required.patch +0003-ARM-allow-secure-monitor-code-to-be-built-without-PS.patch +0004-ARM-add-file-for-HYP-mode-related-setup.patch +0005-ARM-don-t-try-to-install-secure-monitor-when-entered.patch +0006-ARM-default-to-starting-kernel-in-HYP-mode-when-ente.patch +0007-ARM-install-HYP-vectors-at-PBL-and-Barebox-entry.patch +0008-ARM-rpi-add-revision-IDs-for-Pi-3-Model-B-and-Pi-Zer.patch +0009-ARM-rpi-add-raspberry-pi-3-support.patch +0010-ARM-rpi-autosize-malloc-area.patch +# umpf-topic: v2018.11.0/customers/pengutronix/udoo-neo +# umpf-hashinfo: c5f2e150d7e8d5439458df1a2cab71b25fc36e19 +# umpf-topic-range: 1bdd9ef32c272ba5501e24ba643107855dd5149c..8cacc208f8f6c9071113b12a618a54d7e80b1694 +0101-ARM-imx-add-support-for-Udoo-Neo-full.patch +# umpf-release: pengutronix_multiv7/20181122-1 +# umpf-topic-range: 8cacc208f8f6c9071113b12a618a54d7e80b1694..45c64f6b4690a6b51be1c487de1ffec6472704e1 +0201-Release-pengutronix_multiv7-20181122-1.patch +# umpf-end diff --git a/configs/platform-v7a/platformconfig b/configs/platform-v7a/platformconfig index cdea840..e2c8ac1 100644 --- a/configs/platform-v7a/platformconfig +++ b/configs/platform-v7a/platformconfig @@ -166,6 +166,8 @@ PTXCONF_BAREBOX_AM335X=y PTXCONF_BAREBOX_MX6=y PTXCONF_BAREBOX_RPI2=y PTXCONF_BAREBOX_RPI2_NEEDS_HOST_LZOP=y +PTXCONF_BAREBOX_RPI3=y +# PTXCONF_BAREBOX_RPI3_NEEDS_HOST_LZOP is not set PTXCONF_BAREBOX_VEXPRESS=y PTXCONF_BAREBOX_ARCH_STRING="arm" # PTXCONF_BAREBOX is not set diff --git a/configs/platform-v7a/rules/barebox-am335x-mlo.make b/configs/platform-v7a/rules/barebox-am335x-mlo.make index e71d057..6835d35 100644 --- a/configs/platform-v7a/rules/barebox-am335x-mlo.make +++ b/configs/platform-v7a/rules/barebox-am335x-mlo.make @@ -16,8 +16,8 @@ PACKAGES-$(PTXCONF_BAREBOX_AM335X_MLO) += barebox-am335x-mlo # # Paths and names # -BAREBOX_AM335X_MLO_VERSION := 2018.05.0 -BAREBOX_AM335X_MLO_MD5 := 8286a8ea2cdd88104e5c6762d93d81db +BAREBOX_AM335X_MLO_VERSION := 2018.11.0 +BAREBOX_AM335X_MLO_MD5 := 1472eae302647d1cf7f1c561a6380b43 BAREBOX_AM335X_MLO := barebox-$(BAREBOX_AM335X_MLO_VERSION) BAREBOX_AM335X_MLO_SUFFIX := tar.bz2 BAREBOX_AM335X_MLO_DIR := $(BUILDDIR)/barebox-am335x-mlo-$(BAREBOX_AM335X_MLO_VERSION) diff --git a/configs/platform-v7a/rules/barebox-am335x.make b/configs/platform-v7a/rules/barebox-am335x.make index 2c35ae1..8b3c2a0 100644 --- a/configs/platform-v7a/rules/barebox-am335x.make +++ b/configs/platform-v7a/rules/barebox-am335x.make @@ -16,8 +16,8 @@ PACKAGES-$(PTXCONF_BAREBOX_AM335X) += barebox-am335x # # Paths and names # -BAREBOX_AM335X_VERSION := 2018.05.0 -BAREBOX_AM335X_MD5 := 8286a8ea2cdd88104e5c6762d93d81db +BAREBOX_AM335X_VERSION := 2018.11.0 +BAREBOX_AM335X_MD5 := 1472eae302647d1cf7f1c561a6380b43 BAREBOX_AM335X := barebox-$(BAREBOX_AM335X_VERSION) BAREBOX_AM335X_SUFFIX := tar.bz2 BAREBOX_AM335X_DIR := $(BUILDDIR)/barebox-am335x-$(BAREBOX_AM335X_VERSION) diff --git a/configs/platform-v7a/rules/barebox-mx6.make b/configs/platform-v7a/rules/barebox-mx6.make index 7d7c2ce..3b86ea0 100644 --- a/configs/platform-v7a/rules/barebox-mx6.make +++ b/configs/platform-v7a/rules/barebox-mx6.make @@ -16,8 +16,8 @@ PACKAGES-$(PTXCONF_BAREBOX_MX6) += barebox-mx6 # # Paths and names # -BAREBOX_MX6_VERSION := 2018.05.0 -BAREBOX_MX6_MD5 := 8286a8ea2cdd88104e5c6762d93d81db +BAREBOX_MX6_VERSION := 2018.11.0 +BAREBOX_MX6_MD5 := 1472eae302647d1cf7f1c561a6380b43 BAREBOX_MX6 := barebox-$(BAREBOX_MX6_VERSION) BAREBOX_MX6_SUFFIX := tar.bz2 BAREBOX_MX6_DIR := $(BUILDDIR)/barebox-mx6-$(BAREBOX_MX6_VERSION) diff --git a/configs/platform-v7a/rules/barebox-rpi2.make b/configs/platform-v7a/rules/barebox-rpi2.make index cf9fc00..41990a0 100644 --- a/configs/platform-v7a/rules/barebox-rpi2.make +++ b/configs/platform-v7a/rules/barebox-rpi2.make @@ -16,8 +16,8 @@ PACKAGES-$(PTXCONF_BAREBOX_RPI2) += barebox-rpi2 # # Paths and names # -BAREBOX_RPI2_VERSION := 2018.05.0 -BAREBOX_RPI2_MD5 := 8286a8ea2cdd88104e5c6762d93d81db +BAREBOX_RPI2_VERSION := 2018.11.0 +BAREBOX_RPI2_MD5 := 1472eae302647d1cf7f1c561a6380b43 BAREBOX_RPI2 := barebox-$(BAREBOX_RPI2_VERSION) BAREBOX_RPI2_SUFFIX := tar.bz2 BAREBOX_RPI2_DIR := $(BUILDDIR)/barebox-rpi2-$(BAREBOX_RPI2_VERSION) diff --git a/configs/platform-v7a/rules/barebox-rpi3.make b/configs/platform-v7a/rules/barebox-rpi3.make new file mode 100644 index 0000000..35b7e5b --- /dev/null +++ b/configs/platform-v7a/rules/barebox-rpi3.make @@ -0,0 +1,104 @@ +# -*-makefile-*- +# +# Copyright (C) 2016 by Alexander Aring <aar@pengutronix.de> +# +# See CREDITS for details about who has contributed to this project. +# +# For further information about the PTXdist project and license conditions +# see the README file. +# + +# +# We provide this package +# +PACKAGES-$(PTXCONF_BAREBOX_RPI3) += barebox-rpi3 + +# +# Paths and names +# +BAREBOX_RPI3_VERSION := 2018.11.0 +BAREBOX_RPI3_MD5 := 1472eae302647d1cf7f1c561a6380b43 +BAREBOX_RPI3 := barebox-$(BAREBOX_RPI3_VERSION) +BAREBOX_RPI3_SUFFIX := tar.bz2 +BAREBOX_RPI3_DIR := $(BUILDDIR)/barebox-rpi3-$(BAREBOX_RPI3_VERSION) +BAREBOX_RPI3_CONFIG := $(call ptx/in-platformconfigdir, barebox-rpi3.config) +BAREBOX_RPI3_LICENSE := GPL-2.0 +BAREBOX_RPI3_URL := $(call barebox-url, BAREBOX_RPI3) +BAREBOX_RPI3_SOURCE := $(SRCDIR)/$(BAREBOX_RPI3).$(BAREBOX_RPI3_SUFFIX) + +# ---------------------------------------------------------------------------- +# Prepare +# ---------------------------------------------------------------------------- + +BAREBOX_RPI3_WRAPPER_BLACKLIST := \ + TARGET_HARDEN_RELRO \ + TARGET_HARDEN_BINDNOW \ + TARGET_HARDEN_PIE \ + TARGET_DEBUG \ + TARGET_BUILD_ID + +BAREBOX_RPI3_CONF_ENV := KCONFIG_NOTIMESTAMP=1 +BAREBOX_RPI3_CONF_OPT := $(call barebox-opts, BAREBOX_RPI3) + +BAREBOX_RPI3_MAKE_ENV := $(BAREBOX_RPI3_CONF_ENV) +BAREBOX_RPI3_MAKE_OPT := $(BAREBOX_RPI3_CONF_OPT) + +BAREBOX_RPI3_IMAGES := images/barebox-raspberry-pi-3.img +BAREBOX_RPI3_IMAGES := $(addprefix $(BAREBOX_RPI3_DIR)/,$(BAREBOX_RPI3_IMAGES)) + +ifdef PTXCONF_BAREBOX_RPI3 +$(BAREBOX_RPI3_CONFIG): + @echo + @echo "****************************************************************************" + @echo " Please generate a bareboxconfig with 'ptxdist menuconfig barebox-rpi3'" + @echo "****************************************************************************" + @echo + @echo + @exit 1 +endif + +$(STATEDIR)/barebox-rpi3.prepare: $(BAREBOX_RPI3_CONFIG) + @$(call targetinfo) + @rm -f "$(BAREBOX_RPI3_DIR)/.ptxdist-defaultenv" + @ln -s "$(call ptx/in-platformconfigdir, barebox-rpi3-defaultenv)" \ + "$(BAREBOX_RPI3_DIR)/.ptxdist-defaultenv" + @$(call world/prepare, BAREBOX_RPI3) + @$(call touch) + +# ---------------------------------------------------------------------------- +# Install +# ---------------------------------------------------------------------------- + +$(STATEDIR)/barebox-rpi3.install: + @$(call targetinfo) + @$(call touch) + +# ---------------------------------------------------------------------------- +# Targetinstall +# ---------------------------------------------------------------------------- + +$(STATEDIR)/barebox-rpi3.targetinstall: + @$(call targetinfo) + @$(foreach image, $(BAREBOX_RPI3_IMAGES), \ + install -m 644 \ + $(image) $(IMAGEDIR)/$(notdir $(image))-rpi3;) + @$(call touch) + +# ---------------------------------------------------------------------------- +# Clean +# ---------------------------------------------------------------------------- + +$(STATEDIR)/barebox-rpi3.clean: + @$(call targetinfo) + @$(call clean_pkg, BAREBOX_RPI3) + @$(foreach image, $(BAREBOX_RPI3_IMAGES), \ + rm -fv $(IMAGEDIR)/$(notdir $(image));) + +# ---------------------------------------------------------------------------- +# oldconfig / menuconfig +# ---------------------------------------------------------------------------- + +barebox-rpi3_oldconfig barebox-rpi3_menuconfig barebox-rpi3_nconfig: $(STATEDIR)/barebox-rpi3.extract + @$(call world/kconfig, BAREBOX_RPI3, $(subst barebox-rpi3_,,$@)) + +# vim: syntax=make diff --git a/configs/platform-v7a/rules/barebox-vexpress.make b/configs/platform-v7a/rules/barebox-vexpress.make index 0266cbe..f69b6c5 100644 --- a/configs/platform-v7a/rules/barebox-vexpress.make +++ b/configs/platform-v7a/rules/barebox-vexpress.make @@ -16,8 +16,8 @@ PACKAGES-$(PTXCONF_BAREBOX_VEXPRESS) += barebox-vexpress # # Paths and names # -BAREBOX_VEXPRESS_VERSION := 2018.05.0 -BAREBOX_VEXPRESS_MD5 := 8286a8ea2cdd88104e5c6762d93d81db +BAREBOX_VEXPRESS_VERSION := 2018.11.0 +BAREBOX_VEXPRESS_MD5 := 1472eae302647d1cf7f1c561a6380b43 BAREBOX_VEXPRESS := barebox-$(BAREBOX_VEXPRESS_VERSION) BAREBOX_VEXPRESS_SUFFIX := tar.bz2 BAREBOX_VEXPRESS_DIR := $(BUILDDIR)/barebox-vexpress-$(BAREBOX_VEXPRESS_VERSION) -- 2.19.1 _______________________________________________ DistroKit mailing list DistroKit@pengutronix.de ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [DistroKit] [PATCH] plaform-v7a: barebox v2018.05.0 → v2018.11.0 2018-12-05 7:55 [DistroKit] [PATCH] plaform-v7a: barebox v2018.05.0 → v2018.11.0 Rouven Czerwinski @ 2018-12-05 13:15 ` Roland Hieber 2018-12-05 13:20 ` Rouven Czerwinski 2018-12-06 14:39 ` [DistroKit] [PATCH v2] " Rouven Czerwinski 1 sibling, 1 reply; 7+ messages in thread From: Roland Hieber @ 2018-12-05 13:15 UTC (permalink / raw) To: Rouven Czerwinski; +Cc: distrokit, Rouven Czerwinski On Wed, Dec 05, 2018 at 08:55:42AM +0100, Rouven Czerwinski wrote: > Drop the beaglebone patch, it will be resurrected in a distrokit-deployment > layer. > We also add the patch series for the rpi3 to barebox, it can be dropped > in the next release. > > Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de> > --- > .../platform-v7a/barebox-am335x-mlo.config | 22 +- > configs/platform-v7a/barebox-am335x.config | 24 +- > configs/platform-v7a/barebox-mx6.config | 32 +- > configs/platform-v7a/barebox-rpi2.config | 23 +- > .../barebox-rpi3-defaultenv/boot/9p | 10 + > .../barebox-rpi3-defaultenv/init/bootsource | 13 + > .../nv/linux.bootargs.loglevel | 1 + > configs/platform-v7a/barebox-rpi3.config | 600 ++++++++++++++++++ > configs/platform-v7a/barebox-vexpress.config | 23 +- > ...ne-add-state-entry-for-mmc0-and-mmc1.patch | 35 - > ...ease-pengutronix-multi_v7-20180515-1.patch | 22 - > .../patches/barebox-2018.05.0/series | 15 - > ...ort-opcode-helpers-from-Linux-kernel.patch | 299 +++++++++ > ...tch-from-HYP-to-SVC-mode-if-required.patch | 88 +++ > ...-monitor-code-to-be-built-without-PS.patch | 37 ++ > ...-add-file-for-HYP-mode-related-setup.patch | 193 ++++++ > ...-install-secure-monitor-when-entered.patch | 30 + > ...tarting-kernel-in-HYP-mode-when-ente.patch | 31 + > ...HYP-vectors-at-PBL-and-Barebox-entry.patch | 105 +++ > ...sion-IDs-for-Pi-3-Model-B-and-Pi-Zer.patch | 41 ++ > ...9-ARM-rpi-add-raspberry-pi-3-support.patch | 141 ++++ > .../0010-ARM-rpi-autosize-malloc-area.patch | 25 + > ...RM-imx-add-support-for-Udoo-Neo-full.patch | 26 +- > ...lease-pengutronix_multiv7-20181122-1.patch | 22 + > .../patches/barebox-2018.11.0/series | 24 + > configs/platform-v7a/platformconfig | 2 + > .../rules/barebox-am335x-mlo.make | 4 +- > .../platform-v7a/rules/barebox-am335x.make | 4 +- > configs/platform-v7a/rules/barebox-mx6.make | 4 +- > configs/platform-v7a/rules/barebox-rpi2.make | 4 +- > configs/platform-v7a/rules/barebox-rpi3.make | 104 +++ Oh, RPi 3 now has its own barebox? Previously we used barebox-rpi2 for both versions, what is the reason to change that? - Roland > .../platform-v7a/rules/barebox-vexpress.make | 4 +- > 32 files changed, 1905 insertions(+), 103 deletions(-) > create mode 100644 configs/platform-v7a/barebox-rpi3-defaultenv/boot/9p > create mode 100644 configs/platform-v7a/barebox-rpi3-defaultenv/init/bootsource > create mode 100644 configs/platform-v7a/barebox-rpi3-defaultenv/nv/linux.bootargs.loglevel > create mode 100644 configs/platform-v7a/barebox-rpi3.config > delete mode 100644 configs/platform-v7a/patches/barebox-2018.05.0/0001-beaglebone-add-state-entry-for-mmc0-and-mmc1.patch > delete mode 100644 configs/platform-v7a/patches/barebox-2018.05.0/0201-Release-pengutronix-multi_v7-20180515-1.patch > delete mode 100644 configs/platform-v7a/patches/barebox-2018.05.0/series > create mode 100644 configs/platform-v7a/patches/barebox-2018.11.0/0001-ARM-import-opcode-helpers-from-Linux-kernel.patch > create mode 100644 configs/platform-v7a/patches/barebox-2018.11.0/0002-ARM-safely-switch-from-HYP-to-SVC-mode-if-required.patch > create mode 100644 configs/platform-v7a/patches/barebox-2018.11.0/0003-ARM-allow-secure-monitor-code-to-be-built-without-PS.patch > create mode 100644 configs/platform-v7a/patches/barebox-2018.11.0/0004-ARM-add-file-for-HYP-mode-related-setup.patch > create mode 100644 configs/platform-v7a/patches/barebox-2018.11.0/0005-ARM-don-t-try-to-install-secure-monitor-when-entered.patch > create mode 100644 configs/platform-v7a/patches/barebox-2018.11.0/0006-ARM-default-to-starting-kernel-in-HYP-mode-when-ente.patch > create mode 100644 configs/platform-v7a/patches/barebox-2018.11.0/0007-ARM-install-HYP-vectors-at-PBL-and-Barebox-entry.patch > create mode 100644 configs/platform-v7a/patches/barebox-2018.11.0/0008-ARM-rpi-add-revision-IDs-for-Pi-3-Model-B-and-Pi-Zer.patch > create mode 100644 configs/platform-v7a/patches/barebox-2018.11.0/0009-ARM-rpi-add-raspberry-pi-3-support.patch > create mode 100644 configs/platform-v7a/patches/barebox-2018.11.0/0010-ARM-rpi-autosize-malloc-area.patch > rename configs/platform-v7a/patches/{barebox-2018.05.0 => barebox-2018.11.0}/0101-ARM-imx-add-support-for-Udoo-Neo-full.patch (93%) > create mode 100644 configs/platform-v7a/patches/barebox-2018.11.0/0201-Release-pengutronix_multiv7-20181122-1.patch > create mode 100644 configs/platform-v7a/patches/barebox-2018.11.0/series > create mode 100644 configs/platform-v7a/rules/barebox-rpi3.make > > diff --git a/configs/platform-v7a/barebox-am335x-mlo.config b/configs/platform-v7a/barebox-am335x-mlo.config > index 6cebecd..90adc2c 100644 > --- a/configs/platform-v7a/barebox-am335x-mlo.config > +++ b/configs/platform-v7a/barebox-am335x-mlo.config > @@ -1,6 +1,6 @@ > # > # Automatically generated file; DO NOT EDIT. > -# Barebox/arm 2018.05.0-20180515-1 Configuration > +# Barebox/arm 2018.11.0-20181122-1 Configuration > # > CONFIG_ARM=y > CONFIG_ARM_USE_COMPRESSED_DTB=y > @@ -185,6 +185,7 @@ CONFIG_OF_GPIO=y > # > # serial drivers > # > +# CONFIG_SERIAL_DEV_BUS is not set > # CONFIG_DRIVER_SERIAL_ARM_DCC is not set > CONFIG_DRIVER_SERIAL_NS16550=y > CONFIG_DRIVER_SERIAL_NS16550_OMAP_EXTENSIONS=y > @@ -337,6 +338,15 @@ CONFIG_BUS_OMAP_GPMC=y > # Filesystem support > # > CONFIG_FS=y > +CONFIG_FS_LEGACY=y > + > +# > +# Some selected filesystems still use the legacy FS API. > +# > + > +# > +# Consider updating them. > +# > # CONFIG_FS_CRAMFS is not set > # CONFIG_FS_EXT4 is not set > CONFIG_FS_RAMFS=y > @@ -398,3 +408,13 @@ CONFIG_XYMODEM=y > CONFIG_CRC16=y > # CONFIG_DIGEST is not set > # CONFIG_CRYPTO_KEYSTORE is not set > + > +# > +# Firmware files > +# > +CONFIG_EXTRA_FIRMWARE_DIR="firmware" > + > +# > +# Host Tools > +# > +# CONFIG_COMPILE_HOST_TOOLS is not set > diff --git a/configs/platform-v7a/barebox-am335x.config b/configs/platform-v7a/barebox-am335x.config > index 0c78012..0c3d7e5 100644 > --- a/configs/platform-v7a/barebox-am335x.config > +++ b/configs/platform-v7a/barebox-am335x.config > @@ -1,6 +1,6 @@ > # > # Automatically generated file; DO NOT EDIT. > -# Barebox/arm 2018.05.0-20180515-1 Configuration > +# Barebox/arm 2018.11.0-20181122-1 Configuration > # > CONFIG_ARM=y > CONFIG_ARM_LINUX=y > @@ -408,6 +408,7 @@ CONFIG_OF_BAREBOX_DRIVERS=y > # > # serial drivers > # > +# CONFIG_SERIAL_DEV_BUS is not set > # CONFIG_DRIVER_SERIAL_ARM_DCC is not set > CONFIG_DRIVER_SERIAL_NS16550=y > CONFIG_DRIVER_SERIAL_NS16550_OMAP_EXTENSIONS=y > @@ -436,6 +437,7 @@ CONFIG_DRIVER_NET_CPSW=y > # > # CONFIG_AR8327N_PHY is not set > # CONFIG_AT803X_PHY is not set > +# CONFIG_DAVICOM_PHY is not set > # CONFIG_LXT_PHY is not set > # CONFIG_MARVELL_PHY is not set > # CONFIG_MICREL_PHY is not set > @@ -587,6 +589,7 @@ CONFIG_LED_GPIO_OF=y > # CONFIG_LED_GPIO_RGB is not set > # CONFIG_LED_GPIO_BICOLOR is not set > CONFIG_LED_TRIGGERS=y > +# CONFIG_LED_PCA955X is not set > > # > # EEPROM support > @@ -649,6 +652,15 @@ CONFIG_BUS_OMAP_GPMC=y > # Filesystem support > # > CONFIG_FS=y > +CONFIG_FS_LEGACY=y > + > +# > +# Some selected filesystems still use the legacy FS API. > +# > + > +# > +# Consider updating them. > +# > CONFIG_FS_AUTOMOUNT=y > # CONFIG_FS_CRAMFS is not set > CONFIG_FS_EXT4=y > @@ -732,3 +744,13 @@ CONFIG_DIGEST_HMAC_GENERIC=y > # CONFIG_DIGEST_SHA256_ARM is not set > CONFIG_CRYPTO_RSA=y > CONFIG_CRYPTO_KEYSTORE=y > + > +# > +# Firmware files > +# > +CONFIG_EXTRA_FIRMWARE_DIR="firmware" > + > +# > +# Host Tools > +# > +# CONFIG_COMPILE_HOST_TOOLS is not set > diff --git a/configs/platform-v7a/barebox-mx6.config b/configs/platform-v7a/barebox-mx6.config > index 980b97b..536cbfe 100644 > --- a/configs/platform-v7a/barebox-mx6.config > +++ b/configs/platform-v7a/barebox-mx6.config > @@ -1,6 +1,6 @@ > # > # Automatically generated file; DO NOT EDIT. > -# Barebox/arm 2018.05.0-20180515-1 Configuration > +# Barebox/arm 2018.11.0-20181122-1 Configuration > # > CONFIG_ARM=y > CONFIG_ARM_LINUX=y > @@ -94,13 +94,17 @@ CONFIG_MACH_UDOO_NEO=y > # CONFIG_MACH_VARISCITE_MX6 is not set > # CONFIG_MACH_GW_VENTANA is not set > # CONFIG_MACH_CM_FX6 is not set > +# CONFIG_MACH_ADVANTECH_ROM_742X is not set > # CONFIG_MACH_WARP7 is not set > # CONFIG_MACH_VF610_TWR is not set > +# CONFIG_MACH_ZII_RDU1 is not set > # CONFIG_MACH_ZII_RDU2 is not set > # CONFIG_MACH_ZII_VF610_DEV is not set > +# CONFIG_MACH_ZII_IMX7D_RPU2 is not set > # CONFIG_MACH_PHYTEC_PHYCORE_IMX7 is not set > # CONFIG_MACH_FREESCALE_MX7_SABRESD is not set > # CONFIG_MACH_NXP_IMX6ULL_EVK is not set > +# CONFIG_MACH_NXP_IMX8MQ_EVK is not set > > # > # Board specific settings > @@ -111,10 +115,7 @@ CONFIG_MACH_UDOO_NEO=y > # > CONFIG_IMX_IIM=y > CONFIG_IMX_IIM_FUSE_BLOW=y > -CONFIG_IMX_OCOTP=y > -# CONFIG_IMX_OCOTP_WRITE is not set > # CONFIG_HABV4 is not set > -# CONFIG_ARCH_IMX_USBLOADER is not set > CONFIG_ARM_ASM_UNIFIED=y > CONFIG_AEABI=y > CONFIG_THUMB2_BAREBOX=y > @@ -464,6 +465,7 @@ CONFIG_OF_BAREBOX_DRIVERS=y > # > # serial drivers > # > +# CONFIG_SERIAL_DEV_BUS is not set > # CONFIG_DRIVER_SERIAL_ARM_DCC is not set > CONFIG_DRIVER_SERIAL_IMX=y > # CONFIG_DRIVER_SERIAL_NS16550 is not set > @@ -493,6 +495,7 @@ CONFIG_DRIVER_NET_FEC_IMX=y > # > # CONFIG_AR8327N_PHY is not set > CONFIG_AT803X_PHY=y > +# CONFIG_DAVICOM_PHY is not set > # CONFIG_LXT_PHY is not set > # CONFIG_MARVELL_PHY is not set > CONFIG_MICREL_PHY=y > @@ -681,6 +684,7 @@ CONFIG_LED_GPIO_OF=y > # CONFIG_LED_GPIO_RGB is not set > # CONFIG_LED_GPIO_BICOLOR is not set > CONFIG_LED_TRIGGERS=y > +# CONFIG_LED_PCA955X is not set > > # > # EEPROM support > @@ -762,6 +766,15 @@ CONFIG_USB_NOP_XCEIV=y > # Filesystem support > # > CONFIG_FS=y > +CONFIG_FS_LEGACY=y > + > +# > +# Some selected filesystems still use the legacy FS API. > +# > + > +# > +# Consider updating them. > +# > CONFIG_FS_AUTOMOUNT=y > # CONFIG_FS_CRAMFS is not set > CONFIG_FS_EXT4=y > @@ -854,3 +867,14 @@ CONFIG_DIGEST_HMAC_GENERIC=y > # CONFIG_DIGEST_SHA1_ARM is not set > # CONFIG_DIGEST_SHA256_ARM is not set > CONFIG_CRYPTO_KEYSTORE=y > + > +# > +# Firmware files > +# > +CONFIG_EXTRA_FIRMWARE_DIR="firmware" > + > +# > +# Host Tools > +# > +# CONFIG_COMPILE_HOST_TOOLS is not set > +# CONFIG_ARCH_IMX_USBLOADER is not set > diff --git a/configs/platform-v7a/barebox-rpi2.config b/configs/platform-v7a/barebox-rpi2.config > index 74c52e9..0e2622f 100644 > --- a/configs/platform-v7a/barebox-rpi2.config > +++ b/configs/platform-v7a/barebox-rpi2.config > @@ -1,6 +1,6 @@ > # > # Automatically generated file; DO NOT EDIT. > -# Barebox/arm 2018.05.0-20180515-1 Configuration > +# Barebox/arm 2018.11.0-20181122-1 Configuration > # > CONFIG_ARM=y > CONFIG_ARM_LINUX=y > @@ -54,6 +54,7 @@ CONFIG_MACH_RPI_COMMON=y > # > # CONFIG_MACH_RPI is not set > CONFIG_MACH_RPI2=y > +# CONFIG_MACH_RPI3 is not set > CONFIG_BAREBOX_MAX_IMAGE_SIZE=0xffffffff > CONFIG_AEABI=y > # CONFIG_THUMB2_BAREBOX is not set > @@ -369,6 +370,7 @@ CONFIG_ARM_AMBA=y > # > # serial drivers > # > +# CONFIG_SERIAL_DEV_BUS is not set > # CONFIG_DRIVER_SERIAL_ARM_DCC is not set > CONFIG_SERIAL_AMBA_PL011=y > # CONFIG_DRIVER_SERIAL_NS16550 is not set > @@ -499,6 +501,15 @@ CONFIG_REGULATOR_BCM283X=y > # Filesystem support > # > CONFIG_FS=y > +CONFIG_FS_LEGACY=y > + > +# > +# Some selected filesystems still use the legacy FS API. > +# > + > +# > +# Consider updating them. > +# > CONFIG_FS_AUTOMOUNT=y > # CONFIG_FS_CRAMFS is not set > CONFIG_FS_EXT4=y > @@ -575,3 +586,13 @@ CONFIG_DIGEST_MD5_GENERIC=y > # CONFIG_DIGEST_SHA1_ARM is not set > # CONFIG_DIGEST_SHA256_ARM is not set > # CONFIG_CRYPTO_KEYSTORE is not set > + > +# > +# Firmware files > +# > +CONFIG_EXTRA_FIRMWARE_DIR="firmware" > + > +# > +# Host Tools > +# > +# CONFIG_COMPILE_HOST_TOOLS is not set > diff --git a/configs/platform-v7a/barebox-rpi3-defaultenv/boot/9p b/configs/platform-v7a/barebox-rpi3-defaultenv/boot/9p > new file mode 100644 > index 0000000..264ffec > --- /dev/null > +++ b/configs/platform-v7a/barebox-rpi3-defaultenv/boot/9p > @@ -0,0 +1,10 @@ > +#!/bin/sh > + > +addpart /dev/nor0 "8M@32M(kernel)" > +addpart /dev/nor0 "512k@40M(dtb)" > +global.bootm.image="/dev/nor0.kernel" > +global.bootm.oftree="/dev/nor0.dtb" > + > +global linux.bootargs.base="console=ttyAMA0,115200 loglevel=5 ptxdist-devel" > + > +global linux.bootargs.root="root=/dev/root rootfstype=9p rootflags=trans=virtio" > \ No newline at end of file > diff --git a/configs/platform-v7a/barebox-rpi3-defaultenv/init/bootsource b/configs/platform-v7a/barebox-rpi3-defaultenv/init/bootsource > new file mode 100644 > index 0000000..4de7163 > --- /dev/null > +++ b/configs/platform-v7a/barebox-rpi3-defaultenv/init/bootsource > @@ -0,0 +1,13 @@ > +#!/bin/sh > + > +if [ -n "$nv.boot.default" ]; then > + exit > +fi > + > +if [ $bootsource = mmc ]; then > + global.boot.default="bootchooser net" > +elif [ $bootsource = net ]; then > + global.boot.default="net bootchooser" > +else > + global.boot.default="disk0.1 net" > +fi > diff --git a/configs/platform-v7a/barebox-rpi3-defaultenv/nv/linux.bootargs.loglevel b/configs/platform-v7a/barebox-rpi3-defaultenv/nv/linux.bootargs.loglevel > new file mode 100644 > index 0000000..705752c > --- /dev/null > +++ b/configs/platform-v7a/barebox-rpi3-defaultenv/nv/linux.bootargs.loglevel > @@ -0,0 +1 @@ > +loglevel=5 systemd.log_level=warning systemd.show_status=auto > diff --git a/configs/platform-v7a/barebox-rpi3.config b/configs/platform-v7a/barebox-rpi3.config > new file mode 100644 > index 0000000..0336bdf > --- /dev/null > +++ b/configs/platform-v7a/barebox-rpi3.config > @@ -0,0 +1,600 @@ > +# > +# Automatically generated file; DO NOT EDIT. > +# Barebox/arm 2018.11.0-20181122-1 Configuration > +# > +CONFIG_ARM=y > +CONFIG_ARM_LINUX=y > +CONFIG_TEXT_BASE=0x0 > + > +# > +# System Type > +# > +# CONFIG_ARCH_AT91 is not set > +CONFIG_ARCH_BCM283X=y > +# CONFIG_ARCH_CLPS711X is not set > +# CONFIG_ARCH_DAVINCI is not set > +# CONFIG_ARCH_DIGIC is not set > +# CONFIG_ARCH_EP93XX is not set > +# CONFIG_ARCH_HIGHBANK is not set > +# CONFIG_ARCH_IMX is not set > +# CONFIG_ARCH_MVEBU is not set > +# CONFIG_ARCH_MXS is not set > +# CONFIG_ARCH_NETX is not set > +# CONFIG_ARCH_NOMADIK is not set > +# CONFIG_ARCH_OMAP is not set > +# CONFIG_ARCH_PXA is not set > +# CONFIG_ARCH_ROCKCHIP is not set > +# CONFIG_ARCH_SOCFPGA is not set > +# CONFIG_ARCH_S3C24xx is not set > +# CONFIG_ARCH_S5PCxx is not set > +# CONFIG_ARCH_S3C64xx is not set > +# CONFIG_ARCH_VERSATILE is not set > +# CONFIG_ARCH_VEXPRESS is not set > +# CONFIG_ARCH_TEGRA is not set > +# CONFIG_ARCH_UEMD is not set > +# CONFIG_ARCH_ZYNQ is not set > +# CONFIG_ARCH_QEMU is not set > + > +# > +# Processor Type > +# > +CONFIG_CPU_32=y > +CONFIG_CPU_V7=y > +CONFIG_CPU_32v7=y > + > +# > +# processor features > +# > +# CONFIG_BOOT_ENDIANNESS_SWITCH is not set > +CONFIG_ARCH_TEXT_BASE=0x0 > +CONFIG_MACH_RPI_COMMON=y > + > +# > +# select Broadcom BCM283X boards to be built > +# > +# CONFIG_MACH_RPI is not set > +# CONFIG_MACH_RPI2 is not set > +CONFIG_MACH_RPI3=y > +CONFIG_BAREBOX_MAX_IMAGE_SIZE=0xffffffff > +CONFIG_AEABI=y > +# CONFIG_THUMB2_BAREBOX is not set > +# CONFIG_ARM_BOARD_APPEND_ATAG is not set > + > +# > +# ARM specific settings > +# > +CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y > +CONFIG_ARM_EXCEPTIONS=y > +CONFIG_ARM_UNWIND=y > +# CONFIG_ARM_SEMIHOSTING is not set > +CONFIG_ARM_SMCCC=y > +CONFIG_ARM_SECURE_MONITOR=y > +# CONFIG_ARM_PSCI is not set > +CONFIG_DEFCONFIG_LIST="$ARCH_DEFCONFIG" > +CONFIG_GREGORIAN_CALENDER=y > +CONFIG_HAS_KALLSYMS=y > +CONFIG_HAS_MODULES=y > +CONFIG_HAS_CACHE=y > +CONFIG_HAS_DMA=y > +CONFIG_GENERIC_GPIO=y > +CONFIG_BLOCK=y > +CONFIG_BLOCK_WRITE=y > +CONFIG_FILETYPE=y > +CONFIG_BINFMT=y > +CONFIG_UIMAGE=y > +CONFIG_STDDEV=y > +CONFIG_BOOT=y > + > +# > +# General Settings > +# > +CONFIG_LOCALVERSION="" > +CONFIG_LOCALVERSION_AUTO=y > +CONFIG_BANNER=y > +CONFIG_MEMINFO=y > +CONFIG_ENVIRONMENT_VARIABLES=y > +CONFIG_GLOBALVAR=y > +CONFIG_NVVAR=y > + > +# > +# memory layout > +# > +CONFIG_HAVE_PBL_IMAGE=y > +CONFIG_HAVE_PBL_MULTI_IMAGES=y > +CONFIG_HAVE_IMAGE_COMPRESSION=y > +CONFIG_PBL_IMAGE=y > +CONFIG_PBL_MULTI_IMAGES=y > +CONFIG_PBL_RELOCATABLE=y > +CONFIG_IMAGE_COMPRESSION=y > +# CONFIG_IMAGE_COMPRESSION_LZ4 is not set > +# CONFIG_IMAGE_COMPRESSION_LZO is not set > +# CONFIG_IMAGE_COMPRESSION_GZIP is not set > +# CONFIG_IMAGE_COMPRESSION_XZKERN is not set > +CONFIG_IMAGE_COMPRESSION_NONE=y > +CONFIG_MMU=y > +CONFIG_MMU_EARLY=y > +CONFIG_BAREBOX_MAX_PBL_SIZE=0xffffffff > +CONFIG_BAREBOX_MAX_BARE_INIT_SIZE=0xffffffff > +CONFIG_BAREBOX_MAX_PBLX_SIZE=0xffffffff > +CONFIG_STACK_SIZE=0x8000 > +CONFIG_MALLOC_SIZE=0x0 > +# CONFIG_EXPERIMENTAL is not set > +# CONFIG_MALLOC_DLMALLOC is not set > +CONFIG_MALLOC_TLSF=y > +CONFIG_KALLSYMS=y > +CONFIG_RELOCATABLE=y > +# CONFIG_PANIC_HANG is not set > +CONFIG_PROMPT="R-Pi> " > +CONFIG_BAUDRATE=115200 > +CONFIG_CBSIZE=1024 > +CONFIG_SHELL_HUSH=y > +# CONFIG_SHELL_SIMPLE is not set > +# CONFIG_SHELL_NONE is not set > +CONFIG_GLOB=y > +CONFIG_GLOB_SORT=y > +CONFIG_PROMPT_HUSH_PS2="> " > +CONFIG_HUSH_FANCY_PROMPT=y > +CONFIG_CMDLINE_EDITING=y > +CONFIG_AUTO_COMPLETE=y > +CONFIG_MENU=y > +CONFIG_PASSWORD=y > +CONFIG_PASSWORD_DEFAULT="" > +CONFIG_PASSWD_SUM_MD5=y > +# CONFIG_PASSWD_SUM_SHA1 is not set > +# CONFIG_PASSWD_SUM_SHA256 is not set > +# CONFIG_PASSWD_SUM_SHA512 is not set > +# CONFIG_PASSWD_CRYPTO_PBKDF2 is not set > +CONFIG_DYNAMIC_CRC_TABLE=y > +CONFIG_ERRNO_MESSAGES=y > +CONFIG_TIMESTAMP=y > +CONFIG_BOOTM=y > +CONFIG_BOOTM_SHOW_TYPE=y > +CONFIG_BOOTM_VERBOSE=y > +CONFIG_BOOTM_INITRD=y > +CONFIG_BOOTM_OFTREE=y > +# CONFIG_BOOTM_OFTREE_UIMAGE is not set > +# CONFIG_BOOTM_AIMAGE is not set > +# CONFIG_BOOTM_FITIMAGE is not set > +CONFIG_BLSPEC=y > +CONFIG_FLEXIBLE_BOOTARGS=y > +# CONFIG_IMD is not set > +# CONFIG_KERNEL_INSTALL_TARGET is not set > +CONFIG_CONSOLE_FULL=y > +# CONFIG_CONSOLE_SIMPLE is not set > +# CONFIG_CONSOLE_NONE is not set > +CONFIG_CONSOLE_ACTIVATE_FIRST=y > +# CONFIG_CONSOLE_ACTIVATE_ALL is not set > +# CONFIG_CONSOLE_ACTIVATE_NONE is not set > +# CONFIG_CONSOLE_ALLOW_COLOR is not set > +# CONFIG_PBL_CONSOLE is not set > +# CONFIG_CONSOLE_RATP is not set > +CONFIG_PARTITION=y > +CONFIG_PARTITION_DISK=y > +CONFIG_PARTITION_DISK_DOS=y > +# CONFIG_PARTITION_DISK_EFI is not set > +CONFIG_ENV_HANDLING=y > +CONFIG_DEFAULT_ENVIRONMENT=y > +CONFIG_DEFAULT_COMPRESSION_NONE=y > +CONFIG_DEFAULT_ENVIRONMENT_GENERIC_NEW=y > +CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/raspberry-pi/env" > +# CONFIG_BAREBOXENV_TARGET is not set > +# CONFIG_BAREBOXCRC32_TARGET is not set > +CONFIG_POLLER=y > +# CONFIG_STATE is not set > +# CONFIG_BOOTCHOOSER is not set > +# CONFIG_RESET_SOURCE is not set > + > +# > +# Debugging > +# > +CONFIG_COMPILE_LOGLEVEL=6 > +CONFIG_DEFAULT_LOGLEVEL=7 > +# CONFIG_DEBUG_INFO is not set > +# CONFIG_DEBUG_LL is not set > +# CONFIG_DEBUG_INITCALLS is not set > +CONFIG_HAS_DEBUG_LL=y > +CONFIG_COMMAND_SUPPORT=y > +CONFIG_COMPILE_HASH=y > +CONFIG_COMPILE_MEMORY=y > + > +# > +# Commands > +# > + > +# > +# Information > +# > +CONFIG_CMD_ARM_CPUINFO=y > +CONFIG_CMD_DEVINFO=y > +# CONFIG_CMD_DMESG is not set > +CONFIG_CMD_DRVINFO=y > +CONFIG_CMD_HELP=y > +CONFIG_LONGHELP=y > +CONFIG_CMD_IOMEM=y > +# CONFIG_CMD_IMD is not set > +CONFIG_CMD_MEMINFO=y > +# CONFIG_CMD_ARM_MMUINFO is not set > +# CONFIG_CMD_REGULATOR is not set > +CONFIG_CMD_VERSION=y > +# CONFIG_CMD_MMC_EXTCSD is not set > + > +# > +# Boot > +# > +CONFIG_CMD_BOOT=y > +CONFIG_CMD_BOOTM=y > +CONFIG_CMD_BOOTU=y > +# CONFIG_CMD_BOOTZ is not set > +CONFIG_CMD_GO=y > +CONFIG_CMD_LOADB=y > +# CONFIG_CMD_LOADS is not set > +CONFIG_CMD_LOADY=y > +CONFIG_CMD_RESET=y > +CONFIG_CMD_UIMAGE=y > + > +# > +# Partition > +# > +CONFIG_CMD_PARTITION=y > +CONFIG_CMD_AUTOMOUNT=y > +CONFIG_CMD_MOUNT=y > +CONFIG_CMD_UMOUNT=y > + > +# > +# Environment > +# > +CONFIG_CMD_NV=y > +CONFIG_CMD_EXPORT=y > +# CONFIG_CMD_DEFAULTENV is not set > +CONFIG_CMD_GLOBAL=y > +# CONFIG_CMD_LOADENV is not set > +CONFIG_CMD_PRINTENV=y > +CONFIG_CMD_MAGICVAR=y > +CONFIG_CMD_MAGICVAR_HELP=y > +CONFIG_CMD_SAVEENV=y > + > +# > +# File > +# > +CONFIG_CMD_BASENAME=y > +CONFIG_CMD_CAT=y > +CONFIG_CMD_CD=y > +CONFIG_CMD_CP=y > +# CONFIG_CMD_CMP is not set > +CONFIG_CMD_DIGEST=y > +CONFIG_CMD_DIRNAME=y > +CONFIG_CMD_FILETYPE=y > +CONFIG_CMD_LN=y > +CONFIG_CMD_LS=y > +CONFIG_CMD_MD5SUM=y > +CONFIG_CMD_MKDIR=y > +CONFIG_CMD_PWD=y > +CONFIG_CMD_READLINK=y > +CONFIG_CMD_RM=y > +CONFIG_CMD_RMDIR=y > +# CONFIG_CMD_SHA1SUM is not set > +# CONFIG_CMD_SHA224SUM is not set > +# CONFIG_CMD_SHA256SUM is not set > +# CONFIG_CMD_SHA384SUM is not set > +# CONFIG_CMD_SHA512SUM is not set > +CONFIG_CMD_UNCOMPRESS=y > + > +# > +# Shell scripting > +# > +CONFIG_CMD_FALSE=y > +CONFIG_CMD_GETOPT=y > +CONFIG_CMD_LET=y > +CONFIG_CMD_MSLEEP=y > +# CONFIG_CMD_READF is not set > +CONFIG_CMD_SLEEP=y > +CONFIG_CMD_TEST=y > +CONFIG_CMD_TRUE=y > + > +# > +# Console and Framebuffer interaction > +# > +CONFIG_CMD_CLEAR=y > +CONFIG_CMD_ECHO=y > +CONFIG_CMD_ECHO_E=y > +CONFIG_CMD_EDIT=y > +CONFIG_CMD_LOGIN=y > +CONFIG_CMD_MENU=y > +CONFIG_CMD_MENU_MANAGEMENT=y > +# CONFIG_CMD_MENUTREE is not set > +CONFIG_CMD_PASSWD=y > +CONFIG_PASSWD_MODE_HIDE=y > +# CONFIG_PASSWD_MODE_STAR is not set > +# CONFIG_PASSWD_MODE_CLEAR is not set > +CONFIG_CMD_READLINE=y > +CONFIG_CMD_TIMEOUT=y > + > +# > +# Memory > +# > +CONFIG_CMD_CRC=y > +CONFIG_CMD_CRC_CMP=y > +CONFIG_CMD_MD=y > +CONFIG_CMD_MEMCMP=y > +CONFIG_CMD_MEMCPY=y > +CONFIG_CMD_MEMSET=y > +# CONFIG_CMD_MEMTEST is not set > +CONFIG_CMD_MM=y > +CONFIG_CMD_MW=y > + > +# > +# Hardware manipulation > +# > +CONFIG_CMD_CLK=y > +CONFIG_CMD_DETECT=y > +# CONFIG_CMD_FLASH is not set > +CONFIG_CMD_GPIO=y > +# CONFIG_CMD_LED is not set > +# CONFIG_CMD_POWEROFF is not set > +# CONFIG_CMD_SPI is not set > +# CONFIG_CMD_LED_TRIGGER is not set > +CONFIG_CMD_WD=y > +CONFIG_CMD_WD_DEFAULT_TIMOUT=0 > + > +# > +# Miscellaneous > +# > +# CONFIG_CMD_2048 is not set > +# CONFIG_CMD_BAREBOX_UPDATE is not set > +# CONFIG_CMD_FIRMWARELOAD is not set > +CONFIG_CMD_OF_DUMP=y > +CONFIG_CMD_OF_NODE=y > +CONFIG_CMD_OF_PROPERTY=y > +# CONFIG_CMD_OF_DISPLAY_TIMINGS is not set > +# CONFIG_CMD_OF_FIXUP_STATUS is not set > +CONFIG_CMD_OFTREE=y > +CONFIG_CMD_TIME=y > +# CONFIG_CMD_DHRYSTONE is not set > +# CONFIG_CMD_SPD_DECODE is not set > +# CONFIG_CMD_SEED is not set > +# CONFIG_NET is not set > + > +# > +# Drivers > +# > +CONFIG_OFTREE=y > +CONFIG_OFTREE_MEM_GENERIC=y > +CONFIG_DTC=y > +CONFIG_OFDEVICE=y > +CONFIG_OF_GPIO=y > +# CONFIG_OF_BAREBOX_DRIVERS is not set > +# CONFIG_AIODEV is not set > +CONFIG_ARM_AMBA=y > + > +# > +# serial drivers > +# > +# CONFIG_SERIAL_DEV_BUS is not set > +# CONFIG_DRIVER_SERIAL_ARM_DCC is not set > +CONFIG_SERIAL_AMBA_PL011=y > +# CONFIG_DRIVER_SERIAL_NS16550 is not set > +# CONFIG_DRIVER_SERIAL_CADENCE is not set > + > +# > +# SPI drivers > +# > +CONFIG_SPI=y > +# CONFIG_DRIVER_SPI_GPIO is not set > +# CONFIG_I2C is not set > +# CONFIG_MTD is not set > +CONFIG_DISK=y > +CONFIG_DISK_WRITE=y > + > +# > +# drive types > +# > +# CONFIG_DISK_ATA is not set > +# CONFIG_DISK_AHCI is not set > + > +# > +# interface types > +# > +# CONFIG_DISK_INTF_PLATFORM_IDE is not set > +# CONFIG_USB_HOST is not set > +# CONFIG_USB_GADGET is not set > +# CONFIG_USB_MUSB is not set > +# CONFIG_VIDEO is not set > +CONFIG_MCI=y > + > +# > +# --- Feature list --- > +# > +# CONFIG_MCI_STARTUP is not set > +CONFIG_MCI_INFO=y > +CONFIG_MCI_WRITE=y > +# CONFIG_MCI_MMC_BOOT_PARTITIONS is not set > + > +# > +# --- MCI host drivers --- > +# > +# CONFIG_MCI_DW is not set > +CONFIG_MCI_BCM283X=y > +# CONFIG_MCI_MMCI is not set > +# CONFIG_MCI_SPI is not set > +CONFIG_HAVE_CLK=y > +CONFIG_CLKDEV_LOOKUP=y > +CONFIG_COMMON_CLK=y > +CONFIG_CLOCKSOURCE_BCM283X=y > +CONFIG_CLOCKSOURCE_DUMMY_RATE=1000 > + > +# > +# MFD > +# > +# CONFIG_MFD_MC13XXX is not set > +# CONFIG_MFD_SYSCON is not set > + > +# > +# Misc devices > +# > +# CONFIG_JTAG is not set > +# CONFIG_SRAM is not set > +CONFIG_LED=y > +CONFIG_LED_GPIO=y > +# CONFIG_LED_GPIO_OF is not set > +# CONFIG_LED_GPIO_RGB is not set > +# CONFIG_LED_GPIO_BICOLOR is not set > +CONFIG_LED_TRIGGERS=y > + > +# > +# EEPROM support > +# > +# CONFIG_EEPROM_AT25 is not set > + > +# > +# Input device support > +# > +# CONFIG_KEYBOARD_GPIO is not set > +CONFIG_WATCHDOG=y > +# CONFIG_WATCHDOG_POLLER is not set > +# CONFIG_WATCHDOG_DW is not set > +CONFIG_WATCHDOG_BCM2835=y > +# CONFIG_PWM is not set > +# CONFIG_HWRNG is not set > + > +# > +# DMA support > +# > +CONFIG_GPIOLIB=y > + > +# > +# GPIO > +# > +# CONFIG_GPIO_74164 is not set > +CONFIG_GPIO_BCM283X=y > +# CONFIG_GPIO_GENERIC_PLATFORM is not set > +# CONFIG_GPIO_IMX is not set > +# CONFIG_GPIO_VF610 is not set > +# CONFIG_GPIO_MXS is not set > +# CONFIG_GPIO_OMAP is not set > +# CONFIG_GPIO_PL061 is not set > +# CONFIG_GPIO_DESIGNWARE is not set > +# CONFIG_W1 is not set > +# CONFIG_PINCTRL is not set > +# CONFIG_NVMEM is not set > + > +# > +# Bus devices > +# > +CONFIG_REGULATOR=y > +# CONFIG_REGULATOR_FIXED is not set > +CONFIG_REGULATOR_BCM283X=y > +# CONFIG_RESET_CONTROLLER is not set > +# CONFIG_RTC_CLASS is not set > + > +# > +# Firmware Drivers > +# > +# CONFIG_FIRMWARE_ALTERA_SERIAL is not set > +# CONFIG_GENERIC_PHY is not set > +# CONFIG_CRYPTO_HW is not set > + > +# > +# Memory controller drivers > +# > + > +# > +# Filesystem support > +# > +CONFIG_FS=y > +CONFIG_FS_LEGACY=y > + > +# > +# Some selected filesystems still use the legacy FS API. > +# > + > +# > +# Consider updating them. > +# > +CONFIG_FS_AUTOMOUNT=y > +# CONFIG_FS_CRAMFS is not set > +CONFIG_FS_EXT4=y > +CONFIG_FS_RAMFS=y > +CONFIG_FS_DEVFS=y > +CONFIG_FS_FAT=y > +CONFIG_FS_FAT_WRITE=y > +CONFIG_FS_FAT_LFN=y > +# CONFIG_FS_BPKFS is not set > +# CONFIG_FS_UIMAGEFS is not set > +# CONFIG_FS_PSTORE is not set > +# CONFIG_FS_SQUASHFS is not set > + > +# > +# ZLIB support disabled > +# > + > +# > +# LZ4 support disabled > +# > + > +# > +# LZO support disabled > +# > + > +# > +# XZ support disabled > +# > + > +# > +# ZSTD support disabled > +# > + > +# > +# Library routines > +# > +CONFIG_PARAMETER=y > +CONFIG_UNCOMPRESS=y > +# CONFIG_ZLIB is not set > +# CONFIG_BZLIB is not set > +# CONFIG_LZ4_DECOMPRESS is not set > +# CONFIG_ZSTD_DECOMPRESS is not set > +# CONFIG_XZ_DECOMPRESS is not set > +# CONFIG_GENERIC_FIND_NEXT_BIT is not set > +CONFIG_PROCESS_ESCAPE_SEQUENCE=y > +# CONFIG_LZO_DECOMPRESS is not set > +CONFIG_FNMATCH=y > +CONFIG_QSORT=y > +CONFIG_XYMODEM=y > +# CONFIG_RATP is not set > +# CONFIG_ALLOW_PRNG_FALLBACK is not set > +# CONFIG_CRC_CCITT is not set > + > +# > +# Library gui routines > +# > +# CONFIG_BAREBOX_LOGO is not set > + > +# > +# Crypto support > +# > +CONFIG_CRC32=y > +CONFIG_CRC16=y > +CONFIG_DIGEST=y > +CONFIG_MD5=y > +CONFIG_SHA1=y > +CONFIG_SHA256=y > +# CONFIG_DIGEST_CRC32_GENERIC is not set > +CONFIG_DIGEST_MD5_GENERIC=y > +CONFIG_DIGEST_SHA1_GENERIC=y > +# CONFIG_DIGEST_SHA224_GENERIC is not set > +CONFIG_DIGEST_SHA256_GENERIC=y > +# CONFIG_DIGEST_SHA384_GENERIC is not set > +# CONFIG_DIGEST_SHA512_GENERIC is not set > +# CONFIG_DIGEST_HMAC_GENERIC is not set > +# CONFIG_DIGEST_SHA1_ARM is not set > +# CONFIG_DIGEST_SHA256_ARM is not set > +# CONFIG_CRYPTO_KEYSTORE is not set > + > +# > +# Firmware files > +# > +CONFIG_EXTRA_FIRMWARE_DIR="firmware" > + > +# > +# Host Tools > +# > +# CONFIG_COMPILE_HOST_TOOLS is not set > diff --git a/configs/platform-v7a/barebox-vexpress.config b/configs/platform-v7a/barebox-vexpress.config > index 826d222..72d5421 100644 > --- a/configs/platform-v7a/barebox-vexpress.config > +++ b/configs/platform-v7a/barebox-vexpress.config > @@ -1,6 +1,6 @@ > # > # Automatically generated file; DO NOT EDIT. > -# Barebox/arm 2018.05.0-20180515-1 Configuration > +# Barebox/arm 2018.11.0-20181122-1 Configuration > # > CONFIG_ARM=y > CONFIG_ARM_LINUX=y > @@ -364,6 +364,7 @@ CONFIG_ARM_AMBA=y > # > # serial drivers > # > +# CONFIG_SERIAL_DEV_BUS is not set > # CONFIG_DRIVER_SERIAL_ARM_DCC is not set > CONFIG_SERIAL_AMBA_PL011=y > # CONFIG_DRIVER_SERIAL_NS16550 is not set > @@ -389,6 +390,7 @@ CONFIG_DRIVER_NET_SMC911X=y > # > # CONFIG_AR8327N_PHY is not set > # CONFIG_AT803X_PHY is not set > +# CONFIG_DAVICOM_PHY is not set > # CONFIG_LXT_PHY is not set > # CONFIG_MARVELL_PHY is not set > # CONFIG_MICREL_PHY is not set > @@ -522,6 +524,15 @@ CONFIG_STATE_DRV=y > # Filesystem support > # > CONFIG_FS=y > +CONFIG_FS_LEGACY=y > + > +# > +# Some selected filesystems still use the legacy FS API. > +# > + > +# > +# Consider updating them. > +# > CONFIG_FS_AUTOMOUNT=y > # CONFIG_FS_CRAMFS is not set > CONFIG_FS_EXT4=y > @@ -599,3 +610,13 @@ CONFIG_DIGEST_MD5_GENERIC=y > # CONFIG_DIGEST_SHA1_ARM is not set > # CONFIG_DIGEST_SHA256_ARM is not set > # CONFIG_CRYPTO_KEYSTORE is not set > + > +# > +# Firmware files > +# > +CONFIG_EXTRA_FIRMWARE_DIR="firmware" > + > +# > +# Host Tools > +# > +# CONFIG_COMPILE_HOST_TOOLS is not set > diff --git a/configs/platform-v7a/patches/barebox-2018.05.0/0001-beaglebone-add-state-entry-for-mmc0-and-mmc1.patch b/configs/platform-v7a/patches/barebox-2018.05.0/0001-beaglebone-add-state-entry-for-mmc0-and-mmc1.patch > deleted file mode 100644 > index cfca106..0000000 > --- a/configs/platform-v7a/patches/barebox-2018.05.0/0001-beaglebone-add-state-entry-for-mmc0-and-mmc1.patch > +++ /dev/null > @@ -1,35 +0,0 @@ > -From: Michael Grzeschik <m.grzeschik@pengutronix.de> > -Date: Fri, 10 Jun 2016 14:02:30 +0200 > -Subject: [PATCH] beaglebone: add state entry for mmc0 and mmc1 > - > -Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de> > ---- > - arch/arm/dts/am335x-bone-common.dtsi | 15 +++++++++++++++ > - 1 file changed, 15 insertions(+) > - > -diff --git a/arch/arm/dts/am335x-bone-common.dtsi b/arch/arm/dts/am335x-bone-common.dtsi > -index 0413724e0ca1..6e58714516fd 100644 > ---- a/arch/arm/dts/am335x-bone-common.dtsi > -+++ b/arch/arm/dts/am335x-bone-common.dtsi > -@@ -11,6 +11,21 @@ > - linux,stdout-path = &uart0; > - }; > - > -+ bootstate: bootstate { > -+ compatible = "barebox,bootstate"; > -+ backend-type = "nv"; > -+ > -+ system0 { > -+ default_attempts = <3>; > -+ boot = "mmc0"; > -+ }; > -+ > -+ system1 { > -+ default_attempts = <3>; > -+ boot = "mmc1"; > -+ }; > -+ }; > -+ > - cpus { > - cpu@0 { > - cpu0-supply = <&dcdc2_reg>; > diff --git a/configs/platform-v7a/patches/barebox-2018.05.0/0201-Release-pengutronix-multi_v7-20180515-1.patch b/configs/platform-v7a/patches/barebox-2018.05.0/0201-Release-pengutronix-multi_v7-20180515-1.patch > deleted file mode 100644 > index 4b0c22d..0000000 > --- a/configs/platform-v7a/patches/barebox-2018.05.0/0201-Release-pengutronix-multi_v7-20180515-1.patch > +++ /dev/null > @@ -1,22 +0,0 @@ > -From: Roland Hieber <r.hieber@pengutronix.de> > -Date: Tue, 15 May 2018 23:44:48 +0200 > -Subject: [PATCH] Release pengutronix/multi_v7/20180515-1 > - > -Signed-off-by: Roland Hieber <r.hieber@pengutronix.de> > ---- > - Makefile | 2 +- > - 1 file changed, 1 insertion(+), 1 deletion(-) > - > -diff --git a/Makefile b/Makefile > -index 88c19917394f..11e79cc339f4 100644 > ---- a/Makefile > -+++ b/Makefile > -@@ -1,7 +1,7 @@ > - VERSION = 2018 > - PATCHLEVEL = 05 > - SUBLEVEL = 0 > --EXTRAVERSION = > -+EXTRAVERSION =-20180515-1 > - NAME = None > - > - # *DOCUMENTATION* > diff --git a/configs/platform-v7a/patches/barebox-2018.05.0/series b/configs/platform-v7a/patches/barebox-2018.05.0/series > deleted file mode 100644 > index 272791c..0000000 > --- a/configs/platform-v7a/patches/barebox-2018.05.0/series > +++ /dev/null > @@ -1,15 +0,0 @@ > -# umpf-base: v2018.05.0 > -# umpf-name: pengutronix/multi_v7 > -# umpf-version: pengutronix/multi_v7/20180515-1 > -# umpf-topic: v2018.05.0/customers/pengutronix/beaglebone > -# umpf-hashinfo: d1f50bff60c7069caad2df4ef02f672be456f141 > -# umpf-topic-range: cd4320e3e86bd2ab7b4a19016ef8df6c5d69a5a5..d1f50bff60c7069caad2df4ef02f672be456f141 > -0001-beaglebone-add-state-entry-for-mmc0-and-mmc1.patch > -# umpf-topic: v2018.05.0/customers/pengutronix/udoo-neo > -# umpf-hashinfo: 772e5039c9a147256a085c76a74cf5cb5c14ec35 > -# umpf-topic-range: d1f50bff60c7069caad2df4ef02f672be456f141..183d8e8d0ccf827481923b3872144e2c10ef9fac > -0101-ARM-imx-add-support-for-Udoo-Neo-full.patch > -# umpf-release: pengutronix/multi_v7/20180515-1 > -# umpf-topic-range: 183d8e8d0ccf827481923b3872144e2c10ef9fac..734e18abc455f563837dd6ad0df6fb9378053b00 > -0201-Release-pengutronix-multi_v7-20180515-1.patch > -# umpf-end > diff --git a/configs/platform-v7a/patches/barebox-2018.11.0/0001-ARM-import-opcode-helpers-from-Linux-kernel.patch b/configs/platform-v7a/patches/barebox-2018.11.0/0001-ARM-import-opcode-helpers-from-Linux-kernel.patch > new file mode 100644 > index 0000000..bd459d0 > --- /dev/null > +++ b/configs/platform-v7a/patches/barebox-2018.11.0/0001-ARM-import-opcode-helpers-from-Linux-kernel.patch > @@ -0,0 +1,299 @@ > +From: Lucas Stach <l.stach@pengutronix.de> > +Date: Thu, 1 Nov 2018 10:18:37 +0100 > +Subject: [PATCH] ARM: import opcode helpers from Linux kernel > + > +Those are needed to generate some of the ARM SEC and VIRT > +opcodes in a portable way. > + > +Signed-off-by: Lucas Stach <l.stach@pengutronix.de> > +Tested-by: Roland Hieber <r.hieber@pengutronix.de> > +Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> > +--- > + arch/arm/include/asm/opcodes-virt.h | 39 +++++ > + arch/arm/include/asm/opcodes.h | 231 ++++++++++++++++++++++++++++ > + 2 files changed, 270 insertions(+) > + create mode 100644 arch/arm/include/asm/opcodes-virt.h > + create mode 100644 arch/arm/include/asm/opcodes.h > + > +diff --git a/arch/arm/include/asm/opcodes-virt.h b/arch/arm/include/asm/opcodes-virt.h > +new file mode 100644 > +index 000000000000..efcfdf92d9d5 > +--- /dev/null > ++++ b/arch/arm/include/asm/opcodes-virt.h > +@@ -0,0 +1,39 @@ > ++/* > ++ * opcodes-virt.h: Opcode definitions for the ARM virtualization extensions > ++ * Copyright (C) 2012 Linaro Limited > ++ * > ++ * This program is free software; you can redistribute it and/or modify > ++ * it under the terms of the GNU General Public License as published by > ++ * the Free Software Foundation; either version 2 of the License, or > ++ * (at your option) any later version. > ++ * > ++ * This program is distributed in the hope that it will be useful, > ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of > ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > ++ * GNU General Public License for more details. > ++ * > ++ * You should have received a copy of the GNU General Public License along > ++ * with this program; if not, write to the Free Software Foundation, Inc., > ++ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. > ++ */ > ++#ifndef __ASM_ARM_OPCODES_VIRT_H > ++#define __ASM_ARM_OPCODES_VIRT_H > ++ > ++#include <asm/opcodes.h> > ++ > ++#define __HVC(imm16) __inst_arm_thumb32( \ > ++ 0xE1400070 | (((imm16) & 0xFFF0) << 4) | ((imm16) & 0x000F), \ > ++ 0xF7E08000 | (((imm16) & 0xF000) << 4) | ((imm16) & 0x0FFF) \ > ++) > ++ > ++#define __ERET __inst_arm_thumb32( \ > ++ 0xE160006E, \ > ++ 0xF3DE8F00 \ > ++) > ++ > ++#define __MSR_ELR_HYP(regnum) __inst_arm_thumb32( \ > ++ 0xE12EF300 | regnum, \ > ++ 0xF3808E30 | (regnum << 16) \ > ++) > ++ > ++#endif /* ! __ASM_ARM_OPCODES_VIRT_H */ > +diff --git a/arch/arm/include/asm/opcodes.h b/arch/arm/include/asm/opcodes.h > +new file mode 100644 > +index 000000000000..a78bf5d2c518 > +--- /dev/null > ++++ b/arch/arm/include/asm/opcodes.h > +@@ -0,0 +1,231 @@ > ++/* > ++ * arch/arm/include/asm/opcodes.h > ++ * > ++ * This program is free software; you can redistribute it and/or modify > ++ * it under the terms of the GNU General Public License version 2 as > ++ * published by the Free Software Foundation. > ++ */ > ++ > ++#ifndef __ASM_ARM_OPCODES_H > ++#define __ASM_ARM_OPCODES_H > ++ > ++#ifndef __ASSEMBLY__ > ++#include <linux/linkage.h> > ++extern asmlinkage unsigned int arm_check_condition(u32 opcode, u32 psr); > ++#endif > ++ > ++#define ARM_OPCODE_CONDTEST_FAIL 0 > ++#define ARM_OPCODE_CONDTEST_PASS 1 > ++#define ARM_OPCODE_CONDTEST_UNCOND 2 > ++ > ++ > ++/* > ++ * Assembler opcode byteswap helpers. > ++ * These are only intended for use by this header: don't use them directly, > ++ * because they will be suboptimal in most cases. > ++ */ > ++#define ___asm_opcode_swab32(x) ( \ > ++ (((x) << 24) & 0xFF000000) \ > ++ | (((x) << 8) & 0x00FF0000) \ > ++ | (((x) >> 8) & 0x0000FF00) \ > ++ | (((x) >> 24) & 0x000000FF) \ > ++) > ++#define ___asm_opcode_swab16(x) ( \ > ++ (((x) << 8) & 0xFF00) \ > ++ | (((x) >> 8) & 0x00FF) \ > ++) > ++#define ___asm_opcode_swahb32(x) ( \ > ++ (((x) << 8) & 0xFF00FF00) \ > ++ | (((x) >> 8) & 0x00FF00FF) \ > ++) > ++#define ___asm_opcode_swahw32(x) ( \ > ++ (((x) << 16) & 0xFFFF0000) \ > ++ | (((x) >> 16) & 0x0000FFFF) \ > ++) > ++#define ___asm_opcode_identity32(x) ((x) & 0xFFFFFFFF) > ++#define ___asm_opcode_identity16(x) ((x) & 0xFFFF) > ++ > ++ > ++/* > ++ * Opcode byteswap helpers > ++ * > ++ * These macros help with converting instructions between a canonical integer > ++ * format and in-memory representation, in an endianness-agnostic manner. > ++ * > ++ * __mem_to_opcode_*() convert from in-memory representation to canonical form. > ++ * __opcode_to_mem_*() convert from canonical form to in-memory representation. > ++ * > ++ * > ++ * Canonical instruction representation: > ++ * > ++ * ARM: 0xKKLLMMNN > ++ * Thumb 16-bit: 0x0000KKLL, where KK < 0xE8 > ++ * Thumb 32-bit: 0xKKLLMMNN, where KK >= 0xE8 > ++ * > ++ * There is no way to distinguish an ARM instruction in canonical representation > ++ * from a Thumb instruction (just as these cannot be distinguished in memory). > ++ * Where this distinction is important, it needs to be tracked separately. > ++ * > ++ * Note that values in the range 0x0000E800..0xE7FFFFFF intentionally do not > ++ * represent any valid Thumb-2 instruction. For this range, > ++ * __opcode_is_thumb32() and __opcode_is_thumb16() will both be false. > ++ * > ++ * The ___asm variants are intended only for use by this header, in situations > ++ * involving inline assembler. For .S files, the normal __opcode_*() macros > ++ * should do the right thing. > ++ */ > ++#ifdef __ASSEMBLY__ > ++ > ++#define ___opcode_swab32(x) ___asm_opcode_swab32(x) > ++#define ___opcode_swab16(x) ___asm_opcode_swab16(x) > ++#define ___opcode_swahb32(x) ___asm_opcode_swahb32(x) > ++#define ___opcode_swahw32(x) ___asm_opcode_swahw32(x) > ++#define ___opcode_identity32(x) ___asm_opcode_identity32(x) > ++#define ___opcode_identity16(x) ___asm_opcode_identity16(x) > ++ > ++#else /* ! __ASSEMBLY__ */ > ++ > ++#include <linux/types.h> > ++#include <linux/swab.h> > ++ > ++#define ___opcode_swab32(x) swab32(x) > ++#define ___opcode_swab16(x) swab16(x) > ++#define ___opcode_swahb32(x) swahb32(x) > ++#define ___opcode_swahw32(x) swahw32(x) > ++#define ___opcode_identity32(x) ((u32)(x)) > ++#define ___opcode_identity16(x) ((u16)(x)) > ++ > ++#endif /* ! __ASSEMBLY__ */ > ++ > ++ > ++#ifdef CONFIG_CPU_ENDIAN_BE8 > ++ > ++#define __opcode_to_mem_arm(x) ___opcode_swab32(x) > ++#define __opcode_to_mem_thumb16(x) ___opcode_swab16(x) > ++#define __opcode_to_mem_thumb32(x) ___opcode_swahb32(x) > ++#define ___asm_opcode_to_mem_arm(x) ___asm_opcode_swab32(x) > ++#define ___asm_opcode_to_mem_thumb16(x) ___asm_opcode_swab16(x) > ++#define ___asm_opcode_to_mem_thumb32(x) ___asm_opcode_swahb32(x) > ++ > ++#else /* ! CONFIG_CPU_ENDIAN_BE8 */ > ++ > ++#define __opcode_to_mem_arm(x) ___opcode_identity32(x) > ++#define __opcode_to_mem_thumb16(x) ___opcode_identity16(x) > ++#define ___asm_opcode_to_mem_arm(x) ___asm_opcode_identity32(x) > ++#define ___asm_opcode_to_mem_thumb16(x) ___asm_opcode_identity16(x) > ++#ifndef CONFIG_CPU_ENDIAN_BE32 > ++/* > ++ * On BE32 systems, using 32-bit accesses to store Thumb instructions will not > ++ * work in all cases, due to alignment constraints. For now, a correct > ++ * version is not provided for BE32. > ++ */ > ++#define __opcode_to_mem_thumb32(x) ___opcode_swahw32(x) > ++#define ___asm_opcode_to_mem_thumb32(x) ___asm_opcode_swahw32(x) > ++#endif > ++ > ++#endif /* ! CONFIG_CPU_ENDIAN_BE8 */ > ++ > ++#define __mem_to_opcode_arm(x) __opcode_to_mem_arm(x) > ++#define __mem_to_opcode_thumb16(x) __opcode_to_mem_thumb16(x) > ++#ifndef CONFIG_CPU_ENDIAN_BE32 > ++#define __mem_to_opcode_thumb32(x) __opcode_to_mem_thumb32(x) > ++#endif > ++ > ++/* Operations specific to Thumb opcodes */ > ++ > ++/* Instruction size checks: */ > ++#define __opcode_is_thumb32(x) ( \ > ++ ((x) & 0xF8000000) == 0xE8000000 \ > ++ || ((x) & 0xF0000000) == 0xF0000000 \ > ++) > ++#define __opcode_is_thumb16(x) ( \ > ++ ((x) & 0xFFFF0000) == 0 \ > ++ && !(((x) & 0xF800) == 0xE800 || ((x) & 0xF000) == 0xF000) \ > ++) > ++ > ++/* Operations to construct or split 32-bit Thumb instructions: */ > ++#define __opcode_thumb32_first(x) (___opcode_identity16((x) >> 16)) > ++#define __opcode_thumb32_second(x) (___opcode_identity16(x)) > ++#define __opcode_thumb32_compose(first, second) ( \ > ++ (___opcode_identity32(___opcode_identity16(first)) << 16) \ > ++ | ___opcode_identity32(___opcode_identity16(second)) \ > ++) > ++#define ___asm_opcode_thumb32_first(x) (___asm_opcode_identity16((x) >> 16)) > ++#define ___asm_opcode_thumb32_second(x) (___asm_opcode_identity16(x)) > ++#define ___asm_opcode_thumb32_compose(first, second) ( \ > ++ (___asm_opcode_identity32(___asm_opcode_identity16(first)) << 16) \ > ++ | ___asm_opcode_identity32(___asm_opcode_identity16(second)) \ > ++) > ++ > ++/* > ++ * Opcode injection helpers > ++ * > ++ * In rare cases it is necessary to assemble an opcode which the > ++ * assembler does not support directly, or which would normally be > ++ * rejected because of the CFLAGS or AFLAGS used to build the affected > ++ * file. > ++ * > ++ * Before using these macros, consider carefully whether it is feasible > ++ * instead to change the build flags for your file, or whether it really > ++ * makes sense to support old assembler versions when building that > ++ * particular kernel feature. > ++ * > ++ * The macros defined here should only be used where there is no viable > ++ * alternative. > ++ * > ++ * > ++ * __inst_arm(x): emit the specified ARM opcode > ++ * __inst_thumb16(x): emit the specified 16-bit Thumb opcode > ++ * __inst_thumb32(x): emit the specified 32-bit Thumb opcode > ++ * > ++ * __inst_arm_thumb16(arm, thumb): emit either the specified arm or > ++ * 16-bit Thumb opcode, depending on whether an ARM or Thumb-2 > ++ * kernel is being built > ++ * > ++ * __inst_arm_thumb32(arm, thumb): emit either the specified arm or > ++ * 32-bit Thumb opcode, depending on whether an ARM or Thumb-2 > ++ * kernel is being built > ++ * > ++ * > ++ * Note that using these macros directly is poor practice. Instead, you > ++ * should use them to define human-readable wrapper macros to encode the > ++ * instructions that you care about. In code which might run on ARMv7 or > ++ * above, you can usually use the __inst_arm_thumb{16,32} macros to > ++ * specify the ARM and Thumb alternatives at the same time. This ensures > ++ * that the correct opcode gets emitted depending on the instruction set > ++ * used for the kernel build. > ++ * > ++ * Look at opcodes-virt.h for an example of how to use these macros. > ++ */ > ++#include <linux/stringify.h> > ++ > ++#define __inst_arm(x) ___inst_arm(___asm_opcode_to_mem_arm(x)) > ++#define __inst_thumb32(x) ___inst_thumb32( \ > ++ ___asm_opcode_to_mem_thumb16(___asm_opcode_thumb32_first(x)), \ > ++ ___asm_opcode_to_mem_thumb16(___asm_opcode_thumb32_second(x)) \ > ++) > ++#define __inst_thumb16(x) ___inst_thumb16(___asm_opcode_to_mem_thumb16(x)) > ++ > ++#ifdef CONFIG_THUMB2_BAREBOX > ++#define __inst_arm_thumb16(arm_opcode, thumb_opcode) \ > ++ __inst_thumb16(thumb_opcode) > ++#define __inst_arm_thumb32(arm_opcode, thumb_opcode) \ > ++ __inst_thumb32(thumb_opcode) > ++#else > ++#define __inst_arm_thumb16(arm_opcode, thumb_opcode) __inst_arm(arm_opcode) > ++#define __inst_arm_thumb32(arm_opcode, thumb_opcode) __inst_arm(arm_opcode) > ++#endif > ++ > ++/* Helpers for the helpers. Don't use these directly. */ > ++#ifdef __ASSEMBLY__ > ++#define ___inst_arm(x) .long x > ++#define ___inst_thumb16(x) .short x > ++#define ___inst_thumb32(first, second) .short first, second > ++#else > ++#define ___inst_arm(x) ".long " __stringify(x) "\n\t" > ++#define ___inst_thumb16(x) ".short " __stringify(x) "\n\t" > ++#define ___inst_thumb32(first, second) \ > ++ ".short " __stringify(first) ", " __stringify(second) "\n\t" > ++#endif > ++ > ++#endif /* __ASM_ARM_OPCODES_H */ > diff --git a/configs/platform-v7a/patches/barebox-2018.11.0/0002-ARM-safely-switch-from-HYP-to-SVC-mode-if-required.patch b/configs/platform-v7a/patches/barebox-2018.11.0/0002-ARM-safely-switch-from-HYP-to-SVC-mode-if-required.patch > new file mode 100644 > index 0000000..fcd116a > --- /dev/null > +++ b/configs/platform-v7a/patches/barebox-2018.11.0/0002-ARM-safely-switch-from-HYP-to-SVC-mode-if-required.patch > @@ -0,0 +1,88 @@ > +From: Lucas Stach <l.stach@pengutronix.de> > +Date: Thu, 1 Nov 2018 10:18:38 +0100 > +Subject: [PATCH] ARM: safely switch from HYP to SVC mode if required > + > +This is a port of the Linux safe_svcmode_maskall macro to > +the Barebox lowlevel init. > + > +Signed-off-by: Lucas Stach <l.stach@pengutronix.de> > +Tested-by: Roland Hieber <r.hieber@pengutronix.de> > +Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> > +--- > + arch/arm/cpu/lowlevel.S | 18 +++++++++++++++--- > + arch/arm/include/asm/system.h | 26 ++++++++++++++++++++++++++ > + 2 files changed, 41 insertions(+), 3 deletions(-) > + > +diff --git a/arch/arm/cpu/lowlevel.S b/arch/arm/cpu/lowlevel.S > +index 7696a198e764..43665981e48b 100644 > +--- a/arch/arm/cpu/lowlevel.S > ++++ b/arch/arm/cpu/lowlevel.S > +@@ -1,16 +1,28 @@ > + #include <linux/linkage.h> > + #include <init.h> > + #include <asm/system.h> > ++#include <asm/opcodes-virt.h> > + > + .section ".text_bare_init_","ax" > + ENTRY(arm_cpu_lowlevel_init) > + /* save lr, since it may be banked away with a processor mode change */ > + mov r2, lr > ++ > + /* set the cpu to SVC32 mode, mask irq and fiq */ > + mrs r12, cpsr > +- bic r12, r12, #0x1f > +- orr r12, r12, #0xd3 > +- msr cpsr, r12 > ++ eor r12, r12, #HYP_MODE > ++ tst r12, #MODE_MASK > ++ bic r12, r12, #MODE_MASK > ++ orr r12, r12, #(PSR_I_BIT | PSR_F_BIT | SVC_MODE) > ++THUMB( orr r12, r12, #PSR_T_BIT ) > ++ bne 1f > ++ orr r12, r12, #PSR_A_BIT > ++ adr lr, 2f > ++ msr spsr_cxsf, r12 > ++ __MSR_ELR_HYP(14) > ++ __ERET > ++1: msr cpsr_c, r12 > ++2: > + > + #if __LINUX_ARM_ARCH__ >= 6 > + /* > +diff --git a/arch/arm/include/asm/system.h b/arch/arm/include/asm/system.h > +index 5cf828ea36cb..48242ab473f4 100644 > +--- a/arch/arm/include/asm/system.h > ++++ b/arch/arm/include/asm/system.h > +@@ -60,6 +60,32 @@ > + #define CR_AFE (1 << 29) /* Access flag enable */ > + #define CR_TE (1 << 30) /* Thumb exception enable */ > + > ++/* > ++ * PSR bits > ++ */ > ++#define USR_MODE 0x00000010 > ++#define FIQ_MODE 0x00000011 > ++#define IRQ_MODE 0x00000012 > ++#define SVC_MODE 0x00000013 > ++#define ABT_MODE 0x00000017 > ++#define HYP_MODE 0x0000001a > ++#define UND_MODE 0x0000001b > ++#define SYSTEM_MODE 0x0000001f > ++#define MODE32_BIT 0x00000010 > ++#define MODE_MASK 0x0000001f > ++ > ++#define PSR_T_BIT 0x00000020 > ++#define PSR_F_BIT 0x00000040 > ++#define PSR_I_BIT 0x00000080 > ++#define PSR_A_BIT 0x00000100 > ++#define PSR_E_BIT 0x00000200 > ++#define PSR_J_BIT 0x01000000 > ++#define PSR_Q_BIT 0x08000000 > ++#define PSR_V_BIT 0x10000000 > ++#define PSR_C_BIT 0x20000000 > ++#define PSR_Z_BIT 0x40000000 > ++#define PSR_N_BIT 0x80000000 > ++ > + #ifndef __ASSEMBLY__ > + #if __LINUX_ARM_ARCH__ >= 7 > + static inline unsigned int current_el(void) > diff --git a/configs/platform-v7a/patches/barebox-2018.11.0/0003-ARM-allow-secure-monitor-code-to-be-built-without-PS.patch b/configs/platform-v7a/patches/barebox-2018.11.0/0003-ARM-allow-secure-monitor-code-to-be-built-without-PS.patch > new file mode 100644 > index 0000000..eed9e52 > --- /dev/null > +++ b/configs/platform-v7a/patches/barebox-2018.11.0/0003-ARM-allow-secure-monitor-code-to-be-built-without-PS.patch > @@ -0,0 +1,37 @@ > +From: Lucas Stach <l.stach@pengutronix.de> > +Date: Thu, 1 Nov 2018 10:18:39 +0100 > +Subject: [PATCH] ARM: allow secure monitor code to be built without PSCI > + > +The hyp mode handling added in the secure monitor code is also useful > +when Barebox doesn't have PSCI control. Allow to build without PSCI. > + > +Signed-off-by: Lucas Stach <l.stach@pengutronix.de> > +Tested-by: Roland Hieber <r.hieber@pengutronix.de> > +Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> > +--- > + arch/arm/cpu/sm_as.S | 4 ++++ > + 1 file changed, 4 insertions(+) > + > +diff --git a/arch/arm/cpu/sm_as.S b/arch/arm/cpu/sm_as.S > +index 09580e75de5f..0d01e1bf2435 100644 > +--- a/arch/arm/cpu/sm_as.S > ++++ b/arch/arm/cpu/sm_as.S > +@@ -129,7 +129,9 @@ secure_monitor: > + sub sp, sp, #4*4 @ allocate result structure on stack > + mov r12, sp > + push {r4-r6, r12} > ++#ifdef CONFIG_ARM_PSCI > + bl psci_entry > ++#endif > + pop {r4-r6, r12} > + ldm r12, {r0-r3} > + add sp, sp, #4*4 > +@@ -163,6 +165,8 @@ ENTRY(psci_cpu_entry) > + mcr p15, 0, r0, c1, c0, 1 @ ACTLR > + > + bl secure_monitor_stack_setup > ++#ifdef CONFIG_ARM_PSCI > + bl psci_cpu_entry_c > ++#endif > + > + ENDPROC(psci_cpu_entry) > diff --git a/configs/platform-v7a/patches/barebox-2018.11.0/0004-ARM-add-file-for-HYP-mode-related-setup.patch b/configs/platform-v7a/patches/barebox-2018.11.0/0004-ARM-add-file-for-HYP-mode-related-setup.patch > new file mode 100644 > index 0000000..8047922 > --- /dev/null > +++ b/configs/platform-v7a/patches/barebox-2018.11.0/0004-ARM-add-file-for-HYP-mode-related-setup.patch > @@ -0,0 +1,193 @@ > +From: Lucas Stach <l.stach@pengutronix.de> > +Date: Thu, 1 Nov 2018 10:18:40 +0100 > +Subject: [PATCH] ARM: add file for HYP mode related setup > + > +This adds routines to add hyp mode vectors and switch back to HYP > +mode from SVC. This is needed in both the PBL and Barebox proper. > + > +Signed-off-by: Lucas Stach <l.stach@pengutronix.de> > +Tested-by: Roland Hieber <r.hieber@pengutronix.de> > +Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> > +--- > + arch/arm/cpu/Makefile | 3 + > + arch/arm/cpu/hyp.S | 116 ++++++++++++++++++++++++++++++++++ > + arch/arm/cpu/sm_as.S | 11 ---- > + arch/arm/include/asm/secure.h | 3 + > + 4 files changed, 122 insertions(+), 11 deletions(-) > + create mode 100644 arch/arm/cpu/hyp.S > + > +diff --git a/arch/arm/cpu/Makefile b/arch/arm/cpu/Makefile > +index 874d723e2cee..0a403bc981c5 100644 > +--- a/arch/arm/cpu/Makefile > ++++ b/arch/arm/cpu/Makefile > +@@ -4,6 +4,9 @@ obj-$(CONFIG_ARM_EXCEPTIONS) += exceptions$(S64).o interrupts$(S64).o > + obj-$(CONFIG_MMU) += mmu$(S64).o > + lwl-y += lowlevel$(S64).o > + obj-pbl-$(CONFIG_MMU) += mmu-early$(S64).o > ++obj-pbl-$(CONFIG_CPU_32v7) += hyp.o > ++AFLAGS_hyp.o :=-Wa,-march=armv7-a -Wa,-mcpu=all > ++AFLAGS_pbl-hyp.o :=-Wa,-march=armv7-a -Wa,-mcpu=all > + > + obj-y += start.o entry.o > + > +diff --git a/arch/arm/cpu/hyp.S b/arch/arm/cpu/hyp.S > +new file mode 100644 > +index 000000000000..1314b56eab25 > +--- /dev/null > ++++ b/arch/arm/cpu/hyp.S > +@@ -0,0 +1,116 @@ > ++#include <linux/linkage.h> > ++#include <asm/system.h> > ++#include <asm/opcodes-virt.h> > ++#include <init.h> > ++ > ++.arch_extension sec > ++.arch_extension virt > ++ > ++__BARE_INIT > ++ > ++.data > ++ .align 2 > ++ENTRY(__boot_cpu_mode) > ++ .long 0 > ++.text > ++ > ++ENTRY(__hyp_install) > ++ mrs r12, cpsr > ++ and r12, r12, #MODE_MASK > ++ > ++ @ Save the initial CPU state > ++ adr r0, .L__boot_cpu_mode_offset > ++ ldr r1, [r0] > ++ str r12, [r0, r1] > ++ > ++ cmp r12, #HYP_MODE > ++ movne pc, lr @ give up if the CPU is not in HYP mode > ++ > ++ @ Now install the hypervisor stub: > ++ adr r12, __hyp_vectors > ++ mcr p15, 4, r12, c12, c0, 0 @ set hypervisor vector base (HVBAR) > ++ > ++ @ Disable all traps, so we don't get any nasty surprise > ++ mov r12, #0 > ++ mcr p15, 4, r12, c1, c1, 0 @ HCR > ++ mcr p15, 4, r12, c1, c1, 2 @ HCPTR > ++ mcr p15, 4, r12, c1, c1, 3 @ HSTR > ++ > ++THUMB( orr r12, #(1 << 30) ) @ HSCTLR.TE > ++ mcr p15, 4, r12, c1, c0, 0 @ HSCTLR > ++ > ++ mrc p15, 4, r12, c1, c1, 1 @ HDCR > ++ and r12, #0x1f @ Preserve HPMN > ++ mcr p15, 4, r12, c1, c1, 1 @ HDCR > ++ > ++ @ Make sure NS-SVC is initialised appropriately > ++ mrc p15, 0, r12, c1, c0, 0 @ SCTLR > ++ orr r12, #(1 << 5) @ CP15 barriers enabled > ++ bic r12, #(3 << 7) @ Clear SED/ITD for v8 (RES0 for v7) > ++ bic r12, #(3 << 19) @ WXN and UWXN disabled > ++ mcr p15, 0, r12, c1, c0, 0 @ SCTLR > ++ > ++ mrc p15, 0, r12, c0, c0, 0 @ MIDR > ++ mcr p15, 4, r12, c0, c0, 0 @ VPIDR > ++ > ++ mrc p15, 0, r12, c0, c0, 5 @ MPIDR > ++ mcr p15, 4, r12, c0, c0, 5 @ VMPIDR > ++ bx lr > ++ENDPROC(__hyp_install) > ++ > ++ENTRY(armv7_hyp_install) > ++ mov r2, lr > ++ > ++ bl __hyp_install > ++ > ++ /* set the cpu to SVC32 mode, mask irq and fiq */ > ++ mrs r12, cpsr > ++ eor r12, r12, #HYP_MODE > ++ tst r12, #MODE_MASK > ++ bic r12, r12, #MODE_MASK > ++ orr r12, r12, #(PSR_I_BIT | PSR_F_BIT | SVC_MODE) > ++THUMB( orr r12, r12, #PSR_T_BIT ) > ++ bne 1f > ++ orr r12, r12, #PSR_A_BIT > ++ adr lr, 2f > ++ msr spsr_cxsf, r12 > ++ __MSR_ELR_HYP(14) > ++ __ERET > ++1: msr cpsr_c, r12 > ++2: > ++ mov pc, r2 > ++ENDPROC(armv7_hyp_install) > ++ > ++ENTRY(armv7_switch_to_hyp) > ++ mov r0, lr > ++ mov r1, sp @ save SVC copy of LR and SP > ++ isb > ++ hvc #0 @ for older asm: .byte 0x70, 0x00, 0x40, 0xe1 > ++ mov sp, r1 > ++ mov lr, r0 @ restore SVC copy of LR and SP > ++ > ++ bx lr > ++ENDPROC(armv7_switch_to_hyp) > ++ > ++.align 2 > ++.L__boot_cpu_mode_offset: > ++ .long __boot_cpu_mode - . > ++ > ++/* The HYP trap is crafted to match armv7_switch_to_hyp() */ > ++__hyp_do_trap: > ++ mov lr, r0 > ++ mov sp, r1 > ++ bx lr > ++ENDPROC(__hyp_do_trap) > ++ > ++.align 5 > ++__hyp_vectors: > ++__hyp_reset: W(b) . > ++__hyp_und: W(b) . > ++__hyp_svc: W(b) . > ++__hyp_pabort: W(b) . > ++__hyp_dabort: W(b) . > ++__hyp_trap: W(b) __hyp_do_trap > ++__hyp_irq: W(b) . > ++__hyp_fiq: W(b) . > ++ENDPROC(__hyp_vectors) > +diff --git a/arch/arm/cpu/sm_as.S b/arch/arm/cpu/sm_as.S > +index 0d01e1bf2435..de6cd0406f4f 100644 > +--- a/arch/arm/cpu/sm_as.S > ++++ b/arch/arm/cpu/sm_as.S > +@@ -148,17 +148,6 @@ hyp_trap: > + mov pc, lr @ do no switch modes, but > + @ return to caller > + > +-ENTRY(armv7_switch_to_hyp) > +- mov r0, lr > +- mov r1, sp @ save SVC copy of LR and SP > +- isb > +- hvc #0 @ for older asm: .byte 0x70, 0x00, 0x40, 0xe1 > +- mov sp, r1 > +- mov lr, r0 @ restore SVC copy of LR and SP > +- > +- bx lr > +-ENDPROC(armv7_switch_to_hyp) > +- > + ENTRY(psci_cpu_entry) > + mrc p15, 0, r0, c1, c0, 1 @ ACTLR > + orr r0, r0, #(1 << 6) @ Set SMP bit > +diff --git a/arch/arm/include/asm/secure.h b/arch/arm/include/asm/secure.h > +index a4cb1f6c1c44..663d81ea27dd 100644 > +--- a/arch/arm/include/asm/secure.h > ++++ b/arch/arm/include/asm/secure.h > +@@ -5,9 +5,12 @@ > + > + int armv7_secure_monitor_install(void); > + int __armv7_secure_monitor_install(void); > ++ > + void armv7_switch_to_hyp(void); > ++void armv7_hyp_install(void); > + > + extern unsigned char secure_monitor_init_vectors[]; > ++extern int __boot_cpu_mode; > + > + enum arm_security_state { > + ARM_STATE_SECURE, > diff --git a/configs/platform-v7a/patches/barebox-2018.11.0/0005-ARM-don-t-try-to-install-secure-monitor-when-entered.patch b/configs/platform-v7a/patches/barebox-2018.11.0/0005-ARM-don-t-try-to-install-secure-monitor-when-entered.patch > new file mode 100644 > index 0000000..b82de4b > --- /dev/null > +++ b/configs/platform-v7a/patches/barebox-2018.11.0/0005-ARM-don-t-try-to-install-secure-monitor-when-entered.patch > @@ -0,0 +1,30 @@ > +From: Lucas Stach <l.stach@pengutronix.de> > +Date: Thu, 1 Nov 2018 10:18:41 +0100 > +Subject: [PATCH] ARM: don't try to install secure monitor when entered in HYP > + mode > + > +When Barebox has been entered in HYP mode, the CPU is already switched > +to the non-secure world and it's not possible for Barebox to install > +it's own secure monitor. > + > +Signed-off-by: Lucas Stach <l.stach@pengutronix.de> > +Tested-by: Roland Hieber <r.hieber@pengutronix.de> > +Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> > +--- > + arch/arm/cpu/sm.c | 3 +++ > + 1 file changed, 3 insertions(+) > + > +diff --git a/arch/arm/cpu/sm.c b/arch/arm/cpu/sm.c > +index cb0bac106b5f..1246d8e3a441 100644 > +--- a/arch/arm/cpu/sm.c > ++++ b/arch/arm/cpu/sm.c > +@@ -184,6 +184,9 @@ int armv7_secure_monitor_install(void) > + return -EINVAL; > + } > + > ++ if (__boot_cpu_mode == HYP_MODE) > ++ return 0; > ++ > + mmuon = get_cr() & CR_M; > + > + vbar = get_vbar(); > diff --git a/configs/platform-v7a/patches/barebox-2018.11.0/0006-ARM-default-to-starting-kernel-in-HYP-mode-when-ente.patch b/configs/platform-v7a/patches/barebox-2018.11.0/0006-ARM-default-to-starting-kernel-in-HYP-mode-when-ente.patch > new file mode 100644 > index 0000000..1de95c1 > --- /dev/null > +++ b/configs/platform-v7a/patches/barebox-2018.11.0/0006-ARM-default-to-starting-kernel-in-HYP-mode-when-ente.patch > @@ -0,0 +1,31 @@ > +From: Lucas Stach <l.stach@pengutronix.de> > +Date: Thu, 1 Nov 2018 10:18:42 +0100 > +Subject: [PATCH] ARM: default to starting kernel in HYP mode when entered in > + HYP > + > +When Barebox has been entered in HYP mode, there is a high chance that > +the kernel is intended to be started in HYP mode also. Get this > +default into place. > + > +Signed-off-by: Lucas Stach <l.stach@pengutronix.de> > +Tested-by: Roland Hieber <r.hieber@pengutronix.de> > +Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> > +--- > + arch/arm/cpu/sm.c | 3 +++ > + 1 file changed, 3 insertions(+) > + > +diff --git a/arch/arm/cpu/sm.c b/arch/arm/cpu/sm.c > +index 1246d8e3a441..6fad30adabc9 100644 > +--- a/arch/arm/cpu/sm.c > ++++ b/arch/arm/cpu/sm.c > +@@ -262,6 +262,9 @@ static int sm_init(void) > + bootm_secure_state_names, > + ARRAY_SIZE(bootm_secure_state_names)); > + > ++ if (__boot_cpu_mode == HYP_MODE) > ++ bootm_secure_state = ARM_STATE_HYP; > ++ > + return 0; > + } > + device_initcall(sm_init); > +\ No newline at end of file > diff --git a/configs/platform-v7a/patches/barebox-2018.11.0/0007-ARM-install-HYP-vectors-at-PBL-and-Barebox-entry.patch b/configs/platform-v7a/patches/barebox-2018.11.0/0007-ARM-install-HYP-vectors-at-PBL-and-Barebox-entry.patch > new file mode 100644 > index 0000000..10615e9 > --- /dev/null > +++ b/configs/platform-v7a/patches/barebox-2018.11.0/0007-ARM-install-HYP-vectors-at-PBL-and-Barebox-entry.patch > @@ -0,0 +1,105 @@ > +From: Lucas Stach <l.stach@pengutronix.de> > +Date: Thu, 1 Nov 2018 10:18:43 +0100 > +Subject: [PATCH] ARM: install HYP vectors at PBL and Barebox entry > + > +If the CPU was already in HYP mode when entering the PBL, install a > +simple trap handler to allow to get back from SVC to HYP before > +switching to HYP mode. > + > +As the vectors are part of the currently running binary, we need to > +do the same setup when starting the real Barebox binary, as the PBL > +setup vectors might get overwritten. To do this we trap into HYP mode > +just before jumping to Barebox and then re-do the vector setup and > +SVC switch as the first thing in Barebox proper. > + > +Signed-off-by: Lucas Stach <l.stach@pengutronix.de> > +Tested-by: Roland Hieber <r.hieber@pengutronix.de> > +Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> > +--- > + arch/arm/cpu/lowlevel.S | 5 +++++ > + arch/arm/cpu/start-pbl.c | 4 ++++ > + arch/arm/cpu/start.c | 5 +++++ > + arch/arm/cpu/uncompress.c | 4 ++++ > + 4 files changed, 18 insertions(+) > + > +diff --git a/arch/arm/cpu/lowlevel.S b/arch/arm/cpu/lowlevel.S > +index 43665981e48b..3b52644e43e1 100644 > +--- a/arch/arm/cpu/lowlevel.S > ++++ b/arch/arm/cpu/lowlevel.S > +@@ -8,6 +8,11 @@ ENTRY(arm_cpu_lowlevel_init) > + /* save lr, since it may be banked away with a processor mode change */ > + mov r2, lr > + > ++#ifdef CONFIG_CPU_32v7 > ++ /* careful: the hyp install corrupts r0 and r1 */ > ++ bl __hyp_install > ++#endif > ++ > + /* set the cpu to SVC32 mode, mask irq and fiq */ > + mrs r12, cpsr > + eor r12, r12, #HYP_MODE > +diff --git a/arch/arm/cpu/start-pbl.c b/arch/arm/cpu/start-pbl.c > +index 16159d7f9d51..48a808645671 100644 > +--- a/arch/arm/cpu/start-pbl.c > ++++ b/arch/arm/cpu/start-pbl.c > +@@ -26,6 +26,7 @@ > + #include <asm/barebox-arm-head.h> > + #include <asm-generic/memory_layout.h> > + #include <asm/sections.h> > ++#include <asm/secure.h> > + #include <asm/cache.h> > + #include <asm/mmu.h> > + #include <asm/unaligned.h> > +@@ -98,5 +99,8 @@ __noreturn void barebox_single_pbl_start(unsigned long membase, > + else > + barebox = (void *)barebox_base; > + > ++ if (IS_ENABLED(CONFIG_CPU_V7) && __boot_cpu_mode == HYP_MODE) > ++ armv7_switch_to_hyp(); > ++ > + barebox(membase, memsize, boarddata); > + } > +diff --git a/arch/arm/cpu/start.c b/arch/arm/cpu/start.c > +index 64bd942ad764..a79d64eaa6e6 100644 > +--- a/arch/arm/cpu/start.c > ++++ b/arch/arm/cpu/start.c > +@@ -24,6 +24,7 @@ > + #include <asm/barebox-arm-head.h> > + #include <asm-generic/memory_layout.h> > + #include <asm/sections.h> > ++#include <asm/secure.h> > + #include <asm/unaligned.h> > + #include <asm/cache.h> > + #include <asm/mmu.h> > +@@ -147,6 +148,10 @@ __noreturn void barebox_non_pbl_start(unsigned long membase, > + unsigned long barebox_base = arm_mem_barebox_image(membase, > + endmem, > + barebox_size); > ++ > ++ if (IS_ENABLED(CONFIG_CPU_V7)) > ++ armv7_hyp_install(); > ++ > + if (IS_ENABLED(CONFIG_RELOCATABLE)) > + relocate_to_adr(barebox_base); > + > +diff --git a/arch/arm/cpu/uncompress.c b/arch/arm/cpu/uncompress.c > +index 43b49b42120b..048bca0c9599 100644 > +--- a/arch/arm/cpu/uncompress.c > ++++ b/arch/arm/cpu/uncompress.c > +@@ -27,6 +27,7 @@ > + #include <asm/barebox-arm-head.h> > + #include <asm-generic/memory_layout.h> > + #include <asm/sections.h> > ++#include <asm/secure.h> > + #include <asm/cache.h> > + #include <asm/mmu.h> > + #include <asm/unaligned.h> > +@@ -105,5 +106,8 @@ void __noreturn barebox_multi_pbl_start(unsigned long membase, > + > + pr_debug("jumping to uncompressed image at 0x%p\n", barebox); > + > ++ if (IS_ENABLED(CONFIG_CPU_V7) && __boot_cpu_mode == HYP_MODE) > ++ armv7_switch_to_hyp(); > ++ > + barebox(membase, memsize, boarddata); > + } > diff --git a/configs/platform-v7a/patches/barebox-2018.11.0/0008-ARM-rpi-add-revision-IDs-for-Pi-3-Model-B-and-Pi-Zer.patch b/configs/platform-v7a/patches/barebox-2018.11.0/0008-ARM-rpi-add-revision-IDs-for-Pi-3-Model-B-and-Pi-Zer.patch > new file mode 100644 > index 0000000..9aa90b5 > --- /dev/null > +++ b/configs/platform-v7a/patches/barebox-2018.11.0/0008-ARM-rpi-add-revision-IDs-for-Pi-3-Model-B-and-Pi-Zer.patch > @@ -0,0 +1,41 @@ > +From: Enrico Joerns <ejo@pengutronix.de> > +Date: Thu, 1 Nov 2018 10:18:44 +0100 > +Subject: [PATCH] ARM: rpi: add revision IDs for Pi 3 Model B and Pi Zero > + > +Signed-off-by: Enrico Joerns <ejo@pengutronix.de> > +Signed-off-by: Lucas Stach <l.stach@pengutronix.de> > +Tested-by: Roland Hieber <r.hieber@pengutronix.de> > +Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> > +--- > + arch/arm/boards/raspberry-pi/rpi-common.c | 2 ++ > + arch/arm/mach-bcm283x/include/mach/mbox.h | 4 ++++ > + 2 files changed, 6 insertions(+) > + > +diff --git a/arch/arm/boards/raspberry-pi/rpi-common.c b/arch/arm/boards/raspberry-pi/rpi-common.c > +index 6e375bc984de..3baed6525586 100644 > +--- a/arch/arm/boards/raspberry-pi/rpi-common.c > ++++ b/arch/arm/boards/raspberry-pi/rpi-common.c > +@@ -174,6 +174,8 @@ const struct rpi_model rpi_models_old_scheme[] = { > + const struct rpi_model rpi_models_new_scheme[] = { > + RPI_MODEL(0, "Unknown model", NULL), > + RPI_MODEL(BCM2836_BOARD_REV_2_B, "2 Model B", rpi_b_plus_init), > ++ RPI_MODEL(BCM2837_BOARD_REV_3_B, "3 Model B", rpi_b_plus_init), > ++ RPI_MODEL(BCM2835_BOARD_REV_ZERO, "Zero", rpi_b_plus_init), > + }; > + > + static int rpi_board_rev = 0; > +diff --git a/arch/arm/mach-bcm283x/include/mach/mbox.h b/arch/arm/mach-bcm283x/include/mach/mbox.h > +index 2b5aea88ee0a..0d1ac074e328 100644 > +--- a/arch/arm/mach-bcm283x/include/mach/mbox.h > ++++ b/arch/arm/mach-bcm283x/include/mach/mbox.h > +@@ -129,6 +129,10 @@ struct bcm2835_mbox_tag_hdr { > + > + /* RPi 2 */ > + #define BCM2836_BOARD_REV_2_B 0x4 > ++/* RPi 3 */ > ++#define BCM2837_BOARD_REV_3_B 0x8 > ++/* Zero */ > ++#define BCM2835_BOARD_REV_ZERO 0x9 > + > + /* > + * 0x2..0xf from: > diff --git a/configs/platform-v7a/patches/barebox-2018.11.0/0009-ARM-rpi-add-raspberry-pi-3-support.patch b/configs/platform-v7a/patches/barebox-2018.11.0/0009-ARM-rpi-add-raspberry-pi-3-support.patch > new file mode 100644 > index 0000000..8e8d76a > --- /dev/null > +++ b/configs/platform-v7a/patches/barebox-2018.11.0/0009-ARM-rpi-add-raspberry-pi-3-support.patch > @@ -0,0 +1,141 @@ > +From: Lucas Stach <l.stach@pengutronix.de> > +Date: Thu, 1 Nov 2018 10:18:45 +0100 > +Subject: [PATCH] ARM: rpi: add raspberry pi 3 support > + > +This adds basic support at the same feature level as the other > +supported raspberry pi boards. > + > +Signed-off-by: Lucas Stach <l.stach@pengutronix.de> > +Tested-by: Roland Hieber <r.hieber@pengutronix.de> > +Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> > +--- > + arch/arm/boards/raspberry-pi/lowlevel.c | 14 ++++++++++++-- > + arch/arm/configs/rpi_defconfig | 2 ++ > + arch/arm/dts/Makefile | 1 + > + arch/arm/dts/bcm2837-rpi-3.dts | 16 ++++++++++++++++ > + arch/arm/mach-bcm283x/Kconfig | 6 ++++++ > + arch/arm/mach-bcm283x/core.c | 1 + > + images/Makefile.bcm283x | 4 ++++ > + 7 files changed, 42 insertions(+), 2 deletions(-) > + create mode 100644 arch/arm/dts/bcm2837-rpi-3.dts > + > +diff --git a/arch/arm/boards/raspberry-pi/lowlevel.c b/arch/arm/boards/raspberry-pi/lowlevel.c > +index cbc6caa4b9ed..34c9350920e9 100644 > +--- a/arch/arm/boards/raspberry-pi/lowlevel.c > ++++ b/arch/arm/boards/raspberry-pi/lowlevel.c > +@@ -1,7 +1,7 @@ > ++#include <asm/barebox-arm.h> > ++#include <asm/cache.h> > + #include <common.h> > + #include <linux/sizes.h> > +-#include <asm/barebox-arm.h> > +-#include <asm/barebox-arm-head.h> > + #include <mach/platform.h> > + > + extern char __dtb_bcm2835_rpi_start[]; > +@@ -23,3 +23,13 @@ ENTRY_FUNCTION(start_raspberry_pi2, r0, r1, r2) > + > + barebox_arm_entry(BCM2835_SDRAM_BASE, SZ_512M, fdt); > + } > ++ > ++extern char __dtb_bcm2837_rpi_3_start[]; > ++ENTRY_FUNCTION(start_raspberry_pi3, r0, r1, r2) > ++{ > ++ void *fdt = __dtb_bcm2837_rpi_3_start + get_runtime_offset(); > ++ > ++ arm_cpu_lowlevel_init(); > ++ > ++ barebox_arm_entry(BCM2835_SDRAM_BASE, SZ_512M, fdt); > ++} > +diff --git a/arch/arm/configs/rpi_defconfig b/arch/arm/configs/rpi_defconfig > +index f3aef4290425..cd88b4ac751c 100644 > +--- a/arch/arm/configs/rpi_defconfig > ++++ b/arch/arm/configs/rpi_defconfig > +@@ -1,9 +1,11 @@ > + CONFIG_ARCH_BCM283X=y > + CONFIG_MACH_RPI=y > + CONFIG_MACH_RPI2=y > ++CONFIG_MACH_RPI3=y > + CONFIG_AEABI=y > + CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y > + CONFIG_ARM_UNWIND=y > ++CONFIG_IMAGE_COMPRESSION_NONE=y > + CONFIG_MMU=y > + CONFIG_MALLOC_TLSF=y > + CONFIG_KALLSYMS=y > +diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile > +index 1caeca35b484..4e063902c635 100644 > +--- a/arch/arm/dts/Makefile > ++++ b/arch/arm/dts/Makefile > +@@ -71,6 +71,7 @@ pbl-dtb-$(CONFIG_MACH_PHYTEC_SOM_RK3288) += rk3288-phycore-som.dtb.o > + pbl-dtb-$(CONFIG_MACH_REALQ7) += imx6q-dmo-edmqmx6.dtb.o > + pbl-dtb-$(CONFIG_MACH_RPI) += bcm2835-rpi.dtb.o > + pbl-dtb-$(CONFIG_MACH_RPI2) += bcm2836-rpi-2.dtb.o > ++pbl-dtb-$(CONFIG_MACH_RPI3) += bcm2837-rpi-3.dtb.o > + pbl-dtb-$(CONFIG_MACH_SABRELITE) += imx6q-sabrelite.dtb.o imx6dl-sabrelite.dtb.o > + pbl-dtb-$(CONFIG_MACH_SABRESD) += imx6q-sabresd.dtb.o > + pbl-dtb-$(CONFIG_MACH_FREESCALE_IMX6SX_SABRESDB) += imx6sx-sdb.dtb.o > +diff --git a/arch/arm/dts/bcm2837-rpi-3.dts b/arch/arm/dts/bcm2837-rpi-3.dts > +new file mode 100644 > +index 000000000000..d6ffc369122c > +--- /dev/null > ++++ b/arch/arm/dts/bcm2837-rpi-3.dts > +@@ -0,0 +1,16 @@ > ++#include <arm64/broadcom/bcm2837-rpi-3-b.dts> > ++ > ++/ { > ++ chosen { > ++ stdout-path = &uart0; > ++ }; > ++ > ++ memory { > ++ reg = <0x0 0x0>; > ++ }; > ++}; > ++ > ++&uart0 { > ++ status = "okay"; > ++ /delete-node/ bluetooth; > ++}; > +diff --git a/arch/arm/mach-bcm283x/Kconfig b/arch/arm/mach-bcm283x/Kconfig > +index 1457f114ccaa..af2f88c47acb 100644 > +--- a/arch/arm/mach-bcm283x/Kconfig > ++++ b/arch/arm/mach-bcm283x/Kconfig > +@@ -19,6 +19,12 @@ config MACH_RPI2 > + select CPU_V7 > + select MACH_RPI_COMMON > + > ++config MACH_RPI3 > ++ bool "RaspberryPi 3 (BCM2837/CORTEX-A53)" > ++ select CPU_V7 > ++ select MACH_RPI_COMMON > ++ select ARM_SECURE_MONITOR > ++ > + endmenu > + > + config MACH_RPI_DEBUG_UART_BASE > +diff --git a/arch/arm/mach-bcm283x/core.c b/arch/arm/mach-bcm283x/core.c > +index fddcb0d1a1d4..26f0996b1cb8 100644 > +--- a/arch/arm/mach-bcm283x/core.c > ++++ b/arch/arm/mach-bcm283x/core.c > +@@ -41,6 +41,7 @@ static int bcm2835_clk_init(void) > + clk = clk_fixed("uart0-pl0110", 3 * 1000 * 1000); > + clk_register_clkdev(clk, NULL, "uart0-pl0110"); > + clk_register_clkdev(clk, NULL, "20201000.serial"); > ++ clk_register_clkdev(clk, NULL, "3f201000.serial"); > + > + clk = clk_fixed("bcm2835-cs", 1 * 1000 * 1000); > + clk_register_clkdev(clk, NULL, "bcm2835-cs"); > +diff --git a/images/Makefile.bcm283x b/images/Makefile.bcm283x > +index d59ef043f05c..d14e648926ac 100644 > +--- a/images/Makefile.bcm283x > ++++ b/images/Makefile.bcm283x > +@@ -9,3 +9,7 @@ image-$(CONFIG_MACH_RPI) += barebox-raspberry-pi-1.img > + pblx-$(CONFIG_MACH_RPI2) += start_raspberry_pi2 > + FILE_barebox-raspberry-pi-2.img = start_raspberry_pi2.pblx > + image-$(CONFIG_MACH_RPI2) += barebox-raspberry-pi-2.img > ++ > ++pblx-$(CONFIG_MACH_RPI3) += start_raspberry_pi3 > ++FILE_barebox-raspberry-pi-3.img = start_raspberry_pi3.pblx > ++image-$(CONFIG_MACH_RPI3) += barebox-raspberry-pi-3.img > +\ No newline at end of file > diff --git a/configs/platform-v7a/patches/barebox-2018.11.0/0010-ARM-rpi-autosize-malloc-area.patch b/configs/platform-v7a/patches/barebox-2018.11.0/0010-ARM-rpi-autosize-malloc-area.patch > new file mode 100644 > index 0000000..da498ba > --- /dev/null > +++ b/configs/platform-v7a/patches/barebox-2018.11.0/0010-ARM-rpi-autosize-malloc-area.patch > @@ -0,0 +1,25 @@ > +From: Lucas Stach <l.stach@pengutronix.de> > +Date: Thu, 1 Nov 2018 10:18:46 +0100 > +Subject: [PATCH] ARM: rpi: autosize malloc area > + > +Autosize the malloc area according to the available RAM size. > + > +Signed-off-by: Lucas Stach <l.stach@pengutronix.de> > +Tested-by: Roland Hieber <r.hieber@pengutronix.de> > +Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> > +--- > + arch/arm/configs/rpi_defconfig | 1 + > + 1 file changed, 1 insertion(+) > + > +diff --git a/arch/arm/configs/rpi_defconfig b/arch/arm/configs/rpi_defconfig > +index cd88b4ac751c..2bb615849324 100644 > +--- a/arch/arm/configs/rpi_defconfig > ++++ b/arch/arm/configs/rpi_defconfig > +@@ -7,6 +7,7 @@ CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y > + CONFIG_ARM_UNWIND=y > + CONFIG_IMAGE_COMPRESSION_NONE=y > + CONFIG_MMU=y > ++CONFIG_MALLOC_SIZE=0x0 > + CONFIG_MALLOC_TLSF=y > + CONFIG_KALLSYMS=y > + CONFIG_PROMPT="R-Pi> " > diff --git a/configs/platform-v7a/patches/barebox-2018.05.0/0101-ARM-imx-add-support-for-Udoo-Neo-full.patch b/configs/platform-v7a/patches/barebox-2018.11.0/0101-ARM-imx-add-support-for-Udoo-Neo-full.patch > similarity index 93% > rename from configs/platform-v7a/patches/barebox-2018.05.0/0101-ARM-imx-add-support-for-Udoo-Neo-full.patch > rename to configs/platform-v7a/patches/barebox-2018.11.0/0101-ARM-imx-add-support-for-Udoo-Neo-full.patch > index 06c356b..9f99a39 100644 > --- a/configs/platform-v7a/patches/barebox-2018.05.0/0101-ARM-imx-add-support-for-Udoo-Neo-full.patch > +++ b/configs/platform-v7a/patches/barebox-2018.11.0/0101-ARM-imx-add-support-for-Udoo-Neo-full.patch > @@ -26,10 +26,10 @@ Forwarded: id:20170627190317.19253-1-uwe@kleine-koenig.org > create mode 100644 arch/arm/dts/imx6sx-udoo-neo-full.dts > > diff --git a/arch/arm/boards/Makefile b/arch/arm/boards/Makefile > -index 30f4c299f1a1..f70fbac8f379 100644 > +index c737cf34138c..9aee9bf0993a 100644 > --- a/arch/arm/boards/Makefile > +++ b/arch/arm/boards/Makefile > -@@ -135,6 +135,7 @@ obj-$(CONFIG_MACH_TX51) += karo-tx51/ > +@@ -137,6 +137,7 @@ obj-$(CONFIG_MACH_TX51) += karo-tx51/ > obj-$(CONFIG_MACH_TX53) += karo-tx53/ > obj-$(CONFIG_MACH_TX6X) += karo-tx6x/ > obj-$(CONFIG_MACH_UDOO) += udoo/ > @@ -254,10 +254,10 @@ index 000000000000..e78c2685fd78 > + imx6sx_barebox_entry(fdt); > +} > diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile > -index e60e0ea0c6be..b87e27c8c263 100644 > +index 4e063902c635..3d34a78f7878 100644 > --- a/arch/arm/dts/Makefile > +++ b/arch/arm/dts/Makefile > -@@ -93,6 +93,7 @@ pbl-dtb-$(CONFIG_MACH_TX6X) += imx6dl-tx6u.dtb.o > +@@ -97,6 +97,7 @@ pbl-dtb-$(CONFIG_MACH_TX6X) += imx6dl-tx6u.dtb.o > pbl-dtb-$(CONFIG_MACH_TX6X) += imx6q-tx6q.dtb.o > pbl-dtb-$(CONFIG_MACH_TURRIS_OMNIA) += armada-385-turris-omnia-bb.dtb.o > pbl-dtb-$(CONFIG_MACH_UDOO) += imx6q-udoo.dtb.o > @@ -276,10 +276,10 @@ index 000000000000..9203d40207c5 > +/{ > +}; > diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig > -index 9052a94ea071..9ec95bb6df09 100644 > +index 63a92bd5bd1d..ab515ecf2286 100644 > --- a/arch/arm/mach-imx/Kconfig > +++ b/arch/arm/mach-imx/Kconfig > -@@ -377,6 +377,10 @@ config MACH_UDOO > +@@ -380,6 +380,10 @@ config MACH_UDOO > bool "Freescale i.MX6 UDOO Board" > select ARCH_IMX6 > > @@ -291,22 +291,22 @@ index 9052a94ea071..9ec95bb6df09 100644 > bool "Variscite i.MX6 Quad SOM" > select ARCH_IMX6 > diff --git a/arch/arm/mach-imx/include/mach/esdctl.h b/arch/arm/mach-imx/include/mach/esdctl.h > -index 66dcc8974cfb..bd6092febca4 100644 > +index bc6c7339535e..18c4a2836007 100644 > --- a/arch/arm/mach-imx/include/mach/esdctl.h > +++ b/arch/arm/mach-imx/include/mach/esdctl.h > -@@ -137,6 +137,7 @@ void __noreturn imx51_barebox_entry(void *boarddata); > - void __noreturn imx53_barebox_entry(void *boarddata); > - void __noreturn imx6q_barebox_entry(void *boarddata); > - void __noreturn imx6ul_barebox_entry(void *boarddata); > +@@ -141,6 +141,7 @@ void __noreturn imx6ul_barebox_entry(void *boarddata); > + void __noreturn vf610_barebox_entry(void *boarddata); > + void __noreturn imx8mq_barebox_entry(void *boarddata); > + void __noreturn imx7d_barebox_entry(void *boarddata); > +#define imx6sx_barebox_entry(boarddata) imx6ul_barebox_entry(boarddata) > void imx_esdctl_disable(void); > #endif > > diff --git a/images/Makefile.imx b/images/Makefile.imx > -index 90da95d4d025..6420490811f9 100644 > +index 341ce8506d88..c32f78b7e184 100644 > --- a/images/Makefile.imx > +++ b/images/Makefile.imx > -@@ -275,6 +275,11 @@ CFG_start_imx6q_sabresd.pblx.imximg = $(board)/freescale-mx6-sabresd/flash-heade > +@@ -271,6 +271,11 @@ CFG_start_imx6q_sabresd.pblx.imximg = $(board)/freescale-mx6-sabresd/flash-heade > FILE_barebox-freescale-imx6q-sabresd.img = start_imx6q_sabresd.pblx.imximg > image-$(CONFIG_MACH_SABRESD) += barebox-freescale-imx6q-sabresd.img > > diff --git a/configs/platform-v7a/patches/barebox-2018.11.0/0201-Release-pengutronix_multiv7-20181122-1.patch b/configs/platform-v7a/patches/barebox-2018.11.0/0201-Release-pengutronix_multiv7-20181122-1.patch > new file mode 100644 > index 0000000..bd444f0 > --- /dev/null > +++ b/configs/platform-v7a/patches/barebox-2018.11.0/0201-Release-pengutronix_multiv7-20181122-1.patch > @@ -0,0 +1,22 @@ > +From: Rouven Czerwinski <r.czerwinski@pengutronix.de> > +Date: Thu, 22 Nov 2018 12:09:22 +0100 > +Subject: [PATCH] Release pengutronix_multiv7/20181122-1 > + > +Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de> > +--- > + Makefile | 2 +- > + 1 file changed, 1 insertion(+), 1 deletion(-) > + > +diff --git a/Makefile b/Makefile > +index 60a5d5ce11f4..b55ca4b03129 100644 > +--- a/Makefile > ++++ b/Makefile > +@@ -1,7 +1,7 @@ > + VERSION = 2018 > + PATCHLEVEL = 11 > + SUBLEVEL = 0 > +-EXTRAVERSION = > ++EXTRAVERSION =-20181122-1 > + NAME = None > + > + # *DOCUMENTATION* > diff --git a/configs/platform-v7a/patches/barebox-2018.11.0/series b/configs/platform-v7a/patches/barebox-2018.11.0/series > new file mode 100644 > index 0000000..e056b0c > --- /dev/null > +++ b/configs/platform-v7a/patches/barebox-2018.11.0/series > @@ -0,0 +1,24 @@ > +# umpf-base: v2018.11.0 > +# umpf-name: pengutronix_multiv7 > +# umpf-version: pengutronix_multiv7/20181122-1 > +# umpf-topic: v2018.11.0/customers/pengutronix/rpi3 > +# umpf-hashinfo: 1bdd9ef32c272ba5501e24ba643107855dd5149c > +# umpf-topic-range: d1f223eddbcde31ba2a3f34fc0a1a14f40ea7130..1bdd9ef32c272ba5501e24ba643107855dd5149c > +0001-ARM-import-opcode-helpers-from-Linux-kernel.patch > +0002-ARM-safely-switch-from-HYP-to-SVC-mode-if-required.patch > +0003-ARM-allow-secure-monitor-code-to-be-built-without-PS.patch > +0004-ARM-add-file-for-HYP-mode-related-setup.patch > +0005-ARM-don-t-try-to-install-secure-monitor-when-entered.patch > +0006-ARM-default-to-starting-kernel-in-HYP-mode-when-ente.patch > +0007-ARM-install-HYP-vectors-at-PBL-and-Barebox-entry.patch > +0008-ARM-rpi-add-revision-IDs-for-Pi-3-Model-B-and-Pi-Zer.patch > +0009-ARM-rpi-add-raspberry-pi-3-support.patch > +0010-ARM-rpi-autosize-malloc-area.patch > +# umpf-topic: v2018.11.0/customers/pengutronix/udoo-neo > +# umpf-hashinfo: c5f2e150d7e8d5439458df1a2cab71b25fc36e19 > +# umpf-topic-range: 1bdd9ef32c272ba5501e24ba643107855dd5149c..8cacc208f8f6c9071113b12a618a54d7e80b1694 > +0101-ARM-imx-add-support-for-Udoo-Neo-full.patch > +# umpf-release: pengutronix_multiv7/20181122-1 > +# umpf-topic-range: 8cacc208f8f6c9071113b12a618a54d7e80b1694..45c64f6b4690a6b51be1c487de1ffec6472704e1 > +0201-Release-pengutronix_multiv7-20181122-1.patch > +# umpf-end > diff --git a/configs/platform-v7a/platformconfig b/configs/platform-v7a/platformconfig > index cdea840..e2c8ac1 100644 > --- a/configs/platform-v7a/platformconfig > +++ b/configs/platform-v7a/platformconfig > @@ -166,6 +166,8 @@ PTXCONF_BAREBOX_AM335X=y > PTXCONF_BAREBOX_MX6=y > PTXCONF_BAREBOX_RPI2=y > PTXCONF_BAREBOX_RPI2_NEEDS_HOST_LZOP=y > +PTXCONF_BAREBOX_RPI3=y > +# PTXCONF_BAREBOX_RPI3_NEEDS_HOST_LZOP is not set > PTXCONF_BAREBOX_VEXPRESS=y > PTXCONF_BAREBOX_ARCH_STRING="arm" > # PTXCONF_BAREBOX is not set > diff --git a/configs/platform-v7a/rules/barebox-am335x-mlo.make b/configs/platform-v7a/rules/barebox-am335x-mlo.make > index e71d057..6835d35 100644 > --- a/configs/platform-v7a/rules/barebox-am335x-mlo.make > +++ b/configs/platform-v7a/rules/barebox-am335x-mlo.make > @@ -16,8 +16,8 @@ PACKAGES-$(PTXCONF_BAREBOX_AM335X_MLO) += barebox-am335x-mlo > # > # Paths and names > # > -BAREBOX_AM335X_MLO_VERSION := 2018.05.0 > -BAREBOX_AM335X_MLO_MD5 := 8286a8ea2cdd88104e5c6762d93d81db > +BAREBOX_AM335X_MLO_VERSION := 2018.11.0 > +BAREBOX_AM335X_MLO_MD5 := 1472eae302647d1cf7f1c561a6380b43 > BAREBOX_AM335X_MLO := barebox-$(BAREBOX_AM335X_MLO_VERSION) > BAREBOX_AM335X_MLO_SUFFIX := tar.bz2 > BAREBOX_AM335X_MLO_DIR := $(BUILDDIR)/barebox-am335x-mlo-$(BAREBOX_AM335X_MLO_VERSION) > diff --git a/configs/platform-v7a/rules/barebox-am335x.make b/configs/platform-v7a/rules/barebox-am335x.make > index 2c35ae1..8b3c2a0 100644 > --- a/configs/platform-v7a/rules/barebox-am335x.make > +++ b/configs/platform-v7a/rules/barebox-am335x.make > @@ -16,8 +16,8 @@ PACKAGES-$(PTXCONF_BAREBOX_AM335X) += barebox-am335x > # > # Paths and names > # > -BAREBOX_AM335X_VERSION := 2018.05.0 > -BAREBOX_AM335X_MD5 := 8286a8ea2cdd88104e5c6762d93d81db > +BAREBOX_AM335X_VERSION := 2018.11.0 > +BAREBOX_AM335X_MD5 := 1472eae302647d1cf7f1c561a6380b43 > BAREBOX_AM335X := barebox-$(BAREBOX_AM335X_VERSION) > BAREBOX_AM335X_SUFFIX := tar.bz2 > BAREBOX_AM335X_DIR := $(BUILDDIR)/barebox-am335x-$(BAREBOX_AM335X_VERSION) > diff --git a/configs/platform-v7a/rules/barebox-mx6.make b/configs/platform-v7a/rules/barebox-mx6.make > index 7d7c2ce..3b86ea0 100644 > --- a/configs/platform-v7a/rules/barebox-mx6.make > +++ b/configs/platform-v7a/rules/barebox-mx6.make > @@ -16,8 +16,8 @@ PACKAGES-$(PTXCONF_BAREBOX_MX6) += barebox-mx6 > # > # Paths and names > # > -BAREBOX_MX6_VERSION := 2018.05.0 > -BAREBOX_MX6_MD5 := 8286a8ea2cdd88104e5c6762d93d81db > +BAREBOX_MX6_VERSION := 2018.11.0 > +BAREBOX_MX6_MD5 := 1472eae302647d1cf7f1c561a6380b43 > BAREBOX_MX6 := barebox-$(BAREBOX_MX6_VERSION) > BAREBOX_MX6_SUFFIX := tar.bz2 > BAREBOX_MX6_DIR := $(BUILDDIR)/barebox-mx6-$(BAREBOX_MX6_VERSION) > diff --git a/configs/platform-v7a/rules/barebox-rpi2.make b/configs/platform-v7a/rules/barebox-rpi2.make > index cf9fc00..41990a0 100644 > --- a/configs/platform-v7a/rules/barebox-rpi2.make > +++ b/configs/platform-v7a/rules/barebox-rpi2.make > @@ -16,8 +16,8 @@ PACKAGES-$(PTXCONF_BAREBOX_RPI2) += barebox-rpi2 > # > # Paths and names > # > -BAREBOX_RPI2_VERSION := 2018.05.0 > -BAREBOX_RPI2_MD5 := 8286a8ea2cdd88104e5c6762d93d81db > +BAREBOX_RPI2_VERSION := 2018.11.0 > +BAREBOX_RPI2_MD5 := 1472eae302647d1cf7f1c561a6380b43 > BAREBOX_RPI2 := barebox-$(BAREBOX_RPI2_VERSION) > BAREBOX_RPI2_SUFFIX := tar.bz2 > BAREBOX_RPI2_DIR := $(BUILDDIR)/barebox-rpi2-$(BAREBOX_RPI2_VERSION) > diff --git a/configs/platform-v7a/rules/barebox-rpi3.make b/configs/platform-v7a/rules/barebox-rpi3.make > new file mode 100644 > index 0000000..35b7e5b > --- /dev/null > +++ b/configs/platform-v7a/rules/barebox-rpi3.make > @@ -0,0 +1,104 @@ > +# -*-makefile-*- > +# > +# Copyright (C) 2016 by Alexander Aring <aar@pengutronix.de> > +# > +# See CREDITS for details about who has contributed to this project. > +# > +# For further information about the PTXdist project and license conditions > +# see the README file. > +# > + > +# > +# We provide this package > +# > +PACKAGES-$(PTXCONF_BAREBOX_RPI3) += barebox-rpi3 > + > +# > +# Paths and names > +# > +BAREBOX_RPI3_VERSION := 2018.11.0 > +BAREBOX_RPI3_MD5 := 1472eae302647d1cf7f1c561a6380b43 > +BAREBOX_RPI3 := barebox-$(BAREBOX_RPI3_VERSION) > +BAREBOX_RPI3_SUFFIX := tar.bz2 > +BAREBOX_RPI3_DIR := $(BUILDDIR)/barebox-rpi3-$(BAREBOX_RPI3_VERSION) > +BAREBOX_RPI3_CONFIG := $(call ptx/in-platformconfigdir, barebox-rpi3.config) > +BAREBOX_RPI3_LICENSE := GPL-2.0 > +BAREBOX_RPI3_URL := $(call barebox-url, BAREBOX_RPI3) > +BAREBOX_RPI3_SOURCE := $(SRCDIR)/$(BAREBOX_RPI3).$(BAREBOX_RPI3_SUFFIX) > + > +# ---------------------------------------------------------------------------- > +# Prepare > +# ---------------------------------------------------------------------------- > + > +BAREBOX_RPI3_WRAPPER_BLACKLIST := \ > + TARGET_HARDEN_RELRO \ > + TARGET_HARDEN_BINDNOW \ > + TARGET_HARDEN_PIE \ > + TARGET_DEBUG \ > + TARGET_BUILD_ID > + > +BAREBOX_RPI3_CONF_ENV := KCONFIG_NOTIMESTAMP=1 > +BAREBOX_RPI3_CONF_OPT := $(call barebox-opts, BAREBOX_RPI3) > + > +BAREBOX_RPI3_MAKE_ENV := $(BAREBOX_RPI3_CONF_ENV) > +BAREBOX_RPI3_MAKE_OPT := $(BAREBOX_RPI3_CONF_OPT) > + > +BAREBOX_RPI3_IMAGES := images/barebox-raspberry-pi-3.img > +BAREBOX_RPI3_IMAGES := $(addprefix $(BAREBOX_RPI3_DIR)/,$(BAREBOX_RPI3_IMAGES)) > + > +ifdef PTXCONF_BAREBOX_RPI3 > +$(BAREBOX_RPI3_CONFIG): > + @echo > + @echo "****************************************************************************" > + @echo " Please generate a bareboxconfig with 'ptxdist menuconfig barebox-rpi3'" > + @echo "****************************************************************************" > + @echo > + @echo > + @exit 1 > +endif > + > +$(STATEDIR)/barebox-rpi3.prepare: $(BAREBOX_RPI3_CONFIG) > + @$(call targetinfo) > + @rm -f "$(BAREBOX_RPI3_DIR)/.ptxdist-defaultenv" > + @ln -s "$(call ptx/in-platformconfigdir, barebox-rpi3-defaultenv)" \ > + "$(BAREBOX_RPI3_DIR)/.ptxdist-defaultenv" > + @$(call world/prepare, BAREBOX_RPI3) > + @$(call touch) > + > +# ---------------------------------------------------------------------------- > +# Install > +# ---------------------------------------------------------------------------- > + > +$(STATEDIR)/barebox-rpi3.install: > + @$(call targetinfo) > + @$(call touch) > + > +# ---------------------------------------------------------------------------- > +# Targetinstall > +# ---------------------------------------------------------------------------- > + > +$(STATEDIR)/barebox-rpi3.targetinstall: > + @$(call targetinfo) > + @$(foreach image, $(BAREBOX_RPI3_IMAGES), \ > + install -m 644 \ > + $(image) $(IMAGEDIR)/$(notdir $(image))-rpi3;) > + @$(call touch) > + > +# ---------------------------------------------------------------------------- > +# Clean > +# ---------------------------------------------------------------------------- > + > +$(STATEDIR)/barebox-rpi3.clean: > + @$(call targetinfo) > + @$(call clean_pkg, BAREBOX_RPI3) > + @$(foreach image, $(BAREBOX_RPI3_IMAGES), \ > + rm -fv $(IMAGEDIR)/$(notdir $(image));) > + > +# ---------------------------------------------------------------------------- > +# oldconfig / menuconfig > +# ---------------------------------------------------------------------------- > + > +barebox-rpi3_oldconfig barebox-rpi3_menuconfig barebox-rpi3_nconfig: $(STATEDIR)/barebox-rpi3.extract > + @$(call world/kconfig, BAREBOX_RPI3, $(subst barebox-rpi3_,,$@)) > + > +# vim: syntax=make > diff --git a/configs/platform-v7a/rules/barebox-vexpress.make b/configs/platform-v7a/rules/barebox-vexpress.make > index 0266cbe..f69b6c5 100644 > --- a/configs/platform-v7a/rules/barebox-vexpress.make > +++ b/configs/platform-v7a/rules/barebox-vexpress.make > @@ -16,8 +16,8 @@ PACKAGES-$(PTXCONF_BAREBOX_VEXPRESS) += barebox-vexpress > # > # Paths and names > # > -BAREBOX_VEXPRESS_VERSION := 2018.05.0 > -BAREBOX_VEXPRESS_MD5 := 8286a8ea2cdd88104e5c6762d93d81db > +BAREBOX_VEXPRESS_VERSION := 2018.11.0 > +BAREBOX_VEXPRESS_MD5 := 1472eae302647d1cf7f1c561a6380b43 > BAREBOX_VEXPRESS := barebox-$(BAREBOX_VEXPRESS_VERSION) > BAREBOX_VEXPRESS_SUFFIX := tar.bz2 > BAREBOX_VEXPRESS_DIR := $(BUILDDIR)/barebox-vexpress-$(BAREBOX_VEXPRESS_VERSION) > -- > 2.19.1 > > > _______________________________________________ > DistroKit mailing list > DistroKit@pengutronix.de -- Roland Hieber | r.hieber@pengutronix.de | Pengutronix e.K. | https://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim | Phone: +49-5121-206917-5086 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ DistroKit mailing list DistroKit@pengutronix.de ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [DistroKit] [PATCH] plaform-v7a: barebox v2018.05.0 → v2018.11.0 2018-12-05 13:15 ` Roland Hieber @ 2018-12-05 13:20 ` Rouven Czerwinski 0 siblings, 0 replies; 7+ messages in thread From: Rouven Czerwinski @ 2018-12-05 13:20 UTC (permalink / raw) To: Roland Hieber, Rouven Czerwinski; +Cc: distrokit On Wed, 2018-12-05 at 14:15 +0100, Roland Hieber wrote: > On Wed, Dec 05, 2018 at 08:55:42AM +0100, Rouven Czerwinski wrote: > > Drop the beaglebone patch, it will be resurrected in a distrokit- > > deployment > > layer. > > We also add the patch series for the rpi3 to barebox, it can be > > dropped > > in the next release. > > > > Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de> > > --- > > .../platform-v7a/barebox-am335x-mlo.config | 22 +- > > configs/platform-v7a/barebox-am335x.config | 24 +- > > configs/platform-v7a/barebox-mx6.config | 32 +- > > configs/platform-v7a/barebox-rpi2.config | 23 +- > > .../barebox-rpi3-defaultenv/boot/9p | 10 + > > .../barebox-rpi3-defaultenv/init/bootsource | 13 + > > .../nv/linux.bootargs.loglevel | 1 + > > configs/platform-v7a/barebox-rpi3.config | 600 > > ++++++++++++++++++ > > configs/platform-v7a/barebox-vexpress.config | 23 +- > > ...ne-add-state-entry-for-mmc0-and-mmc1.patch | 35 - > > ...ease-pengutronix-multi_v7-20180515-1.patch | 22 - > > .../patches/barebox-2018.05.0/series | 15 - > > ...ort-opcode-helpers-from-Linux-kernel.patch | 299 +++++++++ > > ...tch-from-HYP-to-SVC-mode-if-required.patch | 88 +++ > > ...-monitor-code-to-be-built-without-PS.patch | 37 ++ > > ...-add-file-for-HYP-mode-related-setup.patch | 193 ++++++ > > ...-install-secure-monitor-when-entered.patch | 30 + > > ...tarting-kernel-in-HYP-mode-when-ente.patch | 31 + > > ...HYP-vectors-at-PBL-and-Barebox-entry.patch | 105 +++ > > ...sion-IDs-for-Pi-3-Model-B-and-Pi-Zer.patch | 41 ++ > > ...9-ARM-rpi-add-raspberry-pi-3-support.patch | 141 ++++ > > .../0010-ARM-rpi-autosize-malloc-area.patch | 25 + > > ...RM-imx-add-support-for-Udoo-Neo-full.patch | 26 +- > > ...lease-pengutronix_multiv7-20181122-1.patch | 22 + > > .../patches/barebox-2018.11.0/series | 24 + > > configs/platform-v7a/platformconfig | 2 + > > .../rules/barebox-am335x-mlo.make | 4 +- > > .../platform-v7a/rules/barebox-am335x.make | 4 +- > > configs/platform-v7a/rules/barebox-mx6.make | 4 +- > > configs/platform-v7a/rules/barebox-rpi2.make | 4 +- > > configs/platform-v7a/rules/barebox-rpi3.make | 104 +++ > > Oh, RPi 3 now has its own barebox? Previously we used barebox-rpi2 > for > both versions, what is the reason to change that? Its still included in this old version of the branch and should be dropped. Nice catch, thanks. I'll send a V2. - Rouven > - Roland > > .../platform-v7a/rules/barebox-vexpress.make | 4 +- > > 32 files changed, 1905 insertions(+), 103 deletions(-) > > create mode 100644 configs/platform-v7a/barebox-rpi3- > > defaultenv/boot/9p > > create mode 100644 configs/platform-v7a/barebox-rpi3- > > defaultenv/init/bootsource > > create mode 100644 configs/platform-v7a/barebox-rpi3- > > defaultenv/nv/linux.bootargs.loglevel > > create mode 100644 configs/platform-v7a/barebox-rpi3.config > > delete mode 100644 configs/platform-v7a/patches/barebox- > > 2018.05.0/0001-beaglebone-add-state-entry-for-mmc0-and-mmc1.patch > > delete mode 100644 configs/platform-v7a/patches/barebox- > > 2018.05.0/0201-Release-pengutronix-multi_v7-20180515-1.patch > > delete mode 100644 configs/platform-v7a/patches/barebox- > > 2018.05.0/series > > create mode 100644 configs/platform-v7a/patches/barebox- > > 2018.11.0/0001-ARM-import-opcode-helpers-from-Linux-kernel.patch > > create mode 100644 configs/platform-v7a/patches/barebox- > > 2018.11.0/0002-ARM-safely-switch-from-HYP-to-SVC-mode-if- > > required.patch > > create mode 100644 configs/platform-v7a/patches/barebox- > > 2018.11.0/0003-ARM-allow-secure-monitor-code-to-be-built-without- > > PS.patch > > create mode 100644 configs/platform-v7a/patches/barebox- > > 2018.11.0/0004-ARM-add-file-for-HYP-mode-related-setup.patch > > create mode 100644 configs/platform-v7a/patches/barebox- > > 2018.11.0/0005-ARM-don-t-try-to-install-secure-monitor-when- > > entered.patch > > create mode 100644 configs/platform-v7a/patches/barebox- > > 2018.11.0/0006-ARM-default-to-starting-kernel-in-HYP-mode-when- > > ente.patch > > create mode 100644 configs/platform-v7a/patches/barebox- > > 2018.11.0/0007-ARM-install-HYP-vectors-at-PBL-and-Barebox- > > entry.patch > > create mode 100644 configs/platform-v7a/patches/barebox- > > 2018.11.0/0008-ARM-rpi-add-revision-IDs-for-Pi-3-Model-B-and-Pi- > > Zer.patch > > create mode 100644 configs/platform-v7a/patches/barebox- > > 2018.11.0/0009-ARM-rpi-add-raspberry-pi-3-support.patch > > create mode 100644 configs/platform-v7a/patches/barebox- > > 2018.11.0/0010-ARM-rpi-autosize-malloc-area.patch > > rename configs/platform-v7a/patches/{barebox-2018.05.0 => barebox- > > 2018.11.0}/0101-ARM-imx-add-support-for-Udoo-Neo-full.patch (93%) > > create mode 100644 configs/platform-v7a/patches/barebox- > > 2018.11.0/0201-Release-pengutronix_multiv7-20181122-1.patch > > create mode 100644 configs/platform-v7a/patches/barebox- > > 2018.11.0/series > > create mode 100644 configs/platform-v7a/rules/barebox-rpi3.make > > > > diff --git a/configs/platform-v7a/barebox-am335x-mlo.config > > b/configs/platform-v7a/barebox-am335x-mlo.config > > index 6cebecd..90adc2c 100644 > > --- a/configs/platform-v7a/barebox-am335x-mlo.config > > +++ b/configs/platform-v7a/barebox-am335x-mlo.config > > @@ -1,6 +1,6 @@ > > # > > # Automatically generated file; DO NOT EDIT. > > -# Barebox/arm 2018.05.0-20180515-1 Configuration > > +# Barebox/arm 2018.11.0-20181122-1 Configuration > > # > > CONFIG_ARM=y > > CONFIG_ARM_USE_COMPRESSED_DTB=y > > @@ -185,6 +185,7 @@ CONFIG_OF_GPIO=y > > # > > # serial drivers > > # > > +# CONFIG_SERIAL_DEV_BUS is not set > > # CONFIG_DRIVER_SERIAL_ARM_DCC is not set > > CONFIG_DRIVER_SERIAL_NS16550=y > > CONFIG_DRIVER_SERIAL_NS16550_OMAP_EXTENSIONS=y > > @@ -337,6 +338,15 @@ CONFIG_BUS_OMAP_GPMC=y > > # Filesystem support > > # > > CONFIG_FS=y > > +CONFIG_FS_LEGACY=y > > + > > +# > > +# Some selected filesystems still use the legacy FS API. > > +# > > + > > +# > > +# Consider updating them. > > +# > > # CONFIG_FS_CRAMFS is not set > > # CONFIG_FS_EXT4 is not set > > CONFIG_FS_RAMFS=y > > @@ -398,3 +408,13 @@ CONFIG_XYMODEM=y > > CONFIG_CRC16=y > > # CONFIG_DIGEST is not set > > # CONFIG_CRYPTO_KEYSTORE is not set > > + > > +# > > +# Firmware files > > +# > > +CONFIG_EXTRA_FIRMWARE_DIR="firmware" > > + > > +# > > +# Host Tools > > +# > > +# CONFIG_COMPILE_HOST_TOOLS is not set > > diff --git a/configs/platform-v7a/barebox-am335x.config > > b/configs/platform-v7a/barebox-am335x.config > > index 0c78012..0c3d7e5 100644 > > --- a/configs/platform-v7a/barebox-am335x.config > > +++ b/configs/platform-v7a/barebox-am335x.config > > @@ -1,6 +1,6 @@ > > # > > # Automatically generated file; DO NOT EDIT. > > -# Barebox/arm 2018.05.0-20180515-1 Configuration > > +# Barebox/arm 2018.11.0-20181122-1 Configuration > > # > > CONFIG_ARM=y > > CONFIG_ARM_LINUX=y > > @@ -408,6 +408,7 @@ CONFIG_OF_BAREBOX_DRIVERS=y > > # > > # serial drivers > > # > > +# CONFIG_SERIAL_DEV_BUS is not set > > # CONFIG_DRIVER_SERIAL_ARM_DCC is not set > > CONFIG_DRIVER_SERIAL_NS16550=y > > CONFIG_DRIVER_SERIAL_NS16550_OMAP_EXTENSIONS=y > > @@ -436,6 +437,7 @@ CONFIG_DRIVER_NET_CPSW=y > > # > > # CONFIG_AR8327N_PHY is not set > > # CONFIG_AT803X_PHY is not set > > +# CONFIG_DAVICOM_PHY is not set > > # CONFIG_LXT_PHY is not set > > # CONFIG_MARVELL_PHY is not set > > # CONFIG_MICREL_PHY is not set > > @@ -587,6 +589,7 @@ CONFIG_LED_GPIO_OF=y > > # CONFIG_LED_GPIO_RGB is not set > > # CONFIG_LED_GPIO_BICOLOR is not set > > CONFIG_LED_TRIGGERS=y > > +# CONFIG_LED_PCA955X is not set > > > > # > > # EEPROM support > > @@ -649,6 +652,15 @@ CONFIG_BUS_OMAP_GPMC=y > > # Filesystem support > > # > > CONFIG_FS=y > > +CONFIG_FS_LEGACY=y > > + > > +# > > +# Some selected filesystems still use the legacy FS API. > > +# > > + > > +# > > +# Consider updating them. > > +# > > CONFIG_FS_AUTOMOUNT=y > > # CONFIG_FS_CRAMFS is not set > > CONFIG_FS_EXT4=y > > @@ -732,3 +744,13 @@ CONFIG_DIGEST_HMAC_GENERIC=y > > # CONFIG_DIGEST_SHA256_ARM is not set > > CONFIG_CRYPTO_RSA=y > > CONFIG_CRYPTO_KEYSTORE=y > > + > > +# > > +# Firmware files > > +# > > +CONFIG_EXTRA_FIRMWARE_DIR="firmware" > > + > > +# > > +# Host Tools > > +# > > +# CONFIG_COMPILE_HOST_TOOLS is not set > > diff --git a/configs/platform-v7a/barebox-mx6.config > > b/configs/platform-v7a/barebox-mx6.config > > index 980b97b..536cbfe 100644 > > --- a/configs/platform-v7a/barebox-mx6.config > > +++ b/configs/platform-v7a/barebox-mx6.config > > @@ -1,6 +1,6 @@ > > # > > # Automatically generated file; DO NOT EDIT. > > -# Barebox/arm 2018.05.0-20180515-1 Configuration > > +# Barebox/arm 2018.11.0-20181122-1 Configuration > > # > > CONFIG_ARM=y > > CONFIG_ARM_LINUX=y > > @@ -94,13 +94,17 @@ CONFIG_MACH_UDOO_NEO=y > > # CONFIG_MACH_VARISCITE_MX6 is not set > > # CONFIG_MACH_GW_VENTANA is not set > > # CONFIG_MACH_CM_FX6 is not set > > +# CONFIG_MACH_ADVANTECH_ROM_742X is not set > > # CONFIG_MACH_WARP7 is not set > > # CONFIG_MACH_VF610_TWR is not set > > +# CONFIG_MACH_ZII_RDU1 is not set > > # CONFIG_MACH_ZII_RDU2 is not set > > # CONFIG_MACH_ZII_VF610_DEV is not set > > +# CONFIG_MACH_ZII_IMX7D_RPU2 is not set > > # CONFIG_MACH_PHYTEC_PHYCORE_IMX7 is not set > > # CONFIG_MACH_FREESCALE_MX7_SABRESD is not set > > # CONFIG_MACH_NXP_IMX6ULL_EVK is not set > > +# CONFIG_MACH_NXP_IMX8MQ_EVK is not set > > > > # > > # Board specific settings > > @@ -111,10 +115,7 @@ CONFIG_MACH_UDOO_NEO=y > > # > > CONFIG_IMX_IIM=y > > CONFIG_IMX_IIM_FUSE_BLOW=y > > -CONFIG_IMX_OCOTP=y > > -# CONFIG_IMX_OCOTP_WRITE is not set > > # CONFIG_HABV4 is not set > > -# CONFIG_ARCH_IMX_USBLOADER is not set > > CONFIG_ARM_ASM_UNIFIED=y > > CONFIG_AEABI=y > > CONFIG_THUMB2_BAREBOX=y > > @@ -464,6 +465,7 @@ CONFIG_OF_BAREBOX_DRIVERS=y > > # > > # serial drivers > > # > > +# CONFIG_SERIAL_DEV_BUS is not set > > # CONFIG_DRIVER_SERIAL_ARM_DCC is not set > > CONFIG_DRIVER_SERIAL_IMX=y > > # CONFIG_DRIVER_SERIAL_NS16550 is not set > > @@ -493,6 +495,7 @@ CONFIG_DRIVER_NET_FEC_IMX=y > > # > > # CONFIG_AR8327N_PHY is not set > > CONFIG_AT803X_PHY=y > > +# CONFIG_DAVICOM_PHY is not set > > # CONFIG_LXT_PHY is not set > > # CONFIG_MARVELL_PHY is not set > > CONFIG_MICREL_PHY=y > > @@ -681,6 +684,7 @@ CONFIG_LED_GPIO_OF=y > > # CONFIG_LED_GPIO_RGB is not set > > # CONFIG_LED_GPIO_BICOLOR is not set > > CONFIG_LED_TRIGGERS=y > > +# CONFIG_LED_PCA955X is not set > > > > # > > # EEPROM support > > @@ -762,6 +766,15 @@ CONFIG_USB_NOP_XCEIV=y > > # Filesystem support > > # > > CONFIG_FS=y > > +CONFIG_FS_LEGACY=y > > + > > +# > > +# Some selected filesystems still use the legacy FS API. > > +# > > + > > +# > > +# Consider updating them. > > +# > > CONFIG_FS_AUTOMOUNT=y > > # CONFIG_FS_CRAMFS is not set > > CONFIG_FS_EXT4=y > > @@ -854,3 +867,14 @@ CONFIG_DIGEST_HMAC_GENERIC=y > > # CONFIG_DIGEST_SHA1_ARM is not set > > # CONFIG_DIGEST_SHA256_ARM is not set > > CONFIG_CRYPTO_KEYSTORE=y > > + > > +# > > +# Firmware files > > +# > > +CONFIG_EXTRA_FIRMWARE_DIR="firmware" > > + > > +# > > +# Host Tools > > +# > > +# CONFIG_COMPILE_HOST_TOOLS is not set > > +# CONFIG_ARCH_IMX_USBLOADER is not set > > diff --git a/configs/platform-v7a/barebox-rpi2.config > > b/configs/platform-v7a/barebox-rpi2.config > > index 74c52e9..0e2622f 100644 > > --- a/configs/platform-v7a/barebox-rpi2.config > > +++ b/configs/platform-v7a/barebox-rpi2.config > > @@ -1,6 +1,6 @@ > > # > > # Automatically generated file; DO NOT EDIT. > > -# Barebox/arm 2018.05.0-20180515-1 Configuration > > +# Barebox/arm 2018.11.0-20181122-1 Configuration > > # > > CONFIG_ARM=y > > CONFIG_ARM_LINUX=y > > @@ -54,6 +54,7 @@ CONFIG_MACH_RPI_COMMON=y > > # > > # CONFIG_MACH_RPI is not set > > CONFIG_MACH_RPI2=y > > +# CONFIG_MACH_RPI3 is not set > > CONFIG_BAREBOX_MAX_IMAGE_SIZE=0xffffffff > > CONFIG_AEABI=y > > # CONFIG_THUMB2_BAREBOX is not set > > @@ -369,6 +370,7 @@ CONFIG_ARM_AMBA=y > > # > > # serial drivers > > # > > +# CONFIG_SERIAL_DEV_BUS is not set > > # CONFIG_DRIVER_SERIAL_ARM_DCC is not set > > CONFIG_SERIAL_AMBA_PL011=y > > # CONFIG_DRIVER_SERIAL_NS16550 is not set > > @@ -499,6 +501,15 @@ CONFIG_REGULATOR_BCM283X=y > > # Filesystem support > > # > > CONFIG_FS=y > > +CONFIG_FS_LEGACY=y > > + > > +# > > +# Some selected filesystems still use the legacy FS API. > > +# > > + > > +# > > +# Consider updating them. > > +# > > CONFIG_FS_AUTOMOUNT=y > > # CONFIG_FS_CRAMFS is not set > > CONFIG_FS_EXT4=y > > @@ -575,3 +586,13 @@ CONFIG_DIGEST_MD5_GENERIC=y > > # CONFIG_DIGEST_SHA1_ARM is not set > > # CONFIG_DIGEST_SHA256_ARM is not set > > # CONFIG_CRYPTO_KEYSTORE is not set > > + > > +# > > +# Firmware files > > +# > > +CONFIG_EXTRA_FIRMWARE_DIR="firmware" > > + > > +# > > +# Host Tools > > +# > > +# CONFIG_COMPILE_HOST_TOOLS is not set > > diff --git a/configs/platform-v7a/barebox-rpi3-defaultenv/boot/9p > > b/configs/platform-v7a/barebox-rpi3-defaultenv/boot/9p > > new file mode 100644 > > index 0000000..264ffec > > --- /dev/null > > +++ b/configs/platform-v7a/barebox-rpi3-defaultenv/boot/9p > > @@ -0,0 +1,10 @@ > > +#!/bin/sh > > + > > +addpart /dev/nor0 "8M@32M(kernel)" > > +addpart /dev/nor0 "512k@40M(dtb)" > > +global.bootm.image="/dev/nor0.kernel" > > +global.bootm.oftree="/dev/nor0.dtb" > > + > > +global linux.bootargs.base="console=ttyAMA0,115200 loglevel=5 > > ptxdist-devel" > > + > > +global linux.bootargs.root="root=/dev/root rootfstype=9p > > rootflags=trans=virtio" > > \ No newline at end of file > > diff --git a/configs/platform-v7a/barebox-rpi3- > > defaultenv/init/bootsource b/configs/platform-v7a/barebox-rpi3- > > defaultenv/init/bootsource > > new file mode 100644 > > index 0000000..4de7163 > > --- /dev/null > > +++ b/configs/platform-v7a/barebox-rpi3-defaultenv/init/bootsource > > @@ -0,0 +1,13 @@ > > +#!/bin/sh > > + > > +if [ -n "$nv.boot.default" ]; then > > + exit > > +fi > > + > > +if [ $bootsource = mmc ]; then > > + global.boot.default="bootchooser net" > > +elif [ $bootsource = net ]; then > > + global.boot.default="net bootchooser" > > +else > > + global.boot.default="disk0.1 net" > > +fi > > diff --git a/configs/platform-v7a/barebox-rpi3- > > defaultenv/nv/linux.bootargs.loglevel b/configs/platform- > > v7a/barebox-rpi3-defaultenv/nv/linux.bootargs.loglevel > > new file mode 100644 > > index 0000000..705752c > > --- /dev/null > > +++ b/configs/platform-v7a/barebox-rpi3- > > defaultenv/nv/linux.bootargs.loglevel > > @@ -0,0 +1 @@ > > +loglevel=5 systemd.log_level=warning systemd.show_status=auto > > diff --git a/configs/platform-v7a/barebox-rpi3.config > > b/configs/platform-v7a/barebox-rpi3.config > > new file mode 100644 > > index 0000000..0336bdf > > --- /dev/null > > +++ b/configs/platform-v7a/barebox-rpi3.config > > @@ -0,0 +1,600 @@ > > +# > > +# Automatically generated file; DO NOT EDIT. > > +# Barebox/arm 2018.11.0-20181122-1 Configuration > > +# > > +CONFIG_ARM=y > > +CONFIG_ARM_LINUX=y > > +CONFIG_TEXT_BASE=0x0 > > + > > +# > > +# System Type > > +# > > +# CONFIG_ARCH_AT91 is not set > > +CONFIG_ARCH_BCM283X=y > > +# CONFIG_ARCH_CLPS711X is not set > > +# CONFIG_ARCH_DAVINCI is not set > > +# CONFIG_ARCH_DIGIC is not set > > +# CONFIG_ARCH_EP93XX is not set > > +# CONFIG_ARCH_HIGHBANK is not set > > +# CONFIG_ARCH_IMX is not set > > +# CONFIG_ARCH_MVEBU is not set > > +# CONFIG_ARCH_MXS is not set > > +# CONFIG_ARCH_NETX is not set > > +# CONFIG_ARCH_NOMADIK is not set > > +# CONFIG_ARCH_OMAP is not set > > +# CONFIG_ARCH_PXA is not set > > +# CONFIG_ARCH_ROCKCHIP is not set > > +# CONFIG_ARCH_SOCFPGA is not set > > +# CONFIG_ARCH_S3C24xx is not set > > +# CONFIG_ARCH_S5PCxx is not set > > +# CONFIG_ARCH_S3C64xx is not set > > +# CONFIG_ARCH_VERSATILE is not set > > +# CONFIG_ARCH_VEXPRESS is not set > > +# CONFIG_ARCH_TEGRA is not set > > +# CONFIG_ARCH_UEMD is not set > > +# CONFIG_ARCH_ZYNQ is not set > > +# CONFIG_ARCH_QEMU is not set > > + > > +# > > +# Processor Type > > +# > > +CONFIG_CPU_32=y > > +CONFIG_CPU_V7=y > > +CONFIG_CPU_32v7=y > > + > > +# > > +# processor features > > +# > > +# CONFIG_BOOT_ENDIANNESS_SWITCH is not set > > +CONFIG_ARCH_TEXT_BASE=0x0 > > +CONFIG_MACH_RPI_COMMON=y > > + > > +# > > +# select Broadcom BCM283X boards to be built > > +# > > +# CONFIG_MACH_RPI is not set > > +# CONFIG_MACH_RPI2 is not set > > +CONFIG_MACH_RPI3=y > > +CONFIG_BAREBOX_MAX_IMAGE_SIZE=0xffffffff > > +CONFIG_AEABI=y > > +# CONFIG_THUMB2_BAREBOX is not set > > +# CONFIG_ARM_BOARD_APPEND_ATAG is not set > > + > > +# > > +# ARM specific settings > > +# > > +CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y > > +CONFIG_ARM_EXCEPTIONS=y > > +CONFIG_ARM_UNWIND=y > > +# CONFIG_ARM_SEMIHOSTING is not set > > +CONFIG_ARM_SMCCC=y > > +CONFIG_ARM_SECURE_MONITOR=y > > +# CONFIG_ARM_PSCI is not set > > +CONFIG_DEFCONFIG_LIST="$ARCH_DEFCONFIG" > > +CONFIG_GREGORIAN_CALENDER=y > > +CONFIG_HAS_KALLSYMS=y > > +CONFIG_HAS_MODULES=y > > +CONFIG_HAS_CACHE=y > > +CONFIG_HAS_DMA=y > > +CONFIG_GENERIC_GPIO=y > > +CONFIG_BLOCK=y > > +CONFIG_BLOCK_WRITE=y > > +CONFIG_FILETYPE=y > > +CONFIG_BINFMT=y > > +CONFIG_UIMAGE=y > > +CONFIG_STDDEV=y > > +CONFIG_BOOT=y > > + > > +# > > +# General Settings > > +# > > +CONFIG_LOCALVERSION="" > > +CONFIG_LOCALVERSION_AUTO=y > > +CONFIG_BANNER=y > > +CONFIG_MEMINFO=y > > +CONFIG_ENVIRONMENT_VARIABLES=y > > +CONFIG_GLOBALVAR=y > > +CONFIG_NVVAR=y > > + > > +# > > +# memory layout > > +# > > +CONFIG_HAVE_PBL_IMAGE=y > > +CONFIG_HAVE_PBL_MULTI_IMAGES=y > > +CONFIG_HAVE_IMAGE_COMPRESSION=y > > +CONFIG_PBL_IMAGE=y > > +CONFIG_PBL_MULTI_IMAGES=y > > +CONFIG_PBL_RELOCATABLE=y > > +CONFIG_IMAGE_COMPRESSION=y > > +# CONFIG_IMAGE_COMPRESSION_LZ4 is not set > > +# CONFIG_IMAGE_COMPRESSION_LZO is not set > > +# CONFIG_IMAGE_COMPRESSION_GZIP is not set > > +# CONFIG_IMAGE_COMPRESSION_XZKERN is not set > > +CONFIG_IMAGE_COMPRESSION_NONE=y > > +CONFIG_MMU=y > > +CONFIG_MMU_EARLY=y > > +CONFIG_BAREBOX_MAX_PBL_SIZE=0xffffffff > > +CONFIG_BAREBOX_MAX_BARE_INIT_SIZE=0xffffffff > > +CONFIG_BAREBOX_MAX_PBLX_SIZE=0xffffffff > > +CONFIG_STACK_SIZE=0x8000 > > +CONFIG_MALLOC_SIZE=0x0 > > +# CONFIG_EXPERIMENTAL is not set > > +# CONFIG_MALLOC_DLMALLOC is not set > > +CONFIG_MALLOC_TLSF=y > > +CONFIG_KALLSYMS=y > > +CONFIG_RELOCATABLE=y > > +# CONFIG_PANIC_HANG is not set > > +CONFIG_PROMPT="R-Pi> " > > +CONFIG_BAUDRATE=115200 > > +CONFIG_CBSIZE=1024 > > +CONFIG_SHELL_HUSH=y > > +# CONFIG_SHELL_SIMPLE is not set > > +# CONFIG_SHELL_NONE is not set > > +CONFIG_GLOB=y > > +CONFIG_GLOB_SORT=y > > +CONFIG_PROMPT_HUSH_PS2="> " > > +CONFIG_HUSH_FANCY_PROMPT=y > > +CONFIG_CMDLINE_EDITING=y > > +CONFIG_AUTO_COMPLETE=y > > +CONFIG_MENU=y > > +CONFIG_PASSWORD=y > > +CONFIG_PASSWORD_DEFAULT="" > > +CONFIG_PASSWD_SUM_MD5=y > > +# CONFIG_PASSWD_SUM_SHA1 is not set > > +# CONFIG_PASSWD_SUM_SHA256 is not set > > +# CONFIG_PASSWD_SUM_SHA512 is not set > > +# CONFIG_PASSWD_CRYPTO_PBKDF2 is not set > > +CONFIG_DYNAMIC_CRC_TABLE=y > > +CONFIG_ERRNO_MESSAGES=y > > +CONFIG_TIMESTAMP=y > > +CONFIG_BOOTM=y > > +CONFIG_BOOTM_SHOW_TYPE=y > > +CONFIG_BOOTM_VERBOSE=y > > +CONFIG_BOOTM_INITRD=y > > +CONFIG_BOOTM_OFTREE=y > > +# CONFIG_BOOTM_OFTREE_UIMAGE is not set > > +# CONFIG_BOOTM_AIMAGE is not set > > +# CONFIG_BOOTM_FITIMAGE is not set > > +CONFIG_BLSPEC=y > > +CONFIG_FLEXIBLE_BOOTARGS=y > > +# CONFIG_IMD is not set > > +# CONFIG_KERNEL_INSTALL_TARGET is not set > > +CONFIG_CONSOLE_FULL=y > > +# CONFIG_CONSOLE_SIMPLE is not set > > +# CONFIG_CONSOLE_NONE is not set > > +CONFIG_CONSOLE_ACTIVATE_FIRST=y > > +# CONFIG_CONSOLE_ACTIVATE_ALL is not set > > +# CONFIG_CONSOLE_ACTIVATE_NONE is not set > > +# CONFIG_CONSOLE_ALLOW_COLOR is not set > > +# CONFIG_PBL_CONSOLE is not set > > +# CONFIG_CONSOLE_RATP is not set > > +CONFIG_PARTITION=y > > +CONFIG_PARTITION_DISK=y > > +CONFIG_PARTITION_DISK_DOS=y > > +# CONFIG_PARTITION_DISK_EFI is not set > > +CONFIG_ENV_HANDLING=y > > +CONFIG_DEFAULT_ENVIRONMENT=y > > +CONFIG_DEFAULT_COMPRESSION_NONE=y > > +CONFIG_DEFAULT_ENVIRONMENT_GENERIC_NEW=y > > +CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/raspberry-pi/env" > > +# CONFIG_BAREBOXENV_TARGET is not set > > +# CONFIG_BAREBOXCRC32_TARGET is not set > > +CONFIG_POLLER=y > > +# CONFIG_STATE is not set > > +# CONFIG_BOOTCHOOSER is not set > > +# CONFIG_RESET_SOURCE is not set > > + > > +# > > +# Debugging > > +# > > +CONFIG_COMPILE_LOGLEVEL=6 > > +CONFIG_DEFAULT_LOGLEVEL=7 > > +# CONFIG_DEBUG_INFO is not set > > +# CONFIG_DEBUG_LL is not set > > +# CONFIG_DEBUG_INITCALLS is not set > > +CONFIG_HAS_DEBUG_LL=y > > +CONFIG_COMMAND_SUPPORT=y > > +CONFIG_COMPILE_HASH=y > > +CONFIG_COMPILE_MEMORY=y > > + > > +# > > +# Commands > > +# > > + > > +# > > +# Information > > +# > > +CONFIG_CMD_ARM_CPUINFO=y > > +CONFIG_CMD_DEVINFO=y > > +# CONFIG_CMD_DMESG is not set > > +CONFIG_CMD_DRVINFO=y > > +CONFIG_CMD_HELP=y > > +CONFIG_LONGHELP=y > > +CONFIG_CMD_IOMEM=y > > +# CONFIG_CMD_IMD is not set > > +CONFIG_CMD_MEMINFO=y > > +# CONFIG_CMD_ARM_MMUINFO is not set > > +# CONFIG_CMD_REGULATOR is not set > > +CONFIG_CMD_VERSION=y > > +# CONFIG_CMD_MMC_EXTCSD is not set > > + > > +# > > +# Boot > > +# > > +CONFIG_CMD_BOOT=y > > +CONFIG_CMD_BOOTM=y > > +CONFIG_CMD_BOOTU=y > > +# CONFIG_CMD_BOOTZ is not set > > +CONFIG_CMD_GO=y > > +CONFIG_CMD_LOADB=y > > +# CONFIG_CMD_LOADS is not set > > +CONFIG_CMD_LOADY=y > > +CONFIG_CMD_RESET=y > > +CONFIG_CMD_UIMAGE=y > > + > > +# > > +# Partition > > +# > > +CONFIG_CMD_PARTITION=y > > +CONFIG_CMD_AUTOMOUNT=y > > +CONFIG_CMD_MOUNT=y > > +CONFIG_CMD_UMOUNT=y > > + > > +# > > +# Environment > > +# > > +CONFIG_CMD_NV=y > > +CONFIG_CMD_EXPORT=y > > +# CONFIG_CMD_DEFAULTENV is not set > > +CONFIG_CMD_GLOBAL=y > > +# CONFIG_CMD_LOADENV is not set > > +CONFIG_CMD_PRINTENV=y > > +CONFIG_CMD_MAGICVAR=y > > +CONFIG_CMD_MAGICVAR_HELP=y > > +CONFIG_CMD_SAVEENV=y > > + > > +# > > +# File > > +# > > +CONFIG_CMD_BASENAME=y > > +CONFIG_CMD_CAT=y > > +CONFIG_CMD_CD=y > > +CONFIG_CMD_CP=y > > +# CONFIG_CMD_CMP is not set > > +CONFIG_CMD_DIGEST=y > > +CONFIG_CMD_DIRNAME=y > > +CONFIG_CMD_FILETYPE=y > > +CONFIG_CMD_LN=y > > +CONFIG_CMD_LS=y > > +CONFIG_CMD_MD5SUM=y > > +CONFIG_CMD_MKDIR=y > > +CONFIG_CMD_PWD=y > > +CONFIG_CMD_READLINK=y > > +CONFIG_CMD_RM=y > > +CONFIG_CMD_RMDIR=y > > +# CONFIG_CMD_SHA1SUM is not set > > +# CONFIG_CMD_SHA224SUM is not set > > +# CONFIG_CMD_SHA256SUM is not set > > +# CONFIG_CMD_SHA384SUM is not set > > +# CONFIG_CMD_SHA512SUM is not set > > +CONFIG_CMD_UNCOMPRESS=y > > + > > +# > > +# Shell scripting > > +# > > +CONFIG_CMD_FALSE=y > > +CONFIG_CMD_GETOPT=y > > +CONFIG_CMD_LET=y > > +CONFIG_CMD_MSLEEP=y > > +# CONFIG_CMD_READF is not set > > +CONFIG_CMD_SLEEP=y > > +CONFIG_CMD_TEST=y > > +CONFIG_CMD_TRUE=y > > + > > +# > > +# Console and Framebuffer interaction > > +# > > +CONFIG_CMD_CLEAR=y > > +CONFIG_CMD_ECHO=y > > +CONFIG_CMD_ECHO_E=y > > +CONFIG_CMD_EDIT=y > > +CONFIG_CMD_LOGIN=y > > +CONFIG_CMD_MENU=y > > +CONFIG_CMD_MENU_MANAGEMENT=y > > +# CONFIG_CMD_MENUTREE is not set > > +CONFIG_CMD_PASSWD=y > > +CONFIG_PASSWD_MODE_HIDE=y > > +# CONFIG_PASSWD_MODE_STAR is not set > > +# CONFIG_PASSWD_MODE_CLEAR is not set > > +CONFIG_CMD_READLINE=y > > +CONFIG_CMD_TIMEOUT=y > > + > > +# > > +# Memory > > +# > > +CONFIG_CMD_CRC=y > > +CONFIG_CMD_CRC_CMP=y > > +CONFIG_CMD_MD=y > > +CONFIG_CMD_MEMCMP=y > > +CONFIG_CMD_MEMCPY=y > > +CONFIG_CMD_MEMSET=y > > +# CONFIG_CMD_MEMTEST is not set > > +CONFIG_CMD_MM=y > > +CONFIG_CMD_MW=y > > + > > +# > > +# Hardware manipulation > > +# > > +CONFIG_CMD_CLK=y > > +CONFIG_CMD_DETECT=y > > +# CONFIG_CMD_FLASH is not set > > +CONFIG_CMD_GPIO=y > > +# CONFIG_CMD_LED is not set > > +# CONFIG_CMD_POWEROFF is not set > > +# CONFIG_CMD_SPI is not set > > +# CONFIG_CMD_LED_TRIGGER is not set > > +CONFIG_CMD_WD=y > > +CONFIG_CMD_WD_DEFAULT_TIMOUT=0 > > + > > +# > > +# Miscellaneous > > +# > > +# CONFIG_CMD_2048 is not set > > +# CONFIG_CMD_BAREBOX_UPDATE is not set > > +# CONFIG_CMD_FIRMWARELOAD is not set > > +CONFIG_CMD_OF_DUMP=y > > +CONFIG_CMD_OF_NODE=y > > +CONFIG_CMD_OF_PROPERTY=y > > +# CONFIG_CMD_OF_DISPLAY_TIMINGS is not set > > +# CONFIG_CMD_OF_FIXUP_STATUS is not set > > +CONFIG_CMD_OFTREE=y > > +CONFIG_CMD_TIME=y > > +# CONFIG_CMD_DHRYSTONE is not set > > +# CONFIG_CMD_SPD_DECODE is not set > > +# CONFIG_CMD_SEED is not set > > +# CONFIG_NET is not set > > + > > +# > > +# Drivers > > +# > > +CONFIG_OFTREE=y > > +CONFIG_OFTREE_MEM_GENERIC=y > > +CONFIG_DTC=y > > +CONFIG_OFDEVICE=y > > +CONFIG_OF_GPIO=y > > +# CONFIG_OF_BAREBOX_DRIVERS is not set > > +# CONFIG_AIODEV is not set > > +CONFIG_ARM_AMBA=y > > + > > +# > > +# serial drivers > > +# > > +# CONFIG_SERIAL_DEV_BUS is not set > > +# CONFIG_DRIVER_SERIAL_ARM_DCC is not set > > +CONFIG_SERIAL_AMBA_PL011=y > > +# CONFIG_DRIVER_SERIAL_NS16550 is not set > > +# CONFIG_DRIVER_SERIAL_CADENCE is not set > > + > > +# > > +# SPI drivers > > +# > > +CONFIG_SPI=y > > +# CONFIG_DRIVER_SPI_GPIO is not set > > +# CONFIG_I2C is not set > > +# CONFIG_MTD is not set > > +CONFIG_DISK=y > > +CONFIG_DISK_WRITE=y > > + > > +# > > +# drive types > > +# > > +# CONFIG_DISK_ATA is not set > > +# CONFIG_DISK_AHCI is not set > > + > > +# > > +# interface types > > +# > > +# CONFIG_DISK_INTF_PLATFORM_IDE is not set > > +# CONFIG_USB_HOST is not set > > +# CONFIG_USB_GADGET is not set > > +# CONFIG_USB_MUSB is not set > > +# CONFIG_VIDEO is not set > > +CONFIG_MCI=y > > + > > +# > > +# --- Feature list --- > > +# > > +# CONFIG_MCI_STARTUP is not set > > +CONFIG_MCI_INFO=y > > +CONFIG_MCI_WRITE=y > > +# CONFIG_MCI_MMC_BOOT_PARTITIONS is not set > > + > > +# > > +# --- MCI host drivers --- > > +# > > +# CONFIG_MCI_DW is not set > > +CONFIG_MCI_BCM283X=y > > +# CONFIG_MCI_MMCI is not set > > +# CONFIG_MCI_SPI is not set > > +CONFIG_HAVE_CLK=y > > +CONFIG_CLKDEV_LOOKUP=y > > +CONFIG_COMMON_CLK=y > > +CONFIG_CLOCKSOURCE_BCM283X=y > > +CONFIG_CLOCKSOURCE_DUMMY_RATE=1000 > > + > > +# > > +# MFD > > +# > > +# CONFIG_MFD_MC13XXX is not set > > +# CONFIG_MFD_SYSCON is not set > > + > > +# > > +# Misc devices > > +# > > +# CONFIG_JTAG is not set > > +# CONFIG_SRAM is not set > > +CONFIG_LED=y > > +CONFIG_LED_GPIO=y > > +# CONFIG_LED_GPIO_OF is not set > > +# CONFIG_LED_GPIO_RGB is not set > > +# CONFIG_LED_GPIO_BICOLOR is not set > > +CONFIG_LED_TRIGGERS=y > > + > > +# > > +# EEPROM support > > +# > > +# CONFIG_EEPROM_AT25 is not set > > + > > +# > > +# Input device support > > +# > > +# CONFIG_KEYBOARD_GPIO is not set > > +CONFIG_WATCHDOG=y > > +# CONFIG_WATCHDOG_POLLER is not set > > +# CONFIG_WATCHDOG_DW is not set > > +CONFIG_WATCHDOG_BCM2835=y > > +# CONFIG_PWM is not set > > +# CONFIG_HWRNG is not set > > + > > +# > > +# DMA support > > +# > > +CONFIG_GPIOLIB=y > > + > > +# > > +# GPIO > > +# > > +# CONFIG_GPIO_74164 is not set > > +CONFIG_GPIO_BCM283X=y > > +# CONFIG_GPIO_GENERIC_PLATFORM is not set > > +# CONFIG_GPIO_IMX is not set > > +# CONFIG_GPIO_VF610 is not set > > +# CONFIG_GPIO_MXS is not set > > +# CONFIG_GPIO_OMAP is not set > > +# CONFIG_GPIO_PL061 is not set > > +# CONFIG_GPIO_DESIGNWARE is not set > > +# CONFIG_W1 is not set > > +# CONFIG_PINCTRL is not set > > +# CONFIG_NVMEM is not set > > + > > +# > > +# Bus devices > > +# > > +CONFIG_REGULATOR=y > > +# CONFIG_REGULATOR_FIXED is not set > > +CONFIG_REGULATOR_BCM283X=y > > +# CONFIG_RESET_CONTROLLER is not set > > +# CONFIG_RTC_CLASS is not set > > + > > +# > > +# Firmware Drivers > > +# > > +# CONFIG_FIRMWARE_ALTERA_SERIAL is not set > > +# CONFIG_GENERIC_PHY is not set > > +# CONFIG_CRYPTO_HW is not set > > + > > +# > > +# Memory controller drivers > > +# > > + > > +# > > +# Filesystem support > > +# > > +CONFIG_FS=y > > +CONFIG_FS_LEGACY=y > > + > > +# > > +# Some selected filesystems still use the legacy FS API. > > +# > > + > > +# > > +# Consider updating them. > > +# > > +CONFIG_FS_AUTOMOUNT=y > > +# CONFIG_FS_CRAMFS is not set > > +CONFIG_FS_EXT4=y > > +CONFIG_FS_RAMFS=y > > +CONFIG_FS_DEVFS=y > > +CONFIG_FS_FAT=y > > +CONFIG_FS_FAT_WRITE=y > > +CONFIG_FS_FAT_LFN=y > > +# CONFIG_FS_BPKFS is not set > > +# CONFIG_FS_UIMAGEFS is not set > > +# CONFIG_FS_PSTORE is not set > > +# CONFIG_FS_SQUASHFS is not set > > + > > +# > > +# ZLIB support disabled > > +# > > + > > +# > > +# LZ4 support disabled > > +# > > + > > +# > > +# LZO support disabled > > +# > > + > > +# > > +# XZ support disabled > > +# > > + > > +# > > +# ZSTD support disabled > > +# > > + > > +# > > +# Library routines > > +# > > +CONFIG_PARAMETER=y > > +CONFIG_UNCOMPRESS=y > > +# CONFIG_ZLIB is not set > > +# CONFIG_BZLIB is not set > > +# CONFIG_LZ4_DECOMPRESS is not set > > +# CONFIG_ZSTD_DECOMPRESS is not set > > +# CONFIG_XZ_DECOMPRESS is not set > > +# CONFIG_GENERIC_FIND_NEXT_BIT is not set > > +CONFIG_PROCESS_ESCAPE_SEQUENCE=y > > +# CONFIG_LZO_DECOMPRESS is not set > > +CONFIG_FNMATCH=y > > +CONFIG_QSORT=y > > +CONFIG_XYMODEM=y > > +# CONFIG_RATP is not set > > +# CONFIG_ALLOW_PRNG_FALLBACK is not set > > +# CONFIG_CRC_CCITT is not set > > + > > +# > > +# Library gui routines > > +# > > +# CONFIG_BAREBOX_LOGO is not set > > + > > +# > > +# Crypto support > > +# > > +CONFIG_CRC32=y > > +CONFIG_CRC16=y > > +CONFIG_DIGEST=y > > +CONFIG_MD5=y > > +CONFIG_SHA1=y > > +CONFIG_SHA256=y > > +# CONFIG_DIGEST_CRC32_GENERIC is not set > > +CONFIG_DIGEST_MD5_GENERIC=y > > +CONFIG_DIGEST_SHA1_GENERIC=y > > +# CONFIG_DIGEST_SHA224_GENERIC is not set > > +CONFIG_DIGEST_SHA256_GENERIC=y > > +# CONFIG_DIGEST_SHA384_GENERIC is not set > > +# CONFIG_DIGEST_SHA512_GENERIC is not set > > +# CONFIG_DIGEST_HMAC_GENERIC is not set > > +# CONFIG_DIGEST_SHA1_ARM is not set > > +# CONFIG_DIGEST_SHA256_ARM is not set > > +# CONFIG_CRYPTO_KEYSTORE is not set > > + > > +# > > +# Firmware files > > +# > > +CONFIG_EXTRA_FIRMWARE_DIR="firmware" > > + > > +# > > +# Host Tools > > +# > > +# CONFIG_COMPILE_HOST_TOOLS is not set > > diff --git a/configs/platform-v7a/barebox-vexpress.config > > b/configs/platform-v7a/barebox-vexpress.config > > index 826d222..72d5421 100644 > > --- a/configs/platform-v7a/barebox-vexpress.config > > +++ b/configs/platform-v7a/barebox-vexpress.config > > @@ -1,6 +1,6 @@ > > # > > # Automatically generated file; DO NOT EDIT. > > -# Barebox/arm 2018.05.0-20180515-1 Configuration > > +# Barebox/arm 2018.11.0-20181122-1 Configuration > > # > > CONFIG_ARM=y > > CONFIG_ARM_LINUX=y > > @@ -364,6 +364,7 @@ CONFIG_ARM_AMBA=y > > # > > # serial drivers > > # > > +# CONFIG_SERIAL_DEV_BUS is not set > > # CONFIG_DRIVER_SERIAL_ARM_DCC is not set > > CONFIG_SERIAL_AMBA_PL011=y > > # CONFIG_DRIVER_SERIAL_NS16550 is not set > > @@ -389,6 +390,7 @@ CONFIG_DRIVER_NET_SMC911X=y > > # > > # CONFIG_AR8327N_PHY is not set > > # CONFIG_AT803X_PHY is not set > > +# CONFIG_DAVICOM_PHY is not set > > # CONFIG_LXT_PHY is not set > > # CONFIG_MARVELL_PHY is not set > > # CONFIG_MICREL_PHY is not set > > @@ -522,6 +524,15 @@ CONFIG_STATE_DRV=y > > # Filesystem support > > # > > CONFIG_FS=y > > +CONFIG_FS_LEGACY=y > > + > > +# > > +# Some selected filesystems still use the legacy FS API. > > +# > > + > > +# > > +# Consider updating them. > > +# > > CONFIG_FS_AUTOMOUNT=y > > # CONFIG_FS_CRAMFS is not set > > CONFIG_FS_EXT4=y > > @@ -599,3 +610,13 @@ CONFIG_DIGEST_MD5_GENERIC=y > > # CONFIG_DIGEST_SHA1_ARM is not set > > # CONFIG_DIGEST_SHA256_ARM is not set > > # CONFIG_CRYPTO_KEYSTORE is not set > > + > > +# > > +# Firmware files > > +# > > +CONFIG_EXTRA_FIRMWARE_DIR="firmware" > > + > > +# > > +# Host Tools > > +# > > +# CONFIG_COMPILE_HOST_TOOLS is not set > > diff --git a/configs/platform-v7a/patches/barebox-2018.05.0/0001- > > beaglebone-add-state-entry-for-mmc0-and-mmc1.patch > > b/configs/platform-v7a/patches/barebox-2018.05.0/0001-beaglebone- > > add-state-entry-for-mmc0-and-mmc1.patch > > deleted file mode 100644 > > index cfca106..0000000 > > --- a/configs/platform-v7a/patches/barebox-2018.05.0/0001- > > beaglebone-add-state-entry-for-mmc0-and-mmc1.patch > > +++ /dev/null > > @@ -1,35 +0,0 @@ > > -From: Michael Grzeschik <m.grzeschik@pengutronix.de> > > -Date: Fri, 10 Jun 2016 14:02:30 +0200 > > -Subject: [PATCH] beaglebone: add state entry for mmc0 and mmc1 > > - > > -Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de> > > ---- > > - arch/arm/dts/am335x-bone-common.dtsi | 15 +++++++++++++++ > > - 1 file changed, 15 insertions(+) > > - > > -diff --git a/arch/arm/dts/am335x-bone-common.dtsi > > b/arch/arm/dts/am335x-bone-common.dtsi > > -index 0413724e0ca1..6e58714516fd 100644 > > ---- a/arch/arm/dts/am335x-bone-common.dtsi > > -+++ b/arch/arm/dts/am335x-bone-common.dtsi > > -@@ -11,6 +11,21 @@ > > - linux,stdout-path = &uart0; > > - }; > > - > > -+ bootstate: bootstate { > > -+ compatible = "barebox,bootstate"; > > -+ backend-type = "nv"; > > -+ > > -+ system0 { > > -+ default_attempts = <3>; > > -+ boot = "mmc0"; > > -+ }; > > -+ > > -+ system1 { > > -+ default_attempts = <3>; > > -+ boot = "mmc1"; > > -+ }; > > -+ }; > > -+ > > - cpus { > > - cpu@0 { > > - cpu0-supply = <&dcdc2_reg>; > > diff --git a/configs/platform-v7a/patches/barebox-2018.05.0/0201- > > Release-pengutronix-multi_v7-20180515-1.patch b/configs/platform- > > v7a/patches/barebox-2018.05.0/0201-Release-pengutronix-multi_v7- > > 20180515-1.patch > > deleted file mode 100644 > > index 4b0c22d..0000000 > > --- a/configs/platform-v7a/patches/barebox-2018.05.0/0201-Release- > > pengutronix-multi_v7-20180515-1.patch > > +++ /dev/null > > @@ -1,22 +0,0 @@ > > -From: Roland Hieber <r.hieber@pengutronix.de> > > -Date: Tue, 15 May 2018 23:44:48 +0200 > > -Subject: [PATCH] Release pengutronix/multi_v7/20180515-1 > > - > > -Signed-off-by: Roland Hieber <r.hieber@pengutronix.de> > > ---- > > - Makefile | 2 +- > > - 1 file changed, 1 insertion(+), 1 deletion(-) > > - > > -diff --git a/Makefile b/Makefile > > -index 88c19917394f..11e79cc339f4 100644 > > ---- a/Makefile > > -+++ b/Makefile > > -@@ -1,7 +1,7 @@ > > - VERSION = 2018 > > - PATCHLEVEL = 05 > > - SUBLEVEL = 0 > > --EXTRAVERSION = > > -+EXTRAVERSION =-20180515-1 > > - NAME = None > > - > > - # *DOCUMENTATION* > > diff --git a/configs/platform-v7a/patches/barebox-2018.05.0/series > > b/configs/platform-v7a/patches/barebox-2018.05.0/series > > deleted file mode 100644 > > index 272791c..0000000 > > --- a/configs/platform-v7a/patches/barebox-2018.05.0/series > > +++ /dev/null > > @@ -1,15 +0,0 @@ > > -# umpf-base: v2018.05.0 > > -# umpf-name: pengutronix/multi_v7 > > -# umpf-version: pengutronix/multi_v7/20180515-1 > > -# umpf-topic: v2018.05.0/customers/pengutronix/beaglebone > > -# umpf-hashinfo: d1f50bff60c7069caad2df4ef02f672be456f141 > > -# umpf-topic-range: > > cd4320e3e86bd2ab7b4a19016ef8df6c5d69a5a5..d1f50bff60c7069caad2df4ef > > 02f672be456f141 > > -0001-beaglebone-add-state-entry-for-mmc0-and-mmc1.patch > > -# umpf-topic: v2018.05.0/customers/pengutronix/udoo-neo > > -# umpf-hashinfo: 772e5039c9a147256a085c76a74cf5cb5c14ec35 > > -# umpf-topic-range: > > d1f50bff60c7069caad2df4ef02f672be456f141..183d8e8d0ccf827481923b387 > > 2144e2c10ef9fac > > -0101-ARM-imx-add-support-for-Udoo-Neo-full.patch > > -# umpf-release: pengutronix/multi_v7/20180515-1 > > -# umpf-topic-range: > > 183d8e8d0ccf827481923b3872144e2c10ef9fac..734e18abc455f563837dd6ad0 > > df6fb9378053b00 > > -0201-Release-pengutronix-multi_v7-20180515-1.patch > > -# umpf-end > > diff --git a/configs/platform-v7a/patches/barebox-2018.11.0/0001- > > ARM-import-opcode-helpers-from-Linux-kernel.patch > > b/configs/platform-v7a/patches/barebox-2018.11.0/0001-ARM-import- > > opcode-helpers-from-Linux-kernel.patch > > new file mode 100644 > > index 0000000..bd459d0 > > --- /dev/null > > +++ b/configs/platform-v7a/patches/barebox-2018.11.0/0001-ARM- > > import-opcode-helpers-from-Linux-kernel.patch > > @@ -0,0 +1,299 @@ > > +From: Lucas Stach <l.stach@pengutronix.de> > > +Date: Thu, 1 Nov 2018 10:18:37 +0100 > > +Subject: [PATCH] ARM: import opcode helpers from Linux kernel > > + > > +Those are needed to generate some of the ARM SEC and VIRT > > +opcodes in a portable way. > > + > > +Signed-off-by: Lucas Stach <l.stach@pengutronix.de> > > +Tested-by: Roland Hieber <r.hieber@pengutronix.de> > > +Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> > > +--- > > + arch/arm/include/asm/opcodes-virt.h | 39 +++++ > > + arch/arm/include/asm/opcodes.h | 231 > > ++++++++++++++++++++++++++++ > > + 2 files changed, 270 insertions(+) > > + create mode 100644 arch/arm/include/asm/opcodes-virt.h > > + create mode 100644 arch/arm/include/asm/opcodes.h > > + > > +diff --git a/arch/arm/include/asm/opcodes-virt.h > > b/arch/arm/include/asm/opcodes-virt.h > > +new file mode 100644 > > +index 000000000000..efcfdf92d9d5 > > +--- /dev/null > > ++++ b/arch/arm/include/asm/opcodes-virt.h > > +@@ -0,0 +1,39 @@ > > ++/* > > ++ * opcodes-virt.h: Opcode definitions for the ARM virtualization > > extensions > > ++ * Copyright (C) 2012 Linaro Limited > > ++ * > > ++ * This program is free software; you can redistribute it and/or > > modify > > ++ * it under the terms of the GNU General Public License as > > published by > > ++ * the Free Software Foundation; either version 2 of the License, > > or > > ++ * (at your option) any later version. > > ++ * > > ++ * This program is distributed in the hope that it will be > > useful, > > ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of > > ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > > ++ * GNU General Public License for more details. > > ++ * > > ++ * You should have received a copy of the GNU General Public > > License along > > ++ * with this program; if not, write to the Free Software > > Foundation, Inc., > > ++ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. > > ++ */ > > ++#ifndef __ASM_ARM_OPCODES_VIRT_H > > ++#define __ASM_ARM_OPCODES_VIRT_H > > ++ > > ++#include <asm/opcodes.h> > > ++ > > ++#define __HVC(imm16) __inst_arm_thumb32( > > \ > > ++ 0xE1400070 | (((imm16) & 0xFFF0) << 4) | ((imm16) & > > 0x000F), \ > > ++ 0xF7E08000 | (((imm16) & 0xF000) << 4) | ((imm16) & > > 0x0FFF) \ > > ++) > > ++ > > ++#define __ERET __inst_arm_thumb32( > > \ > > ++ 0xE160006E, > > \ > > ++ 0xF3DE8F00 > > \ > > ++) > > ++ > > ++#define __MSR_ELR_HYP(regnum) __inst_arm_thumb32( > > \ > > ++ 0xE12EF300 | regnum, > > \ > > ++ 0xF3808E30 | (regnum << 16) > > \ > > ++) > > ++ > > ++#endif /* ! __ASM_ARM_OPCODES_VIRT_H */ > > +diff --git a/arch/arm/include/asm/opcodes.h > > b/arch/arm/include/asm/opcodes.h > > +new file mode 100644 > > +index 000000000000..a78bf5d2c518 > > +--- /dev/null > > ++++ b/arch/arm/include/asm/opcodes.h > > +@@ -0,0 +1,231 @@ > > ++/* > > ++ * arch/arm/include/asm/opcodes.h > > ++ * > > ++ * This program is free software; you can redistribute it and/or > > modify > > ++ * it under the terms of the GNU General Public License version 2 > > as > > ++ * published by the Free Software Foundation. > > ++ */ > > ++ > > ++#ifndef __ASM_ARM_OPCODES_H > > ++#define __ASM_ARM_OPCODES_H > > ++ > > ++#ifndef __ASSEMBLY__ > > ++#include <linux/linkage.h> > > ++extern asmlinkage unsigned int arm_check_condition(u32 opcode, > > u32 psr); > > ++#endif > > ++ > > ++#define ARM_OPCODE_CONDTEST_FAIL 0 > > ++#define ARM_OPCODE_CONDTEST_PASS 1 > > ++#define ARM_OPCODE_CONDTEST_UNCOND 2 > > ++ > > ++ > > ++/* > > ++ * Assembler opcode byteswap helpers. > > ++ * These are only intended for use by this header: don't use them > > directly, > > ++ * because they will be suboptimal in most cases. > > ++ */ > > ++#define ___asm_opcode_swab32(x) ( \ > > ++ (((x) << 24) & 0xFF000000) \ > > ++ | (((x) << 8) & 0x00FF0000) \ > > ++ | (((x) >> 8) & 0x0000FF00) \ > > ++ | (((x) >> 24) & 0x000000FF) \ > > ++) > > ++#define ___asm_opcode_swab16(x) ( \ > > ++ (((x) << 8) & 0xFF00) \ > > ++ | (((x) >> 8) & 0x00FF) \ > > ++) > > ++#define ___asm_opcode_swahb32(x) ( \ > > ++ (((x) << 8) & 0xFF00FF00) \ > > ++ | (((x) >> 8) & 0x00FF00FF) \ > > ++) > > ++#define ___asm_opcode_swahw32(x) ( \ > > ++ (((x) << 16) & 0xFFFF0000) \ > > ++ | (((x) >> 16) & 0x0000FFFF) \ > > ++) > > ++#define ___asm_opcode_identity32(x) ((x) & 0xFFFFFFFF) > > ++#define ___asm_opcode_identity16(x) ((x) & 0xFFFF) > > ++ > > ++ > > ++/* > > ++ * Opcode byteswap helpers > > ++ * > > ++ * These macros help with converting instructions between a > > canonical integer > > ++ * format and in-memory representation, in an endianness-agnostic > > manner. > > ++ * > > ++ * __mem_to_opcode_*() convert from in-memory representation to > > canonical form. > > ++ * __opcode_to_mem_*() convert from canonical form to in-memory > > representation. > > ++ * > > ++ * > > ++ * Canonical instruction representation: > > ++ * > > ++ * ARM: 0xKKLLMMNN > > ++ * Thumb 16-bit: 0x0000KKLL, where KK < 0xE8 > > ++ * Thumb 32-bit: 0xKKLLMMNN, where KK >= 0xE8 > > ++ * > > ++ * There is no way to distinguish an ARM instruction in canonical > > representation > > ++ * from a Thumb instruction (just as these cannot be > > distinguished in memory). > > ++ * Where this distinction is important, it needs to be tracked > > separately. > > ++ * > > ++ * Note that values in the range 0x0000E800..0xE7FFFFFF > > intentionally do not > > ++ * represent any valid Thumb-2 instruction. For this range, > > ++ * __opcode_is_thumb32() and __opcode_is_thumb16() will both be > > false. > > ++ * > > ++ * The ___asm variants are intended only for use by this header, > > in situations > > ++ * involving inline assembler. For .S files, the normal > > __opcode_*() macros > > ++ * should do the right thing. > > ++ */ > > ++#ifdef __ASSEMBLY__ > > ++ > > ++#define ___opcode_swab32(x) ___asm_opcode_swab32(x) > > ++#define ___opcode_swab16(x) ___asm_opcode_swab16(x) > > ++#define ___opcode_swahb32(x) ___asm_opcode_swahb32(x) > > ++#define ___opcode_swahw32(x) ___asm_opcode_swahw32(x) > > ++#define ___opcode_identity32(x) ___asm_opcode_identity32(x) > > ++#define ___opcode_identity16(x) ___asm_opcode_identity16(x) > > ++ > > ++#else /* ! __ASSEMBLY__ */ > > ++ > > ++#include <linux/types.h> > > ++#include <linux/swab.h> > > ++ > > ++#define ___opcode_swab32(x) swab32(x) > > ++#define ___opcode_swab16(x) swab16(x) > > ++#define ___opcode_swahb32(x) swahb32(x) > > ++#define ___opcode_swahw32(x) swahw32(x) > > ++#define ___opcode_identity32(x) ((u32)(x)) > > ++#define ___opcode_identity16(x) ((u16)(x)) > > ++ > > ++#endif /* ! __ASSEMBLY__ */ > > ++ > > ++ > > ++#ifdef CONFIG_CPU_ENDIAN_BE8 > > ++ > > ++#define __opcode_to_mem_arm(x) ___opcode_swab32(x) > > ++#define __opcode_to_mem_thumb16(x) ___opcode_swab16(x) > > ++#define __opcode_to_mem_thumb32(x) ___opcode_swahb32(x) > > ++#define ___asm_opcode_to_mem_arm(x) ___asm_opcode_swab32(x) > > ++#define ___asm_opcode_to_mem_thumb16(x) ___asm_opcode_swab16(x) > > ++#define ___asm_opcode_to_mem_thumb32(x) ___asm_opcode_swahb32(x) > > ++ > > ++#else /* ! CONFIG_CPU_ENDIAN_BE8 */ > > ++ > > ++#define __opcode_to_mem_arm(x) ___opcode_identity32(x) > > ++#define __opcode_to_mem_thumb16(x) ___opcode_identity16(x) > > ++#define ___asm_opcode_to_mem_arm(x) ___asm_opcode_identity32(x) > > ++#define ___asm_opcode_to_mem_thumb16(x) > > ___asm_opcode_identity16(x) > > ++#ifndef CONFIG_CPU_ENDIAN_BE32 > > ++/* > > ++ * On BE32 systems, using 32-bit accesses to store Thumb > > instructions will not > > ++ * work in all cases, due to alignment constraints. For now, a > > correct > > ++ * version is not provided for BE32. > > ++ */ > > ++#define __opcode_to_mem_thumb32(x) ___opcode_swahw32(x) > > ++#define ___asm_opcode_to_mem_thumb32(x) ___asm_opcode_swahw32(x) > > ++#endif > > ++ > > ++#endif /* ! CONFIG_CPU_ENDIAN_BE8 */ > > ++ > > ++#define __mem_to_opcode_arm(x) __opcode_to_mem_arm(x) > > ++#define __mem_to_opcode_thumb16(x) __opcode_to_mem_thumb16(x) > > ++#ifndef CONFIG_CPU_ENDIAN_BE32 > > ++#define __mem_to_opcode_thumb32(x) __opcode_to_mem_thumb32(x) > > ++#endif > > ++ > > ++/* Operations specific to Thumb opcodes */ > > ++ > > ++/* Instruction size checks: */ > > ++#define __opcode_is_thumb32(x) ( \ > > ++ ((x) & 0xF8000000) == 0xE8000000 \ > > ++ || ((x) & 0xF0000000) == 0xF0000000 \ > > ++) > > ++#define __opcode_is_thumb16(x) ( > > \ > > ++ ((x) & 0xFFFF0000) == 0 > > \ > > ++ && !(((x) & 0xF800) == 0xE800 || ((x) & 0xF000) == > > 0xF000) \ > > ++) > > ++ > > ++/* Operations to construct or split 32-bit Thumb instructions: */ > > ++#define __opcode_thumb32_first(x) (___opcode_identity16((x) >> > > 16)) > > ++#define __opcode_thumb32_second(x) (___opcode_identity16(x)) > > ++#define __opcode_thumb32_compose(first, second) ( > > \ > > ++ (___opcode_identity32(___opcode_identity16(first)) << > > 16) \ > > ++ | ___opcode_identity32(___opcode_identity16(second)) > > \ > > ++) > > ++#define ___asm_opcode_thumb32_first(x) > > (___asm_opcode_identity16((x) >> 16)) > > ++#define ___asm_opcode_thumb32_second(x) > > (___asm_opcode_identity16(x)) > > ++#define ___asm_opcode_thumb32_compose(first, second) ( > > \ > > ++ (___asm_opcode_identity32(___asm_opcode_identity16(firs > > t)) << 16) \ > > ++ | > > ___asm_opcode_identity32(___asm_opcode_identity16(second)) > > \ > > ++) > > ++ > > ++/* > > ++ * Opcode injection helpers > > ++ * > > ++ * In rare cases it is necessary to assemble an opcode which the > > ++ * assembler does not support directly, or which would normally > > be > > ++ * rejected because of the CFLAGS or AFLAGS used to build the > > affected > > ++ * file. > > ++ * > > ++ * Before using these macros, consider carefully whether it is > > feasible > > ++ * instead to change the build flags for your file, or whether it > > really > > ++ * makes sense to support old assembler versions when building > > that > > ++ * particular kernel feature. > > ++ * > > ++ * The macros defined here should only be used where there is no > > viable > > ++ * alternative. > > ++ * > > ++ * > > ++ * __inst_arm(x): emit the specified ARM opcode > > ++ * __inst_thumb16(x): emit the specified 16-bit Thumb opcode > > ++ * __inst_thumb32(x): emit the specified 32-bit Thumb opcode > > ++ * > > ++ * __inst_arm_thumb16(arm, thumb): emit either the specified arm > > or > > ++ * 16-bit Thumb opcode, depending on whether an ARM or > > Thumb-2 > > ++ * kernel is being built > > ++ * > > ++ * __inst_arm_thumb32(arm, thumb): emit either the specified arm > > or > > ++ * 32-bit Thumb opcode, depending on whether an ARM or > > Thumb-2 > > ++ * kernel is being built > > ++ * > > ++ * > > ++ * Note that using these macros directly is poor > > practice. Instead, you > > ++ * should use them to define human-readable wrapper macros to > > encode the > > ++ * instructions that you care about. In code which might run on > > ARMv7 or > > ++ * above, you can usually use the __inst_arm_thumb{16,32} macros > > to > > ++ * specify the ARM and Thumb alternatives at the same time. This > > ensures > > ++ * that the correct opcode gets emitted depending on the > > instruction set > > ++ * used for the kernel build. > > ++ * > > ++ * Look at opcodes-virt.h for an example of how to use these > > macros. > > ++ */ > > ++#include <linux/stringify.h> > > ++ > > ++#define __inst_arm(x) ___inst_arm(___asm_opcode_to_mem_arm(x)) > > ++#define __inst_thumb32(x) ___inst_thumb32( > > \ > > ++ ___asm_opcode_to_mem_thumb16(___asm_opcode_thumb32_first( > > x)), \ > > ++ ___asm_opcode_to_mem_thumb16(___asm_opcode_thumb32_second > > (x)) \ > > ++) > > ++#define __inst_thumb16(x) > > ___inst_thumb16(___asm_opcode_to_mem_thumb16(x)) > > ++ > > ++#ifdef CONFIG_THUMB2_BAREBOX > > ++#define __inst_arm_thumb16(arm_opcode, thumb_opcode) \ > > ++ __inst_thumb16(thumb_opcode) > > ++#define __inst_arm_thumb32(arm_opcode, thumb_opcode) \ > > ++ __inst_thumb32(thumb_opcode) > > ++#else > > ++#define __inst_arm_thumb16(arm_opcode, thumb_opcode) > > __inst_arm(arm_opcode) > > ++#define __inst_arm_thumb32(arm_opcode, thumb_opcode) > > __inst_arm(arm_opcode) > > ++#endif > > ++ > > ++/* Helpers for the helpers. Don't use these directly. */ > > ++#ifdef __ASSEMBLY__ > > ++#define ___inst_arm(x) .long x > > ++#define ___inst_thumb16(x) .short x > > ++#define ___inst_thumb32(first, second) .short first, second > > ++#else > > ++#define ___inst_arm(x) ".long " __stringify(x) "\n\t" > > ++#define ___inst_thumb16(x) ".short " __stringify(x) "\n\t" > > ++#define ___inst_thumb32(first, second) \ > > ++ ".short " __stringify(first) ", " __stringify(second) > > "\n\t" > > ++#endif > > ++ > > ++#endif /* __ASM_ARM_OPCODES_H */ > > diff --git a/configs/platform-v7a/patches/barebox-2018.11.0/0002- > > ARM-safely-switch-from-HYP-to-SVC-mode-if-required.patch > > b/configs/platform-v7a/patches/barebox-2018.11.0/0002-ARM-safely- > > switch-from-HYP-to-SVC-mode-if-required.patch > > new file mode 100644 > > index 0000000..fcd116a > > --- /dev/null > > +++ b/configs/platform-v7a/patches/barebox-2018.11.0/0002-ARM- > > safely-switch-from-HYP-to-SVC-mode-if-required.patch > > @@ -0,0 +1,88 @@ > > +From: Lucas Stach <l.stach@pengutronix.de> > > +Date: Thu, 1 Nov 2018 10:18:38 +0100 > > +Subject: [PATCH] ARM: safely switch from HYP to SVC mode if > > required > > + > > +This is a port of the Linux safe_svcmode_maskall macro to > > +the Barebox lowlevel init. > > + > > +Signed-off-by: Lucas Stach <l.stach@pengutronix.de> > > +Tested-by: Roland Hieber <r.hieber@pengutronix.de> > > +Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> > > +--- > > + arch/arm/cpu/lowlevel.S | 18 +++++++++++++++--- > > + arch/arm/include/asm/system.h | 26 ++++++++++++++++++++++++++ > > + 2 files changed, 41 insertions(+), 3 deletions(-) > > + > > +diff --git a/arch/arm/cpu/lowlevel.S b/arch/arm/cpu/lowlevel.S > > +index 7696a198e764..43665981e48b 100644 > > +--- a/arch/arm/cpu/lowlevel.S > > ++++ b/arch/arm/cpu/lowlevel.S > > +@@ -1,16 +1,28 @@ > > + #include <linux/linkage.h> > > + #include <init.h> > > + #include <asm/system.h> > > ++#include <asm/opcodes-virt.h> > > + > > + .section ".text_bare_init_","ax" > > + ENTRY(arm_cpu_lowlevel_init) > > + /* save lr, since it may be banked away with a processor > > mode change */ > > + mov r2, lr > > ++ > > + /* set the cpu to SVC32 mode, mask irq and fiq */ > > + mrs r12, cpsr > > +- bic r12, r12, #0x1f > > +- orr r12, r12, #0xd3 > > +- msr cpsr, r12 > > ++ eor r12, r12, #HYP_MODE > > ++ tst r12, #MODE_MASK > > ++ bic r12, r12, #MODE_MASK > > ++ orr r12, r12, #(PSR_I_BIT | PSR_F_BIT | SVC_MODE) > > ++THUMB( orr r12, r12, #PSR_T_BIT ) > > ++ bne 1f > > ++ orr r12, r12, #PSR_A_BIT > > ++ adr lr, 2f > > ++ msr spsr_cxsf, r12 > > ++ __MSR_ELR_HYP(14) > > ++ __ERET > > ++1: msr cpsr_c, r12 > > ++2: > > + > > + #if __LINUX_ARM_ARCH__ >= 6 > > + /* > > +diff --git a/arch/arm/include/asm/system.h > > b/arch/arm/include/asm/system.h > > +index 5cf828ea36cb..48242ab473f4 100644 > > +--- a/arch/arm/include/asm/system.h > > ++++ b/arch/arm/include/asm/system.h > > +@@ -60,6 +60,32 @@ > > + #define CR_AFE (1 << 29) /* Access flag enable > > */ > > + #define CR_TE (1 << 30) /* Thumb exception enable > > */ > > + > > ++/* > > ++ * PSR bits > > ++ */ > > ++#define USR_MODE 0x00000010 > > ++#define FIQ_MODE 0x00000011 > > ++#define IRQ_MODE 0x00000012 > > ++#define SVC_MODE 0x00000013 > > ++#define ABT_MODE 0x00000017 > > ++#define HYP_MODE 0x0000001a > > ++#define UND_MODE 0x0000001b > > ++#define SYSTEM_MODE 0x0000001f > > ++#define MODE32_BIT 0x00000010 > > ++#define MODE_MASK 0x0000001f > > ++ > > ++#define PSR_T_BIT 0x00000020 > > ++#define PSR_F_BIT 0x00000040 > > ++#define PSR_I_BIT 0x00000080 > > ++#define PSR_A_BIT 0x00000100 > > ++#define PSR_E_BIT 0x00000200 > > ++#define PSR_J_BIT 0x01000000 > > ++#define PSR_Q_BIT 0x08000000 > > ++#define PSR_V_BIT 0x10000000 > > ++#define PSR_C_BIT 0x20000000 > > ++#define PSR_Z_BIT 0x40000000 > > ++#define PSR_N_BIT 0x80000000 > > ++ > > + #ifndef __ASSEMBLY__ > > + #if __LINUX_ARM_ARCH__ >= 7 > > + static inline unsigned int current_el(void) > > diff --git a/configs/platform-v7a/patches/barebox-2018.11.0/0003- > > ARM-allow-secure-monitor-code-to-be-built-without-PS.patch > > b/configs/platform-v7a/patches/barebox-2018.11.0/0003-ARM-allow- > > secure-monitor-code-to-be-built-without-PS.patch > > new file mode 100644 > > index 0000000..eed9e52 > > --- /dev/null > > +++ b/configs/platform-v7a/patches/barebox-2018.11.0/0003-ARM- > > allow-secure-monitor-code-to-be-built-without-PS.patch > > @@ -0,0 +1,37 @@ > > +From: Lucas Stach <l.stach@pengutronix.de> > > +Date: Thu, 1 Nov 2018 10:18:39 +0100 > > +Subject: [PATCH] ARM: allow secure monitor code to be built > > without PSCI > > + > > +The hyp mode handling added in the secure monitor code is also > > useful > > +when Barebox doesn't have PSCI control. Allow to build without > > PSCI. > > + > > +Signed-off-by: Lucas Stach <l.stach@pengutronix.de> > > +Tested-by: Roland Hieber <r.hieber@pengutronix.de> > > +Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> > > +--- > > + arch/arm/cpu/sm_as.S | 4 ++++ > > + 1 file changed, 4 insertions(+) > > + > > +diff --git a/arch/arm/cpu/sm_as.S b/arch/arm/cpu/sm_as.S > > +index 09580e75de5f..0d01e1bf2435 100644 > > +--- a/arch/arm/cpu/sm_as.S > > ++++ b/arch/arm/cpu/sm_as.S > > +@@ -129,7 +129,9 @@ secure_monitor: > > + sub sp, sp, #4*4 @ allocate > > result structure on stack > > + mov r12, sp > > + push {r4-r6, r12} > > ++#ifdef CONFIG_ARM_PSCI > > + bl psci_entry > > ++#endif > > + pop {r4-r6, r12} > > + ldm r12, {r0-r3} > > + add sp, sp, #4*4 > > +@@ -163,6 +165,8 @@ ENTRY(psci_cpu_entry) > > + mcr p15, 0, r0, c1, c0, 1 @ ACTLR > > + > > + bl secure_monitor_stack_setup > > ++#ifdef CONFIG_ARM_PSCI > > + bl psci_cpu_entry_c > > ++#endif > > + > > + ENDPROC(psci_cpu_entry) > > diff --git a/configs/platform-v7a/patches/barebox-2018.11.0/0004- > > ARM-add-file-for-HYP-mode-related-setup.patch b/configs/platform- > > v7a/patches/barebox-2018.11.0/0004-ARM-add-file-for-HYP-mode- > > related-setup.patch > > new file mode 100644 > > index 0000000..8047922 > > --- /dev/null > > +++ b/configs/platform-v7a/patches/barebox-2018.11.0/0004-ARM-add- > > file-for-HYP-mode-related-setup.patch > > @@ -0,0 +1,193 @@ > > +From: Lucas Stach <l.stach@pengutronix.de> > > +Date: Thu, 1 Nov 2018 10:18:40 +0100 > > +Subject: [PATCH] ARM: add file for HYP mode related setup > > + > > +This adds routines to add hyp mode vectors and switch back to HYP > > +mode from SVC. This is needed in both the PBL and Barebox proper. > > + > > +Signed-off-by: Lucas Stach <l.stach@pengutronix.de> > > +Tested-by: Roland Hieber <r.hieber@pengutronix.de> > > +Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> > > +--- > > + arch/arm/cpu/Makefile | 3 + > > + arch/arm/cpu/hyp.S | 116 > > ++++++++++++++++++++++++++++++++++ > > + arch/arm/cpu/sm_as.S | 11 ---- > > + arch/arm/include/asm/secure.h | 3 + > > + 4 files changed, 122 insertions(+), 11 deletions(-) > > + create mode 100644 arch/arm/cpu/hyp.S > > + > > +diff --git a/arch/arm/cpu/Makefile b/arch/arm/cpu/Makefile > > +index 874d723e2cee..0a403bc981c5 100644 > > +--- a/arch/arm/cpu/Makefile > > ++++ b/arch/arm/cpu/Makefile > > +@@ -4,6 +4,9 @@ obj-$(CONFIG_ARM_EXCEPTIONS) += exceptions$(S64).o > > interrupts$(S64).o > > + obj-$(CONFIG_MMU) += mmu$(S64).o > > + lwl-y += lowlevel$(S64).o > > + obj-pbl-$(CONFIG_MMU) += mmu-early$(S64).o > > ++obj-pbl-$(CONFIG_CPU_32v7) += hyp.o > > ++AFLAGS_hyp.o :=-Wa,-march=armv7-a -Wa,-mcpu=all > > ++AFLAGS_pbl-hyp.o :=-Wa,-march=armv7-a -Wa,-mcpu=all > > + > > + obj-y += start.o entry.o > > + > > +diff --git a/arch/arm/cpu/hyp.S b/arch/arm/cpu/hyp.S > > +new file mode 100644 > > +index 000000000000..1314b56eab25 > > +--- /dev/null > > ++++ b/arch/arm/cpu/hyp.S > > +@@ -0,0 +1,116 @@ > > ++#include <linux/linkage.h> > > ++#include <asm/system.h> > > ++#include <asm/opcodes-virt.h> > > ++#include <init.h> > > ++ > > ++.arch_extension sec > > ++.arch_extension virt > > ++ > > ++__BARE_INIT > > ++ > > ++.data > > ++ .align 2 > > ++ENTRY(__boot_cpu_mode) > > ++ .long 0 > > ++.text > > ++ > > ++ENTRY(__hyp_install) > > ++ mrs r12, cpsr > > ++ and r12, r12, #MODE_MASK > > ++ > > ++ @ Save the initial CPU state > > ++ adr r0, .L__boot_cpu_mode_offset > > ++ ldr r1, [r0] > > ++ str r12, [r0, r1] > > ++ > > ++ cmp r12, #HYP_MODE > > ++ movne pc, lr @ give up if > > the CPU is not in HYP mode > > ++ > > ++ @ Now install the hypervisor stub: > > ++ adr r12, __hyp_vectors > > ++ mcr p15, 4, r12, c12, c0, 0 @ set > > hypervisor vector base (HVBAR) > > ++ > > ++ @ Disable all traps, so we don't get any nasty surprise > > ++ mov r12, #0 > > ++ mcr p15, 4, r12, c1, c1, 0 @ HCR > > ++ mcr p15, 4, r12, c1, c1, 2 @ HCPTR > > ++ mcr p15, 4, r12, c1, c1, 3 @ HSTR > > ++ > > ++THUMB( orr r12, #(1 << 30) ) @ > > HSCTLR.TE > > ++ mcr p15, 4, r12, c1, c0, 0 @ HSCTLR > > ++ > > ++ mrc p15, 4, r12, c1, c1, 1 @ HDCR > > ++ and r12, #0x1f @ Preserve HPMN > > ++ mcr p15, 4, r12, c1, c1, 1 @ HDCR > > ++ > > ++ @ Make sure NS-SVC is initialised appropriately > > ++ mrc p15, 0, r12, c1, c0, 0 @ SCTLR > > ++ orr r12, #(1 << 5) @ CP15 barriers > > enabled > > ++ bic r12, #(3 << 7) @ Clear SED/ITD > > for v8 (RES0 for v7) > > ++ bic r12, #(3 << 19) @ WXN and UWXN > > disabled > > ++ mcr p15, 0, r12, c1, c0, 0 @ SCTLR > > ++ > > ++ mrc p15, 0, r12, c0, c0, 0 @ MIDR > > ++ mcr p15, 4, r12, c0, c0, 0 @ VPIDR > > ++ > > ++ mrc p15, 0, r12, c0, c0, 5 @ MPIDR > > ++ mcr p15, 4, r12, c0, c0, 5 @ VMPIDR > > ++ bx lr > > ++ENDPROC(__hyp_install) > > ++ > > ++ENTRY(armv7_hyp_install) > > ++ mov r2, lr > > ++ > > ++ bl __hyp_install > > ++ > > ++ /* set the cpu to SVC32 mode, mask irq and fiq */ > > ++ mrs r12, cpsr > > ++ eor r12, r12, #HYP_MODE > > ++ tst r12, #MODE_MASK > > ++ bic r12, r12, #MODE_MASK > > ++ orr r12, r12, #(PSR_I_BIT | PSR_F_BIT | SVC_MODE) > > ++THUMB( orr r12, r12, #PSR_T_BIT ) > > ++ bne 1f > > ++ orr r12, r12, #PSR_A_BIT > > ++ adr lr, 2f > > ++ msr spsr_cxsf, r12 > > ++ __MSR_ELR_HYP(14) > > ++ __ERET > > ++1: msr cpsr_c, r12 > > ++2: > > ++ mov pc, r2 > > ++ENDPROC(armv7_hyp_install) > > ++ > > ++ENTRY(armv7_switch_to_hyp) > > ++ mov r0, lr > > ++ mov r1, sp @ save SVC copy of LR > > and SP > > ++ isb > > ++ hvc #0 @ for older asm: .byte > > 0x70, 0x00, 0x40, 0xe1 > > ++ mov sp, r1 > > ++ mov lr, r0 @ restore SVC copy of LR > > and SP > > ++ > > ++ bx lr > > ++ENDPROC(armv7_switch_to_hyp) > > ++ > > ++.align 2 > > ++.L__boot_cpu_mode_offset: > > ++ .long __boot_cpu_mode - . > > ++ > > ++/* The HYP trap is crafted to match armv7_switch_to_hyp() */ > > ++__hyp_do_trap: > > ++ mov lr, r0 > > ++ mov sp, r1 > > ++ bx lr > > ++ENDPROC(__hyp_do_trap) > > ++ > > ++.align 5 > > ++__hyp_vectors: > > ++__hyp_reset: W(b) . > > ++__hyp_und: W(b) . > > ++__hyp_svc: W(b) . > > ++__hyp_pabort: W(b) . > > ++__hyp_dabort: W(b) . > > ++__hyp_trap: W(b) __hyp_do_trap > > ++__hyp_irq: W(b) . > > ++__hyp_fiq: W(b) . > > ++ENDPROC(__hyp_vectors) > > +diff --git a/arch/arm/cpu/sm_as.S b/arch/arm/cpu/sm_as.S > > +index 0d01e1bf2435..de6cd0406f4f 100644 > > +--- a/arch/arm/cpu/sm_as.S > > ++++ b/arch/arm/cpu/sm_as.S > > +@@ -148,17 +148,6 @@ hyp_trap: > > + mov pc, lr @ do no switch > > modes, but > > + @ return to > > caller > > + > > +-ENTRY(armv7_switch_to_hyp) > > +- mov r0, lr > > +- mov r1, sp @ save SVC copy of LR > > and SP > > +- isb > > +- hvc #0 @ for older asm: .byte > > 0x70, 0x00, 0x40, 0xe1 > > +- mov sp, r1 > > +- mov lr, r0 @ restore SVC copy of LR > > and SP > > +- > > +- bx lr > > +-ENDPROC(armv7_switch_to_hyp) > > +- > > + ENTRY(psci_cpu_entry) > > + mrc p15, 0, r0, c1, c0, 1 @ ACTLR > > + orr r0, r0, #(1 << 6) @ Set SMP bit > > +diff --git a/arch/arm/include/asm/secure.h > > b/arch/arm/include/asm/secure.h > > +index a4cb1f6c1c44..663d81ea27dd 100644 > > +--- a/arch/arm/include/asm/secure.h > > ++++ b/arch/arm/include/asm/secure.h > > +@@ -5,9 +5,12 @@ > > + > > + int armv7_secure_monitor_install(void); > > + int __armv7_secure_monitor_install(void); > > ++ > > + void armv7_switch_to_hyp(void); > > ++void armv7_hyp_install(void); > > + > > + extern unsigned char secure_monitor_init_vectors[]; > > ++extern int __boot_cpu_mode; > > + > > + enum arm_security_state { > > + ARM_STATE_SECURE, > > diff --git a/configs/platform-v7a/patches/barebox-2018.11.0/0005- > > ARM-don-t-try-to-install-secure-monitor-when-entered.patch > > b/configs/platform-v7a/patches/barebox-2018.11.0/0005-ARM-don-t- > > try-to-install-secure-monitor-when-entered.patch > > new file mode 100644 > > index 0000000..b82de4b > > --- /dev/null > > +++ b/configs/platform-v7a/patches/barebox-2018.11.0/0005-ARM-don- > > t-try-to-install-secure-monitor-when-entered.patch > > @@ -0,0 +1,30 @@ > > +From: Lucas Stach <l.stach@pengutronix.de> > > +Date: Thu, 1 Nov 2018 10:18:41 +0100 > > +Subject: [PATCH] ARM: don't try to install secure monitor when > > entered in HYP > > + mode > > + > > +When Barebox has been entered in HYP mode, the CPU is already > > switched > > +to the non-secure world and it's not possible for Barebox to > > install > > +it's own secure monitor. > > + > > +Signed-off-by: Lucas Stach <l.stach@pengutronix.de> > > +Tested-by: Roland Hieber <r.hieber@pengutronix.de> > > +Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> > > +--- > > + arch/arm/cpu/sm.c | 3 +++ > > + 1 file changed, 3 insertions(+) > > + > > +diff --git a/arch/arm/cpu/sm.c b/arch/arm/cpu/sm.c > > +index cb0bac106b5f..1246d8e3a441 100644 > > +--- a/arch/arm/cpu/sm.c > > ++++ b/arch/arm/cpu/sm.c > > +@@ -184,6 +184,9 @@ int armv7_secure_monitor_install(void) > > + return -EINVAL; > > + } > > + > > ++ if (__boot_cpu_mode == HYP_MODE) > > ++ return 0; > > ++ > > + mmuon = get_cr() & CR_M; > > + > > + vbar = get_vbar(); > > diff --git a/configs/platform-v7a/patches/barebox-2018.11.0/0006- > > ARM-default-to-starting-kernel-in-HYP-mode-when-ente.patch > > b/configs/platform-v7a/patches/barebox-2018.11.0/0006-ARM-default- > > to-starting-kernel-in-HYP-mode-when-ente.patch > > new file mode 100644 > > index 0000000..1de95c1 > > --- /dev/null > > +++ b/configs/platform-v7a/patches/barebox-2018.11.0/0006-ARM- > > default-to-starting-kernel-in-HYP-mode-when-ente.patch > > @@ -0,0 +1,31 @@ > > +From: Lucas Stach <l.stach@pengutronix.de> > > +Date: Thu, 1 Nov 2018 10:18:42 +0100 > > +Subject: [PATCH] ARM: default to starting kernel in HYP mode when > > entered in > > + HYP > > + > > +When Barebox has been entered in HYP mode, there is a high chance > > that > > +the kernel is intended to be started in HYP mode also. Get this > > +default into place. > > + > > +Signed-off-by: Lucas Stach <l.stach@pengutronix.de> > > +Tested-by: Roland Hieber <r.hieber@pengutronix.de> > > +Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> > > +--- > > + arch/arm/cpu/sm.c | 3 +++ > > + 1 file changed, 3 insertions(+) > > + > > +diff --git a/arch/arm/cpu/sm.c b/arch/arm/cpu/sm.c > > +index 1246d8e3a441..6fad30adabc9 100644 > > +--- a/arch/arm/cpu/sm.c > > ++++ b/arch/arm/cpu/sm.c > > +@@ -262,6 +262,9 @@ static int sm_init(void) > > + bootm_secure_state_names, > > + ARRAY_SIZE(bootm_secure_state_n > > ames)); > > + > > ++ if (__boot_cpu_mode == HYP_MODE) > > ++ bootm_secure_state = ARM_STATE_HYP; > > ++ > > + return 0; > > + } > > + device_initcall(sm_init); > > +\ No newline at end of file > > diff --git a/configs/platform-v7a/patches/barebox-2018.11.0/0007- > > ARM-install-HYP-vectors-at-PBL-and-Barebox-entry.patch > > b/configs/platform-v7a/patches/barebox-2018.11.0/0007-ARM-install- > > HYP-vectors-at-PBL-and-Barebox-entry.patch > > new file mode 100644 > > index 0000000..10615e9 > > --- /dev/null > > +++ b/configs/platform-v7a/patches/barebox-2018.11.0/0007-ARM- > > install-HYP-vectors-at-PBL-and-Barebox-entry.patch > > @@ -0,0 +1,105 @@ > > +From: Lucas Stach <l.stach@pengutronix.de> > > +Date: Thu, 1 Nov 2018 10:18:43 +0100 > > +Subject: [PATCH] ARM: install HYP vectors at PBL and Barebox entry > > + > > +If the CPU was already in HYP mode when entering the PBL, install > > a > > +simple trap handler to allow to get back from SVC to HYP before > > +switching to HYP mode. > > + > > +As the vectors are part of the currently running binary, we need > > to > > +do the same setup when starting the real Barebox binary, as the > > PBL > > +setup vectors might get overwritten. To do this we trap into HYP > > mode > > +just before jumping to Barebox and then re-do the vector setup and > > +SVC switch as the first thing in Barebox proper. > > + > > +Signed-off-by: Lucas Stach <l.stach@pengutronix.de> > > +Tested-by: Roland Hieber <r.hieber@pengutronix.de> > > +Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> > > +--- > > + arch/arm/cpu/lowlevel.S | 5 +++++ > > + arch/arm/cpu/start-pbl.c | 4 ++++ > > + arch/arm/cpu/start.c | 5 +++++ > > + arch/arm/cpu/uncompress.c | 4 ++++ > > + 4 files changed, 18 insertions(+) > > + > > +diff --git a/arch/arm/cpu/lowlevel.S b/arch/arm/cpu/lowlevel.S > > +index 43665981e48b..3b52644e43e1 100644 > > +--- a/arch/arm/cpu/lowlevel.S > > ++++ b/arch/arm/cpu/lowlevel.S > > +@@ -8,6 +8,11 @@ ENTRY(arm_cpu_lowlevel_init) > > + /* save lr, since it may be banked away with a processor > > mode change */ > > + mov r2, lr > > + > > ++#ifdef CONFIG_CPU_32v7 > > ++ /* careful: the hyp install corrupts r0 and r1 */ > > ++ bl __hyp_install > > ++#endif > > ++ > > + /* set the cpu to SVC32 mode, mask irq and fiq */ > > + mrs r12, cpsr > > + eor r12, r12, #HYP_MODE > > +diff --git a/arch/arm/cpu/start-pbl.c b/arch/arm/cpu/start-pbl.c > > +index 16159d7f9d51..48a808645671 100644 > > +--- a/arch/arm/cpu/start-pbl.c > > ++++ b/arch/arm/cpu/start-pbl.c > > +@@ -26,6 +26,7 @@ > > + #include <asm/barebox-arm-head.h> > > + #include <asm-generic/memory_layout.h> > > + #include <asm/sections.h> > > ++#include <asm/secure.h> > > + #include <asm/cache.h> > > + #include <asm/mmu.h> > > + #include <asm/unaligned.h> > > +@@ -98,5 +99,8 @@ __noreturn void > > barebox_single_pbl_start(unsigned long membase, > > + else > > + barebox = (void *)barebox_base; > > + > > ++ if (IS_ENABLED(CONFIG_CPU_V7) && __boot_cpu_mode == > > HYP_MODE) > > ++ armv7_switch_to_hyp(); > > ++ > > + barebox(membase, memsize, boarddata); > > + } > > +diff --git a/arch/arm/cpu/start.c b/arch/arm/cpu/start.c > > +index 64bd942ad764..a79d64eaa6e6 100644 > > +--- a/arch/arm/cpu/start.c > > ++++ b/arch/arm/cpu/start.c > > +@@ -24,6 +24,7 @@ > > + #include <asm/barebox-arm-head.h> > > + #include <asm-generic/memory_layout.h> > > + #include <asm/sections.h> > > ++#include <asm/secure.h> > > + #include <asm/unaligned.h> > > + #include <asm/cache.h> > > + #include <asm/mmu.h> > > +@@ -147,6 +148,10 @@ __noreturn void > > barebox_non_pbl_start(unsigned long membase, > > + unsigned long barebox_base = > > arm_mem_barebox_image(membase, > > + endmem > > , > > + barebo > > x_size); > > ++ > > ++ if (IS_ENABLED(CONFIG_CPU_V7)) > > ++ armv7_hyp_install(); > > ++ > > + if (IS_ENABLED(CONFIG_RELOCATABLE)) > > + relocate_to_adr(barebox_base); > > + > > +diff --git a/arch/arm/cpu/uncompress.c b/arch/arm/cpu/uncompress.c > > +index 43b49b42120b..048bca0c9599 100644 > > +--- a/arch/arm/cpu/uncompress.c > > ++++ b/arch/arm/cpu/uncompress.c > > +@@ -27,6 +27,7 @@ > > + #include <asm/barebox-arm-head.h> > > + #include <asm-generic/memory_layout.h> > > + #include <asm/sections.h> > > ++#include <asm/secure.h> > > + #include <asm/cache.h> > > + #include <asm/mmu.h> > > + #include <asm/unaligned.h> > > +@@ -105,5 +106,8 @@ void __noreturn > > barebox_multi_pbl_start(unsigned long membase, > > + > > + pr_debug("jumping to uncompressed image at 0x%p\n", > > barebox); > > + > > ++ if (IS_ENABLED(CONFIG_CPU_V7) && __boot_cpu_mode == > > HYP_MODE) > > ++ armv7_switch_to_hyp(); > > ++ > > + barebox(membase, memsize, boarddata); > > + } > > diff --git a/configs/platform-v7a/patches/barebox-2018.11.0/0008- > > ARM-rpi-add-revision-IDs-for-Pi-3-Model-B-and-Pi-Zer.patch > > b/configs/platform-v7a/patches/barebox-2018.11.0/0008-ARM-rpi-add- > > revision-IDs-for-Pi-3-Model-B-and-Pi-Zer.patch > > new file mode 100644 > > index 0000000..9aa90b5 > > --- /dev/null > > +++ b/configs/platform-v7a/patches/barebox-2018.11.0/0008-ARM-rpi- > > add-revision-IDs-for-Pi-3-Model-B-and-Pi-Zer.patch > > @@ -0,0 +1,41 @@ > > +From: Enrico Joerns <ejo@pengutronix.de> > > +Date: Thu, 1 Nov 2018 10:18:44 +0100 > > +Subject: [PATCH] ARM: rpi: add revision IDs for Pi 3 Model B and > > Pi Zero > > + > > +Signed-off-by: Enrico Joerns <ejo@pengutronix.de> > > +Signed-off-by: Lucas Stach <l.stach@pengutronix.de> > > +Tested-by: Roland Hieber <r.hieber@pengutronix.de> > > +Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> > > +--- > > + arch/arm/boards/raspberry-pi/rpi-common.c | 2 ++ > > + arch/arm/mach-bcm283x/include/mach/mbox.h | 4 ++++ > > + 2 files changed, 6 insertions(+) > > + > > +diff --git a/arch/arm/boards/raspberry-pi/rpi-common.c > > b/arch/arm/boards/raspberry-pi/rpi-common.c > > +index 6e375bc984de..3baed6525586 100644 > > +--- a/arch/arm/boards/raspberry-pi/rpi-common.c > > ++++ b/arch/arm/boards/raspberry-pi/rpi-common.c > > +@@ -174,6 +174,8 @@ const struct rpi_model rpi_models_old_scheme[] > > = { > > + const struct rpi_model rpi_models_new_scheme[] = { > > + RPI_MODEL(0, "Unknown model", NULL), > > + RPI_MODEL(BCM2836_BOARD_REV_2_B, "2 Model B", > > rpi_b_plus_init), > > ++ RPI_MODEL(BCM2837_BOARD_REV_3_B, "3 Model B", > > rpi_b_plus_init), > > ++ RPI_MODEL(BCM2835_BOARD_REV_ZERO, "Zero", > > rpi_b_plus_init), > > + }; > > + > > + static int rpi_board_rev = 0; > > +diff --git a/arch/arm/mach-bcm283x/include/mach/mbox.h > > b/arch/arm/mach-bcm283x/include/mach/mbox.h > > +index 2b5aea88ee0a..0d1ac074e328 100644 > > +--- a/arch/arm/mach-bcm283x/include/mach/mbox.h > > ++++ b/arch/arm/mach-bcm283x/include/mach/mbox.h > > +@@ -129,6 +129,10 @@ struct bcm2835_mbox_tag_hdr { > > + > > + /* RPi 2 */ > > + #define BCM2836_BOARD_REV_2_B 0x4 > > ++/* RPi 3 */ > > ++#define BCM2837_BOARD_REV_3_B 0x8 > > ++/* Zero */ > > ++#define BCM2835_BOARD_REV_ZERO 0x9 > > + > > + /* > > + * 0x2..0xf from: > > diff --git a/configs/platform-v7a/patches/barebox-2018.11.0/0009- > > ARM-rpi-add-raspberry-pi-3-support.patch b/configs/platform- > > v7a/patches/barebox-2018.11.0/0009-ARM-rpi-add-raspberry-pi-3- > > support.patch > > new file mode 100644 > > index 0000000..8e8d76a > > --- /dev/null > > +++ b/configs/platform-v7a/patches/barebox-2018.11.0/0009-ARM-rpi- > > add-raspberry-pi-3-support.patch > > @@ -0,0 +1,141 @@ > > +From: Lucas Stach <l.stach@pengutronix.de> > > +Date: Thu, 1 Nov 2018 10:18:45 +0100 > > +Subject: [PATCH] ARM: rpi: add raspberry pi 3 support > > + > > +This adds basic support at the same feature level as the other > > +supported raspberry pi boards. > > + > > +Signed-off-by: Lucas Stach <l.stach@pengutronix.de> > > +Tested-by: Roland Hieber <r.hieber@pengutronix.de> > > +Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> > > +--- > > + arch/arm/boards/raspberry-pi/lowlevel.c | 14 ++++++++++++-- > > + arch/arm/configs/rpi_defconfig | 2 ++ > > + arch/arm/dts/Makefile | 1 + > > + arch/arm/dts/bcm2837-rpi-3.dts | 16 ++++++++++++++++ > > + arch/arm/mach-bcm283x/Kconfig | 6 ++++++ > > + arch/arm/mach-bcm283x/core.c | 1 + > > + images/Makefile.bcm283x | 4 ++++ > > + 7 files changed, 42 insertions(+), 2 deletions(-) > > + create mode 100644 arch/arm/dts/bcm2837-rpi-3.dts > > + > > +diff --git a/arch/arm/boards/raspberry-pi/lowlevel.c > > b/arch/arm/boards/raspberry-pi/lowlevel.c > > +index cbc6caa4b9ed..34c9350920e9 100644 > > +--- a/arch/arm/boards/raspberry-pi/lowlevel.c > > ++++ b/arch/arm/boards/raspberry-pi/lowlevel.c > > +@@ -1,7 +1,7 @@ > > ++#include <asm/barebox-arm.h> > > ++#include <asm/cache.h> > > + #include <common.h> > > + #include <linux/sizes.h> > > +-#include <asm/barebox-arm.h> > > +-#include <asm/barebox-arm-head.h> > > + #include <mach/platform.h> > > + > > + extern char __dtb_bcm2835_rpi_start[]; > > +@@ -23,3 +23,13 @@ ENTRY_FUNCTION(start_raspberry_pi2, r0, r1, r2) > > + > > + barebox_arm_entry(BCM2835_SDRAM_BASE, SZ_512M, fdt); > > + } > > ++ > > ++extern char __dtb_bcm2837_rpi_3_start[]; > > ++ENTRY_FUNCTION(start_raspberry_pi3, r0, r1, r2) > > ++{ > > ++ void *fdt = __dtb_bcm2837_rpi_3_start + > > get_runtime_offset(); > > ++ > > ++ arm_cpu_lowlevel_init(); > > ++ > > ++ barebox_arm_entry(BCM2835_SDRAM_BASE, SZ_512M, fdt); > > ++} > > +diff --git a/arch/arm/configs/rpi_defconfig > > b/arch/arm/configs/rpi_defconfig > > +index f3aef4290425..cd88b4ac751c 100644 > > +--- a/arch/arm/configs/rpi_defconfig > > ++++ b/arch/arm/configs/rpi_defconfig > > +@@ -1,9 +1,11 @@ > > + CONFIG_ARCH_BCM283X=y > > + CONFIG_MACH_RPI=y > > + CONFIG_MACH_RPI2=y > > ++CONFIG_MACH_RPI3=y > > + CONFIG_AEABI=y > > + CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y > > + CONFIG_ARM_UNWIND=y > > ++CONFIG_IMAGE_COMPRESSION_NONE=y > > + CONFIG_MMU=y > > + CONFIG_MALLOC_TLSF=y > > + CONFIG_KALLSYMS=y > > +diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile > > +index 1caeca35b484..4e063902c635 100644 > > +--- a/arch/arm/dts/Makefile > > ++++ b/arch/arm/dts/Makefile > > +@@ -71,6 +71,7 @@ pbl-dtb-$(CONFIG_MACH_PHYTEC_SOM_RK3288) += > > rk3288-phycore-som.dtb.o > > + pbl-dtb-$(CONFIG_MACH_REALQ7) += imx6q-dmo-edmqmx6.dtb.o > > + pbl-dtb-$(CONFIG_MACH_RPI) += bcm2835-rpi.dtb.o > > + pbl-dtb-$(CONFIG_MACH_RPI2) += bcm2836-rpi-2.dtb.o > > ++pbl-dtb-$(CONFIG_MACH_RPI3) += bcm2837-rpi-3.dtb.o > > + pbl-dtb-$(CONFIG_MACH_SABRELITE) += imx6q-sabrelite.dtb.o imx6dl- > > sabrelite.dtb.o > > + pbl-dtb-$(CONFIG_MACH_SABRESD) += imx6q-sabresd.dtb.o > > + pbl-dtb-$(CONFIG_MACH_FREESCALE_IMX6SX_SABRESDB) += imx6sx- > > sdb.dtb.o > > +diff --git a/arch/arm/dts/bcm2837-rpi-3.dts > > b/arch/arm/dts/bcm2837-rpi-3.dts > > +new file mode 100644 > > +index 000000000000..d6ffc369122c > > +--- /dev/null > > ++++ b/arch/arm/dts/bcm2837-rpi-3.dts > > +@@ -0,0 +1,16 @@ > > ++#include <arm64/broadcom/bcm2837-rpi-3-b.dts> > > ++ > > ++/ { > > ++ chosen { > > ++ stdout-path = &uart0; > > ++ }; > > ++ > > ++ memory { > > ++ reg = <0x0 0x0>; > > ++ }; > > ++}; > > ++ > > ++&uart0 { > > ++ status = "okay"; > > ++ /delete-node/ bluetooth; > > ++}; > > +diff --git a/arch/arm/mach-bcm283x/Kconfig b/arch/arm/mach- > > bcm283x/Kconfig > > +index 1457f114ccaa..af2f88c47acb 100644 > > +--- a/arch/arm/mach-bcm283x/Kconfig > > ++++ b/arch/arm/mach-bcm283x/Kconfig > > +@@ -19,6 +19,12 @@ config MACH_RPI2 > > + select CPU_V7 > > + select MACH_RPI_COMMON > > + > > ++config MACH_RPI3 > > ++ bool "RaspberryPi 3 (BCM2837/CORTEX-A53)" > > ++ select CPU_V7 > > ++ select MACH_RPI_COMMON > > ++ select ARM_SECURE_MONITOR > > ++ > > + endmenu > > + > > + config MACH_RPI_DEBUG_UART_BASE > > +diff --git a/arch/arm/mach-bcm283x/core.c b/arch/arm/mach- > > bcm283x/core.c > > +index fddcb0d1a1d4..26f0996b1cb8 100644 > > +--- a/arch/arm/mach-bcm283x/core.c > > ++++ b/arch/arm/mach-bcm283x/core.c > > +@@ -41,6 +41,7 @@ static int bcm2835_clk_init(void) > > + clk = clk_fixed("uart0-pl0110", 3 * 1000 * 1000); > > + clk_register_clkdev(clk, NULL, "uart0-pl0110"); > > + clk_register_clkdev(clk, NULL, "20201000.serial"); > > ++ clk_register_clkdev(clk, NULL, "3f201000.serial"); > > + > > + clk = clk_fixed("bcm2835-cs", 1 * 1000 * 1000); > > + clk_register_clkdev(clk, NULL, "bcm2835-cs"); > > +diff --git a/images/Makefile.bcm283x b/images/Makefile.bcm283x > > +index d59ef043f05c..d14e648926ac 100644 > > +--- a/images/Makefile.bcm283x > > ++++ b/images/Makefile.bcm283x > > +@@ -9,3 +9,7 @@ image-$(CONFIG_MACH_RPI) += barebox-raspberry-pi- > > 1.img > > + pblx-$(CONFIG_MACH_RPI2) += start_raspberry_pi2 > > + FILE_barebox-raspberry-pi-2.img = start_raspberry_pi2.pblx > > + image-$(CONFIG_MACH_RPI2) += barebox-raspberry-pi-2.img > > ++ > > ++pblx-$(CONFIG_MACH_RPI3) += start_raspberry_pi3 > > ++FILE_barebox-raspberry-pi-3.img = start_raspberry_pi3.pblx > > ++image-$(CONFIG_MACH_RPI3) += barebox-raspberry-pi-3.img > > +\ No newline at end of file > > diff --git a/configs/platform-v7a/patches/barebox-2018.11.0/0010- > > ARM-rpi-autosize-malloc-area.patch b/configs/platform- > > v7a/patches/barebox-2018.11.0/0010-ARM-rpi-autosize-malloc- > > area.patch > > new file mode 100644 > > index 0000000..da498ba > > --- /dev/null > > +++ b/configs/platform-v7a/patches/barebox-2018.11.0/0010-ARM-rpi- > > autosize-malloc-area.patch > > @@ -0,0 +1,25 @@ > > +From: Lucas Stach <l.stach@pengutronix.de> > > +Date: Thu, 1 Nov 2018 10:18:46 +0100 > > +Subject: [PATCH] ARM: rpi: autosize malloc area > > + > > +Autosize the malloc area according to the available RAM size. > > + > > +Signed-off-by: Lucas Stach <l.stach@pengutronix.de> > > +Tested-by: Roland Hieber <r.hieber@pengutronix.de> > > +Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> > > +--- > > + arch/arm/configs/rpi_defconfig | 1 + > > + 1 file changed, 1 insertion(+) > > + > > +diff --git a/arch/arm/configs/rpi_defconfig > > b/arch/arm/configs/rpi_defconfig > > +index cd88b4ac751c..2bb615849324 100644 > > +--- a/arch/arm/configs/rpi_defconfig > > ++++ b/arch/arm/configs/rpi_defconfig > > +@@ -7,6 +7,7 @@ CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y > > + CONFIG_ARM_UNWIND=y > > + CONFIG_IMAGE_COMPRESSION_NONE=y > > + CONFIG_MMU=y > > ++CONFIG_MALLOC_SIZE=0x0 > > + CONFIG_MALLOC_TLSF=y > > + CONFIG_KALLSYMS=y > > + CONFIG_PROMPT="R-Pi> " > > diff --git a/configs/platform-v7a/patches/barebox-2018.05.0/0101- > > ARM-imx-add-support-for-Udoo-Neo-full.patch b/configs/platform- > > v7a/patches/barebox-2018.11.0/0101-ARM-imx-add-support-for-Udoo- > > Neo-full.patch > > similarity index 93% > > rename from configs/platform-v7a/patches/barebox-2018.05.0/0101- > > ARM-imx-add-support-for-Udoo-Neo-full.patch > > rename to configs/platform-v7a/patches/barebox-2018.11.0/0101-ARM- > > imx-add-support-for-Udoo-Neo-full.patch > > index 06c356b..9f99a39 100644 > > --- a/configs/platform-v7a/patches/barebox-2018.05.0/0101-ARM-imx- > > add-support-for-Udoo-Neo-full.patch > > +++ b/configs/platform-v7a/patches/barebox-2018.11.0/0101-ARM-imx- > > add-support-for-Udoo-Neo-full.patch > > @@ -26,10 +26,10 @@ Forwarded: id:20170627190317.19253-1-uwe@kleine > > -koenig.org > > create mode 100644 arch/arm/dts/imx6sx-udoo-neo-full.dts > > > > diff --git a/arch/arm/boards/Makefile b/arch/arm/boards/Makefile > > -index 30f4c299f1a1..f70fbac8f379 100644 > > +index c737cf34138c..9aee9bf0993a 100644 > > --- a/arch/arm/boards/Makefile > > +++ b/arch/arm/boards/Makefile > > -@@ -135,6 +135,7 @@ obj-$(CONFIG_MACH_TX51) > > += karo-tx51/ > > +@@ -137,6 +137,7 @@ obj-$(CONFIG_MACH_TX51) > > += karo-tx51/ > > obj-$(CONFIG_MACH_TX53) += karo- > > tx53/ > > obj-$(CONFIG_MACH_TX6X) += karo- > > tx6x/ > > obj-$(CONFIG_MACH_UDOO) += udoo/ > > @@ -254,10 +254,10 @@ index 000000000000..e78c2685fd78 > > + imx6sx_barebox_entry(fdt); > > +} > > diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile > > -index e60e0ea0c6be..b87e27c8c263 100644 > > +index 4e063902c635..3d34a78f7878 100644 > > --- a/arch/arm/dts/Makefile > > +++ b/arch/arm/dts/Makefile > > -@@ -93,6 +93,7 @@ pbl-dtb-$(CONFIG_MACH_TX6X) += imx6dl-tx6u.dtb.o > > +@@ -97,6 +97,7 @@ pbl-dtb-$(CONFIG_MACH_TX6X) += imx6dl-tx6u.dtb.o > > pbl-dtb-$(CONFIG_MACH_TX6X) += imx6q-tx6q.dtb.o > > pbl-dtb-$(CONFIG_MACH_TURRIS_OMNIA) += armada-385-turris-omnia- > > bb.dtb.o > > pbl-dtb-$(CONFIG_MACH_UDOO) += imx6q-udoo.dtb.o > > @@ -276,10 +276,10 @@ index 000000000000..9203d40207c5 > > +/{ > > +}; > > diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig > > -index 9052a94ea071..9ec95bb6df09 100644 > > +index 63a92bd5bd1d..ab515ecf2286 100644 > > --- a/arch/arm/mach-imx/Kconfig > > +++ b/arch/arm/mach-imx/Kconfig > > -@@ -377,6 +377,10 @@ config MACH_UDOO > > +@@ -380,6 +380,10 @@ config MACH_UDOO > > bool "Freescale i.MX6 UDOO Board" > > select ARCH_IMX6 > > > > @@ -291,22 +291,22 @@ index 9052a94ea071..9ec95bb6df09 100644 > > bool "Variscite i.MX6 Quad SOM" > > select ARCH_IMX6 > > diff --git a/arch/arm/mach-imx/include/mach/esdctl.h > > b/arch/arm/mach-imx/include/mach/esdctl.h > > -index 66dcc8974cfb..bd6092febca4 100644 > > +index bc6c7339535e..18c4a2836007 100644 > > --- a/arch/arm/mach-imx/include/mach/esdctl.h > > +++ b/arch/arm/mach-imx/include/mach/esdctl.h > > -@@ -137,6 +137,7 @@ void __noreturn imx51_barebox_entry(void > > *boarddata); > > - void __noreturn imx53_barebox_entry(void *boarddata); > > - void __noreturn imx6q_barebox_entry(void *boarddata); > > - void __noreturn imx6ul_barebox_entry(void *boarddata); > > +@@ -141,6 +141,7 @@ void __noreturn imx6ul_barebox_entry(void > > *boarddata); > > + void __noreturn vf610_barebox_entry(void *boarddata); > > + void __noreturn imx8mq_barebox_entry(void *boarddata); > > + void __noreturn imx7d_barebox_entry(void *boarddata); > > +#define imx6sx_barebox_entry(boarddata) > > imx6ul_barebox_entry(boarddata) > > void imx_esdctl_disable(void); > > #endif > > > > diff --git a/images/Makefile.imx b/images/Makefile.imx > > -index 90da95d4d025..6420490811f9 100644 > > +index 341ce8506d88..c32f78b7e184 100644 > > --- a/images/Makefile.imx > > +++ b/images/Makefile.imx > > -@@ -275,6 +275,11 @@ CFG_start_imx6q_sabresd.pblx.imximg = > > $(board)/freescale-mx6-sabresd/flash-heade > > +@@ -271,6 +271,11 @@ CFG_start_imx6q_sabresd.pblx.imximg = > > $(board)/freescale-mx6-sabresd/flash-heade > > FILE_barebox-freescale-imx6q-sabresd.img = > > start_imx6q_sabresd.pblx.imximg > > image-$(CONFIG_MACH_SABRESD) += barebox-freescale-imx6q- > > sabresd.img > > > > diff --git a/configs/platform-v7a/patches/barebox-2018.11.0/0201- > > Release-pengutronix_multiv7-20181122-1.patch b/configs/platform- > > v7a/patches/barebox-2018.11.0/0201-Release-pengutronix_multiv7- > > 20181122-1.patch > > new file mode 100644 > > index 0000000..bd444f0 > > --- /dev/null > > +++ b/configs/platform-v7a/patches/barebox-2018.11.0/0201-Release- > > pengutronix_multiv7-20181122-1.patch > > @@ -0,0 +1,22 @@ > > +From: Rouven Czerwinski <r.czerwinski@pengutronix.de> > > +Date: Thu, 22 Nov 2018 12:09:22 +0100 > > +Subject: [PATCH] Release pengutronix_multiv7/20181122-1 > > + > > +Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de> > > +--- > > + Makefile | 2 +- > > + 1 file changed, 1 insertion(+), 1 deletion(-) > > + > > +diff --git a/Makefile b/Makefile > > +index 60a5d5ce11f4..b55ca4b03129 100644 > > +--- a/Makefile > > ++++ b/Makefile > > +@@ -1,7 +1,7 @@ > > + VERSION = 2018 > > + PATCHLEVEL = 11 > > + SUBLEVEL = 0 > > +-EXTRAVERSION = > > ++EXTRAVERSION =-20181122-1 > > + NAME = None > > + > > + # *DOCUMENTATION* > > diff --git a/configs/platform-v7a/patches/barebox-2018.11.0/series > > b/configs/platform-v7a/patches/barebox-2018.11.0/series > > new file mode 100644 > > index 0000000..e056b0c > > --- /dev/null > > +++ b/configs/platform-v7a/patches/barebox-2018.11.0/series > > @@ -0,0 +1,24 @@ > > +# umpf-base: v2018.11.0 > > +# umpf-name: pengutronix_multiv7 > > +# umpf-version: pengutronix_multiv7/20181122-1 > > +# umpf-topic: v2018.11.0/customers/pengutronix/rpi3 > > +# umpf-hashinfo: 1bdd9ef32c272ba5501e24ba643107855dd5149c > > +# umpf-topic-range: > > d1f223eddbcde31ba2a3f34fc0a1a14f40ea7130..1bdd9ef32c272ba5501e24ba6 > > 43107855dd5149c > > +0001-ARM-import-opcode-helpers-from-Linux-kernel.patch > > +0002-ARM-safely-switch-from-HYP-to-SVC-mode-if-required.patch > > +0003-ARM-allow-secure-monitor-code-to-be-built-without-PS.patch > > +0004-ARM-add-file-for-HYP-mode-related-setup.patch > > +0005-ARM-don-t-try-to-install-secure-monitor-when-entered.patch > > +0006-ARM-default-to-starting-kernel-in-HYP-mode-when-ente.patch > > +0007-ARM-install-HYP-vectors-at-PBL-and-Barebox-entry.patch > > +0008-ARM-rpi-add-revision-IDs-for-Pi-3-Model-B-and-Pi-Zer.patch > > +0009-ARM-rpi-add-raspberry-pi-3-support.patch > > +0010-ARM-rpi-autosize-malloc-area.patch > > +# umpf-topic: v2018.11.0/customers/pengutronix/udoo-neo > > +# umpf-hashinfo: c5f2e150d7e8d5439458df1a2cab71b25fc36e19 > > +# umpf-topic-range: > > 1bdd9ef32c272ba5501e24ba643107855dd5149c..8cacc208f8f6c9071113b12a6 > > 18a54d7e80b1694 > > +0101-ARM-imx-add-support-for-Udoo-Neo-full.patch > > +# umpf-release: pengutronix_multiv7/20181122-1 > > +# umpf-topic-range: > > 8cacc208f8f6c9071113b12a618a54d7e80b1694..45c64f6b4690a6b51be1c487d > > e1ffec6472704e1 > > +0201-Release-pengutronix_multiv7-20181122-1.patch > > +# umpf-end > > diff --git a/configs/platform-v7a/platformconfig > > b/configs/platform-v7a/platformconfig > > index cdea840..e2c8ac1 100644 > > --- a/configs/platform-v7a/platformconfig > > +++ b/configs/platform-v7a/platformconfig > > @@ -166,6 +166,8 @@ PTXCONF_BAREBOX_AM335X=y > > PTXCONF_BAREBOX_MX6=y > > PTXCONF_BAREBOX_RPI2=y > > PTXCONF_BAREBOX_RPI2_NEEDS_HOST_LZOP=y > > +PTXCONF_BAREBOX_RPI3=y > > +# PTXCONF_BAREBOX_RPI3_NEEDS_HOST_LZOP is not set > > PTXCONF_BAREBOX_VEXPRESS=y > > PTXCONF_BAREBOX_ARCH_STRING="arm" > > # PTXCONF_BAREBOX is not set > > diff --git a/configs/platform-v7a/rules/barebox-am335x-mlo.make > > b/configs/platform-v7a/rules/barebox-am335x-mlo.make > > index e71d057..6835d35 100644 > > --- a/configs/platform-v7a/rules/barebox-am335x-mlo.make > > +++ b/configs/platform-v7a/rules/barebox-am335x-mlo.make > > @@ -16,8 +16,8 @@ PACKAGES-$(PTXCONF_BAREBOX_AM335X_MLO) += > > barebox-am335x-mlo > > # > > # Paths and names > > # > > -BAREBOX_AM335X_MLO_VERSION := 2018.05.0 > > -BAREBOX_AM335X_MLO_MD5 := > > 8286a8ea2cdd88104e5c6762d93d81db > > +BAREBOX_AM335X_MLO_VERSION := 2018.11.0 > > +BAREBOX_AM335X_MLO_MD5 := > > 1472eae302647d1cf7f1c561a6380b43 > > BAREBOX_AM335X_MLO := barebox- > > $(BAREBOX_AM335X_MLO_VERSION) > > BAREBOX_AM335X_MLO_SUFFIX := tar.bz2 > > BAREBOX_AM335X_MLO_DIR := $(BUILDDIR)/barebox- > > am335x-mlo-$(BAREBOX_AM335X_MLO_VERSION) > > diff --git a/configs/platform-v7a/rules/barebox-am335x.make > > b/configs/platform-v7a/rules/barebox-am335x.make > > index 2c35ae1..8b3c2a0 100644 > > --- a/configs/platform-v7a/rules/barebox-am335x.make > > +++ b/configs/platform-v7a/rules/barebox-am335x.make > > @@ -16,8 +16,8 @@ PACKAGES-$(PTXCONF_BAREBOX_AM335X) += barebox- > > am335x > > # > > # Paths and names > > # > > -BAREBOX_AM335X_VERSION := 2018.05.0 > > -BAREBOX_AM335X_MD5 := 8286a8ea2cdd88104e5c6762d93d81db > > +BAREBOX_AM335X_VERSION := 2018.11.0 > > +BAREBOX_AM335X_MD5 := 1472eae302647d1cf7f1c561a6380b43 > > BAREBOX_AM335X := barebox-$(BAREBOX_AM335X_VERSION) > > BAREBOX_AM335X_SUFFIX := tar.bz2 > > BAREBOX_AM335X_DIR := $(BUILDDIR)/barebox-am335x- > > $(BAREBOX_AM335X_VERSION) > > diff --git a/configs/platform-v7a/rules/barebox-mx6.make > > b/configs/platform-v7a/rules/barebox-mx6.make > > index 7d7c2ce..3b86ea0 100644 > > --- a/configs/platform-v7a/rules/barebox-mx6.make > > +++ b/configs/platform-v7a/rules/barebox-mx6.make > > @@ -16,8 +16,8 @@ PACKAGES-$(PTXCONF_BAREBOX_MX6) += barebox-mx6 > > # > > # Paths and names > > # > > -BAREBOX_MX6_VERSION := 2018.05.0 > > -BAREBOX_MX6_MD5 := 8286a8ea2cdd88104e5c6762d93d81db > > +BAREBOX_MX6_VERSION := 2018.11.0 > > +BAREBOX_MX6_MD5 := 1472eae302647d1cf7f1c561a6380b43 > > BAREBOX_MX6 := barebox-$(BAREBOX_MX6_VERSION) > > BAREBOX_MX6_SUFFIX := tar.bz2 > > BAREBOX_MX6_DIR := $(BUILDDIR)/barebox-mx6- > > $(BAREBOX_MX6_VERSION) > > diff --git a/configs/platform-v7a/rules/barebox-rpi2.make > > b/configs/platform-v7a/rules/barebox-rpi2.make > > index cf9fc00..41990a0 100644 > > --- a/configs/platform-v7a/rules/barebox-rpi2.make > > +++ b/configs/platform-v7a/rules/barebox-rpi2.make > > @@ -16,8 +16,8 @@ PACKAGES-$(PTXCONF_BAREBOX_RPI2) += barebox-rpi2 > > # > > # Paths and names > > # > > -BAREBOX_RPI2_VERSION := 2018.05.0 > > -BAREBOX_RPI2_MD5 := 8286a8ea2cdd88104e5c6762d93d81db > > +BAREBOX_RPI2_VERSION := 2018.11.0 > > +BAREBOX_RPI2_MD5 := 1472eae302647d1cf7f1c561a6380b43 > > BAREBOX_RPI2 := barebox-$(BAREBOX_RPI2_VERSION) > > BAREBOX_RPI2_SUFFIX := tar.bz2 > > BAREBOX_RPI2_DIR := $(BUILDDIR)/barebox-rpi2- > > $(BAREBOX_RPI2_VERSION) > > diff --git a/configs/platform-v7a/rules/barebox-rpi3.make > > b/configs/platform-v7a/rules/barebox-rpi3.make > > new file mode 100644 > > index 0000000..35b7e5b > > --- /dev/null > > +++ b/configs/platform-v7a/rules/barebox-rpi3.make > > @@ -0,0 +1,104 @@ > > +# -*-makefile-*- > > +# > > +# Copyright (C) 2016 by Alexander Aring <aar@pengutronix.de> > > +# > > +# See CREDITS for details about who has contributed to this > > project. > > +# > > +# For further information about the PTXdist project and license > > conditions > > +# see the README file. > > +# > > + > > +# > > +# We provide this package > > +# > > +PACKAGES-$(PTXCONF_BAREBOX_RPI3) += barebox-rpi3 > > + > > +# > > +# Paths and names > > +# > > +BAREBOX_RPI3_VERSION := 2018.11.0 > > +BAREBOX_RPI3_MD5 := 1472eae302647d1cf7f1c561a6380b43 > > +BAREBOX_RPI3 := barebox-$(BAREBOX_RPI3_VERSION) > > +BAREBOX_RPI3_SUFFIX := tar.bz2 > > +BAREBOX_RPI3_DIR := $(BUILDDIR)/barebox-rpi3- > > $(BAREBOX_RPI3_VERSION) > > +BAREBOX_RPI3_CONFIG := $(call ptx/in-platformconfigdir, > > barebox-rpi3.config) > > +BAREBOX_RPI3_LICENSE := GPL-2.0 > > +BAREBOX_RPI3_URL := $(call barebox-url, BAREBOX_RPI3) > > +BAREBOX_RPI3_SOURCE := > > $(SRCDIR)/$(BAREBOX_RPI3).$(BAREBOX_RPI3_SUFFIX) > > + > > +# ---------------------------------------------------------------- > > ------------ > > +# Prepare > > +# ---------------------------------------------------------------- > > ------------ > > + > > +BAREBOX_RPI3_WRAPPER_BLACKLIST := \ > > + TARGET_HARDEN_RELRO \ > > + TARGET_HARDEN_BINDNOW \ > > + TARGET_HARDEN_PIE \ > > + TARGET_DEBUG \ > > + TARGET_BUILD_ID > > + > > +BAREBOX_RPI3_CONF_ENV := KCONFIG_NOTIMESTAMP=1 > > +BAREBOX_RPI3_CONF_OPT := $(call barebox-opts, BAREBOX_RPI3) > > + > > +BAREBOX_RPI3_MAKE_ENV := $(BAREBOX_RPI3_CONF_ENV) > > +BAREBOX_RPI3_MAKE_OPT := $(BAREBOX_RPI3_CONF_OPT) > > + > > +BAREBOX_RPI3_IMAGES := images/barebox-raspberry-pi-3.img > > +BAREBOX_RPI3_IMAGES := $(addprefix > > $(BAREBOX_RPI3_DIR)/,$(BAREBOX_RPI3_IMAGES)) > > + > > +ifdef PTXCONF_BAREBOX_RPI3 > > +$(BAREBOX_RPI3_CONFIG): > > + @echo > > + @echo > > "****************************************************************** > > **********" > > + @echo " Please generate a bareboxconfig with 'ptxdist > > menuconfig barebox-rpi3'" > > + @echo > > "****************************************************************** > > **********" > > + @echo > > + @echo > > + @exit 1 > > +endif > > + > > +$(STATEDIR)/barebox-rpi3.prepare: $(BAREBOX_RPI3_CONFIG) > > + @$(call targetinfo) > > + @rm -f "$(BAREBOX_RPI3_DIR)/.ptxdist-defaultenv" > > + @ln -s "$(call ptx/in-platformconfigdir, barebox-rpi3- > > defaultenv)" \ > > + "$(BAREBOX_RPI3_DIR)/.ptxdist-defaultenv" > > + @$(call world/prepare, BAREBOX_RPI3) > > + @$(call touch) > > + > > +# ---------------------------------------------------------------- > > ------------ > > +# Install > > +# ---------------------------------------------------------------- > > ------------ > > + > > +$(STATEDIR)/barebox-rpi3.install: > > + @$(call targetinfo) > > + @$(call touch) > > + > > +# ---------------------------------------------------------------- > > ------------ > > +# Targetinstall > > +# ---------------------------------------------------------------- > > ------------ > > + > > +$(STATEDIR)/barebox-rpi3.targetinstall: > > + @$(call targetinfo) > > + @$(foreach image, $(BAREBOX_RPI3_IMAGES), \ > > + install -m 644 \ > > + $(image) $(IMAGEDIR)/$(notdir $(image))- > > rpi3;) > > + @$(call touch) > > + > > +# ---------------------------------------------------------------- > > ------------ > > +# Clean > > +# ---------------------------------------------------------------- > > ------------ > > + > > +$(STATEDIR)/barebox-rpi3.clean: > > + @$(call targetinfo) > > + @$(call clean_pkg, BAREBOX_RPI3) > > + @$(foreach image, $(BAREBOX_RPI3_IMAGES), \ > > + rm -fv $(IMAGEDIR)/$(notdir $(image));) > > + > > +# ---------------------------------------------------------------- > > ------------ > > +# oldconfig / menuconfig > > +# ---------------------------------------------------------------- > > ------------ > > + > > +barebox-rpi3_oldconfig barebox-rpi3_menuconfig barebox- > > rpi3_nconfig: $(STATEDIR)/barebox-rpi3.extract > > + @$(call world/kconfig, BAREBOX_RPI3, $(subst barebox- > > rpi3_,,$@)) > > + > > +# vim: syntax=make > > diff --git a/configs/platform-v7a/rules/barebox-vexpress.make > > b/configs/platform-v7a/rules/barebox-vexpress.make > > index 0266cbe..f69b6c5 100644 > > --- a/configs/platform-v7a/rules/barebox-vexpress.make > > +++ b/configs/platform-v7a/rules/barebox-vexpress.make > > @@ -16,8 +16,8 @@ PACKAGES-$(PTXCONF_BAREBOX_VEXPRESS) += barebox- > > vexpress > > # > > # Paths and names > > # > > -BAREBOX_VEXPRESS_VERSION := 2018.05.0 > > -BAREBOX_VEXPRESS_MD5 := > > 8286a8ea2cdd88104e5c6762d93d81db > > +BAREBOX_VEXPRESS_VERSION := 2018.11.0 > > +BAREBOX_VEXPRESS_MD5 := > > 1472eae302647d1cf7f1c561a6380b43 > > BAREBOX_VEXPRESS := barebox- > > $(BAREBOX_VEXPRESS_VERSION) > > BAREBOX_VEXPRESS_SUFFIX := tar.bz2 > > BAREBOX_VEXPRESS_DIR := $(BUILDDIR)/barebox- > > vexpress-$(BAREBOX_VEXPRESS_VERSION) > > -- > > 2.19.1 > > > > > > _______________________________________________ > > DistroKit mailing list > > DistroKit@pengutronix.de > > _______________________________________________ DistroKit mailing list DistroKit@pengutronix.de ^ permalink raw reply [flat|nested] 7+ messages in thread
* [DistroKit] [PATCH v2] plaform-v7a: barebox v2018.05.0 → v2018.11.0 2018-12-05 7:55 [DistroKit] [PATCH] plaform-v7a: barebox v2018.05.0 → v2018.11.0 Rouven Czerwinski 2018-12-05 13:15 ` Roland Hieber @ 2018-12-06 14:39 ` Rouven Czerwinski 2018-12-06 21:04 ` Alexander Dahl 1 sibling, 1 reply; 7+ messages in thread From: Rouven Czerwinski @ 2018-12-06 14:39 UTC (permalink / raw) To: distrokit; +Cc: Rouven Czerwinski Drop the beaglebone patch, it will be resurrected in a barebox-deployment layer. We also add the patch series for the rpi3 to barebox, they can be dropped in the next release. Raspberry Pi 3 support is enabled in the patch series which also adds the rpi3 images. Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de> --- .../platform-v7a/barebox-am335x-mlo.config | 22 +- configs/platform-v7a/barebox-am335x.config | 24 +- configs/platform-v7a/barebox-mx6.config | 32 +- configs/platform-v7a/barebox-rpi2.config | 23 +- configs/platform-v7a/barebox-vexpress.config | 23 +- ...ne-add-state-entry-for-mmc0-and-mmc1.patch | 35 -- ...ease-pengutronix-multi_v7-20180515-1.patch | 22 -- .../patches/barebox-2018.05.0/series | 15 - ...ort-opcode-helpers-from-Linux-kernel.patch | 299 ++++++++++++++++++ ...tch-from-HYP-to-SVC-mode-if-required.patch | 88 ++++++ ...-monitor-code-to-be-built-without-PS.patch | 37 +++ ...-add-file-for-HYP-mode-related-setup.patch | 193 +++++++++++ ...-install-secure-monitor-when-entered.patch | 30 ++ ...tarting-kernel-in-HYP-mode-when-ente.patch | 31 ++ ...HYP-vectors-at-PBL-and-Barebox-entry.patch | 105 ++++++ ...sion-IDs-for-Pi-3-Model-B-and-Pi-Zer.patch | 41 +++ ...9-ARM-rpi-add-raspberry-pi-3-support.patch | 141 +++++++++ .../0010-ARM-rpi-autosize-malloc-area.patch | 25 ++ ...RM-imx-add-support-for-Udoo-Neo-full.patch | 26 +- ...lease-pengutronix_multiv7-20181122-1.patch | 22 ++ .../patches/barebox-2018.11.0/series | 24 ++ configs/platform-v7a/platformconfig | 2 + .../rules/barebox-am335x-mlo.make | 4 +- .../platform-v7a/rules/barebox-am335x.make | 4 +- configs/platform-v7a/rules/barebox-mx6.make | 4 +- configs/platform-v7a/rules/barebox-rpi2.make | 4 +- .../platform-v7a/rules/barebox-vexpress.make | 4 +- 27 files changed, 1177 insertions(+), 103 deletions(-) delete mode 100644 configs/platform-v7a/patches/barebox-2018.05.0/0001-beaglebone-add-state-entry-for-mmc0-and-mmc1.patch delete mode 100644 configs/platform-v7a/patches/barebox-2018.05.0/0201-Release-pengutronix-multi_v7-20180515-1.patch delete mode 100644 configs/platform-v7a/patches/barebox-2018.05.0/series create mode 100644 configs/platform-v7a/patches/barebox-2018.11.0/0001-ARM-import-opcode-helpers-from-Linux-kernel.patch create mode 100644 configs/platform-v7a/patches/barebox-2018.11.0/0002-ARM-safely-switch-from-HYP-to-SVC-mode-if-required.patch create mode 100644 configs/platform-v7a/patches/barebox-2018.11.0/0003-ARM-allow-secure-monitor-code-to-be-built-without-PS.patch create mode 100644 configs/platform-v7a/patches/barebox-2018.11.0/0004-ARM-add-file-for-HYP-mode-related-setup.patch create mode 100644 configs/platform-v7a/patches/barebox-2018.11.0/0005-ARM-don-t-try-to-install-secure-monitor-when-entered.patch create mode 100644 configs/platform-v7a/patches/barebox-2018.11.0/0006-ARM-default-to-starting-kernel-in-HYP-mode-when-ente.patch create mode 100644 configs/platform-v7a/patches/barebox-2018.11.0/0007-ARM-install-HYP-vectors-at-PBL-and-Barebox-entry.patch create mode 100644 configs/platform-v7a/patches/barebox-2018.11.0/0008-ARM-rpi-add-revision-IDs-for-Pi-3-Model-B-and-Pi-Zer.patch create mode 100644 configs/platform-v7a/patches/barebox-2018.11.0/0009-ARM-rpi-add-raspberry-pi-3-support.patch create mode 100644 configs/platform-v7a/patches/barebox-2018.11.0/0010-ARM-rpi-autosize-malloc-area.patch rename configs/platform-v7a/patches/{barebox-2018.05.0 => barebox-2018.11.0}/0101-ARM-imx-add-support-for-Udoo-Neo-full.patch (93%) create mode 100644 configs/platform-v7a/patches/barebox-2018.11.0/0201-Release-pengutronix_multiv7-20181122-1.patch create mode 100644 configs/platform-v7a/patches/barebox-2018.11.0/series diff --git a/configs/platform-v7a/barebox-am335x-mlo.config b/configs/platform-v7a/barebox-am335x-mlo.config index 6cebecd..7ccc487 100644 --- a/configs/platform-v7a/barebox-am335x-mlo.config +++ b/configs/platform-v7a/barebox-am335x-mlo.config @@ -1,6 +1,6 @@ # # Automatically generated file; DO NOT EDIT. -# Barebox/arm 2018.05.0-20180515-1 Configuration +# Barebox/arm 2018.11.0 Configuration # CONFIG_ARM=y CONFIG_ARM_USE_COMPRESSED_DTB=y @@ -185,6 +185,7 @@ CONFIG_OF_GPIO=y # # serial drivers # +# CONFIG_SERIAL_DEV_BUS is not set # CONFIG_DRIVER_SERIAL_ARM_DCC is not set CONFIG_DRIVER_SERIAL_NS16550=y CONFIG_DRIVER_SERIAL_NS16550_OMAP_EXTENSIONS=y @@ -337,6 +338,15 @@ CONFIG_BUS_OMAP_GPMC=y # Filesystem support # CONFIG_FS=y +CONFIG_FS_LEGACY=y + +# +# Some selected filesystems still use the legacy FS API. +# + +# +# Consider updating them. +# # CONFIG_FS_CRAMFS is not set # CONFIG_FS_EXT4 is not set CONFIG_FS_RAMFS=y @@ -398,3 +408,13 @@ CONFIG_XYMODEM=y CONFIG_CRC16=y # CONFIG_DIGEST is not set # CONFIG_CRYPTO_KEYSTORE is not set + +# +# Firmware files +# +CONFIG_EXTRA_FIRMWARE_DIR="firmware" + +# +# Host Tools +# +# CONFIG_COMPILE_HOST_TOOLS is not set diff --git a/configs/platform-v7a/barebox-am335x.config b/configs/platform-v7a/barebox-am335x.config index 0c78012..66ef277 100644 --- a/configs/platform-v7a/barebox-am335x.config +++ b/configs/platform-v7a/barebox-am335x.config @@ -1,6 +1,6 @@ # # Automatically generated file; DO NOT EDIT. -# Barebox/arm 2018.05.0-20180515-1 Configuration +# Barebox/arm 2018.11.0 Configuration # CONFIG_ARM=y CONFIG_ARM_LINUX=y @@ -408,6 +408,7 @@ CONFIG_OF_BAREBOX_DRIVERS=y # # serial drivers # +# CONFIG_SERIAL_DEV_BUS is not set # CONFIG_DRIVER_SERIAL_ARM_DCC is not set CONFIG_DRIVER_SERIAL_NS16550=y CONFIG_DRIVER_SERIAL_NS16550_OMAP_EXTENSIONS=y @@ -436,6 +437,7 @@ CONFIG_DRIVER_NET_CPSW=y # # CONFIG_AR8327N_PHY is not set # CONFIG_AT803X_PHY is not set +# CONFIG_DAVICOM_PHY is not set # CONFIG_LXT_PHY is not set # CONFIG_MARVELL_PHY is not set # CONFIG_MICREL_PHY is not set @@ -587,6 +589,7 @@ CONFIG_LED_GPIO_OF=y # CONFIG_LED_GPIO_RGB is not set # CONFIG_LED_GPIO_BICOLOR is not set CONFIG_LED_TRIGGERS=y +# CONFIG_LED_PCA955X is not set # # EEPROM support @@ -649,6 +652,15 @@ CONFIG_BUS_OMAP_GPMC=y # Filesystem support # CONFIG_FS=y +CONFIG_FS_LEGACY=y + +# +# Some selected filesystems still use the legacy FS API. +# + +# +# Consider updating them. +# CONFIG_FS_AUTOMOUNT=y # CONFIG_FS_CRAMFS is not set CONFIG_FS_EXT4=y @@ -732,3 +744,13 @@ CONFIG_DIGEST_HMAC_GENERIC=y # CONFIG_DIGEST_SHA256_ARM is not set CONFIG_CRYPTO_RSA=y CONFIG_CRYPTO_KEYSTORE=y + +# +# Firmware files +# +CONFIG_EXTRA_FIRMWARE_DIR="firmware" + +# +# Host Tools +# +# CONFIG_COMPILE_HOST_TOOLS is not set diff --git a/configs/platform-v7a/barebox-mx6.config b/configs/platform-v7a/barebox-mx6.config index 980b97b..536cbfe 100644 --- a/configs/platform-v7a/barebox-mx6.config +++ b/configs/platform-v7a/barebox-mx6.config @@ -1,6 +1,6 @@ # # Automatically generated file; DO NOT EDIT. -# Barebox/arm 2018.05.0-20180515-1 Configuration +# Barebox/arm 2018.11.0-20181122-1 Configuration # CONFIG_ARM=y CONFIG_ARM_LINUX=y @@ -94,13 +94,17 @@ CONFIG_MACH_UDOO_NEO=y # CONFIG_MACH_VARISCITE_MX6 is not set # CONFIG_MACH_GW_VENTANA is not set # CONFIG_MACH_CM_FX6 is not set +# CONFIG_MACH_ADVANTECH_ROM_742X is not set # CONFIG_MACH_WARP7 is not set # CONFIG_MACH_VF610_TWR is not set +# CONFIG_MACH_ZII_RDU1 is not set # CONFIG_MACH_ZII_RDU2 is not set # CONFIG_MACH_ZII_VF610_DEV is not set +# CONFIG_MACH_ZII_IMX7D_RPU2 is not set # CONFIG_MACH_PHYTEC_PHYCORE_IMX7 is not set # CONFIG_MACH_FREESCALE_MX7_SABRESD is not set # CONFIG_MACH_NXP_IMX6ULL_EVK is not set +# CONFIG_MACH_NXP_IMX8MQ_EVK is not set # # Board specific settings @@ -111,10 +115,7 @@ CONFIG_MACH_UDOO_NEO=y # CONFIG_IMX_IIM=y CONFIG_IMX_IIM_FUSE_BLOW=y -CONFIG_IMX_OCOTP=y -# CONFIG_IMX_OCOTP_WRITE is not set # CONFIG_HABV4 is not set -# CONFIG_ARCH_IMX_USBLOADER is not set CONFIG_ARM_ASM_UNIFIED=y CONFIG_AEABI=y CONFIG_THUMB2_BAREBOX=y @@ -464,6 +465,7 @@ CONFIG_OF_BAREBOX_DRIVERS=y # # serial drivers # +# CONFIG_SERIAL_DEV_BUS is not set # CONFIG_DRIVER_SERIAL_ARM_DCC is not set CONFIG_DRIVER_SERIAL_IMX=y # CONFIG_DRIVER_SERIAL_NS16550 is not set @@ -493,6 +495,7 @@ CONFIG_DRIVER_NET_FEC_IMX=y # # CONFIG_AR8327N_PHY is not set CONFIG_AT803X_PHY=y +# CONFIG_DAVICOM_PHY is not set # CONFIG_LXT_PHY is not set # CONFIG_MARVELL_PHY is not set CONFIG_MICREL_PHY=y @@ -681,6 +684,7 @@ CONFIG_LED_GPIO_OF=y # CONFIG_LED_GPIO_RGB is not set # CONFIG_LED_GPIO_BICOLOR is not set CONFIG_LED_TRIGGERS=y +# CONFIG_LED_PCA955X is not set # # EEPROM support @@ -762,6 +766,15 @@ CONFIG_USB_NOP_XCEIV=y # Filesystem support # CONFIG_FS=y +CONFIG_FS_LEGACY=y + +# +# Some selected filesystems still use the legacy FS API. +# + +# +# Consider updating them. +# CONFIG_FS_AUTOMOUNT=y # CONFIG_FS_CRAMFS is not set CONFIG_FS_EXT4=y @@ -854,3 +867,14 @@ CONFIG_DIGEST_HMAC_GENERIC=y # CONFIG_DIGEST_SHA1_ARM is not set # CONFIG_DIGEST_SHA256_ARM is not set CONFIG_CRYPTO_KEYSTORE=y + +# +# Firmware files +# +CONFIG_EXTRA_FIRMWARE_DIR="firmware" + +# +# Host Tools +# +# CONFIG_COMPILE_HOST_TOOLS is not set +# CONFIG_ARCH_IMX_USBLOADER is not set diff --git a/configs/platform-v7a/barebox-rpi2.config b/configs/platform-v7a/barebox-rpi2.config index 74c52e9..0e2622f 100644 --- a/configs/platform-v7a/barebox-rpi2.config +++ b/configs/platform-v7a/barebox-rpi2.config @@ -1,6 +1,6 @@ # # Automatically generated file; DO NOT EDIT. -# Barebox/arm 2018.05.0-20180515-1 Configuration +# Barebox/arm 2018.11.0-20181122-1 Configuration # CONFIG_ARM=y CONFIG_ARM_LINUX=y @@ -54,6 +54,7 @@ CONFIG_MACH_RPI_COMMON=y # # CONFIG_MACH_RPI is not set CONFIG_MACH_RPI2=y +# CONFIG_MACH_RPI3 is not set CONFIG_BAREBOX_MAX_IMAGE_SIZE=0xffffffff CONFIG_AEABI=y # CONFIG_THUMB2_BAREBOX is not set @@ -369,6 +370,7 @@ CONFIG_ARM_AMBA=y # # serial drivers # +# CONFIG_SERIAL_DEV_BUS is not set # CONFIG_DRIVER_SERIAL_ARM_DCC is not set CONFIG_SERIAL_AMBA_PL011=y # CONFIG_DRIVER_SERIAL_NS16550 is not set @@ -499,6 +501,15 @@ CONFIG_REGULATOR_BCM283X=y # Filesystem support # CONFIG_FS=y +CONFIG_FS_LEGACY=y + +# +# Some selected filesystems still use the legacy FS API. +# + +# +# Consider updating them. +# CONFIG_FS_AUTOMOUNT=y # CONFIG_FS_CRAMFS is not set CONFIG_FS_EXT4=y @@ -575,3 +586,13 @@ CONFIG_DIGEST_MD5_GENERIC=y # CONFIG_DIGEST_SHA1_ARM is not set # CONFIG_DIGEST_SHA256_ARM is not set # CONFIG_CRYPTO_KEYSTORE is not set + +# +# Firmware files +# +CONFIG_EXTRA_FIRMWARE_DIR="firmware" + +# +# Host Tools +# +# CONFIG_COMPILE_HOST_TOOLS is not set diff --git a/configs/platform-v7a/barebox-vexpress.config b/configs/platform-v7a/barebox-vexpress.config index 826d222..add107b 100644 --- a/configs/platform-v7a/barebox-vexpress.config +++ b/configs/platform-v7a/barebox-vexpress.config @@ -1,6 +1,6 @@ # # Automatically generated file; DO NOT EDIT. -# Barebox/arm 2018.05.0-20180515-1 Configuration +# Barebox/arm 2018.11.0 Configuration # CONFIG_ARM=y CONFIG_ARM_LINUX=y @@ -364,6 +364,7 @@ CONFIG_ARM_AMBA=y # # serial drivers # +# CONFIG_SERIAL_DEV_BUS is not set # CONFIG_DRIVER_SERIAL_ARM_DCC is not set CONFIG_SERIAL_AMBA_PL011=y # CONFIG_DRIVER_SERIAL_NS16550 is not set @@ -389,6 +390,7 @@ CONFIG_DRIVER_NET_SMC911X=y # # CONFIG_AR8327N_PHY is not set # CONFIG_AT803X_PHY is not set +# CONFIG_DAVICOM_PHY is not set # CONFIG_LXT_PHY is not set # CONFIG_MARVELL_PHY is not set # CONFIG_MICREL_PHY is not set @@ -522,6 +524,15 @@ CONFIG_STATE_DRV=y # Filesystem support # CONFIG_FS=y +CONFIG_FS_LEGACY=y + +# +# Some selected filesystems still use the legacy FS API. +# + +# +# Consider updating them. +# CONFIG_FS_AUTOMOUNT=y # CONFIG_FS_CRAMFS is not set CONFIG_FS_EXT4=y @@ -599,3 +610,13 @@ CONFIG_DIGEST_MD5_GENERIC=y # CONFIG_DIGEST_SHA1_ARM is not set # CONFIG_DIGEST_SHA256_ARM is not set # CONFIG_CRYPTO_KEYSTORE is not set + +# +# Firmware files +# +CONFIG_EXTRA_FIRMWARE_DIR="firmware" + +# +# Host Tools +# +# CONFIG_COMPILE_HOST_TOOLS is not set diff --git a/configs/platform-v7a/patches/barebox-2018.05.0/0001-beaglebone-add-state-entry-for-mmc0-and-mmc1.patch b/configs/platform-v7a/patches/barebox-2018.05.0/0001-beaglebone-add-state-entry-for-mmc0-and-mmc1.patch deleted file mode 100644 index cfca106..0000000 --- a/configs/platform-v7a/patches/barebox-2018.05.0/0001-beaglebone-add-state-entry-for-mmc0-and-mmc1.patch +++ /dev/null @@ -1,35 +0,0 @@ -From: Michael Grzeschik <m.grzeschik@pengutronix.de> -Date: Fri, 10 Jun 2016 14:02:30 +0200 -Subject: [PATCH] beaglebone: add state entry for mmc0 and mmc1 - -Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de> ---- - arch/arm/dts/am335x-bone-common.dtsi | 15 +++++++++++++++ - 1 file changed, 15 insertions(+) - -diff --git a/arch/arm/dts/am335x-bone-common.dtsi b/arch/arm/dts/am335x-bone-common.dtsi -index 0413724e0ca1..6e58714516fd 100644 ---- a/arch/arm/dts/am335x-bone-common.dtsi -+++ b/arch/arm/dts/am335x-bone-common.dtsi -@@ -11,6 +11,21 @@ - linux,stdout-path = &uart0; - }; - -+ bootstate: bootstate { -+ compatible = "barebox,bootstate"; -+ backend-type = "nv"; -+ -+ system0 { -+ default_attempts = <3>; -+ boot = "mmc0"; -+ }; -+ -+ system1 { -+ default_attempts = <3>; -+ boot = "mmc1"; -+ }; -+ }; -+ - cpus { - cpu@0 { - cpu0-supply = <&dcdc2_reg>; diff --git a/configs/platform-v7a/patches/barebox-2018.05.0/0201-Release-pengutronix-multi_v7-20180515-1.patch b/configs/platform-v7a/patches/barebox-2018.05.0/0201-Release-pengutronix-multi_v7-20180515-1.patch deleted file mode 100644 index 4b0c22d..0000000 --- a/configs/platform-v7a/patches/barebox-2018.05.0/0201-Release-pengutronix-multi_v7-20180515-1.patch +++ /dev/null @@ -1,22 +0,0 @@ -From: Roland Hieber <r.hieber@pengutronix.de> -Date: Tue, 15 May 2018 23:44:48 +0200 -Subject: [PATCH] Release pengutronix/multi_v7/20180515-1 - -Signed-off-by: Roland Hieber <r.hieber@pengutronix.de> ---- - Makefile | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/Makefile b/Makefile -index 88c19917394f..11e79cc339f4 100644 ---- a/Makefile -+++ b/Makefile -@@ -1,7 +1,7 @@ - VERSION = 2018 - PATCHLEVEL = 05 - SUBLEVEL = 0 --EXTRAVERSION = -+EXTRAVERSION =-20180515-1 - NAME = None - - # *DOCUMENTATION* diff --git a/configs/platform-v7a/patches/barebox-2018.05.0/series b/configs/platform-v7a/patches/barebox-2018.05.0/series deleted file mode 100644 index 272791c..0000000 --- a/configs/platform-v7a/patches/barebox-2018.05.0/series +++ /dev/null @@ -1,15 +0,0 @@ -# umpf-base: v2018.05.0 -# umpf-name: pengutronix/multi_v7 -# umpf-version: pengutronix/multi_v7/20180515-1 -# umpf-topic: v2018.05.0/customers/pengutronix/beaglebone -# umpf-hashinfo: d1f50bff60c7069caad2df4ef02f672be456f141 -# umpf-topic-range: cd4320e3e86bd2ab7b4a19016ef8df6c5d69a5a5..d1f50bff60c7069caad2df4ef02f672be456f141 -0001-beaglebone-add-state-entry-for-mmc0-and-mmc1.patch -# umpf-topic: v2018.05.0/customers/pengutronix/udoo-neo -# umpf-hashinfo: 772e5039c9a147256a085c76a74cf5cb5c14ec35 -# umpf-topic-range: d1f50bff60c7069caad2df4ef02f672be456f141..183d8e8d0ccf827481923b3872144e2c10ef9fac -0101-ARM-imx-add-support-for-Udoo-Neo-full.patch -# umpf-release: pengutronix/multi_v7/20180515-1 -# umpf-topic-range: 183d8e8d0ccf827481923b3872144e2c10ef9fac..734e18abc455f563837dd6ad0df6fb9378053b00 -0201-Release-pengutronix-multi_v7-20180515-1.patch -# umpf-end diff --git a/configs/platform-v7a/patches/barebox-2018.11.0/0001-ARM-import-opcode-helpers-from-Linux-kernel.patch b/configs/platform-v7a/patches/barebox-2018.11.0/0001-ARM-import-opcode-helpers-from-Linux-kernel.patch new file mode 100644 index 0000000..bd459d0 --- /dev/null +++ b/configs/platform-v7a/patches/barebox-2018.11.0/0001-ARM-import-opcode-helpers-from-Linux-kernel.patch @@ -0,0 +1,299 @@ +From: Lucas Stach <l.stach@pengutronix.de> +Date: Thu, 1 Nov 2018 10:18:37 +0100 +Subject: [PATCH] ARM: import opcode helpers from Linux kernel + +Those are needed to generate some of the ARM SEC and VIRT +opcodes in a portable way. + +Signed-off-by: Lucas Stach <l.stach@pengutronix.de> +Tested-by: Roland Hieber <r.hieber@pengutronix.de> +Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> +--- + arch/arm/include/asm/opcodes-virt.h | 39 +++++ + arch/arm/include/asm/opcodes.h | 231 ++++++++++++++++++++++++++++ + 2 files changed, 270 insertions(+) + create mode 100644 arch/arm/include/asm/opcodes-virt.h + create mode 100644 arch/arm/include/asm/opcodes.h + +diff --git a/arch/arm/include/asm/opcodes-virt.h b/arch/arm/include/asm/opcodes-virt.h +new file mode 100644 +index 000000000000..efcfdf92d9d5 +--- /dev/null ++++ b/arch/arm/include/asm/opcodes-virt.h +@@ -0,0 +1,39 @@ ++/* ++ * opcodes-virt.h: Opcode definitions for the ARM virtualization extensions ++ * Copyright (C) 2012 Linaro Limited ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License along ++ * with this program; if not, write to the Free Software Foundation, Inc., ++ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ++ */ ++#ifndef __ASM_ARM_OPCODES_VIRT_H ++#define __ASM_ARM_OPCODES_VIRT_H ++ ++#include <asm/opcodes.h> ++ ++#define __HVC(imm16) __inst_arm_thumb32( \ ++ 0xE1400070 | (((imm16) & 0xFFF0) << 4) | ((imm16) & 0x000F), \ ++ 0xF7E08000 | (((imm16) & 0xF000) << 4) | ((imm16) & 0x0FFF) \ ++) ++ ++#define __ERET __inst_arm_thumb32( \ ++ 0xE160006E, \ ++ 0xF3DE8F00 \ ++) ++ ++#define __MSR_ELR_HYP(regnum) __inst_arm_thumb32( \ ++ 0xE12EF300 | regnum, \ ++ 0xF3808E30 | (regnum << 16) \ ++) ++ ++#endif /* ! __ASM_ARM_OPCODES_VIRT_H */ +diff --git a/arch/arm/include/asm/opcodes.h b/arch/arm/include/asm/opcodes.h +new file mode 100644 +index 000000000000..a78bf5d2c518 +--- /dev/null ++++ b/arch/arm/include/asm/opcodes.h +@@ -0,0 +1,231 @@ ++/* ++ * arch/arm/include/asm/opcodes.h ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License version 2 as ++ * published by the Free Software Foundation. ++ */ ++ ++#ifndef __ASM_ARM_OPCODES_H ++#define __ASM_ARM_OPCODES_H ++ ++#ifndef __ASSEMBLY__ ++#include <linux/linkage.h> ++extern asmlinkage unsigned int arm_check_condition(u32 opcode, u32 psr); ++#endif ++ ++#define ARM_OPCODE_CONDTEST_FAIL 0 ++#define ARM_OPCODE_CONDTEST_PASS 1 ++#define ARM_OPCODE_CONDTEST_UNCOND 2 ++ ++ ++/* ++ * Assembler opcode byteswap helpers. ++ * These are only intended for use by this header: don't use them directly, ++ * because they will be suboptimal in most cases. ++ */ ++#define ___asm_opcode_swab32(x) ( \ ++ (((x) << 24) & 0xFF000000) \ ++ | (((x) << 8) & 0x00FF0000) \ ++ | (((x) >> 8) & 0x0000FF00) \ ++ | (((x) >> 24) & 0x000000FF) \ ++) ++#define ___asm_opcode_swab16(x) ( \ ++ (((x) << 8) & 0xFF00) \ ++ | (((x) >> 8) & 0x00FF) \ ++) ++#define ___asm_opcode_swahb32(x) ( \ ++ (((x) << 8) & 0xFF00FF00) \ ++ | (((x) >> 8) & 0x00FF00FF) \ ++) ++#define ___asm_opcode_swahw32(x) ( \ ++ (((x) << 16) & 0xFFFF0000) \ ++ | (((x) >> 16) & 0x0000FFFF) \ ++) ++#define ___asm_opcode_identity32(x) ((x) & 0xFFFFFFFF) ++#define ___asm_opcode_identity16(x) ((x) & 0xFFFF) ++ ++ ++/* ++ * Opcode byteswap helpers ++ * ++ * These macros help with converting instructions between a canonical integer ++ * format and in-memory representation, in an endianness-agnostic manner. ++ * ++ * __mem_to_opcode_*() convert from in-memory representation to canonical form. ++ * __opcode_to_mem_*() convert from canonical form to in-memory representation. ++ * ++ * ++ * Canonical instruction representation: ++ * ++ * ARM: 0xKKLLMMNN ++ * Thumb 16-bit: 0x0000KKLL, where KK < 0xE8 ++ * Thumb 32-bit: 0xKKLLMMNN, where KK >= 0xE8 ++ * ++ * There is no way to distinguish an ARM instruction in canonical representation ++ * from a Thumb instruction (just as these cannot be distinguished in memory). ++ * Where this distinction is important, it needs to be tracked separately. ++ * ++ * Note that values in the range 0x0000E800..0xE7FFFFFF intentionally do not ++ * represent any valid Thumb-2 instruction. For this range, ++ * __opcode_is_thumb32() and __opcode_is_thumb16() will both be false. ++ * ++ * The ___asm variants are intended only for use by this header, in situations ++ * involving inline assembler. For .S files, the normal __opcode_*() macros ++ * should do the right thing. ++ */ ++#ifdef __ASSEMBLY__ ++ ++#define ___opcode_swab32(x) ___asm_opcode_swab32(x) ++#define ___opcode_swab16(x) ___asm_opcode_swab16(x) ++#define ___opcode_swahb32(x) ___asm_opcode_swahb32(x) ++#define ___opcode_swahw32(x) ___asm_opcode_swahw32(x) ++#define ___opcode_identity32(x) ___asm_opcode_identity32(x) ++#define ___opcode_identity16(x) ___asm_opcode_identity16(x) ++ ++#else /* ! __ASSEMBLY__ */ ++ ++#include <linux/types.h> ++#include <linux/swab.h> ++ ++#define ___opcode_swab32(x) swab32(x) ++#define ___opcode_swab16(x) swab16(x) ++#define ___opcode_swahb32(x) swahb32(x) ++#define ___opcode_swahw32(x) swahw32(x) ++#define ___opcode_identity32(x) ((u32)(x)) ++#define ___opcode_identity16(x) ((u16)(x)) ++ ++#endif /* ! __ASSEMBLY__ */ ++ ++ ++#ifdef CONFIG_CPU_ENDIAN_BE8 ++ ++#define __opcode_to_mem_arm(x) ___opcode_swab32(x) ++#define __opcode_to_mem_thumb16(x) ___opcode_swab16(x) ++#define __opcode_to_mem_thumb32(x) ___opcode_swahb32(x) ++#define ___asm_opcode_to_mem_arm(x) ___asm_opcode_swab32(x) ++#define ___asm_opcode_to_mem_thumb16(x) ___asm_opcode_swab16(x) ++#define ___asm_opcode_to_mem_thumb32(x) ___asm_opcode_swahb32(x) ++ ++#else /* ! CONFIG_CPU_ENDIAN_BE8 */ ++ ++#define __opcode_to_mem_arm(x) ___opcode_identity32(x) ++#define __opcode_to_mem_thumb16(x) ___opcode_identity16(x) ++#define ___asm_opcode_to_mem_arm(x) ___asm_opcode_identity32(x) ++#define ___asm_opcode_to_mem_thumb16(x) ___asm_opcode_identity16(x) ++#ifndef CONFIG_CPU_ENDIAN_BE32 ++/* ++ * On BE32 systems, using 32-bit accesses to store Thumb instructions will not ++ * work in all cases, due to alignment constraints. For now, a correct ++ * version is not provided for BE32. ++ */ ++#define __opcode_to_mem_thumb32(x) ___opcode_swahw32(x) ++#define ___asm_opcode_to_mem_thumb32(x) ___asm_opcode_swahw32(x) ++#endif ++ ++#endif /* ! CONFIG_CPU_ENDIAN_BE8 */ ++ ++#define __mem_to_opcode_arm(x) __opcode_to_mem_arm(x) ++#define __mem_to_opcode_thumb16(x) __opcode_to_mem_thumb16(x) ++#ifndef CONFIG_CPU_ENDIAN_BE32 ++#define __mem_to_opcode_thumb32(x) __opcode_to_mem_thumb32(x) ++#endif ++ ++/* Operations specific to Thumb opcodes */ ++ ++/* Instruction size checks: */ ++#define __opcode_is_thumb32(x) ( \ ++ ((x) & 0xF8000000) == 0xE8000000 \ ++ || ((x) & 0xF0000000) == 0xF0000000 \ ++) ++#define __opcode_is_thumb16(x) ( \ ++ ((x) & 0xFFFF0000) == 0 \ ++ && !(((x) & 0xF800) == 0xE800 || ((x) & 0xF000) == 0xF000) \ ++) ++ ++/* Operations to construct or split 32-bit Thumb instructions: */ ++#define __opcode_thumb32_first(x) (___opcode_identity16((x) >> 16)) ++#define __opcode_thumb32_second(x) (___opcode_identity16(x)) ++#define __opcode_thumb32_compose(first, second) ( \ ++ (___opcode_identity32(___opcode_identity16(first)) << 16) \ ++ | ___opcode_identity32(___opcode_identity16(second)) \ ++) ++#define ___asm_opcode_thumb32_first(x) (___asm_opcode_identity16((x) >> 16)) ++#define ___asm_opcode_thumb32_second(x) (___asm_opcode_identity16(x)) ++#define ___asm_opcode_thumb32_compose(first, second) ( \ ++ (___asm_opcode_identity32(___asm_opcode_identity16(first)) << 16) \ ++ | ___asm_opcode_identity32(___asm_opcode_identity16(second)) \ ++) ++ ++/* ++ * Opcode injection helpers ++ * ++ * In rare cases it is necessary to assemble an opcode which the ++ * assembler does not support directly, or which would normally be ++ * rejected because of the CFLAGS or AFLAGS used to build the affected ++ * file. ++ * ++ * Before using these macros, consider carefully whether it is feasible ++ * instead to change the build flags for your file, or whether it really ++ * makes sense to support old assembler versions when building that ++ * particular kernel feature. ++ * ++ * The macros defined here should only be used where there is no viable ++ * alternative. ++ * ++ * ++ * __inst_arm(x): emit the specified ARM opcode ++ * __inst_thumb16(x): emit the specified 16-bit Thumb opcode ++ * __inst_thumb32(x): emit the specified 32-bit Thumb opcode ++ * ++ * __inst_arm_thumb16(arm, thumb): emit either the specified arm or ++ * 16-bit Thumb opcode, depending on whether an ARM or Thumb-2 ++ * kernel is being built ++ * ++ * __inst_arm_thumb32(arm, thumb): emit either the specified arm or ++ * 32-bit Thumb opcode, depending on whether an ARM or Thumb-2 ++ * kernel is being built ++ * ++ * ++ * Note that using these macros directly is poor practice. Instead, you ++ * should use them to define human-readable wrapper macros to encode the ++ * instructions that you care about. In code which might run on ARMv7 or ++ * above, you can usually use the __inst_arm_thumb{16,32} macros to ++ * specify the ARM and Thumb alternatives at the same time. This ensures ++ * that the correct opcode gets emitted depending on the instruction set ++ * used for the kernel build. ++ * ++ * Look at opcodes-virt.h for an example of how to use these macros. ++ */ ++#include <linux/stringify.h> ++ ++#define __inst_arm(x) ___inst_arm(___asm_opcode_to_mem_arm(x)) ++#define __inst_thumb32(x) ___inst_thumb32( \ ++ ___asm_opcode_to_mem_thumb16(___asm_opcode_thumb32_first(x)), \ ++ ___asm_opcode_to_mem_thumb16(___asm_opcode_thumb32_second(x)) \ ++) ++#define __inst_thumb16(x) ___inst_thumb16(___asm_opcode_to_mem_thumb16(x)) ++ ++#ifdef CONFIG_THUMB2_BAREBOX ++#define __inst_arm_thumb16(arm_opcode, thumb_opcode) \ ++ __inst_thumb16(thumb_opcode) ++#define __inst_arm_thumb32(arm_opcode, thumb_opcode) \ ++ __inst_thumb32(thumb_opcode) ++#else ++#define __inst_arm_thumb16(arm_opcode, thumb_opcode) __inst_arm(arm_opcode) ++#define __inst_arm_thumb32(arm_opcode, thumb_opcode) __inst_arm(arm_opcode) ++#endif ++ ++/* Helpers for the helpers. Don't use these directly. */ ++#ifdef __ASSEMBLY__ ++#define ___inst_arm(x) .long x ++#define ___inst_thumb16(x) .short x ++#define ___inst_thumb32(first, second) .short first, second ++#else ++#define ___inst_arm(x) ".long " __stringify(x) "\n\t" ++#define ___inst_thumb16(x) ".short " __stringify(x) "\n\t" ++#define ___inst_thumb32(first, second) \ ++ ".short " __stringify(first) ", " __stringify(second) "\n\t" ++#endif ++ ++#endif /* __ASM_ARM_OPCODES_H */ diff --git a/configs/platform-v7a/patches/barebox-2018.11.0/0002-ARM-safely-switch-from-HYP-to-SVC-mode-if-required.patch b/configs/platform-v7a/patches/barebox-2018.11.0/0002-ARM-safely-switch-from-HYP-to-SVC-mode-if-required.patch new file mode 100644 index 0000000..fcd116a --- /dev/null +++ b/configs/platform-v7a/patches/barebox-2018.11.0/0002-ARM-safely-switch-from-HYP-to-SVC-mode-if-required.patch @@ -0,0 +1,88 @@ +From: Lucas Stach <l.stach@pengutronix.de> +Date: Thu, 1 Nov 2018 10:18:38 +0100 +Subject: [PATCH] ARM: safely switch from HYP to SVC mode if required + +This is a port of the Linux safe_svcmode_maskall macro to +the Barebox lowlevel init. + +Signed-off-by: Lucas Stach <l.stach@pengutronix.de> +Tested-by: Roland Hieber <r.hieber@pengutronix.de> +Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> +--- + arch/arm/cpu/lowlevel.S | 18 +++++++++++++++--- + arch/arm/include/asm/system.h | 26 ++++++++++++++++++++++++++ + 2 files changed, 41 insertions(+), 3 deletions(-) + +diff --git a/arch/arm/cpu/lowlevel.S b/arch/arm/cpu/lowlevel.S +index 7696a198e764..43665981e48b 100644 +--- a/arch/arm/cpu/lowlevel.S ++++ b/arch/arm/cpu/lowlevel.S +@@ -1,16 +1,28 @@ + #include <linux/linkage.h> + #include <init.h> + #include <asm/system.h> ++#include <asm/opcodes-virt.h> + + .section ".text_bare_init_","ax" + ENTRY(arm_cpu_lowlevel_init) + /* save lr, since it may be banked away with a processor mode change */ + mov r2, lr ++ + /* set the cpu to SVC32 mode, mask irq and fiq */ + mrs r12, cpsr +- bic r12, r12, #0x1f +- orr r12, r12, #0xd3 +- msr cpsr, r12 ++ eor r12, r12, #HYP_MODE ++ tst r12, #MODE_MASK ++ bic r12, r12, #MODE_MASK ++ orr r12, r12, #(PSR_I_BIT | PSR_F_BIT | SVC_MODE) ++THUMB( orr r12, r12, #PSR_T_BIT ) ++ bne 1f ++ orr r12, r12, #PSR_A_BIT ++ adr lr, 2f ++ msr spsr_cxsf, r12 ++ __MSR_ELR_HYP(14) ++ __ERET ++1: msr cpsr_c, r12 ++2: + + #if __LINUX_ARM_ARCH__ >= 6 + /* +diff --git a/arch/arm/include/asm/system.h b/arch/arm/include/asm/system.h +index 5cf828ea36cb..48242ab473f4 100644 +--- a/arch/arm/include/asm/system.h ++++ b/arch/arm/include/asm/system.h +@@ -60,6 +60,32 @@ + #define CR_AFE (1 << 29) /* Access flag enable */ + #define CR_TE (1 << 30) /* Thumb exception enable */ + ++/* ++ * PSR bits ++ */ ++#define USR_MODE 0x00000010 ++#define FIQ_MODE 0x00000011 ++#define IRQ_MODE 0x00000012 ++#define SVC_MODE 0x00000013 ++#define ABT_MODE 0x00000017 ++#define HYP_MODE 0x0000001a ++#define UND_MODE 0x0000001b ++#define SYSTEM_MODE 0x0000001f ++#define MODE32_BIT 0x00000010 ++#define MODE_MASK 0x0000001f ++ ++#define PSR_T_BIT 0x00000020 ++#define PSR_F_BIT 0x00000040 ++#define PSR_I_BIT 0x00000080 ++#define PSR_A_BIT 0x00000100 ++#define PSR_E_BIT 0x00000200 ++#define PSR_J_BIT 0x01000000 ++#define PSR_Q_BIT 0x08000000 ++#define PSR_V_BIT 0x10000000 ++#define PSR_C_BIT 0x20000000 ++#define PSR_Z_BIT 0x40000000 ++#define PSR_N_BIT 0x80000000 ++ + #ifndef __ASSEMBLY__ + #if __LINUX_ARM_ARCH__ >= 7 + static inline unsigned int current_el(void) diff --git a/configs/platform-v7a/patches/barebox-2018.11.0/0003-ARM-allow-secure-monitor-code-to-be-built-without-PS.patch b/configs/platform-v7a/patches/barebox-2018.11.0/0003-ARM-allow-secure-monitor-code-to-be-built-without-PS.patch new file mode 100644 index 0000000..eed9e52 --- /dev/null +++ b/configs/platform-v7a/patches/barebox-2018.11.0/0003-ARM-allow-secure-monitor-code-to-be-built-without-PS.patch @@ -0,0 +1,37 @@ +From: Lucas Stach <l.stach@pengutronix.de> +Date: Thu, 1 Nov 2018 10:18:39 +0100 +Subject: [PATCH] ARM: allow secure monitor code to be built without PSCI + +The hyp mode handling added in the secure monitor code is also useful +when Barebox doesn't have PSCI control. Allow to build without PSCI. + +Signed-off-by: Lucas Stach <l.stach@pengutronix.de> +Tested-by: Roland Hieber <r.hieber@pengutronix.de> +Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> +--- + arch/arm/cpu/sm_as.S | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/arch/arm/cpu/sm_as.S b/arch/arm/cpu/sm_as.S +index 09580e75de5f..0d01e1bf2435 100644 +--- a/arch/arm/cpu/sm_as.S ++++ b/arch/arm/cpu/sm_as.S +@@ -129,7 +129,9 @@ secure_monitor: + sub sp, sp, #4*4 @ allocate result structure on stack + mov r12, sp + push {r4-r6, r12} ++#ifdef CONFIG_ARM_PSCI + bl psci_entry ++#endif + pop {r4-r6, r12} + ldm r12, {r0-r3} + add sp, sp, #4*4 +@@ -163,6 +165,8 @@ ENTRY(psci_cpu_entry) + mcr p15, 0, r0, c1, c0, 1 @ ACTLR + + bl secure_monitor_stack_setup ++#ifdef CONFIG_ARM_PSCI + bl psci_cpu_entry_c ++#endif + + ENDPROC(psci_cpu_entry) diff --git a/configs/platform-v7a/patches/barebox-2018.11.0/0004-ARM-add-file-for-HYP-mode-related-setup.patch b/configs/platform-v7a/patches/barebox-2018.11.0/0004-ARM-add-file-for-HYP-mode-related-setup.patch new file mode 100644 index 0000000..8047922 --- /dev/null +++ b/configs/platform-v7a/patches/barebox-2018.11.0/0004-ARM-add-file-for-HYP-mode-related-setup.patch @@ -0,0 +1,193 @@ +From: Lucas Stach <l.stach@pengutronix.de> +Date: Thu, 1 Nov 2018 10:18:40 +0100 +Subject: [PATCH] ARM: add file for HYP mode related setup + +This adds routines to add hyp mode vectors and switch back to HYP +mode from SVC. This is needed in both the PBL and Barebox proper. + +Signed-off-by: Lucas Stach <l.stach@pengutronix.de> +Tested-by: Roland Hieber <r.hieber@pengutronix.de> +Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> +--- + arch/arm/cpu/Makefile | 3 + + arch/arm/cpu/hyp.S | 116 ++++++++++++++++++++++++++++++++++ + arch/arm/cpu/sm_as.S | 11 ---- + arch/arm/include/asm/secure.h | 3 + + 4 files changed, 122 insertions(+), 11 deletions(-) + create mode 100644 arch/arm/cpu/hyp.S + +diff --git a/arch/arm/cpu/Makefile b/arch/arm/cpu/Makefile +index 874d723e2cee..0a403bc981c5 100644 +--- a/arch/arm/cpu/Makefile ++++ b/arch/arm/cpu/Makefile +@@ -4,6 +4,9 @@ obj-$(CONFIG_ARM_EXCEPTIONS) += exceptions$(S64).o interrupts$(S64).o + obj-$(CONFIG_MMU) += mmu$(S64).o + lwl-y += lowlevel$(S64).o + obj-pbl-$(CONFIG_MMU) += mmu-early$(S64).o ++obj-pbl-$(CONFIG_CPU_32v7) += hyp.o ++AFLAGS_hyp.o :=-Wa,-march=armv7-a -Wa,-mcpu=all ++AFLAGS_pbl-hyp.o :=-Wa,-march=armv7-a -Wa,-mcpu=all + + obj-y += start.o entry.o + +diff --git a/arch/arm/cpu/hyp.S b/arch/arm/cpu/hyp.S +new file mode 100644 +index 000000000000..1314b56eab25 +--- /dev/null ++++ b/arch/arm/cpu/hyp.S +@@ -0,0 +1,116 @@ ++#include <linux/linkage.h> ++#include <asm/system.h> ++#include <asm/opcodes-virt.h> ++#include <init.h> ++ ++.arch_extension sec ++.arch_extension virt ++ ++__BARE_INIT ++ ++.data ++ .align 2 ++ENTRY(__boot_cpu_mode) ++ .long 0 ++.text ++ ++ENTRY(__hyp_install) ++ mrs r12, cpsr ++ and r12, r12, #MODE_MASK ++ ++ @ Save the initial CPU state ++ adr r0, .L__boot_cpu_mode_offset ++ ldr r1, [r0] ++ str r12, [r0, r1] ++ ++ cmp r12, #HYP_MODE ++ movne pc, lr @ give up if the CPU is not in HYP mode ++ ++ @ Now install the hypervisor stub: ++ adr r12, __hyp_vectors ++ mcr p15, 4, r12, c12, c0, 0 @ set hypervisor vector base (HVBAR) ++ ++ @ Disable all traps, so we don't get any nasty surprise ++ mov r12, #0 ++ mcr p15, 4, r12, c1, c1, 0 @ HCR ++ mcr p15, 4, r12, c1, c1, 2 @ HCPTR ++ mcr p15, 4, r12, c1, c1, 3 @ HSTR ++ ++THUMB( orr r12, #(1 << 30) ) @ HSCTLR.TE ++ mcr p15, 4, r12, c1, c0, 0 @ HSCTLR ++ ++ mrc p15, 4, r12, c1, c1, 1 @ HDCR ++ and r12, #0x1f @ Preserve HPMN ++ mcr p15, 4, r12, c1, c1, 1 @ HDCR ++ ++ @ Make sure NS-SVC is initialised appropriately ++ mrc p15, 0, r12, c1, c0, 0 @ SCTLR ++ orr r12, #(1 << 5) @ CP15 barriers enabled ++ bic r12, #(3 << 7) @ Clear SED/ITD for v8 (RES0 for v7) ++ bic r12, #(3 << 19) @ WXN and UWXN disabled ++ mcr p15, 0, r12, c1, c0, 0 @ SCTLR ++ ++ mrc p15, 0, r12, c0, c0, 0 @ MIDR ++ mcr p15, 4, r12, c0, c0, 0 @ VPIDR ++ ++ mrc p15, 0, r12, c0, c0, 5 @ MPIDR ++ mcr p15, 4, r12, c0, c0, 5 @ VMPIDR ++ bx lr ++ENDPROC(__hyp_install) ++ ++ENTRY(armv7_hyp_install) ++ mov r2, lr ++ ++ bl __hyp_install ++ ++ /* set the cpu to SVC32 mode, mask irq and fiq */ ++ mrs r12, cpsr ++ eor r12, r12, #HYP_MODE ++ tst r12, #MODE_MASK ++ bic r12, r12, #MODE_MASK ++ orr r12, r12, #(PSR_I_BIT | PSR_F_BIT | SVC_MODE) ++THUMB( orr r12, r12, #PSR_T_BIT ) ++ bne 1f ++ orr r12, r12, #PSR_A_BIT ++ adr lr, 2f ++ msr spsr_cxsf, r12 ++ __MSR_ELR_HYP(14) ++ __ERET ++1: msr cpsr_c, r12 ++2: ++ mov pc, r2 ++ENDPROC(armv7_hyp_install) ++ ++ENTRY(armv7_switch_to_hyp) ++ mov r0, lr ++ mov r1, sp @ save SVC copy of LR and SP ++ isb ++ hvc #0 @ for older asm: .byte 0x70, 0x00, 0x40, 0xe1 ++ mov sp, r1 ++ mov lr, r0 @ restore SVC copy of LR and SP ++ ++ bx lr ++ENDPROC(armv7_switch_to_hyp) ++ ++.align 2 ++.L__boot_cpu_mode_offset: ++ .long __boot_cpu_mode - . ++ ++/* The HYP trap is crafted to match armv7_switch_to_hyp() */ ++__hyp_do_trap: ++ mov lr, r0 ++ mov sp, r1 ++ bx lr ++ENDPROC(__hyp_do_trap) ++ ++.align 5 ++__hyp_vectors: ++__hyp_reset: W(b) . ++__hyp_und: W(b) . ++__hyp_svc: W(b) . ++__hyp_pabort: W(b) . ++__hyp_dabort: W(b) . ++__hyp_trap: W(b) __hyp_do_trap ++__hyp_irq: W(b) . ++__hyp_fiq: W(b) . ++ENDPROC(__hyp_vectors) +diff --git a/arch/arm/cpu/sm_as.S b/arch/arm/cpu/sm_as.S +index 0d01e1bf2435..de6cd0406f4f 100644 +--- a/arch/arm/cpu/sm_as.S ++++ b/arch/arm/cpu/sm_as.S +@@ -148,17 +148,6 @@ hyp_trap: + mov pc, lr @ do no switch modes, but + @ return to caller + +-ENTRY(armv7_switch_to_hyp) +- mov r0, lr +- mov r1, sp @ save SVC copy of LR and SP +- isb +- hvc #0 @ for older asm: .byte 0x70, 0x00, 0x40, 0xe1 +- mov sp, r1 +- mov lr, r0 @ restore SVC copy of LR and SP +- +- bx lr +-ENDPROC(armv7_switch_to_hyp) +- + ENTRY(psci_cpu_entry) + mrc p15, 0, r0, c1, c0, 1 @ ACTLR + orr r0, r0, #(1 << 6) @ Set SMP bit +diff --git a/arch/arm/include/asm/secure.h b/arch/arm/include/asm/secure.h +index a4cb1f6c1c44..663d81ea27dd 100644 +--- a/arch/arm/include/asm/secure.h ++++ b/arch/arm/include/asm/secure.h +@@ -5,9 +5,12 @@ + + int armv7_secure_monitor_install(void); + int __armv7_secure_monitor_install(void); ++ + void armv7_switch_to_hyp(void); ++void armv7_hyp_install(void); + + extern unsigned char secure_monitor_init_vectors[]; ++extern int __boot_cpu_mode; + + enum arm_security_state { + ARM_STATE_SECURE, diff --git a/configs/platform-v7a/patches/barebox-2018.11.0/0005-ARM-don-t-try-to-install-secure-monitor-when-entered.patch b/configs/platform-v7a/patches/barebox-2018.11.0/0005-ARM-don-t-try-to-install-secure-monitor-when-entered.patch new file mode 100644 index 0000000..b82de4b --- /dev/null +++ b/configs/platform-v7a/patches/barebox-2018.11.0/0005-ARM-don-t-try-to-install-secure-monitor-when-entered.patch @@ -0,0 +1,30 @@ +From: Lucas Stach <l.stach@pengutronix.de> +Date: Thu, 1 Nov 2018 10:18:41 +0100 +Subject: [PATCH] ARM: don't try to install secure monitor when entered in HYP + mode + +When Barebox has been entered in HYP mode, the CPU is already switched +to the non-secure world and it's not possible for Barebox to install +it's own secure monitor. + +Signed-off-by: Lucas Stach <l.stach@pengutronix.de> +Tested-by: Roland Hieber <r.hieber@pengutronix.de> +Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> +--- + arch/arm/cpu/sm.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/arch/arm/cpu/sm.c b/arch/arm/cpu/sm.c +index cb0bac106b5f..1246d8e3a441 100644 +--- a/arch/arm/cpu/sm.c ++++ b/arch/arm/cpu/sm.c +@@ -184,6 +184,9 @@ int armv7_secure_monitor_install(void) + return -EINVAL; + } + ++ if (__boot_cpu_mode == HYP_MODE) ++ return 0; ++ + mmuon = get_cr() & CR_M; + + vbar = get_vbar(); diff --git a/configs/platform-v7a/patches/barebox-2018.11.0/0006-ARM-default-to-starting-kernel-in-HYP-mode-when-ente.patch b/configs/platform-v7a/patches/barebox-2018.11.0/0006-ARM-default-to-starting-kernel-in-HYP-mode-when-ente.patch new file mode 100644 index 0000000..1de95c1 --- /dev/null +++ b/configs/platform-v7a/patches/barebox-2018.11.0/0006-ARM-default-to-starting-kernel-in-HYP-mode-when-ente.patch @@ -0,0 +1,31 @@ +From: Lucas Stach <l.stach@pengutronix.de> +Date: Thu, 1 Nov 2018 10:18:42 +0100 +Subject: [PATCH] ARM: default to starting kernel in HYP mode when entered in + HYP + +When Barebox has been entered in HYP mode, there is a high chance that +the kernel is intended to be started in HYP mode also. Get this +default into place. + +Signed-off-by: Lucas Stach <l.stach@pengutronix.de> +Tested-by: Roland Hieber <r.hieber@pengutronix.de> +Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> +--- + arch/arm/cpu/sm.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/arch/arm/cpu/sm.c b/arch/arm/cpu/sm.c +index 1246d8e3a441..6fad30adabc9 100644 +--- a/arch/arm/cpu/sm.c ++++ b/arch/arm/cpu/sm.c +@@ -262,6 +262,9 @@ static int sm_init(void) + bootm_secure_state_names, + ARRAY_SIZE(bootm_secure_state_names)); + ++ if (__boot_cpu_mode == HYP_MODE) ++ bootm_secure_state = ARM_STATE_HYP; ++ + return 0; + } + device_initcall(sm_init); +\ No newline at end of file diff --git a/configs/platform-v7a/patches/barebox-2018.11.0/0007-ARM-install-HYP-vectors-at-PBL-and-Barebox-entry.patch b/configs/platform-v7a/patches/barebox-2018.11.0/0007-ARM-install-HYP-vectors-at-PBL-and-Barebox-entry.patch new file mode 100644 index 0000000..10615e9 --- /dev/null +++ b/configs/platform-v7a/patches/barebox-2018.11.0/0007-ARM-install-HYP-vectors-at-PBL-and-Barebox-entry.patch @@ -0,0 +1,105 @@ +From: Lucas Stach <l.stach@pengutronix.de> +Date: Thu, 1 Nov 2018 10:18:43 +0100 +Subject: [PATCH] ARM: install HYP vectors at PBL and Barebox entry + +If the CPU was already in HYP mode when entering the PBL, install a +simple trap handler to allow to get back from SVC to HYP before +switching to HYP mode. + +As the vectors are part of the currently running binary, we need to +do the same setup when starting the real Barebox binary, as the PBL +setup vectors might get overwritten. To do this we trap into HYP mode +just before jumping to Barebox and then re-do the vector setup and +SVC switch as the first thing in Barebox proper. + +Signed-off-by: Lucas Stach <l.stach@pengutronix.de> +Tested-by: Roland Hieber <r.hieber@pengutronix.de> +Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> +--- + arch/arm/cpu/lowlevel.S | 5 +++++ + arch/arm/cpu/start-pbl.c | 4 ++++ + arch/arm/cpu/start.c | 5 +++++ + arch/arm/cpu/uncompress.c | 4 ++++ + 4 files changed, 18 insertions(+) + +diff --git a/arch/arm/cpu/lowlevel.S b/arch/arm/cpu/lowlevel.S +index 43665981e48b..3b52644e43e1 100644 +--- a/arch/arm/cpu/lowlevel.S ++++ b/arch/arm/cpu/lowlevel.S +@@ -8,6 +8,11 @@ ENTRY(arm_cpu_lowlevel_init) + /* save lr, since it may be banked away with a processor mode change */ + mov r2, lr + ++#ifdef CONFIG_CPU_32v7 ++ /* careful: the hyp install corrupts r0 and r1 */ ++ bl __hyp_install ++#endif ++ + /* set the cpu to SVC32 mode, mask irq and fiq */ + mrs r12, cpsr + eor r12, r12, #HYP_MODE +diff --git a/arch/arm/cpu/start-pbl.c b/arch/arm/cpu/start-pbl.c +index 16159d7f9d51..48a808645671 100644 +--- a/arch/arm/cpu/start-pbl.c ++++ b/arch/arm/cpu/start-pbl.c +@@ -26,6 +26,7 @@ + #include <asm/barebox-arm-head.h> + #include <asm-generic/memory_layout.h> + #include <asm/sections.h> ++#include <asm/secure.h> + #include <asm/cache.h> + #include <asm/mmu.h> + #include <asm/unaligned.h> +@@ -98,5 +99,8 @@ __noreturn void barebox_single_pbl_start(unsigned long membase, + else + barebox = (void *)barebox_base; + ++ if (IS_ENABLED(CONFIG_CPU_V7) && __boot_cpu_mode == HYP_MODE) ++ armv7_switch_to_hyp(); ++ + barebox(membase, memsize, boarddata); + } +diff --git a/arch/arm/cpu/start.c b/arch/arm/cpu/start.c +index 64bd942ad764..a79d64eaa6e6 100644 +--- a/arch/arm/cpu/start.c ++++ b/arch/arm/cpu/start.c +@@ -24,6 +24,7 @@ + #include <asm/barebox-arm-head.h> + #include <asm-generic/memory_layout.h> + #include <asm/sections.h> ++#include <asm/secure.h> + #include <asm/unaligned.h> + #include <asm/cache.h> + #include <asm/mmu.h> +@@ -147,6 +148,10 @@ __noreturn void barebox_non_pbl_start(unsigned long membase, + unsigned long barebox_base = arm_mem_barebox_image(membase, + endmem, + barebox_size); ++ ++ if (IS_ENABLED(CONFIG_CPU_V7)) ++ armv7_hyp_install(); ++ + if (IS_ENABLED(CONFIG_RELOCATABLE)) + relocate_to_adr(barebox_base); + +diff --git a/arch/arm/cpu/uncompress.c b/arch/arm/cpu/uncompress.c +index 43b49b42120b..048bca0c9599 100644 +--- a/arch/arm/cpu/uncompress.c ++++ b/arch/arm/cpu/uncompress.c +@@ -27,6 +27,7 @@ + #include <asm/barebox-arm-head.h> + #include <asm-generic/memory_layout.h> + #include <asm/sections.h> ++#include <asm/secure.h> + #include <asm/cache.h> + #include <asm/mmu.h> + #include <asm/unaligned.h> +@@ -105,5 +106,8 @@ void __noreturn barebox_multi_pbl_start(unsigned long membase, + + pr_debug("jumping to uncompressed image at 0x%p\n", barebox); + ++ if (IS_ENABLED(CONFIG_CPU_V7) && __boot_cpu_mode == HYP_MODE) ++ armv7_switch_to_hyp(); ++ + barebox(membase, memsize, boarddata); + } diff --git a/configs/platform-v7a/patches/barebox-2018.11.0/0008-ARM-rpi-add-revision-IDs-for-Pi-3-Model-B-and-Pi-Zer.patch b/configs/platform-v7a/patches/barebox-2018.11.0/0008-ARM-rpi-add-revision-IDs-for-Pi-3-Model-B-and-Pi-Zer.patch new file mode 100644 index 0000000..9aa90b5 --- /dev/null +++ b/configs/platform-v7a/patches/barebox-2018.11.0/0008-ARM-rpi-add-revision-IDs-for-Pi-3-Model-B-and-Pi-Zer.patch @@ -0,0 +1,41 @@ +From: Enrico Joerns <ejo@pengutronix.de> +Date: Thu, 1 Nov 2018 10:18:44 +0100 +Subject: [PATCH] ARM: rpi: add revision IDs for Pi 3 Model B and Pi Zero + +Signed-off-by: Enrico Joerns <ejo@pengutronix.de> +Signed-off-by: Lucas Stach <l.stach@pengutronix.de> +Tested-by: Roland Hieber <r.hieber@pengutronix.de> +Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> +--- + arch/arm/boards/raspberry-pi/rpi-common.c | 2 ++ + arch/arm/mach-bcm283x/include/mach/mbox.h | 4 ++++ + 2 files changed, 6 insertions(+) + +diff --git a/arch/arm/boards/raspberry-pi/rpi-common.c b/arch/arm/boards/raspberry-pi/rpi-common.c +index 6e375bc984de..3baed6525586 100644 +--- a/arch/arm/boards/raspberry-pi/rpi-common.c ++++ b/arch/arm/boards/raspberry-pi/rpi-common.c +@@ -174,6 +174,8 @@ const struct rpi_model rpi_models_old_scheme[] = { + const struct rpi_model rpi_models_new_scheme[] = { + RPI_MODEL(0, "Unknown model", NULL), + RPI_MODEL(BCM2836_BOARD_REV_2_B, "2 Model B", rpi_b_plus_init), ++ RPI_MODEL(BCM2837_BOARD_REV_3_B, "3 Model B", rpi_b_plus_init), ++ RPI_MODEL(BCM2835_BOARD_REV_ZERO, "Zero", rpi_b_plus_init), + }; + + static int rpi_board_rev = 0; +diff --git a/arch/arm/mach-bcm283x/include/mach/mbox.h b/arch/arm/mach-bcm283x/include/mach/mbox.h +index 2b5aea88ee0a..0d1ac074e328 100644 +--- a/arch/arm/mach-bcm283x/include/mach/mbox.h ++++ b/arch/arm/mach-bcm283x/include/mach/mbox.h +@@ -129,6 +129,10 @@ struct bcm2835_mbox_tag_hdr { + + /* RPi 2 */ + #define BCM2836_BOARD_REV_2_B 0x4 ++/* RPi 3 */ ++#define BCM2837_BOARD_REV_3_B 0x8 ++/* Zero */ ++#define BCM2835_BOARD_REV_ZERO 0x9 + + /* + * 0x2..0xf from: diff --git a/configs/platform-v7a/patches/barebox-2018.11.0/0009-ARM-rpi-add-raspberry-pi-3-support.patch b/configs/platform-v7a/patches/barebox-2018.11.0/0009-ARM-rpi-add-raspberry-pi-3-support.patch new file mode 100644 index 0000000..8e8d76a --- /dev/null +++ b/configs/platform-v7a/patches/barebox-2018.11.0/0009-ARM-rpi-add-raspberry-pi-3-support.patch @@ -0,0 +1,141 @@ +From: Lucas Stach <l.stach@pengutronix.de> +Date: Thu, 1 Nov 2018 10:18:45 +0100 +Subject: [PATCH] ARM: rpi: add raspberry pi 3 support + +This adds basic support at the same feature level as the other +supported raspberry pi boards. + +Signed-off-by: Lucas Stach <l.stach@pengutronix.de> +Tested-by: Roland Hieber <r.hieber@pengutronix.de> +Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> +--- + arch/arm/boards/raspberry-pi/lowlevel.c | 14 ++++++++++++-- + arch/arm/configs/rpi_defconfig | 2 ++ + arch/arm/dts/Makefile | 1 + + arch/arm/dts/bcm2837-rpi-3.dts | 16 ++++++++++++++++ + arch/arm/mach-bcm283x/Kconfig | 6 ++++++ + arch/arm/mach-bcm283x/core.c | 1 + + images/Makefile.bcm283x | 4 ++++ + 7 files changed, 42 insertions(+), 2 deletions(-) + create mode 100644 arch/arm/dts/bcm2837-rpi-3.dts + +diff --git a/arch/arm/boards/raspberry-pi/lowlevel.c b/arch/arm/boards/raspberry-pi/lowlevel.c +index cbc6caa4b9ed..34c9350920e9 100644 +--- a/arch/arm/boards/raspberry-pi/lowlevel.c ++++ b/arch/arm/boards/raspberry-pi/lowlevel.c +@@ -1,7 +1,7 @@ ++#include <asm/barebox-arm.h> ++#include <asm/cache.h> + #include <common.h> + #include <linux/sizes.h> +-#include <asm/barebox-arm.h> +-#include <asm/barebox-arm-head.h> + #include <mach/platform.h> + + extern char __dtb_bcm2835_rpi_start[]; +@@ -23,3 +23,13 @@ ENTRY_FUNCTION(start_raspberry_pi2, r0, r1, r2) + + barebox_arm_entry(BCM2835_SDRAM_BASE, SZ_512M, fdt); + } ++ ++extern char __dtb_bcm2837_rpi_3_start[]; ++ENTRY_FUNCTION(start_raspberry_pi3, r0, r1, r2) ++{ ++ void *fdt = __dtb_bcm2837_rpi_3_start + get_runtime_offset(); ++ ++ arm_cpu_lowlevel_init(); ++ ++ barebox_arm_entry(BCM2835_SDRAM_BASE, SZ_512M, fdt); ++} +diff --git a/arch/arm/configs/rpi_defconfig b/arch/arm/configs/rpi_defconfig +index f3aef4290425..cd88b4ac751c 100644 +--- a/arch/arm/configs/rpi_defconfig ++++ b/arch/arm/configs/rpi_defconfig +@@ -1,9 +1,11 @@ + CONFIG_ARCH_BCM283X=y + CONFIG_MACH_RPI=y + CONFIG_MACH_RPI2=y ++CONFIG_MACH_RPI3=y + CONFIG_AEABI=y + CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y + CONFIG_ARM_UNWIND=y ++CONFIG_IMAGE_COMPRESSION_NONE=y + CONFIG_MMU=y + CONFIG_MALLOC_TLSF=y + CONFIG_KALLSYMS=y +diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile +index 1caeca35b484..4e063902c635 100644 +--- a/arch/arm/dts/Makefile ++++ b/arch/arm/dts/Makefile +@@ -71,6 +71,7 @@ pbl-dtb-$(CONFIG_MACH_PHYTEC_SOM_RK3288) += rk3288-phycore-som.dtb.o + pbl-dtb-$(CONFIG_MACH_REALQ7) += imx6q-dmo-edmqmx6.dtb.o + pbl-dtb-$(CONFIG_MACH_RPI) += bcm2835-rpi.dtb.o + pbl-dtb-$(CONFIG_MACH_RPI2) += bcm2836-rpi-2.dtb.o ++pbl-dtb-$(CONFIG_MACH_RPI3) += bcm2837-rpi-3.dtb.o + pbl-dtb-$(CONFIG_MACH_SABRELITE) += imx6q-sabrelite.dtb.o imx6dl-sabrelite.dtb.o + pbl-dtb-$(CONFIG_MACH_SABRESD) += imx6q-sabresd.dtb.o + pbl-dtb-$(CONFIG_MACH_FREESCALE_IMX6SX_SABRESDB) += imx6sx-sdb.dtb.o +diff --git a/arch/arm/dts/bcm2837-rpi-3.dts b/arch/arm/dts/bcm2837-rpi-3.dts +new file mode 100644 +index 000000000000..d6ffc369122c +--- /dev/null ++++ b/arch/arm/dts/bcm2837-rpi-3.dts +@@ -0,0 +1,16 @@ ++#include <arm64/broadcom/bcm2837-rpi-3-b.dts> ++ ++/ { ++ chosen { ++ stdout-path = &uart0; ++ }; ++ ++ memory { ++ reg = <0x0 0x0>; ++ }; ++}; ++ ++&uart0 { ++ status = "okay"; ++ /delete-node/ bluetooth; ++}; +diff --git a/arch/arm/mach-bcm283x/Kconfig b/arch/arm/mach-bcm283x/Kconfig +index 1457f114ccaa..af2f88c47acb 100644 +--- a/arch/arm/mach-bcm283x/Kconfig ++++ b/arch/arm/mach-bcm283x/Kconfig +@@ -19,6 +19,12 @@ config MACH_RPI2 + select CPU_V7 + select MACH_RPI_COMMON + ++config MACH_RPI3 ++ bool "RaspberryPi 3 (BCM2837/CORTEX-A53)" ++ select CPU_V7 ++ select MACH_RPI_COMMON ++ select ARM_SECURE_MONITOR ++ + endmenu + + config MACH_RPI_DEBUG_UART_BASE +diff --git a/arch/arm/mach-bcm283x/core.c b/arch/arm/mach-bcm283x/core.c +index fddcb0d1a1d4..26f0996b1cb8 100644 +--- a/arch/arm/mach-bcm283x/core.c ++++ b/arch/arm/mach-bcm283x/core.c +@@ -41,6 +41,7 @@ static int bcm2835_clk_init(void) + clk = clk_fixed("uart0-pl0110", 3 * 1000 * 1000); + clk_register_clkdev(clk, NULL, "uart0-pl0110"); + clk_register_clkdev(clk, NULL, "20201000.serial"); ++ clk_register_clkdev(clk, NULL, "3f201000.serial"); + + clk = clk_fixed("bcm2835-cs", 1 * 1000 * 1000); + clk_register_clkdev(clk, NULL, "bcm2835-cs"); +diff --git a/images/Makefile.bcm283x b/images/Makefile.bcm283x +index d59ef043f05c..d14e648926ac 100644 +--- a/images/Makefile.bcm283x ++++ b/images/Makefile.bcm283x +@@ -9,3 +9,7 @@ image-$(CONFIG_MACH_RPI) += barebox-raspberry-pi-1.img + pblx-$(CONFIG_MACH_RPI2) += start_raspberry_pi2 + FILE_barebox-raspberry-pi-2.img = start_raspberry_pi2.pblx + image-$(CONFIG_MACH_RPI2) += barebox-raspberry-pi-2.img ++ ++pblx-$(CONFIG_MACH_RPI3) += start_raspberry_pi3 ++FILE_barebox-raspberry-pi-3.img = start_raspberry_pi3.pblx ++image-$(CONFIG_MACH_RPI3) += barebox-raspberry-pi-3.img +\ No newline at end of file diff --git a/configs/platform-v7a/patches/barebox-2018.11.0/0010-ARM-rpi-autosize-malloc-area.patch b/configs/platform-v7a/patches/barebox-2018.11.0/0010-ARM-rpi-autosize-malloc-area.patch new file mode 100644 index 0000000..da498ba --- /dev/null +++ b/configs/platform-v7a/patches/barebox-2018.11.0/0010-ARM-rpi-autosize-malloc-area.patch @@ -0,0 +1,25 @@ +From: Lucas Stach <l.stach@pengutronix.de> +Date: Thu, 1 Nov 2018 10:18:46 +0100 +Subject: [PATCH] ARM: rpi: autosize malloc area + +Autosize the malloc area according to the available RAM size. + +Signed-off-by: Lucas Stach <l.stach@pengutronix.de> +Tested-by: Roland Hieber <r.hieber@pengutronix.de> +Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> +--- + arch/arm/configs/rpi_defconfig | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/arch/arm/configs/rpi_defconfig b/arch/arm/configs/rpi_defconfig +index cd88b4ac751c..2bb615849324 100644 +--- a/arch/arm/configs/rpi_defconfig ++++ b/arch/arm/configs/rpi_defconfig +@@ -7,6 +7,7 @@ CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y + CONFIG_ARM_UNWIND=y + CONFIG_IMAGE_COMPRESSION_NONE=y + CONFIG_MMU=y ++CONFIG_MALLOC_SIZE=0x0 + CONFIG_MALLOC_TLSF=y + CONFIG_KALLSYMS=y + CONFIG_PROMPT="R-Pi> " diff --git a/configs/platform-v7a/patches/barebox-2018.05.0/0101-ARM-imx-add-support-for-Udoo-Neo-full.patch b/configs/platform-v7a/patches/barebox-2018.11.0/0101-ARM-imx-add-support-for-Udoo-Neo-full.patch similarity index 93% rename from configs/platform-v7a/patches/barebox-2018.05.0/0101-ARM-imx-add-support-for-Udoo-Neo-full.patch rename to configs/platform-v7a/patches/barebox-2018.11.0/0101-ARM-imx-add-support-for-Udoo-Neo-full.patch index 06c356b..9f99a39 100644 --- a/configs/platform-v7a/patches/barebox-2018.05.0/0101-ARM-imx-add-support-for-Udoo-Neo-full.patch +++ b/configs/platform-v7a/patches/barebox-2018.11.0/0101-ARM-imx-add-support-for-Udoo-Neo-full.patch @@ -26,10 +26,10 @@ Forwarded: id:20170627190317.19253-1-uwe@kleine-koenig.org create mode 100644 arch/arm/dts/imx6sx-udoo-neo-full.dts diff --git a/arch/arm/boards/Makefile b/arch/arm/boards/Makefile -index 30f4c299f1a1..f70fbac8f379 100644 +index c737cf34138c..9aee9bf0993a 100644 --- a/arch/arm/boards/Makefile +++ b/arch/arm/boards/Makefile -@@ -135,6 +135,7 @@ obj-$(CONFIG_MACH_TX51) += karo-tx51/ +@@ -137,6 +137,7 @@ obj-$(CONFIG_MACH_TX51) += karo-tx51/ obj-$(CONFIG_MACH_TX53) += karo-tx53/ obj-$(CONFIG_MACH_TX6X) += karo-tx6x/ obj-$(CONFIG_MACH_UDOO) += udoo/ @@ -254,10 +254,10 @@ index 000000000000..e78c2685fd78 + imx6sx_barebox_entry(fdt); +} diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile -index e60e0ea0c6be..b87e27c8c263 100644 +index 4e063902c635..3d34a78f7878 100644 --- a/arch/arm/dts/Makefile +++ b/arch/arm/dts/Makefile -@@ -93,6 +93,7 @@ pbl-dtb-$(CONFIG_MACH_TX6X) += imx6dl-tx6u.dtb.o +@@ -97,6 +97,7 @@ pbl-dtb-$(CONFIG_MACH_TX6X) += imx6dl-tx6u.dtb.o pbl-dtb-$(CONFIG_MACH_TX6X) += imx6q-tx6q.dtb.o pbl-dtb-$(CONFIG_MACH_TURRIS_OMNIA) += armada-385-turris-omnia-bb.dtb.o pbl-dtb-$(CONFIG_MACH_UDOO) += imx6q-udoo.dtb.o @@ -276,10 +276,10 @@ index 000000000000..9203d40207c5 +/{ +}; diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig -index 9052a94ea071..9ec95bb6df09 100644 +index 63a92bd5bd1d..ab515ecf2286 100644 --- a/arch/arm/mach-imx/Kconfig +++ b/arch/arm/mach-imx/Kconfig -@@ -377,6 +377,10 @@ config MACH_UDOO +@@ -380,6 +380,10 @@ config MACH_UDOO bool "Freescale i.MX6 UDOO Board" select ARCH_IMX6 @@ -291,22 +291,22 @@ index 9052a94ea071..9ec95bb6df09 100644 bool "Variscite i.MX6 Quad SOM" select ARCH_IMX6 diff --git a/arch/arm/mach-imx/include/mach/esdctl.h b/arch/arm/mach-imx/include/mach/esdctl.h -index 66dcc8974cfb..bd6092febca4 100644 +index bc6c7339535e..18c4a2836007 100644 --- a/arch/arm/mach-imx/include/mach/esdctl.h +++ b/arch/arm/mach-imx/include/mach/esdctl.h -@@ -137,6 +137,7 @@ void __noreturn imx51_barebox_entry(void *boarddata); - void __noreturn imx53_barebox_entry(void *boarddata); - void __noreturn imx6q_barebox_entry(void *boarddata); - void __noreturn imx6ul_barebox_entry(void *boarddata); +@@ -141,6 +141,7 @@ void __noreturn imx6ul_barebox_entry(void *boarddata); + void __noreturn vf610_barebox_entry(void *boarddata); + void __noreturn imx8mq_barebox_entry(void *boarddata); + void __noreturn imx7d_barebox_entry(void *boarddata); +#define imx6sx_barebox_entry(boarddata) imx6ul_barebox_entry(boarddata) void imx_esdctl_disable(void); #endif diff --git a/images/Makefile.imx b/images/Makefile.imx -index 90da95d4d025..6420490811f9 100644 +index 341ce8506d88..c32f78b7e184 100644 --- a/images/Makefile.imx +++ b/images/Makefile.imx -@@ -275,6 +275,11 @@ CFG_start_imx6q_sabresd.pblx.imximg = $(board)/freescale-mx6-sabresd/flash-heade +@@ -271,6 +271,11 @@ CFG_start_imx6q_sabresd.pblx.imximg = $(board)/freescale-mx6-sabresd/flash-heade FILE_barebox-freescale-imx6q-sabresd.img = start_imx6q_sabresd.pblx.imximg image-$(CONFIG_MACH_SABRESD) += barebox-freescale-imx6q-sabresd.img diff --git a/configs/platform-v7a/patches/barebox-2018.11.0/0201-Release-pengutronix_multiv7-20181122-1.patch b/configs/platform-v7a/patches/barebox-2018.11.0/0201-Release-pengutronix_multiv7-20181122-1.patch new file mode 100644 index 0000000..bd444f0 --- /dev/null +++ b/configs/platform-v7a/patches/barebox-2018.11.0/0201-Release-pengutronix_multiv7-20181122-1.patch @@ -0,0 +1,22 @@ +From: Rouven Czerwinski <r.czerwinski@pengutronix.de> +Date: Thu, 22 Nov 2018 12:09:22 +0100 +Subject: [PATCH] Release pengutronix_multiv7/20181122-1 + +Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de> +--- + Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile b/Makefile +index 60a5d5ce11f4..b55ca4b03129 100644 +--- a/Makefile ++++ b/Makefile +@@ -1,7 +1,7 @@ + VERSION = 2018 + PATCHLEVEL = 11 + SUBLEVEL = 0 +-EXTRAVERSION = ++EXTRAVERSION =-20181122-1 + NAME = None + + # *DOCUMENTATION* diff --git a/configs/platform-v7a/patches/barebox-2018.11.0/series b/configs/platform-v7a/patches/barebox-2018.11.0/series new file mode 100644 index 0000000..e056b0c --- /dev/null +++ b/configs/platform-v7a/patches/barebox-2018.11.0/series @@ -0,0 +1,24 @@ +# umpf-base: v2018.11.0 +# umpf-name: pengutronix_multiv7 +# umpf-version: pengutronix_multiv7/20181122-1 +# umpf-topic: v2018.11.0/customers/pengutronix/rpi3 +# umpf-hashinfo: 1bdd9ef32c272ba5501e24ba643107855dd5149c +# umpf-topic-range: d1f223eddbcde31ba2a3f34fc0a1a14f40ea7130..1bdd9ef32c272ba5501e24ba643107855dd5149c +0001-ARM-import-opcode-helpers-from-Linux-kernel.patch +0002-ARM-safely-switch-from-HYP-to-SVC-mode-if-required.patch +0003-ARM-allow-secure-monitor-code-to-be-built-without-PS.patch +0004-ARM-add-file-for-HYP-mode-related-setup.patch +0005-ARM-don-t-try-to-install-secure-monitor-when-entered.patch +0006-ARM-default-to-starting-kernel-in-HYP-mode-when-ente.patch +0007-ARM-install-HYP-vectors-at-PBL-and-Barebox-entry.patch +0008-ARM-rpi-add-revision-IDs-for-Pi-3-Model-B-and-Pi-Zer.patch +0009-ARM-rpi-add-raspberry-pi-3-support.patch +0010-ARM-rpi-autosize-malloc-area.patch +# umpf-topic: v2018.11.0/customers/pengutronix/udoo-neo +# umpf-hashinfo: c5f2e150d7e8d5439458df1a2cab71b25fc36e19 +# umpf-topic-range: 1bdd9ef32c272ba5501e24ba643107855dd5149c..8cacc208f8f6c9071113b12a618a54d7e80b1694 +0101-ARM-imx-add-support-for-Udoo-Neo-full.patch +# umpf-release: pengutronix_multiv7/20181122-1 +# umpf-topic-range: 8cacc208f8f6c9071113b12a618a54d7e80b1694..45c64f6b4690a6b51be1c487de1ffec6472704e1 +0201-Release-pengutronix_multiv7-20181122-1.patch +# umpf-end diff --git a/configs/platform-v7a/platformconfig b/configs/platform-v7a/platformconfig index cdea840..e2c8ac1 100644 --- a/configs/platform-v7a/platformconfig +++ b/configs/platform-v7a/platformconfig @@ -166,6 +166,8 @@ PTXCONF_BAREBOX_AM335X=y PTXCONF_BAREBOX_MX6=y PTXCONF_BAREBOX_RPI2=y PTXCONF_BAREBOX_RPI2_NEEDS_HOST_LZOP=y +PTXCONF_BAREBOX_RPI3=y +# PTXCONF_BAREBOX_RPI3_NEEDS_HOST_LZOP is not set PTXCONF_BAREBOX_VEXPRESS=y PTXCONF_BAREBOX_ARCH_STRING="arm" # PTXCONF_BAREBOX is not set diff --git a/configs/platform-v7a/rules/barebox-am335x-mlo.make b/configs/platform-v7a/rules/barebox-am335x-mlo.make index e71d057..6835d35 100644 --- a/configs/platform-v7a/rules/barebox-am335x-mlo.make +++ b/configs/platform-v7a/rules/barebox-am335x-mlo.make @@ -16,8 +16,8 @@ PACKAGES-$(PTXCONF_BAREBOX_AM335X_MLO) += barebox-am335x-mlo # # Paths and names # -BAREBOX_AM335X_MLO_VERSION := 2018.05.0 -BAREBOX_AM335X_MLO_MD5 := 8286a8ea2cdd88104e5c6762d93d81db +BAREBOX_AM335X_MLO_VERSION := 2018.11.0 +BAREBOX_AM335X_MLO_MD5 := 1472eae302647d1cf7f1c561a6380b43 BAREBOX_AM335X_MLO := barebox-$(BAREBOX_AM335X_MLO_VERSION) BAREBOX_AM335X_MLO_SUFFIX := tar.bz2 BAREBOX_AM335X_MLO_DIR := $(BUILDDIR)/barebox-am335x-mlo-$(BAREBOX_AM335X_MLO_VERSION) diff --git a/configs/platform-v7a/rules/barebox-am335x.make b/configs/platform-v7a/rules/barebox-am335x.make index 2c35ae1..8b3c2a0 100644 --- a/configs/platform-v7a/rules/barebox-am335x.make +++ b/configs/platform-v7a/rules/barebox-am335x.make @@ -16,8 +16,8 @@ PACKAGES-$(PTXCONF_BAREBOX_AM335X) += barebox-am335x # # Paths and names # -BAREBOX_AM335X_VERSION := 2018.05.0 -BAREBOX_AM335X_MD5 := 8286a8ea2cdd88104e5c6762d93d81db +BAREBOX_AM335X_VERSION := 2018.11.0 +BAREBOX_AM335X_MD5 := 1472eae302647d1cf7f1c561a6380b43 BAREBOX_AM335X := barebox-$(BAREBOX_AM335X_VERSION) BAREBOX_AM335X_SUFFIX := tar.bz2 BAREBOX_AM335X_DIR := $(BUILDDIR)/barebox-am335x-$(BAREBOX_AM335X_VERSION) diff --git a/configs/platform-v7a/rules/barebox-mx6.make b/configs/platform-v7a/rules/barebox-mx6.make index 7d7c2ce..3b86ea0 100644 --- a/configs/platform-v7a/rules/barebox-mx6.make +++ b/configs/platform-v7a/rules/barebox-mx6.make @@ -16,8 +16,8 @@ PACKAGES-$(PTXCONF_BAREBOX_MX6) += barebox-mx6 # # Paths and names # -BAREBOX_MX6_VERSION := 2018.05.0 -BAREBOX_MX6_MD5 := 8286a8ea2cdd88104e5c6762d93d81db +BAREBOX_MX6_VERSION := 2018.11.0 +BAREBOX_MX6_MD5 := 1472eae302647d1cf7f1c561a6380b43 BAREBOX_MX6 := barebox-$(BAREBOX_MX6_VERSION) BAREBOX_MX6_SUFFIX := tar.bz2 BAREBOX_MX6_DIR := $(BUILDDIR)/barebox-mx6-$(BAREBOX_MX6_VERSION) diff --git a/configs/platform-v7a/rules/barebox-rpi2.make b/configs/platform-v7a/rules/barebox-rpi2.make index cf9fc00..41990a0 100644 --- a/configs/platform-v7a/rules/barebox-rpi2.make +++ b/configs/platform-v7a/rules/barebox-rpi2.make @@ -16,8 +16,8 @@ PACKAGES-$(PTXCONF_BAREBOX_RPI2) += barebox-rpi2 # # Paths and names # -BAREBOX_RPI2_VERSION := 2018.05.0 -BAREBOX_RPI2_MD5 := 8286a8ea2cdd88104e5c6762d93d81db +BAREBOX_RPI2_VERSION := 2018.11.0 +BAREBOX_RPI2_MD5 := 1472eae302647d1cf7f1c561a6380b43 BAREBOX_RPI2 := barebox-$(BAREBOX_RPI2_VERSION) BAREBOX_RPI2_SUFFIX := tar.bz2 BAREBOX_RPI2_DIR := $(BUILDDIR)/barebox-rpi2-$(BAREBOX_RPI2_VERSION) diff --git a/configs/platform-v7a/rules/barebox-vexpress.make b/configs/platform-v7a/rules/barebox-vexpress.make index 0266cbe..f69b6c5 100644 --- a/configs/platform-v7a/rules/barebox-vexpress.make +++ b/configs/platform-v7a/rules/barebox-vexpress.make @@ -16,8 +16,8 @@ PACKAGES-$(PTXCONF_BAREBOX_VEXPRESS) += barebox-vexpress # # Paths and names # -BAREBOX_VEXPRESS_VERSION := 2018.05.0 -BAREBOX_VEXPRESS_MD5 := 8286a8ea2cdd88104e5c6762d93d81db +BAREBOX_VEXPRESS_VERSION := 2018.11.0 +BAREBOX_VEXPRESS_MD5 := 1472eae302647d1cf7f1c561a6380b43 BAREBOX_VEXPRESS := barebox-$(BAREBOX_VEXPRESS_VERSION) BAREBOX_VEXPRESS_SUFFIX := tar.bz2 BAREBOX_VEXPRESS_DIR := $(BUILDDIR)/barebox-vexpress-$(BAREBOX_VEXPRESS_VERSION) -- 2.19.2 _______________________________________________ DistroKit mailing list DistroKit@pengutronix.de ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [DistroKit] [PATCH v2] plaform-v7a: barebox v2018.05.0 → v2018.11.0 2018-12-06 14:39 ` [DistroKit] [PATCH v2] " Rouven Czerwinski @ 2018-12-06 21:04 ` Alexander Dahl 2018-12-07 13:16 ` Roland Hieber 0 siblings, 1 reply; 7+ messages in thread From: Alexander Dahl @ 2018-12-06 21:04 UTC (permalink / raw) To: Rouven Czerwinski; +Cc: distrokit [-- Attachment #1.1: Type: text/plain, Size: 776 bytes --] Hei hei, On Thu, Dec 06, 2018 at 03:39:32PM +0100, Rouven Czerwinski wrote: > We also add the patch series for the rpi3 to barebox, they can be dropped > in the next release. > Raspberry Pi 3 support is enabled in the patch series which also adds the rpi3 > images. I'm curious: what is the reason not to wait for the upcoming (?) barebox v2018.12.0? Is that delayed? Judging from the release dates of previous releases I would expect it in the next week or so. Greets Alex -- /"\ ASCII RIBBON | »With the first link, the chain is forged. The first \ / CAMPAIGN | speech censured, the first thought forbidden, the X AGAINST | first freedom denied, chains us all irrevocably.« / \ HTML MAIL | (Jean-Luc Picard, quoting Judge Aaron Satie) [-- Attachment #1.2: signature.asc --] [-- Type: application/pgp-signature, Size: 833 bytes --] [-- Attachment #2: Type: text/plain, Size: 95 bytes --] _______________________________________________ DistroKit mailing list DistroKit@pengutronix.de ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [DistroKit] [PATCH v2] plaform-v7a: barebox v2018.05.0 → v2018.11.0 2018-12-06 21:04 ` Alexander Dahl @ 2018-12-07 13:16 ` Roland Hieber 2018-12-10 8:56 ` Robert Schwebel 0 siblings, 1 reply; 7+ messages in thread From: Roland Hieber @ 2018-12-07 13:16 UTC (permalink / raw) To: Rouven Czerwinski, distrokit On Thu, Dec 06, 2018 at 10:04:42PM +0100, Alexander Dahl wrote: > Hei hei, > > On Thu, Dec 06, 2018 at 03:39:32PM +0100, Rouven Czerwinski wrote: > > We also add the patch series for the rpi3 to barebox, they can be dropped > > in the next release. > > Raspberry Pi 3 support is enabled in the patch series which also adds the rpi3 > > images. > > I'm curious: what is the reason not to wait for the upcoming (?) > barebox v2018.12.0? Is that delayed? Judging from the release dates of > previous releases I would expect it in the next week or so. Fresh off the press :) https://www.barebox.org/download/barebox-2018.12.0.tar.bz2 - Roland _______________________________________________ DistroKit mailing list DistroKit@pengutronix.de ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [DistroKit] [PATCH v2] plaform-v7a: barebox v2018.05.0 → v2018.11.0 2018-12-07 13:16 ` Roland Hieber @ 2018-12-10 8:56 ` Robert Schwebel 0 siblings, 0 replies; 7+ messages in thread From: Robert Schwebel @ 2018-12-10 8:56 UTC (permalink / raw) To: distrokit On Fri, Dec 07, 2018 at 02:16:16PM +0100, Roland Hieber wrote: > On Thu, Dec 06, 2018 at 10:04:42PM +0100, Alexander Dahl wrote: > > Hei hei, > > > > On Thu, Dec 06, 2018 at 03:39:32PM +0100, Rouven Czerwinski wrote: > > > We also add the patch series for the rpi3 to barebox, they can be dropped > > > in the next release. > > > Raspberry Pi 3 support is enabled in the patch series which also adds the rpi3 > > > images. > > > > I'm curious: what is the reason not to wait for the upcoming (?) > > barebox v2018.12.0? Is that delayed? Judging from the release dates of > > previous releases I would expect it in the next week or so. > > Fresh off the press :) > https://www.barebox.org/download/barebox-2018.12.0.tar.bz2 And already merged, thanks, Rouven. rsc -- Pengutronix e.K. | Dipl.-Ing. Robert Schwebel | Industrial Linux Solutions | https://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ DistroKit mailing list DistroKit@pengutronix.de ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2018-12-10 8:56 UTC | newest] Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2018-12-05 7:55 [DistroKit] [PATCH] plaform-v7a: barebox v2018.05.0 → v2018.11.0 Rouven Czerwinski 2018-12-05 13:15 ` Roland Hieber 2018-12-05 13:20 ` Rouven Czerwinski 2018-12-06 14:39 ` [DistroKit] [PATCH v2] " Rouven Czerwinski 2018-12-06 21:04 ` Alexander Dahl 2018-12-07 13:16 ` Roland Hieber 2018-12-10 8:56 ` Robert Schwebel
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox