Skip to content

Commit 37ce259

Browse files
wenlingzdbkinder
authored andcommitted
modify create-up2-images scripts
1 parent eb7091b commit 37ce259

File tree

2 files changed

+25
-33
lines changed

2 files changed

+25
-33
lines changed

doc/tutorials/create-up2-images.sh

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -46,19 +46,20 @@ create_sos_images() {
4646
return 1
4747
}
4848

49-
SOS_BOOTARGS_DEBUG=${ACRN_HV_CODE_PATH}/devicemodel/samples/up2/sos_bootargs_debug.txt
50-
51-
if [[ ! ${ACRN_SBL} && ! -f ${ACRN_SBL} ]]
52-
then
53-
if [ ${ACRN_HV_CODE_PATH} ]
54-
then
55-
make -C ${ACRN_HV_CODE_PATH} clean || return 1
56-
make -C ${ACRN_HV_CODE_PATH} hypervisor BOARD=up2 FIRMWARE=sbl || return 1
57-
ACRN_SBL=${ACRN_HV_CODE_PATH}/build/hypervisor/acrn.32.out
58-
else
59-
echo "Need to provide acrn.sbl or acrn-hypervisor source code path"
60-
return 1
61-
fi
49+
SOS_BOOTARGS_DEBUG=sos_rootfs/usr/share/acrn/samples/up2/sos_bootargs_debug.txt
50+
51+
if [[ ! ${ACRN_SBL} || ! -f ${ACRN_SBL} ]]
52+
then
53+
ACRN_SBL=sos_rootfs/usr/lib/acrn/acrn.up2.sbl
54+
fi
55+
56+
if [ ${ACRN_HV_CODE_PATH} ]
57+
then
58+
SOS_BOOTARGS_DEBUG=${ACRN_HV_CODE_PATH}/devicemodel/samples/up2/sos_bootargs_debug.txt
59+
60+
make -C ${ACRN_HV_CODE_PATH} clean || return 1
61+
make -C ${ACRN_HV_CODE_PATH} hypervisor BOARD=up2 FIRMWARE=sbl || return 1
62+
ACRN_SBL=${ACRN_HV_CODE_PATH}/build/hypervisor/acrn.32.out
6263
fi
6364

6465
if [ ! -f ${ACRN_SBL} ]
@@ -67,6 +68,8 @@ create_sos_images() {
6768
return 1
6869
fi
6970

71+
echo "ACRN_SBL:"${ACRN_SBL}
72+
7073
if [ -f ${SOS_BOOTARGS_DEBUG} ]
7174
then
7275
echo -n "CMDLINE: "
@@ -151,7 +154,7 @@ LAAG_BUNDLE_APPEND=""
151154
SOS_ROOTFS_SIZE=3584
152155
LAAG_IMAGE_SIZE=10240
153156
LAAG_VDISK_SIZE=5120
154-
MIRRORURL="https://cdn.download.clearlinux.org/releases/"
157+
MIRRORURL="https://cdn.download.clearlinux.org/update/"
155158
SIGN_KEY="https://download.clearlinux.org/secureboot/DefaultIASSigningPrivateKey.pem"
156159
IMAGE=all
157160

@@ -225,10 +228,6 @@ if [[ ${IMAGE} == "sos" || ${IMAGE} == "all" ]]; then
225228
echo "--clearlinux-version: must be provided for SOS images building."
226229
exit 1
227230
fi
228-
if [[ ! ${ACRN_SBL} && ! ${ACRN_HV_CODE_PATH} ]]; then
229-
echo "Should provide --acrn-sbl-path or --acrn-code-path for SOS images building"
230-
exit 1
231-
fi
232231
fi
233232

234233
# check valid LaaG image and vdisk sizes

doc/tutorials/using_sbl_on_up2.rst

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,11 @@ Build ACRN for UP2
7676
In Clear Linux, build out the SOS and LaaG image with these two files:
7777

7878
* create-up2-images.sh
79+
80+
.. code-block:: none
81+
82+
$ wget https://raw.githubusercontent.com/projectacrn/acrn-hypervisor/master/doc/tutorials/create-up2-images.sh
83+
7984
* uos.json
8085

8186
An example of the configuration file ``uos.json``:
@@ -99,26 +104,14 @@ An example of the configuration file ``uos.json``:
99104
the "Version" argument, ``"Version": 2****`` instead
100105
of ``"Version": 27230`` for example.
101106

102-
Clone the source code of ``acrn-hypervisor`` for building and use
103-
``v0.5`` release for example:
104-
105-
.. code-block:: none
106-
107-
$ cd ~
108-
$ git clone https://github.com/projectacrn/acrn-hypervisor
109-
$ cd acrn-hypervisor
110-
$ git checkout v0.5
111-
112-
.. note::
113-
You can switch to other version with the command ``git checkout`` if needed.
114107

115108
Build SOS and LaaG image:
116109

117110
.. code-block:: none
118111
119-
$ sudo -s
120-
# ./acrn-hypervisor/devicemodel/samples/up2/create-up2-images.sh --images-type all \
121-
--clearlinux-version 27230 --laag-json uos.json --acrn-code-path /path/to/acrn-hypervisor/
112+
$ sudo -s
113+
# chmod +x create-up2-images.sh
114+
# ./create-up2-images.sh --images-type all --clearlinux-version 27230 --laag-json uos.json
122115
123116
.. note::
124117
You must have root privileges to run ``create-up2-images.sh``.

0 commit comments

Comments
 (0)