-
-
Save ptpt52/b28c9499d3be0479b0a43d384fb0dafa to your computer and use it in GitHub Desktop.
用tmpfs编译openwrt
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/bash | |
#setup environment for tmpfs build for openwrt/x-wrt. | |
mkdir -p tmpfs_local/host tmpfs_local/hostpkg | |
mkdir tmpfs | |
#mount tmpfs size=24G (total 32G ram) for build_dir. | |
sudo mount -t tmpfs -o size=24G tmpfs tmpfs/ | |
test -e tmpfs/host || ln -s ../tmpfs_local/host tmpfs/ | |
test -e tmpfs/hostpkg || ln -s ../tmpfs_local/hostpkg tmpfs/ | |
rm -f build_dir | |
test -e build_dir || ln -s tmpfs build_dir |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment