增加ota文件系统编译方法;(注意每次swupdate_make_recovery_img需要删除根目录和./lichee/linux下的.config和.config.old)

This commit is contained in:
lijunliang
2024-06-05 16:39:59 +08:00
parent 36028ad52e
commit 6d51adb4db
75 changed files with 11872 additions and 73 deletions

View File

@@ -0,0 +1,50 @@
#!/bin/sh
#
# udev This is a minimal non-LSB version of a UDEV startup script. It
# was derived by stripping down the udev-058 LSB version for use
# with buildroot on embedded hardware using Linux 2.6.34+ kernels.
#
# You may need to customize this for your system's resource limits
# (including startup time!) and administration. For example, if
# your early userspace has a custom initramfs or initrd you might
# need /dev much earlier; or without hotpluggable busses (like USB,
# PCMCIA, MMC/SD, and so on) your /dev might be static after boot.
#
# This script assumes your system boots right into the eventual root
# filesystem, and that init runs this udev script before any programs
# needing more device nodes than the bare-bones set -- /dev/console,
# /dev/zero, /dev/null -- that's needed to boot and run this script.
#
# Check for missing binaries
UDEV_BIN=/sbin/udevd
test -x $UDEV_BIN || exit 5
# Check for config file and read it
UDEV_CONFIG=/etc/udev/udev.conf
test -r $UDEV_CONFIG || exit 6
. $UDEV_CONFIG
case "$1" in
start)
printf "Populating ${udev_root:-/dev} using udev: "
printf '\000\000\000\000' > /proc/sys/kernel/hotplug
$UDEV_BIN -d || (echo "FAIL" && exit 1)
udevadm trigger --type=subsystems --action=add
udevadm trigger --type=devices --action=add
udevadm settle --timeout=30 || echo "udevadm settle failed"
echo "done"
;;
stop)
# Stop execution of events
udevadm control --stop-exec-queue
killall udevd
;;
*)
echo "Usage: $0 {start|stop}"
exit 1
;;
esac
exit 0

View File

@@ -0,0 +1,34 @@
#!/bin/sh
#
# Start wifi_deamon....
#
start() {
printf "Starting wifi_deamon....: "
#wifi_daemon
#sleep 0.2
#wifi -o sta
#wifi -a enable
}
stop() {
printf "Stopping wifi_deamon: "
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart|reload)
stop
start
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
esac
exit $?

View File

@@ -0,0 +1,36 @@
#!/bin/sh
#
# Load fat modules....
#
MODULES_DIR="/lib/modules/`uname -r`"
start() {
printf "Load fat modules\n"
insmod $MODULES_DIR/fat.ko
insmod $MODULES_DIR/vfat.ko
}
stop() {
printf "Unload fat modules\n"
rmmod $MODULES_DIR/fat.ko
rmmod $MODULES_DIR/vfat.ko
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart|reload)
stop
start
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
esac
exit $?

View File

@@ -0,0 +1,38 @@
#!/bin/sh
#
# Load mmc modules....
#
MODULES_DIR="/lib/modules/`uname -r`"
start() {
printf "Load mmc modules\n"
#insmod $MODULES_DIR/mmc_core.ko
#insmod $MODULES_DIR/mmc_block.ko
#insmod $MODULES_DIR/sunxi_mmc_host.ko
}
stop() {
printf "Unload mmc modules\n"
#rmmod $MODULES_DIR/mmc_core.ko
#rmmod $MODULES_DIR/block.ko
#rmmod $MODULES_DIR/sunxi_mmc_host.ko
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart|reload)
stop
start
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
esac
exit $?

View File

