1
0

921-always-create-console-node-in-initramfs.patch 904 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. From 5d301596fdc72f6cb672f72eb3c66e7cddefb103 Mon Sep 17 00:00:00 2001
  2. From: Felix Fietkau <nbd@nbd.name>
  3. Date: Sat, 8 Jul 2017 08:26:02 +0200
  4. Subject: initramfs: always create console node
  5. Signed-off-by: Felix Fietkau <nbd@nbd.name>
  6. ---
  7. scripts/gen_initramfs_list.sh | 14 ++++++++++++++
  8. 1 file changed, 14 insertions(+)
  9. --- a/scripts/gen_initramfs_list.sh
  10. +++ b/scripts/gen_initramfs_list.sh
  11. @@ -59,6 +59,18 @@ default_initramfs() {
  12. EOF
  13. }
  14. +list_openwrt_initramfs() {
  15. + :
  16. +}
  17. +
  18. +openwrt_initramfs() {
  19. + # make sure that /dev/console exists
  20. + cat <<-EOF >> ${output}
  21. + dir /dev 0755 0 0
  22. + nod /dev/console 0600 0 0 c 5 1
  23. + EOF
  24. +}
  25. +
  26. filetype() {
  27. local argv1="$1"
  28. @@ -180,6 +192,8 @@ dir_filelist() {
  29. if [ "$(echo "${dirlist}" | wc -l)" -gt 1 ]; then
  30. ${dep_list}print_mtime "$1"
  31. + ${dep_list}openwrt_initramfs
  32. +
  33. echo "${dirlist}" | \
  34. while read x; do
  35. ${dep_list}parse ${x}