I searched some related information online and found a solution to the problem. The reason is: the compiler used to compile the Kernel and busybox is arm-linux-gc 1. Kernel panic-not syncing: Attempted to kill init!
I searched some related information online and found a solution to the problem. The reason is: the compiler used to compile the kernel and busybox is arm-linux-gcc 4.3.2, and this compiler enables the "EABI option" by default, so that the compiled busybox is EABI. However, during kernel compilation, the "EABI option" is disabled by default. Therefore, busybox and kernel cannot work properly together. Enable the "EABI option" and recompile the kernel.
Kernel Features --->
[*] Use the arm EABI to compile the kernel
[*] Allow old ABI binaries to run with this kernel (EXPERIMENTAL) (NEW)
2. the following message is displayed at startup: cannot run'/etc/init. d/Rs': Permission denied.
RAMDISK: gzip image found at block 0
VFS: Mounted root (ext2 filesystem) on device 1:0.
Freeing init memory: 120 K
Cannot run '/etc/init. d/Rs': Permission denied
(None) login:
--- The rcS must have the execution permission. after chmod 777 is used, it will be fine.
3. the system prompts you to enter the logon user and password at startup: (none) login:
RAMDISK: gzip image found at block 0
VFS: Mounted root (ext2 filesystem) on device 1:0.
Freeing init memory: 120 K
(None) login:
----- Login authentication is required. I will remove the: respawn:-/bin/sh in the inittab and then I will not have it.
4. you cannot run the file because the shell script contains invalid characters (not visible to the naked eye, but not spaces)
RAMDISK: gzip image found at block 0
VFS: Mounted root (ext2 filesystem) on device 1:0.
Freeing init memory: 120 K
Cannot run '/etc/init. d/Rs': No such file or directory
-------- The rcS is a shell script file. I copied it from the internet, so there may be extra illegal characters at the end of the line. after manual input, I started to execute the content of the rcS file.
5. The shell cannot be entered, and it is in the dead state.
: Askfirst:/bin/sh
I can add this sentence to the inittab.
6. two files cannot be found:
Mount: mounting tmpfs on/dev/shm failed: No such file or directory
Mount: mounting devpts on/dev/pts failed: No such file or directory
We didn't create these two directories when creating the directory structure of the file system. just re-create them.
7. the following message is displayed:/bin/sh: can't access tty; job control turned off.
Please press Enter to activate this console.
/Bin/sh: can't access tty; job control turned off
In fact, as long as this-indicates that the shell is a login shell. The id field of busybox inittab is used to identify tty. if it is not explicitly specified, tty1 is the console.
Change: askfirst:/bin/sh to: askfirst:-/bin/sh.
Let's take a look at the examples in the examples directory of busybox.
8. the startup information shows that the profile file is not executed.
: After "-" is added to askfirst:/bin/sh, the problem of not executing the profile file is also solved.
9. when setenv is set in busybox, the semicolon ";" is entered, and the subsequent content cannot be set in the environment variable.
Solution: add the backslash "\" before the semicolon "\"!
It's a useful trick.