new file mode 100644
@@ -0,0 +1,27 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * This is <linux/capability.h>
+ *
+ * Andrew G. Morgan <morgan@kernel.org>
+ * Alexander Kjeldaas <astor@guardian.no>
+ * with help from Aleph1, Roland Buresund and Andrew Main.
+ *
+ * Stub definitions for Linux kernel capabilities.
+ * U-Boot doesn't implement capability checks.
+ */
+#ifndef _LINUX_CAPABILITY_H
+#define _LINUX_CAPABILITY_H
+
+#define CAP_SYS_RESOURCE 24
+
+static inline bool capable(int cap)
+{
+ return true;
+}
+
+static inline bool ns_capable(void *ns, int cap)
+{
+ return true;
+}
+
+#endif /* _LINUX_CAPABILITY_H */
new file mode 100644
@@ -0,0 +1,53 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+/* Credentials management - see Documentation/security/credentials.rst
+ *
+ * Copyright (C) 2008 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ */
+#ifndef _LINUX_CRED_H
+#define _LINUX_CRED_H
+
+#include <linux/types.h>
+
+/*
+ * Stub definitions for Linux kernel credentials.
+ * U-Boot doesn't implement user credentials.
+ */
+
+typedef struct {
+ uid_t val;
+} kuid_t;
+
+typedef struct {
+ gid_t val;
+} kgid_t;
+
+struct cred {
+ kuid_t uid;
+ kgid_t gid;
+ kuid_t fsuid;
+ kgid_t fsgid;
+};
+
+#define current_cred() NULL
+#define current_uid() ((kuid_t){0})
+#define current_gid() ((kgid_t){0})
+#define current_fsuid() ((kuid_t){0})
+#define current_fsgid() ((kgid_t){0})
+
+#define from_kuid(ns, uid) ((uid).val)
+#define from_kgid(ns, gid) ((gid).val)
+#define make_kuid(ns, uid) ((kuid_t){uid})
+#define make_kgid(ns, gid) ((kgid_t){gid})
+
+#define uid_eq(a, b) ((a).val == (b).val)
+#define gid_eq(a, b) ((a).val == (b).val)
+#define uid_valid(uid) ((uid).val != (uid_t)-1)
+#define gid_valid(gid) ((gid).val != (gid_t)-1)
+
+#define GLOBAL_ROOT_UID ((kuid_t){0})
+#define GLOBAL_ROOT_GID ((kgid_t){0})
+#define INVALID_UID ((kuid_t){-1})
+#define INVALID_GID ((kgid_t){-1})
+
+#endif /* _LINUX_CRED_H */
new file mode 100644
@@ -0,0 +1,29 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * Wrapper functions for accessing the file_struct fd array.
+ */
+#ifndef _LINUX_FILE_H
+#define _LINUX_FILE_H
+
+/*
+ * Stub definitions for Linux kernel file handling.
+ */
+
+struct file;
+struct fd {
+ struct file *file;
+ unsigned int flags;
+};
+
+#define EMPTY_FD ((struct fd){ NULL, 0 })
+
+static inline struct fd fdget(unsigned int fd)
+{
+ return EMPTY_FD;
+}
+
+static inline void fdput(struct fd fd)
+{
+}
+
+#endif /* _LINUX_FILE_H */
new file mode 100644
@@ -0,0 +1,13 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+#ifndef _LINUX_PATH_H
+#define _LINUX_PATH_H
+
+struct dentry;
+struct vfsmount;
+
+struct path {
+ struct vfsmount *mnt;
+ struct dentry *dentry;
+};
+
+#endif /* _LINUX_PATH_H */
new file mode 100644
@@ -0,0 +1,39 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * Linux Security plug
+ *
+ * Copyright (C) 2001 WireX Communications, Inc <chris@wirex.com>
+ * Copyright (C) 2001 Greg Kroah-Hartman <greg@kroah.com>
+ * Copyright (C) 2001 Networks Associates Technology, Inc <ssmalley@nai.com>
+ * Copyright (C) 2001 James Morris <jmorris@intercode.com.au>
+ * Copyright (C) 2001 Silicon Graphics, Inc. (Trust Technology Group)
+ * Copyright (C) 2016 Mellanox Techonologies
+ *
+ * Stub definitions for Linux Security Module (LSM) hooks.
+ * U-Boot doesn't implement security modules.
+ */
+#ifndef _LINUX_SECURITY_H
+#define _LINUX_SECURITY_H
+
+struct inode;
+struct dentry;
+
+static inline int security_inode_init_security(struct inode *inode,
+ struct inode *dir,
+ void *name, void *value,
+ void *len)
+{
+ return -EOPNOTSUPP;
+}
+
+#define security_inode_create(dir, dentry, mode) 0
+#define security_inode_link(old, dir, new) 0
+#define security_inode_unlink(dir, dentry) 0
+#define security_inode_symlink(dir, dentry, name) 0
+#define security_inode_mkdir(dir, dentry, mode) 0
+#define security_inode_rmdir(dir, dentry) 0
+#define security_inode_mknod(dir, dentry, mode, dev) 0
+#define security_inode_rename(od, odent, nd, ndent, f) 0
+#define security_inode_setattr(dentry, attr) 0
+
+#endif /* _LINUX_SECURITY_H */
new file mode 100644
@@ -0,0 +1,18 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+#ifndef _LINUX_SEQ_FILE_H
+#define _LINUX_SEQ_FILE_H
+
+/*
+ * Stub definitions for seq_file interface.
+ * U-Boot doesn't use /proc filesystem.
+ */
+
+struct seq_file {
+ void *private;
+};
+
+#define seq_printf(m, fmt, ...) do { } while (0)
+#define seq_puts(m, s) do { } while (0)
+#define seq_putc(m, c) do { } while (0)
+
+#endif /* _LINUX_SEQ_FILE_H */