shmin: add new SH3-target
authorZoltan HERPAI <wigyori@uid0.hu>
Mon, 26 Aug 2019 15:04:33 +0000 (17:04 +0200)
committerZoltan HERPAI <wigyori@uid0.hu>
Fri, 15 Mar 2024 16:03:30 +0000 (17:03 +0100)
Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
include/site/sh3 [new file with mode: 0644]
target/linux/shmin/Makefile [new file with mode: 0644]
target/linux/shmin/base-files/etc/inittab [new file with mode: 0644]
target/linux/shmin/config-5.15 [new file with mode: 0644]
target/linux/shmin/image/Makefile [new file with mode: 0644]

diff --git a/include/site/sh3 b/include/site/sh3
new file mode 100644 (file)
index 0000000..a5626a7
--- /dev/null
@@ -0,0 +1,30 @@
+#!/bin/sh
+. $TOPDIR/include/site/linux
+ac_cv_c_littleendian=${ac_cv_c_littleendian=no}
+ac_cv_c_bigendian=${ac_cv_c_bigendian=yes}
+
+ac_cv_sizeof___int64=0
+ac_cv_sizeof_char=1
+ac_cv_sizeof_int=4
+ac_cv_sizeof_int16_t=2
+ac_cv_sizeof_int32_t=4
+ac_cv_sizeof_int64_t=8
+ac_cv_sizeof_long_int=4
+ac_cv_sizeof_long_long=8
+ac_cv_sizeof_long=4
+ac_cv_sizeof_off_t=8
+ac_cv_sizeof_short_int=2
+ac_cv_sizeof_short=2
+ac_cv_sizeof_size_t=4
+ac_cv_sizeof_ssize_t=4
+ac_cv_sizeof_u_int16_t=2
+ac_cv_sizeof_u_int32_t=4
+ac_cv_sizeof_u_int64_t=8
+ac_cv_sizeof_uint16_t=2
+ac_cv_sizeof_uint32_t=4
+ac_cv_sizeof_uint64_t=8
+ac_cv_sizeof_unsigned_int=4
+ac_cv_sizeof_unsigned_long=4
+ac_cv_sizeof_unsigned_long_long=8
+ac_cv_sizeof_unsigned_short=2
+ac_cv_sizeof_void_p=4
diff --git a/target/linux/shmin/Makefile b/target/linux/shmin/Makefile
new file mode 100644 (file)
index 0000000..8577f62
--- /dev/null
@@ -0,0 +1,24 @@
+#
+# Copyright (C) 2019 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+include $(TOPDIR)/rules.mk
+
+ARCH:=sh3
+BOARD:=shmin
+BOARDNAME:=T-SH7706LAN
+FEATURES:=tgz
+
+KERNEL_PATCHVER:=5.15
+MAINTAINER:=Zoltan HERPAI <wigyori@uid0.hu>
+KERNELNAME:=zImage
+
+include $(INCLUDE_DIR)/target.mk
+
+define Target/Description
+       Build firmware images for T-SH7706LAN shmin boards
+endef
+
+$(eval $(call BuildTarget))
diff --git a/target/linux/shmin/base-files/etc/inittab b/target/linux/shmin/base-files/etc/inittab
new file mode 100644 (file)
index 0000000..859dc53
--- /dev/null
@@ -0,0 +1,5 @@
+::sysinit:/etc/init.d/rcS S boot
+::shutdown:/etc/init.d/rcS K stop
+tts/0::askfirst:/bin/ash --login
+ttyS1::askfirst:/bin/ash --login
+tty1::askfirst:/bin/ash --login
diff --git a/target/linux/shmin/config-5.15 b/target/linux/shmin/config-5.15
new file mode 100644 (file)
index 0000000..7aee31d
--- /dev/null
@@ -0,0 +1,181 @@
+CONFIG_29BIT=y
+# CONFIG_4KSTACKS is not set
+CONFIG_ARCH_32BIT_OFF_T=y
+CONFIG_ARCH_HIBERNATION_POSSIBLE=y
+CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y
+CONFIG_ARCH_SELECT_MEMORY_MODEL=y
+CONFIG_ARCH_SPARSEMEM_DEFAULT=y
+CONFIG_ARCH_SPARSEMEM_ENABLE=y
+CONFIG_BOOT_LINK_OFFSET=0x00210000
+# CONFIG_CACHE_OFF is not set
+CONFIG_CACHE_WRITEBACK=y
+# CONFIG_CACHE_WRITETHROUGH is not set
+CONFIG_CMDLINE="mem=32M console=ttySC1,115200"
+CONFIG_CMDLINE_OVERWRITE=y
+CONFIG_COMPAT_32BIT_TIME=y
+CONFIG_CONSOLE_TRANSLATIONS=y
+CONFIG_CPU_HAS_INTEVT=y
+CONFIG_CPU_HAS_IPR_IRQ=y
+CONFIG_CPU_HAS_SR_RB=y
+CONFIG_CPU_LITTLE_ENDIAN=y
+CONFIG_CPU_NO_EFFICIENT_FFS=y
+CONFIG_CPU_SH3=y
+# CONFIG_CPU_SUBTYPE_J2 is not set
+# CONFIG_CPU_SUBTYPE_MXG is not set
+# CONFIG_CPU_SUBTYPE_SH4_202 is not set
+# CONFIG_CPU_SUBTYPE_SH7091 is not set
+# CONFIG_CPU_SUBTYPE_SH7201 is not set
+# CONFIG_CPU_SUBTYPE_SH7203 is not set
+# CONFIG_CPU_SUBTYPE_SH7206 is not set
+# CONFIG_CPU_SUBTYPE_SH7263 is not set
+# CONFIG_CPU_SUBTYPE_SH7264 is not set
+# CONFIG_CPU_SUBTYPE_SH7269 is not set
+# CONFIG_CPU_SUBTYPE_SH7343 is not set
+# CONFIG_CPU_SUBTYPE_SH7366 is not set
+# CONFIG_CPU_SUBTYPE_SH7619 is not set
+# CONFIG_CPU_SUBTYPE_SH7705 is not set
+CONFIG_CPU_SUBTYPE_SH7706=y
+# CONFIG_CPU_SUBTYPE_SH7707 is not set
+# CONFIG_CPU_SUBTYPE_SH7708 is not set
+# CONFIG_CPU_SUBTYPE_SH7709 is not set
+# CONFIG_CPU_SUBTYPE_SH7710 is not set
+# CONFIG_CPU_SUBTYPE_SH7712 is not set
+# CONFIG_CPU_SUBTYPE_SH7720 is not set
+# CONFIG_CPU_SUBTYPE_SH7721 is not set
+# CONFIG_CPU_SUBTYPE_SH7722 is not set
+# CONFIG_CPU_SUBTYPE_SH7723 is not set
+# CONFIG_CPU_SUBTYPE_SH7724 is not set
+# CONFIG_CPU_SUBTYPE_SH7734 is not set
+# CONFIG_CPU_SUBTYPE_SH7750 is not set
+# CONFIG_CPU_SUBTYPE_SH7750R is not set
+# CONFIG_CPU_SUBTYPE_SH7750S is not set
+# CONFIG_CPU_SUBTYPE_SH7751 is not set
+# CONFIG_CPU_SUBTYPE_SH7751R is not set
+# CONFIG_CPU_SUBTYPE_SH7757 is not set
+# CONFIG_CPU_SUBTYPE_SH7760 is not set
+# CONFIG_CPU_SUBTYPE_SH7763 is not set
+# CONFIG_CPU_SUBTYPE_SH7770 is not set
+# CONFIG_CPU_SUBTYPE_SH7780 is not set
+# CONFIG_CPU_SUBTYPE_SH7785 is not set
+# CONFIG_CPU_SUBTYPE_SH7786 is not set
+# CONFIG_CPU_SUBTYPE_SHX3 is not set
+CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y
+CONFIG_CRYPTO_LIB_POLY1305_RSIZE=1
+CONFIG_CRYPTO_RNG2=y
+CONFIG_DMA_DIRECT_REMAP=y
+CONFIG_DMA_NONCOHERENT=y
+CONFIG_DMA_REMAP=y
+CONFIG_DUMMY_CONSOLE=y
+# CONFIG_DUMP_CODE is not set
+# CONFIG_DWARF_UNWINDER is not set
+CONFIG_DWMAC_GENERIC=m
+CONFIG_ENTRY_OFFSET=0x00001000
+CONFIG_FW_LOADER_PAGED_BUF=y
+CONFIG_GENERIC_ALLOCATOR=y
+CONFIG_GENERIC_ATOMIC64=y
+CONFIG_GENERIC_BUG=y
+CONFIG_GENERIC_CLOCKEVENTS=y
+CONFIG_GENERIC_IDLE_POLL_SETUP=y
+CONFIG_GENERIC_IRQ_SHOW=y
+CONFIG_GENERIC_SCHED_CLOCK=y
+CONFIG_GENERIC_SMP_IDLE_THREAD=y
+CONFIG_GENERIC_STRNCPY_FROM_USER=y
+CONFIG_GENERIC_STRNLEN_USER=y
+CONFIG_GPIO_CDEV=y
+CONFIG_GUSA=y
+# CONFIG_GUSA_RB is not set
+CONFIG_HAS_DMA=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT_MAP=y
+# CONFIG_HEARTBEAT is not set
+CONFIG_HW_CONSOLE=y
+CONFIG_HZ_PERIODIC=y
+CONFIG_INITRAMFS_SOURCE=""
+CONFIG_INPUT=y
+# CONFIG_INTC_MAPPING_DEBUG is not set
+CONFIG_IRQ_DOMAIN=y
+CONFIG_IRQ_FORCED_THREADING=y
+CONFIG_IRQ_WORK=y
+CONFIG_LOCK_DEBUGGING_SUPPORT=y
+CONFIG_MAY_HAVE_SPARSE_IRQ=y
+CONFIG_MDIO_BUS=m
+CONFIG_MDIO_DEVICE=m
+CONFIG_MDIO_DEVRES=m
+CONFIG_MEMFD_CREATE=y
+CONFIG_MEMORY_SIZE=0x04000000
+CONFIG_MEMORY_START=0x08000000
+CONFIG_MFD_SYSCON=y
+CONFIG_MIGRATION=y
+CONFIG_MII=m
+CONFIG_MODULES_TREE_LOOKUP=y
+CONFIG_MODULES_USE_ELF_RELA=y
+CONFIG_NEED_PER_CPU_KM=y
+CONFIG_NEED_SG_DMA_LENGTH=y
+CONFIG_NET_PTP_CLASSIFY=y
+CONFIG_NET_SELFTESTS=m
+CONFIG_NR_ONCHIP_DMA_CHANNELS=6
+# CONFIG_N_HDLC is not set
+# CONFIG_OF is not set
+CONFIG_OLD_SIGACTION=y
+CONFIG_OLD_SIGSUSPEND=y
+CONFIG_PAGE_OFFSET=0x80000000
+CONFIG_PAGE_POOL=y
+CONFIG_PCS_XPCS=m
+CONFIG_PERF_EVENTS=y
+CONFIG_PERF_USE_VMALLOC=y
+CONFIG_PGTABLE_LEVELS=2
+CONFIG_PHYLIB=m
+CONFIG_PHYLINK=m
+CONFIG_PHYSICAL_START=0x08000000
+CONFIG_PPS=m
+CONFIG_PTP_1588_CLOCK=m
+CONFIG_PTP_1588_CLOCK_OPTIONAL=m
+# CONFIG_PUSH_SWITCH is not set
+CONFIG_REGMAP=y
+CONFIG_REGMAP_MMIO=y
+CONFIG_RESET_CONTROLLER=y
+CONFIG_RTC_CLASS=y
+CONFIG_RTC_DRV_SH=y
+# CONFIG_SERIAL_8250 is not set
+CONFIG_SERIAL_MCTRL_GPIO=y
+CONFIG_SERIAL_NONSTANDARD=y
+CONFIG_SERIAL_SH_SCI=y
+CONFIG_SERIAL_SH_SCI_CONSOLE=y
+CONFIG_SERIAL_SH_SCI_EARLYCON=y
+CONFIG_SERIAL_SH_SCI_NR_UARTS=2
+CONFIG_SH_ADC=y
+CONFIG_SH_CLK_CPG=y
+CONFIG_SH_CLK_CPG_LEGACY=y
+CONFIG_SH_CUSTOM_CLK=y
+CONFIG_SH_DMA=y
+# CONFIG_SH_DMA_API is not set
+# CONFIG_SH_FPU_EMU is not set
+CONFIG_SH_INTC=y
+# CONFIG_SH_NO_BSS_INIT is not set
+CONFIG_SH_PCLK_FREQ=60000000
+CONFIG_SH_SHMIN=y
+# CONFIG_SH_STANDARD_BIOS is not set
+CONFIG_SH_TIMER_TMU=y
+CONFIG_SH_WDT=y
+CONFIG_SMC911X=m
+CONFIG_SMC91X=m
+CONFIG_SMSC911X=m
+CONFIG_SPARSEMEM_STATIC=y
+CONFIG_SPARSE_IRQ=y
+CONFIG_SRCU=y
+# CONFIG_STACK_DEBUG is not set
+CONFIG_STMMAC_ETH=m
+CONFIG_STMMAC_PLATFORM=m
+# CONFIG_STNIC is not set
+CONFIG_SUPERH=y
+CONFIG_SWPHY=y
+CONFIG_SYS_SUPPORTS_SH_TMU=y
+CONFIG_TICK_CPU_ACCOUNTING=y
+CONFIG_TINY_SRCU=y
+CONFIG_UNCACHED_MAPPING=y
+CONFIG_VSYSCALL=y
+CONFIG_VT=y
+CONFIG_VT_CONSOLE=y
+# CONFIG_VT_HW_CONSOLE_BINDING is not set
+CONFIG_WATCHDOG_CORE=y
+CONFIG_ZERO_PAGE_OFFSET=0x00001000
diff --git a/target/linux/shmin/image/Makefile b/target/linux/shmin/image/Makefile
new file mode 100644 (file)
index 0000000..3556617
--- /dev/null
@@ -0,0 +1,32 @@
+# 
+# Copyright (C) 2019 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+include $(TOPDIR)/rules.mk
+include $(INCLUDE_DIR)/image.mk
+
+define Image/Prepare
+       cp $(LINUX_DIR)/arch/sh/boot/zImage $(KDIR)/zImage
+endef
+
+define Image/BuildKernel/shmin-uboot
+       mkimage -A arm -O linux -T kernel -C none \
+               -a 0x8c001000 -e 0x8c002000 \
+               -n 'ARM OpenWrt Linux-$(LINUX_VERSION)' \
+               -d $(KDIR)/zImage $(KDIR)/uImage
+               cp $(KDIR)/uImage $(BIN_DIR)/$(IMG_PREFIX)-uImage
+endef                                                             
+
+define Image/BuildKernel
+       cp $(KDIR)/zImage $(BIN_DIR)/openwrt-$(BOARD)-zImage
+       $(call Image/BuildKernel/shmin-uboot)
+endef
+
+define Image/Build
+       $(call Image/Build/$(1),$(1))
+       dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/$(IMG_PREFIX)-root.$(1) bs=128k conv=sync
+endef
+
+$(eval $(call BuildImage))