mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-23 17:58:30 +00:00
modify create-up2-images scripts
This commit is contained in:
@@ -46,19 +46,20 @@ create_sos_images() {
|
|||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
SOS_BOOTARGS_DEBUG=${ACRN_HV_CODE_PATH}/devicemodel/samples/up2/sos_bootargs_debug.txt
|
SOS_BOOTARGS_DEBUG=sos_rootfs/usr/share/acrn/samples/up2/sos_bootargs_debug.txt
|
||||||
|
|
||||||
if [[ ! ${ACRN_SBL} && ! -f ${ACRN_SBL} ]]
|
if [[ ! ${ACRN_SBL} || ! -f ${ACRN_SBL} ]]
|
||||||
then
|
then
|
||||||
if [ ${ACRN_HV_CODE_PATH} ]
|
ACRN_SBL=sos_rootfs/usr/lib/acrn/acrn.up2.sbl
|
||||||
then
|
fi
|
||||||
make -C ${ACRN_HV_CODE_PATH} clean || return 1
|
|
||||||
make -C ${ACRN_HV_CODE_PATH} hypervisor BOARD=up2 FIRMWARE=sbl || return 1
|
if [ ${ACRN_HV_CODE_PATH} ]
|
||||||
ACRN_SBL=${ACRN_HV_CODE_PATH}/build/hypervisor/acrn.32.out
|
then
|
||||||
else
|
SOS_BOOTARGS_DEBUG=${ACRN_HV_CODE_PATH}/devicemodel/samples/up2/sos_bootargs_debug.txt
|
||||||
echo "Need to provide acrn.sbl or acrn-hypervisor source code path"
|
|
||||||
return 1
|
make -C ${ACRN_HV_CODE_PATH} clean || return 1
|
||||||
fi
|
make -C ${ACRN_HV_CODE_PATH} hypervisor BOARD=up2 FIRMWARE=sbl || return 1
|
||||||
|
ACRN_SBL=${ACRN_HV_CODE_PATH}/build/hypervisor/acrn.32.out
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -f ${ACRN_SBL} ]
|
if [ ! -f ${ACRN_SBL} ]
|
||||||
@@ -67,6 +68,8 @@ create_sos_images() {
|
|||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
echo "ACRN_SBL:"${ACRN_SBL}
|
||||||
|
|
||||||
if [ -f ${SOS_BOOTARGS_DEBUG} ]
|
if [ -f ${SOS_BOOTARGS_DEBUG} ]
|
||||||
then
|
then
|
||||||
echo -n "CMDLINE: "
|
echo -n "CMDLINE: "
|
||||||
@@ -151,7 +154,7 @@ LAAG_BUNDLE_APPEND=""
|
|||||||
SOS_ROOTFS_SIZE=3584
|
SOS_ROOTFS_SIZE=3584
|
||||||
LAAG_IMAGE_SIZE=10240
|
LAAG_IMAGE_SIZE=10240
|
||||||
LAAG_VDISK_SIZE=5120
|
LAAG_VDISK_SIZE=5120
|
||||||
MIRRORURL="https://cdn.download.clearlinux.org/releases/"
|
MIRRORURL="https://cdn.download.clearlinux.org/update/"
|
||||||
SIGN_KEY="https://download.clearlinux.org/secureboot/DefaultIASSigningPrivateKey.pem"
|
SIGN_KEY="https://download.clearlinux.org/secureboot/DefaultIASSigningPrivateKey.pem"
|
||||||
IMAGE=all
|
IMAGE=all
|
||||||
|
|
||||||
@@ -225,10 +228,6 @@ if [[ ${IMAGE} == "sos" || ${IMAGE} == "all" ]]; then
|
|||||||
echo "--clearlinux-version: must be provided for SOS images building."
|
echo "--clearlinux-version: must be provided for SOS images building."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
if [[ ! ${ACRN_SBL} && ! ${ACRN_HV_CODE_PATH} ]]; then
|
|
||||||
echo "Should provide --acrn-sbl-path or --acrn-code-path for SOS images building"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# check valid LaaG image and vdisk sizes
|
# check valid LaaG image and vdisk sizes
|
||||||
|
@@ -76,6 +76,11 @@ Build ACRN for UP2
|
|||||||
In Clear Linux, build out the SOS and LaaG image with these two files:
|
In Clear Linux, build out the SOS and LaaG image with these two files:
|
||||||
|
|
||||||
* create-up2-images.sh
|
* create-up2-images.sh
|
||||||
|
|
||||||
|
.. code-block:: none
|
||||||
|
|
||||||
|
$ wget https://raw.githubusercontent.com/projectacrn/acrn-hypervisor/master/doc/tutorials/create-up2-images.sh
|
||||||
|
|
||||||
* uos.json
|
* uos.json
|
||||||
|
|
||||||
An example of the configuration file ``uos.json``:
|
An example of the configuration file ``uos.json``:
|
||||||
@@ -99,26 +104,14 @@ An example of the configuration file ``uos.json``:
|
|||||||
the "Version" argument, ``"Version": 2****`` instead
|
the "Version" argument, ``"Version": 2****`` instead
|
||||||
of ``"Version": 27230`` for example.
|
of ``"Version": 27230`` for example.
|
||||||
|
|
||||||
Clone the source code of ``acrn-hypervisor`` for building and use
|
|
||||||
``v0.5`` release for example:
|
|
||||||
|
|
||||||
.. code-block:: none
|
|
||||||
|
|
||||||
$ cd ~
|
|
||||||
$ git clone https://github.com/projectacrn/acrn-hypervisor
|
|
||||||
$ cd acrn-hypervisor
|
|
||||||
$ git checkout v0.5
|
|
||||||
|
|
||||||
.. note::
|
|
||||||
You can switch to other version with the command ``git checkout`` if needed.
|
|
||||||
|
|
||||||
Build SOS and LaaG image:
|
Build SOS and LaaG image:
|
||||||
|
|
||||||
.. code-block:: none
|
.. code-block:: none
|
||||||
|
|
||||||
$ sudo -s
|
$ sudo -s
|
||||||
# ./acrn-hypervisor/devicemodel/samples/up2/create-up2-images.sh --images-type all \
|
# chmod +x create-up2-images.sh
|
||||||
--clearlinux-version 27230 --laag-json uos.json --acrn-code-path /path/to/acrn-hypervisor/
|
# ./create-up2-images.sh --images-type all --clearlinux-version 27230 --laag-json uos.json
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
You must have root privileges to run ``create-up2-images.sh``.
|
You must have root privileges to run ``create-up2-images.sh``.
|
||||||
|
Reference in New Issue
Block a user