| #!/bin/bash |
| |
| # Copyright 2021 Google LLC |
| # |
| # Licensed under the Apache License, Version 2.0 (the "License"); |
| # you may not use this file except in compliance with the License. |
| # You may obtain a copy of the License at |
| # |
| # https://www.apache.org/licenses/LICENSE-2.0 |
| # |
| # Unless required by applicable law or agreed to in writing, software |
| # distributed under the License is distributed on an "AS IS" BASIS, |
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| # See the License for the specific language governing permissions and |
| # limitations under the License. |
| |
| # We want to preserve what COS is doing, so preserve their function by renaming it. |
| eval "$(echo "cos_board_finalize_base_image()"; declare -f board_finalize_base_image | tail -n +2)" |
| |
| # Export kernel config file as a BUILD artifact. |
| export_kernel_config(){ |
| # Copy RT kernel config. |
| cp "${root_fs_dir}"/boot/config-*rt* "${BUILD_DIR}/kernel_config_rt" |
| # Copy Vanilla kernel config by filtering out the RT kernel config. |
| cp "$(ls "${root_fs_dir}"/boot/config-* | grep -v rt)" "${BUILD_DIR}/kernel_config_rt" |
| } |
| |
| board_finalize_base_image() { |
| cos_board_finalize_base_image |
| move_for_artifact "opt/google/src/kernel-rt-src.tar.gz" \ |
| "kernel-rt-src.tar.gz" |
| move_for_artifact "opt/google/src/kernel-rt-headers.tgz" \ |
| "kernel-rt-headers.tgz" |
| } |