anduin revisou este gist . Ir para a revisão
1 file changed, 1 insertion, 1 deletion
build.sh
@@ -33,7 +33,7 @@ proxmoxPackages="virtio-console-helper qemu-ga" | |||
33 | 33 | echo "# STEP 0. Install prerequisites ..." | |
34 | 34 | # Needs to run 'make' | |
35 | 35 | DEBIAN_FRONTEND=noninteractive sudo apt update -y | |
36 | - | DEBIAN_FRONTEND=noninteractive sudo apt install qemu-utils upx-ucl librsync-dev rsync unzip libncurses-dev subversion curl gawk -y | |
36 | + | DEBIAN_FRONTEND=noninteractive sudo apt install qemu-utils upx-ucl librsync-dev rsync unzip libncurses-dev subversion curl gawk file -y | |
37 | 37 | ||
38 | 38 | echo "# STEP 1. Gathering information ..." | |
39 | 39 | echo "What platform are you building for? [Enter 'bare' for bare-metal, 'esxi' for VMware ESXi, 'proxmox' for Proxmox VE]:" |
anduin revisou este gist . Ir para a revisão
1 file changed, 25 insertions, 24 deletions
build.sh
@@ -20,6 +20,7 @@ luci-app-wol luci-i18n-wol-zh-cn \ | |||
20 | 20 | luci-app-banip luci-i18n-banip-zh-cn \ | |
21 | 21 | luci-app-watchcat luci-i18n-watchcat-zh-cn \ | |
22 | 22 | luci-app-uhttpd uhttpd \ | |
23 | + | luci-app-passwall2 luci-i18n-passwall2-zh-cn \ | |
23 | 24 | luci-theme-bootstrap luci-theme-argon \ | |
24 | 25 | 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 \ | |
25 | 26 | umdns ca-bundle haveged wget wget-ssl iperf3 telnet-bsd speedtest-cli qrencode lm-sensors-detect lscpu lsblk uhubctl losetup bind-dig httping tcping \ | |
@@ -63,6 +64,9 @@ mkdir ./builder | |||
63 | 64 | tar xf ./$builderFileName -C ./builder/ --strip-components=1 | |
64 | 65 | cd ./builder | |
65 | 66 | ||
67 | + | wget https://github.com/xiaorouji/openwrt-passwall2/releases/download/1.31-1/luci-23.05_luci-app-passwall2_1.31-1_all.ipk -P ./packages/ | |
68 | + | wget https://github.com/xiaorouji/openwrt-passwall2/releases/download/1.31-1/luci-23.05_luci-i18n-passwall2-zh-cn_git-24.240.60041-8cbc6b9_all.ipk -P ./packages/ | |
69 | + | ||
66 | 70 | echo "# STEP 3. Preparing to build image ..." | |
67 | 71 | ||
68 | 72 | # Change source from https://downloads.immortalwrt.org/ to https://immortalwrt.aiursoft.cn/ | |
@@ -85,27 +89,24 @@ echo "# STEP 4. Building image ..." | |||
85 | 89 | make image PACKAGES="$pkgConfig" ROOTFS_PARTSIZE=1024 j=32 V=sc | |
86 | 90 | echo "# DONE. See built images under: ./builder/bin/targets/x86/64/" | |
87 | 91 | ||
88 | - | if [ "$platform" = "esxi" ] | |
89 | - | then | |
90 | - | echo "The file you need is with name like 'immortalwrt-${version}-x86-64-generic-ext4-combined-efi.vmdk.gz'." | |
91 | - | echo "Please unzip it and upload to your ESXi server." | |
92 | - | echo "You need to create a new virtual machine with the following settings:" | |
93 | - | echo " - Guest OS: Linux, Version: Other 5.x or later Linux (64-bit)" | |
94 | - | echo " - Memory: 512MB or more, reserve all guest memory" | |
95 | - | echo " - Disk: Use existing disk, select the VMDK file you just uploaded, use IDE controller" | |
96 | - | echo " - Network: Add two new network adapters, pass through to the physical network adapter" | |
97 | - | echo " - Other settings: Set the boot order to boot from hard disk first" | |
98 | - | echo " - Other settings: Set the boot mode from BIOS to EFI" | |
99 | - | echo " - Other settings: Enable IO MMU" | |
100 | - | echo " - Other settings: Enable Performance counters" | |
101 | - | echo " - Other settings: Add Precision Clock. (ESXi must synchronize the time with a trusted time source)" | |
102 | - | echo " - Other settings: Remove the floppy drive & USB controller" | |
103 | - | echo "And the IP address of the virtual machine will be 192.168.1.1" | |
104 | - | echo "All interfaces will be bridged as br-lan" | |
105 | - | echo "You need to edit the following settings for your ImmortalWRT:" | |
106 | - | echo " - Password: Change the password for root and the web interface" | |
107 | - | echo " - Network: Remove the default br-lan and create new interfaces with one-one mapping to the physical network adapter" | |
108 | - | echo " - Hardware Acceleration: Disable hardware acceleration for your router" | |
109 | - | echo " - Name: Change the name for the local network" | |
110 | - | echo " - IPv6: Turn off IPv6 ULA because we don't need it" | |
111 | - | fi | |
92 | + | echo "The file you need is with name like 'immortalwrt-${version}-x86-64-generic-ext4-combined-efi.vmdk.gz'." | |
93 | + | echo "Please unzip it and upload to your ESXi server." | |
94 | + | echo "You need to create a new virtual machine with the following settings:" | |
95 | + | echo " - Guest OS: Linux, Version: Other 5.x or later Linux (64-bit)" | |
96 | + | echo " - Memory: 512MB or more, reserve all guest memory" | |
97 | + | echo " - Disk: Use existing disk, select the VMDK file you just uploaded, use IDE controller" | |
98 | + | echo " - Network: Add two new network adapters, pass through to the physical network adapter" | |
99 | + | echo " - Other settings: Set the boot order to boot from hard disk first" | |
100 | + | echo " - Other settings: Set the boot mode from BIOS to EFI" | |
101 | + | echo " - Other settings: Enable IO MMU" | |
102 | + | echo " - Other settings: Enable Performance counters" | |
103 | + | echo " - Other settings: Add Precision Clock. (ESXi must synchronize the time with a trusted time source)" | |
104 | + | echo " - Other settings: Remove the floppy drive & USB controller" | |
105 | + | echo "And the IP address of the virtual machine will be 192.168.1.1" | |
106 | + | echo "All interfaces will be bridged as br-lan" | |
107 | + | echo "You need to edit the following settings for your ImmortalWRT:" | |
108 | + | echo " - Password: Change the password for root and the web interface" | |
109 | + | echo " - Network: Remove the default br-lan and create new interfaces with one-one mapping to the physical network adapter" | |
110 | + | echo " - Hardware Acceleration: Disable hardware acceleration for your router" | |
111 | + | echo " - Name: Change the name for the local network" | |
112 | + | echo " - IPv6: Turn off IPv6 ULA because we don't need it" |
anduin revisou este gist . Ir para a revisão
1 file changed, 8 insertions, 5 deletions
build.sh
@@ -1,6 +1,6 @@ | |||
1 | 1 | #!/bin/sh | |
2 | 2 | routerUser="root" | |
3 | - | version="23.05.1" | |
3 | + | version="23.05.3" | |
4 | 4 | #baseUrl="https://downloads.immortalwrt.org/releases/${version}/targets/x86/64" | |
5 | 5 | baseUrl="https://immortalwrt.aiursoft.cn/releases/${version}/targets/x86/64" # Use mirror to speed up download | |
6 | 6 | builderFileName="immortalwrt-imagebuilder-${version}-x86-64.Linux-x86_64.tar.xz" | |
@@ -11,7 +11,10 @@ kmod-e1000 kmod-e1000e kmod-igb kmod-ixgbe kmod-ixgbevf kmod-igc \ | |||
11 | 11 | pciutils usbutils \ | |
12 | 12 | 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 \ | |
13 | 13 | luci-i18n-opkg-zh-cn luci-i18n-firewall-zh-cn \ | |
14 | - | luci-i18n-passwall-zh-cn luci-app-passwall xray-core \ | |
14 | + | xray-core v2ray-geoip v2ray-geosite resolveip \ | |
15 | + | luci-i18n-ttyd-zh-cn luci-app-ttyd \ | |
16 | + | luci-i18n-nut-zh-cn luci-app-nut \ | |
17 | + | nut nut-common nut-driver-apcupsd-ups nut-driver-usbhid-ups nut-server nut-upsc nut-upscmd nut-web-cgi \ | |
15 | 18 | luci-app-upnp luci-i18n-upnp-zh-cn \ | |
16 | 19 | luci-app-wol luci-i18n-wol-zh-cn \ | |
17 | 20 | luci-app-banip luci-i18n-banip-zh-cn \ | |
@@ -68,12 +71,12 @@ sed -i "s/https:\/\/downloads.immortalwrt.org/https:\/\/immortalwrt.aiursoft.cn/ | |||
68 | 71 | # Set grub timeout to 0 | |
69 | 72 | sed -i 's/CONFIG_GRUB_TIMEOUT="[0-9]"/CONFIG_GRUB_TIMEOUT="0"/g' ./.config | |
70 | 73 | # Image generation config | |
71 | - | #sed -i "s/CONFIG_TARGET_ROOTFS_EXT4FS=y/CONFIG_TARGET_ROOTFS_EXT4FS=n/g" ./.config | |
74 | + | sed -i "s/CONFIG_TARGET_ROOTFS_EXT4FS=y/CONFIG_TARGET_ROOTFS_EXT4FS=n/g" ./.config | |
72 | 75 | sed -i "s/CONFIG_VHDX_IMAGES=y/CONFIG_VHDX_IMAGES=n/g" ./.config # Disable VHDX because we only need to support bare-metal, ESXi and Proxmox. VHDX is for Hyper-V. | |
73 | 76 | sed -i "s/CONFIG_QCOW2_IMAGES=y/CONFIG_QCOW2_IMAGES=n/g" ./.config # Disable QCOW2 because we only need to support bare-metal, ESXi and Proxmox. QCOW2 is for KVM. | |
74 | 77 | sed -i "s/CONFIG_ISO_IMAGES=y/CONFIG_ISO_IMAGES=n/g" ./.config # Disable ISO because we only need to support bare-metal, ESXi and Proxmox. ISO is for CD-ROM. | |
75 | - | #sed -i "s/CONFIG_VMDK_IMAGES=y/CONFIG_VMDK_IMAGES=n/g" ./.config # Enable VMDK because we need to support ESXi and Proxmox. VMDK is for VMware. | |
76 | - | #sed -i "s/CONFIG_VDI_IMAGES=y/CONFIG_VDI_IMAGES=n/g" ./.config # Enable VDI because we need to support VirtualBox. VDI is for VirtualBox. | |
78 | + | sed -i "s/CONFIG_VMDK_IMAGES=y/CONFIG_VMDK_IMAGES=n/g" ./.config # Enable VMDK because we need to support ESXi and Proxmox. VMDK is for VMware. | |
79 | + | sed -i "s/CONFIG_VDI_IMAGES=y/CONFIG_VDI_IMAGES=n/g" ./.config # Enable VDI because we need to support VirtualBox. VDI is for VirtualBox. | |
77 | 80 | ||
78 | 81 | # Language config | |
79 | 82 | sed -i "s/# CONFIG_LUCI_LANG_en is not set/CONFIG_LUCI_LANG_en=y/g" ./.config |
anduin revisou este gist . Ir para a revisão
1 file changed, 6 insertions
build.sh
@@ -99,4 +99,10 @@ then | |||
99 | 99 | echo " - Other settings: Remove the floppy drive & USB controller" | |
100 | 100 | echo "And the IP address of the virtual machine will be 192.168.1.1" | |
101 | 101 | echo "All interfaces will be bridged as br-lan" | |
102 | + | echo "You need to edit the following settings for your ImmortalWRT:" | |
103 | + | echo " - Password: Change the password for root and the web interface" | |
104 | + | echo " - Network: Remove the default br-lan and create new interfaces with one-one mapping to the physical network adapter" | |
105 | + | echo " - Hardware Acceleration: Disable hardware acceleration for your router" | |
106 | + | echo " - Name: Change the name for the local network" | |
107 | + | echo " - IPv6: Turn off IPv6 ULA because we don't need it" | |
102 | 108 | fi |
anduin revisou este gist . Ir para a revisão
1 file changed, 1 insertion
build.sh
@@ -8,6 +8,7 @@ pkgConfig="-dnsmasq dnsmasq-full ip-full vim vim-runtime -ethtool ethtool-full \ | |||
8 | 8 | 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 \ | |
9 | 9 | iptables-nft ip6tables-nft kmod-ipt-nat6 kmod-ipt-nat-extra kmod-ipt-nathelper-rtsp kmod-sched-mqprio kmod-ipt-offload \ | |
10 | 10 | kmod-e1000 kmod-e1000e kmod-igb kmod-ixgbe kmod-ixgbevf kmod-igc \ | |
11 | + | pciutils usbutils \ | |
11 | 12 | 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 \ | |
12 | 13 | luci-i18n-opkg-zh-cn luci-i18n-firewall-zh-cn \ | |
13 | 14 | luci-i18n-passwall-zh-cn luci-app-passwall xray-core \ |
anduin revisou este gist . Ir para a revisão
1 file changed, 6 insertions
build.sh
@@ -91,5 +91,11 @@ then | |||
91 | 91 | echo " - Disk: Use existing disk, select the VMDK file you just uploaded, use IDE controller" | |
92 | 92 | echo " - Network: Add two new network adapters, pass through to the physical network adapter" | |
93 | 93 | echo " - Other settings: Set the boot order to boot from hard disk first" | |
94 | + | echo " - Other settings: Set the boot mode from BIOS to EFI" | |
95 | + | echo " - Other settings: Enable IO MMU" | |
96 | + | echo " - Other settings: Enable Performance counters" | |
97 | + | echo " - Other settings: Add Precision Clock. (ESXi must synchronize the time with a trusted time source)" | |
98 | + | echo " - Other settings: Remove the floppy drive & USB controller" | |
94 | 99 | echo "And the IP address of the virtual machine will be 192.168.1.1" | |
100 | + | echo "All interfaces will be bridged as br-lan" | |
95 | 101 | fi |
anduin revisou este gist . Ir para a revisão
1 file changed, 14 insertions, 1 deletion
build.sh
@@ -79,4 +79,17 @@ sed -i "s/# CONFIG_LUCI_LANG_en is not set/CONFIG_LUCI_LANG_en=y/g" ./.config | |||
79 | 79 | ||
80 | 80 | echo "# STEP 4. Building image ..." | |
81 | 81 | make image PACKAGES="$pkgConfig" ROOTFS_PARTSIZE=1024 j=32 V=sc | |
82 | - | echo "# DONE. See built images under: ./builder/bin/targets/x86/64/" | |
82 | + | echo "# DONE. See built images under: ./builder/bin/targets/x86/64/" | |
83 | + | ||
84 | + | if [ "$platform" = "esxi" ] | |
85 | + | then | |
86 | + | echo "The file you need is with name like 'immortalwrt-${version}-x86-64-generic-ext4-combined-efi.vmdk.gz'." | |
87 | + | echo "Please unzip it and upload to your ESXi server." | |
88 | + | echo "You need to create a new virtual machine with the following settings:" | |
89 | + | echo " - Guest OS: Linux, Version: Other 5.x or later Linux (64-bit)" | |
90 | + | echo " - Memory: 512MB or more, reserve all guest memory" | |
91 | + | echo " - Disk: Use existing disk, select the VMDK file you just uploaded, use IDE controller" | |
92 | + | echo " - Network: Add two new network adapters, pass through to the physical network adapter" | |
93 | + | echo " - Other settings: Set the boot order to boot from hard disk first" | |
94 | + | echo "And the IP address of the virtual machine will be 192.168.1.1" | |
95 | + | fi |
anduin revisou este gist . Ir para a revisão
1 file changed, 5 insertions, 5 deletions
build.sh
@@ -68,11 +68,11 @@ sed -i "s/https:\/\/downloads.immortalwrt.org/https:\/\/immortalwrt.aiursoft.cn/ | |||
68 | 68 | sed -i 's/CONFIG_GRUB_TIMEOUT="[0-9]"/CONFIG_GRUB_TIMEOUT="0"/g' ./.config | |
69 | 69 | # Image generation config | |
70 | 70 | #sed -i "s/CONFIG_TARGET_ROOTFS_EXT4FS=y/CONFIG_TARGET_ROOTFS_EXT4FS=n/g" ./.config | |
71 | - | sed -i "s/CONFIG_VHDX_IMAGES=y/CONFIG_VHDX_IMAGES=n/g" ./.config | |
72 | - | sed -i "s/CONFIG_QCOW2_IMAGES=y/CONFIG_QCOW2_IMAGES=n/g" ./.config | |
73 | - | sed -i "s/CONFIG_ISO_IMAGES=y/CONFIG_ISO_IMAGES=n/g" ./.config | |
74 | - | #sed -i "s/CONFIG_VMDK_IMAGES=y/CONFIG_VMDK_IMAGES=n/g" ./.config | |
75 | - | #sed -i "s/CONFIG_VDI_IMAGES=y/CONFIG_VDI_IMAGES=n/g" ./.config | |
71 | + | sed -i "s/CONFIG_VHDX_IMAGES=y/CONFIG_VHDX_IMAGES=n/g" ./.config # Disable VHDX because we only need to support bare-metal, ESXi and Proxmox. VHDX is for Hyper-V. | |
72 | + | sed -i "s/CONFIG_QCOW2_IMAGES=y/CONFIG_QCOW2_IMAGES=n/g" ./.config # Disable QCOW2 because we only need to support bare-metal, ESXi and Proxmox. QCOW2 is for KVM. | |
73 | + | sed -i "s/CONFIG_ISO_IMAGES=y/CONFIG_ISO_IMAGES=n/g" ./.config # Disable ISO because we only need to support bare-metal, ESXi and Proxmox. ISO is for CD-ROM. | |
74 | + | #sed -i "s/CONFIG_VMDK_IMAGES=y/CONFIG_VMDK_IMAGES=n/g" ./.config # Enable VMDK because we need to support ESXi and Proxmox. VMDK is for VMware. | |
75 | + | #sed -i "s/CONFIG_VDI_IMAGES=y/CONFIG_VDI_IMAGES=n/g" ./.config # Enable VDI because we need to support VirtualBox. VDI is for VirtualBox. | |
76 | 76 | ||
77 | 77 | # Language config | |
78 | 78 | sed -i "s/# CONFIG_LUCI_LANG_en is not set/CONFIG_LUCI_LANG_en=y/g" ./.config |
anduin revisou este gist . Ir para a revisão
1 file changed, 5 insertions, 1 deletion
build.sh
@@ -1,7 +1,8 @@ | |||
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 | + | baseUrl="https://immortalwrt.aiursoft.cn/releases/${version}/targets/x86/64" # Use mirror to speed up download | |
5 | 6 | builderFileName="immortalwrt-imagebuilder-${version}-x86-64.Linux-x86_64.tar.xz" | |
6 | 7 | pkgConfig="-dnsmasq dnsmasq-full ip-full vim vim-runtime -ethtool ethtool-full \ | |
7 | 8 | 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 \ | |
@@ -60,6 +61,9 @@ cd ./builder | |||
60 | 61 | ||
61 | 62 | echo "# STEP 3. Preparing to build image ..." | |
62 | 63 | ||
64 | + | # Change source from https://downloads.immortalwrt.org/ to https://immortalwrt.aiursoft.cn/ | |
65 | + | sed -i "s/https:\/\/downloads.immortalwrt.org/https:\/\/immortalwrt.aiursoft.cn/g" ./repositories.conf | |
66 | + | ||
63 | 67 | # Set grub timeout to 0 | |
64 | 68 | sed -i 's/CONFIG_GRUB_TIMEOUT="[0-9]"/CONFIG_GRUB_TIMEOUT="0"/g' ./.config | |
65 | 69 | # Image generation config |
anduin revisou este gist . Ir para a revisão
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 qemu-utils 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 gawk -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]:" |