Skip to content

Commit 20bc64c

Browse files
committed
docs: create virtualenv
Newer Ubuntu does not allow global package installs, it is so annoying!
1 parent 9724633 commit 20bc64c

File tree

3 files changed

+24
-36
lines changed

3 files changed

+24
-36
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ gitignore.*
2121
# Python trash.
2222
*.pyc
2323
__pycache__
24+
.venv
2425

2526
# Accidents.
2627
/core

README.adoc

Lines changed: 22 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ toc::[]
3737
The most important functionality of this repository is the `--china` option, sample usage:
3838

3939
....
40+
python3 -m venv .venv
41+
. .venv/bin/activate
4042
./setup
4143
./run --china > index.html
4244
firefox index.html
@@ -121,6 +123,8 @@ Reserve 12Gb of disk and run:
121123
....
122124
git clone https://github.com/cirosantilli/linux-kernel-module-cheat
123125
cd linux-kernel-module-cheat
126+
python3 -m venv .venv
127+
. .venv/bin/activate
124128
./setup
125129
./build --download-dependencies qemu-buildroot
126130
./run
@@ -177,6 +181,8 @@ All available modules can be found in the link:kernel_modules[] directory.
177181
It is super easy to build for different <<cpu-architecture,CPU architectures>>, just use the `--arch` option:
178182

179183
....
184+
python3 -m venv .venv
185+
. .venv/bin/activate
180186
./setup
181187
./build --arch aarch64 --download-dependencies qemu-buildroot
182188
./run --arch aarch64
@@ -660,6 +666,8 @@ For the most part, if you just add the `--emulator gem5` option or `*-gem5` suff
660666
If you haven't built Buildroot yet for <<qemu-buildroot-setup>>, you can build from the beginning with:
661667

662668
....
669+
python3 -m venv .venv
670+
. .venv/bin/activate
663671
./setup
664672
./build --download-dependencies gem5-buildroot
665673
./run --emulator gem5
@@ -726,6 +734,8 @@ For example, to do a <<qemu-buildroot-setup>> inside Docker, run:
726734

727735
....
728736
sudo apt-get install docker
737+
python3 -m venv .venv
738+
. .venv/bin/activate
729739
./setup
730740
./run-docker create && \
731741
./run-docker sh -- ./build --download-dependencies qemu-buildroot
@@ -877,6 +887,8 @@ Or to run a baremetal example instead:
877887
Be saner and use our custom built QEMU instead:
878888

879889
....
890+
python3 -m venv .venv
891+
. .venv/bin/activate
880892
./setup
881893
./build --download-dependencies qemu
882894
./run
@@ -1134,6 +1146,8 @@ You can install those libraries with:
11341146

