anduin revised this gist . Go to revision
1 file changed, 1 insertion, 1 deletion
build.sh
@@ -27,7 +27,7 @@ proxmoxPackages="virtio-console-helper qemu-ga" | |||
27 | 27 | echo "# STEP 0. Install prerequisites ..." | |
28 | 28 | # Needs to run 'make' | |
29 | 29 | DEBIAN_FRONTEND=noninteractive sudo apt update -y | |
30 | - | DEBIAN_FRONTEND=noninteractive sudo apt install upx-ucl librsync-dev rsync unzip libncurses-dev subversion curl -y | |
30 | + | DEBIAN_FRONTEND=noninteractive sudo apt install qemu-utils upx-ucl librsync-dev rsync unzip libncurses-dev subversion curl -y | |
31 | 31 | ||
32 | 32 | echo "# STEP 1. Gathering information ..." | |
33 | 33 | echo "What platform are you building for? [Enter 'bare' for bare-metal, 'esxi' for VMware ESXi, 'proxmox' for Proxmox VE]:" |
anduin revised this gist . Go to revision
1 file changed, 1 insertion, 1 deletion
build.sh
@@ -74,5 +74,5 @@ sed -i "s/CONFIG_ISO_IMAGES=y/CONFIG_ISO_IMAGES=n/g" ./.config | |||
74 | 74 | sed -i "s/# CONFIG_LUCI_LANG_en is not set/CONFIG_LUCI_LANG_en=y/g" ./.config | |
75 | 75 | ||
76 | 76 | echo "# STEP 4. Building image ..." | |
77 | - | make image FILES="backup" PACKAGES="$pkgConfig" ROOTFS_PARTSIZE=1024 j=32 V=sc | |
77 | + | make image PACKAGES="$pkgConfig" ROOTFS_PARTSIZE=1024 j=32 V=sc | |
78 | 78 | echo "# DONE. See built images under: ./builder/bin/targets/x86/64/" |
anduin revised this gist . Go to revision
No changes
anduin revised this gist . Go to revision
1 file changed, 1 insertion, 1 deletion
build.sh
@@ -63,7 +63,7 @@ echo "# STEP 3. Preparing to build image ..." | |||
63 | 63 | # Set grub timeout to 0 | |
64 | 64 | sed -i 's/CONFIG_GRUB_TIMEOUT="[0-9]"/CONFIG_GRUB_TIMEOUT="0"/g' ./.config | |
65 | 65 | # Image generation config | |
66 | - | sed -i "s/CONFIG_TARGET_ROOTFS_EXT4FS=y/CONFIG_TARGET_ROOTFS_EXT4FS=n/g" ./.config | |
66 | + | #sed -i "s/CONFIG_TARGET_ROOTFS_EXT4FS=y/CONFIG_TARGET_ROOTFS_EXT4FS=n/g" ./.config | |
67 | 67 | sed -i "s/CONFIG_VHDX_IMAGES=y/CONFIG_VHDX_IMAGES=n/g" ./.config | |
68 | 68 | sed -i "s/CONFIG_QCOW2_IMAGES=y/CONFIG_QCOW2_IMAGES=n/g" ./.config | |
69 | 69 | sed -i "s/CONFIG_ISO_IMAGES=y/CONFIG_ISO_IMAGES=n/g" ./.config |
anduin revised this gist . Go to revision
1 file changed, 5 insertions
build.sh
@@ -24,6 +24,11 @@ bareMentalPackages="intel-microcode iucode-tool kmod-i2c-i801 kmod-w83627hf-wdt | |||
24 | 24 | esxiPackages="kmod-vmxnet3 open-vm-tools open-vm-tools-fuse" | |
25 | 25 | proxmoxPackages="virtio-console-helper qemu-ga" | |
26 | 26 | ||
27 | + | echo "# STEP 0. Install prerequisites ..." | |
28 | + | # Needs to run 'make' | |
29 | + | DEBIAN_FRONTEND=noninteractive sudo apt update -y | |
30 | + | DEBIAN_FRONTEND=noninteractive sudo apt install upx-ucl librsync-dev rsync unzip libncurses-dev subversion curl -y | |
31 | + | ||
27 | 32 | echo "# STEP 1. Gathering information ..." | |
28 | 33 | echo "What platform are you building for? [Enter 'bare' for bare-metal, 'esxi' for VMware ESXi, 'proxmox' for Proxmox VE]:" | |
29 | 34 | read platform |
anduin revised this gist . Go to revision
1 file changed, 1 insertion, 8 deletions
build.sh
@@ -1,7 +1,7 @@ | |||
1 | 1 | #!/bin/sh | |
2 | 2 | routerUser="root" | |
3 | 3 | version="23.05.1" | |
4 | - | baseUrl="https://downloads.immortalwrt.org/releases/${version}/targets/x86/64/" | |
4 | + | baseUrl="https://downloads.immortalwrt.org/releases/${version}/targets/x86/64" | |
5 | 5 | builderFileName="immortalwrt-imagebuilder-${version}-x86-64.Linux-x86_64.tar.xz" | |
6 | 6 | pkgConfig="-dnsmasq dnsmasq-full ip-full vim vim-runtime -ethtool ethtool-full \ | |
7 | 7 | kmod-nf-nat kmod-nf-nat6 kmod-tls kmod-nft-arp kmod-nft-compat kmod-nft-connlimit kmod-nft-dup-inet kmod-nft-queue kmod-nft-socket kmod-nft-tproxy kmod-nft-xfrm kmod-nft-offload \ | |
@@ -43,13 +43,6 @@ case $platform in | |||
43 | 43 | ;; | |
44 | 44 | esac | |
45 | 45 | ||
46 | - | echo "Enter the IP address of your router [default: is 192.168.50.1]:" | |
47 | - | read routerIp | |
48 | - | if [ -z "$routerIp" ] | |
49 | - | then | |
50 | - | routerIp="192.168.50.1" | |
51 | - | fi | |
52 | - | ||
53 | 46 | echo "# STEP 2. Downloading OpenWrt ${version} Image Builder ..." | |
54 | 47 | if ! [ -f "./${builderFileName}" ] | |
55 | 48 | then |
anduin revised this gist . Go to revision
1 file changed, 80 insertions
build.sh(file created)
@@ -0,0 +1,80 @@ | |||
1 | + | #!/bin/sh | |
2 | + | routerUser="root" | |
3 | + | version="23.05.1" | |
4 | + | baseUrl="https://downloads.immortalwrt.org/releases/${version}/targets/x86/64/" | |
5 | + | builderFileName="immortalwrt-imagebuilder-${version}-x86-64.Linux-x86_64.tar.xz" | |
6 | + | pkgConfig="-dnsmasq dnsmasq-full ip-full vim vim-runtime -ethtool ethtool-full \ | |
7 | + | kmod-nf-nat kmod-nf-nat6 kmod-tls kmod-nft-arp kmod-nft-compat kmod-nft-connlimit kmod-nft-dup-inet kmod-nft-queue kmod-nft-socket kmod-nft-tproxy kmod-nft-xfrm kmod-nft-offload \ | |
8 | + | iptables-nft ip6tables-nft kmod-ipt-nat6 kmod-ipt-nat-extra kmod-ipt-nathelper-rtsp kmod-sched-mqprio kmod-ipt-offload \ | |
9 | + | kmod-e1000 kmod-e1000e kmod-igb kmod-ixgbe kmod-ixgbevf kmod-igc \ | |
10 | + | kmod-usb2 kmod-usb3 usbutils exfat-fsck exfat-mkfs kmod-fs-exfat kmod-usb-storage kmod-usb-storage-extras kmod-usb-storage-uas kmod-usb-serial kmod-usb-hid \ | |
11 | + | luci-i18n-opkg-zh-cn luci-i18n-firewall-zh-cn \ | |
12 | + | luci-i18n-passwall-zh-cn luci-app-passwall xray-core \ | |
13 | + | luci-app-upnp luci-i18n-upnp-zh-cn \ | |
14 | + | luci-app-wol luci-i18n-wol-zh-cn \ | |
15 | + | luci-app-banip luci-i18n-banip-zh-cn \ | |
16 | + | luci-app-watchcat luci-i18n-watchcat-zh-cn \ | |
17 | + | luci-app-uhttpd uhttpd \ | |
18 | + | luci-theme-bootstrap luci-theme-argon \ | |
19 | + | luci-app-statistics luci-i18n-statistics-zh-cn collectd-mod-disk collectd-mod-cpu collectd-mod-cpufreq collectd-mod-df collectd-mod-interface collectd-mod-processes collectd-mod-uptime collectd-mod-vmem collectd-mod-email collectd-mod-ethstat collectd-mod-conntrack collectd-mod-dhcpleases collectd-mod-syslog collectd-mod-write-http collectd-mod-ping collectd-mod-dns collectd-mod-memory collectd-mod-thermal collectd-mod-sensors collectd-mod-smart smartmontools smartmontools-drivedb \ | |
20 | + | umdns ca-bundle haveged wget wget-ssl iperf3 telnet-bsd speedtest-cli qrencode lm-sensors-detect lscpu lsblk uhubctl losetup bind-dig httping tcping \ | |
21 | + | " | |
22 | + | ||
23 | + | bareMentalPackages="intel-microcode iucode-tool kmod-i2c-i801 kmod-w83627hf-wdt kmod-itco-wdt" | |
24 | + | esxiPackages="kmod-vmxnet3 open-vm-tools open-vm-tools-fuse" | |
25 | + | proxmoxPackages="virtio-console-helper qemu-ga" | |
26 | + | ||
27 | + | echo "# STEP 1. Gathering information ..." | |
28 | + | echo "What platform are you building for? [Enter 'bare' for bare-metal, 'esxi' for VMware ESXi, 'proxmox' for Proxmox VE]:" | |
29 | + | read platform | |
30 | + | case $platform in | |
31 | + | bare) | |
32 | + | pkgConfig="$pkgConfig $bareMentalPackages" | |
33 | + | ;; | |
34 | + | esxi) | |
35 | + | pkgConfig="$pkgConfig $esxiPackages" | |
36 | + | ;; | |
37 | + | proxmox) | |
38 | + | pkgConfig="$pkgConfig $proxmoxPackages" | |
39 | + | ;; | |
40 | + | *) | |
41 | + | echo "Invalid platform. Exiting." | |
42 | + | exit 1 | |
43 | + | ;; | |
44 | + | esac | |
45 | + | ||
46 | + | echo "Enter the IP address of your router [default: is 192.168.50.1]:" | |
47 | + | read routerIp | |
48 | + | if [ -z "$routerIp" ] | |
49 | + | then | |
50 | + | routerIp="192.168.50.1" | |
51 | + | fi | |
52 | + | ||
53 | + | echo "# STEP 2. Downloading OpenWrt ${version} Image Builder ..." | |
54 | + | if ! [ -f "./${builderFileName}" ] | |
55 | + | then | |
56 | + | wget "$baseUrl/$builderFileName" -P . | |
57 | + | fi | |
58 | + | rm -rf ./builder | |
59 | + | mkdir ./builder | |
60 | + | tar xf ./$builderFileName -C ./builder/ --strip-components=1 | |
61 | + | cd ./builder | |
62 | + | ||
63 | + | echo "# STEP 3. Preparing to build image ..." | |
64 | + | ||
65 | + | # Set grub timeout to 0 | |
66 | + | sed -i 's/CONFIG_GRUB_TIMEOUT="[0-9]"/CONFIG_GRUB_TIMEOUT="0"/g' ./.config | |
67 | + | # Image generation config | |
68 | + | sed -i "s/CONFIG_TARGET_ROOTFS_EXT4FS=y/CONFIG_TARGET_ROOTFS_EXT4FS=n/g" ./.config | |
69 | + | sed -i "s/CONFIG_VHDX_IMAGES=y/CONFIG_VHDX_IMAGES=n/g" ./.config | |
70 | + | sed -i "s/CONFIG_QCOW2_IMAGES=y/CONFIG_QCOW2_IMAGES=n/g" ./.config | |
71 | + | sed -i "s/CONFIG_ISO_IMAGES=y/CONFIG_ISO_IMAGES=n/g" ./.config | |
72 | + | #sed -i "s/CONFIG_VMDK_IMAGES=y/CONFIG_VMDK_IMAGES=n/g" ./.config | |
73 | + | #sed -i "s/CONFIG_VDI_IMAGES=y/CONFIG_VDI_IMAGES=n/g" ./.config | |
74 | + | ||
75 | + | # Language config | |
76 | + | sed -i "s/# CONFIG_LUCI_LANG_en is not set/CONFIG_LUCI_LANG_en=y/g" ./.config | |
77 | + | ||
78 | + | echo "# STEP 4. Building image ..." | |
79 | + | make image FILES="backup" PACKAGES="$pkgConfig" ROOTFS_PARTSIZE=1024 j=32 V=sc | |
80 | + | echo "# DONE. See built images under: ./builder/bin/targets/x86/64/" |