9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] stripping down the kernel for an small embedded systems?
@ 2012-09-03 18:34 Aharon Robbins
  2012-09-03 19:29 ` Charles Forsyth
       [not found] ` <CAOw7k5jnvYVX3yHOYsbN8OZSpVhgbwcHXozUP=zyLWJU5_T1ag@mail.gmail.c>
  0 siblings, 2 replies; 4+ messages in thread
From: Aharon Robbins @ 2012-09-03 18:34 UTC (permalink / raw)
  To: 9fans

Hi 9fans.

A colleague asked me some questoins about the Plan 9 kernel that I could
not answer.

For a small x86-based embedded system (*deeply* embedded), how small would
the Plan 9 kernel be if one removed the networking stack (TCP/IP, 9P)
and all fiesystem code (except for access to a very few devices)? The
idea is to have primarily memory management and processes.

Any idea how hard this would be or what the steps would be to build
such a kernel given a regular Plan 9 installation?

Much thanks!

Arnold Robbins



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [9fans] stripping down the kernel for an small embedded systems?
  2012-09-03 18:34 [9fans] stripping down the kernel for an small embedded systems? Aharon Robbins
@ 2012-09-03 19:29 ` Charles Forsyth
  2012-09-04  7:46   ` arnold
       [not found] ` <CAOw7k5jnvYVX3yHOYsbN8OZSpVhgbwcHXozUP=zyLWJU5_T1ag@mail.gmail.c>
  1 sibling, 1 reply; 4+ messages in thread
From: Charles Forsyth @ 2012-09-03 19:29 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

[-- Attachment #1: Type: text/plain, Size: 1770 bytes --]

Just modifying a configuration file, and substituting
nocache.c and noswap.c (you won't have them, but they're easy)
to eliminate the devmnt cache and the pager, I can get

8l -o 9pctiny -T0xF0100020 -l l.8 plan9l.8 cga.8 i8253.8 i8259.8 kbd.8
main.8 memory.8 mmu.8 random.8 syscallfmt.8 trap.8 pctiny.root.8
pctiny.rootc.8 uarti8250.8 devmnt.8 mtrr.8 devdup.8 devenv.8 devarch.8
mpacpi.8 devproc.8 devrtc.8 devcons.8 apic.8 devuart.8 mp.8 devroot.8
archmp.8 pci.8 realmode.8 bios32.8 alarm.8 alloc.8 allocb.8 auth.8
nocache.8 chan.8 dev.8 edf.8 fault.8 latin1.8 page.8 parse.8 pgrp.8
portclock.8 print.8 proc.8 qio.8 qlock.8 rdb.8 rebootcmd.8 segment.8
noswap.8 sysfile.8 sysproc.8 taslock.8 tod.8 xalloc.8 pctiny.8
/386/lib/libc.a

size 9pctiny
279329t + 145512d + 359380b = 784221 9pctiny


That leaves in 9P (devmnt) and devproc.c (/proc) because they are a little
harder to eliminate, and no doubt a few other files
that might not strictly be needed. To go much beyond that, you'd need to
copy and change, deleting system calls (sysfauth) and other
code you didn't need (/dev/random in devcons.c).

On 3 September 2012 19:34, Aharon Robbins <arnold@skeeve.com> wrote:

> Hi 9fans.
>
> A colleague asked me some questoins about the Plan 9 kernel that I could
> not answer.
>
> For a small x86-based embedded system (*deeply* embedded), how small would
> the Plan 9 kernel be if one removed the networking stack (TCP/IP, 9P)
> and all fiesystem code (except for access to a very few devices)? The
> idea is to have primarily memory management and processes.
>
> Any idea how hard this would be or what the steps would be to build
> such a kernel given a regular Plan 9 installation?
>
> Much thanks!
>
> Arnold Robbins
>
>

[-- Attachment #2: Type: text/html, Size: 2276 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [9fans] stripping down the kernel for an small embedded systems?
       [not found] ` <CAOw7k5jnvYVX3yHOYsbN8OZSpVhgbwcHXozUP=zyLWJU5_T1ag@mail.gmail.c>
