Merge "Upload OpenWRT files in arm64 and support overlay"
diff --git a/arm/Android.bp b/arm/Android.bp
new file mode 100644
index 0000000..b7b557b
--- /dev/null
+++ b/arm/Android.bp
@@ -0,0 +1,74 @@
+package {
+    // See: http://go/android-license-faq
+    // A large-scale-change added 'default_applicable_licenses' to import
+    // all of the 'license_kinds' from "openwrt_license"
+    // to get the below license kinds:
+    //   SPDX-license-identifier-Apache-2.0
+    //   SPDX-license-identifier-BSD
+    //   SPDX-license-identifier-GPL-2.0
+    default_applicable_licenses: ["openwrt_license"],
+}
+
+genrule {
+    name: "openwrt_customization_aarch64",
+    tools: [
+        "make_f2fs",
+        "sload_f2fs",
+    ],
+    srcs: [
+        ":openwrt_license_files",
+        "kmods/*",
+        "packages/*",
+        "uci-defaults/*",
+        "config/*",
+    ],
+    out: ["customization.img"],
+    cmd: "mkdir -p $(genDir)/root/upper/etc/uci-defaults && " +
+         "mkdir -p $(genDir)/root/upper/ipks && " +
+         "mkdir -p $(genDir)/root/upper/etc/config && " +
+         "cp $(in) $(genDir)/ && " +
+         "mv $(genDir)/*.ipk $(genDir)/root/upper/ipks && " +
+         "mv $(genDir)/LICENSE $(genDir)/HOW_TO_GET_SOURCE_CODE $(genDir)/root/upper && " +
+         "mv $(genDir)/0_default_config $(genDir)/root/upper/etc/uci-defaults && " +
+         "find $(genDir) -maxdepth 1 -type f -exec mv {} $(genDir)/root/upper/etc/config \\; && " +
+         "ln -s 2 $(genDir)/root/.fs_state && " +
+         "truncate -s 128M $(out) && " +
+         "$(location make_f2fs) $(out) && " +
+         "$(location sload_f2fs) -f $(genDir)/root -t / $(out)",
+}
+
+genrule {
+    name: "openwrt_rootfs_base_img_aarch64",
+    srcs: [
+        "images/openwrt-22.03.2-armvirt-64-rootfs-squashfs.img.gz",
+    ],
+    out: ["base_rootfs.img"],
+    cmd: "cp $(in) $(genDir) && gzip -d $(genDir)/* && cp $(genDir)/* $(out)",
+}
+
+genrule {
+    name: "combined_openwrt_rootfs_aarch64",
+    tools: [
+        "append_squashfs_overlay",
+    ],
+    srcs: [
+        ":openwrt_rootfs_base_img_aarch64",
+        ":openwrt_customization_aarch64",
+    ],
+    out: ["openwrt_rootfs.img"],
+    cmd: "$(location append_squashfs_overlay) $(in) $(out) -w",
+}
+
+prebuilt_etc_host {
+    name: "openwrt_rootfs_aarch64",
+    src: ":combined_openwrt_rootfs_aarch64",
+    sub_dir: "openwrt/images",
+    visibility: ["//device/google/cuttlefish/build"],
+}
+
+prebuilt_etc_host {
+    name: "openwrt_kernel_aarch64",
+    src: "images/openwrt-22.03.2-armvirt-64-Image",
+    sub_dir: "openwrt/images",
+    visibility: ["//device/google/cuttlefish/build"],
+}
diff --git a/arm/config/dhcp b/arm/config/dhcp
new file mode 100644
index 0000000..c55d720
--- /dev/null
+++ b/arm/config/dhcp
@@ -0,0 +1,52 @@
+config dnsmasq
+	option domainneeded '1'
+	option boguspriv '1'
+	option filterwin2k '0'
+	option localise_queries '1'
+	option rebind_protection '1'
+	option rebind_localhost '1'
+	option local '/lan/'
+	option domain 'lan'
+	option expandhosts '1'
+	option nonegcache '0'
+	option authoritative '1'
+	option readethers '1'
+	option leasefile '/tmp/dhcp.leases'
+	option resolvfile '/tmp/resolv.conf.d/resolv.conf.auto'
+	option nonwildcard '1'
+	option localservice '1'
+	option ednspacket_max '1232'
+
+config dhcp 'lan'
+	option interface 'lan'
+	option start '100'
+	option limit '150'
+	option leasetime '12h'
+	option dhcpv4 'server'
+	option dhcpv6 'server'
+	option ra 'server'
+	option ra_slaac '1'
+	list ra_flags 'managed-config'
+	list ra_flags 'other-config'
+
+config dhcp 'wan'
+	option interface 'wan'
+	option ignore '1'
+
+config odhcpd 'odhcpd'
+	option maindhcp '0'
+	option leasefile '/tmp/hosts/odhcpd'
+	option leasetrigger '/usr/sbin/odhcpd-update'
+	option loglevel '4'
+
+config 'dhcp' 'wifi'
+	option 'interface' 'wifi'
+	option 'start' '100'
+	option 'limit' '150'
+	option 'leasetime' '12h'
+
+config 'dhcp' 'wifi2'
+	option 'interface' 'wifi2'
+	option 'start' '100'
+	option 'limit' '150'
+	option 'leasetime' '12h'
diff --git a/arm/config/firewall b/arm/config/firewall
new file mode 100644
index 0000000..76f85e7
--- /dev/null
+++ b/arm/config/firewall
@@ -0,0 +1,169 @@
+config defaults
+	option syn_flood '1'
+	option input 'ACCEPT'
+	option output 'ACCEPT'
+	option forward 'REJECT'
+
+config zone
+	option name wifi
+	list network 'wifi'
+	option input ACCEPT
+	option output ACCEPT
+	option forward REJECT
+
+config 'forwarding'
+	option 'src' 'wifi'
+	option 'dest' 'wan'
+
+config zone
+	option name wifi2
+	list network 'wifi2'
+	option input ACCEPT
+	option output ACCEPT
+	option forward REJECT
+
+config 'forwarding'
+	option 'src' 'wifi2'
+	option 'dest' 'wan'
+
+config zone
+	option name 'lan'
+	list network 'lan'
+	option input 'ACCEPT'
+	option output 'ACCEPT'
+	option forward 'ACCEPT'
+
+config zone
+	option name 'wan'
+	list network 'wan'
+	list network 'wan6'
+	option input 'REJECT'
+	option output 'ACCEPT'
+	option forward 'REJECT'
+	option masq '1'
+	option mtu_fix '1'
+
+config forwarding
+	option src 'lan'
+	option dest 'wan'
+
+config rule
+	option name 'Allow-DHCP-Renew'
+	option src 'wan'
+	option proto 'udp'
+	option dest_port '68'
+	option target 'ACCEPT'
+	option family 'ipv4'
+
+config rule
+	option name 'Allow-Ping'
+	option src 'wan'
+	option proto 'icmp'
+	option icmp_type 'echo-request'
+	option family 'ipv4'
+	option target 'ACCEPT'
+
+config rule
+	option name 'Allow-IGMP'
+	option src 'wan'
+	option proto 'igmp'
+	option family 'ipv4'
+	option target 'ACCEPT'
+
+config rule
+	option name 'Allow-DHCPv6'
+	option src 'wan'
+	option proto 'udp'
+	option src_ip 'fc00::/6'
+	option dest_ip 'fc00::/6'
+	option dest_port '546'
+	option family 'ipv6'
+	option target 'ACCEPT'
+
+config rule
+	option name 'Allow-MLD'
+	option src 'wan'
+	option proto 'icmp'
+	option src_ip 'fe80::/10'
+	list icmp_type '130/0'
+	list icmp_type '131/0'
+	list icmp_type '132/0'
+	list icmp_type '143/0'
+	option family 'ipv6'
+	option target 'ACCEPT'
+
+config rule
+	option name 'Allow-ICMPv6-Input'
+	option src 'wan'
+	option proto 'icmp'
+	list icmp_type 'echo-request'
+	list icmp_type 'echo-reply'
+	list icmp_type 'destination-unreachable'
+	list icmp_type 'packet-too-big'
+	list icmp_type 'time-exceeded'
+	list icmp_type 'bad-header'
+	list icmp_type 'unknown-header-type'
+	list icmp_type 'router-solicitation'
+	list icmp_type 'neighbour-solicitation'
+	list icmp_type 'router-advertisement'
+	list icmp_type 'neighbour-advertisement'
+	option limit '1000/sec'
+	option family 'ipv6'
+	option target 'ACCEPT'
+
+config rule
+	option name 'Allow-ICMPv6-Forward'
+	option src 'wan'
+	option dest '*'
+	option proto 'icmp'
+	list icmp_type 'echo-request'
+	list icmp_type 'echo-reply'
+	list icmp_type 'destination-unreachable'
+	list icmp_type 'packet-too-big'
+	list icmp_type 'time-exceeded'
+	list icmp_type 'bad-header'
+	list icmp_type 'unknown-header-type'
+	option limit '1000/sec'
+	option family 'ipv6'
+	option target 'ACCEPT'
+
+config rule
+	option name 'Allow-IPSec-ESP'
+	option src 'wan'
+	option dest 'lan'
+	option proto 'esp'
+	option target 'ACCEPT'
+
+config rule
+	option name 'Allow-ISAKMP'
+	option src 'wan'
+	option dest 'lan'
+	option dest_port '500'
+	option proto 'udp'
+	option target 'ACCEPT'
+
+config rule
+	option name 'Support-UDP-Traceroute'
+	option src 'wan'
+	option dest_port '33434:33689'
+	option proto 'udp'
+	option family 'ipv4'
+	option target 'REJECT'
+	option enabled 'false'
+
+config include
+	option path '/etc/firewall.user'
+
+config rule
+	option name 'Allow SSH'
+	option src 'wan'
+	option target 'ACCEPT'
+	option proto 'tcp'
+	option dest_port '22'
+
+config rule
+	option name 'Allow LuCI'
+	option src 'wan'
+	option target 'ACCEPT'
+	option proto 'tcp'
+	option dest_port '80 443'
diff --git a/arm/config/network b/arm/config/network
new file mode 100644
index 0000000..4fae663
--- /dev/null
+++ b/arm/config/network
@@ -0,0 +1,33 @@
+config interface 'loopback'
+	option device 'lo'
+	option proto 'static'
+	option ipaddr '127.0.0.1'
+	option netmask '255.0.0.0'
+
+config globals 'globals'
+	option ula_prefix 'fd72:5afb:a7cf::/48'
+
+config device
+	option name 'br-lan'
+	option type 'bridge'
+	list ports 'eth0'
+
+config interface 'wan'
+	option device 'br-lan'
+	option proto 'static'
+	option netmask '255.255.255.0'
+	option ipaddr '192.168.96.2'
+	option ip6assign '30'
+	option gateway '192.168.96.1'
+	option dns '8.8.8.8'
+	option broadcast '192.168.96.3'
+
+config 'interface' 'wifi'
+	option 'proto' 'static'
+	option 'ipaddr' '192.168.2.1'
+	option 'netmask' '255.255.255.0'
+
+config 'interface' 'wifi2'
+	option 'proto' 'static'
+	option 'ipaddr' '192.168.3.1'
+	option 'netmask' '255.255.255.0'
diff --git a/arm/config/system b/arm/config/system
new file mode 100644
index 0000000..269b7f7
--- /dev/null
+++ b/arm/config/system
@@ -0,0 +1,15 @@
+config system
+	option hostname 'OpenWrt'
+	option timezone 'UTC'
+	option ttylogin '0'
+	option log_size '64'
+	option urandom_seed '0'
+	option log_file '/dev/hvc0'
+
+config timeserver 'ntp'
+	option enabled '1'
+	option enable_server '0'
+	list server '0.openwrt.pool.ntp.org'
+	list server '1.openwrt.pool.ntp.org'
+	list server '2.openwrt.pool.ntp.org'
+	list server '3.openwrt.pool.ntp.org'
diff --git a/arm/config/wireless b/arm/config/wireless
new file mode 100644
index 0000000..7232d47
--- /dev/null
+++ b/arm/config/wireless
@@ -0,0 +1,29 @@
+config wifi-device 'radio0'
+	option type 'mac80211'
+	option channel '36'
+	option band '5g'
+	option path 'virtual/mac80211_hwsim/hwsim0'
+	option htmode 'VHT80'
+	option disabled '0'
+
+config wifi-iface 'default_radio0'
+	option device 'radio0'
+	option mode 'ap'
+	option encryption 'none'
+	option network 'wifi'
+	option ssid 'VirtWifi'
+
+config wifi-device 'radio1'
+	option type 'mac80211'
+	option channel '36'
+	option band '5g'
+	option path 'virtual/mac80211_hwsim/hwsim1'
+	option htmode 'VHT80'
+	option disabled '0'
+
+config wifi-iface 'default_radio1'
+	option device 'radio1'
+	option mode 'ap'
+	option encryption 'none'
+	option network 'wifi2'
+	option ssid 'VirtWifi2'
diff --git a/arm/images/openwrt-22.03.2-armvirt-64-Image b/arm/images/openwrt-22.03.2-armvirt-64-Image
new file mode 100644
index 0000000..8c18120
--- /dev/null
+++ b/arm/images/openwrt-22.03.2-armvirt-64-Image
Binary files differ
diff --git a/arm/images/openwrt-22.03.2-armvirt-64-rootfs-squashfs.img.gz b/arm/images/openwrt-22.03.2-armvirt-64-rootfs-squashfs.img.gz
new file mode 100644
index 0000000..261459a
--- /dev/null
+++ b/arm/images/openwrt-22.03.2-armvirt-64-rootfs-squashfs.img.gz
Binary files differ
diff --git a/arm/kmods/kmod-cfg80211_5.10.146+5.15.58-1-1_aarch64_cortex-a53.ipk b/arm/kmods/kmod-cfg80211_5.10.146+5.15.58-1-1_aarch64_cortex-a53.ipk
new file mode 100644
index 0000000..3aa8d0a
--- /dev/null
+++ b/arm/kmods/kmod-cfg80211_5.10.146+5.15.58-1-1_aarch64_cortex-a53.ipk
Binary files differ
diff --git a/arm/kmods/kmod-crypto-aead_5.10.146-1_aarch64_cortex-a53.ipk b/arm/kmods/kmod-crypto-aead_5.10.146-1_aarch64_cortex-a53.ipk
new file mode 100644
index 0000000..d3d5ae2
--- /dev/null
+++ b/arm/kmods/kmod-crypto-aead_5.10.146-1_aarch64_cortex-a53.ipk
Binary files differ
diff --git a/arm/kmods/kmod-crypto-ccm_5.10.146-1_aarch64_cortex-a53.ipk b/arm/kmods/kmod-crypto-ccm_5.10.146-1_aarch64_cortex-a53.ipk
new file mode 100644
index 0000000..087eea5
--- /dev/null
+++ b/arm/kmods/kmod-crypto-ccm_5.10.146-1_aarch64_cortex-a53.ipk
Binary files differ
diff --git a/arm/kmods/kmod-crypto-cmac_5.10.146-1_aarch64_cortex-a53.ipk b/arm/kmods/kmod-crypto-cmac_5.10.146-1_aarch64_cortex-a53.ipk
new file mode 100644
index 0000000..a605ebf
--- /dev/null
+++ b/arm/kmods/kmod-crypto-cmac_5.10.146-1_aarch64_cortex-a53.ipk
Binary files differ
diff --git a/arm/kmods/kmod-crypto-crc32c_5.10.146-1_aarch64_cortex-a53.ipk b/arm/kmods/kmod-crypto-crc32c_5.10.146-1_aarch64_cortex-a53.ipk
new file mode 100644
index 0000000..d3ad1a3
--- /dev/null
+++ b/arm/kmods/kmod-crypto-crc32c_5.10.146-1_aarch64_cortex-a53.ipk
Binary files differ
diff --git a/arm/kmods/kmod-crypto-ctr_5.10.146-1_aarch64_cortex-a53.ipk b/arm/kmods/kmod-crypto-ctr_5.10.146-1_aarch64_cortex-a53.ipk
new file mode 100644
index 0000000..c79558b
--- /dev/null
+++ b/arm/kmods/kmod-crypto-ctr_5.10.146-1_aarch64_cortex-a53.ipk
Binary files differ
diff --git a/arm/kmods/kmod-crypto-gcm_5.10.146-1_aarch64_cortex-a53.ipk b/arm/kmods/kmod-crypto-gcm_5.10.146-1_aarch64_cortex-a53.ipk
new file mode 100644
index 0000000..7789247
--- /dev/null
+++ b/arm/kmods/kmod-crypto-gcm_5.10.146-1_aarch64_cortex-a53.ipk
Binary files differ
diff --git a/arm/kmods/kmod-crypto-gf128_5.10.146-1_aarch64_cortex-a53.ipk b/arm/kmods/kmod-crypto-gf128_5.10.146-1_aarch64_cortex-a53.ipk
new file mode 100644
index 0000000..777f99c
--- /dev/null
+++ b/arm/kmods/kmod-crypto-gf128_5.10.146-1_aarch64_cortex-a53.ipk
Binary files differ
diff --git a/arm/kmods/kmod-crypto-ghash_5.10.146-1_aarch64_cortex-a53.ipk b/arm/kmods/kmod-crypto-ghash_5.10.146-1_aarch64_cortex-a53.ipk
new file mode 100644
index 0000000..7b0ed8e
--- /dev/null
+++ b/arm/kmods/kmod-crypto-ghash_5.10.146-1_aarch64_cortex-a53.ipk
Binary files differ
diff --git a/arm/kmods/kmod-crypto-hash_5.10.146-1_aarch64_cortex-a53.ipk b/arm/kmods/kmod-crypto-hash_5.10.146-1_aarch64_cortex-a53.ipk
new file mode 100644
index 0000000..5915375
--- /dev/null
+++ b/arm/kmods/kmod-crypto-hash_5.10.146-1_aarch64_cortex-a53.ipk
Binary files differ
diff --git a/arm/kmods/kmod-crypto-hmac_5.10.146-1_aarch64_cortex-a53.ipk b/arm/kmods/kmod-crypto-hmac_5.10.146-1_aarch64_cortex-a53.ipk
new file mode 100644
index 0000000..dd26443
--- /dev/null
+++ b/arm/kmods/kmod-crypto-hmac_5.10.146-1_aarch64_cortex-a53.ipk
Binary files differ
diff --git a/arm/kmods/kmod-crypto-manager_5.10.146-1_aarch64_cortex-a53.ipk b/arm/kmods/kmod-crypto-manager_5.10.146-1_aarch64_cortex-a53.ipk
new file mode 100644
index 0000000..5f9bda6
--- /dev/null
+++ b/arm/kmods/kmod-crypto-manager_5.10.146-1_aarch64_cortex-a53.ipk
Binary files differ
diff --git a/arm/kmods/kmod-crypto-null_5.10.146-1_aarch64_cortex-a53.ipk b/arm/kmods/kmod-crypto-null_5.10.146-1_aarch64_cortex-a53.ipk
new file mode 100644
index 0000000..06753db
--- /dev/null
+++ b/arm/kmods/kmod-crypto-null_5.10.146-1_aarch64_cortex-a53.ipk
Binary files differ
diff --git a/arm/kmods/kmod-crypto-rng_5.10.146-1_aarch64_cortex-a53.ipk b/arm/kmods/kmod-crypto-rng_5.10.146-1_aarch64_cortex-a53.ipk
new file mode 100644
index 0000000..c0e84b0
--- /dev/null
+++ b/arm/kmods/kmod-crypto-rng_5.10.146-1_aarch64_cortex-a53.ipk
Binary files differ
diff --git a/arm/kmods/kmod-crypto-seqiv_5.10.146-1_aarch64_cortex-a53.ipk b/arm/kmods/kmod-crypto-seqiv_5.10.146-1_aarch64_cortex-a53.ipk
new file mode 100644
index 0000000..45beb08
--- /dev/null
+++ b/arm/kmods/kmod-crypto-seqiv_5.10.146-1_aarch64_cortex-a53.ipk
Binary files differ
diff --git a/arm/kmods/kmod-crypto-sha256_5.10.146-1_aarch64_cortex-a53.ipk b/arm/kmods/kmod-crypto-sha256_5.10.146-1_aarch64_cortex-a53.ipk
new file mode 100644
index 0000000..790f6f8
--- /dev/null
+++ b/arm/kmods/kmod-crypto-sha256_5.10.146-1_aarch64_cortex-a53.ipk
Binary files differ
diff --git a/arm/kmods/kmod-mac80211-hwsim_5.10.146+5.15.58-1-1_aarch64_cortex-a53.ipk b/arm/kmods/kmod-mac80211-hwsim_5.10.146+5.15.58-1-1_aarch64_cortex-a53.ipk
new file mode 100644
index 0000000..b42403c
--- /dev/null
+++ b/arm/kmods/kmod-mac80211-hwsim_5.10.146+5.15.58-1-1_aarch64_cortex-a53.ipk
Binary files differ
diff --git a/arm/kmods/kmod-mac80211_5.10.146+5.15.58-1-1_aarch64_cortex-a53.ipk b/arm/kmods/kmod-mac80211_5.10.146+5.15.58-1-1_aarch64_cortex-a53.ipk
new file mode 100644
index 0000000..da6d67c
--- /dev/null
+++ b/arm/kmods/kmod-mac80211_5.10.146+5.15.58-1-1_aarch64_cortex-a53.ipk
Binary files differ
diff --git a/arm/packages/hostapd-common_2022-01-16-cff80b4f-14.1_aarch64_cortex-a53.ipk b/arm/packages/hostapd-common_2022-01-16-cff80b4f-14.1_aarch64_cortex-a53.ipk
new file mode 100644
index 0000000..c6a9d96
--- /dev/null
+++ b/arm/packages/hostapd-common_2022-01-16-cff80b4f-14.1_aarch64_cortex-a53.ipk
Binary files differ
diff --git a/arm/packages/hostapd_2022-01-16-cff80b4f-14.1_aarch64_cortex-a53.ipk b/arm/packages/hostapd_2022-01-16-cff80b4f-14.1_aarch64_cortex-a53.ipk
new file mode 100644
index 0000000..871891f
--- /dev/null
+++ b/arm/packages/hostapd_2022-01-16-cff80b4f-14.1_aarch64_cortex-a53.ipk
Binary files differ
diff --git a/arm/packages/iw_5.16-1_aarch64_cortex-a53.ipk b/arm/packages/iw_5.16-1_aarch64_cortex-a53.ipk
new file mode 100644
index 0000000..a8737e7
--- /dev/null
+++ b/arm/packages/iw_5.16-1_aarch64_cortex-a53.ipk
Binary files differ
diff --git a/arm/packages/iwinfo_2022-08-19-0dad3e66-1_aarch64_cortex-a53.ipk b/arm/packages/iwinfo_2022-08-19-0dad3e66-1_aarch64_cortex-a53.ipk
new file mode 100644
index 0000000..c133b89
--- /dev/null
+++ b/arm/packages/iwinfo_2022-08-19-0dad3e66-1_aarch64_cortex-a53.ipk
Binary files differ
diff --git a/arm/packages/libubus20220601_2022-06-01-2bebf93c-1_aarch64_cortex-a53.ipk b/arm/packages/libubus20220601_2022-06-01-2bebf93c-1_aarch64_cortex-a53.ipk
new file mode 100644
index 0000000..ea0fee0
--- /dev/null
+++ b/arm/packages/libubus20220601_2022-06-01-2bebf93c-1_aarch64_cortex-a53.ipk
Binary files differ
diff --git a/arm/packages/wireless-regdb_2022.08.12-1_all.ipk b/arm/packages/wireless-regdb_2022.08.12-1_all.ipk
new file mode 100644
index 0000000..2fb08c3
--- /dev/null
+++ b/arm/packages/wireless-regdb_2022.08.12-1_all.ipk
Binary files differ
diff --git a/arm/uci-defaults/0_default_config b/arm/uci-defaults/0_default_config
new file mode 100644
index 0000000..093006f
--- /dev/null
+++ b/arm/uci-defaults/0_default_config
@@ -0,0 +1,4 @@
+#!/bin/sh
+opkg install /ipks/*
+ip link set eth0 mtu 1460
+reboot
diff --git a/x86/Android.bp b/x86/Android.bp
index a0f2ed3..ea8ed25 100644
--- a/x86/Android.bp
+++ b/x86/Android.bp
@@ -10,7 +10,7 @@
 }
 
 genrule {
-    name: "openwrt_customization",
+    name: "openwrt_customization_x86_64",
     tools: [
         "make_f2fs",
         "sload_f2fs",
@@ -38,7 +38,7 @@
 }
 
 genrule {
-    name: "openwrt_rootfs_base_img",
+    name: "openwrt_rootfs_base_img_x86_64",
     srcs: [
         "images/openwrt-22.03.2-x86-64-generic-squashfs-rootfs.img.gz",
     ],
@@ -47,27 +47,27 @@
 }
 
 genrule {
-    name: "combined_openwrt_rootfs",
+    name: "combined_openwrt_rootfs_x86_64",
     tools: [
         "append_squashfs_overlay",
     ],
     srcs: [
-        ":openwrt_rootfs_base_img",
-        ":openwrt_customization",
+        ":openwrt_rootfs_base_img_x86_64",
+        ":openwrt_customization_x86_64",
     ],
     out: ["openwrt_rootfs.img"],
     cmd: "$(location append_squashfs_overlay) $(in) $(out) -w",
 }
 
 prebuilt_etc_host {
-    name: "openwrt_rootfs",
-    src: ":combined_openwrt_rootfs",
+    name: "openwrt_rootfs_x86_64",
+    src: ":combined_openwrt_rootfs_x86_64",
     sub_dir: "openwrt/images",
     visibility: ["//device/google/cuttlefish/build"],
 }
 
 prebuilt_etc_host {
-    name: "kernel_for_openwrt",
+    name: "openwrt_kernel_x86_64",
     src: "images/openwrt-22.03.2-x86-64-generic-kernel.bin",
     sub_dir: "openwrt/images",
     visibility: ["//device/google/cuttlefish/build"],