kernel: Make the patches apply on top of 4.19
[openwrt/openwrt.git] / target / linux / generic / hack-4.19 / 921-always-create-console-node-in-initramfs.patch
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
6 Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 ---
8 usr/gen_initramfs_list.sh | 14 ++++++++++++++
9 1 file changed, 14 insertions(+)
10
11 --- a/usr/gen_initramfs_list.sh
12 +++ b/usr/gen_initramfs_list.sh
13 @@ -59,6 +59,18 @@ default_initramfs() {
14 EOF
15 }
16
17 +list_openwrt_initramfs() {
18 + :
19 +}
20 +
21 +openwrt_initramfs() {
22 + # make sure that /dev/console exists
23 + cat <<-EOF >> ${output}
24 + dir /dev 0755 0 0
25 + nod /dev/console 0600 0 0 c 5 1
26 + EOF
27 +}
28 +
29 filetype() {
30 local argv1="$1"
31
32 @@ -180,6 +192,8 @@ dir_filelist() {
33 if [ "$(echo "${dirlist}" | wc -l)" -gt 1 ]; then
34 ${dep_list}print_mtime "$1"
35
36 + ${dep_list}openwrt_initramfs
37 +
38 echo "${dirlist}" | \
39 while read x; do
40 ${dep_list}parse ${x}