Skip to content
This repository has been archived by the owner on Dec 28, 2020. It is now read-only.

Commit

Permalink
Merge branch 'z9s_luci' into x9s
Browse files Browse the repository at this point in the history
# Conflicts:
#	init.sh
#	root/mnt/android/default.prop
#	root/mnt/android/file_contexts.bin
#	root/mnt/android/init.kylin.rc
#	root/mnt/android/sbin/adbd
#	root/mnt/android/selinux_version
#	root/mnt/android/sepolicy
  • Loading branch information
jjm2473 committed Jan 3, 2020
2 parents b7ceada + a7e19bd commit 04b2e8a
Show file tree
Hide file tree
Showing 1,089 changed files with 10,990 additions and 14,075 deletions.
17 changes: 17 additions & 0 deletions Note
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@

decompress:
gunzip -k openwrt-sunxi-cortexa53-sun50i-a64-sopine-baseboard-squashfs-sdcard.img.gz

find the begining of root fs:
fdisk openwrt-sunxi-cortexa53-sun50i-a64-sopine-baseboard-squashfs-sdcard.img | grep Linux
2: 83 178 3 12 - 211 1 13 [ 45056 - 524288] Linux files*

dump root fs:
dd if=openwrt-sunxi-cortexa53-sun50i-a64-sopine-baseboard-squashfs-sdcard.img of=openwrt-sunxi-cortexa53-sun50i-a64-sopine-baseboard-root-squashfs.img ibs=512 skip=45056

mount root fs:
mount -t squashfs openwrt-sunxi-cortexa53-sun50i-a64-sopine-baseboard-root-squashfs.img /mnt/sunxi

OR in Macos

squashfuse openwrt-sunxi-cortexa53-sun50i-a64-sopine-baseboard-root-squashfs.img /mnt/sunxi
5 changes: 3 additions & 2 deletions init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ echo './proc
./system
./sys
./dev
./data' | xargs -n1 sh -c 'mkdir -p root/mnt/android/$0'
./data' | xargs -n1 sh -c 'mkdir -p root/mnt/android/$0; chmod 755 root/mnt/android/$0'

