Commit 5c9f5703 authored by Oleg Dzhimiev's avatar Oleg Dzhimiev

1. updated linux-xlnx hash - where bitstream loading is fixed in xdev_cfg

2. updated udev in initramfs init script
parent e313fc04
...@@ -58,7 +58,7 @@ read_args() { ...@@ -58,7 +58,7 @@ read_args() {
modprobe $optarg 2> /dev/null ;; modprobe $optarg 2> /dev/null ;;
# ubi.mtd=*) # ubi.mtd=*)
# optarg_arr=${optarg//,/ } # optarg_arr=${optarg//,/ }
# ROOT_UBIVOL=$optarg_arr[0] # ROOT_UBIVOL=$optarg_arr[0]
# ;; # ;;
LABEL=*) LABEL=*)
label=$optarg ;; label=$optarg ;;
...@@ -77,14 +77,20 @@ read_args() { ...@@ -77,14 +77,20 @@ read_args() {
shelltimeout=30 shelltimeout=30
else else
shelltimeout=$optarg shelltimeout=$optarg
fi fi
esac esac
done done
} }
boot_live_root() { boot_live_root() {
if [ "$DEBUG" = true ];then
echo " settle and kill udev"
fi
# Watches the udev event queue, and exits if all current events are handled # Watches the udev event queue, and exits if all current events are handled
udevadm settle --timeout=3 --quiet #udevadm settle --timeout=3 --quiet
# --quiet not supported anymore ?!
udevadm settle --timeout=3
killall "${_UDEV_DAEMON##*/}" 2>/dev/null killall "${_UDEV_DAEMON##*/}" 2>/dev/null
# # Allow for identification of the real root even after boot # # Allow for identification of the real root even after boot
...@@ -97,13 +103,14 @@ boot_live_root() { ...@@ -97,13 +103,14 @@ boot_live_root() {
# mkdir -p ${ROOT_MOUNT}/media/${dir##*/} # mkdir -p ${ROOT_MOUNT}/media/${dir##*/}
# mount -n --move $dir ${ROOT_MOUNT}/media/${dir##*/} # mount -n --move $dir ${ROOT_MOUNT}/media/${dir##*/}
# done # done
mount -n --move /proc ${ROOT_MOUNT}/proc mount -n --move /proc ${ROOT_MOUNT}/proc
mount -n --move /sys ${ROOT_MOUNT}/sys mount -n --move /sys ${ROOT_MOUNT}/sys
mount -n --move /dev ${ROOT_MOUNT}/dev mount -n --move /dev ${ROOT_MOUNT}/dev
cd $ROOT_MOUNT cd $ROOT_MOUNT
echo "INITRAMFS: switching root"
# busybox switch_root supports -c option # busybox switch_root supports -c option
exec switch_root -c /dev/console $ROOT_MOUNT /sbin/init $CMDLINE || exec switch_root -c /dev/console $ROOT_MOUNT /sbin/init $CMDLINE ||
fatal "Couldn't switch_root, dropping to shell" fatal "Couldn't switch_root, dropping to shell"
...@@ -137,7 +144,7 @@ read_args ...@@ -137,7 +144,7 @@ read_args
# found="yes" # found="yes"
# ISOLINUX="isolinux" # ISOLINUX="isolinux"
# ROOT_DISK="$i" # ROOT_DISK="$i"
# break # break
# fi # fi
# done # done
# if [ "$found" = "yes" ]; then # if [ "$found" = "yes" ]; then
...@@ -169,22 +176,22 @@ mount_and_boot() { ...@@ -169,22 +176,22 @@ mount_and_boot() {
if ! mount -t $ROOT_FSTYPE -o rw,noatime $ROOT_DEVICE $ROOT_MOUNT ; then if ! mount -t $ROOT_FSTYPE -o rw,noatime $ROOT_DEVICE $ROOT_MOUNT ; then
fatal "Could not mount rootfs device (not $ROOT_FSTYPE?)" fatal "Could not mount rootfs device (not $ROOT_FSTYPE?)"
fi fi
if [ "$ROOT_FSTYPE" = "ubifs" ]; then if [ "$ROOT_FSTYPE" = "ubifs" ]; then
#mknod /dev/loop0 b 7 0 2>/dev/null #mknod /dev/loop0 b 7 0 2>/dev/null
#if [ "$ROOT_FSTYPE" = "ubifs" ]; then #if [ "$ROOT_FSTYPE" = "ubifs" ]; then
#unlock flash ? - driver should have taken care of this #unlock flash ? - driver should have taken care of this
# ubiattach won't be found and there's no need because kernel already knows # ubiattach won't be found and there's no need because kernel already knows
#ubiattach /dev/ubi_ctrl -m $ROOT_UBIVOL #ubiattach /dev/ubi_ctrl -m $ROOT_UBIVOL
#fi #fi
# always 'overlay' # always 'overlay'
TMP=/var/volatile/tmp TMP=/var/volatile/tmp
mkdir -p /var/volatile mkdir -p /var/volatile
mount -t tmpfs tmpfs /var/volatile mount -t tmpfs tmpfs /var/volatile
mkdir -p $TMP/rootfs.ro $TMP/rootfs.rw mkdir -p $TMP/rootfs.ro $TMP/rootfs.rw
if ! mount -n --move $ROOT_MOUNT $TMP/rootfs.ro; then if ! mount -n --move $ROOT_MOUNT $TMP/rootfs.ro; then
rm -rf $TMP/rootfs.ro $TMP/rootfs.rw rm -rf $TMP/rootfs.ro $TMP/rootfs.rw
fatal "Could not move rootfs mount point" fatal "Could not move rootfs mount point"
...@@ -192,7 +199,7 @@ mount_and_boot() { ...@@ -192,7 +199,7 @@ mount_and_boot() {
mount -t tmpfs -o rw,noatime,mode=755 tmpfs $TMP/rootfs.rw mount -t tmpfs -o rw,noatime,mode=755 tmpfs $TMP/rootfs.rw
mkdir -p $TMP/rootfs.rw/upperdir $TMP/rootfs.rw/work mkdir -p $TMP/rootfs.rw/upperdir $TMP/rootfs.rw/work
mount -t overlay overlay -o "lowerdir=$TMP/rootfs.ro,upperdir=$TMP/rootfs.rw/upperdir,workdir=$TMP/rootfs.rw/work" $ROOT_MOUNT mount -t overlay overlay -o "lowerdir=$TMP/rootfs.ro,upperdir=$TMP/rootfs.rw/upperdir,workdir=$TMP/rootfs.rw/work" $ROOT_MOUNT
# Assuming $ROOT_MOUNT/var/volatile exists # Assuming $ROOT_MOUNT/var/volatile exists
mount --move /var/volatile $ROOT_MOUNT/var/volatile mount --move /var/volatile $ROOT_MOUNT/var/volatile
# Everything is already moved with /var/volatile # Everything is already moved with /var/volatile
...@@ -200,22 +207,22 @@ mount_and_boot() { ...@@ -200,22 +207,22 @@ mount_and_boot() {
#mount --move /rootfs.ro $ROOT_MOUNT/rootfs.ro #mount --move /rootfs.ro $ROOT_MOUNT/rootfs.ro
#mount --move /rootfs.rw $ROOT_MOUNT/rootfs.rw #mount --move /rootfs.rw $ROOT_MOUNT/rootfs.rw
fi fi
fi fi
boot_live_root boot_live_root
#commenting out old lines #commenting out old lines
# mkdir $ROOT_MOUNT # mkdir $ROOT_MOUNT
# mknod /dev/loop0 b 7 0 2>/dev/null # mknod /dev/loop0 b 7 0 2>/dev/null
# #
# if ! mount -o rw,loop,noatime,nodiratime /run/media/$ROOT_DISK/$ISOLINUX/$ROOT_IMAGE $ROOT_MOUNT ; then # if ! mount -o rw,loop,noatime,nodiratime /run/media/$ROOT_DISK/$ISOLINUX/$ROOT_IMAGE $ROOT_MOUNT ; then
# fatal "Could not mount rootfs image" # fatal "Could not mount rootfs image"
# fi # fi
# #
# if touch $ROOT_MOUNT/bin 2>/dev/null; then # if touch $ROOT_MOUNT/bin 2>/dev/null; then
# # The root image is read-write, directly boot it up. # # The root image is read-write, directly boot it up.
# boot_live_root # boot_live_root
# fi # fi
# #
# # determine which unification filesystem to use # # determine which unification filesystem to use
# union_fs_type="" # union_fs_type=""
# if grep -q -w "overlay" /proc/filesystems; then # if grep -q -w "overlay" /proc/filesystems; then
...@@ -225,7 +232,7 @@ mount_and_boot() { ...@@ -225,7 +232,7 @@ mount_and_boot() {
# else # else
# union_fs_type="" # union_fs_type=""
# fi # fi
# #
# # make a union mount if possible # # make a union mount if possible
# case $union_fs_type in # case $union_fs_type in
# "overlay") # "overlay")
...@@ -259,7 +266,7 @@ mount_and_boot() { ...@@ -259,7 +266,7 @@ mount_and_boot() {
# mount -t tmpfs -o rw,noatime,mode=755 tmpfs $ROOT_MOUNT/media # mount -t tmpfs -o rw,noatime,mode=755 tmpfs $ROOT_MOUNT/media
# ;; # ;;
# esac # esac
# #
# # boot the image # # boot the image
# boot_live_root # boot_live_root
} }
...@@ -270,7 +277,7 @@ mount_and_boot() { ...@@ -270,7 +277,7 @@ mount_and_boot() {
# else # else
# fatal "Could not find $label script" # fatal "Could not find $label script"
# fi # fi
# #
# # If we're getting here, we failed... # # If we're getting here, we failed...
# fatal "Target $label failed" # fatal "Target $label failed"
# fi # fi
......
...@@ -169,3 +169,9 @@ CONFIG_XILINX_AXI_EMAC=n ...@@ -169,3 +169,9 @@ CONFIG_XILINX_AXI_EMAC=n
# CONFIG_MACB # CONFIG_MACB
# CONFIG_NETDEVICES # CONFIG_NETDEVICES
# CONFIG_HAS_DMA # CONFIG_HAS_DMA
# it is off for zynq in rocko for some reason
#CONFIG_I2C_XILINX=y
# clock from MicroZed
# CONFIG_COMMON_CLK_SI570=n
...@@ -19,6 +19,9 @@ linux-elphel_label= "https://${ELPHELGITHOST}/Elphel/linux-elphel.git" ...@@ -19,6 +19,9 @@ linux-elphel_label= "https://${ELPHELGITHOST}/Elphel/linux-elphel.git"
linux-elphel_branch= "master" linux-elphel_branch= "master"
linux-elphel_gitdir= "${WORKDIR}/linux-elphel" linux-elphel_gitdir= "${WORKDIR}/linux-elphel"
# linux xilinx hash
SRCREV = "9c2e29b2c81dbb1efb7ee4944b18e12226b97513"
# To use the latest leave: "" - (=empty) # To use the latest leave: "" - (=empty)
linux-elphel_srcrev= "" linux-elphel_srcrev= ""
#linux-elphel_srcrev= "0ca36687a400fd9a5c4510295ae5be88aac77fa4" #linux-elphel_srcrev= "0ca36687a400fd9a5c4510295ae5be88aac77fa4"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment