2

I would like to run some user space application, hence I would like to know whether the followings are possible:

  • is it possible to run only the kernel without Debian?
  • if yes, how can I compile and run my application?
3

is it possible to run only the kernel without Debian?

It's possible without debian in particular, but you do need some kind of userland. After the kernel boots, it executes init, which then starts everything else. Init always has pid 1 and cannot be effectively killed.

You could, in theory, write your own init process with, e.g., a statically linked C library, etc. Or you could keep the debian userland and replace /bin/init with something else and see what happens.

It would make much more sense, however, to just customize an existing init system to do only exactly what you want, possibly only starting one other process besides init. On raspbian, this means writing scripts for /etc/init.d, installing them with update-rd.d, etc.

  • Wouldn't it be better for him to use Arch and install packages from the ground up? Basically, Arch would allow him total control over the system. – Mark Tomlin Dec 7 '14 at 10:07
  • @MarkTomlin That's a good idea, actually. If the pi arch uses systemd, it's probably a better thing to learn now than rasbian's SysV init. – goldilocks Dec 7 '14 at 10:28
1

Here is the list of processes which are started by Debian on my Pi (this is Debian I'm running, NOT Raspbian).

I suspect they are pretty much all necessary for your application. They do things like provide a wireless network, read/write files, log events, get the time, accept key board entry, display on the screen etc. etc.

You could stop any you don't need. I think that would be a pointless exercise though, they won't be taking any CPU when dormant (perhaps 99.5% of the time) and use an insignificant amount of memory.

[bioset]
[cfg80211]
[crypto]
[deferwq]
dhclient -v -pf /run/dhclient.wlan0.pid -lf /var/lib/dhcp/dhclient.wlan0.leases wlan0
[DWC Notificatio]
[dwc_otg]
[ext4-rsv-conver]
[fsnotify_mark]
[iscsi_eh]
[jbd2/mmcblk0p2-]
[kauditd]
[kblockd]
[kdevtmpfs]
[khelper]
[khubd]
[khungtaskd]
[ksoftirqd/0]
[kswapd0]
[kthreadd]
[kthrotld]
[kworker/0:0]
[kworker/0:0H]
[kworker/0:1]
[kworker/0:2]
[kworker/u2:0]
[kworker/u2:1]
[kworker/u2:2]
[kworker/u2:3]
/lib/systemd/systemd-journald
/lib/systemd/systemd-logind
/lib/systemd/systemd-udevd
[mmcqd/0]
[netns]
[nfsiod]
[nfsv4.0-svc]
[rcu_bh]
[rcu_preempt]
[rcu_sched]
[rpciod]
/sbin/agetty --noclear tty1 linux
/sbin/init
/sbin/wpa_supplicant -s -B -P /run/wpa_supplicant.wlan0.pid -i wlan0 -D nl80211,wext -C /run/wpa_supplicant
/usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation
/usr/bin/python -O /usr/share/wicd/daemon/monitor.py
/usr/bin/python -O /usr/share/wicd/daemon/wicd-daemon.py
/usr/lib/policykit-1/polkitd --no-debug
/usr/sbin/apache2 -k start
/usr/sbin/console-kit-daemon --no-daemon
/usr/sbin/cron -f
/usr/sbin/ModemManager
/usr/sbin/ntpd -p /var/run/ntpd.pid -g -u 102:104
/usr/sbin/rsyslogd -n
/usr/sbin/sshd -D
/usr/sbin/thd --daemon --triggers /etc/triggerhappy/triggers.d/ --socket /var/run/thd.socket --pidfile /var/run/thd.pid --user nobody /dev/input/event*
[VCHIQ-0]
[VCHIQr-0]
[VCHIQs-0]
[writeback]
  • Actually the ones in [square brackets] are kernel threads. – goldilocks Dec 6 '14 at 16:37
  • I thought they might be, but wasn't sure. I'm not sure which kernel threads are always present and which are only there because of Debian related business. – joan Dec 6 '14 at 16:44
  • In a sense I guess they're all there for the debian business, since the kernel wouldn't be doing much otherwise -- although I suppose it would still be handling interrupts and such. – goldilocks Dec 6 '14 at 16:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.