chmod 771 root/mnt/android/data
chmod 750 root/mnt/android/sbin
chmod 771 root/mnt/android/data
chmod 770 root/mnt/android/cache
2 changes: 1 addition & 1 deletion overlay_pack.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# use opkg offline mode `opkg -o / -f /etc/opkg.conf install ??` to install, then
# run this on device /overlay/upper/ to package
find etc/init.d/ -type f|xargs -n1 sh -c '/$0 enable'
find -type f -o -type l|grep -v ./mnt|grep -v ./root/|grep -v dropbear_rsa_host_key|grep -v urandom.seed|grep -v board.json|grep -v ./etc/config/|grep -v ./etc/samba/|tar -czf /tmp/update.tar.gz -T -
find -type f -o -type l|grep -v ./android|grep -v ./mnt|grep -v ./root/|grep -v dropbear_rsa_host_key|grep -v urandom.seed|grep -v board.json|grep -v ./etc/config/|grep -v ./etc/samba/|tar -czf /tmp/update.tar.gz -T -
Binary file modified root/bin/busybox
Binary file not shown.
21 changes: 14 additions & 7 deletions root/bin/config_generate
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,16 @@ generate_network() {
set network.$1.proto='none'
EOF

[ -n "$macaddr" ] && uci -q batch <<-EOF
delete network.$1_dev
set network.$1_dev='device'
set network.$1_dev.name='$ifname'
set network.$1_dev.macaddr='$macaddr'
EOF
if [ -n "$macaddr" ]; then
for name in $ifname; do
uci -q batch <<-EOF
delete network.$1_${name/./_}_dev
set network.$1_${name/./_}_dev='device'
set network.$1_${name/./_}_dev.name='$name'
set network.$1_${name/./_}_dev.macaddr='$macaddr'
EOF
done
fi

case "$protocol" in
static)
Expand Down Expand Up @@ -213,14 +217,17 @@ generate_switch() {

json_select switch
json_select "$key"
json_get_vars enable reset blinkrate cpu_port
json_get_vars enable reset blinkrate cpu_port \
ar8xxx_mib_type ar8xxx_mib_poll_interval

uci -q batch <<-EOF
add network switch
set network.@switch[-1].name='$key'
set network.@switch[-1].reset='$reset'
set network.@switch[-1].enable_vlan='$enable'
set network.@switch[-1].blinkrate='$blinkrate'
set network.@switch[-1].ar8xxx_mib_type='$ar8xxx_mib_type'
set network.@switch[-1].ar8xxx_mib_poll_interval='$ar8xxx_mib_poll_interval'
EOF

generate_switch_vlans_ports "$1"
Expand Down
2 changes: 1 addition & 1 deletion root/bin/kill
Binary file modified root/bin/opkg
Binary file not shown.
2 changes: 1 addition & 1 deletion root/bin/ps
Binary file modified root/bin/ubus
Binary file not shown.
Binary file modified root/bin/uclient-fetch
Binary file not shown.
2 changes: 1 addition & 1 deletion root/etc/banner
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
|_______|| __|_____|__|__||________||__| |____|
|__| W I R E L E S S F R E E D O M
-----------------------------------------------------
OpenWrt SNAPSHOT, r9680-0304e76
OpenWrt 19.07.0-rc2, r10775-db8345d8e4
-----------------------------------------------------
32 changes: 17 additions & 15 deletions root/etc/board.d/02_network
Original file line number Diff line number Diff line change
@@ -1,25 +1,27 @@
#!/bin/sh
#
# Copyright (C) 2013-2015 OpenWrt.org
#
# Copyright (C) 2014-2016 OpenWrt.org
# Copyright (C) 2017 LEDE project

. /lib/functions/uci-defaults.sh
. /lib/functions.sh
. /lib/functions/system.sh

board_config_update

case "$(board_name)" in
"olimex,a20-olinuxino-micro")
ucidef_set_interface_lan 'wlan0'
;;
"lamobo,lamobo-r1")
ucidef_add_switch "switch0" \
"4:lan:1" "0:lan:2" "1:lan:3" "2:lan:4" "3:wan" "8@eth0"
;;
"xunlong,orangepi-r1")
ucidef_set_interfaces_lan_wan "eth0" "eth1"
board=$(board_name)

case "$board" in
raspberrypi,model-b |\
raspberrypi,model-b-plus |\
raspberrypi,model-b-rev2 |\
raspberrypi,2-model-b |\
raspberrypi,3-model-b |\
raspberrypi,3-model-b-plus)
ucidef_set_interface_lan "eth0"
;;
*)
ucidef_set_interface_lan 'eth0'

raspberrypi,model-zero-w)
ucidef_set_interface_lan "wlan0"
;;
esac

Expand Down
75 changes: 41 additions & 34 deletions root/etc/config/luci
Original file line number Diff line number Diff line change
@@ -1,34 +1,41 @@
config core main
option lang auto
option mediaurlbase /luci-static/material
option resourcebase /luci-static/resources

config extern flash_keep
option uci "/etc/config/"
option dropbear "/etc/dropbear/"
option openvpn "/etc/openvpn/"
option passwd "/etc/passwd"
option opkg "/etc/opkg.conf"
option firewall "/etc/firewall.user"
option uploads "/lib/uci/upload/"

config internal languages
option en "English"
option zh_cn "中文 (Chinese)"

config internal sauth
option sessionpath "/tmp/luci-sessions"
option sessiontime 3600

config internal ccache
option enable 1

config internal themes
option Bootstrap "/luci-static/bootstrap"
option Material "/luci-static/material"

config internal apply
option rollback 30
option holdoff 4
option timeout 5
option display 1.5

config core 'main'
option lang 'auto'
option resourcebase '/luci-static/resources'
option mediaurlbase '/luci-static/material'

config extern 'flash_keep'
option uci '/etc/config/'
option dropbear '/etc/dropbear/'
option openvpn '/etc/openvpn/'
option passwd '/etc/passwd'
option opkg '/etc/opkg.conf'
option firewall '/etc/firewall.user'
option uploads '/lib/uci/upload/'

config internal 'languages'
option zh_cn '中文 (Chinese)'
option en 'English'

config internal 'sauth'
option sessionpath '/tmp/luci-sessions'
option sessiontime '3600'

config internal 'ccache'
option enable '1'

