hi3516 rootfs
原文链接: hi3516 rootfs
a. 海思Hi35XX telnet 添加root登录密码
passwd root
b. 海思Hi35XX调试串口添加root登录密码
网上找到了两种解决方法:
方法一:
修改/etc/inittab,将::respawn:/sbin/getty -L ttyS000 115200 vt100 -n root -I "Auto login as root ..."更改为 ::respawn:/bin/login
方法二:
修改/etc/inittab,将 #::askfirst:-/bin/sh 改为::askfirst:-/bin/login,再将::respawn:/sbin/getty -L ttyS000 115200 vt100 -n root -I "Auto login as root ..."这一行注释掉
两种方法均会提示输入账号和密码,方法二会在输入前提示"Please press Enter to activate this console.",也就是输入一次回车后才会提示输入账号密码
生产级文件系统制作
/etc/init.d/rcS
#! /bin/sh
/bin/mount -a
echo "
_ _ _ _ _ _ _ _ _ _ _ _
\ _ _ _ _ _ ___
/ /__/ \ |_/
/ __ / - _ ___
/ / / / / /
_ _ _ _/ / / \_/ \_ ______
___________\___\__________________
"
for initscript in /etc/init.d/S[0-9][0-9]*
do
if [ -x $initscript ] ;
then
echo "[RCS]: $initscript"
$initscript
fi
done
ifconfig eth0 192.168.100.10
route add default gw 192.168.100.1
mount tmpfs /tmp -t tmpfs
mount -t vfat /dev/sda1 /mnt/sd
cd /ko
./load3516dv300 -i -sensor0 imx335
cd /tmp
crond
telnetd
/bin/ircut2 &
/usr/local/bin/chaos -r
````
1. 启用 crontab
```sh
## 增加开机启动
echo "crond&" >> /etc/rcS
mkdir -p /var/spool/cron/crontabs
- 开机启动 chaos
echo "start.sh" >> /etc/rcS
#!/bin/bash
if [ -f /etc/profile.d/vte.sh ]; then
source /etc/profile.d/vte.sh
fi
# python
export PATH=$PATH:$HOME/.local/bin
cd /tmp
chaos
- 字体 NotoSansHans-Regular.otf
cp FZLanTingHei-L-GBK-M.ttf /usr/share/fonts/
mount -t nfs -o nolock 192.168.100.100:/Users/pytool/nfs nfs
- machine ID
/var/lib/dbus/machine-idmkdir -p /var/lib/dbus/
echo 111 >/var/lib/dbus/machine-id
挂载sdcard
mount -t vfat -o remount,rw /dev/sda1 /mnt/sd