Initial commit
Some checks failed
Build Kernel / Build all affected Kernels (push) Has been cancelled
Build all core packages / Build all core packages for selected target (push) Has been cancelled
Build and Push prebuilt tools container / Build and Push all prebuilt containers (push) Has been cancelled
Build Toolchains / Build Toolchains for each target (push) Has been cancelled
Build host tools / Build host tools for linux and macos based systems (push) Has been cancelled
Coverity scan build / Coverity x86/64 build (push) Has been cancelled
Some checks failed
Build Kernel / Build all affected Kernels (push) Has been cancelled
Build all core packages / Build all core packages for selected target (push) Has been cancelled
Build and Push prebuilt tools container / Build and Push all prebuilt containers (push) Has been cancelled
Build Toolchains / Build Toolchains for each target (push) Has been cancelled
Build host tools / Build host tools for linux and macos based systems (push) Has been cancelled
Coverity scan build / Coverity x86/64 build (push) Has been cancelled
This commit is contained in:
30
target/linux/gemini/Makefile
Normal file
30
target/linux/gemini/Makefile
Normal file
@@ -0,0 +1,30 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
#
|
||||
# Copyright (C) 2009-2018 OpenWrt.org
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
ARCH:=arm
|
||||
BOARD:=gemini
|
||||
BOARDNAME:=Cortina Systems CS351x
|
||||
FEATURES:=squashfs pci rtc usb dt gpio display ext4 rootfs-part boot-part
|
||||
CPU_TYPE:=fa526
|
||||
SUBTARGETS:=generic
|
||||
|
||||
KERNEL_PATCHVER:=6.6
|
||||
|
||||
define Target/Description
|
||||
Build firmware images for the StorLink/Cortina Gemini CS351x ARM FA526 CPU
|
||||
endef
|
||||
|
||||
KERNELNAME:=zImage dtbs
|
||||
|
||||
include $(INCLUDE_DIR)/target.mk
|
||||
|
||||
DEFAULT_PACKAGES += \
|
||||
kmod-usb-fotg210 \
|
||||
kmod-usb-ledtrig-usbport \
|
||||
kmod-leds-gpio \
|
||||
kmod-gpio-button-hotplug
|
||||
|
||||
$(eval $(call BuildTarget))
|
||||
41
target/linux/gemini/base-files/etc/board.d/02_network
Normal file
41
target/linux/gemini/base-files/etc/board.d/02_network
Normal file
@@ -0,0 +1,41 @@
|
||||
|
||||
. /lib/functions/uci-defaults.sh
|
||||
|
||||
board_config_update
|
||||
|
||||
case "$(board_name)" in
|
||||
dlink,dir-685)
|
||||
# These are all connected to eth0 thru RTL8366RB
|
||||
ucidef_set_interface "eth" device "eth0" protocol "none"
|
||||
ucidef_set_interfaces_lan_wan "lan0 lan1 lan2 lan3" "wan"
|
||||
;;
|
||||
dlink,dns-313|\
|
||||
edimax,ns-2502|\
|
||||
raidsonic,ib-4220-b|\
|
||||
wiliboard,wbd111|\
|
||||
wiliboard,wbd222)
|
||||
# NAS machines with a single ethernet port
|
||||
ucidef_set_interface_lan "eth0" "dhcp"
|
||||
;;
|
||||
itian,sq201)
|
||||
# These are all connected to eth1 thru VSC7395
|
||||
ucidef_set_interface "eth" device "eth1" protocol "none"
|
||||
ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" "eth0"
|
||||
;;
|
||||
ssi,1328)
|
||||
ucidef_set_interfaces_lan_wan "eth0" "eth1"
|
||||
;;
|
||||
storlink,gemini324)
|
||||
# These are all connected to eth1 thru VSC7385
|
||||
ucidef_set_interface "eth" device "eth1" protocol "none"
|
||||
ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" "eth0"
|
||||
;;
|
||||
teltonika,rut1xx)
|
||||
# One ethernet LAN which is offering DHCP
|
||||
ucidef_set_interface_lan "eth0"
|
||||
;;
|
||||
esac
|
||||
|
||||
board_config_flush
|
||||
|
||||
exit 0
|
||||
14
target/linux/gemini/base-files/etc/board.d/03_hdparm
Normal file
14
target/linux/gemini/base-files/etc/board.d/03_hdparm
Normal file
@@ -0,0 +1,14 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
# Spin down drives after one minute if inactive
|
||||
|
||||
if [ ! -n "$(command -v hdparm)" ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
DISKS=$(find /dev/sd[a-z] 2>/dev/null)
|
||||
for DISK in $DISKS
|
||||
do
|
||||
if [ -b $DISK ] ; then
|
||||
hdparm -S 12 $DISK > /dev/null
|
||||
fi
|
||||
done
|
||||
9
target/linux/gemini/base-files/etc/board.d/03_splash
Normal file
9
target/linux/gemini/base-files/etc/board.d/03_splash
Normal file
@@ -0,0 +1,9 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
# OpenWRT splash screen if using framebuffer console
|
||||
|
||||
if [ ! -d /sys/class/graphics/fbcon ] ; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo 0 > /sys/class/graphics/fbcon/cursor_blink
|
||||
cat /etc/banner > /dev/tty0
|
||||
@@ -0,0 +1,19 @@
|
||||
#
|
||||
# Copyright (C) 2019 OpenWrt.org
|
||||
#
|
||||
|
||||
. /lib/functions.sh
|
||||
|
||||
board=$(board_name)
|
||||
|
||||
fixwrgg() {
|
||||
local kernel_size=$(sed -n 's/mtd[0-9]*: \([0-9a-f]*\).*"kernel".*/\1/p' /proc/mtd)
|
||||
|
||||
[ "$kernel_size" ] && mtd -c 0x$kernel_size fixwrgg firmware
|
||||
}
|
||||
|
||||
case "$board" in
|
||||
dlink,dir-685)
|
||||
fixwrgg
|
||||
;;
|
||||
esac
|
||||
@@ -0,0 +1,53 @@
|
||||
. /lib/functions.sh
|
||||
. /lib/functions/system.sh
|
||||
|
||||
set_ether_mac() {
|
||||
local part
|
||||
local DEVID
|
||||
local MAC1
|
||||
local MAC2
|
||||
|
||||
case "$(board_name)" in
|
||||
dlink,dns-313)
|
||||
# The DNS-313 has a special field in its RedBoot
|
||||
# binary that we need to check
|
||||
part="$(find_mtd_part RedBoot)"
|
||||
if [ -n "$part" ]; then
|
||||
DEVID="$(dd if=$part bs=1 skip=119508 count=7 2>/dev/null)"
|
||||
if [ "$DEVID" = "dns-313" ]; then
|
||||
MAC1="$(mtd_get_mac_binary RedBoot 0x1d2f4)"
|
||||
ip link set eth0 address "$MAC1" 2>/dev/null
|
||||
return 0
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
dlink,dir-685)
|
||||
# The DIR-685 has a special field in its RedBoot
|
||||
# binary that we need to check
|
||||
part=$(find_mtd_part RedBoot)
|
||||
if [ -n "$part" ] ; then
|
||||
DEVID="$(dd if=$part bs=1 skip=81516 count=7 2>/dev/null)"
|
||||
if [ "$DEVID" = "ILI9322" ] ; then
|
||||
MAC1=$(mtd_get_mac_binary RedBoot 0x17340)
|
||||
MAC2=$(mtd_get_mac_binary RedBoot 0x17346)
|
||||
ip link set eth0 address "$MAC1" 2>/dev/null
|
||||
ip link set eth1 address "$MAC2" 2>/dev/null
|
||||
return 0
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
# Most devices have a standard "VCTL" partition
|
||||
part="$(find_mtd_part VCTL)"
|
||||
if [ -n "$part" ]; then
|
||||
MAC1="$(strings $part |grep MAC|cut -d: -f2|cut -c3-14|sed -e 's,\(..\),:\1,g' -e 's,^:,,')"
|
||||
MAC2="$(strings $part |grep MAC|cut -d: -f8|cut -c3-14|sed -e 's,\(..\),:\1,g' -e 's,^:,,')"
|
||||
|
||||
ip link set eth0 address "$MAC1" 2>/dev/null
|
||||
ip link set eth1 address "$MAC2" 2>/dev/null
|
||||
return 0
|
||||
fi
|
||||
}
|
||||
|
||||
boot_hook_add preinit_main set_ether_mac
|
||||
25
target/linux/gemini/base-files/lib/upgrade/platform.sh
Normal file
25
target/linux/gemini/base-files/lib/upgrade/platform.sh
Normal file
@@ -0,0 +1,25 @@
|
||||
REQUIRE_IMAGE_METADATA=1
|
||||
|
||||
platform_check_image() {
|
||||
local board=$(board_name)
|
||||
|
||||
case "$board" in
|
||||
dlink,dir-685)
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
|
||||
echo "Sysupgrade is not yet supported on $board."
|
||||
return 1
|
||||
}
|
||||
|
||||
platform_do_upgrade() {
|
||||
local board=$(board_name)
|
||||
|
||||
case "$board" in
|
||||
dlink,dir-685)
|
||||
PART_NAME=firmware
|
||||
default_do_upgrade "$1"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
464
target/linux/gemini/config-6.6
Normal file
464
target/linux/gemini/config-6.6
Normal file
@@ -0,0 +1,464 @@
|
||||
CONFIG_ALIGNMENT_TRAP=y
|
||||
CONFIG_AMBA_PL08X=y
|
||||
CONFIG_ARCH_32BIT_OFF_T=y
|
||||
CONFIG_ARCH_GEMINI=y
|
||||
CONFIG_ARCH_KEEP_MEMBLOCK=y
|
||||
CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y
|
||||
# CONFIG_ARCH_MOXART is not set
|
||||
CONFIG_ARCH_MULTIPLATFORM=y
|
||||
CONFIG_ARCH_MULTI_V4=y
|
||||
# CONFIG_ARCH_MULTI_V4T is not set
|
||||
CONFIG_ARCH_MULTI_V4_V5=y
|
||||
# CONFIG_ARCH_MULTI_V5 is not set
|
||||
CONFIG_ARCH_OPTIONAL_KERNEL_RWX=y
|
||||
CONFIG_ARCH_SELECT_MEMORY_MODEL=y
|
||||
CONFIG_ARCH_SPARSEMEM_ENABLE=y
|
||||
CONFIG_ARCH_STACKWALK=y
|
||||
CONFIG_ARM=y
|
||||
CONFIG_ARM_AMBA=y
|
||||
CONFIG_ARM_APPENDED_DTB=y
|
||||
# CONFIG_ARM_ATAG_DTB_COMPAT is not set
|
||||
CONFIG_ARM_HAS_GROUP_RELOCS=y
|
||||
CONFIG_ARM_L1_CACHE_SHIFT=5
|
||||
CONFIG_ARM_PATCH_PHYS_VIRT=y
|
||||
CONFIG_ARM_UNWIND=y
|
||||
CONFIG_ATA=y
|
||||
CONFIG_ATAGS=y
|
||||
CONFIG_ATA_FORCE=y
|
||||
CONFIG_ATA_VERBOSE_ERROR=y
|
||||
CONFIG_AUTO_ZRELADDR=y
|
||||
CONFIG_BINFMT_FLAT_ARGVP_ENVP_ON_STACK=y
|
||||
CONFIG_BLK_DEV_SD=y
|
||||
CONFIG_BLK_MQ_PCI=y
|
||||
CONFIG_BLK_PM=y
|
||||
CONFIG_BOUNCE=y
|
||||
CONFIG_BUFFER_HEAD=y
|
||||
CONFIG_CACHESTAT_SYSCALL=y
|
||||
CONFIG_CC_HAVE_STACKPROTECTOR_TLS=y
|
||||
CONFIG_CLKSRC_MMIO=y
|
||||
CONFIG_CLONE_BACKWARDS=y
|
||||
CONFIG_CMA=y
|
||||
CONFIG_CMA_ALIGNMENT=8
|
||||
CONFIG_CMA_AREAS=7
|
||||
# CONFIG_CMA_DEBUG is not set
|
||||
# CONFIG_CMA_DEBUGFS is not set
|
||||
CONFIG_CMA_SIZE_PERCENTAGE=10
|
||||
# CONFIG_CMA_SIZE_SEL_MAX is not set
|
||||
# CONFIG_CMA_SIZE_SEL_MBYTES is not set
|
||||
# CONFIG_CMA_SIZE_SEL_MIN is not set
|
||||
CONFIG_CMA_SIZE_SEL_PERCENTAGE=y
|
||||
# CONFIG_CMA_SYSFS is not set
|
||||
CONFIG_COMMON_CLK=y
|
||||
CONFIG_COMMON_CLK_GEMINI=y
|
||||
CONFIG_COMPACT_UNEVICTABLE_DEFAULT=1
|
||||
CONFIG_COMPAT_32BIT_TIME=y
|
||||
CONFIG_CONSOLE_TRANSLATIONS=y
|
||||
CONFIG_CONTEXT_TRACKING=y
|
||||
CONFIG_CONTEXT_TRACKING_IDLE=y
|
||||
CONFIG_CONTIG_ALLOC=y
|
||||
CONFIG_COREDUMP=y
|
||||
CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS=y
|
||||
CONFIG_CPU_32v4=y
|
||||
CONFIG_CPU_ABRT_EV4=y
|
||||
CONFIG_CPU_CACHE_FA=y
|
||||
CONFIG_CPU_CACHE_VIVT=y
|
||||
CONFIG_CPU_COPY_FA=y
|
||||
CONFIG_CPU_CP15=y
|
||||
CONFIG_CPU_CP15_MMU=y
|
||||
# CONFIG_CPU_DCACHE_WRITETHROUGH is not set
|
||||
CONFIG_CPU_FA526=y
|
||||
CONFIG_CPU_LITTLE_ENDIAN=y
|
||||
CONFIG_CPU_NO_EFFICIENT_FFS=y
|
||||
CONFIG_CPU_PABRT_LEGACY=y
|
||||
CONFIG_CPU_THERMAL=y
|
||||
CONFIG_CPU_TLB_FA=y
|
||||
CONFIG_CPU_USE_DOMAINS=y
|
||||
CONFIG_CRASH_CORE=y
|
||||
CONFIG_CRC16=y
|
||||
# CONFIG_CRC32_SARWATE is not set
|
||||
CONFIG_CRC32_SLICEBY8=y
|
||||
CONFIG_CRC_CCITT=y
|
||||
CONFIG_CRC_ITU_T=y
|
||||
CONFIG_CROSS_MEMORY_ATTACH=y
|
||||
CONFIG_CRYPTO_CMAC=y
|
||||
CONFIG_CRYPTO_CRC32C=y
|
||||
CONFIG_CRYPTO_DES=y
|
||||
# CONFIG_CRYPTO_DEV_JH7110 is not set
|
||||
CONFIG_CRYPTO_DEV_SL3516=y
|
||||
# CONFIG_CRYPTO_DEV_SL3516_DEBUG is not set
|
||||
CONFIG_CRYPTO_DRBG=y
|
||||
CONFIG_CRYPTO_DRBG_HMAC=y
|
||||
CONFIG_CRYPTO_DRBG_MENU=y
|
||||
CONFIG_CRYPTO_ECB=y
|
||||
CONFIG_CRYPTO_ECHAINIV=y
|
||||
CONFIG_CRYPTO_ENGINE=y
|
||||
CONFIG_CRYPTO_GENIV=y
|
||||
CONFIG_CRYPTO_HMAC=y
|
||||
CONFIG_CRYPTO_HW=y
|
||||
CONFIG_CRYPTO_JITTERENTROPY=y
|
||||
CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y
|
||||
CONFIG_CRYPTO_LIB_DES=y
|
||||
CONFIG_CRYPTO_LIB_GF128MUL=y
|
||||
CONFIG_CRYPTO_LIB_SHA1=y
|
||||
CONFIG_CRYPTO_LIB_SHA256=y
|
||||
CONFIG_CRYPTO_LIB_UTILS=y
|
||||
# CONFIG_CRYPTO_MANAGER_DISABLE_TESTS is not set
|
||||
# CONFIG_CRYPTO_MANAGER_EXTRA_TESTS is not set
|
||||
CONFIG_CRYPTO_MD4=y
|
||||
CONFIG_CRYPTO_MD5=y
|
||||
CONFIG_CRYPTO_RNG=y
|
||||
CONFIG_CRYPTO_RNG2=y
|
||||
CONFIG_CRYPTO_RNG_DEFAULT=y
|
||||
CONFIG_CRYPTO_SEQIV=y
|
||||
CONFIG_CRYPTO_SHA256=y
|
||||
CONFIG_CRYPTO_SHA3=y
|
||||
CONFIG_CRYPTO_SHA512=y
|
||||
CONFIG_CRYPTO_SIG2=y
|
||||
CONFIG_CRYPTO_USER=y
|
||||
CONFIG_DEBUG_BUGVERBOSE=y
|
||||
CONFIG_DEBUG_INFO=y
|
||||
CONFIG_DEBUG_LL_INCLUDE="mach/debug-macro.S"
|
||||
CONFIG_DEBUG_MEMORY_INIT=y
|
||||
CONFIG_DECOMPRESS_BZIP2=y
|
||||
CONFIG_DECOMPRESS_GZIP=y
|
||||
CONFIG_DECOMPRESS_LZ4=y
|
||||
CONFIG_DECOMPRESS_LZMA=y
|
||||
CONFIG_DECOMPRESS_LZO=y
|
||||
CONFIG_DECOMPRESS_XZ=y
|
||||
CONFIG_DMADEVICES=y
|
||||
CONFIG_DMATEST=y
|
||||
CONFIG_DMA_CMA=y
|
||||
CONFIG_DMA_ENGINE=y
|
||||
CONFIG_DMA_ENGINE_RAID=y
|
||||
CONFIG_DMA_OF=y
|
||||
CONFIG_DMA_OPS=y
|
||||
CONFIG_DMA_SHARED_BUFFER=y
|
||||
CONFIG_DMA_VIRTUAL_CHANNELS=y
|
||||
CONFIG_DRM=y
|
||||
CONFIG_DRM_BRIDGE=y
|
||||
CONFIG_DRM_FBDEV_EMULATION=y
|
||||
CONFIG_DRM_FBDEV_OVERALLOC=100
|
||||
CONFIG_DRM_GEM_DMA_HELPER=y
|
||||
CONFIG_DRM_KMS_HELPER=y
|
||||
CONFIG_DRM_PANEL=y
|
||||
CONFIG_DRM_PANEL_BRIDGE=y
|
||||
CONFIG_DRM_PANEL_ILITEK_IL9322=y
|
||||
CONFIG_DRM_PANEL_ORIENTATION_QUIRKS=y
|
||||
CONFIG_DRM_TVE200=y
|
||||
CONFIG_DTC=y
|
||||
CONFIG_DUMMY_CONSOLE=y
|
||||
CONFIG_EDAC_ATOMIC_SCRUB=y
|
||||
CONFIG_EDAC_SUPPORT=y
|
||||
CONFIG_EEPROM_93CX6=y
|
||||
CONFIG_ELF_CORE=y
|
||||
CONFIG_EXCLUSIVE_SYSTEM_RAM=y
|
||||
# CONFIG_EXPERT is not set
|
||||
CONFIG_EXT4_FS=y
|
||||
CONFIG_EXTCON=y
|
||||
CONFIG_FARADAY_FTINTC010=y
|
||||
CONFIG_FB=y
|
||||
CONFIG_FB_CORE=y
|
||||
CONFIG_FB_DEFERRED_IO=y
|
||||
CONFIG_FB_DMAMEM_HELPERS=y
|
||||
CONFIG_FB_IOMEM_FOPS=y
|
||||
CONFIG_FB_SYSMEM_HELPERS=y
|
||||
CONFIG_FB_SYSMEM_HELPERS_DEFERRED=y
|
||||
CONFIG_FB_SYS_COPYAREA=y
|
||||
CONFIG_FB_SYS_FILLRECT=y
|
||||
CONFIG_FB_SYS_FOPS=y
|
||||
CONFIG_FB_SYS_IMAGEBLIT=y
|
||||
CONFIG_FHANDLE=y
|
||||
CONFIG_FIXED_PHY=y
|
||||
CONFIG_FIX_EARLYCON_MEM=y
|
||||
CONFIG_FONT_8x16=y
|
||||
CONFIG_FONT_8x8=y
|
||||
CONFIG_FONT_SUPPORT=y
|
||||
CONFIG_FRAMEBUFFER_CONSOLE=y
|
||||
CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y
|
||||
# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
|
||||
CONFIG_FS_IOMAP=y
|
||||
CONFIG_FS_MBCACHE=y
|
||||
CONFIG_FTTMR010_TIMER=y
|
||||
CONFIG_FTWDT010_WATCHDOG=y
|
||||
CONFIG_FUNCTION_ALIGNMENT=0
|
||||
CONFIG_FWNODE_MDIO=y
|
||||
CONFIG_FW_LOADER_PAGED_BUF=y
|
||||
CONFIG_FW_LOADER_SYSFS=y
|
||||
# CONFIG_FW_LOADER_USER_HELPER_FALLBACK is not set
|
||||
CONFIG_GCC_ASM_GOTO_OUTPUT_WORKAROUND=y
|
||||
CONFIG_GEMINI_ETHERNET=y
|
||||
CONFIG_GENERIC_ALLOCATOR=y
|
||||
CONFIG_GENERIC_ATOMIC64=y
|
||||
CONFIG_GENERIC_BUG=y
|
||||
CONFIG_GENERIC_CLOCKEVENTS=y
|
||||
CONFIG_GENERIC_CPU_AUTOPROBE=y
|
||||
CONFIG_GENERIC_EARLY_IOREMAP=y
|
||||
CONFIG_GENERIC_IDLE_POLL_SETUP=y
|
||||
CONFIG_GENERIC_IRQ_MULTI_HANDLER=y
|
||||
CONFIG_GENERIC_IRQ_SHOW=y
|
||||
CONFIG_GENERIC_IRQ_SHOW_LEVEL=y
|
||||
CONFIG_GENERIC_LIB_DEVMEM_IS_ALLOWED=y
|
||||
CONFIG_GENERIC_PCI_IOMAP=y
|
||||
CONFIG_GENERIC_PINCONF=y
|
||||
CONFIG_GENERIC_SCHED_CLOCK=y
|
||||
CONFIG_GENERIC_SMP_IDLE_THREAD=y
|
||||
CONFIG_GENERIC_STRNCPY_FROM_USER=y
|
||||
CONFIG_GENERIC_STRNLEN_USER=y
|
||||
CONFIG_GLOB=y
|
||||
CONFIG_GPIOLIB_IRQCHIP=y
|
||||
CONFIG_GPIO_CDEV=y
|
||||
CONFIG_GPIO_FTGPIO010=y
|
||||
CONFIG_GPIO_GENERIC=y
|
||||
CONFIG_GRO_CELLS=y
|
||||
CONFIG_HARDIRQS_SW_RESEND=y
|
||||
CONFIG_HAS_DMA=y
|
||||
CONFIG_HAS_IOMEM=y
|
||||
CONFIG_HAS_IOPORT=y
|
||||
CONFIG_HAS_IOPORT_MAP=y
|
||||
CONFIG_HDMI=y
|
||||
CONFIG_HIGHMEM=y
|
||||
CONFIG_HIGHPTE=y
|
||||
CONFIG_HWMON=y
|
||||
CONFIG_HW_CONSOLE=y
|
||||
CONFIG_HW_RANDOM=y
|
||||
CONFIG_HZ_FIXED=0
|
||||
CONFIG_I2C=y
|
||||
CONFIG_I2C_ALGOBIT=y
|
||||
CONFIG_I2C_BOARDINFO=y
|
||||
CONFIG_I2C_COMPAT=y
|
||||
CONFIG_I2C_GPIO=y
|
||||
CONFIG_I2C_HELPER_AUTO=y
|
||||
CONFIG_INITRAMFS_SOURCE=""
|
||||
CONFIG_INPUT=y
|
||||
CONFIG_INPUT_KEYBOARD=y
|
||||
CONFIG_IO_URING=y
|
||||
CONFIG_IPC_NS=y
|
||||
CONFIG_IRQCHIP=y
|
||||
CONFIG_IRQSTACKS=y
|
||||
CONFIG_IRQ_DOMAIN=y
|
||||
CONFIG_IRQ_FORCED_THREADING=y
|
||||
CONFIG_IRQ_WORK=y
|
||||
# CONFIG_ISDN is not set
|
||||
CONFIG_JBD2=y
|
||||
CONFIG_KALLSYMS=y
|
||||
CONFIG_KCMP=y
|
||||
CONFIG_KERNEL_LZMA=y
|
||||
# CONFIG_KERNEL_XZ is not set
|
||||
CONFIG_KEXEC=y
|
||||
CONFIG_KEXEC_CORE=y
|
||||
CONFIG_KEYBOARD_DLINK_DIR685=y
|
||||
CONFIG_KMAP_LOCAL=y
|
||||
CONFIG_KMAP_LOCAL_NON_LINEAR_PTE_ARRAY=y
|
||||
# CONFIG_LDM_DEBUG is not set
|
||||
CONFIG_LDM_PARTITION=y
|
||||
CONFIG_LEDS_TRIGGER_DISK=y
|
||||
CONFIG_LIBFDT=y
|
||||
CONFIG_LOCK_DEBUGGING_SUPPORT=y
|
||||
CONFIG_LOGO=y
|
||||
CONFIG_LOGO_LINUX_CLUT224=y
|
||||
# CONFIG_LOGO_LINUX_MONO is not set
|
||||
CONFIG_LOGO_LINUX_VGA16=y
|
||||
CONFIG_LZ4_DECOMPRESS=y
|
||||
CONFIG_LZO_DECOMPRESS=y
|
||||
CONFIG_MARVELL_PHY=y
|
||||
CONFIG_MDIO_BITBANG=y
|
||||
CONFIG_MDIO_BUS=y
|
||||
CONFIG_MDIO_DEVICE=y
|
||||
CONFIG_MDIO_DEVRES=y
|
||||
CONFIG_MDIO_GPIO=y
|
||||
CONFIG_MEMORY_ISOLATION=y
|
||||
CONFIG_MFD_SYSCON=y
|
||||
CONFIG_MIGRATION=y
|
||||
CONFIG_MMU_LAZY_TLB_REFCOUNT=y
|
||||
CONFIG_MODULES_USE_ELF_REL=y
|
||||
# CONFIG_MODULE_UNLOAD is not set
|
||||
CONFIG_MQ_IOSCHED_DEADLINE=y
|
||||
CONFIG_MQ_IOSCHED_KYBER=y
|
||||
CONFIG_MTD_CFI_STAA=y
|
||||
CONFIG_MTD_JEDECPROBE=y
|
||||
CONFIG_MTD_PHYSMAP=y
|
||||
CONFIG_MTD_PHYSMAP_GEMINI=y
|
||||
CONFIG_MTD_REDBOOT_PARTS=y
|
||||
CONFIG_MTD_SPLIT_FIRMWARE=y
|
||||
CONFIG_MTD_SPLIT_WRGG_FW=y
|
||||
CONFIG_NAMESPACES=y
|
||||
CONFIG_NEED_DMA_MAP_STATE=y
|
||||
CONFIG_NEED_KUSER_HELPERS=y
|
||||
CONFIG_NEED_PER_CPU_KM=y
|
||||
CONFIG_NEED_SRCU_NMI_SAFE=y
|
||||
CONFIG_NET_DEVLINK=y
|
||||
CONFIG_NET_DSA=y
|
||||
CONFIG_NET_DSA_REALTEK=y
|
||||
# CONFIG_NET_DSA_REALTEK_MDIO is not set
|
||||
# CONFIG_NET_DSA_REALTEK_RTL8365MB is not set
|
||||
CONFIG_NET_DSA_REALTEK_RTL8366RB=y
|
||||
CONFIG_NET_DSA_REALTEK_SMI=y
|
||||
CONFIG_NET_DSA_TAG_RTL4_A=y
|
||||
CONFIG_NET_EGRESS=y
|
||||
CONFIG_NET_INGRESS=y
|
||||
CONFIG_NET_NS=y
|
||||
CONFIG_NET_SELFTESTS=y
|
||||
CONFIG_NET_SWITCHDEV=y
|
||||
CONFIG_NET_XGRESS=y
|
||||
CONFIG_NLS=y
|
||||
CONFIG_NO_HZ_COMMON=y
|
||||
CONFIG_NO_HZ_IDLE=y
|
||||
CONFIG_NVMEM=y
|
||||
CONFIG_NVMEM_LAYOUTS=y
|
||||
CONFIG_OF=y
|
||||
CONFIG_OF_ADDRESS=y
|
||||
CONFIG_OF_EARLY_FLATTREE=y
|
||||
CONFIG_OF_FLATTREE=y
|
||||
CONFIG_OF_GPIO=y
|
||||
CONFIG_OF_IRQ=y
|
||||
CONFIG_OF_KOBJ=y
|
||||
CONFIG_OF_MDIO=y
|
||||
CONFIG_OLD_SIGACTION=y
|
||||
CONFIG_OLD_SIGSUSPEND3=y
|
||||
CONFIG_PAGE_OFFSET=0xC0000000
|
||||
CONFIG_PAGE_POOL=y
|
||||
CONFIG_PAGE_SIZE_LESS_THAN_256KB=y
|
||||
CONFIG_PAGE_SIZE_LESS_THAN_64KB=y
|
||||
CONFIG_PAHOLE_HAS_LANG_EXCLUDE=y
|
||||
# CONFIG_PANIC_ON_OOPS is not set
|
||||
CONFIG_PANIC_ON_OOPS_VALUE=0
|
||||
CONFIG_PANIC_TIMEOUT=0
|
||||
CONFIG_PATA_FTIDE010=y
|
||||
CONFIG_PCI=y
|
||||
CONFIG_PCIEASPM=y
|
||||
CONFIG_PCIEASPM_DEFAULT=y
|
||||
# CONFIG_PCIEASPM_PERFORMANCE is not set
|
||||
# CONFIG_PCIEASPM_POWERSAVE is not set
|
||||
# CONFIG_PCIEASPM_POWER_SUPERSAVE is not set
|
||||
CONFIG_PCI_DOMAINS=y
|
||||
CONFIG_PCI_DOMAINS_GENERIC=y
|
||||
CONFIG_PCI_FTPCI100=y
|
||||
CONFIG_PERF_USE_VMALLOC=y
|
||||
CONFIG_PGTABLE_LEVELS=2
|
||||
CONFIG_PHYLIB=y
|
||||
CONFIG_PHYLIB_LEDS=y
|
||||
CONFIG_PHYLINK=y
|
||||
CONFIG_PID_NS=y
|
||||
CONFIG_PINCTRL=y
|
||||
CONFIG_PINCTRL_GEMINI=y
|
||||
# CONFIG_PINCTRL_SINGLE is not set
|
||||
CONFIG_PM=y
|
||||
CONFIG_PM_CLK=y
|
||||
CONFIG_POWER_RESET=y
|
||||
CONFIG_POWER_RESET_GEMINI_POWEROFF=y
|
||||
CONFIG_POWER_RESET_SYSCON=y
|
||||
CONFIG_PREEMPT=y
|
||||
CONFIG_PREEMPTION=y
|
||||
CONFIG_PREEMPT_BUILD=y
|
||||
CONFIG_PREEMPT_COUNT=y
|
||||
# CONFIG_PREEMPT_NONE is not set
|
||||
CONFIG_PREEMPT_RCU=y
|
||||
CONFIG_PROC_PAGE_MONITOR=y
|
||||
CONFIG_PTP_1588_CLOCK_OPTIONAL=y
|
||||
CONFIG_RANDSTRUCT_NONE=y
|
||||
CONFIG_RATIONAL=y
|
||||
CONFIG_RD_BZIP2=y
|
||||
CONFIG_RD_GZIP=y
|
||||
CONFIG_RD_LZ4=y
|
||||
CONFIG_RD_LZMA=y
|
||||
CONFIG_RD_LZO=y
|
||||
CONFIG_RD_XZ=y
|
||||
CONFIG_REALTEK_PHY=y
|
||||
CONFIG_REGMAP=y
|
||||
CONFIG_REGMAP_I2C=y
|
||||
CONFIG_REGMAP_MMIO=y
|
||||
CONFIG_REGULATOR=y
|
||||
CONFIG_REGULATOR_FIXED_VOLTAGE=y
|
||||
CONFIG_RELAY=y
|
||||
CONFIG_RESET_CONTROLLER=y
|
||||
CONFIG_RSEQ=y
|
||||
CONFIG_RTC_CLASS=y
|
||||
CONFIG_RTC_DRV_FTRTC010=y
|
||||
CONFIG_RTC_I2C_AND_SPI=y
|
||||
CONFIG_RTC_MC146818_LIB=y
|
||||
CONFIG_RTC_NVMEM=y
|
||||
CONFIG_SATA_GEMINI=y
|
||||
CONFIG_SATA_HOST=y
|
||||
CONFIG_SATA_PMP=y
|
||||
CONFIG_SCSI=y
|
||||
CONFIG_SCSI_COMMON=y
|
||||
# CONFIG_SCSI_LOWLEVEL is not set
|
||||
# CONFIG_SCSI_PROC_FS is not set
|
||||
CONFIG_SENSORS_DRIVETEMP=y
|
||||
CONFIG_SENSORS_GPIO_FAN=y
|
||||
CONFIG_SENSORS_LM75=y
|
||||
CONFIG_SERIAL_8250_DEPRECATED_OPTIONS=y
|
||||
CONFIG_SERIAL_8250_EXAR=y
|
||||
CONFIG_SERIAL_8250_FSL=y
|
||||
CONFIG_SERIAL_8250_NR_UARTS=1
|
||||
CONFIG_SERIAL_8250_PCI=y
|
||||
CONFIG_SERIAL_8250_PCILIB=y
|
||||
CONFIG_SERIAL_8250_RUNTIME_UARTS=1
|
||||
CONFIG_SERIAL_MCTRL_GPIO=y
|
||||
CONFIG_SERIAL_OF_PLATFORM=y
|
||||
CONFIG_SERIO=y
|
||||
CONFIG_SERIO_LIBPS2=y
|
||||
CONFIG_SERIO_SERPORT=y
|
||||
CONFIG_SGL_ALLOC=y
|
||||
CONFIG_SG_POOL=y
|
||||
CONFIG_SLUB_DEBUG=y
|
||||
CONFIG_SOFTIRQ_ON_OWN_STACK=y
|
||||
CONFIG_SPARSE_IRQ=y
|
||||
CONFIG_SPI=y
|
||||
CONFIG_SPI_BITBANG=y
|
||||
CONFIG_SPI_GPIO=y
|
||||
CONFIG_SPI_MASTER=y
|
||||
CONFIG_SPLIT_PTLOCK_CPUS=999999
|
||||
CONFIG_SQUASHFS_DECOMP_MULTI_PERCPU=y
|
||||
CONFIG_STACKDEPOT=y
|
||||
CONFIG_STACKTRACE=y
|
||||
# CONFIG_STRIP_ASM_SYMS is not set
|
||||
CONFIG_SWPHY=y
|
||||
CONFIG_SYNC_FILE=y
|
||||
CONFIG_SYSFS_SYSCALL=y
|
||||
CONFIG_SYS_SUPPORTS_APM_EMULATION=y
|
||||
CONFIG_THERMAL=y
|
||||
CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE=y
|
||||
CONFIG_THERMAL_EMERGENCY_POWEROFF_DELAY_MS=0
|
||||
CONFIG_THERMAL_GOV_STEP_WISE=y
|
||||
CONFIG_THERMAL_HWMON=y
|
||||
CONFIG_THERMAL_OF=y
|
||||
CONFIG_THREAD_INFO_IN_TASK=y
|
||||
CONFIG_TICK_CPU_ACCOUNTING=y
|
||||
CONFIG_TIMER_OF=y
|
||||
CONFIG_TIMER_PROBE=y
|
||||
CONFIG_TREE_RCU=y
|
||||
CONFIG_TREE_SRCU=y
|
||||
CONFIG_UNCOMPRESS_INCLUDE="debug/uncompress.h"
|
||||
CONFIG_UNINLINE_SPIN_UNLOCK=y
|
||||
CONFIG_UNWINDER_ARM=y
|
||||
CONFIG_USB_COMMON=y
|
||||
# CONFIG_USB_FOTG210 is not set
|
||||
CONFIG_USB_GADGET=y
|
||||
CONFIG_USB_GPIO_VBUS=y
|
||||
CONFIG_USB_PHY=y
|
||||
CONFIG_USB_SUPPORT=y
|
||||
CONFIG_USER_NS=y
|
||||
CONFIG_USE_OF=y
|
||||
CONFIG_UTS_NS=y
|
||||
CONFIG_VGA_ARB=y
|
||||
CONFIG_VGA_ARB_MAX_GPUS=16
|
||||
CONFIG_VIDEO_CMDLINE=y
|
||||
CONFIG_VIDEO_NOMODESET=y
|
||||
CONFIG_VITESSE_PHY=y
|
||||
CONFIG_VM_EVENT_COUNTERS=y
|
||||
CONFIG_VT=y
|
||||
CONFIG_VT_CONSOLE=y
|
||||
CONFIG_VT_HW_CONSOLE_BINDING=y
|
||||
CONFIG_WATCHDOG_CORE=y
|
||||
# CONFIG_WQ_POWER_EFFICIENT_DEFAULT is not set
|
||||
CONFIG_XZ_DEC_ARM=y
|
||||
CONFIG_XZ_DEC_ARMTHUMB=y
|
||||
CONFIG_XZ_DEC_BCJ=y
|
||||
CONFIG_XZ_DEC_IA64=y
|
||||
CONFIG_XZ_DEC_POWERPC=y
|
||||
CONFIG_XZ_DEC_SPARC=y
|
||||
CONFIG_XZ_DEC_X86=y
|
||||
CONFIG_ZBOOT_ROM_BSS=0
|
||||
CONFIG_ZBOOT_ROM_TEXT=0
|
||||
CONFIG_ZLIB_INFLATE=y
|
||||
1
target/linux/gemini/generic/target.mk
Normal file
1
target/linux/gemini/generic/target.mk
Normal file
@@ -0,0 +1 @@
|
||||
BOARDNAME:=Generic
|
||||
18
target/linux/gemini/image/ImageInfo-itian_sq201
Normal file
18
target/linux/gemini/image/ImageInfo-itian_sq201
Normal file
@@ -0,0 +1,18 @@
|
||||
UpgradeImages="zImage rd.gz hddapp.tgz"
|
||||
Procduction="SL3516"
|
||||
BOOT_VER="1.0.5"
|
||||
FIRMWARE_VER="firmware-openwrt-DATESTR"
|
||||
INTERNAL_FIRMWARE_VER="firmware-openwrt-DATESTR"
|
||||
CONFIGURATION_VER="firmware-openwrt"
|
||||
DESCRIPTION="Square One Router/Nas"
|
||||
TSS="enabled"
|
||||
DIRECT_MODE="disabled"
|
||||
DEFAULT_LAN_IPADDR="192.168.1.1"
|
||||
DEFAULT_LAN_NETMASK="255.255.255.0"
|
||||
DEFAULT_LAN_BOOTPROTO="none"
|
||||
DEFAULT_WAN_BOOTPROTO="dhcp"
|
||||
DEFAULT_WAN_ENABLED="yes"
|
||||
DEFAULT_WLAN_DEVICENAME="eth0"
|
||||
VER_zImage="DATESTR"
|
||||
VER_Ramdisk="DATESTR"
|
||||
VER_hddapp="DATESTR"
|
||||
19
target/linux/gemini/image/ImageInfo-raidsonic_ib-4220-b
Normal file
19
target/linux/gemini/image/ImageInfo-raidsonic_ib-4220-b
Normal file
@@ -0,0 +1,19 @@
|
||||
Distribution="OpenWrt"
|
||||
Layout="Compact"
|
||||
UpgradeImages="zImage rd.gz hddapp.tgz"
|
||||
productName="IB-NAS4220-B"
|
||||
hardwareName="MP-LNU23SL"
|
||||
productVendor=" "
|
||||
VendorID="macpower"
|
||||
ProductID="pddlan"
|
||||
UpgradeVersion="300"
|
||||
ExtraVersion=""
|
||||
manufacturerURL=" "
|
||||
Description="IB-NAS4220-B"
|
||||
hostname="IB-NAS4220-B"
|
||||
softwareVersion="3.0"
|
||||
TSS="enabled"
|
||||
DIRECT_MODE="disabled"
|
||||
Raid_Support="raid0_raid1_raid5_linear"
|
||||
RaidTestDiskSize="0"
|
||||
Raid_Show_Disk="2"
|
||||
18
target/linux/gemini/image/ImageInfo-storlink_sl93512r
Normal file
18
target/linux/gemini/image/ImageInfo-storlink_sl93512r
Normal file
@@ -0,0 +1,18 @@
|
||||
UpgradeImages="zImage rd.gz hddapp.tgz"
|
||||
Procduction="SL3516"
|
||||
BOOT_VER="1.0.5"
|
||||
FIRMWARE_VER="firmware-openwrt-DATESTR"
|
||||
INTERNAL_FIRMWARE_VER="firmware-openwrt-DATESTR"
|
||||
CONFIGURATION_VER="firmware-openwrt"
|
||||
DESCRIPTION="Storlink SL93512r Reference Design"
|
||||
TSS="enabled"
|
||||
DIRECT_MODE="disabled"
|
||||
DEFAULT_LAN_IPADDR="192.168.1.1"
|
||||
DEFAULT_LAN_NETMASK="255.255.255.0"
|
||||
DEFAULT_LAN_BOOTPROTO="none"
|
||||
DEFAULT_WAN_BOOTPROTO="dhcp"
|
||||
DEFAULT_WAN_ENABLED="yes"
|
||||
DEFAULT_WLAN_DEVICENAME="eth0"
|
||||
VER_zImage="DATESTR"
|
||||
VER_Ramdisk="DATESTR"
|
||||
VER_hddapp="DATESTR"
|
||||
244
target/linux/gemini/image/Makefile
Normal file
244
target/linux/gemini/image/Makefile
Normal file
@@ -0,0 +1,244 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
#
|
||||
# Copyright (C) 2009-2018 OpenWrt.org
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/image.mk
|
||||
|
||||
define Build/copy-kernel.bin
|
||||
$(call locked,$(MAKE) -C copy-kernel CROSS_COMPILE=$(TARGET_CROSS) O=$(KDIR),gemini-copy-kernel.bin)
|
||||
endef
|
||||
|
||||
# Cook a "WRGG" image, this board is apparently one in the D-Link
|
||||
# WRGG family and uses the exact same firmware format as other
|
||||
# D-Link devices.
|
||||
define Build/dir685-image
|
||||
mkwrggimg -i $@ \
|
||||
-o $@.new \
|
||||
-d /dev/mtdblock/1 \
|
||||
-s wrgns01_dlwbr_dir685RBWW \
|
||||
-v 'N/A' \
|
||||
-m dir685 \
|
||||
-B 96bb
|
||||
|
||||
mv $@.new $@
|
||||
endef
|
||||
|
||||
# Padding added after the rootfs to an even 128k boundary
|
||||
# as this is 128k eraseblocks flash.
|
||||
define Build/dir685-pad-rootfs
|
||||
$(STAGING_DIR_HOST)/bin/padjffs2 $(IMAGE_ROOTFS) -c 128 >>$@
|
||||
endef
|
||||
|
||||
# Build D-Link DNS-313 images using the special header tool.
|
||||
# rootfs.tgz and rd.tgz contains nothing, we only need them
|
||||
# to satisfy the boot loader on the device. The zImage is
|
||||
# the only real content.
|
||||
define Build/dns313-images
|
||||
mkdir -p $@.tmp/.boot
|
||||
chmod 755 $@.tmp/.boot
|
||||
|
||||
echo "dummy" > $@.tmp/dummyfile
|
||||
|
||||
dns313-header $@.tmp/dummyfile \
|
||||
$@.tmp/.boot/rootfs.tgz
|
||||
dns313-header $@.tmp/dummyfile \
|
||||
$@.tmp/.boot/rd.gz
|
||||
dns313-header $(IMAGE_KERNEL) \
|
||||
$@.tmp/.boot/zImage
|
||||
|
||||
rm $@.tmp/dummyfile
|
||||
|
||||
genext2fs --block-size $(BLOCKSIZE:%k=%Ki) \
|
||||
--size-in-blocks $$((1024 * $(CONFIG_TARGET_KERNEL_PARTSIZE))) \
|
||||
--squash-uids \
|
||||
--root $@.tmp $@.tmp-boot
|
||||
|
||||
# The device firmware needs revision 1 of EXT2
|
||||
$(STAGING_DIR_HOST)/bin/tune2fs -O filetype $@.tmp-boot
|
||||
# Ignore errors because file system was intentionally broken with tune2fs
|
||||
-$(STAGING_DIR_HOST)/bin/e2fsck -pDf $@.tmp-boot > /dev/null
|
||||
|
||||
./dns313_gen_hdd_img.sh $@ $@.tmp-boot $(IMAGE_ROOTFS) \
|
||||
$(CONFIG_TARGET_KERNEL_PARTSIZE) \
|
||||
$(CONFIG_TARGET_ROOTFS_PARTSIZE)
|
||||
|
||||
rm -rf $@.tmp
|
||||
endef
|
||||
|
||||
define Build/wiligear-image
|
||||
$(STAGING_DIR_HOST)/bin/mkfwimage2 \
|
||||
-m GEOS -f 0x30000000 -z \
|
||||
-v $(1).v5.00.SL3512.OpenWrt.00000.000000.000000 \
|
||||
-p Kernel:0x020000:0x100000:0:0:$(IMAGE_KERNEL) \
|
||||
-p Ramdisk:0x120000:0x500000:0:0:$@ \
|
||||
-o $@.new
|
||||
|
||||
mv $@.new $@
|
||||
endef
|
||||
|
||||
# Create the default image format used by the StorLink reference design
|
||||
# SL93512r, Raidsonic NAS4220B and Itian Square One SQ201
|
||||
# with the squashfs and overlay inside the "application" partition.
|
||||
#
|
||||
# These devices have a hard-coded partition table that the boot loader
|
||||
# constantly reflashes back, so we need to work around it like this:
|
||||
#
|
||||
# 0x000000120000-0x000000320000 : "Kern" - small copy routine and first
|
||||
# part of the kernel goes here
|
||||
# 0x000000320000-0x000000920000 : "Ramdisk" - second part of the kernel and
|
||||
# some padding goes here
|
||||
# 0x000000920000-0x000000f20000 : "Application" - rootfs goes here
|
||||
define Build/storlink-default-images
|
||||
mkdir -p $@.tmp
|
||||
|
||||
# "App" partition is the rootfs
|
||||
mv $@ $@.tmp/hddapp.tgz
|
||||
# 256 bytes copy routine
|
||||
dd if=$(KDIR)/copy-kernel.bin of=$@.tmp/zImage
|
||||
$(call Image/pad-to,$@.tmp/zImage,512)
|
||||
# Copy first part of the kernel into zImage
|
||||
dd if=$(IMAGE_KERNEL) of=$@.tmp/zImage bs=1 seek=512 count=2096640
|
||||
# Put the rest of the kernel into the "ramdisk"
|
||||
dd if=$(IMAGE_KERNEL) of=$@.tmp/rd.gz bs=1 skip=2096640 count=6144k conv=sync
|
||||
cp ./ImageInfo-$(1) $@.tmp/ImageInfo
|
||||
|
||||
sed -i -e "s/DATESTR/`date +%Y%m%d $(if $(SOURCE_DATE_EPOCH),--date "@$(SOURCE_DATE_EPOCH)")`/g" $@.tmp/ImageInfo
|
||||
|
||||
(cd $@.tmp; tar --sort=name --owner=0 --group=0 --numeric-owner -czf $@ * \
|
||||
$(if $(SOURCE_DATE_EPOCH),--mtime="@$(SOURCE_DATE_EPOCH)"))
|
||||
|
||||
rm -rf $@.tmp
|
||||
endef
|
||||
|
||||
# WBD-111 and WBD-222:
|
||||
# work around the bootloader's bug with extra nops
|
||||
# FIXME: is this really needed now that we no longer append the code
|
||||
# to change the machine ID number? Needs testing on Wiliboard.
|
||||
define Build/wbd-nops
|
||||
mv $@ $@.tmp
|
||||
echo -en "\x00\x00\xa0\xe1\x00\x00\xa0\xe1\x00\x00\xa0\xe1\x00\x00\xa0\xe1" > $@
|
||||
cat $@.tmp >> $@
|
||||
rm -f $@.tmp
|
||||
endef
|
||||
|
||||
# All DTB files are prefixed with "gemini-"
|
||||
define Device/Default
|
||||
PROFILES := Default
|
||||
DEVICE_DTS_DIR = $$(DTS_DIR)/gemini
|
||||
KERNEL_DEPENDS = $$(wildcard $(DTS_DIR)/$$(DEVICE_DTS).dts)
|
||||
KERNEL_NAME := zImage
|
||||
KERNEL := kernel-bin | append-dtb
|
||||
BLOCKSIZE := 128k
|
||||
endef
|
||||
|
||||
# A reasonable set of default packages handling the NAS type
|
||||
# of devices out of the box (former NAS42x0 IcyBox defaults)
|
||||
GEMINI_NAS_PACKAGES := $(DEFAULT_PACKAGES.nas) \
|
||||
kmod-md-mod kmod-md-linear kmod-md-multipath \
|
||||
kmod-md-raid0 kmod-md-raid1 kmod-md-raid10 kmod-md-raid456 \
|
||||
kmod-fs-btrfs kmod-fs-cifs kmod-fs-nfs \
|
||||
kmod-fs-nfsd kmod-fs-ntfs kmod-fs-reiserfs kmod-fs-vfat \
|
||||
kmod-nls-utf8 kmod-usb-storage-extras kmod-hwmon-drivetemp \
|
||||
cfdisk e2fsprogs badblocks \
|
||||
partx-utils
|
||||
|
||||
# The DIR-685 flash layout is kernel in WRGG format, padded and followed
|
||||
# by the appended rootfs followed by some reasonable JFFS padding, the
|
||||
# remainder will be used by JFFS2 through overlayfs.
|
||||
#
|
||||
# - For the factory image, the WRGG image includes the rootfs so that the
|
||||
# default firmware will flash it properly as all it knows is WRGG format.
|
||||
# - For the sysupgrade, we do not include the rootfs in the kernel image
|
||||
# so it is not needelessly tossed into the RAM by the boot loader.
|
||||
# This will be flashed from OpenWrt userland anyways so we only need
|
||||
# the minimum to make the boot loader happy.
|
||||
define Device/dlink_dir-685
|
||||
DEVICE_VENDOR := D-Link
|
||||
DEVICE_MODEL := DIR-685 Xtreme N Storage Router
|
||||
DEVICE_DTS := gemini-dlink-dir-685
|
||||
DEVICE_PACKAGES := $(GEMINI_NAS_PACKAGES) \
|
||||
kmod-rt2800-pci
|
||||
IMAGES := factory.bin sysupgrade.bin
|
||||
# Pad to 128k erase blocks with 160 bytes WRGG header
|
||||
IMAGE/factory.bin := append-kernel | pad-offset 128k 160 | append-rootfs | dir685-pad-rootfs | dir685-image
|
||||
IMAGE/sysupgrade.bin := append-kernel | pad-offset 128k 160 | dir685-image | append-rootfs | dir685-pad-rootfs | append-metadata
|
||||
endef
|
||||
TARGET_DEVICES += dlink_dir-685
|
||||
|
||||
define Device/dlink_dns-313
|
||||
DEVICE_VENDOR := D-Link
|
||||
DEVICE_MODEL := DNS-313 1-Bay Network Storage Enclosure
|
||||
DEVICE_DTS := gemini-dlink-dns-313
|
||||
DEVICE_PACKAGES := $(GEMINI_NAS_PACKAGES)
|
||||
BLOCKSIZE := 1k
|
||||
FILESYSTEMS := ext4
|
||||
IMAGES := factory.bin.gz
|
||||
IMAGE/factory.bin.gz := dns313-images | gzip
|
||||
endef
|
||||
TARGET_DEVICES += dlink_dns-313
|
||||
|
||||
# Default images setup used by the StorLink reference designs
|
||||
define Device/storlink-reference
|
||||
COMPILE := copy-kernel-$(1).bin
|
||||
COMPILE/copy-kernel-$(1).bin := copy-kernel.bin
|
||||
IMAGES := factory.bin
|
||||
FILESYSTEMS := squashfs
|
||||
IMAGE/factory.bin := append-rootfs | pad-rootfs | pad-to 6144k | \
|
||||
storlink-default-images $(1)
|
||||
DEVICE_PACKAGES := $(GEMINI_NAS_PACKAGES)
|
||||
endef
|
||||
|
||||
define Device/itian_sq201
|
||||
$(Device/storlink-reference)
|
||||
DEVICE_VENDOR := ITian
|
||||
DEVICE_MODEL := Square One SQ201
|
||||
DEVICE_DTS := gemini-sq201
|
||||
DEVICE_PACKAGES += kmod-rt61-pci kmod-usb2-pci
|
||||
endef
|
||||
TARGET_DEVICES += itian_sq201
|
||||
|
||||
define Device/raidsonic_ib-4220-b
|
||||
$(Device/storlink-reference)
|
||||
DEVICE_VENDOR := Raidsonic
|
||||
DEVICE_MODEL := NAS IB-4220-B
|
||||
DEVICE_DTS := gemini-nas4220b
|
||||
endef
|
||||
TARGET_DEVICES += raidsonic_ib-4220-b
|
||||
|
||||
define Device/storlink_sl93512r
|
||||
$(Device/storlink-reference)
|
||||
DEVICE_VENDOR := StorLink
|
||||
DEVICE_MODEL := SL93512r
|
||||
DEVICE_DTS := gemini-sl93512r
|
||||
endef
|
||||
TARGET_DEVICES += storlink_sl93512r
|
||||
|
||||
|
||||
# The wiliboard images need some changes to be functional and buildable.
|
||||
#
|
||||
# The dts would need to use the redboot-fis partition parser to get
|
||||
# the correct partition offsets and size.
|
||||
#
|
||||
# The mkfwimage2 call need to be adjusted to reflect the real size of kernel
|
||||
# and rootfs. It is expected that the OEM firmware adjusts the on flash
|
||||
# partition table with the values defined in the image header.
|
||||
define Device/wiliboard_wbd111
|
||||
DEVICE_VENDOR := Wiliboard
|
||||
DEVICE_MODEL := WBD-111
|
||||
DEVICE_DTS := gemini-wbd111
|
||||
KERNEL := kernel-bin | append-dtb | wbd-nops
|
||||
IMAGES := factory.bin
|
||||
IMAGE/factory.bin := append-rootfs | pad-rootfs | wiligear-image "WILI-S.WILIBOARD"
|
||||
endef
|
||||
|
||||
define Device/wiliboard_wbd222
|
||||
DEVICE_VENDOR := Wiliboard
|
||||
DEVICE_MODEL := WBD-222
|
||||
DEVICE_DTS := gemini-wbd222
|
||||
KERNEL := kernel-bin | append-dtb | wbd-nops
|
||||
IMAGES := factory.bin
|
||||
IMAGE/factory.bin := append-rootfs | pad-rootfs | wiligear-image "WILI-S.WBD222"
|
||||
endef
|
||||
|
||||
$(eval $(call BuildImage))
|
||||
1
target/linux/gemini/image/copy-kernel/.gitignore
vendored
Normal file
1
target/linux/gemini/image/copy-kernel/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
copy-kernel.bin
|
||||
38
target/linux/gemini/image/copy-kernel/Makefile
Normal file
38
target/linux/gemini/image/copy-kernel/Makefile
Normal file
@@ -0,0 +1,38 @@
|
||||
#
|
||||
# Makefile for Gemin kernel copy stub
|
||||
#
|
||||
# Copyright (C) 2019 Linus Walleij <linus.walleij@linaro.org>
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
AS := $(CROSS_COMPILE)as
|
||||
OBJCOPY := $(CROSS_COMPILE)objcopy
|
||||
|
||||
BIN_FLAGS := -O binary -S
|
||||
|
||||
SRC_DIR := $(CURDIR)/
|
||||
OUT_DIR := $(if $(O),$(if $(patsubst %/,,$(O)),$(O)/,$(O)),$(SRC_DIR))
|
||||
|
||||
all: $(OUT_DIR)copy-kernel.bin
|
||||
|
||||
# Don't build dependencies, this may die if $(CC) isn't gcc
|
||||
dep:
|
||||
|
||||
install:
|
||||
|
||||
$(OUT_DIR):
|
||||
mkdir -p $(OUT_DIR)
|
||||
|
||||
$(OUT_DIR)%.o : $(SRC_DIR)%.S | $(OUT_DIR)
|
||||
$(AS) $(ASFLAGS) -k -o $@ $<
|
||||
|
||||
$(OUT_DIR)%.bin: $(OUT_DIR)%.o
|
||||
$(OBJCOPY) $(BIN_FLAGS) $< $@
|
||||
|
||||
mrproper: clean
|
||||
|
||||
clean:
|
||||
rm -f $(OUT_DIR)copy-kernel.bin $(OUT_DIR)copy-kernel.o
|
||||
45
target/linux/gemini/image/copy-kernel/copy-kernel.S
Normal file
45
target/linux/gemini/image/copy-kernel/copy-kernel.S
Normal file
@@ -0,0 +1,45 @@
|
||||
// Arm assembly to copy the Gemini kernel on Storlink reference
|
||||
// designs and derived devices with the same flash layout and
|
||||
// boot loader.
|
||||
//
|
||||
// This will execute at 0x01600000
|
||||
//
|
||||
// Copies the kernel from two fragments (originally zImage
|
||||
// and initramdisk) to 0x00400000 making space for a kernel
|
||||
// image of up to 8 MB except for these 512 bytes used for
|
||||
// this bootstrap.
|
||||
//
|
||||
// 0x01600200 .. 0x017fffff -> 0x00400000 .. 0x005ffdff
|
||||
// 0x00800000 .. 0x00dfffff -> 0x005ffe00 .. 0x00bffdff
|
||||
|
||||
// Memory used for this bootstrap
|
||||
.equ BOOT_HEADROOM, 0x200
|
||||
|
||||
.global _start // Stand-alone assembly code
|
||||
_start:
|
||||
mov r1, #0x01600000
|
||||
mov r2, #0x00400000
|
||||
mov r3, #0x00200000
|
||||
add r1, r1, #BOOT_HEADROOM
|
||||
sub r3, r3, #BOOT_HEADROOM
|
||||
copyloop1:
|
||||
ldr r0, [r1]
|
||||
str r0, [r2]
|
||||
add r1, r1, #4
|
||||
add r2, r2, #4
|
||||
sub r3, r3, #4
|
||||
cmp r3, #0
|
||||
bne copyloop1
|
||||
mov r1, #0x00800000
|
||||
mov r3, #0x00600000
|
||||
copyloop2:
|
||||
ldr r0, [r1]
|
||||
str r0, [r2]
|
||||
add r1, r1, #4
|
||||
add r2, r2, #4
|
||||
sub r3, r3, #4
|
||||
cmp r3, #0
|
||||
bne copyloop2
|
||||
mov r0, #0x00400000
|
||||
// Let's go
|
||||
mov pc, r0
|
||||
34
target/linux/gemini/image/dns313_gen_hdd_img.sh
Executable file
34
target/linux/gemini/image/dns313_gen_hdd_img.sh
Executable file
@@ -0,0 +1,34 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -x
|
||||
[ $# -eq 5 ] || {
|
||||
echo "SYNTAX: $0 <file> <bootfs image> <rootfs image> <bootfs size> <rootfs size>"
|
||||
exit 1
|
||||
}
|
||||
|
||||
OUTPUT="$1"
|
||||
BOOTFS="$2"
|
||||
ROOTFS="$3"
|
||||
BOOTFSSIZE="$4"
|
||||
ROOTFSSIZE="$5"
|
||||
|
||||
head=4
|
||||
sect=63
|
||||
|
||||
# Create one empty partitions followed by the swap partition, then the
|
||||
# boot partition with the ./boot/zImage and then the rootfs partition.
|
||||
# The swap partition with type 82 is 128 MB since the DNS-313 has 64 MB of
|
||||
# memory so we assign twice of that as swap.
|
||||
# The boot partition must always be the third partition.
|
||||
# The user should use the first (blank) partition for user data storage,
|
||||
# this will typically be named /dev/sda1
|
||||
set $(ptgen -o $OUTPUT -h $head -s $sect -n -t 83 -p 0 -t 82 -p 128M -t 83 -p ${BOOTFSSIZE}M -t 83 -p ${ROOTFSSIZE}M)
|
||||
|
||||
# Swapoffset and swapsize will be $1 and $2
|
||||
BOOTOFFSET="$(($3 / 512))"
|
||||
BOOTSIZE="$(($4 / 512))"
|
||||
ROOTFSOFFSET="$(($5 / 512))"
|
||||
ROOTFSSIZE="$(($6 / 512))"
|
||||
|
||||
dd bs=512 if="$BOOTFS" of="$OUTPUT" seek="$BOOTOFFSET" conv=notrunc
|
||||
dd bs=512 if="$ROOTFS" of="$OUTPUT" seek="$ROOTFSOFFSET" conv=notrunc
|
||||
13
target/linux/gemini/modules.mk
Normal file
13
target/linux/gemini/modules.mk
Normal file
@@ -0,0 +1,13 @@
|
||||
define KernelPackage/usb-fotg210
|
||||
TITLE:=Support for FOTG210 USB host and device controllers
|
||||
DEPENDS:=@TARGET_gemini
|
||||
KCONFIG:= \
|
||||
CONFIG_USB_FOTG210 \
|
||||
CONFIG_USB_FOTG210_HCD=y \
|
||||
CONFIG_USB_FOTG210_UDC=y
|
||||
FILES:=$(LINUX_DIR)/drivers/usb/fotg210/fotg210.ko
|
||||
AUTOLOAD:=$(call AutoLoad,50,fotg210,1)
|
||||
$(call AddDepends/usb)
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,usb-fotg210))
|
||||
@@ -0,0 +1,103 @@
|
||||
From 091cde88b5ff2a2ca5739ce41f9cf5640a95222f Mon Sep 17 00:00:00 2001
|
||||
From: Linus Walleij <linus.walleij@linaro.org>
|
||||
Date: Sun, 11 Feb 2024 22:24:25 +0100
|
||||
Subject: [PATCH] ARM: dts: gemini: Map reset keys to KEY_RESTART
|
||||
|
||||
This maps the misc "reset", "setup" and "facory reset" keys to the
|
||||
only key a standard userspace is likely to understand: KEY_RESTART.
|
||||
On OpenWrt this will simply restart the system under controlled
|
||||
forms.
|
||||
|
||||
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
|
||||
Link: https://lore.kernel.org/r/20240211-gemini-dts-v1-3-6c09adeb4c2e@linaro.org
|
||||
---
|
||||
arch/arm/boot/dts/gemini/gemini-dlink-dir-685.dts | 4 ++--
|
||||
arch/arm/boot/dts/gemini/gemini-dlink-dns-313.dts | 4 ++--
|
||||
arch/arm/boot/dts/gemini/gemini-sl93512r.dts | 2 +-
|
||||
arch/arm/boot/dts/gemini/gemini-sq201.dts | 2 +-
|
||||
arch/arm/boot/dts/gemini/gemini-wbd111.dts | 4 ++--
|
||||
arch/arm/boot/dts/gemini/gemini-wbd222.dts | 4 ++--
|
||||
6 files changed, 10 insertions(+), 10 deletions(-)
|
||||
|
||||
--- a/arch/arm/boot/dts/gemini/gemini-dlink-dir-685.dts
|
||||
+++ b/arch/arm/boot/dts/gemini/gemini-dlink-dir-685.dts
|
||||
@@ -27,10 +27,10 @@
|
||||
gpio_keys {
|
||||
compatible = "gpio-keys";
|
||||
|
||||
- button-esc {
|
||||
+ button-reset {
|
||||
debounce-interval = <100>;
|
||||
wakeup-source;
|
||||
- linux,code = <KEY_ESC>;
|
||||
+ linux,code = <KEY_RESTART>;
|
||||
label = "reset";
|
||||
/* Collides with LPC_LAD[0], UART DCD, SSP 97RST */
|
||||
gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
|
||||
--- a/arch/arm/boot/dts/gemini/gemini-dlink-dns-313.dts
|
||||
+++ b/arch/arm/boot/dts/gemini/gemini-dlink-dns-313.dts
|
||||
@@ -33,10 +33,10 @@
|
||||
gpio_keys {
|
||||
compatible = "gpio-keys";
|
||||
|
||||
- button-esc {
|
||||
+ button-reset {
|
||||
debounce-interval = <100>;
|
||||
wakeup-source;
|
||||
- linux,code = <KEY_ESC>;
|
||||
+ linux,code = <KEY_RESTART>;
|
||||
label = "reset";
|
||||
gpios = <&gpio1 31 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
--- a/arch/arm/boot/dts/gemini/gemini-sl93512r.dts
|
||||
+++ b/arch/arm/boot/dts/gemini/gemini-sl93512r.dts
|
||||
@@ -43,7 +43,7 @@
|
||||
button-setup {
|
||||
debounce-interval = <50>;
|
||||
wakeup-source;
|
||||
- linux,code = <KEY_SETUP>;
|
||||
+ linux,code = <KEY_RESTART>;
|
||||
label = "factory reset";
|
||||
/* Conflict with NAND flash */
|
||||
gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
|
||||
--- a/arch/arm/boot/dts/gemini/gemini-sq201.dts
|
||||
+++ b/arch/arm/boot/dts/gemini/gemini-sq201.dts
|
||||
@@ -30,7 +30,7 @@
|
||||
button-setup {
|
||||
debounce-interval = <100>;
|
||||
wakeup-source;
|
||||
- linux,code = <KEY_SETUP>;
|
||||
+ linux,code = <KEY_RESTART>;
|
||||
label = "factory reset";
|
||||
/* Conflict with NAND flash */
|
||||
gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
|
||||
--- a/arch/arm/boot/dts/gemini/gemini-wbd111.dts
|
||||
+++ b/arch/arm/boot/dts/gemini/gemini-wbd111.dts
|
||||
@@ -28,10 +28,10 @@
|
||||
gpio_keys {
|
||||
compatible = "gpio-keys";
|
||||
|
||||
- button-setup {
|
||||
+ button-reset {
|
||||
debounce-interval = <100>;
|
||||
wakeup-source;
|
||||
- linux,code = <KEY_SETUP>;
|
||||
+ linux,code = <KEY_RESTART>;
|
||||
label = "reset";
|
||||
/* Conflict with ICE */
|
||||
gpios = <&gpio0 5 GPIO_ACTIVE_LOW>;
|
||||
--- a/arch/arm/boot/dts/gemini/gemini-wbd222.dts
|
||||
+++ b/arch/arm/boot/dts/gemini/gemini-wbd222.dts
|
||||
@@ -27,10 +27,10 @@
|
||||
gpio_keys {
|
||||
compatible = "gpio-keys";
|
||||
|
||||
- button-setup {
|
||||
+ button-reset {
|
||||
debounce-interval = <100>;
|
||||
wakeup-source;
|
||||
- linux,code = <KEY_SETUP>;
|
||||
+ linux,code = <KEY_RESTART>;
|
||||
label = "reset";
|
||||
/* Conflict with ICE */
|
||||
gpios = <&gpio0 5 GPIO_ACTIVE_LOW>;
|
||||
@@ -0,0 +1,95 @@
|
||||
From 91fb8a7328dda827bc6c0da240a1eb17028416cd Mon Sep 17 00:00:00 2001
|
||||
From: Linus Walleij <linus.walleij@linaro.org>
|
||||
Date: Thu, 9 May 2024 23:59:28 +0200
|
||||
Subject: [PATCH 2/5] net: ethernet: cortina: Use TSO also on common TCP
|
||||
|
||||
It is possible to push the segment offloader to also
|
||||
process non-segmented frames: just pass the skb->len
|
||||
or desired MSS to the offloader and it will handle them.
|
||||
|
||||
This is especially good if the user sets up the MTU
|
||||
and the frames get big, because the checksumming engine
|
||||
cannot handle any frames bigger than 1518 bytes, so
|
||||
segmenting them all to be at max that will be helpful
|
||||
for the hardware, which only need to quirk odd frames
|
||||
such as big UDP ping packets.
|
||||
|
||||
The vendor driver always uses the TSO like this, and
|
||||
the driver seems more stable after this, so apparently
|
||||
the hardware may have been engineered to always use
|
||||
the TSO on anything it can handle.
|
||||
|
||||
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
|
||||
---
|
||||
drivers/net/ethernet/cortina/gemini.c | 31 +++++++++++++++++++++------
|
||||
1 file changed, 24 insertions(+), 7 deletions(-)
|
||||
|
||||
--- a/drivers/net/ethernet/cortina/gemini.c
|
||||
+++ b/drivers/net/ethernet/cortina/gemini.c
|
||||
@@ -1148,6 +1148,7 @@ static int gmac_map_tx_bufs(struct net_d
|
||||
struct gmac_txdesc *txd;
|
||||
skb_frag_t *skb_frag;
|
||||
dma_addr_t mapping;
|
||||
+ bool tcp = false;
|
||||
void *buffer;
|
||||
u16 mss;
|
||||
int ret;
|
||||
@@ -1155,6 +1156,13 @@ static int gmac_map_tx_bufs(struct net_d
|
||||
word1 = skb->len;
|
||||
word3 = SOF_BIT;
|
||||
|
||||
+ /* Determine if we are doing TCP */
|
||||
+ if (skb->protocol == htons(ETH_P_IP))
|
||||
+ tcp = (ip_hdr(skb)->protocol == IPPROTO_TCP);
|
||||
+ else
|
||||
+ /* IPv6 */
|
||||
+ tcp = (ipv6_hdr(skb)->nexthdr == IPPROTO_TCP);
|
||||
+
|
||||
mss = skb_shinfo(skb)->gso_size;
|
||||
if (mss) {
|
||||
/* This means we are dealing with TCP and skb->len is the
|
||||
@@ -1167,6 +1175,20 @@ static int gmac_map_tx_bufs(struct net_d
|
||||
mss, skb->len);
|
||||
word1 |= TSS_MTU_ENABLE_BIT;
|
||||
word3 |= mss;
|
||||
+ } else if (tcp) {
|
||||
+ /* Even if we are not using TSO, use the segment offloader
|
||||
+ * for transferring the TCP frame: the TSO engine will deal
|
||||
+ * with chopping up frames that exceed ETH_DATA_LEN which
|
||||
+ * the checksumming engine cannot handle (see below) into
|
||||
+ * manageable chunks. It flawlessly deals with quite big
|
||||
+ * frames and frames containing custom DSA EtherTypes.
|
||||
+ */
|
||||
+ mss = netdev->mtu + skb_tcp_all_headers(skb);
|
||||
+ mss = min(mss, skb->len);
|
||||
+ netdev_dbg(netdev, "botched TSO len %04x mtu %04x mss %04x\n",
|
||||
+ skb->len, netdev->mtu, mss);
|
||||
+ word1 |= TSS_MTU_ENABLE_BIT;
|
||||
+ word3 |= mss;
|
||||
} else if (skb->len >= ETH_FRAME_LEN) {
|
||||
/* Hardware offloaded checksumming isn't working on frames
|
||||
* bigger than 1514 bytes. A hypothesis about this is that the
|
||||
@@ -1185,21 +1207,16 @@ static int gmac_map_tx_bufs(struct net_d
|
||||
}
|
||||
|
||||
if (skb->ip_summed == CHECKSUM_PARTIAL) {
|
||||
- int tcp = 0;
|
||||
-
|
||||
/* We do not switch off the checksumming on non TCP/UDP
|
||||
* frames: as is shown from tests, the checksumming engine
|
||||
* is smart enough to see that a frame is not actually TCP
|
||||
* or UDP and then just pass it through without any changes
|
||||
* to the frame.
|
||||
*/
|
||||
- if (skb->protocol == htons(ETH_P_IP)) {
|
||||
+ if (skb->protocol == htons(ETH_P_IP))
|
||||
word1 |= TSS_IP_CHKSUM_BIT;
|
||||
- tcp = ip_hdr(skb)->protocol == IPPROTO_TCP;
|
||||
- } else { /* IPv6 */
|
||||
+ else
|
||||
word1 |= TSS_IPV6_ENABLE_BIT;
|
||||
- tcp = ipv6_hdr(skb)->nexthdr == IPPROTO_TCP;
|
||||
- }
|
||||
|
||||
word1 |= tcp ? TSS_TCP_CHKSUM_BIT : TSS_UDP_CHKSUM_BIT;
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
From fa01c904b844e6033445f75b0b4d46a8e83b6086 Mon Sep 17 00:00:00 2001
|
||||
From: Linus Walleij <linus.walleij@linaro.org>
|
||||
Date: Fri, 10 May 2024 19:48:27 +0200
|
||||
Subject: [PATCH 3/5] net: ethernet: cortina: Rename adjust link callback
|
||||
|
||||
The callback passed to of_phy_get_and_connect() in the
|
||||
Cortina Gemini driver is called "gmac_speed_set" which is
|
||||
archaic, rename it to "gmac_adjust_link" following the
|
||||
pattern of most other drivers.
|
||||
|
||||
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
|
||||
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
|
||||
---
|
||||
drivers/net/ethernet/cortina/gemini.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
--- a/drivers/net/ethernet/cortina/gemini.c
|
||||
+++ b/drivers/net/ethernet/cortina/gemini.c
|
||||
@@ -288,7 +288,7 @@ static void gmac_set_flow_control(struct
|
||||
spin_unlock_irqrestore(&port->config_lock, flags);
|
||||
}
|
||||
|
||||
-static void gmac_speed_set(struct net_device *netdev)
|
||||
+static void gmac_adjust_link(struct net_device *netdev)
|
||||
{
|
||||
struct gemini_ethernet_port *port = netdev_priv(netdev);
|
||||
struct phy_device *phydev = netdev->phydev;
|
||||
@@ -367,7 +367,7 @@ static int gmac_setup_phy(struct net_dev
|
||||
|
||||
phy = of_phy_get_and_connect(netdev,
|
||||
dev->of_node,
|
||||
- gmac_speed_set);
|
||||
+ gmac_adjust_link);
|
||||
if (!phy)
|
||||
return -ENODEV;
|
||||
netdev->phydev = phy;
|
||||
@@ -0,0 +1,46 @@
|
||||
From 50ac9765c674bac803719c6b8294670edc6df31d Mon Sep 17 00:00:00 2001
|
||||
From: Linus Walleij <linus.walleij@linaro.org>
|
||||
Date: Fri, 10 May 2024 19:44:39 +0200
|
||||
Subject: [PATCH 4/5] net: ethernet: cortina: Use negotiated TX/RX pause
|
||||
|
||||
Instead of directly poking into registers of the PHY, use
|
||||
the existing function to query phylib about this directly.
|
||||
|
||||
Suggested-by: Andrew Lunn <andrew@lunn.ch>
|
||||
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
|
||||
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
|
||||
---
|
||||
drivers/net/ethernet/cortina/gemini.c | 15 +++++----------
|
||||
1 file changed, 5 insertions(+), 10 deletions(-)
|
||||
|
||||
--- a/drivers/net/ethernet/cortina/gemini.c
|
||||
+++ b/drivers/net/ethernet/cortina/gemini.c
|
||||
@@ -293,8 +293,8 @@ static void gmac_adjust_link(struct net_
|
||||
struct gemini_ethernet_port *port = netdev_priv(netdev);
|
||||
struct phy_device *phydev = netdev->phydev;
|
||||
union gmac_status status, old_status;
|
||||
- int pause_tx = 0;
|
||||
- int pause_rx = 0;
|
||||
+ bool pause_tx = false;
|
||||
+ bool pause_rx = false;
|
||||
|
||||
status.bits32 = readl(port->gmac_base + GMAC_STATUS);
|
||||
old_status.bits32 = status.bits32;
|
||||
@@ -329,14 +329,9 @@ static void gmac_adjust_link(struct net_
|
||||
}
|
||||
|
||||
if (phydev->duplex == DUPLEX_FULL) {
|
||||
- u16 lcladv = phy_read(phydev, MII_ADVERTISE);
|
||||
- u16 rmtadv = phy_read(phydev, MII_LPA);
|
||||
- u8 cap = mii_resolve_flowctrl_fdx(lcladv, rmtadv);
|
||||
-
|
||||
- if (cap & FLOW_CTRL_RX)
|
||||
- pause_rx = 1;
|
||||
- if (cap & FLOW_CTRL_TX)
|
||||
- pause_tx = 1;
|
||||
+ phy_get_pause(phydev, &pause_tx, &pause_rx);
|
||||
+ netdev_dbg(netdev, "set negotiated pause params pause TX = %s, pause RX = %s\n",
|
||||
+ pause_tx ? "ON" : "OFF", pause_rx ? "ON" : "OFF");
|
||||
}
|
||||
|
||||
gmac_set_flow_control(netdev, pause_tx, pause_rx);
|
||||
@@ -0,0 +1,46 @@
|
||||
From 4eed4b87f17d10b7586349c13c3a30f9c24c9ba4 Mon Sep 17 00:00:00 2001
|
||||
From: Linus Walleij <linus.walleij@linaro.org>
|
||||
Date: Wed, 8 May 2024 23:21:17 +0200
|
||||
Subject: [PATCH 5/5] net: ethernet: cortina: Implement .set_pauseparam()
|
||||
|
||||
The Cortina Gemini ethernet can very well set up TX or RX
|
||||
pausing, so add this functionality to the driver in a
|
||||
.set_pauseparam() callback. Essentially just call down to
|
||||
phylib and let phylib deal with this, .adjust_link()
|
||||
will respect the setting from phylib.
|
||||
|
||||
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
|
||||
---
|
||||
drivers/net/ethernet/cortina/gemini.c | 14 ++++++++++++++
|
||||
1 file changed, 14 insertions(+)
|
||||
|
||||
--- a/drivers/net/ethernet/cortina/gemini.c
|
||||
+++ b/drivers/net/ethernet/cortina/gemini.c
|
||||
@@ -2143,6 +2143,19 @@ static void gmac_get_pauseparam(struct n
|
||||
pparam->autoneg = true;
|
||||
}
|
||||
|
||||
+static int gmac_set_pauseparam(struct net_device *netdev,
|
||||
+ struct ethtool_pauseparam *pparam)
|
||||
+{
|
||||
+ struct phy_device *phydev = netdev->phydev;
|
||||
+
|
||||
+ if (!pparam->autoneg)
|
||||
+ return -EOPNOTSUPP;
|
||||
+
|
||||
+ phy_set_asym_pause(phydev, pparam->rx_pause, pparam->tx_pause);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
static void gmac_get_ringparam(struct net_device *netdev,
|
||||
struct ethtool_ringparam *rp,
|
||||
struct kernel_ethtool_ringparam *kernel_rp,
|
||||
@@ -2263,6 +2276,7 @@ static const struct ethtool_ops gmac_351
|
||||
.set_link_ksettings = gmac_set_ksettings,
|
||||
.nway_reset = gmac_nway_reset,
|
||||
.get_pauseparam = gmac_get_pauseparam,
|
||||
+ .set_pauseparam = gmac_set_pauseparam,
|
||||
.get_ringparam = gmac_get_ringparam,
|
||||
.set_ringparam = gmac_set_ringparam,
|
||||
.get_coalesce = gmac_get_coalesce,
|
||||
@@ -0,0 +1,37 @@
|
||||
From c1aa34cd568bc7b86b82353034070c32b6ebe6db Mon Sep 17 00:00:00 2001
|
||||
From: Linus Walleij <linus.walleij@linaro.org>
|
||||
Date: Mon, 11 Mar 2019 15:44:29 +0100
|
||||
Subject: [PATCH] ARM: dts: Augment DIR-685 partition table for OpenWrt
|
||||
|
||||
Rename the firmware partition so that the firmware MTD
|
||||
splitter will do its job, drop the rootfs arguments as
|
||||
the MTD splitter will set this up automatically.
|
||||
|
||||
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
|
||||
---
|
||||
arch/arm/boot/dts/gemini/gemini-dlink-dir-685.dts | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
--- a/arch/arm/boot/dts/gemini/gemini-dlink-dir-685.dts
|
||||
+++ b/arch/arm/boot/dts/gemini/gemini-dlink-dir-685.dts
|
||||
@@ -20,7 +20,7 @@
|
||||
};
|
||||
|
||||
chosen {
|
||||
- bootargs = "console=ttyS0,19200n8 root=/dev/sda1 rw rootwait consoleblank=300";
|
||||
+ bootargs = "console=ttyS0,19200n8 consoleblank=300";
|
||||
stdout-path = "uart0:19200n8";
|
||||
};
|
||||
|
||||
@@ -317,9 +317,9 @@
|
||||
* this is called "upgrade" on the vendor system.
|
||||
*/
|
||||
partition@40000 {
|
||||
- label = "upgrade";
|
||||
+ compatible = "wrg";
|
||||
+ label = "firmware";
|
||||
reg = <0x00040000 0x01f40000>;
|
||||
- read-only;
|
||||
};
|
||||
/* RGDB, Residental Gateway Database? */
|
||||
partition@1f80000 {
|
||||
Reference in New Issue
Block a user