Skip to content

Instantly share code, notes, and snippets.

@ptpt52
Last active April 16, 2023 00:52
Show Gist options
  • Save ptpt52/b28c9499d3be0479b0a43d384fb0dafa to your computer and use it in GitHub Desktop.
Save ptpt52/b28c9499d3be0479b0a43d384fb0dafa to your computer and use it in GitHub Desktop.
用tmpfs编译openwrt
#!/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