| // SPDX-License-Identifier: GPL-2.0-only |
| * Copyright (C) 2006, NXP Semiconductors, All Rights Reserved |
| * Author: Jean-Paul Saman <jean-paul.saman@nxp.com> |
| #include <linux/kdev_t.h> |
| #include <linux/syscalls.h> |
| * Create a simple rootfs that is similar to the default initramfs |
| static int __init default_rootfs(void) |
| err = ksys_mkdir((const char __user __force *) "/dev", 0755); |
| err = ksys_mknod((const char __user __force *) "/dev/console", |
| S_IFCHR | S_IRUSR | S_IWUSR, |
| new_encode_dev(MKDEV(5, 1))); |
| err = ksys_mkdir((const char __user __force *) "/root", 0700); |
| printk(KERN_WARNING "Failed to create a rootfs\n"); |
| rootfs_initcall(default_rootfs); |