Browse Source

default xfce desktop

Signed-off-by: Chunrong Guo <guochunrong@phytium.com.cn>
pull/6/head
Chunrong Guo 1 year ago
committed by weishanshan1084
parent
commit
90b4909ad8
  1. 11
      board/phytium/common/debian-package-installer
  2. 18
      board/phytium/common/ubuntu-package-installer
  3. 35
      board/phytium/genimage-e2000.cfg
  4. 2
      configs/phytium_e2000_ubuntu_defconfig
  5. 2
      fs/ext2/ext2.mk
  6. 5
      package/rootfs-chown/src/S60rootfs-chown

11
board/phytium/common/debian-package-installer

@ -52,7 +52,7 @@ do_distrorfs_second_stage() {
echo installed additional packages.
if [ $6 = desktop ]; then
for pkg in task-kde-desktop ; do
for pkg in task-xfce-desktop ; do
DEBIAN_FRONTEND=noninteractive apt -y install $pkg || true
done
if [ $5 = D2000 ]; then
@ -60,11 +60,14 @@ do_distrorfs_second_stage() {
sed -i '1 a /usr/local/lib' /etc/ld.so.conf.d/aarch64-linux-gnu.conf
ldconfig
ln -sf /usr/local/bin/Xorg /usr/bin/X
sed -i '2 a rm -rf /home/*/.config/xfce4/xfconf/xfce-perchannel-xml/xfwm4.xml' /etc/X11/Xsession.d/55xfce4-session
sed -i '17 a Environment="LD_LIBRARY_PATH=/usr/local/lib"' /lib/systemd/system/lightdm.service
gpasswd -a lightdm render
gpasswd -a lightdm video
gpasswd -a lightdm audio
fi
usermod -a -G video,render,audio user
gpasswd -a sddm render
gpasswd -a sddm video
gpasswd -a sddm audio
fi
if [ $5 = E2000 ]; then

18
board/phytium/common/ubuntu-package-installer

@ -54,7 +54,7 @@ do_distrorfs_second_stage() {
echo installed additional packages.
if [ $6 = desktop ]; then
for pkg in kubuntu-desktop ; do
for pkg in xfce4 slick-greeter; do
DEBIAN_FRONTEND=noninteractive apt -y install $pkg || true
done
if [ $5 = D2000 ]; then
@ -62,12 +62,20 @@ do_distrorfs_second_stage() {
sed -i '1 a /usr/local/lib' /etc/ld.so.conf.d/aarch64-linux-gnu.conf
ldconfig
ln -sf /usr/local/bin/Xorg /usr/bin/X
sed -i '28 a Environment="LD_LIBRARY_PATH=/usr/local/lib"' /lib/systemd/system/sddm.service
sed -i '2 a rm -rf /home/*/.config/xfce4/xfconf/xfce-perchannel-xml/xfwm4.xml' /etc/X11/Xsession.d/55xfce4-session
sed -i '13 a Environment="LD_LIBRARY_PATH=/usr/local/lib"' /lib/systemd/system/lightdm.service
gpasswd -a lightdm render
gpasswd -a lightdm video
gpasswd -a lightdm audio
fi
usermod -a -G video,render,audio user
gpasswd -a sddm render
gpasswd -a sddm video
gpasswd -a sddm audio
ln -sf /lib/systemd/system/lightdm.service /etc/systemd/system/display-manager.service
sed -i "s/gdm3/lightdm/" /etc/X11/default-display-manager
echo '[SeatDefaults]' >> /etc/lightdm/lightdm.conf
echo 'greeter-session=slick-greeter' >> /etc/lightdm/lightdm.conf
echo 'user-session=xfce' >> /etc/lightdm/lightdm.conf
fi
if [ $5 = E2000 ]; then
echo 'defaults.pcm.!card phytiume2000i2s' >> /etc/asound.conf

35
board/phytium/genimage-e2000.cfg

@ -0,0 +1,35 @@
image efi-part.vfat {
vfat {
file EFI {
image = "efi-part/EFI"
}
file Image {
image = "Image"
}
file e2000q-demo-board.dtb {
image = "e2000q-demo-board.dtb"
}
}
size = 400M
}
image disk.img {
hdimage {
partition-table-type = "gpt"
}
partition boot {
image = "efi-part.vfat"
partition-type-uuid = 0FC63DAF-8483-4772-8E79-3D69D8477DE4
offset = 32K
bootable = true
}
partition root {
partition-type-uuid = 0FC63DAF-8483-4772-8E79-3D69D8477DE4
image = "rootfs.ext2"
size = 3G
}
}

2
configs/phytium_e2000_ubuntu_defconfig

@ -5,6 +5,8 @@ BR2_cortex_a53=y
# Filesystem
BR2_TARGET_ROOTFS_EXT2=y
BR2_TARGET_ROOTFS_EXT2_4=y
#BR2_ROOTFS_POST_IMAGE_SCRIPT="board/phytium/post-image.sh support/scripts/genimage.sh"
#BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/phytium/genimage-e2000.cfg"
# custom skeleton
BR2_ROOTFS_SKELETON_UBUNTU=y

2
fs/ext2/ext2.mk

@ -61,8 +61,6 @@ define ROOTFS_EXT2_CMD
EXT2_SIZE_E=$$(($${USED_BLOCK} + 51200))
fi
rm -f $@
$(HOST_DIR)/sbin/mkfs.ext$(BR2_TARGET_ROOTFS_EXT2_GEN) $(EXT2_OPTS) $@ "$${EXT2_SIZE_E}K"
fi
endef

5
package/rootfs-chown/src/S60rootfs-chown

@ -7,6 +7,11 @@ rootfs_chown() {
[ -d /var/cache/man ] && chown -R man:root /var/cache/man
[ -d /var/lib/sddm ] && chown -R sddm:sddm /var/lib/sddm
if [ -d /var/lib/lightdm ]; then
chown -R lightdm:lightdm /var/lib/lightdm || true
chmod 0750 /var/lib/lightdm
fi
chown -R user:user /home/user
if [ $? -eq 0 ]
then

Loading…
Cancel
Save