summaryrefslogtreecommitdiff
path: root/README
blob: e57fb8fd2d0d2b28d44ec40415f0a3ca165ca2aa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
abase - Aba's tools
===================

abase is a collection of tools that didn't fit into ubase or sbase.

Currently it contains the following:
- a very simple 'more' pager
- a simple 'hexdump'
- a 'fdisk' (but we have to decide for which kind of partition types
  and what kind of operations, could be too big)
- a 'ifconfig': show and configure simple interfaces
- a 'ping': test a network connection
- a 'netstat': see list of active connections of a machine
- a 'mkswap': swapon/swapoff/swaplabel exist, so we should also be able
  to create a swap
- 'fsck.ext4', 'mkfs.ext4': if ext4 is the only file system we support
- 'nbd-client': for NBD root mounts
  play with hardware. dependencies can also be done from the text
  modules.dep file and a samurai or simplistic make, 'modprobe' as
  shell wrapper on dependencies and insmod calls
- 'stty' maybe for setting line serial parameters
- 'top': a really simple one

Note: abase is a shameless copy of sbase/ubase in certain areas like
the Makefile, libutil, etc. This might also make an integration into
sbase/ubase easier.

Building
--------

To build abase, simply type make. You may have to fiddle with config.mk
depending on your system.

You can also build abase-box, which generates a single binary containing
all the required tools. You can then symlink the individual tools to
abase-box or run: make abase-box-install

Ideally you will want to statically link abase. If you are on Linux we
recommend using musl-libc[1].

Portability
-----------

Not really tested so far, but you should be able to build it with
gcc, clang, tcc, nwcc and pcc.

Bugs and Questions
------------------

- more
  - even non-line keyboard input is not portable
  - how to enable terminal formatting like bold and make things not
    depend on ncurses/termcap?
- ifconfig
  - implementations
    - GNU net-tools
    - net-3-tools
    - nosh
  - netlink api or ioctls

References
----------

- ping:
  - https://www.geeksforgeeks.org/ping-in-c/
  - Stevens Network Programming, Vol. 1
      
[1] http://www.musl-libc.org/