mirror of
https://github.com/lxsang/meta-rpi-diya.git
synced 2024-12-28 03:18:21 +01:00
add settings to enable readonly fs
This commit is contained in:
parent
5ab57b8e5d
commit
b358e26252
@ -15,8 +15,7 @@ LAYERSERIES_COMPAT_meta-rpi-diya = "mickledore"
|
|||||||
PACKAGE_CLASSES = "package_ipk"
|
PACKAGE_CLASSES = "package_ipk"
|
||||||
INHERIT += "rm_work"
|
INHERIT += "rm_work"
|
||||||
|
|
||||||
EXTRA_IMAGE_FEATURES ?= " ssh-server-dropbear "
|
EXTRA_IMAGE_FEATURES ?= " ssh-server-dropbear read-only-rootfs "
|
||||||
# disable readonly fs read-only-rootfs
|
|
||||||
# ssh-server-dropbear
|
# ssh-server-dropbear
|
||||||
DISTRO_FEATURES:append := " vc4-gfx opengl "
|
DISTRO_FEATURES:append := " vc4-gfx opengl "
|
||||||
# DISTRO_FEATURES:append := " vc4-gfx opengl directfb "
|
# DISTRO_FEATURES:append := " vc4-gfx opengl directfb "
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
DROPBEAR_EXTRA_ARGS="-w"
|
DROPBEAR_EXTRA_ARGS="-w"
|
||||||
DROPBEAR_RSAKEY_DIR=/home/diya/etc/dropbear
|
DROPBEAR_RSAKEY_DIR=/var/etc/dropbear
|
3
recipes-core/init-ifupdown/files/interfaces
Normal file
3
recipes-core/init-ifupdown/files/interfaces
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
allow-hotplug wlan0
|
||||||
|
iface wlan0 inet dhcp
|
||||||
|
wpa-conf /var/etc/network/wpa_supplicant.conf
|
@ -1,3 +1,9 @@
|
|||||||
|
FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
|
||||||
|
SRC_URI += "file://interfaces"
|
||||||
|
|
||||||
do_install:append () {
|
do_install:append () {
|
||||||
rm ${D}/etc/network/interfaces
|
rm ${D}/etc/network/interfaces
|
||||||
|
install -d ${D}/var/etc/
|
||||||
|
install -d ${D}/var/etc/network
|
||||||
|
install -m 0644 ${WORKDIR}/interfaces ${D}/var/etc/network
|
||||||
}
|
}
|
@ -1,2 +1,4 @@
|
|||||||
l root root 0644 /etc/network/interfaces /home/diya/etc/network/interfaces
|
d root root 0755 /var/etc/network none
|
||||||
l root root 0644 /etc/dropbear /home/diya/etc/dropbear
|
d root root 0755 /var/etc/dropbear none
|
||||||
|
l root root 0644 /etc/network/interfaces /var/etc/network/interfaces
|
||||||
|
l root root 0644 /etc/dropbear /var/etc/dropbear
|
||||||
|
@ -25,9 +25,9 @@ case "$1" in
|
|||||||
chown -R diya:diya /home/diya
|
chown -R diya:diya /home/diya
|
||||||
rm /boot/home_partition_should_be_formated
|
rm /boot/home_partition_should_be_formated
|
||||||
fi
|
fi
|
||||||
if [ -e "/boot/install" ];then
|
if [ -e "/boot/wpa_supplicant.conf" ];then
|
||||||
cp -rf /boot/install/* /home/diya
|
install -m 0644 /boot/wpa_supplicant.conf /var/etc/network
|
||||||
rm -rf /boot/install
|
rm /boot/wpa_supplicant.conf
|
||||||
reboot
|
reboot
|
||||||
fi
|
fi
|
||||||
# display information
|
# display information
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
line=$(
|
line=$(
|
||||||
sed -e 's/\s*\([\+0-9a-zA-Z]*\).*/\1/' << EOF | fdisk /dev/mmcblk0 | grep /dev/mmcblk0p3
|
sed -e 's/\s*\([\+0-9a-zA-Z]*\).*/\1/' << EOF | fdisk /dev/mmcblk0 | grep /dev/mmcblk0p4
|
||||||
p
|
p
|
||||||
q
|
q
|
||||||
EOF
|
EOF
|
||||||
@ -18,11 +18,11 @@ fi
|
|||||||
|
|
||||||
echo "Expanding the partition"
|
echo "Expanding the partition"
|
||||||
sed -e 's/\s*\([\+0-9a-zA-Z]*\).*/\1/' << EOF | fdisk /dev/mmcblk0
|
sed -e 's/\s*\([\+0-9a-zA-Z]*\).*/\1/' << EOF | fdisk /dev/mmcblk0
|
||||||
d
|
d # delete partition
|
||||||
3
|
4 # number 4
|
||||||
n # new partition
|
n # new partition
|
||||||
p # primary partition
|
p # primary partition
|
||||||
3 # partition number 3
|
4 # partition number 4
|
||||||
$start_sector
|
$start_sector
|
||||||
# default - end of disk
|
# default - end of disk
|
||||||
p # print the in-memory partition table
|
p # print the in-memory partition table
|
||||||
|
4
recipes-extended/sudo/sudo_%.bbappend
Normal file
4
recipes-extended/sudo/sudo_%.bbappend
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
do_install:append() {
|
||||||
|
# grant all permission to sudo group
|
||||||
|
sed -i 's/^#\s*\(%sudo\s*ALL=(ALL:ALL)\s*ALL\)/\1/' ${D}/${sysconfdir}/sudoers
|
||||||
|
}
|
@ -2,7 +2,11 @@
|
|||||||
# long-description: Creates a partitioned SD card image for use with
|
# long-description: Creates a partitioned SD card image for use with
|
||||||
# Raspberry Pi. Boot files are located in the first vfat partition.
|
# Raspberry Pi. Boot files are located in the first vfat partition.
|
||||||
|
|
||||||
part /boot --source bootimg-partition --ondisk mmcblk0 --fstype=vfat --label boot --active --align 4096 --size 50
|
part /boot --source bootimg-partition --ondisk mmcblk0 --fstype=vfat --label boot --active --align 4096 --size 32
|
||||||
|
# read only roofs
|
||||||
part / --source rootfs --ondisk mmcblk0 --fstype=ext4 --label root --align 4096 --size 150
|
part / --source rootfs --ondisk mmcblk0 --fstype=ext4 --label root --align 4096 --size 150
|
||||||
|
# modifiable configurations stored in /var/etc
|
||||||
|
part /var/etc --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/var/etc --ondisk mmcblk0 --fstype=ext4 --label home --align 1024 --size 32
|
||||||
|
# home partition
|
||||||
part /home --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/home --ondisk mmcblk0 --fstype=ext4 --label home --align 1024 --size 16
|
part /home --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/home --ondisk mmcblk0 --fstype=ext4 --label home --align 1024 --size 16
|
||||||
# part /home --ondisk mmcblk0 --fstype=vfat --label music --active --align 1024 --size 16
|
# part /home --ondisk mmcblk0 --fstype=vfat --label music --active --align 1024 --size 16
|
Loading…
Reference in New Issue
Block a user