I’m using MT300A router and use it as a portable shadowsocks hotspot. It takes about 45 to 55 seconds from power on to ready to work.
So, my question is, if I only need:
- shadowsocks client with udp relay support
- iPhone usb tethering
- wifi client
what components can be removed to speed up?
I have tried to disable shadowsocks server/lighthttpd/uhttpd/usb storage/kmondvideo, but can’t get sooner than 45 seconds. I’m aiming for less than 20s, is that possible?
Here is my boot log:
Blockquote
[ 0.000000] Linux version 4.4.92 (kyson@gl-inet) (gcc version 5.4.0 (LEDE GCC 5.4.0 r3560-79f57e422d) ) #0 Tue Oct 17 17:46:20 2017
[ 0.000000] Board has DDR2
[ 0.000000] Analog PMU set to hw control
[ 0.000000] Digital PMU set to hw control
[ 0.000000] SoC Type: MediaTek MT7620A ver:2 eco:6
[ 0.000000] bootconsole [early0] enabled
[ 0.000000] CPU0 revision is: 00019650 (MIPS 24KEc)
[ 0.000000] MIPS: machine is GL-MT300A
[ 0.000000] Determined physical RAM map:
[ 0.000000] memory: 08000000 @ 00000000 (usable)
[ 0.000000] Initrd not found or empty - disabling initrd
[ 0.000000] Zone ranges:
[ 0.000000] Normal [mem 0x0000000000000000-0x0000000007ffffff]
[ 0.000000] Movable zone start for each node
[ 0.000000] Early memory node ranges
[ 0.000000] node 0: [mem 0x0000000000000000-0x0000000007ffffff]
[ 0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000007ffffff]
[ 0.000000] On node 0 totalpages: 32768
[ 0.000000] free_area_init_node: node 0, pgdat 803bc4b0, node_mem_map 81000000
[ 0.000000] Normal zone: 256 pages used for memmap
[ 0.000000] Normal zone: 0 pages reserved
[ 0.000000] Normal zone: 32768 pages, LIFO batch:7
[ 0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
[ 0.000000] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[ 0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=132768
[ 0.000000] pcpu-alloc: [0] 0
[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 32512
[ 0.000000] Kernel command line: console=ttyS0,115200 rootfstype=squashfs,jffs2
[ 0.000000] PID hash table entries: 512 (order: -1, 2048 bytes)
[ 0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
[ 0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
[ 0.000000] Writing ErrCtl register=00067f30
[ 0.000000] Readback ErrCtl register=00067f30
[ 0.000000] Memory: 125540K/131072K available (3059K kernel code, 145K rwdata, 728K rodata, 156K init, 208K bss, 5532K reserved, 0K cma-reserved)
[ 0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.000000] NR_IRQS:256
[ 0.000000] CPU Clock: 580MHz
[ 0.000000] clocksource: systick: mask: 0xffff max_cycles: 0xffff, max_idle_ns: 583261500 ns
[ 0.000000] systick: enable autosleep mode
[ 0.000000] systick: running - mult: 214748, shift: 32
[ 0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 6590553264 ns
[ 0.000012] sched_clock: 32 bits at 290MHz, resolution 3ns, wraps every 7405115902ns
[ 0.007577] Calibrating delay loop… 385.84 BogoMIPS (lpj=1929216)
[ 0.070073] pid_max: default: 32768 minimum: 301
[ 0.074706] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.081077] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.094749] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[ 0.104303] futex hash table entries: 256 (order: -1, 3072 bytes)
[ 0.110365] pinctrl core: initialized pinctrl subsystem
[ 0.116787] NET: Registered protocol family 16
[ 0.140886] rt2880_gpio 10000600.gpio: registering 24 gpios
[ 0.146337] rt2880_gpio 10000600.gpio: registering 24 irq handlers
[ 0.152486] rt2880_gpio 10000638.gpio: registering 16 gpios
[ 0.157888] rt2880_gpio 10000638.gpio: registering 16 irq handlers
[ 0.164012] rt2880_gpio 10000660.gpio: registering 32 gpios
[ 0.169413] rt2880_gpio 10000660.gpio: registering 32 irq handlers
[ 0.175533] rt2880_gpio 10000688.gpio: registering 1 gpios
[ 0.180845] rt2880_gpio 10000688.gpio: registering 1 irq handlers
[ 0.188504] clocksource: Switched to clocksource systick
[ 0.195192] NET: Registered protocol family 2
[ 0.200459] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.207185] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.213411] TCP: Hash tables configured (established 1024 bind 1024)
[ 0.219641] UDP hash table entries: 256 (order: 0, 4096 bytes)
[ 0.225267] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[ 0.231708] NET: Registered protocol family 1
[ 0.235926] PCI: CLS 0 bytes, default 32
[ 0.240462] rt-timer 10000100.timer: maximum frequency is 1220Hz
[ 0.247266] Crashlog allocated RAM at address 0x3f00000
[ 0.269235] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[ 0.274857] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[ 0.287293] io scheduler noop registered
[ 0.291105] io scheduler deadline registered (default)
[ 0.296283] ralink-usb-phy usbphy: invalid resource
[ 0.301646] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled
[ 0.311458] console [ttyS0] disabled
[ 0.314907] 10000c00.uartlite: ttyS0 at MMIO 0x10000c00 (irq = 20, base_baud = 2500000) is a Palmchip BK-3103
[ 0.324579] console [ttyS0] enabled
[ 0.331615] bootconsole [early0] disabled
[ 0.346493] spi spi0.0: force spi mode3
[ 0.351014] m25p80 spi0.0: w25q128 (16384 Kbytes)
[ 0.355858] 5 ofpart partitions found on MTD device spi0.0
[ 0.361502] Creating 5 MTD partitions on “spi0.0”:
[ 0.366401] 0x000000000000-0x000000030000 : “u-boot”
[ 0.373312] 0x000000030000-0x000000040000 : “u-boot-env”
[ 0.380673] 0x000000040000-0x000000050000 : “factory”
[ 0.387627] 0x000000050000-0x000000fd0000 : “firmware”
[ 1.700713] 2 uimage-fw partitions found on MTD device firmware
[ 1.706778] 0x000000050000-0x000000192da9 : “kernel”
[ 1.713485] 0x000000192da9-0x000000fd0000 : “rootfs”
[ 1.720456] mtd: device 5 (rootfs) set to be root filesystem
[ 1.726382] 1 squashfs-split partitions found on MTD device rootfs
[ 1.732764] 0x0000009c4000-0x000000fd0000 : “rootfs_data”
[ 1.740189] 0x000000ff0000-0x000001000000 : “art”
[ 1.747913] rt2880-pinmux pinctrl: pin io40 already requested by pinctrl; cannot claim for 10100000.ethernet
[ 1.758034] rt2880-pinmux pinctrl: pin-40 (10100000.ethernet) status -22
[ 1.764893] rt2880-pinmux pinctrl: could not request pin 40 (io40) from group ephy on device rt2880-pinmux
[ 1.774850] mtk_soc_eth 10100000.ethernet: Error applying setting, reverse things back
[ 1.785769] gsw: setting port4 to ephy mode
[ 1.790123] mtk_soc_eth 10100000.ethernet eth0 (uninitialized): port 0 link up (100Mbps/Full duplex)
[ 1.799659] mtk_soc_eth 10100000.ethernet: loaded mt7620 driver
[ 1.806509] mtk_soc_eth 10100000.ethernet eth0: mediatek frame engine at 0xb0100000, irq 5
[ 1.815734] rt2880_wdt 10000120.watchdog: Initialized
[ 1.822561] NET: Registered protocol family 10
[ 1.830808] NET: Registered protocol family 17
[ 1.835443] bridge: automatic filtering via arp/ip/ip6tables has been deprecated. Update your scripts to load br_netfilter if you need this.
[ 1.848384] 8021q: 802.1Q VLAN Support v1.8
[ 1.854384] hctosys: unable to open rtc device (rtc0)
[ 1.873214] VFS: Mounted root (squashfs filesystem) readonly on device 31:5.
[ 1.881336] Freeing unused kernel memory: 156K
[ 4.325151] init: Console is alive
[ 4.328945] init: - watchdog -
[ 8.850036] kmodloader: loading kernel modules from /etc/modules-boot.d/
[ 8.947624] usbcore: registered new interface driver usbfs
[ 8.953387] usbcore: registered new interface driver hub
[ 8.958966] usbcore: registered new device driver usb
[ 8.970608] exFAT: Version 1.2.9
[ 9.014055] SCSI subsystem initialized
[ 9.025197] ehci_hcd: USB 2.0 ‘Enhanced’ Host Controller (EHCI) Driver
[ 9.033909] ehci-platform: EHCI generic platform driver
[ 9.049688] phy phy-usbphy.0: remote usb device wakeup disabled
[ 9.055736] phy phy-usbphy.0: UTMI 16bit 30MHz
[ 9.060321] ehci-platform 101c0000.ehci: EHCI Host Controller
[ 9.066217] ehci-platform 101c0000.ehci: new USB bus registered, assigned bus number 1
[ 9.074436] ehci-platform 101c0000.ehci: irq 26, io mem 0x101c0000
[ 9.086999] ehci-platform 101c0000.ehci: USB 2.0 started, EHCI 1.00
[ 9.094553] hub 1-0:1.0: USB hub found
[ 9.098811] hub 1-0:1.0: 1 port detected
[ 9.106458] ohci_hcd: USB 1.1 ‘Open’ Host Controller (OHCI) Driver
[ 9.114771] ohci-platform: OHCI generic platform driver
[ 9.120469] ohci-platform 101c1000.ohci: Generic Platform OHCI controller
[ 9.127483] ohci-platform 101c1000.ohci: new USB bus registered, assigned bus number 2
[ 9.135658] ohci-platform 101c1000.ohci: irq 26, io mem 0x101c1000
[ 9.165881] hub 2-0:1.0: USB hub found
[ 9.170164] hub 2-0:1.0: 1 port detected
[ 9.177250] uhci_hcd: USB Universal Host Controller Interface driver
[ 9.197979] MTK MSDC device init.
[ 9.215584] mtk-sd: MediaTek MT6575 MSDC Driver
[ 9.223621] sdhci: Secure Digital Host Controller Interface driver
[ 9.230007] sdhci: Copyright(c) Pierre Ossman
[ 9.235935] sdhci-pltfm: SDHCI platform and OF driver helper
[ 9.246370] usbcore: registered new interface driver usb-storage
[ 9.256224] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[ 9.267807] init: - preinit -
[ 10.797930] 8021q: adding VLAN 0 to HW filter on device eth0
[ 12.606929] jffs2: notice: (409) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found.
[ 12.627620] mount_root: switching to jffs2 overlay
[ 12.650029] urandom-seed: Seeding with /etc/urandom.seed
[ 12.801569] procd: - early -
[ 12.804729] procd: - watchdog -
[ 13.636033] procd: - watchdog -
[ 13.639527] procd: - ubus -
[ 13.988324] random: ubusd: uninitialized urandom read (4 bytes read, 25 bits of entropy available)
[ 14.003227] random: ubusd: uninitialized urandom read (4 bytes read, 26 bits of entropy available)
[ 14.100962] random: ubusd: uninitialized urandom read (4 bytes read, 26 bits of entropy available)
[ 14.113925] random: ubusd: uninitialized urandom read (4 bytes read, 26 bits of entropy available)
[ 14.123211] random: ubusd: uninitialized urandom read (4 bytes read, 26 bits of entropy available)
[ 14.132601] random: ubusd: uninitialized urandom read (4 bytes read, 26 bits of entropy available)
[ 14.142566] random: ubusd: uninitialized urandom read (4 bytes read, 26 bits of entropy available)
[ 14.152204] procd: - init -
[ 15.282337] random: jshn: uninitialized urandom read (4 bytes read, 28 bits of entropy available)
[ 15.380989] kmodloader: loading kernel modules from /etc/modules.d/*
[ 15.659411] ntfs: driver 2.1.32 [Flags: R/O MODULE].
[ 15.681999] Initializing XFRM netlink socket
[ 15.695329] NET: Registered protocol family 15
[ 15.701591] random: ubusd: uninitialized urandom read (4 bytes read, 28 bits of entropy available)
[ 15.714238] tun: Universal TUN/TAP device driver, 1.6
[ 15.719407] tun: (C) 1999-2004 Max Krasnyansky maxk@qualcomm.com
[ 15.727204] random: ubus: uninitialized urandom read (4 bytes read, 28 bits of entropy available)
[ 16.164599] l2tp_core: L2TP core driver, V2.0
[ 16.178949] l2tp_netlink: L2TP netlink interface
[ 16.205846] gre: GRE over IPv4 demultiplexor driver
[ 16.226098] ip_gre: GRE over IPv4 tunneling driver
[ 16.264189] ip6_tables: (C) 2000-2006 Netfilter Core Team
[ 16.300607] Netfilter messages via NETLINK v0.30.
[ 16.318353] ip_set: protocol 6
[ 16.758932] Loading modules backported from Linux version wt-2017-01-31-0-ge882dff19e7f
[ 16.767182] Backport generated by backports.git backports-20160324-13-g24da7d3c
[ 17.191863] i2c /dev entries driver
[ 17.303848] u32 classifier
[ 17.306623] input device check on
[ 17.310354] Actions configured
[ 17.339296] Mirror/redirect action on
[ 17.381109] nf_conntrack version 0.5.0 (1964 buckets, 7856 max)
[ 17.451962] fuse init (API version 7.23)
[ 17.502483] usbcore: registered new interface driver cdc_acm
[ 17.508272] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
[ 17.554900] usbcore: registered new interface driver cdc_wdm
[ 17.579293] ip_tables: (C) 2000-2006 Netfilter Core Team
[ 17.605300] usbcore: registered new interface driver ipheth
[ 17.834134] usbcore: registered new interface driver usbserial
[ 17.840195] usbcore: registered new interface driver usbserial_generic
[ 17.847033] usbserial: USB Serial support registered for generic
[ 17.998894] xt_time: kernel timezone is -0000
[ 18.008579] usbcore: registered new interface driver cdc_ether
[ 18.038003] usbcore: registered new interface driver cdc_ncm
[ 18.058754] usbcore: registered new interface driver cp210x
[ 18.064655] usbserial: USB Serial support registered for cp210x
[ 18.095218] usbcore: registered new interface driver huawei_cdc_ncm
[ 18.179167] PPP generic driver version 2.4.2
[ 18.193272] PPP MPPE Compression module registered
[ 18.214160] NET: Registered protocol family 24
[ 18.220943] PPTP driver version 0.8.5
[ 18.238867] usbcore: registered new interface driver qmi_wwan
[ 18.256553] usbcore: registered new interface driver rndis_host
[ 18.336376] rt2800_wmac 10180000.wmac: loaded eeprom from mtd device “factory”
[ 18.343851] ieee80211 phy0: rt2x00_set_rt: Info - RT chipset 6352, rev 0500 detected
[ 18.351769] ieee80211 phy0: rt2x00_set_rf: Info - RF chipset 7620 detected
[ 18.359523] ieee80211 phy0: Selected rate control algorithm ‘minstrel_ht’
[ 18.394943] usbcore: registered new interface driver sierra
[ 18.400749] usbserial: USB Serial support registered for Sierra USB modem
[ 18.435307] usbcore: registered new interface driver sierra_net
[ 18.462883] l2tp_ppp: PPPoL2TP kernel driver, V2.0
[ 18.485691] usbcore: registered new interface driver option
[ 18.491500] usbserial: USB Serial support registered for GSM modem (1-port)
[ 18.526551] kmodloader: done loading kernel modules from /etc/modules.d/*
[ 33.161364] 8021q: adding VLAN 0 to HW filter on device eth0
[ 33.173562] device eth0.1 entered promiscuous mode
[ 33.178470] device eth0 entered promiscuous mode
[ 33.193258] br-lan: port 1(eth0.1) entered forwarding state
[ 33.198993] br-lan: port 1(eth0.1) entered forwarding state
[ 35.192082] br-lan: port 1(eth0.1) entered forwarding state
[ 40.683237] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[ 40.711000] device wlan0 entered promiscuous mode
[ 44.091727] IPv6: ADDRCONF(NETDEV_UP): wlan-sta: link is not ready
[ 47.050378] wlan-sta: authenticate with some MAC
[ 47.079710] wlan-sta: send auth to some MAC (try 1/3)
[ 47.087309] wlan-sta: authenticated
[ 47.103976] wlan-sta: associate withsome MAC (try 1/3)
[ 47.116227] wlan-sta: RX AssocResp fromsome MAC (capab=0x411 status=0 aid=2)
[ 47.124676] wlan-sta: associated
[ 47.128241] IPv6: ADDRCONF(NETDEV_CHANGE): wlan-sta: link becomes ready
[ 47.175925] wlan-sta: Limiting TX power to 20 (20 - 0) dBm as advertised by 6e:ab:31:39:f5:3c
[ 47.804390] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[ 47.811097] br-lan: port 2(wlan0) entered forwarding state
[ 47.816814] br-lan: port 2(wlan0) entered forwarding state
[ 47.827365] wlan-sta: deauthenticating from 6e:ab:31:39:f5:3c by local choice (Reason: 3=DEAUTH_LEAVING)
[ 48.087620] br-lan: port 2(wlan0) entered disabled state
[ 48.814091] wlan-sta: authenticate with 6e:ab:31:39:f5:3c
[ 48.828360] wlan-sta: send auth to 6e:ab:31:39:f5:3c (try 1/3)
[ 48.835954] wlan-sta: authenticated
[ 48.843982] wlan-sta: associate with 6e:ab:31:39:f5:3c (try 1/3)
[ 48.851774] wlan-sta: RX AssocResp from 6e:ab:31:39:f5:3c (capab=0x411 status=0 aid=2)
[ 48.860241] wlan-sta: associated
[ 48.941302] wlan-sta: Limiting TX power to 20 (20 - 0) dBm as advertised by 6e:ab:31:39:f5:3c
[ 49.518670] br-lan: port 2(wlan0) entered forwarding state
[ 49.524402] br-lan: port 2(wlan0) entered forwarding state
[ 50.294694] br-lan: port 2(wlan0) entered forwarding state
[ 50.415806] random: nonblocking pool is initialized