From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Mon, 05 Sep 2022 18:36:37 +0200 Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by lore.white.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1oVF5P-007i25-4t for lore@lore.pengutronix.de; Mon, 05 Sep 2022 18:36:37 +0200 Received: from localhost ([127.0.0.1] helo=metis.ext.pengutronix.de) by metis.ext.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1oVF5H-0002IW-Gq; Mon, 05 Sep 2022 18:36:27 +0200 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oVF59-00024E-I6; Mon, 05 Sep 2022 18:36:19 +0200 Received: from [2a0a:edc0:0:1101:1d::39] (helo=dude03.red.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1oVF56-0045zt-Qf; Mon, 05 Sep 2022 18:36:18 +0200 Received: from mtr by dude03.red.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1oVF56-00BmRR-DM; Mon, 05 Sep 2022 18:36:16 +0200 From: Michael Tretter To: distrokit@pengutronix.de Date: Mon, 5 Sep 2022 18:36:10 +0200 Message-Id: <20220905163615.2807729-16-m.tretter@pengutronix.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220905163615.2807729-1-m.tretter@pengutronix.de> References: <20220905163615.2807729-1-m.tretter@pengutronix.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [DistroKit] [PATCH 15/20] v8a: rockchip: add new barebox-rockchip rule X-BeenThere: distrokit@pengutronix.de X-Mailman-Version: 2.1.29 Precedence: list List-Id: DistroKit Mailinglist List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mtr@pengutronix.de, jzi@pengutronix.de Sender: "DistroKit" X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: distrokit-bounces@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false From: Johannes Zink Add a new barebox-rockchip rule that builds a binary capable of booting on the Radxa ROCK 3A SBC. Signed-off-by: Johannes Zink Signed-off-by: Michael Tretter --- configs/platform-v8a/barebox-rockchip.config | 920 ++++++++++++++++++ configs/platform-v8a/platformconfig | 4 + .../platforms/barebox-rockchip.in | 14 + .../platform-v8a/rules/barebox-rockchip.make | 163 ++++ 4 files changed, 1101 insertions(+) create mode 100644 configs/platform-v8a/barebox-rockchip.config create mode 100644 configs/platform-v8a/platforms/barebox-rockchip.in create mode 100644 configs/platform-v8a/rules/barebox-rockchip.make diff --git a/configs/platform-v8a/barebox-rockchip.config b/configs/platform-v8a/barebox-rockchip.config new file mode 100644 index 000000000000..73b4b6913132 --- /dev/null +++ b/configs/platform-v8a/barebox-rockchip.config @@ -0,0 +1,920 @@ +# +# Automatically generated file; DO NOT EDIT. +# Barebox/arm 2022.08.0 Configuration +# +CONFIG_ARM=y +CONFIG_ARM_LINUX=y +CONFIG_TEXT_BASE=0x0 + +# +# System Type +# +# CONFIG_ARCH_AT91 is not set +# CONFIG_ARCH_BCM283X is not set +# 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_IMX is not set +# CONFIG_ARCH_LAYERSCAPE is not set +# CONFIG_ARCH_MVEBU is not set +# CONFIG_ARCH_MXS is not set +# CONFIG_ARCH_NOMADIK is not set +# CONFIG_ARCH_OMAP is not set +# CONFIG_ARCH_PXA is not set +CONFIG_ARCH_ROCKCHIP=y +# 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_STM32MP 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_ZYNQMP is not set +# CONFIG_ARCH_ARM64_VIRT is not set + +# +# Processor Type +# +CONFIG_PHYS_ADDR_T_64BIT=y +CONFIG_CPU_64=y +CONFIG_CPU_V8=y +CONFIG_CPU_64v8=y + +# +# processor features +# +# CONFIG_BOOT_ENDIANNESS_SWITCH is not set +CONFIG_CPU_SUPPORTS_64BIT_KERNEL=y +CONFIG_ARCH_TEXT_BASE=0x0 + +# +# Rockchip Features +# +CONFIG_RK_TIMER=1 +CONFIG_ARCH_ROCKCHIP_V8=y +CONFIG_ARCH_RK3568=y + +# +# select Rockchip boards: +# +# CONFIG_MACH_RADXA_ROCK is not set +# CONFIG_MACH_PHYTEC_SOM_RK3288 is not set +CONFIG_MACH_RK3568_EVB=y +# CONFIG_MACH_RK3568_BPI_R2PRO is not set +# CONFIG_MACH_PINE64_QUARTZ64 is not set +CONFIG_MACH_RADXA_ROCK3=y + +# +# select board features: +# +# CONFIG_ARCH_RK3568_OPTEE is not set +# end of Rockchip Features + +# CONFIG_BOARD_ARM_GENERIC_DT is not set +# end of System Type + +CONFIG_64BIT=y + +# +# ARM specific settings +# +# CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS is not set +CONFIG_ARM_EXCEPTIONS=y +CONFIG_ARM_SMCCC=y +CONFIG_ARM_PSCI_OF=y +CONFIG_ARM_PSCI_CLIENT=y +CONFIG_ARM_ATF=y +# end of ARM specific settings + +CONFIG_GREGORIAN_CALENDER=y +CONFIG_HAS_KALLSYMS=y +CONFIG_HAS_CACHE=y +CONFIG_HAS_DMA=y +CONFIG_HAS_ARCH_SJLJ=y +CONFIG_GENERIC_GPIO=y +CONFIG_BLOCK=y +CONFIG_BLOCK_WRITE=y +CONFIG_FILETYPE=y +CONFIG_BINFMT=y +CONFIG_UIMAGE=y +CONFIG_LOGBUF=y +CONFIG_STDDEV=y +CONFIG_MENUTREE=y +CONFIG_ARCH_DMA_ADDR_T_64BIT=y +CONFIG_USBGADGET_START=y +CONFIG_BOOT=y +CONFIG_FASTBOOT_BASE=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=y +# CONFIG_IMAGE_COMPRESSION_GZIP is not set +# CONFIG_IMAGE_COMPRESSION_XZKERN is not set +# CONFIG_IMAGE_COMPRESSION_NONE is not set +CONFIG_MMU=y +CONFIG_MMU_EARLY=y +CONFIG_BAREBOX_MAX_IMAGE_SIZE=0xffffffff +CONFIG_BAREBOX_MAX_PBL_SIZE=0xffffffff +CONFIG_BAREBOX_MAX_BARE_INIT_SIZE=0xffffffff +CONFIG_STACK_SIZE=0x8000 +CONFIG_MALLOC_SIZE=0x0 +# end of memory layout + +# 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="barebox:" +CONFIG_BAUDRATE=115200 +CONFIG_CBSIZE=1024 +CONFIG_FIRMWARE=y +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 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_ELF is not set +# CONFIG_BOOTM_FITIMAGE is not set +CONFIG_BLSPEC=y +CONFIG_FLEXIBLE_BOOTARGS=y +CONFIG_MMCBLKDEV_ROOTARG=y +CONFIG_BAREBOX_UPDATE=y +CONFIG_SYSTEM_PARTITIONS=y +CONFIG_IMD=y +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=y +# CONFIG_CONSOLE_DISABLE_INPUT is not set +CONFIG_PBL_CONSOLE=y +# 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_GZIP is not set +CONFIG_DEFAULT_COMPRESSION_NONE=y +CONFIG_DEFAULT_ENVIRONMENT_GENERIC_NEW=y +CONFIG_DEFAULT_ENVIRONMENT_GENERIC_NEW_MENU=y +# CONFIG_DEFAULT_ENVIRONMENT_GENERIC_NEW_IKCONFIG is not set +CONFIG_DEFAULT_ENVIRONMENT_PATH="" +CONFIG_HAS_SCHED=y +CONFIG_POLLER=y +# CONFIG_BTHREAD is not set +CONFIG_STATE=y +# CONFIG_STATE_CRYPTO is not set +# CONFIG_STATE_BACKWARD_COMPATIBLE is not set +CONFIG_BOOTCHOOSER=y +CONFIG_RESET_SOURCE=y +# CONFIG_MACHINE_ID is not set +# CONFIG_SYSTEMD_OF_WATCHDOG is not set +CONFIG_EXTERNAL_DTS_FRAGMENTS="" + +# +# OP-TEE loading +# +# CONFIG_BOOTM_OPTEE is not set +# CONFIG_PBL_OPTEE is not set +# end of OP-TEE loading + +# +# Android Fastboot +# +# CONFIG_FASTBOOT_SPARSE is not set +CONFIG_FASTBOOT_CMD_OEM=y +# end of Android Fastboot +# end of General Settings + +# +# Debugging +# +CONFIG_COMPILE_LOGLEVEL=6 +CONFIG_DEFAULT_LOGLEVEL=7 +# CONFIG_DEBUG_LL is not set +CONFIG_DEBUG_ROCKCHIP_UART_PORT=2 +# CONFIG_DEBUG_INITCALLS is not set +# CONFIG_DEBUG_PROBES is not set +# CONFIG_PBL_BREAK is not set +# CONFIG_PRINTF_FULL is not set +# CONFIG_UBSAN is not set +CONFIG_HAVE_ARCH_KASAN=y +CONFIG_CC_HAS_KASAN_GENERIC=y +# CONFIG_KASAN is not set +# CONFIG_COMPILE_TEST is not set +# end of Debugging + +# +# EFI (Extensible Firmware Interface) Support +# +# end of EFI (Extensible Firmware Interface) Support + +CONFIG_HAS_DEBUG_LL=y +CONFIG_COMMAND_SUPPORT=y +CONFIG_COMPILE_HASH=y + +# +# Commands +# + +# +# Information +# +# CONFIG_CMD_TUTORIAL is not set +CONFIG_CMD_ARM_CPUINFO=y +CONFIG_CMD_DEVINFO=y +# CONFIG_CMD_DEVUNBIND is not set +CONFIG_CMD_DMESG=y +CONFIG_CMD_DRVINFO=y +CONFIG_CMD_HELP=y +CONFIG_LONGHELP=y +CONFIG_CMD_IOMEM=y +CONFIG_CMD_IMD=y +CONFIG_CMD_MEMINFO=y +CONFIG_CMD_REGULATOR=y +# CONFIG_CMD_NVMEM is not set +CONFIG_CMD_VERSION=y +# CONFIG_CMD_MMC is not set +CONFIG_CMD_MMC_EXTCSD=y +# CONFIG_CMD_POLLER is not set +# CONFIG_CMD_SLICE is not set +# end of Information + +# +# Boot +# +CONFIG_CMD_BOOT=y +CONFIG_CMD_BOOTM=y +CONFIG_CMD_GO=y +# CONFIG_CMD_LOADB is not set +# CONFIG_CMD_LOADS is not set +# CONFIG_CMD_LOADY is not set +CONFIG_CMD_RESET=y +# CONFIG_CMD_UIMAGE is not set +CONFIG_CMD_BOOTCHOOSER=y +# end of Boot + +# +# Partition +# +CONFIG_CMD_PARTITION=y +CONFIG_CMD_AUTOMOUNT=y +CONFIG_CMD_MOUNT=y +CONFIG_CMD_UMOUNT=y +# end of Partition + +# +# Environment +# +CONFIG_CMD_NV=y +CONFIG_CMD_EXPORT=y +CONFIG_CMD_DEFAULTENV=y +CONFIG_CMD_GLOBAL=y +CONFIG_CMD_LOADENV=y +CONFIG_CMD_PRINTENV=y +CONFIG_CMD_MAGICVAR=y +CONFIG_CMD_MAGICVAR_HELP=y +CONFIG_CMD_SAVEENV=y +CONFIG_CMD_SETENV=y +# end of Environment + +# +# 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=y +# 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 +# end of File + +# +# Shell scripting +# +CONFIG_CMD_FALSE=y +CONFIG_CMD_GETOPT=y +CONFIG_CMD_LET=y +CONFIG_CMD_MSLEEP=y +CONFIG_CMD_READF=y +CONFIG_CMD_SLEEP=y +CONFIG_CMD_TEST=y +CONFIG_CMD_TRUE=y +# end of Shell scripting + +# +# Network +# +CONFIG_CMD_DHCP=y +CONFIG_CMD_HOST=y +CONFIG_NET_CMD_IFUP=y +CONFIG_CMD_MIITOOL=y +CONFIG_CMD_PING=y +CONFIG_CMD_TFTP=y +CONFIG_CMD_IP_ROUTE_GET=y +# CONFIG_CMD_ETHLOG is not set +# end of Network + +# +# Console and Framebuffer interaction +# +CONFIG_CMD_CLEAR=y +CONFIG_CMD_ECHO=y +# CONFIG_CMD_ECHO_E is not set +CONFIG_CMD_EDIT=y +# CONFIG_CMD_LOGIN is not set +CONFIG_CMD_MENU=y +CONFIG_CMD_MENU_MANAGEMENT=y +CONFIG_CMD_MENUTREE=y +CONFIG_CMD_READLINE=y +CONFIG_CMD_TIMEOUT=y +# end of Console and Framebuffer interaction + +# +# 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_MEMTESTER is not set +CONFIG_CMD_MM=y +CONFIG_CMD_MW=y +# end of Memory + +# +# Hardware manipulation +# +CONFIG_CMD_CLK=y +CONFIG_CMD_DETECT=y +CONFIG_CMD_FLASH=y +CONFIG_CMD_GPIO=y +CONFIG_CMD_HWMON=y +# CONFIG_CMD_I2C is not set +CONFIG_CMD_LED=y +CONFIG_CMD_POWEROFF=y +CONFIG_CMD_SMC=y +CONFIG_CMD_LED_TRIGGER=y +CONFIG_CMD_USB=y +CONFIG_CMD_USBGADGET=y +CONFIG_CMD_WD=y +CONFIG_CMD_WD_DEFAULT_TIMOUT=0 +# end of Hardware manipulation + +# +# Miscellaneous +# +# CONFIG_CMD_2048 is not set +CONFIG_CMD_BAREBOX_UPDATE=y +# CONFIG_CMD_BLOBGEN is not set +CONFIG_CMD_FIRMWARELOAD=y +CONFIG_CMD_OF_DIFF=y +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_OF_OVERLAY=y +CONFIG_CMD_OFTREE=y +CONFIG_CMD_TIME=y +CONFIG_CMD_STATE=y +# CONFIG_CMD_DHRYSTONE is not set +# CONFIG_CMD_SPD_DECODE is not set +# CONFIG_CMD_SEED is not set +# end of Miscellaneous +# end of Commands + +CONFIG_NET=y +CONFIG_NET_NFS=y +# CONFIG_NET_NETCONSOLE is not set +CONFIG_NET_RESOLV=y +CONFIG_NET_IFUP=y +CONFIG_NET_DHCP=y +# CONFIG_NET_SNTP is not set +# CONFIG_NET_FASTBOOT 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=y +CONFIG_OF_BAREBOX_ENV_IN_FS=y +CONFIG_OF_OVERLAY=y +# CONFIG_OF_OVERLAY_LIVE is not set +CONFIG_AIODEV=y +# CONFIG_LM75 is not set +CONFIG_ROCKCHIP_SARADC=y + +# +# serial drivers +# +# CONFIG_SERIAL_DEV_BUS is not set +CONFIG_DRIVER_SERIAL_NS16550=y +# CONFIG_DRIVER_SERIAL_CADENCE is not set +# CONFIG_SERIAL_SIFIVE is not set +# end of serial drivers + +CONFIG_PHYLIB=y + +# +# Network drivers +# +# CONFIG_DRIVER_NET_DESIGNWARE is not set +CONFIG_DRIVER_NET_DESIGNWARE_EQOS=y +# CONFIG_DRIVER_NET_DESIGNWARE_STM32 is not set +# CONFIG_DRIVER_NET_DESIGNWARE_TEGRA186 is not set +CONFIG_DRIVER_NET_DESIGNWARE_ROCKCHIP=y +# CONFIG_DRIVER_NET_FSL_FMAN is not set +# CONFIG_DRIVER_NET_KS8851_MLL is not set +# CONFIG_DRIVER_NET_SMC911X is not set +# CONFIG_DRIVER_NET_SMC91111 is not set +# CONFIG_DRIVER_NET_LITEETH is not set + +# +# phylib +# + +# +# MII PHY device drivers +# +# CONFIG_AR8327N_PHY is not set +# CONFIG_AT803X_PHY is not set +# CONFIG_DAVICOM_PHY is not set +CONFIG_DP83867_PHY=y +# CONFIG_DP83TD510_PHY is not set +# CONFIG_LXT_PHY is not set +# CONFIG_MARVELL_PHY is not set +# CONFIG_MICREL_PHY is not set +# CONFIG_NATIONAL_PHY is not set +CONFIG_REALTEK_PHY=y +# CONFIG_SMSC_PHY is not set +# CONFIG_NET_DSA_MV88E6XXX is not set + +# +# MII bus device drivers +# +# CONFIG_MDIO_BITBANG is not set +# CONFIG_MDIO_BUS_MUX_GPIO is not set +# end of phylib + +# CONFIG_NET_USB is not set +# CONFIG_DSA is not set +# end of Network drivers + +# +# SPI drivers +# +# CONFIG_SPI is not set +# end of SPI drivers + +CONFIG_I2C=y + +# +# I2C Hardware Bus support +# +# CONFIG_I2C_GPIO is not set +# CONFIG_I2C_DESIGNWARE is not set +# CONFIG_I2C_MV64XXX is not set +CONFIG_I2C_RK3X=y +# end of I2C Hardware Bus support + +# CONFIG_I2C_MUX 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=y +CONFIG_USB_HOST=y +# CONFIG_USB_DWC2_HOST is not set +# CONFIG_USB_DWC2_GADGET is not set +CONFIG_USB_DWC3=y +# CONFIG_USB_DWC3_HOST is not set +# CONFIG_USB_DWC3_GADGET is not set +CONFIG_USB_DWC3_DUAL_ROLE=y +CONFIG_USB_DWC3_OF_SIMPLE=y +# CONFIG_USB_EHCI is not set +CONFIG_USB_XHCI=y +# CONFIG_USB_ULPI is not set +CONFIG_USB_OTGDEV=y +CONFIG_USB_STORAGE=y + +# +# USB Miscellaneous drivers +# +# CONFIG_USB_HUB_USB251XB is not set +CONFIG_USB_GADGET=y +CONFIG_USB_GADGET_AUTOSTART=y + +# +# USB Gadget drivers +# +# CONFIG_USB_GADGET_DFU is not set +CONFIG_USB_GADGET_SERIAL=y +CONFIG_USB_GADGET_FASTBOOT=y +# CONFIG_USB_GADGET_MASS_STORAGE is not set +# CONFIG_USB_MUSB is not set +# CONFIG_VIDEO is not set +# CONFIG_SOUND is not set +CONFIG_MCI_SDHCI=y +CONFIG_MCI=y + +# +# --- Feature list --- +# +# CONFIG_MCI_STARTUP is not set +CONFIG_MCI_INFO=y +CONFIG_MCI_WRITE=y +CONFIG_MCI_MMC_BOOT_PARTITIONS=y +# CONFIG_MCI_MMC_GPP_PARTITIONS is not set + +# +# --- MCI host drivers --- +# +CONFIG_MCI_DW=y +# CONFIG_MCI_DW_PIO is not set +CONFIG_MCI_ROCKCHIP_DWCMSHC=y +CONFIG_MCI_ARASAN=y +CONFIG_HAVE_CLK=y +CONFIG_CLKDEV_LOOKUP=y +CONFIG_COMMON_CLK=y +CONFIG_COMMON_CLK_OF_PROVIDER=y + +# +# Clocksource +# +CONFIG_CLOCKSOURCE_DUMMY_RATE=1000 +CONFIG_CLOCKSOURCE_ARM_ARCHITECTED_TIMER=y +# CONFIG_CLOCKSOURCE_DW_APB_TIMER is not set +# end of Clocksource + +# +# Multifunction device drivers +# +# CONFIG_MFD_ACT8846 is not set +# CONFIG_MFD_DA9053 is not set +# CONFIG_MFD_DA9063 is not set +# CONFIG_MFD_LP3972 is not set +# CONFIG_MFD_MC13XXX is not set +# CONFIG_MFD_MC34704 is not set +# CONFIG_MFD_MC9SDZ60 is not set +# CONFIG_MFD_STMPE is not set +CONFIG_MFD_SYSCON=y +# CONFIG_MFD_TWL4030 is not set +# CONFIG_MFD_TWL6030 is not set +# CONFIG_MFD_STPMIC1 is not set +# CONFIG_MFD_RN568PMIC is not set +# CONFIG_MFD_ATMEL_FLEXCOM is not set +# end of Multifunction device drivers + +# +# Misc devices +# +# CONFIG_JTAG is not set +# CONFIG_SRAM is not set +CONFIG_STATE_DRV=y +CONFIG_DEV_MEM=y +# CONFIG_UBOOTVAR is not set +# CONFIG_STORAGE_BY_UUID is not set +# end of Misc devices + +CONFIG_LED=y +CONFIG_LED_GPIO=y +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 +# +# CONFIG_EEPROM_AT24 is not set +# end of EEPROM support + +# +# Input device support +# +# CONFIG_KEYBOARD_GPIO is not set +# CONFIG_KEYBOARD_QT1070 is not set +# CONFIG_KEYBOARD_USB is not set +# CONFIG_INPUT_SPECIALKEYS is not set +# end of Input device support + +CONFIG_WATCHDOG=y +# CONFIG_WATCHDOG_POLLER is not set +CONFIG_WATCHDOG_DW=y +# CONFIG_GPIO_WATCHDOG is not set +# CONFIG_PWM is not set +# CONFIG_HWRNG is not set + +# +# DMA support +# +# end of DMA support + +CONFIG_GPIOLIB=y + +# +# GPIO +# +CONFIG_GPIO_GENERIC=y +# CONFIG_GPIO_74XX_MMIO is not set +# CONFIG_GPIO_GENERIC_PLATFORM is not set +# CONFIG_GPIO_PCA953X is not set +# CONFIG_GPIO_PCF857X is not set +# CONFIG_GPIO_DESIGNWARE is not set +# CONFIG_GPIO_SX150X is not set +# CONFIG_GPIO_SIFIVE is not set +# end of GPIO + +# CONFIG_W1 is not set + +# +# Pin controllers +# +CONFIG_PINCTRL=y +CONFIG_PINCTRL_ROCKCHIP=y +# CONFIG_PINCTRL_SINGLE is not set +# end of Pin controllers + +CONFIG_NVMEM=y +# CONFIG_NVMEM_RMEM is not set +# CONFIG_NVMEM_SNVS_LPGPR is not set + +# +# Bus devices +# +# end of Bus devices + +CONFIG_REGULATOR=y +CONFIG_REGULATOR_FIXED=y +# CONFIG_REGULATOR_ANATOP is not set + +# +# Remoteproc drivers +# +# CONFIG_REMOTEPROC is not set +# end of Remoteproc drivers + +CONFIG_RESET_CONTROLLER=y +# CONFIG_RESET_IMX7 is not set +# CONFIG_RTC_CLASS is not set + +# +# Firmware Drivers +# +# CONFIG_ARM_SCMI_PROTOCOL is not set +# end of Firmware Drivers + +# +# FPGA Configuration Support +# +# CONFIG_FPGA is not set +# end of FPGA Configuration Support + +CONFIG_GENERIC_PHY=y +# CONFIG_USB_NOP_XCEIV is not set +# CONFIG_PHY_FSL_IMX8MQ_USB is not set +CONFIG_PHY_ROCKCHIP_INNO_USB2=y +CONFIG_PHY_ROCKCHIP_NANENG_COMBO_PHY=y +# CONFIG_CRYPTO_HW is not set + +# +# Memory controller drivers +# +# end of Memory controller drivers + +# +# SoC drivers +# + +# +# i.MX SoC drivers +# +# end of i.MX SoC drivers + +# +# KVX SoC drivers +# +# end of KVX SoC drivers +# end of SoC drivers + +# +# NVME Support +# +# end of NVME Support + +# CONFIG_SYSCON_REBOOT_MODE is not set +# CONFIG_NVMEM_REBOOT_MODE is not set +# CONFIG_POWER_RESET_SYSCON is not set +# CONFIG_POWER_RESET_SYSCON_POWEROFF is not set +# CONFIG_POWER_RESET_GPIO is not set +# CONFIG_POWER_RESET_GPIO_RESTART is not set +# CONFIG_VIRTIO_MENU is not set +# end of 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_TFTP=y +CONFIG_FS_NFS=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 +# +# end of Filesystem support + +# +# Library routines +# +CONFIG_PARAMETER=y +CONFIG_UNCOMPRESS=y +CONFIG_ZLIB=y +# CONFIG_BZLIB is not set +# CONFIG_LZ4_DECOMPRESS is not set +# CONFIG_ZSTD_DECOMPRESS is not set +# CONFIG_XZ_DECOMPRESS is not set +# CONFIG_BASE64 is not set +CONFIG_GENERIC_FIND_NEXT_BIT=y +CONFIG_PROCESS_ESCAPE_SEQUENCE=y +# CONFIG_LZO_DECOMPRESS is not set +CONFIG_FNMATCH=y +CONFIG_QSORT=y +# CONFIG_RATP is not set +# CONFIG_ALLOW_PRNG_FALLBACK is not set +# CONFIG_CRC_CCITT is not set +# CONFIG_CRC8 is not set + +# +# Library gui routines +# +# end of Library gui routines + +# CONFIG_BAREBOX_LOGO is not set +# CONFIG_NLS is not set +# CONFIG_BLOBGEN is not set +CONFIG_ARCH_HAS_STACK_DUMP=y +CONFIG_ARCH_HAS_DATA_ABORT_MASK=y +CONFIG_ARCH_HAS_ZERO_PAGE=y +# end of Library routines + +# +# Crypto support +# +CONFIG_CRC32=y +CONFIG_DIGEST=y +CONFIG_HAVE_DIGEST_MD5=y +CONFIG_HAVE_DIGEST_SHA1=y +CONFIG_DIGEST_CRC32_GENERIC=y +CONFIG_DIGEST_MD5_GENERIC=y +CONFIG_DIGEST_SHA1_GENERIC=y +# CONFIG_DIGEST_SHA224_GENERIC is not set +# CONFIG_DIGEST_SHA256_GENERIC is not set +# CONFIG_DIGEST_SHA384_GENERIC is not set +# CONFIG_DIGEST_SHA512_GENERIC is not set +# CONFIG_DIGEST_HMAC_GENERIC is not set +# CONFIG_CRYPTO_KEYSTORE is not set +# end of Crypto support + +# +# Firmware files +# +CONFIG_EXTRA_FIRMWARE_DIR="firmware" +# end of Firmware files + +# +# Host Tools +# +# CONFIG_COMPILE_HOST_TOOLS is not set +CONFIG_RK_IMAGE=y +CONFIG_RK_USB_LOADER=y +# end of Host Tools + +# +# Target Tools +# +# CONFIG_IMD_TARGET is not set +CONFIG_KERNEL_INSTALL_TARGET=y +# CONFIG_BAREBOXENV_TARGET is not set +CONFIG_BAREBOXCRC32_TARGET=y +# CONFIG_MVEBU_KWBOOT_TARGET is not set +# end of Target Tools + +# CONFIG_TEST is not set diff --git a/configs/platform-v8a/platformconfig b/configs/platform-v8a/platformconfig index e00371be7a1c..78ec1aaada9e 100644 --- a/configs/platform-v8a/platformconfig +++ b/configs/platform-v8a/platformconfig @@ -174,6 +174,7 @@ PTXCONF_CONSOLE_SPEED="115200" # # PTXCONF_AT91BOOTSTRAP2 is not set PTXCONF_BAREBOX_IMX8M=y +PTXCONF_BAREBOX_ROCKCHIP=y PTXCONF_BAREBOX_ARCH_STRING="arm" # PTXCONF_BAREBOX is not set # PTXCONF_BAREBOX_MLO is not set @@ -250,6 +251,9 @@ PTXCONF_HOST_GENEXT2FS=y PTXCONF_HOST_GENIMAGE=y PTXCONF_HOST_LIBCONFUSE=y PTXCONF_HOST_LIBKMOD=y +PTXCONF_HOST_LIBLZO=y +PTXCONF_HOST_LIBUSB=y +PTXCONF_HOST_LZOP=y PTXCONF_HOST_M4=y PTXCONF_HOST_OPENSSL=y PTXCONF_HOST_SYSTEM_BC=y diff --git a/configs/platform-v8a/platforms/barebox-rockchip.in b/configs/platform-v8a/platforms/barebox-rockchip.in new file mode 100644 index 000000000000..03a3816bb9cc --- /dev/null +++ b/configs/platform-v8a/platforms/barebox-rockchip.in @@ -0,0 +1,14 @@ +## SECTION=bootloader + +config BAREBOX_ROCKCHIP + tristate + prompt "barebox (rockchip)" + select HOST_LIBUSB + select HOST_OPENSSL + select HOST_LZOP + select FIRMWARE_ROCKCHIP + select FIRMWARE_ROCKCHIP_RK356x_BL31 + select FIRMWARE_ROCKCHIP_RK356x_BL32 + select FIRMWARE_ROCKCHIP_RK3568_SDRAM + help + Build the barebox bootloader for Rockchip boards. diff --git a/configs/platform-v8a/rules/barebox-rockchip.make b/configs/platform-v8a/rules/barebox-rockchip.make new file mode 100644 index 000000000000..cca9866b1ed7 --- /dev/null +++ b/configs/platform-v8a/rules/barebox-rockchip.make @@ -0,0 +1,163 @@ +# -*-makefile-*- +# +# Copyright (C) 2022 by Michael Riesch +# +# For further information about the PTXdist project and license conditions +# see the README file. +# + +# +# We provide this package +# +PACKAGES-$(PTXCONF_BAREBOX_ROCKCHIP) += barebox-rockchip + +# +# Paths and names +# +BAREBOX_ROCKCHIP_VERSION := 2022.08.0 +BAREBOX_ROCKCHIP_MD5 := 129a9e66ddb90cad7856df827e1dc574 +BAREBOX_ROCKCHIP := barebox-rockchip-$(BAREBOX_ROCKCHIP_VERSION) +BAREBOX_ROCKCHIP_SUFFIX := tar.bz2 +BAREBOX_ROCKCHIP_URL := $(call barebox-url, BAREBOX_ROCKCHIP) +BAREBOX_ROCKCHIP_PATCHES := barebox-rockchip-$(BAREBOX_ROCKCHIP_VERSION) +BAREBOX_ROCKCHIP_SOURCE := $(SRCDIR)/$(BAREBOX_ROCKCHIP_PATCHES).$(BAREBOX_ROCKCHIP_SUFFIX) +BAREBOX_ROCKCHIP_DIR := $(BUILDDIR)/$(BAREBOX_ROCKCHIP) +BAREBOX_ROCKCHIP_BUILD_DIR := $(BAREBOX_ROCKCHIP_DIR)-build +BAREBOX_ROCKCHIP_LICENSE := GPL-2.0-only +BAREBOX_ROCKCHIP_DEVPKG := NO +BAREBOX_ROCKCHIP_BUILD_OOT := KEEP + +BAREBOX_ROCKCHIP_CONFIG := $(call ptx/in-platformconfigdir, \ + barebox-rockchip.config) + +# ---------------------------------------------------------------------------- +# Prepare +# ---------------------------------------------------------------------------- + +BAREBOX_ROCKCHIP_INJECT_PATH := ${PTXDIST_SYSROOT_TARGET}/usr/lib/firmware +BAREBOX_ROCKCHIP_INJECT_FILES += rk3568_bl31_v1.24.elf:firmware/rk3568-bl31.bin +BAREBOX_ROCKCHIP_INJECT_FILES += rk3568_bl32_v1.05.bin:firmware/rk3568-op-tee.bin +BAREBOX_ROCKCHIP_INJECT_FILES += rk3568_ddr_1560MHz_v1.08.bin:arch/arm/boards/rockchip-rk3568-evb/sdram-init.bin +BAREBOX_ROCKCHIP_INJECT_FILES += rk3568_ddr_1560MHz_v1.08.bin:arch/arm/boards/radxa-rock3/sdram-init.bin + +# use host pkg-config for host tools +BAREBOX_ROCKCHIP_PATH := PATH=$(HOST_PATH) + +BAREBOX_ROCKCHIP_WRAPPER_BLACKLIST := \ + $(PTXDIST_LOWLEVEL_WRAPPER_BLACKLIST) + +BAREBOX_ROCKCHIP_CONF_TOOL := kconfig +BAREBOX_ROCKCHIP_CONF_OPT := \ + -C $(BAREBOX_ROCKCHIP_DIR) \ + O=$(BAREBOX_ROCKCHIP_BUILD_DIR) \ + $(call barebox-opts, BAREBOX_ROCKCHIP) + +BAREBOX_ROCKCHIP_MAKE_OPT := $(BAREBOX_ROCKCHIP_CONF_OPT) + +BAREBOX_ROCKCHIP_IMAGES := images/barebox-rk3568-evb.img images/barebox-rock3a.img +BAREBOX_ROCKCHIP_IMAGES := $(addprefix $(BAREBOX_ROCKCHIP_BUILD_DIR)/,$(BAREBOX_ROCKCHIP_IMAGES)) + +ifdef PTXCONF_BAREBOX_ROCKCHIP +$(BAREBOX_ROCKCHIP_CONFIG): + @echo + @echo "****************************************************************************" + @echo " Please generate a bareboxconfig with 'ptxdist menuconfig barebox-rockchip'" + @echo "****************************************************************************" + @echo + @echo + @exit 1 +endif + +BAREBOX_ROCKCHIP_EXTRA_ENV_PATH := $(foreach path, \ + $(call remove_quotes,"barebox-common-defaultenv"), \ + $(call ptx/in-platformconfigdir,$(path))) +BAREBOX_ROCKCHIP_EXTRA_ENV_DEPS := \ + $(BAREBOX_ROCKCHIP_EXTRA_ENV_PATH) \ + $(call ptx/force-sh, find $(BAREBOX_ROCKCHIP_EXTRA_ENV_PATH) -print 2>/dev/null) + +$(STATEDIR)/barebox-rockchip.prepare: $(BAREBOX_ROCKCHIP_EXTRA_ENV_DEPS) + @$(call targetinfo) + @$(call world/prepare, BAREBOX_ROCKCHIP) + @$(call world/inject, BAREBOX_ROCKCHIP) + + @rm -rf $(BAREBOX_ROCKCHIP_BUILD_DIR)/.ptxdist-defaultenv + @ptxd_source_kconfig "${PTXDIST_PTXCONFIG}" && \ + ptxd_source_kconfig "${PTXDIST_PLATFORMCONFIG}" && \ + $(foreach path, $(BAREBOX_ROCKCHIP_EXTRA_ENV_PATH), \ + if [ -d "$(path)" ]; then \ + ptxd_filter_dir "$(path)" \ + $(BAREBOX_ROCKCHIP_BUILD_DIR)/.ptxdist-defaultenv; \ + else \ + cp "$(path)" $(BAREBOX_ROCKCHIP_BUILD_DIR)/.ptxdist-defaultenv/; \ + fi;) + @rm -rf $(BAREBOX_ROCKCHIP_BUILD_DIR)/defaultenv/barebox_default_env + + @$(call touch) + +# ---------------------------------------------------------------------------- +# Compile +# ---------------------------------------------------------------------------- + +$(STATEDIR)/barebox-rockchip.compile: + @$(call targetinfo) + + @if test $$(grep -c -e "^CONFIG_DEFAULT_ENVIRONMENT_PATH=.*\$(BAREBOX_ROCKCHIP_BUILD_DIR)/.ptxdist-defaultenv" $(BAREBOX_ROCKCHIP_BUILD_DIR)/.config) -eq 0; then \ + sed -i -e "s,^\(CONFIG_DEFAULT_ENVIRONMENT_PATH=.*\)\"$$,\1 $(BAREBOX_ROCKCHIP_BUILD_DIR)/.ptxdist-defaultenv\"," \ + $(BAREBOX_ROCKCHIP_BUILD_DIR)/.config; \ + fi + + @$(call world/compile, BAREBOX_ROCKCHIP) + @$(call touch) + +# ---------------------------------------------------------------------------- +# Install +# ---------------------------------------------------------------------------- + +BAREBOX_ROCKCHIP_PROGS_HOST := \ + rk-usb-loader + +$(STATEDIR)/barebox-rockchip.install: + @$(call targetinfo) + + @$(foreach prog, $(BAREBOX_ROCKCHIP_PROGS_HOST), \ + if [ -e $(BAREBOX_ROCKCHIP_BUILD_DIR)/scripts/$(prog) ]; then \ + install -v -D -m755 \ + $(BAREBOX_ROCKCHIP_BUILD_DIR)/scripts/$(prog) \ + $(PTXDIST_SYSROOT_HOST)/bin/$(notdir $(prog)) \ + || exit; \ + fi;) + + @$(call touch) + +# ---------------------------------------------------------------------------- +# Target-Install +# ---------------------------------------------------------------------------- + +$(STATEDIR)/barebox-rockchip.targetinstall: + @$(call targetinfo) + @$(foreach image, $(BAREBOX_ROCKCHIP_IMAGES), \ + install -m 644 \ + $(image) $(IMAGEDIR)/$(notdir $(image))-rockchip$(ptx/nl)) + @$(call touch) + +# ---------------------------------------------------------------------------- +# Clean +# ---------------------------------------------------------------------------- + +$(STATEDIR)/barebox-rockchip.clean: + @$(call targetinfo) + @$(call clean_pkg, BAREBOX_ROCKCHIP) + @$(foreach image, $(BAREBOX_ROCKCHIP_IMAGES), \ + rm -fv $(IMAGEDIR)/$(notdir $(image))-rockchip$(ptx/nl)) + @$(foreach prog, $(BAREBOX_ROCKCHIP_PROGS_HOST), \ + rm -vf $(PTXDIST_SYSROOT_HOST)/bin/$(notdir $(prog))$(ptx/nl)) + + +# ---------------------------------------------------------------------------- +# oldconfig / menuconfig +# ---------------------------------------------------------------------------- + +$(call ptx/kconfig-targets, barebox-rockchip): $(STATEDIR)/barebox-rockchip.extract + @$(call world/kconfig, BAREBOX_ROCKCHIP, $(subst barebox-rockchip_,,$@)) + +# vim: syntax=make -- 2.30.2