feat: introduce mksh toybox to rootfs

Change-Id: I0a6e6f2962ca6904c858898eb93a5b2f93e85b69
This commit is contained in:
Guangyao Ma
2021-04-09 16:53:10 +08:00
committed by YOUR_NAME
parent 34f35524aa
commit 41c7689dfa
12 changed files with 283 additions and 37 deletions

View File

@@ -49,7 +49,7 @@
int main(int argc, char * const *argv)
{
int ret;
const char *shellPath = "/bin/shell";
const char *shellPath = "/bin/mksh";
#ifdef LOSCFG_QUICK_START
const char *samplePath = "/dev/shm/sample_quickstart";
@@ -74,6 +74,11 @@ int main(int argc, char * const *argv)
if (ret < 0) {
printf("Failed to fork for shell\n");
} else if (ret == 0) {
ret = tcsetpgrp(STDIN_FILENO, getpgrp());
if (ret != 0) {
printf("tcsetpgrp failed, pgrpid %d, errno %d\n", getpgrp(), errno);
exit(0);
}
(void)execve(shellPath, NULL, NULL);
exit(0);
}