[OpenWrt-Devel] [LEDE-DEV] [PATCH] add support for OCTEON TX target

Hauke Mehrtens hauke at hauke-m.de
Tue Feb 13 15:51:29 EST 2018


On 02/13/2018 09:46 PM, Hauke Mehrtens wrote:
> Hi Tim,
> 
> sorry that I haven't reviewed this earlyer, but now I saw some problems,
> see my comments inline.
> 
> Can you please create a follow up patch based on current master branch.
> 
> On 01/24/2018 12:15 AM, Tim Harvey wrote:
>> The Cavium OCTEON TX is an ARM 64-bit SoC leveraging CPU cores and
>> periperhals from the Cavium ThunderX SoC.
>>
>> This initial support provides a 4.14 kernel and kernel+initramfs that is
>> bootable on the Gateworks Newport GW630x as well as the Cavium sff8104
>> reference board.
>>
>> Signed-off-by: Tim Harvey <tharvey at gateworks.com>
>> ---
>>  target/linux/octeontx/Makefile                     |  27 +
>>  .../octeontx/base-files/etc/board.d/02_network     |  18 +
>>  target/linux/octeontx/base-files/etc/inittab       |   5 +
>>  target/linux/octeontx/base-files/lib/octeontx.sh   |  43 ++
>>  target/linux/octeontx/config-4.14                  | 670 +++++++++++++++++++++
>>  target/linux/octeontx/image/Makefile               |  21 +
>>  ...x-add-support-for-rgmii-internal-delay-mo.patch | 148 +++++
>>  ...hunderx-workaround-BGX-TX-Underflow-issue.patch | 117 ++++
>>  8 files changed, 1049 insertions(+)
>>  create mode 100644 target/linux/octeontx/Makefile
>>  create mode 100644 target/linux/octeontx/base-files/etc/board.d/02_network
>>  create mode 100644 target/linux/octeontx/base-files/etc/inittab
>>  create mode 100644 target/linux/octeontx/base-files/lib/octeontx.sh
>>  create mode 100644 target/linux/octeontx/config-4.14
>>  create mode 100644 target/linux/octeontx/image/Makefile
>>  create mode 100644 target/linux/octeontx/patches-4.14/0001-net-thunderx-add-support-for-rgmii-internal-delay-mo.patch
>>  create mode 100644 target/linux/octeontx/patches-4.14/0001-net-thunderx-workaround-BGX-TX-Underflow-issue.patch
>>
>> diff --git a/target/linux/octeontx/Makefile b/target/linux/octeontx/Makefile
>> new file mode 100644
>> index 0000000..bbe8149
>> --- /dev/null
>> +++ b/target/linux/octeontx/Makefile
>> @@ -0,0 +1,27 @@
>> +#
>> +# Copyright (C) 2018 OpenWrt.org
>> +#
>> +# This is free software, licensed under the GNU General Public License v2.
>> +# See /LICENSE for more information.
>> +#
>> +include $(TOPDIR)/rules.mk
>> +
>> +ARCH:=aarch64
>> +BOARD:=octeontx
>> +BOARDNAME:=Octeon-TX
>> +FEATURES:=targz pcie gpio rtc usb
> 
> I think you should define fpu here, but arm64 anyway has a fpu.
> 
>> +CFLAGS:=-Os -pipe -fno-caller-saves
> 
> You should not define CFLAGS for the toolchain as this will also leak
> into other targets if they share the same toolchain.
> 
> Can you try to remove the CFLAGS setting if it still works?
> The build system will then set it to "-Os -pipe -mcpu=generic"
> 
>> +
>> +MAINTAINER:=Tim Harvey <tharvey at gateworks.com>
>> +
>> +KERNEL_PATCHVER:=4.14
>> +
>> +define Target/Description
>> +	Build images for Octeon-TX CN80XX/CN81XX based boards
>> +endef
>> +
>> +include $(INCLUDE_DIR)/target.mk
>> +
>> +KERNELNAME:=Image
>> +
>> +$(eval $(call BuildTarget))
> ....
>> diff --git a/target/linux/octeontx/config-4.14 b/target/linux/octeontx/config-4.14
>> new file mode 100644
>> index 0000000..97d0cc6
>> --- /dev/null
>> +++ b/target/linux/octeontx/config-4.14
>> @@ -0,0 +1,670 @@
> .....
>> +# CONFIG_CRYPTO_SHA512_ARM64 is not set
>> +CONFIG_CRYPTO_SIMD=y
>> +CONFIG_CRYPTO_WORKQUEUE=y
>> +CONFIG_DCACHE_WORD_ACCESS=y
>> +# CONFIG_DEBUG_ALIGN_RODATA is not set
>> +# CONFIG_DEBUG_BLK_CGROUP is not set
>> +CONFIG_DEBUG_INFO=y
> 
> Is this needed by default?
> 
>> +CONFIG_DEFAULT_IOSCHED="noop"
>> +CONFIG_DEFAULT_NOOP=y
>> +# CONFIG_DEVPORT is not set
>> +CONFIG_DEVTMPFS=y
>> +CONFIG_DEVTMPFS_MOUNT=y
>> +CONFIG_DMADEVICES=y
>> +CONFIG_DMA_CMA=y
>> +CONFIG_DMA_ENGINE=y
>> +# CONFIG_DMA_NOOP_OPS is not set
>> +CONFIG_DMA_OF=y
>> +CONFIG_DMA_SHARED_BUFFER=y
>> +# CONFIG_DMA_VIRT_OPS is not set
>> +CONFIG_DNS_RESOLVER=y
>> +# CONFIG_DRM_LIB_RANDOM is not set
>> +CONFIG_DTC=y
>> +CONFIG_DT_IDLE_STATES=y
>> +CONFIG_EDAC=y
>> +# CONFIG_EDAC_DEBUG is not set
>> +CONFIG_EDAC_LEGACY_SYSFS=y
>> +CONFIG_EDAC_SUPPORT=y
>> +CONFIG_EDAC_THUNDERX=y
>> +# CONFIG_EDAC_XGENE is not set
>> +CONFIG_EEPROM_AT24=y
>> +# CONFIG_EVM is not set
>> +CONFIG_EXT2_FS=y
>> +CONFIG_EXT3_FS=y
> 
> Please activate ext2 and 3 support in ext4 instead.
> 
>> +# CONFIG_EXT3_FS_POSIX_ACL is not set
>> +# CONFIG_EXT3_FS_SECURITY is not set
>> +CONFIG_EXT4_FS=y
>> +CONFIG_EXT4_FS_POSIX_ACL=y
>> +# CONFIG_F2FS_CHECK_FS is not set
>> +CONFIG_F2FS_FS=y
>> +# CONFIG_F2FS_FS_SECURITY is not set
>> +CONFIG_F2FS_FS_XATTR=y
>> +CONFIG_F2FS_STAT_FS=y
> ...
> 
> You should run "make kernel_oldconfig" to refresh the configuration.

Please do not deactivate all the CONFIG_NET_VENDOR* options.

> 
> There is also something missing in this configuration or in the generic
> one, see this error from the build bot:
> http://phase1.builds.lede-project.org/builders/octeontx%2Fgeneric/builds/0/steps/kmods/logs/stdio
> 
> Please test compile it with this configuration:
> CONFIG_TARGET_octeontx=y
> CONFIG_TARGET_octeontx_Default=y
> CONFIG_TARGET_BOARD="octeontx"
> CONFIG_ALL_KMODS=y
> 
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list