Skip to content

Commit 600ca10

Browse files
committed
Add ssc338q_apfpv_greg-generic-cu-eu profile
1 parent ee2074f commit 600ca10

8 files changed

Lines changed: 465 additions & 0 deletions

File tree

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# Architecture
2+
BR2_arm=y
3+
BR2_cortex_a7=y
4+
BR2_ARM_FPU_NEON_VFPV4=y
5+
BR2_ARM_INSTRUCTIONS_THUMB2=y
6+
7+
# Toolchain
8+
BR2_TOOLCHAIN_EXTERNAL=y
9+
BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y
10+
BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y
11+
BR2_TOOLCHAIN_EXTERNAL_URL="https://github.com/openipc/firmware/releases/download/$(OPENIPC_TOOLCHAIN).tgz"
12+
BR2_TOOLCHAIN_EXTERNAL_CUSTOM_PREFIX="arm-openipc-linux-gnueabihf"
13+
BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_9=y
14+
BR2_TOOLCHAIN_EXTERNAL_CUSTOM_GLIBC=y
15+
# BR2_TOOLCHAIN_EXTERNAL_INET_RPC is not set
16+
BR2_TOOLCHAIN_EXTERNAL_CXX=y
17+
18+
# Kernel
19+
BR2_LINUX_KERNEL=y
20+
BR2_LINUX_KERNEL_CUSTOM_TARBALL=y
21+
BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/openipc/linux/archive/$(OPENIPC_KERNEL).tar.gz"
22+
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
23+
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(EXTERNAL_VENDOR)/board/$(OPENIPC_SOC_FAMILY)/infinity6e-ssc012b.config"
24+
BR2_LINUX_KERNEL_UIMAGE=y
25+
BR2_LINUX_KERNEL_XZ=y
26+
27+
# Filesystem
28+
BR2_PACKAGE_BUSYBOX_CONFIG="$(BR2_EXTERNAL)/package/busybox/busybox.config"
29+
BR2_PACKAGE_EXFATPROGS=y
30+
BR2_PACKAGE_UBOOT_TOOLS=y
31+
BR2_PACKAGE_ZLIB=y
32+
# BR2_PACKAGE_IFUPDOWN_SCRIPTS is not set
33+
BR2_PACKAGE_IW=y
34+
BR2_PACKAGE_HOSTAPD=y
35+
BR2_TARGET_ROOTFS_CPIO=y
36+
BR2_TARGET_ROOTFS_SQUASHFS=y
37+
BR2_TARGET_ROOTFS_SQUASHFS4_XZ=y
38+
39+
# OpenIPC
40+
BR2_OPENIPC_SOC_VENDOR="sigmastar"
41+
BR2_OPENIPC_SOC_MODEL="ssc338q"
42+
BR2_OPENIPC_SOC_FAMILY="infinity6e"
43+
BR2_OPENIPC_VARIANT="apfpv"
44+
BR2_OPENIPC_FLASH_SIZE="16"
45+
46+
# Packages
47+
BR2_PACKAGE_DROPBEAR_OPENIPC=y
48+
BR2_PACKAGE_EXFAT_OPENIPC=y
49+
BR2_PACKAGE_IPCTOOL=y
50+
BR2_PACKAGE_JSONFILTER=y
51+
BR2_PACKAGE_LIBCURL_OPENIPC=y
52+
BR2_PACKAGE_LIBCURL_OPENIPC_CURL=y
53+
# BR2_PACKAGE_LIBCURL_OPENIPC_PROXY_SUPPORT is not set
54+
# BR2_PACKAGE_LIBCURL_OPENIPC_COOKIES_SUPPORT is not set
55+
# BR2_PACKAGE_LIBCURL_OPENIPC_EXTRA_PROTOCOLS_FEATURES is not set
56+
BR2_PACKAGE_LIBEVENT_OPENIPC=y
57+
BR2_PACKAGE_LIBOGG_OPENIPC=y
58+
BR2_PACKAGE_MAJESTIC_FONTS=y
59+
BR2_PACKAGE_MAJESTIC_WEBUI=y
60+
BR2_PACKAGE_MAJESTIC=y
61+
BR2_PACKAGE_MBEDTLS_OPENIPC=y
62+
BR2_PACKAGE_MAVFWD=y
63+
BR2_PACKAGE_APFPV_GREG=y
64+
BR2_PACKAGE_OPUS_OPENIPC=y
65+
BR2_PACKAGE_OPUS_OPENIPC_FIXED_POINT=y
66+
BR2_PACKAGE_RTL8811CU_OPENIPC=y
67+
BR2_PACKAGE_RTL88X2EU_OPENIPC=y
68+
BR2_PACKAGE_SIGMASTAR_OSDRV_INFINITY6E=y
69+
BR2_PACKAGE_VTUND_OPENIPC=y
70+
BR2_PACKAGE_YAML_CLI=y
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/bin/sh
2+
3+
case "$1" in
4+
start)
5+
echo "Starting network..."
6+
ifup lo
7+
ifup eth0
8+
ifup wlan0
9+
;;
10+
11+
stop)
12+
echo "Stopping network..."
13+
ifdown lo
14+
ifdown -f eth0
15+
ifdown -f wlan0
16+
;;
17+
18+
*)
19+
echo "Usage: $0 {start|stop}"
20+
exit 1
21+
;;
22+
esac
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
#!/bin/sh
2+
3+
. /etc/init.d/libmedia.sh
4+
5+
DAEMON="/usr/bin/majestic"
6+
NAME="majestic"
7+
PIDFILE="/var/run/majestic.pid"
8+
9+
start() {
10+
echo "Starting $NAME..."
11+
if ensure_pidfile "$NAME" "$PIDFILE"; then
12+
echo "$NAME is already running"
13+
return 0
14+
fi
15+
16+
rm -f "$PIDFILE"
17+
start-stop-daemon -b -m -S -q -p "$PIDFILE" -x "$DAEMON" -- -s
18+
if [ $? -ne 0 ]; then
19+
echo "Failed to launch $NAME"
20+
return 1
21+
fi
22+
echo "$NAME launch requested"
23+
}
24+
25+
stop() {
26+
echo "Stopping $NAME..."
27+
stop_service "$NAME" "$PIDFILE" 15 || return 1
28+
# Majestic keeps internal single-instance state briefly after exit.
29+
sleep 2
30+
}
31+
32+
status() {
33+
if ensure_pidfile "$NAME" "$PIDFILE"; then
34+
echo "$NAME running pid=$(cat "$PIDFILE")"
35+
return 0
36+
fi
37+
echo "$NAME stopped"
38+
return 1
39+
}
40+
41+
reload() {
42+
ensure_pidfile "$NAME" "$PIDFILE" || {
43+
echo "$NAME not running"
44+
return 1
45+
}
46+
kill -HUP "$(cat "$PIDFILE")"
47+
}
48+
49+
restart() {
50+
stop
51+
start
52+
}
53+
54+
case "$1" in
55+
start|stop|restart|reload|status)
56+
"$1"
57+
;;
58+
*)
59+
echo "Usage: $0 {start|stop|restart|reload|status}"
60+
exit 1
61+
;;
62+
esac
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
#!/bin/sh
2+
3+
MAJESTIC_API="http://localhost/api/v1/config.json"
4+
5+
wait_for_majestic_ready() {
6+
timeout="${1:-30}"
7+
i=0
8+
while [ "$i" -lt "$timeout" ]; do
9+
curl -sf --connect-timeout 1 --max-time 2 "$MAJESTIC_API" >/dev/null 2>&1 && return 0
10+
sleep 1
11+
i=$((i + 1))
12+
done
13+
return 1
14+
}
15+
16+
start() {
17+
echo "S99rc.local: waiting for majestic API..."
18+
if ! wait_for_majestic_ready 10; then
19+
echo "S99rc.local: majestic API not ready after 10s; continuing with /etc/rc.local anyway"
20+
else
21+
echo "S99rc.local: majestic API ready"
22+
fi
23+
echo "S99rc.local: running /etc/rc.local"
24+
/etc/rc.local
25+
}
26+
27+
stop() {
28+
[ -x /etc/rc.local.stop ] && /etc/rc.local.stop
29+
}
30+
31+
case "$1" in
32+
start|stop)
33+
"$1"
34+
;;
35+
*)
36+
echo "Usage: $0 {start|stop}"
37+
exit 1
38+
;;
39+
esac
40+
41+
exit $?
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
iface wlan0 inet static
2+
address 192.168.0.1
3+
netmask 255.255.255.0
4+
pre-up adapter setup
5+
post-up adapter start
6+
post-down adapter stop
Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
#!/bin/sh
2+
3+
# udhcpc script edited by Tim Riker <Tim@Rikers.org>
4+
5+
# Changes by OpenIPC 2021
6+
#
7+
# - move resolv.conf path to /tmp
8+
# - remove interface notes from resolv.conf
9+
10+
11+
[ -z "$1" ] && echo "Error: should be called from udhcpc" && exit 1
12+
13+
RESOLV_CONF="/tmp/resolv.conf"
14+
[ -e $RESOLV_CONF ] || touch $RESOLV_CONF
15+
[ -n "$broadcast" ] && BROADCAST="broadcast $broadcast"
16+
[ -n "$subnet" ] && NETMASK="netmask $subnet"
17+
# Handle stateful DHCPv6 like DHCPv4
18+
[ -n "$ipv6" ] && ip="$ipv6/128"
19+
20+
[ -z "${IF_WAIT_DELAY}" ] && IF_WAIT_DELAY=10
21+
22+
wait_for_ipv6_default_route() {
23+
printf "Waiting for IPv6 default route to appear"
24+
while [ $IF_WAIT_DELAY -gt 0 ]; do
25+
if ip -6 route list | grep -q default; then
26+
printf "\n"
27+
return
28+
fi
29+
sleep 1
30+
printf "."
31+
: $((IF_WAIT_DELAY -= 1))
32+
done
33+
printf " timeout!\n"
34+
}
35+
36+
case "$1" in
37+
deconfig)
38+
/sbin/ifconfig $interface up
39+
/sbin/ifconfig $interface 0.0.0.0
40+
41+
# drop info from this interface
42+
# resolv.conf may be a symlink to /tmp/, so take care
43+
TMPFILE=$(mktemp)
44+
grep -vE "# $interface\$" $RESOLV_CONF > $TMPFILE
45+
cat $TMPFILE > $RESOLV_CONF
46+
rm -f $TMPFILE
47+
48+
if [ -x /usr/sbin/avahi-autoipd ]; then
49+
/usr/sbin/avahi-autoipd -c $interface && /usr/sbin/avahi-autoipd -k $interface
50+
fi
51+
52+
if [ "$interface" = "eth0" ] && [ -x /usr/bin/adapter ]; then
53+
/usr/bin/adapter route
54+
fi
55+
;;
56+
57+
leasefail|nak)
58+
if [ -x /usr/sbin/avahi-autoipd ]; then
59+
/usr/sbin/avahi-autoipd -c $interface || /usr/sbin/avahi-autoipd -wD $interface --no-chroot
60+
fi
61+
/sbin/ifconfig $interface $(fw_printenv -n ipaddr || echo -n 192.168.1.10) netmask $(fw_printenv -n netmask || echo -n 255.255.255.0) up
62+
63+
if [ "$interface" = "eth0" ] && [ -x /usr/bin/adapter ]; then
64+
/usr/bin/adapter route
65+
fi
66+
;;
67+
68+
renew|bound)
69+
if [ -x /usr/sbin/avahi-autoipd ]; then
70+
/usr/sbin/avahi-autoipd -c $interface && /usr/sbin/avahi-autoipd -k $interface
71+
fi
72+
/sbin/ifconfig $interface $ip $BROADCAST $NETMASK
73+
if [ -n "$ipv6" ] ; then
74+
wait_for_ipv6_default_route
75+
fi
76+
77+
if [ -n "$router" ] ; then
78+
echo "deleting routers"
79+
while route del default gw 0.0.0.0 dev $interface 2> /dev/null; do
80+
:
81+
done
82+
83+
for i in $router ; do
84+
route add default gw $i dev $interface
85+
done
86+
fi
87+
88+
# drop info from this interface
89+
# resolv.conf may be a symlink to /tmp/, so take care
90+
#TMPFILE=$(mktemp)
91+
#grep -vE "# $interface\$" $RESOLV_CONF > $TMPFILE
92+
#cat $TMPFILE > $RESOLV_CONF
93+
#rm -f $TMPFILE
94+
95+
# Clearing the file because it is in RAM
96+
> $RESOLV_CONF
97+
98+
# prefer rfc3397 domain search list (option 119) if available
99+
if [ -n "$search" ]; then
100+
search_list=$search
101+
elif [ -n "$domain" ]; then
102+
search_list=$domain
103+
fi
104+
105+
[ -n "$search_list" ] &&
106+
echo "search $search_list" >> $RESOLV_CONF
107+
108+
for i in $dns ; do
109+
echo adding dns $i
110+
echo "nameserver $i" >> $RESOLV_CONF
111+
done
112+
113+
ntpd -q -N -n
114+
115+
if [ "$interface" = "eth0" ] && [ -x /usr/bin/adapter ]; then
116+
/usr/bin/adapter route
117+
fi
118+
;;
119+
esac
120+
121+
HOOK_DIR="$0.d"
122+
for hook in "${HOOK_DIR}/"*; do
123+
[ -f "${hook}" -a -x "${hook}" ] || continue
124+
"${hook}" "${@}"
125+
done
126+
127+
exit 0

0 commit comments

Comments
 (0)