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

This commit is contained in:
domenico
2025-06-24 14:35:53 +02:00
commit c06fb25d1f
9263 changed files with 1750214 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
# SPDX-License-Identifier: GPL-2.0-only
. /lib/functions/uci-defaults.sh
board_config_update
board=$(board_name)
case "$board" in
iei,puzzle-m901)
ucidef_set_led_netdev "wan" "WAN" "white:network" "eth0" "link"
;;
iei,puzzle-m902)
ucidef_set_led_netdev "wan" "WAN" "white:network" "eth2" "link"
;;
mikrotik,rb5009)
ucidef_set_led_netdev "sfp" "SFP" "green:sfp" "sfp"
ucidef_set_led_netdev "wan-port-link" "WAN-PORT-LINK" "!cp0!config-space@f2000000!mdio@12a200!switch@0!mdio1:00:green:" "p1" "tx rx link_10 link_100 link_1000 link_2500"
;;
esac
board_config_flush
exit 0

View File

@@ -0,0 +1,48 @@
#
# Copyright (C) 2014-2016 OpenWrt.org
# Copyright (C) 2016 LEDE-Project.org
#
. /lib/functions/uci-defaults.sh
board_config_update
board=$(board_name)
case "$board" in
globalscale,mochabin)
ucidef_set_interfaces_lan_wan "lan0 lan1 lan2 lan3" "eth0 eth2"
;;
iei,puzzle-m901)
ucidef_set_interfaces_lan_wan "eth1 eth2 eth3 eth4 eth5" "eth0"
;;
iei,puzzle-m902)
ucidef_set_interfaces_lan_wan "eth0 eth1 eth3 eth4 eth5 eth6 eth7 eth8" "eth2"
;;
marvell,armada8040-mcbin-doubleshot|\
marvell,armada8040-mcbin-singleshot)
ucidef_set_interfaces_lan_wan "eth0 eth1 eth3" "eth2"
;;
marvell,armada8040-db)
ucidef_set_interfaces_lan_wan "eth0 eth2 eth3" "eth1"
;;
marvell,armada7040-db)
ucidef_set_interfaces_lan_wan "eth0 eth2" "eth1"
;;
marvell,armada8040-clearfog-gt-8k)
ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4 eth2" "eth0 eth1"
;;
mikrotik,rb5009)
ucidef_set_interfaces_lan_wan "p2 p3 p4 p5 p6 p7 p8 sfp" "p1"
;;
solidrun,clearfog-pro)
ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4 lan5 lan6 eth0 eth1" "eth2"
;;
*)
ucidef_set_interface_lan "eth0"
;;
esac
board_config_flush
exit 0

View File

@@ -0,0 +1,38 @@
platform_do_upgrade_emmc() {
local board=$(board_name)
local diskdev partdev
export_bootdevice && export_partdevice diskdev 0 || {
v "Unable to determine upgrade device"
return 1
}
sync
if [ "$UPGRADE_OPT_SAVE_PARTITIONS" = "1" ]; then
get_partitions "/dev/$diskdev" bootdisk
v "Extract boot sector from the image"
get_image_dd "$1" of=/tmp/image.bs count=1 bs=512b
get_partitions /tmp/image.bs image
fi
#iterate over each partition from the image and write it to the boot disk
while read part start size; do
if export_partdevice partdev $part; then
if [ "$partdev" = "mmcblk0p2" ]; then
v "Writing image mmcblk0p3 for /dev/$partdev $start $size"
get_image_dd "$1" of="/dev/mmcblk0p3" ibs="512" obs=1M skip="$start" count="$size" conv=fsync
elif [ "$partdev" = "mmcblk0p1" ]; then
v "Writing image mmcblk0p1 for /dev/$partdev $start $size"
get_image_dd "$1" of="/dev/$partdev" ibs="512" obs=1M skip="$start" count="$size" conv=fsync
fi
else
v "Unable to find partition $part device, skipped."
fi
done < /tmp/partmap.image
v "Writing new UUID to /dev/$diskdev..."
get_image_dd "$1" of="/dev/$diskdev" bs=1 skip=440 count=4 seek=440 conv=fsync
dd if=/dev/zero of=$(find_mmc_part rootfs_data) bs=512 count=8
sleep 1
}

View File

@@ -0,0 +1,60 @@
#
# Copyright (C) 2014-2016 OpenWrt.org
# Copyright (C) 2016 LEDE-Project.org
#
RAMFS_COPY_BIN='fw_printenv fw_setenv'
RAMFS_COPY_DATA='/etc/fw_env.config /var/lock/fw_printenv.lock'
REQUIRE_IMAGE_METADATA=1
platform_check_image() {
case "$(board_name)" in
globalscale,mochabin|\
iei,puzzle-m901|\
iei,puzzle-m902|\
marvell,armada8040-mcbin-doubleshot|\
marvell,armada8040-mcbin-singleshot|\
marvell,armada8040-clearfog-gt-8k|\
solidrun,clearfog-pro)
legacy_sdcard_check_image "$1"
;;
*)
return 0
;;
esac
}
platform_do_upgrade() {
case "$(board_name)" in
iei,puzzle-m901|\
iei,puzzle-m902)
platform_do_upgrade_emmc "$1"
;;
globalscale,mochabin|\
marvell,armada8040-mcbin-doubleshot|\
marvell,armada8040-mcbin-singleshot|\
marvell,armada8040-clearfog-gt-8k|\
solidrun,clearfog-pro)
legacy_sdcard_do_upgrade "$1"
;;
mikrotik,rb5009)
nand_do_upgrade "$1"
;;
*)
default_do_upgrade "$1"
;;
esac
}
platform_copy_config() {
case "$(board_name)" in
globalscale,mochabin|\
iei,puzzle-m901|\
iei,puzzle-m902|\
marvell,armada8040-mcbin-doubleshot|\
marvell,armada8040-mcbin-singleshot|\
marvell,armada8040-clearfog-gt-8k|\
solidrun,clearfog-pro)
legacy_sdcard_copy_config
;;
esac
}