-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #217 from CaryChen-Deltaww/tn48m2-dent3
[tn48m] Add new platform TN48M2-SWDEV
- Loading branch information
Showing
23 changed files
with
168 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
*arm64*delta*tn48m2*swdev*.mk | ||
onlpdump.mk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
include $(ONL)/make/pkg.mk |
1 change: 1 addition & 0 deletions
1
packages/platforms/delta/arm64/tn48m/tn48m2-swdev/modules/Makefile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
include $(ONL)/make/pkg.mk |
1 change: 1 addition & 0 deletions
1
packages/platforms/delta/arm64/tn48m/tn48m2-swdev/modules/PKG.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
!include $ONL_TEMPLATES/platform-modules.yml ARCH=arm64 VENDOR=delta BASENAME=arm64-delta-tn48m2-swdev KERNELS="onl-kernel-5.15-lts-arm64-all:arm64" |
1 change: 1 addition & 0 deletions
1
packages/platforms/delta/arm64/tn48m/tn48m2-swdev/modules/builds/.gitignore
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
lib |
7 changes: 7 additions & 0 deletions
7
packages/platforms/delta/arm64/tn48m/tn48m2-swdev/modules/builds/Makefile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
KERNELS := onl-kernel-5.15-lts-arm64-all:arm64 | ||
KMODULES := $(ONL)/packages/platforms/delta/arm64/tn48m/src/modules/ | ||
VENDOR := delta | ||
BASENAME := arm64-delta-tn48m2-swdev | ||
ARCH := arm64 | ||
include $(ONL)/make/kmodule.mk | ||
export CROSS_COMPILE=aarch64-linux-gnu- |
1 change: 1 addition & 0 deletions
1
packages/platforms/delta/arm64/tn48m/tn48m2-swdev/onlp/Makefile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
include $(ONL)/make/pkg.mk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
!include $ONL_TEMPLATES/onlp-platform-any.yml PLATFORM=arm64-delta-tn48m2-swdev ARCH=arm64 TOOLCHAIN=aarch64-linux-gnu |
2 changes: 2 additions & 0 deletions
2
packages/platforms/delta/arm64/tn48m/tn48m2-swdev/onlp/builds/Makefile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
FILTER=src | ||
include $(ONL)/make/subdirs.mk |
3 changes: 3 additions & 0 deletions
3
packages/platforms/delta/arm64/tn48m/tn48m2-swdev/onlp/builds/lib/Makefile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
PLATFORM := arm64-delta-tn48m2-swdev | ||
PLATFORM_MODULE := arm64_delta_tn48m | ||
include $(ONL)/packages/base/any/onlp/builds/platform/libonlp-platform.mk |
3 changes: 3 additions & 0 deletions
3
packages/platforms/delta/arm64/tn48m/tn48m2-swdev/onlp/builds/onlpdump/Makefile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
PLATFORM := arm64-delta-tn48m2-swdev | ||
PLATFORM_MODULE := arm64_delta_tn48m | ||
include $(ONL)/packages/base/any/onlp/builds/platform/onlps.mk |
1 change: 1 addition & 0 deletions
1
packages/platforms/delta/arm64/tn48m/tn48m2-swdev/platform-config/Makefile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
include $(ONL)/make/pkg.mk |
1 change: 1 addition & 0 deletions
1
packages/platforms/delta/arm64/tn48m/tn48m2-swdev/platform-config/r0/Makefile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
include $(ONL)/make/pkg.mk |
1 change: 1 addition & 0 deletions
1
packages/platforms/delta/arm64/tn48m/tn48m2-swdev/platform-config/r0/PKG.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
!include $ONL_TEMPLATES/platform-config-platform.yml ARCH=arm64 VENDOR=delta BASENAME=arm64-delta-tn48m2-swdev REVISION=r0 |
54 changes: 54 additions & 0 deletions
54
...delta/arm64/tn48m/tn48m2-swdev/platform-config/r0/src/lib/arm64-delta-tn48m2-swdev-r0.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
--- | ||
|
||
###################################################################### | ||
# | ||
# platform-config for TN48M2-SWDEV | ||
# | ||
###################################################################### | ||
|
||
arm64-delta-tn48m2-swdev-r0: | ||
flat_image_tree: | ||
kernel: | ||
<<: *arm64-kernel-5-15 | ||
dtb: | ||
=: delta-tn48m2-swdev.dtb | ||
<<: *arm64-kernel-5-15-package | ||
itb: | ||
<<: *arm64-itb | ||
|
||
loader: | ||
device: /dev/sda | ||
##partition: /dev/sda1 | ||
loadaddr: 0x10000000 | ||
nos_bootcmds: *ssd_bootcmds | ||
|
||
setenv: | ||
- bootargs: >- | ||
$console | ||
onl_platform=$onl_platform | ||
environment: | ||
- device: /dev/mtd1 | ||
env_offset: 0x00000000 | ||
env_size: 0x00010000 | ||
sector_size: 0x00010000 | ||
|
||
installer: | ||
- ONL-BOOT: | ||
=: 128MiB | ||
format: ext2 | ||
##format: raw | ||
- ONL-CONFIG: | ||
=: 128MiB | ||
format: ext4 | ||
- ONL-IMAGES: | ||
=: 1GiB | ||
format: ext4 | ||
- ONL-DATA: | ||
=: 100% | ||
format: ext4 | ||
|
||
network: | ||
interfaces: | ||
ma1: | ||
name: eth0 |
38 changes: 38 additions & 0 deletions
38
.../tn48m/tn48m2-swdev/platform-config/r0/src/python/arm64_delta_tn48m2_swdev_r0/__init__.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#!/usr/bin/python | ||
|
||
from onl.platform.base import * | ||
from onl.platform.delta import * | ||
|
||
class OnlPlatform_arm64_delta_tn48m2_swdev_r0(OnlPlatformDelta, | ||
OnlPlatformPortConfig_48x1_4x10): | ||
PLATFORM='arm64-delta-tn48m2-swdev-r0' | ||
MODEL="TN48M2-SWDEV" | ||
SYS_OBJECT_ID=".48.14" | ||
|
||
def baseconfig(self): | ||
# Insert platform drivers | ||
self.insmod("arm64-delta-tn48m-cpld.ko") | ||
self.insmod("arm64-delta-tn48m-led.ko") | ||
|
||
########### initialize I2C bus 1 ########### | ||
self.new_i2c_devices ( | ||
[ | ||
# FAN Controller | ||
('adt7473', 0x2e, 1), | ||
|
||
# Temperature devices | ||
('tmp1075', 0x4a, 1), | ||
('tmp1075', 0x4b, 1), | ||
] | ||
) | ||
|
||
# Insert Marvell prestera modules by only probing prestera_pci module | ||
# Suggested by Taras Chornyi | ||
self.modprobe('prestera_pci') | ||
|
||
# set up systemctl rules | ||
for swp in range(1, 53): | ||
cmd = "systemctl enable switchdev-online@swp%d" % swp | ||
subprocess.check_call(cmd, shell=True) | ||
|
||
return True |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters