1#!/bin/sh -eu 2# 3# Copyright 2020 The Android Open Source Project 4# 5# Licensed under the Apache License, Version 2.0 (the "License"); 6# you may not use this file except in compliance with the License. 7# You may obtain a copy of the License at 8# 9# http://www.apache.org/licenses/LICENSE-2.0 10# 11# Unless required by applicable law or agreed to in writing, software 12# distributed under the License is distributed on an "AS IS" BASIS, 13# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14# See the License for the specific language governing permissions and 15# limitations under the License. 16# 17 18export LD_PRELOAD="$ANDROID_HOST_OUT/lib64/bind_to_localhost.so" 19 20exec "$MODEL_BIN" \ 21 -C bp.secureflashloader.fname="$ANDROID_PRODUCT_OUT/bl1.bin" \ 22 -C bp.flashloader0.fname="$ANDROID_PRODUCT_OUT/fip.bin" \ 23 -C cluster0.cpu0.semihosting-cwd="$ANDROID_PRODUCT_OUT" \ 24 -C bp.virtioblockdevice.image_path="$ANDROID_PRODUCT_OUT/system-qemu.img" \ 25 -C bp.mmc.p_mmc_file="$ANDROID_PRODUCT_OUT/userdata.img" \ 26 -C bp.secure_memory=0 \ 27 -C cache_state_modelled=0 \ 28 -C bp.pl011_uart0.unbuffered_output=1 \ 29 -C bp.pl011_uart0.out_file="$ANDROID_PRODUCT_OUT/uart0.log" \ 30 -C bp.pl011_uart1.out_file="$ANDROID_PRODUCT_OUT/uart1.log" \ 31 -C bp.terminal_0.start_telnet=0 \ 32 -C bp.terminal_1.start_telnet=0 \ 33 -C bp.ve_sysregs.mmbSiteDefault=0 \ 34 -C bp.ve_sysregs.exit_on_shutdown=1 \ 35 -C bp.virtio_net.hostbridge.userNetworking=1 \ 36 -C bp.virtio_net.hostbridge.userNetPorts=5555=5555 \ 37 -C bp.virtio_net.enabled=1 \ 38 -C cluster0.NUM_CORES=1 \ 39 -C cluster0.cpu0.clock_multiplier=20 \ 40 -C cluster0.cpu0.enable_crc32=1 \ 41 -C cluster1.NUM_CORES=0 \ 42 "$@" 43