owlps/owlps-ardrone/script-drone/1.3.3/etc/init.d/rcS

62 lines
1.5 KiB
Bash
Executable File

#!/bin/sh
# IP_ADDR - this target IP address using CIDR notation:
# <target-ip>/<target-bitmask>
#
# For example:
echo init started...
/bin/mount -t tmpfs tmp /tmp
/bin/mount -t proc proc /proc
/bin/mount -o remount,rw /
/bin/mount -t tmpfs dev /dev
/bin/mkdir -p /dev/shm /dev/pts
/bin/mount -t devpts devpts /dev/pts
/bin/mount -t sysfs sys /sys
#don't allow overcommit (allocate more memory that the physical one)
echo 2 > /proc/sys/vm/overcommit_memory
echo 90 > /proc/sys/vm/overcommit_ratio
#in case of unaligned access print a message and send a SIGBUS
echo 5 > /proc/cpu/alignment
#reboot after 1s after a panic
echo 1 > /proc/sys/kernel/panic
#panic when an oops or BUG is encountered
#disable this for developer
echo 1 > /proc/sys/kernel/panic_on_oops
echo 4 > /sys/module/p6_camif/parameters/lines_per_irq
echo -1 > /proc/sys/kernel/sched_rt_runtime_us
echo "/sbin/mdev" > /proc/sys/kernel/hotplug
/sbin/mdev -s
# Don't show kernel messages
dmesg -n1
/bin/mkdir -p /update
/bin/mount -a
/bin/mkdir -p /data/video
/bin/hostname -F /etc/hostname
/sbin/ifconfig lo 127.0.0.1 up
/sbin/route add -net 127.0.0.0 netmask 255.0.0.0 lo
/bin/factory_reset_cb&
modprobe p6_sdhci
/bin/wifi_setup.sh
# Patch to enable button management.
ln -s /dev /dev/input
/data/gps.sh
#mount -o nolock,proto=tcp -t nfs 192.168.0.11:/mnt/video /home/default
/bin/check_update.sh
echo init exit
echo if you want to customize init look at target/generic/target_skeleton/etc files
echo if crtl+c does not work look at the Linux FAQ section.