mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-05-04 14:36:55 +00:00
doc: update GSG to use debuild to build ACRN packages
Signed-off-by: szhen11 <shuang.zheng@intel.com>
This commit is contained in:
parent
f8ec83e628
commit
f8ec216df7
@ -122,7 +122,10 @@ To set up the ACRN build environment on the development computer:
|
|||||||
python3 python3-pip libblkid-dev e2fslibs-dev \
|
python3 python3-pip libblkid-dev e2fslibs-dev \
|
||||||
pkg-config libnuma-dev libcjson-dev liblz4-tool flex bison \
|
pkg-config libnuma-dev libcjson-dev liblz4-tool flex bison \
|
||||||
xsltproc clang-format bc libpixman-1-dev libsdl2-dev libegl-dev \
|
xsltproc clang-format bc libpixman-1-dev libsdl2-dev libegl-dev \
|
||||||
libgles-dev libdrm-dev gnu-efi libelf-dev
|
libgles-dev libdrm-dev gnu-efi libelf-dev \
|
||||||
|
build-essential git-buildpackage devscripts dpkg-dev equivs lintian \
|
||||||
|
apt-utils pristine-tar dh-python python3-lxml python3-defusedxml \
|
||||||
|
python3-tqdm python3-xmlschema python3-elementpath acpica-tools
|
||||||
|
|
||||||
#. Get the ACRN hypervisor and ACRN kernel source code, and check out the
|
#. Get the ACRN hypervisor and ACRN kernel source code, and check out the
|
||||||
current release branch.
|
current release branch.
|
||||||
@ -132,31 +135,20 @@ To set up the ACRN build environment on the development computer:
|
|||||||
cd ~/acrn-work
|
cd ~/acrn-work
|
||||||
git clone https://github.com/projectacrn/acrn-hypervisor.git
|
git clone https://github.com/projectacrn/acrn-hypervisor.git
|
||||||
cd acrn-hypervisor
|
cd acrn-hypervisor
|
||||||
git checkout v3.1
|
git checkout master
|
||||||
|
|
||||||
cd ..
|
cd ..
|
||||||
git clone https://github.com/projectacrn/acrn-kernel.git
|
git clone https://github.com/projectacrn/acrn-kernel.git
|
||||||
cd acrn-kernel
|
cd acrn-kernel
|
||||||
git checkout acrn-v3.1
|
git checkout master
|
||||||
|
|
||||||
#. Install Python package dependencies:
|
|
||||||
|
|
||||||
.. code-block:: bash
|
#. Configure git with your name and email address:
|
||||||
|
|
||||||
cd ~/acrn-work/acrn-hypervisor
|
.. code-block:: none
|
||||||
sudo python3 -m pip install -r misc/config_tools/requirements.txt
|
|
||||||
|
|
||||||
#. Build and install the iASL compiler/disassembler used for advanced power management,
|
git config --global user.name "David Developer"
|
||||||
device discovery, and configuration (ACPI) within the host OS:
|
git config --global user.email "david.developer@company.com"
|
||||||
|
|
||||||
.. code-block:: bash
|
|
||||||
|
|
||||||
cd ~/acrn-work
|
|
||||||
wget https://acpica.org/sites/acpica/files/acpica-unix-20210105.tar.gz
|
|
||||||
tar zxvf acpica-unix-20210105.tar.gz
|
|
||||||
cd acpica-unix-20210105
|
|
||||||
make clean && make iasl
|
|
||||||
sudo cp ./generate/unix/bin/iasl /usr/sbin
|
|
||||||
|
|
||||||
.. _gsg-board-setup:
|
.. _gsg-board-setup:
|
||||||
|
|
||||||
@ -300,10 +292,10 @@ Generate a Board Configuration File
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
make clean && make board_inspector
|
debian/debian_build.sh clean && debian/debian_build.sh board_inspector
|
||||||
|
|
||||||
In a few seconds, the build generates a board_inspector Debian package in the ``./build``
|
In a few seconds, the build generates a board_inspector Debian package in the
|
||||||
directory.
|
parent (``~/acrn-work``) directory.
|
||||||
|
|
||||||
#. Copy the Board Inspector Debian package from the development computer to the
|
#. Copy the Board Inspector Debian package from the development computer to the
|
||||||
target system.
|
target system.
|
||||||
@ -313,7 +305,7 @@ Generate a Board Configuration File
|
|||||||
computer to the ``~/acrn-work`` working directory we created on the target
|
computer to the ``~/acrn-work`` working directory we created on the target
|
||||||
system. Replace ``10.0.0.200`` with the target system's IP address you found earlier::
|
system. Replace ``10.0.0.200`` with the target system's IP address you found earlier::
|
||||||
|
|
||||||
scp ~/acrn-work/acrn-hypervisor/build/acrn-board-inspector*.deb acrn@10.0.0.200:~/acrn-work
|
scp ~/acrn-work/python3-acrn-board-inspector*.deb acrn@10.0.0.200:~/acrn-work
|
||||||
|
|
||||||
Option 2: Use a USB disk
|
Option 2: Use a USB disk
|
||||||
a. On the development computer, insert the USB disk that you intend to use to
|
a. On the development computer, insert the USB disk that you intend to use to
|
||||||
@ -334,7 +326,7 @@ Generate a Board Configuration File
|
|||||||
|
|
||||||
cd ~/acrn-work/
|
cd ~/acrn-work/
|
||||||
disk="/media/$USER/"$(ls /media/$USER)
|
disk="/media/$USER/"$(ls /media/$USER)
|
||||||
cp -r acrn-hypervisor/build/acrn-board-inspector*.deb "$disk"/
|
cp -r python3-acrn-board-inspector*.deb "$disk"/
|
||||||
sync && sudo umount "$disk"
|
sync && sudo umount "$disk"
|
||||||
|
|
||||||
#. Remove the USB disk from the development computer and insert it into the target system.
|
#. Remove the USB disk from the development computer and insert it into the target system.
|
||||||
@ -345,14 +337,14 @@ Generate a Board Configuration File
|
|||||||
|
|
||||||
mkdir -p ~/acrn-work
|
mkdir -p ~/acrn-work
|
||||||
disk="/media/$USER/"$(ls /media/$USER)
|
disk="/media/$USER/"$(ls /media/$USER)
|
||||||
cp -r "$disk"/acrn-board-inspector*.deb ~/acrn-work
|
cp -r "$disk"/python3-acrn-board-inspector*.deb ~/acrn-work
|
||||||
|
|
||||||
#. Now that we've got the Board Inspector Debian package on the target system, install it there:
|
#. Now that we've got the Board Inspector Debian package on the target system, install it there:
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
cd ~/acrn-work
|
cd ~/acrn-work
|
||||||
sudo apt install -y ./acrn-board-inspector*.deb
|
sudo apt install -y ./python3-acrn-board-inspector*.deb
|
||||||
|
|
||||||
#. Reboot the target system:
|
#. Reboot the target system:
|
||||||
|
|
||||||
@ -368,7 +360,7 @@ Generate a Board Configuration File
|
|||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
cd ~/acrn-work
|
cd ~/acrn-work
|
||||||
sudo board_inspector.py my_board
|
sudo board_inspector my_board
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
|
|
||||||
@ -600,20 +592,27 @@ Build ACRN
|
|||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
cd ~/acrn-work/acrn-hypervisor
|
cd ~/acrn-work/acrn-hypervisor
|
||||||
make clean && make BOARD=~/acrn-work/MyConfiguration/my_board.board.xml SCENARIO=~/acrn-work/MyConfiguration/scenario.xml
|
debian/debian_build.sh clean && debian/debian_build.sh -c ~/acrn-work/MyConfiguration -b my_board.board -s scenario
|
||||||
|
|
||||||
The build typically takes a few minutes. When done, the build generates a
|
The build typically takes a few minutes. When done, the build generates several
|
||||||
Debian package in the ``./build`` directory:
|
Debian packages in the parent (``~/acrn-work``) directory:
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
cd ./build
|
cd ../
|
||||||
ls *.deb
|
ls *.deb
|
||||||
acrn-my_board-MyConfiguration-3.1.deb
|
acrnd_*.deb
|
||||||
|
acrn-dev_*.deb
|
||||||
|
acrn-devicemodel_*.deb
|
||||||
|
acrn-doc_*.deb
|
||||||
|
acrn-hypervisor_*.deb
|
||||||
|
acrn-lifemngr_*.deb
|
||||||
|
acrn-system_*.deb
|
||||||
|
acrn-tools_*.deb
|
||||||
|
grub-acrn_*.deb
|
||||||
|
|
||||||
The Debian package contains the ACRN hypervisor and tools to ease installing
|
The Debian packages contain the ACRN hypervisor and tools to ease installing
|
||||||
ACRN on the target. The Debian file name contains the board name (``my_board``)
|
ACRN on the target.
|
||||||
and the working folder name (``MyConfiguration``).
|
|
||||||
|
|
||||||
#. Build the ACRN kernel for the Service VM:
|
#. Build the ACRN kernel for the Service VM:
|
||||||
|
|
||||||
@ -657,10 +656,11 @@ Build ACRN
|
|||||||
the target system.
|
the target system.
|
||||||
Replace ``10.0.0.200`` with the target system's IP address you found earlier::
|
Replace ``10.0.0.200`` with the target system's IP address you found earlier::
|
||||||
|
|
||||||
scp ~/acrn-work/acrn-hypervisor/build/acrn-my_board-MyConfiguration*.deb \
|
sudo scp ~/acrn-work/acrn*.deb \
|
||||||
|
~/acrn-work/grub*.deb \
|
||||||
~/acrn-work/*acrn-service-vm*.deb \
|
~/acrn-work/*acrn-service-vm*.deb \
|
||||||
~/acrn-work/MyConfiguration/launch_user_vm_id1.sh \
|
~/acrn-work/MyConfiguration/launch_user_vm_id1.sh \
|
||||||
~/acrn-work/acpica-unix-20210105/generate/unix/bin/iasl \
|
/usr/bin/iasl \
|
||||||
acrn@10.0.0.200:~/acrn-work
|
acrn@10.0.0.200:~/acrn-work
|
||||||
|
|
||||||
Then, go to the target system and put the ``iasl`` tool in its proper
|
Then, go to the target system and put the ``iasl`` tool in its proper
|
||||||
@ -677,10 +677,11 @@ Build ACRN
|
|||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
disk="/media/$USER/"$(ls /media/$USER)
|
disk="/media/$USER/"$(ls /media/$USER)
|
||||||
cp ~/acrn-work/acrn-hypervisor/build/acrn-my_board-MyConfiguration*.deb "$disk"/
|
cp ~/acrn-work/acrn*.deb "$disk"/
|
||||||
|
cp ~/acrn-work/grub*.deb "$disk"/
|
||||||
cp ~/acrn-work/*acrn-service-vm*.deb "$disk"/
|
cp ~/acrn-work/*acrn-service-vm*.deb "$disk"/
|
||||||
cp ~/acrn-work/MyConfiguration/launch_user_vm_id1.sh "$disk"/
|
cp ~/acrn-work/MyConfiguration/launch_user_vm_id1.sh "$disk"/
|
||||||
cp ~/acrn-work/acpica-unix-20210105/generate/unix/bin/iasl "$disk"/
|
sudo cp /usr/bin/iasl "$disk"/
|
||||||
sync && sudo umount "$disk"
|
sync && sudo umount "$disk"
|
||||||
|
|
||||||
#. Insert the USB disk you just used into the target system and run these
|
#. Insert the USB disk you just used into the target system and run these
|
||||||
@ -689,7 +690,8 @@ Build ACRN
|
|||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
disk="/media/$USER/"$(ls /media/$USER)
|
disk="/media/$USER/"$(ls /media/$USER)
|
||||||
cp "$disk"/acrn-my_board-MyConfiguration*.deb ~/acrn-work
|
cp "$disk"/acrn*.deb ~/acrn-work
|
||||||
|
cp "$disk"/grub*.deb ~/acrn-work
|
||||||
cp "$disk"/*acrn-service-vm*.deb ~/acrn-work
|
cp "$disk"/*acrn-service-vm*.deb ~/acrn-work
|
||||||
cp "$disk"/launch_user_vm_id1.sh ~/acrn-work
|
cp "$disk"/launch_user_vm_id1.sh ~/acrn-work
|
||||||
sudo cp "$disk"/iasl /usr/sbin/
|
sudo cp "$disk"/iasl /usr/sbin/
|
||||||
@ -709,7 +711,7 @@ Install ACRN
|
|||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
cd ~/acrn-work
|
cd ~/acrn-work
|
||||||
sudo apt install ./acrn-my_board-MyConfiguration*.deb
|
sudo apt install ./acrn*.deb ./grub*.deb
|
||||||
sudo apt install ./*acrn-service-vm*.deb
|
sudo apt install ./*acrn-service-vm*.deb
|
||||||
|
|
||||||
#. Reboot the system:
|
#. Reboot the system:
|
||||||
@ -723,14 +725,15 @@ Install ACRN
|
|||||||
will boot with this option automatically in 5 seconds.)
|
will boot with this option automatically in 5 seconds.)
|
||||||
|
|
||||||
.. code-block:: console
|
.. code-block:: console
|
||||||
:emphasize-lines: 6
|
:emphasize-lines: 5
|
||||||
|
|
||||||
GNU GRUB version 2.04
|
GNU GRUB version 2.04
|
||||||
────────────────────────────────────────────────────────────────────────────────
|
────────────────────────────────────────────────────────────────────────────────
|
||||||
Ubuntu
|
Ubuntu
|
||||||
Advanced options for Ubuntu
|
Advanced options for Ubuntu
|
||||||
|
*Ubuntu GNU/Linux, with ACRN hypervisor
|
||||||
|
Advanced options for Ubuntu GNU/Linux (with ACRN hypervisor)
|
||||||
UEFI Firmware Settings
|
UEFI Firmware Settings
|
||||||
*ACRN multiboot2
|
|
||||||
|
|
||||||
.. _gsg-run-acrn:
|
.. _gsg-run-acrn:
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user