@@ -17,7 +17,8 @@ SRC_URI = " \
file://postinst \
file://ethernet \
file://99-silent-printk.conf \
- file://99-watchdog.conf"
+ file://99-watchdog.conf \
+ file://interfaces"
WIRELESS_FIRMWARE_PACKAGE ?= ""
INSTALL_WIRELESS_TOOLS ??= "0"
@@ -38,4 +39,6 @@ do_install() {
install -v -d ${D}/etc/systemd/system.conf.d
install -v -m 644 ${WORKDIR}/99-watchdog.conf ${D}/etc/systemd/system.conf.d/
+
+ install -v -m 644 ${WORKDIR}/interfaces ${D}/etc/network/interfaces.d/
}
new file mode 100644
@@ -0,0 +1,6 @@
+auto eth0
+iface eth0 inet static
+ address 192.168.2.2
+ netmask 255.255.255.0
+ network 192.168.2.0
+ broadcast 192.168.2.255
@@ -18,3 +18,12 @@ IMAGE_INSTALL += "customizations"
CIP_IMAGE_OPTIONS ?= ""
include ${CIP_IMAGE_OPTIONS}
+
+image_configure_fstab_append () {
+ # Add /boot to /etc/fstab for fw_printenv
+ echo "/dev/mmcblk0p1 /boot vfat defaults,nofail 0 0" | sudo tee -a ${IMAGE_ROOTFS}/etc/fstab
+ # remove /var partition
+ sudo sed -i '/LABEL=var/d' ${IMAGE_ROOTFS}/etc/fstab
+ # make /dev/root as read-write
+ sudo sed -i 's/defaults,ro/defaults/' ${IMAGE_ROOTFS}/etc/fstab
+}