@ 2012-09-03 20:33   ` erik quanstrom
  0 siblings, 0 replies; 4+ messages in thread
From: erik quanstrom @ 2012-09-03 20:33 UTC (permalink / raw)
  To: 9fans

On Mon Sep  3 15:30:31 EDT 2012, charles.forsyth@gmail.com wrote:

> Just modifying a configuration file, and substituting
> nocache.c and noswap.c (you won't have them, but they're easy)
> to eliminate the devmnt cache and the pager, I can get
>
> 8l -o 9pctiny -T0xF0100020 -l l.8 plan9l.8 cga.8 i8253.8 i8259.8 kbd.8
> main.8 memory.8 mmu.8 random.8 syscallfmt.8 trap.8 pctiny.root.8
> pctiny.rootc.8 uarti8250.8 devmnt.8 mtrr.8 devdup.8 devenv.8 devarch.8
> mpacpi.8 devproc.8 devrtc.8 devcons.8 apic.8 devuart.8 mp.8 devroot.8
> archmp.8 pci.8 realmode.8 bios32.8 alarm.8 alloc.8 allocb.8 auth.8
> nocache.8 chan.8 dev.8 edf.8 fault.8 latin1.8 page.8 parse.8 pgrp.8
> portclock.8 print.8 proc.8 qio.8 qlock.8 rdb.8 rebootcmd.8 segment.8
> noswap.8 sysfile.8 sysproc.8 taslock.8 tod.8 xalloc.8 pctiny.8
> /386/lib/libc.a
>
> size 9pctiny
> 279329t + 145512d + 359380b = 784221 9pctiny

i just started a few minutes later, but i might as well post the results.
the deltas seem to be
included:
	devcap.
dropped/reduced
	using a low-calorie version of pci -- no bios32
	mp
	realmode
	rtc
	removed echo reboot kernel>/dev/reboot
	removed old crunch from memory.c

8l  -o 9pccpu -T0xF0100020 -l l.8 plan9l.8 cga.8 i8253.8 i8259.8 kbd.8 main.8 memory.8 mmu.8 random.8 trap.8 pccpu.root.8 pccpu.rootc.8 uarti8250.8 devmnt.8 devdup.8 devenv.8 fpx87.8 devarch.8 devsrv.8 devcap.8 devproc.8 devcons.8 devuart.8 uartp8250.8 devpipe.8 devroot.8 pci.8 alarm.8 alloc.8 allocb.8 auth.8 cache.8 chan.8 dev.8 edf.8 fault.8 latin1.8 page.8 parse.8 pgrp.8 portclock.8 print.8 proc.8 qio.8 qlock.8 segment.8 noswap.8 sysfile.8 sysproc.8 taslock.8 tod.8 xalloc.8 pccpu.8 /386/lib/libc.a /386/lib/libsec.a /386/lib/libmp.a
size 9pccpu
263232t + 120204d + 47716b = 431152	9pccpu
; ls -l 9pccpu*
--rwxr-xr-x M 32 quanstro quanstro 513968 Sep  3 16:17 9pccpu
--rw-r--r-- M 32 quanstro quanstro 220568 Sep  3 16:17 9pccpu.gz

if i remove devcap, i get

258689t + 119888d + 47668b = 426245	9pccpu
; ; ls -l 9pccpu 9pccpu.gz
--rwxr-xr-x M 32 quanstro quanstro 506548 Sep  3 16:27 9pccpu
--rw-r--r-- M 32 quanstro quanstro 218071 Sep  3 16:26 9pccpu.gz

- erik



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [9fans] stripping down the kernel for an small embedded systems?
  2012-09-03 19:29 ` Charles Forsyth
@ 2012-09-04  7:46   ` arnold
  0 siblings, 0 replies; 4+ messages in thread
From: arnold @ 2012-09-04  7:46 UTC (permalink / raw)
  To: 9fans

Thanks Charles and Erik for both your answers.  I have pointed my colleague
to the online archive.

Arnold




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-09-04  7:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-09-03 18:34 [9fans] stripping down the kernel for an small embedded systems? Aharon Robbins
2012-09-03 19:29 ` Charles Forsyth
2012-09-04  7:46   ` arnold
     [not found] ` <CAOw7k5jnvYVX3yHOYsbN8OZSpVhgbwcHXozUP=zyLWJU5_T1ag@mail.gmail.c>
2012-09-03 20:33   ` erik quanstrom

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).