@@ -0,0 +1,117 @@
#!/bin/sh
echo "------run rc.final file-----"
#echo "insmod wifi modules"
#insmod /lib/modules/3.4.39/8723ds.ko
#insmod /lib/modules/3.4.39/bcmdhd.ko
#insmod /lib/modules/3.4.39/xradio_mac.ko
#insmod /lib/modules/3.4.39/xradio_core.ko
#insmod /lib/modules/3.4.39/xradio_wlan.ko
export LD_LIBRARY_PATH=/usr/lib/eyesee-mpp:${LD_LIBRARY_PATH}
ulimit -c unlimited
echo /mnt/extsd/coredump-%e-%p-%s-%t > /proc/sys/kernel/core_pattern
for i in /etc/init.d/S??* ;do
# Ignore dangling symlinks (if any).
[ ! -f "$i" ] && continue
case "$i" in
*.sh)
# Source shell script for speed.
(
trap - INT QUIT TSTP
set start
. $i
)
;;
*)
# No sh extension, so fork subprocess.
$i start
;;
esac
done
LOOP_CNT=0
SD_DEV=
while [ 1 ];do
if [ $LOOP_CNT -eq 3 ];then
echo wait SD Card ready timeout
break;
fi
if [ -b /dev/mmcblk1p1 ];then
SD_DEV=/dev/mmcblk1p1
break;
elif [ -b /dev/mmcblk1 ];then
SD_DEV=/dev/mmcblk1
break;
elif [ -b /dev/mmcblk0p1 ];then
SD_DEV=/dev/mmcblk0p1
break;
elif [ -b /dev/mmcblk0 ];then
SD_DEV=/dev/mmcblk0
break;
else
echo SD Card not ready, wait
fi
LOOP_CNT=$(($LOOP_CNT+1))
sleep 1
done
# repair sd card file
if [ "x$SD_DEV" != "x" ]; then
echo SD Card is ready
if [ -f /usr/bin/fsck_msdos ]; then
/usr/bin/fsck_msdos -pfS $SD_DEV
fi
fi
if [ -z "$(grep '\<vfat\>' /proc/mounts)" ]; then
! /bin/mount -t vfat /dev/mmcblk0 /mnt/extsd 2>/dev/null &&
/bin/mount -t vfat /dev/mmcblk0p1 /mnt/extsd
fi
sleep 1
if [ -n "$(grep '/mnt/extsd' /proc/mounts)" ]; then
echo "start mv stream..."
ls /tmp/
rm -rf /mnt/extsd/stream*.h264
rm -rf /mnt/extsd/data*.jpg
mv /tmp/stream*.h264 /mnt/extsd/
mv /tmp/data*.jpg /mnt/extsd/
echo "---/mnt/extsd/---"
ls /mnt/extsd/
fi
echo "run_usb_adb start!"
run_usb_adb
#echo "sample_virvi2vo start!"
#/usr/bin/sample_virvi2vo -path /usr/bin/sample_virvi2vo_v851s_sc1721v_dual.conf &
#catch jpg 0
#demo_video_in -n 40 -s0 800x608 -f0 0 -pf 4 -trd 1 -snd 1 -s1 800x608 -f1 0 -pf1 4 -vn1 1
#catch jpg 1
#demo_video_in -n 40 -s0 800x608 -f0 0 -pf 4 -snd 1 -s1 800x608 -f1 0 -pf1 4 -trd 1 -vn1 1 -vn2 5
#set ir
echo 6 > /sys/class/pwm/pwmchip0/export
echo 50000 > /sys/class/pwm/pwmchip0/pwm6/period
echo 30000 > /sys/class/pwm/pwmchip0/pwm6/duty_cycle
#disable ir
echo 0 > /sys/class/pwm/pwmchip0/pwm6/enable
#enable ir
#echo 1 > /sys/class/pwm/pwmchip0/pwm6/enable
#/usr/bin/rt_media-uvc -D 0 -b 0 -d 2 &
#run_otg
#sleep 2
#/usr/bin/rt_media-uvc -D 0 -d 2 &

View File

