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?
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.
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]