config internal 'themes'
option Bootstrap '/luci-static/bootstrap'
option Material '/luci-static/material'

config internal 'apply'
option rollback '30'
option holdoff '4'
option timeout '5'
option display '1.5'

config internal 'diag'
option dns 'openwrt.org'
option ping 'openwrt.org'
option route 'openwrt.org'

9 changes: 5 additions & 4 deletions root/etc/config/minidlna
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
config minidlna config
option 'enabled' '0'

config minidlna 'config'
option enabled '0'
option user 'nobody'
option port '8200'
option interface 'eth0,wlan0,p2p0'
option friendly_name 'OpenWrt DLNA Server'
option db_dir '/var/run/minidlna'
option log_dir '/var/log/minidlna'
option inotify '1'
option enable_tivo '0'
option wide_links '0'
option strict_dlna '0'
option presentation_url ''
option notify_interval '900'
option serial '12345678'
option model_number '1'
option root_container '.'
list media_dir '/mnt'
option album_art_names 'Cover.jpg/cover.jpg/AlbumArtSmall.jpg/albumartsmall.jpg/AlbumArt.jpg/albumart.jpg/Album.jpg/album.jpg/Folder.jpg/folder.jpg/Thumb.jpg/thumb.jpg'
option friendly_name 'ZIDOO_Z9S'

65 changes: 38 additions & 27 deletions root/etc/config/ucitrack
Original file line number Diff line number Diff line change
@@ -1,65 +1,76 @@

config network
option init network
list affects dhcp
list affects radvd
option init 'network'
list affects 'dhcp'
list affects 'radvd'

config wireless
list affects network
list affects 'network'

config firewall
option init firewall
list affects luci-splash
list affects qos
list affects miniupnpd
option init 'firewall'
list affects 'luci-splash'
list affects 'qos'
list affects 'miniupnpd'

config olsr
option init olsrd
option init 'olsrd'

config dhcp
option init dnsmasq
list affects odhcpd
option init 'dnsmasq'
list affects 'odhcpd'

config odhcpd
option init odhcpd
option init 'odhcpd'

config dropbear
option init dropbear
option init 'dropbear'

config httpd
option init httpd
option init 'httpd'

config fstab
option init fstab
option init 'fstab'

config qos
option init qos
option init 'qos'

config system
option init led
option init 'led'
option exec '/etc/init.d/log reload'
list affects luci_statistics
list affects dhcp
list affects 'luci_statistics'
list affects 'dhcp'

config luci_splash
option init luci_splash
option init 'luci_splash'

config upnpd
option init miniupnpd
option init 'miniupnpd'

config ntpclient
option init ntpclient
option init 'ntpclient'

config samba
option init samba
option init 'samba'

config tinyproxy
option init tinyproxy

config minidlna 'minidlna'
option init 'minidlna'
option init 'tinyproxy'

config transmission
option init 'transmission'

config aria2
option init 'aria2'

config afpd 'afpd'
option init 'afpd'

config nfsd
option init 'nfsd'

config vsftpd 'vsftpd'
option init 'vsftpd'

config minidlna 'minidlna'
option init 'minidlna'

10 changes: 9 additions & 1 deletion root/etc/config/uhttpd
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ config uhttpd main
# If this number is exceeded, further requests are
# queued until the number of running requests drops
# below the limit again.
option max_requests 1
option max_requests 3

# Maximum number of concurrent connections.
# If this number is exceeded, further TCP connection
Expand Down Expand Up @@ -118,9 +118,17 @@ config cert defaults
# Validity time
option days 730

# key type: rsa or ec
option key_type rsa

# RSA key size
option bits 2048

# EC curve name
# Curve names vary between mbedtls/px5g and openssl
# P-256 or P-384 are guaranteed to work
option ec_curve P-256

# Location
option country ZZ
option state Somewhere
Expand Down
2 changes: 1 addition & 1 deletion root/etc/device_info
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
DEVICE_MANUFACTURER='OpenWrt'
DEVICE_MANUFACTURER_URL='http://openwrt.org/'
DEVICE_MANUFACTURER_URL='https://openwrt.org/'
DEVICE_PRODUCT='Generic'
DEVICE_REVISION='v0'
Loading

0 comments on commit 04b2e8a

Please sign in to comment.