apt install gcc g++ cmake make automake autoconf libtool git scons \
flex bison libncurses5 libncurses5-dev libreadline5 libreadline-dev \
libaio1 libaio-dev libev4 libev-dev \
curl libcurl3 libcurl4-openssl-dev libssl-dev zlib1g-dev
This file contains hidden or 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
| ! Terminal: xterm | |
| xterm.locale:true | |
| xterm.utf8: true | |
| xterm*utf8Title:true | |
| xterm*fontMenu*fontdefault*Label:Default | |
| xterm*faceName:xos4 Terminus Regular:antialias=true:pixelsize=12 | |
| xterm*faceNameDoublesize:WenQuanYi Micro Hei Mono:pixelsize=12:antialias=true |
This file contains hidden or 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
| There seems to be a misunderstanding in the following parts. | |
| src/boost/function/function_template.hpp at line 572 | |
| src/boost/function/function_base.hpp at line 308 | |
| Here are the errors as reported by gcc: | |
| src/boost/function/function_template.hpp:572:11: error: placement new constructing an object of type 'network_boost::algorithm::detail::token_finderF<network::detail::normalize_path_segments(network::string_view)::<lambda(char)> >' and size '8' in a region of type 'char' and size '1' [-Werror=placement-new=] | |
| src/boost/function/function_base.hpp:308:13: error: placement new constructing an object of type 'network_boost::detail::function::functor_manager_common<network_boost::algorithm::detail::token_finderF<network::detail::normalize_path_segments(network::string_view)::<lambda(char)> > >::functor_type {aka network_boost::algorithm::detail::token_finderF<network::detail::normalize_path_segments(network::string_view)::<lambda(char)> >}' and size '8' in a region of type 'char' and size '1' [-Werror=placement-ne |
This file contains hidden or 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
| qemu-system-aarch64 -smp 2 -m 1024 -M virt -bios QEMU_EFI.fd -nographic \ | |
| -device virtio-blk-device,drive=image \ | |
| -drive if=none,id=image,file=xenial-server-cloudimg-arm64-uefi1.img \ | |
| -device virtio-blk-device,drive=cloud \ | |
| -drive if=none,id=cloud,file=cloud.img \ | |
| -netdev user,id=user0 -device virtio-net-device,netdev=user0 -redir tcp:2222::22 \ | |
| -cpu cortex-a57 |
This file contains hidden or 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
| /* | |
| iptables -t mangle -A PREROUTING -p icmp -j MARK --set-mark 0x15 | |
| iptables -t mangle -A PREROUTING -p udp -j MARK --set-mark 0x15 | |
| iptables -t mangle -A PREROUTING -p tcp -j MARK --set-mark 0x15 | |
| echo 1 > /proc/sys/net/ipv4/ip_forward | |
| ip rule add fwmark 0x15 lookup 100 | |
| ip route add 0.0.0.0/0 dev tun0 table 100 |
This file contains hidden or 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
| #!/bin/sh -ex | |
| # http://git.z3bra.org/cross/file/cross-gcc.html | |
| # Couple of useful links: | |
| # + http://wiki.osdev.org/GCC_Cross-Compiler | |
| # + http://wiki.osdev.org/Cross-Compiler_Successful_Builds | |
| # + https://git.framasoft.org/Ypnose/solyste/blob/master/scripts/create-crossenv | |
| # + http://kegel.com/crosstool/ | |
| # + https://github.com/GregorR/musl-cross/tree/master/patches | |
| # | |
| # 0. download gcc, binutils, gmp, mpc, mpfr |
#!/bin/bash
WRT_HOME=$(cd "$(dirname "$0")"; pwd)
echo "script_path: $WRT_HOME"
G_GCC=$(sed -n -E -e 's/^CONFIG_GCC_VERSION="(.*?)"$/\1/p' ${WRT_HOME}/.config)
G_LIBC=$(sed -n -E -e 's/^CONFIG_LIBC="(.*?)"$/\1/p' ${WRT_HOME}/.config)
G_PKG_ARCH=$(sed -n -E -e 's/^CONFIG_TARGET_ARCH_PACKAGES="(.*?)"$/\1/p' ${WRT_HOME}/.config)
G_ARCH=$(sed -n -E -e 's/^CONFIG_ARCH="(.*?)"$/\1/p' ${WRT_HOME}/.config)
This file contains hidden or 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
| # | |
| # The following script will | |
| # - Create Linux bridge $BR_WAN, $BR_LAN | |
| # - Install IP addresses and basic routes | |
| # - Enable proxy_arp on $BR_WAN | |
| # - Enable ip_forward | |
| # - Enable MASQUERADE on $IF_INET | |
| # - $BR_LAN, $BR_WAN has to be allowed in ~/.usr/etc/qemu/bridge.conf | |
| # |
This file contains hidden or 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
| #!/bin/sh | |
| function __pstack() { | |
| if test ! -r /proc/$1; then | |
| echo "Process $1 not found." 1>&2 | |
| exit 1 | |
| fi | |
| # GDB doesn't allow "thread apply all bt" when the process isn't | |
| # threaded; need to peek at the process to determine if that or the |