SampleApplication: Update the image create scripts
Update the rc.local for User VM, check the echo result and try again if the echo failed. Tracked-On: #7820 Signed-off-by: Chenli Wei <chenli.wei@linux.intel.com>
This commit is contained in:
parent
d6a9d2315e
commit
61f6ec6c88
|
@ -156,19 +156,26 @@ function create_uio_config() {
|
||||||
local temp_file=$(mktemp /tmp/rc.local.XXXX)
|
local temp_file=$(mktemp /tmp/rc.local.XXXX)
|
||||||
|
|
||||||
cat << EOF > ${temp_file}
|
cat << EOF > ${temp_file}
|
||||||
|
#!/bin/bash
|
||||||
dhclient -q
|
dhclient -q
|
||||||
modprobe uio
|
modprobe uio
|
||||||
modprobe uio_pci_generic
|
modprobe uio_pci_generic
|
||||||
|
|
||||||
for i in {0..3}
|
for i in {0..2}
|
||||||
do
|
do
|
||||||
bash -c 'echo "1af4 1110" > /sys/bus/pci/drivers/uio_pci_generic/new_id'
|
bash -c 'echo "1af4 1110" > /sys/bus/pci/drivers/uio_pci_generic/new_id'
|
||||||
|
if [ $? -eq 0 ]; then
|
||||||
|
echo "uio setting result" $?
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
echo "uio setting result" $? "try again"
|
||||||
sleep 1
|
sleep 1
|
||||||
done
|
done
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
sudo mv ${temp_file} /etc/rc.local && \
|
sudo mv ${temp_file} $mount_point/etc/rc.local && \
|
||||||
sudo chown root:root /etc/rc.local
|
sudo chown root:root $mount_point/etc/rc.local && \
|
||||||
|
sudo chmod 755 $mount_point/etc/rc.local
|
||||||
}
|
}
|
||||||
|
|
||||||
function setup_hmi_vm_rootfs() {
|
function setup_hmi_vm_rootfs() {
|
||||||
|
|
Loading…
Reference in New Issue