@@ -0,0 +1,105 @@
#!/bin/sh
echo "------run rc.final file-----"
#echo "insmod wifi modules"
#insmod /lib/modules/3.4.39/8723ds.ko
#insmod /lib/modules/3.4.39/bcmdhd.ko
#insmod /lib/modules/3.4.39/xradio_mac.ko
#insmod /lib/modules/3.4.39/xradio_core.ko
#insmod /lib/modules/3.4.39/xradio_wlan.ko
export LD_LIBRARY_PATH=/usr/lib/eyesee-mpp:${LD_LIBRARY_PATH}
ulimit -c unlimited
echo /mnt/extsd/coredump-%e-%p-%s-%t > /proc/sys/kernel/core_pattern
for i in /etc/init.d/S??* ;do
# Ignore dangling symlinks (if any).
[ ! -f "$i" ] && continue
case "$i" in
*.sh)
# Source shell script for speed.
(
trap - INT QUIT TSTP
set start
. $i
)
;;
*)
# No sh extension, so fork subprocess.
$i start
;;
esac
done
#LOOP_CNT=0
#SD_DEV=
#while [ 1 ];do
# if [ $LOOP_CNT -eq 3 ];then
# echo wait SD Card ready timeout
# break;
# fi
# if [ -b /dev/mmcblk1p1 ];then
# SD_DEV=/dev/mmcblk1p1
# break;
# elif [ -b /dev/mmcblk1 ];then
# SD_DEV=/dev/mmcblk1
# break;
# elif [ -b /dev/mmcblk0p1 ];then
# SD_DEV=/dev/mmcblk0p1
# break;
# elif [ -b /dev/mmcblk0 ];then
# SD_DEV=/dev/mmcblk0
# break;
# else
# echo SD Card not ready, wait
# fi
# LOOP_CNT=$(($LOOP_CNT+1))
# sleep 1
#done
#
# repair sd card file
#if [ "x$SD_DEV" != "x" ]; then
# echo SD Card is ready
#
# if [ -f /usr/bin/fsck_msdos ]; then
# /usr/bin/fsck_msdos -pfS $SD_DEV
# fi
#fi
#if [ -z "$(grep '\<vfat\>' /proc/mounts)" ]; then
# ! /bin/mount -t vfat /dev/mmcblk0 /mnt/extsd 2>/dev/null &&
# /bin/mount -t vfat /dev/mmcblk0p1 /mnt/extsd
#fi
#sleep 1
#echo "start mv stream..."
#ls /tmp/
#rm -rf /mnt/extsd/stream*.h264
#rm -rf /mnt/extsd/data*.jpg
#mv /tmp/stream*.h264 /mnt/extsd/
#mv /tmp/data*.jpg /mnt/extsd/
#echo "---/mnt/extsd/---"
#ls /mnt/extsd/
echo 160 > /sys/class/gpio/export
echo out > /sys/class/gpio/gpio160/direction
echo 0 > /sys/class/gpio/gpio160/value
echo 0 > /sys/class/pwm/pwmchip0/export
echo 100000 > /sys/class/pwm/pwmchip0/pwm0/period
echo 40000 > /sys/class/pwm/pwmchip0/pwm0/duty_cycle
echo 1 > /sys/class/pwm/pwmchip0/pwm0/enable
echo 1 > /sys/class/gpio/gpio160/value
run_usb_adb
setusbconfig rndis
ifconfig usb0 up
ifconfig usb0 192.168.2.100
# /mnt/UDISK/rt_media-uvc &

View File

@@ -0,0 +1,43 @@
#!/bin/sh
echo "------run rc.modules file-----"
MODULES_DIR="/lib/modules/`uname -r`"
#disp
#echo "------insmod display modules start-----"
#insmod /lib/modules/4.9.191/fb.ko
#insmod /lib/modules/4.9.191/disp.ko
#wifi
#echo "------insmod wifi modules xr806 start-----"
#insmod /lib/modules/4.9.191/xr806.ko
#insmod /lib/modules/4.9.191/vipcore.ko
#input
#echo "------insmod input modules start-----"
#insmod /lib/modules/4.9.191/input-core.ko
#insmod /lib/modules/4.9.191/evdev.ko
#audio
echo "------insmod audio modules start-----"
insmod $MODULES_DIR/soundcore.ko
insmod $MODULES_DIR/snd.ko
insmod $MODULES_DIR/snd-timer.ko
insmod $MODULES_DIR/snd-pcm.ko
insmod $MODULES_DIR/snd-pcm-dmaengine.ko
insmod $MODULES_DIR/snd-soc-core.ko
insmod $MODULES_DIR/snd_soc_sunxi_pcm.ko
insmod $MODULES_DIR/snd_soc_sunxi_component_rxsync.ko
insmod $MODULES_DIR/snd_soc_sunxi_aaudio.ko
insmod $MODULES_DIR/snd_soc_sunxi_daudio.ko
insmod $MODULES_DIR/snd_soc_sunxi_internal_codec.ko
insmod $MODULES_DIR/snd_soc_sunxi_machine.ko
echo "------insmod audio modules end-----"
insmod $MODULES_DIR/rt-media.ko
insmod $MODULES_DIR/cst9220.ko
#ctp
#echo "------insmod ctp modules gslx680 start-----"
#insmod /lib/modules/4.9.191/gslX680new.ko
#l-sen
#echo "------insmod l-sen modules gpadc start-----"
#insmod /lib/modules/4.9.191/sunxi_gpadc.ko

View File

@@ -0,0 +1,4 @@
#!/bin/sh
echo "------run rc.preboot file-----"

View File

@@ -0,0 +1,28 @@
#!/bin/sh
# Stop all init scripts in /etc/init.d
# executing them in reversed numerical order.
#
for i in $(ls -r /etc/init.d/S??*) ;do
# Ignore dangling symlinks (if any).
[ ! -f "$i" ] && continue
case "$i" in
*.sh)
# Source shell script for speed.
(
trap - INT QUIT TSTP
set stop
. $i
)
;;
*)
# No sh extension, so fork subprocess.
$i stop
;;
esac
done