-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update README to better reflect curren status
- Loading branch information
Showing
1 changed file
with
15 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,23 @@ | ||
# Tiny Clear ELF | ||
The goal of this project is to create the smallest possible ELF executable that clears the screen, for all architectures that are officially supported by Debian GNU/Linux Bullseye. | ||
``` | ||
___________________________________________ | ||
/ _|_o._ _ _ __ \ | ||
| |_|| |\/__| |___ __ _ _ _ ___| |/ _| | | ||
| /\ // _| / -_) _` | '_|/ -_) | _| | | ||
| <(oo)> \__|_\___\__,_|_| \___|_|_| | | ||
\___________________________________________/ | ||
``` | ||
|
||
The goal of this project is to create the smallest possible ELF executable that clears the screen, for all architectures that are officially supported by Debian GNU/Linux Bullseye. I made each of the 8 unique binaries by hand in [hed](/fr0zn/hed), a minimalist vim-inspired hex editor. | ||
|
||
## How it works | ||
|
||
The way they work is simple - they print out the following hexadecimal data to stdout: `1b 5b 48 1b 5b 4a 1b 5b 33 4a`. | ||
|
||
Breaking it down further, what that does is print 3 ANSI escape sequences: | ||
1. `ESC[H` - move the cursor to position 0,0 | ||
2. `ESC[J` - clear the screen | ||
3. `ESC[3J` - clear any scrollback lines | ||
|
||
Note that these utilities are hand-written in a hex editor, so source code distribution is not really an applicable concept. As such, I am not releasing them under a formal license. If you want to use them, you can do so however you want. I'd appreciate it if you'd let me know, but that's not a requirement, just something I'm curious about. | ||
|
||
I can't test all of these on real hardware, so I plan on using QEMU to test them. I also should note that am writing this README having never worked with pure assembly of any kind in any capacity, so I might be biting off more than I can chew with this project. For now, this repo is a statement of intent rather than a finished project. | ||
|
||
## Why do this? | ||
|
||
* It's (my idea of) fun | ||
* It will help me understand: | ||
* the structure of ELF files | ||
* the basics of several instruction set architectures | ||
* the Linux Kernels `binfmt_misc` capability | ||
* It's likely to be at least a major part of my capstone project at college | ||
1. `␛[H` - move the cursor to position 0,0 | ||
2. `␛[J` - clear the screen | ||
3. `␛[3J` - clear the scrollback buffer | ||
|
||
### TODO: | ||
Note that these utilities are hand-written in a hex editor, so source code distribution is not really an applicable concept. As such, I am not releasing them under a formal license. If you want to use them, you can do so however you want. I'd appreciate it if you'd let me know, but that's not a requirement, just something I'd appreciate. | ||
|
||
* [x] Create the ELF files | ||
* [x] x86 family | ||
* [x] amd64 | ||
* [x] i386 | ||
* [x] ARM family | ||
* [x] armhf | ||
* [x] armel | ||
* [x] aarch64 | ||
* [x] MIPS family | ||
* [x] mipsel | ||
* [x] mips64el | ||
* [x] PowerPC Family | ||
* [x] ppc64el | ||
* [x] IBM Z Family | ||
* [x] s390x | ||
* [ ] Create a logo - an image of a transparent pointy-eared humanoid that takes up only about 1/16th of the image | ||
All of these have been verified to work when run with QEMU. Additionally, I've run most of them (namely amd64, i386, armhf/armel, arm64, and mipsel) on physical hardware successfully. |