How to Create Debian10 Rootfs 20200710_1246 Version

From ESS-WIKI
Revision as of 04:13, 3 December 2021 by Darren.huang (talk | contribs) (Created page with "{{DISPLAYTITLE:How to Create Debian10 Rootfs 20200710_1246 Version}} This version is base on debian 10 rootfs base. You can refer to the following link: IoTGateway/BSP/...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
This version is base on debian 10 rootfs base. You can refer to the following link: How to Create Debian10 Rootfs Base

1. Basic installation and configuration

(1) install required packages

# apt install pciutils usbutils lshw net-tools ifupdown ethtool openssh-client
# apt install xterm
# apt install dialog apt-utils
# apt install bsdmainutils
# apt install mtd-utils
# apt install haveged
# sed -i 's/"$/ --data=16"/' /etc/default/haveged
# ./go arm64-rootfs-deb10
(2) update source.list
# cat << EOT > /etc/apt/sources.list
deb http://deb.debian.org/debian buster main
deb http://deb.debian.org/debian buster-updates main
deb http://deb.debian.org/debian-security/ buster/updates main
EOT
# apt update
# apt upgrade
(3) set automount
# mkdir -p /etc/systemd/system/systemd-udevd.service.d/
# cat << EOT > /etc/systemd/system/systemd-udevd.service.d/override.conf
[Service]
PrivateMounts=no
EOT
(4) set serial console
# sed -i '/ExecStart.*/i Environment="TERM=xterm-color"' \
/lib/systemd/system/serial-getty@.service
(5) add 50-firmware.rules
# cat > /etc/udev/rules.d/50-firmware.rules << EOT
SUBSYSTEM=="firmware", ACTION=="add", RUN{program}="firmware"
EOT
(6) add firmware script
# cat > /lib/udev/firmware << 'EOT'
#!/bin/bash
echo 1 > /sys/$DEVPATH/loading
cat /lib/firmware/$FIRMWARE > /sys/$DEVPATH/data
if [ $? = 0 ]; then
    echo 0 > /sys/$DEVPATH/loading
else
    echo -1 > /sys/$DEVPATH/loading
fi
EOT
# chmod +x /lib/udev/firmware
(7) add 70-netdev-name.rules to modify the enp1s0 to eth1
# cat > /etc/udev/rules.d/70-netdev-name.rules << EOT
SUBSYSTEM=="net", ACTION=="add", KERNEL=="eth1", NAME="eth1"
EOT
(8) modify
/etc/profile
/etc/skel/.bashrc
/home/adv/.bashrc

2. xfce4 installation and settings

(1) install required packages

# apt install --download-only xfce4 xfce4-goodies
# apt install xfce4 xfce4-goodies
# apt clean
(2) install keyboard-configuration (/etc/default/keyboard)
	# KEYBOARD CONFIGURATION FILE
	 
	# Consult the keyboard(5) manual page.
	 
	XKBMODEL="pc105"
	XKBLAYOUT="us"
	XKBVARIANT=""
	XKBOPTIONS=""
	 
	BACKSPACE="guess"
(3) remove and set some files
# rm -rf /lib/modules/* /lib/firmware/*
# echo arm64 > /etc/hostname
# sed -i 's/\(127\.0\.1\.1 *\).*/\1arm64/' /etc/hosts
(4) modify /etc/lightdm/lightdm.conf
# sed -i "\
  s/^#\(autologin-guest=.*\)/\1/; \
  s/^#\(autologin-user\)=/\1=adv/; \
  s/^#\(autologin-user-timeout=.*\)/\1/" \
/etc/lightdm/lightdm.conf
(5) modify Xfce Power Manager
# sed -i 's/\(.*power-button-action.*type=\).*/\1"empty"\/>/; /power-button-action/ a \
    <property name="brightness-switch-restore-on-exit" type="int" value="0"/>\
    <property name="brightness-switch" type="int" value="0"/>\
    <property name="blank-on-ac" type="int" value="0"/>\
    <property name="dpms-on-ac-sleep" type="uint" value="0"/>\
    <property name="dpms-on-ac-off" type="uint" value="0"/>\
    <property name="dpms-enabled" type="bool" value="true"/>' \
/etc/xdg/xfce4/xfconf/xfce-perchannel-xml/xfce4-power-manager.xml
(6) install chromium
# apt install chromium