Skip to content

Commit b763ae9

Browse files
authored
add video to readme
1 parent 58edaf3 commit b763ae9

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

README.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ This is Linux running inside a PDF file via a RISC-V emulator, which is based on
44

55
Try it here: [linux.pdf](https://linux.doompdf.dev/linux.pdf)
66

7+
https://github.com/user-attachments/assets/b0bf106b-6de3-4534-956b-6bd1242154b6
8+
79
## Explanation
810

911
This works in a very similar way to my previous [DoomPDF](https://github.com/ading2210/doompdf) project.
@@ -16,15 +18,18 @@ C code can be compiled to run within a PDF using an old version of Emscripten th
1618

1719
The largest problem here is with the emulator's performance. For example, the Linux kernel takes about 30-60 seconds to boot up within the PDF, which over 100x slower than normal. Unfortunately, there's no way to fix this, since the version of V8 that Chrome's PDF engine uses has its [JIT compiler disabled](https://source.chromium.org/chromium/_/pdfium/pdfium/+/012fe571c9fe430da68dbcd2f5ba21758db0ae15:fpdfsdk/fpdf_view.cpp;l=1211-1214;drc=b69783fd189976dd4625c7dcd9c07921b94d4a3c;bpv=0;bpt=0), destroying its performance.
1820

21+
For the root filesystem, there are both 64 and 32 bit versions possible. The default is a 32 bit buildroot system (which was prebuilt and taken from the original TinyEMU examples), and also a 64 bit Alpine Linux system. The 64 bit emulator is about as twice slow however, so it's normally not used.
22+
1923
## Build Instructions
2024

2125
Clone this repository and run the following commands:
2226
```
2327
python3 -m venv .venv
2428
source .venv/bin/activate
2529
pip3 install -r requirements.txt
26-
env ./build.sh
30+
./build.sh
2731
```
32+
If you want to build the 64 bit rather than 32 bit version, edit `build.sh` and change the `BITS="32"` line.
2833

2934
The `build.sh` script will download Emscripten `1.39.20` automatically. You must be on Linux to build this.
3035

@@ -56,4 +61,4 @@ GNU General Public License for more details.
5661
5762
You should have received a copy of the GNU General Public License
5863
along with this program. If not, see <https://www.gnu.org/licenses/>.
59-
```
64+
```

0 commit comments

Comments
 (0)