build-vm, kernel, uboot: setup /etc/fstab for build-vm

The entry in /etc/fstab about the mount parameters of the root
partition needs to be done not only for builds with u-boot.
But, if the record already exists, then it will not be added.
The file system type is set by the variable VM_FSTYPE.
This commit is contained in:
Anton Midyukov 2019-11-10 00:06:49 +07:00
parent 801e99b087
commit 8c68a3c5d5
3 changed files with 5 additions and 1 deletions

View File

@ -0,0 +1,4 @@
#!/bin/sh
grep -qe "[[:space:]]/[[:space:]]" /etc/fstab ||
printf "LABEL=ROOT\t/\t$GLOBAL_VM_FSTYPE\tdefaults\t1 1\n" >> /etc/fstab

View File

@ -75,3 +75,4 @@ ifeq (,$(filter-out armh,$(ARCH)))
endif
@$(call xport,VM_INITRDMODULES)
@$(call xport,VM_INITRDFEATURES)
@$(call xport,VM_FSTYPE)

View File

@ -16,4 +16,3 @@ done
for KVER in $kver; do
/sbin/installkernel --uboot --keep-initrd "$KVER"
done
printf 'LABEL=ROOT\t/\text4\tdefaults\t1 1\n' >> /etc/fstab