Home » Uncategorized » go on x86_64-linux-musl

go on x86_64-linux-musl

downloaded go1.1,

cd go/src

vi make.bash

remove “-Werror”

vi cmd/dist/unix.c

– bwritestr(&b, “/var/tmp”);

+ bwritestr(&b, “/tmp”);

vi cmd/dist/build.c


vi libmach/linux.c

– #include <sys/signal.h>

+ #include <signal.h>


– #if defined(__GLIBC__) && __GLIBC__ ==2

+ #if 1

– #include <sys/errno.h>

+#include <errno.h>

vi include/linux/netfilter/xt_osf.h

+ #include <linux/tcp.h>

vi include/linux/netfilter_ipv4/ip_tables.h

+ #include <sys/types.h>


cat /etc/rc
mount -t proc proc /proc
mount -o remount,rw /
mount -t sysfs sysfs /sys
mount -t devpts devpts /dev/pts
echo /bin/mdev > /proc/sys/kernel/hotplug
hostname $(cat /etc/hostname)
# network setup
ifconfig lo
ifconfig eth0
ifconfig eth0 netmask
ifconfig eth0 broadcast
ifconfig eth0 down
ifconfig eth0 up
route add default gw
/sbin/iptables -P INPUT DROP
/sbin/iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
/sbin/iptables -A INPUT -p tcp -i eth0 -j REJECT --reject-with tcp-reset
/sbin/iptables -A INPUT -p udp -i eth0 -j REJECT --reject-with icmp-port-unreachable 
/sbin/iptables -P FORWARD DROP


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s