blob: bcaa396770e65797d8bdc660baf2d58f7d62b790 [file] [log] [blame]
# Copyright 2023 The ChromiumOS Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# This script preforms the necessary commands to build the current standard
# image for openwrt deployment with Ubiquiti UniFi 6 LR v3 test APs.
# OpenWrt device page:
# OpenWrt Wiki page:
# Target downloads page:
set -e
SCRIPT_DIR="$(dirname "$(realpath -e "${BASH_SOURCE[0]}")")"
# Initialize build dir.
echo "Building standard OpenWrt image for profile ${BUILD_PROFILE} in ${BUILD_DIR}"
mkdir -p "${BUILD_DIR}"
# Building cros_openwrt_image_builder.
echo "Compiling cros_openwrt_image_builder"
bash "${SCRIPT_DIR}/../image_builder/"
# Build packages once without customizations to initialize sdk.
echo "Building initial packages with standard sdk"
cros_openwrt_image_builder build packages \
--working_dir "${IMAGE_BUILDER_WORKING_DIR}" \
--sdk_url "${SDK_DOWNLOAD_URL}"
# Build final image.
echo "Building image"
cros_openwrt_image_builder build image \
--working_dir "${IMAGE_BUILDER_WORKING_DIR}" \
--image_builder_url "${IMAGE_BUILDER_DOWNLOAD_URL}" \
--image_profile "${BUILD_PROFILE}" \
--image_feature WIFI_ROUTER_FEATURE_IEEE_802_11_A \
--image_feature WIFI_ROUTER_FEATURE_IEEE_802_11_B \
--image_feature WIFI_ROUTER_FEATURE_IEEE_802_11_G \
--image_feature WIFI_ROUTER_FEATURE_IEEE_802_11_N \
--image_feature WIFI_ROUTER_FEATURE_IEEE_802_11_AC \
--image_feature WIFI_ROUTER_FEATURE_IEEE_802_11_AX