Hi everyone
I'm trying to create a very basic system for a raspberry pi zero 2 w.
I've compiled the kernel, removed a lot of unnecessary drivers
and features and now it's about 20MB.
For now, i want to obtain a serial port only system, with no root device (just the / of the initramfs)
I'm dealing with the init system.
I've compiled a customized version of busybox, and put it in an initramfs compressed image.
The kernel boots and reaches the "Run /init as init process", but after that i cannot see anything more.
The /init script is:
..That should just pop out a shell, but i can't see any shell on the serial port, just the kernel output.
I'm suspecting the kernel uses the serial i passed in the kernel command line, but the init system, for some reason, opens another console.
The command line:
How can i disable all the other consoles and use just the serial one?
I'm using this guide
And the file tree of initramfs is:
/
├── bin
│ ├── busybox
│ └── <all the links to busybox>
├── dev
│ ├── console (char device)
│ ├── null
│ ├── root
│ └── tty
├── etc
├── lib
├── lib64
├── mnt
│ └── root
├── proc
├── root
├── sbin
│ └── <all the sbin links to /bin/busybox>
├── sys
└── usr
├── bin
│ └── <all the bin links to /bin/busybox>
└── sbin
└── <all the sbin links to /bin/busybox>
I'm trying to create a very basic system for a raspberry pi zero 2 w.
I've compiled the kernel, removed a lot of unnecessary drivers
and features and now it's about 20MB.
For now, i want to obtain a serial port only system, with no root device (just the / of the initramfs)
I'm dealing with the init system.
I've compiled a customized version of busybox, and put it in an initramfs compressed image.
The kernel boots and reaches the "Run /init as init process", but after that i cannot see anything more.
The /init script is:
Code:
#!/bin/sh
mount -t proc proc /proc
mount -t sysfs sysfs /sys
mount -t devtmpfs devtmpfs /dev
exec /bin/sh
exit 0
..That should just pop out a shell, but i can't see any shell on the serial port, just the kernel output.
I'm suspecting the kernel uses the serial i passed in the kernel command line, but the init system, for some reason, opens another console.
The command line:
Code:
console=ttyAMA0,115200 console=tty1 root=/dev/ram0 vga=0
I'm using this guide
And the file tree of initramfs is:
/
├── bin
│ ├── busybox
│ └── <all the links to busybox>
├── dev
│ ├── console (char device)
│ ├── null
│ ├── root
│ └── tty
├── etc
├── lib
├── lib64
├── mnt
│ └── root
├── proc
├── root
├── sbin
│ └── <all the sbin links to /bin/busybox>
├── sys
└── usr
├── bin
│ └── <all the bin links to /bin/busybox>
└── sbin
└── <all the sbin links to /bin/busybox>