@@ -91,12 +91,12 if [ "$BUILD_KERNEL" = true ] ; then | |||||
91 | # see e.g. https://askubuntu.com/a/472227 for a summary of ZSWAP (vs ZRAM etc.) |
|
91 | # see e.g. https://askubuntu.com/a/472227 for a summary of ZSWAP (vs ZRAM etc.) | |
92 | # and e.g. https://wiki.archlinux.org/index.php/zswap for parameters etc. |
|
92 | # and e.g. https://wiki.archlinux.org/index.php/zswap for parameters etc. | |
93 |
|
93 | |||
94 |
set_kernel_config ZPOOL y "${KERNEL_DIR}/.config |
|
94 | set_kernel_config ZPOOL y "${KERNEL_DIR}"/.config | |
95 |
set_kernel_config ZSWAP y "${KERNEL_DIR}/.config |
|
95 | set_kernel_config ZSWAP y "${KERNEL_DIR}"/.config | |
96 |
set_kernel_config ZBUD y "${KERNEL_DIR}/.config |
|
96 | set_kernel_config ZBUD y "${KERNEL_DIR}"/.config | |
97 |
set_kernel_config Z3FOLD y "${KERNEL_DIR}/.config |
|
97 | set_kernel_config Z3FOLD y "${KERNEL_DIR}"/.config | |
98 |
set_kernel_config ZSMALLOC y "${KERNEL_DIR}/.config |
|
98 | set_kernel_config ZSMALLOC y "${KERNEL_DIR}"/.config | |
99 |
set_kernel_config PGTABLE_MAPPING y "${KERNEL_DIR}/.config |
|
99 | set_kernel_config PGTABLE_MAPPING y "${KERNEL_DIR}"/.config | |
100 | fi |
|
100 | fi | |
101 |
|
101 | |||
102 | if [ "$KERNEL_VIRT" = true ] && ( [ "$RPI_MODEL" = 3 ] || [ "$RPI_MODEL" = 3P ] ) ; then |
|
102 | if [ "$KERNEL_VIRT" = true ] && ( [ "$RPI_MODEL" = 3 ] || [ "$RPI_MODEL" = 3P ] ) ; then | |
@@ -107,10 +107,39 if [ "$BUILD_KERNEL" = true ] ; then | |||||
107 | # enable basic KVM support; see e.g. |
|
107 | # enable basic KVM support; see e.g. | |
108 | # https://www.raspberrypi.org/forums/viewtopic.php?f=63&t=210546&start=25#p1300453 |
|
108 | # https://www.raspberrypi.org/forums/viewtopic.php?f=63&t=210546&start=25#p1300453 | |
109 |
|
109 | |||
110 |
set_kernel_config VIRTUALIZATION y "${KERNEL_DIR}/.config |
|
110 | set_kernel_config VIRTUALIZATION y "${KERNEL_DIR}"/.config | |
111 |
set_kernel_config KVM y "${KERNEL_DIR}/.config |
|
111 | set_kernel_config KVM y "${KERNEL_DIR}"/.config | |
112 |
set_kernel_config VHOST_NET m "${KERNEL_DIR}/.config |
|
112 | set_kernel_config VHOST_NET m "${KERNEL_DIR}"/.config | |
113 |
set_kernel_config VHOST_CROSS_ENDIAN_LEGACY y "${KERNEL_DIR}/.config |
|
113 | set_kernel_config VHOST_CROSS_ENDIAN_LEGACY y "${KERNEL_DIR}"/.config | |
|
114 | fi | |||
|
115 | ||||
|
116 | if [ "$KERNEL_NF" = true ] && ( [ "$RPI_MODEL" = 3 ] || [ "$RPI_MODEL" = 3P ] ) ; then | |||
|
117 | # Netfilter Xtables support (required for ip_tables - should be enabled already) | |||
|
118 | set_kernel_config NETFILTER_XTABLES m "${KERNEL_DIR}"/.config" | |||
|
119 | # Netfilter nf_tables support | |||
|
120 | set_kernel_config NF_TABLES m "${KERNEL_DIR}"/.config" | |||
|
121 | set_kernel_config NFT_PAYLOAD m "${KERNEL_DIR}"/.config" | |||
|
122 | set_kernel_config NFT_EXTHDR m "${KERNEL_DIR}"/.config" | |||
|
123 | set_kernel_config NFT_META m "${KERNEL_DIR}"/.config" | |||
|
124 | set_kernel_config NFT_CT m "${KERNEL_DIR}"/.config" | |||
|
125 | set_kernel_config NFT_RBTREE m "${KERNEL_DIR}"/.config" | |||
|
126 | set_kernel_config NFT_HASH m "${KERNEL_DIR}"/.config" | |||
|
127 | set_kernel_config NFT_COUNTER m "${KERNEL_DIR}"/.config" | |||
|
128 | set_kernel_config NFT_LOG m "${KERNEL_DIR}"/.config" | |||
|
129 | set_kernel_config NFT_LIMIT m "${KERNEL_DIR}"/.config" | |||
|
130 | set_kernel_config NFT_NAT m "${KERNEL_DIR}"/.config" | |||
|
131 | set_kernel_config NFT_COMPAT m "${KERNEL_DIR}"/.config" | |||
|
132 | # IPv4 nf_tables support | |||
|
133 | set_kernel_config NF_TABLES_IPV4 m | |||
|
134 | set_kernel_config NFT_REJECT_IPV4 m | |||
|
135 | set_kernel_config NFT_CHAIN_ROUTE_IPV4 m | |||
|
136 | set_kernel_config NFT_CHAIN_NAT_IPV4 m | |||
|
137 | # IPv6 nf_tables support | |||
|
138 | set_kernel_config NF_TABLES_IPV6 m | |||
|
139 | set_kernel_config NFT_CHAIN_ROUTE_IPV6 m | |||
|
140 | set_kernel_config NFT_CHAIN_NAT_IPV6 m | |||
|
141 | # Ethernet Bridge nf_tables support | |||
|
142 | set_kernel_config NF_TABLES_BRIDGE m | |||
114 | fi |
|
143 | fi | |
115 |
|
144 | |||
116 | if [ "$KERNELSRC_CONFIG" = true ] ; then |
|
145 | if [ "$KERNELSRC_CONFIG" = true ] ; then |
@@ -87,7 +87,7 set_kernel_config() { | |||||
87 | # flag as $1, value to set as $2, config must exist at "./.config" |
|
87 | # flag as $1, value to set as $2, config must exist at "./.config" | |
88 | local TGT="CONFIG_${1}" |
|
88 | local TGT="CONFIG_${1}" | |
89 | local REP="${2//\//\\/}" |
|
89 | local REP="${2//\//\\/}" | |
90 |
if grep -q "^${TGT}[^_]" |
|
90 | if grep -q "^${TGT}[^_]" "${3}"; then | |
91 | sed -i "s/^\(${TGT}=.*\|# ${TGT} is not set\)/${TGT}=${REP}/" "${3}" |
|
91 | sed -i "s/^\(${TGT}=.*\|# ${TGT} is not set\)/${TGT}=${REP}/" "${3}" | |
92 | else |
|
92 | else | |
93 | echo "${TGT}=${2}" >> "${3}" |
|
93 | echo "${TGT}=${2}" >> "${3}" |
General Comments 0
Vous devez vous connecter pour laisser un commentaire.
Se connecter maintenant