11351147
....
11361148
cd linux-kernel-module-cheat
1149+
python3 -m venv .venv
1150+
. .venv/bin/activate
11371151
./setup
11381152
./build --download-dependencies userland-host
11391153
....
@@ -1313,6 +1327,8 @@ Every `.c` file inside link:baremetal/[] and `.S` file inside `baremetal/arch/<a
13131327
For example, to run link:baremetal/arch/aarch64/dump_regs.c[] in QEMU do:
13141328

13151329
....
1330+
python3 -m venv .venv
1331+
. .venv/bin/activate
13161332
./setup
13171333
./build --arch aarch64 --download-dependencies qemu-baremetal
13181334
./run --arch aarch64 --baremetal baremetal/arch/aarch64/dump_regs.c
@@ -1397,6 +1413,8 @@ You can run all the baremetal examples in one go and check that all assertions p
13971413
To use gem5 instead of QEMU do:
13981414

13991415
....
1416+
python3 -m venv .venv
1417+
. .venv/bin/activate
14001418
./setup
14011419
./build --download-dependencies gem5-baremetal
14021420
./run --arch aarch64 --baremetal userland/c/hello.c --emulator gem5
@@ -1475,6 +1493,8 @@ For development, you will want to do a more controlled build with extra error ch
14751493
For the initial build do:
14761494

14771495
....
1496+
python3 -m venv .venv
1497+
. .venv/bin/activate
14781498
./setup
14791499
./build --download-dependencies docs
14801500
....
@@ -3964,6 +3984,8 @@ Then, from inside that image:
39643984
sudo apt-get install git
39653985
git clone https://github.com/cirosantilli/linux-kernel-module-cheat
39663986
cd linux-kernel-module-cheat
3987+
python3 -m venv .venv
3988+
. .venv/bin/activate
39673989
./setup -y
39683990
....
39693991

@@ -26926,41 +26948,6 @@ https://www.samsung.com/semiconductor/dram/module/M471A2K43BB1-CRC/ (http://web.
2692626948

2692726949
https://www.amazon.co.uk/Samsung-DDR4-16-GB-DDR4-2400-MHz-Memory-Module/dp/B016N24XKQ (http://web.archive.org/web/20181224203214/https://www.amazon.co.uk/Samsung-DDR4-16-GB-DDR4-2400-MHz-Memory-Module/dp/B016N24XKQ[archive]) 355.43 UK Pounds for 2x 16 GiB.
2692826950

26929-
===== Samsung MZVLB512HAJQ-000L7 512GB SSD
26930-
26931-
PCIe TLC OPAL2.
26932-
26933-
https://www.samsung.com/semiconductor/ssd/client-ssd/MZVLB512HAJQ/ (http://web.archive.org/web/20181224225400/https://www.samsung.com/semiconductor/ssd/client-ssd/MZVLB512HAJQ/[archive]).
26934-
26935-
https://www.samsung.com/semiconductor/global.semi/file/resource/2018/05/PM981_M.2_SSD_Datasheet_v1.3_for_General.pdf | http://web.archive.org/web/20181224225410/https://www.samsung.com/semiconductor/global.semi/file/resource/2018/05/PM981_M.2_SSD_Datasheet_v1.3_for_General.pdf
26936-
26937-
`sudo hdparm -Tt /dev/nvme0n1p5` on Ubuntu 20.04:
26938-
26939-
....
26940-
Timing cached reads: 29812 MB in 1.99 seconds = 15007.00 MB/sec
26941-
HDIO_DRIVE_CMD(identify) failed: Inappropriate ioctl for device
26942-
Timing buffered disk reads: 6328 MB in 3.00 seconds = 2109.00 MB/sec
26943-
....
26944-
26945-
Nominal maximum sequential read speed: 3,000 MB/s
26946-
26947-
===== Seagate ST1000LM035-1RK1 1TB hard disk
26948-
26949-
1TB.
26950-
26951-
https://www.disctech.com/Seagate-ST1000LM035-1TB-SATA-Hard-Drive 80 USD | http://web.archive.org/web/20181224201408/https://www.disctech.com/Seagate-ST1000LM035-1TB-SATA-Hard-Drive
26952-
26953-
https://www.seagate.com/www-content/datasheets/pdfs/mobile-hddDS1861-2-1603-en_US.pdf | http://web.archive.org/web/20181225095438/https://www.seagate.com/www-content/datasheets/pdfs/mobile-hddDS1861-2-1603-en_US.pdf
26954-
26955-
`sudo hdparm -Tt /dev/sda3` on Ubuntu 20.04:
26956-
26957-
....
26958-
Timing cached reads: 29594 MB in 1.99 seconds = 14893.89 MB/sec
26959-
Timing buffered disk reads: 386 MB in 3.01 seconds = 128.07 MB/sec
26960-
....
26961-
26962-
Nominal maximum speed: 140MB/s
26963-
2696426951
===== NVIDIA Quadro M1200 4GB GDDR5 GPU
2696526952

2696626953
=== Benchmark Internets

setup

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,4 @@ $sudo apt-get install $y \
2727
python3-pip \
2828
python3-distutils \
2929
;
30-
python3 -m pip install --user -r requirements.txt
30+
python3 -m pip install -r requirements.txt

0 commit comments

Comments
 (0)