├── .gitattributes ├── .github └── workflows │ ├── master-edk2.yml │ └── master.yml ├── .gitignore ├── .gitmodules ├── CMakeLists.txt ├── LICENSE ├── README.md ├── SimpleInit.dec ├── SimpleInit.dsc ├── SimpleInit.inc ├── docs ├── en │ ├── build │ │ ├── linux-native.md │ │ ├── linux.md │ │ └── uefi.md │ ├── config │ │ ├── boot.configs.extra.efi.md │ │ ├── boot.configs.extra.linux.md │ │ ├── boot.configs.extra.md │ │ ├── boot.configs.extra.reboot.md │ │ ├── boot.configs.extra.switchroot.md │ │ ├── boot.configs.extra.uefi_option.md │ │ ├── boot.configs.md │ │ ├── boot.md │ │ ├── index.md │ │ ├── locates.md │ │ ├── logger.md │ │ └── uefi.md │ └── index.md ├── index.md └── zh │ ├── build │ ├── linux-native.md │ ├── linux.md │ └── uefi.md │ ├── config │ ├── boot.configs.extra.efi.md │ ├── boot.configs.extra.linux.md │ ├── boot.configs.extra.md │ ├── boot.configs.extra.reboot.md │ ├── boot.configs.extra.switchroot.md │ ├── boot.configs.extra.uefi_option.md │ ├── boot.configs.md │ ├── boot.md │ ├── index.md │ ├── locates.md │ ├── logger.md │ └── uefi.md │ ├── examples │ ├── logger.md │ ├── msgbox.md │ └── simple-guiapp.md │ ├── index.md │ └── res │ ├── img1.jpg │ ├── img2.jpg │ └── img3.jpg ├── include ├── KernelFdt.h ├── aboot.h ├── adbd.h ├── array.h ├── assets.h ├── bcd.h ├── boot.h ├── chipinfo.h ├── cmdline.h ├── compress.h ├── confd.h ├── ddrgetconfig.h ├── defines.h ├── devd.h ├── enum_conv.h ├── fdtparser.h ├── filesystem.h ├── frame_protocol.h ├── fsdrv.h ├── gadget.h ├── getopt.h ├── gui.h ├── gui │ ├── activity.h │ ├── clipboard.h │ ├── console.h │ ├── fileopen.h │ ├── filepicker.h │ ├── filetab.h │ ├── fileview.h │ ├── font.h │ ├── guidrv.h │ ├── icon_theme.h │ ├── image.h │ ├── inputbox.h │ ├── lua.h │ ├── msgbox.h │ ├── snackbar.h │ ├── splash.h │ ├── string.h │ ├── sysbar.h │ ├── termview.h │ ├── tools.h │ └── xmlrender.h ├── hardware.h ├── http.h ├── init.h ├── init_internal.h ├── keyval.h ├── kloglevel.h ├── language.h ├── linux_boot.h ├── list.h ├── locate.h ├── lock.h ├── logger.h ├── logtag.h ├── lv_conf.h ├── output.h ├── param.h ├── pathnames.h ├── platforminfo.h ├── pool.h ├── proctitle.h ├── rampartition.h ├── recovery.h ├── service.h ├── service_scheduler.h ├── shell.h ├── str.h ├── system.h ├── ttyd.h ├── uefi.h ├── uevent.h ├── url.h ├── version.h └── xlua.h ├── libs ├── FreeType.inf ├── LittleVgl.inf ├── compatible │ ├── SimpleInitCompatible.inf │ ├── __expo2.c │ ├── __rem_pio2.c │ ├── __rem_pio2_large.c │ ├── __rem_pio2f.c │ ├── __strerror.h │ ├── aarch64 │ │ └── lse.S │ ├── abs.c │ ├── acos.c │ ├── asin.c │ ├── atan.c │ ├── big5.h │ ├── ceil.c │ ├── codepages.h │ ├── cos.c │ ├── ctype.c │ ├── dmisc.c │ ├── dtoa.c │ ├── errno.c │ ├── exit.c │ ├── exp.c │ ├── exp_data.c │ ├── expm1.c │ ├── extern.h │ ├── fabs.c │ ├── fflush.c │ ├── fileext.h │ ├── findfp.c │ ├── floatio.h │ ├── floor.c │ ├── fmod.c │ ├── fread.c │ ├── frexp.c │ ├── fvwrite.c │ ├── fvwrite.h │ ├── gb18030.h │ ├── gdtoa.c │ ├── gdtoa.h │ ├── gdtoaimp.h │ ├── gmisc.c │ ├── hd_init.c │ ├── hkscs.h │ ├── iconv.c │ ├── include │ │ ├── arch │ │ │ ├── aarch64 │ │ │ │ ├── bits │ │ │ │ │ ├── alltypes.h │ │ │ │ │ ├── fcntl.h │ │ │ │ │ ├── fenv.h │ │ │ │ │ ├── float.h │ │ │ │ │ ├── hwcap.h │ │ │ │ │ ├── posix.h │ │ │ │ │ ├── reg.h │ │ │ │ │ ├── setjmp.h │ │ │ │ │ ├── signal.h │ │ │ │ │ ├── stat.h │ │ │ │ │ ├── stdint.h │ │ │ │ │ └── user.h │ │ │ │ ├── fp_arch.h │ │ │ │ ├── gd_qnan.h │ │ │ │ └── reloc.h │ │ │ ├── arm │ │ │ │ ├── bits │ │ │ │ │ ├── alltypes.h │ │ │ │ │ ├── fcntl.h │ │ │ │ │ ├── fenv.h │ │ │ │ │ ├── float.h │ │ │ │ │ ├── hwcap.h │ │ │ │ │ ├── msg.h │ │ │ │ │ ├── posix.h │ │ │ │ │ ├── reg.h │ │ │ │ │ ├── setjmp.h │ │ │ │ │ ├── signal.h │ │ │ │ │ ├── stat.h │ │ │ │ │ ├── stdint.h │ │ │ │ │ └── user.h │ │ │ │ ├── gd_qnan.h │ │ │ │ └── reloc.h │ │ │ ├── generic │ │ │ │ ├── bits │ │ │ │ │ ├── dirent.h │ │ │ │ │ ├── errno.h │ │ │ │ │ ├── fcntl.h │ │ │ │ │ ├── fenv.h │ │ │ │ │ ├── kd.h │ │ │ │ │ ├── limits.h │ │ │ │ │ ├── link.h │ │ │ │ │ ├── msg.h │ │ │ │ │ ├── poll.h │ │ │ │ │ └── statfs.h │ │ │ │ └── fp_arch.h │ │ │ ├── i386 │ │ │ │ ├── bits │ │ │ │ │ ├── alltypes.h │ │ │ │ │ ├── fenv.h │ │ │ │ │ ├── float.h │ │ │ │ │ ├── io.h │ │ │ │ │ ├── limits.h │ │ │ │ │ ├── msg.h │ │ │ │ │ ├── posix.h │ │ │ │ │ ├── reg.h │ │ │ │ │ ├── setjmp.h │ │ │ │ │ ├── signal.h │ │ │ │ │ ├── stat.h │ │ │ │ │ ├── stdint.h │ │ │ │ │ └── user.h │ │ │ │ ├── gd_qnan.h │ │ │ │ └── reloc.h │ │ │ └── x86_64 │ │ │ │ ├── bits │ │ │ │ ├── alltypes.h │ │ │ │ ├── fenv.h │ │ │ │ ├── float.h │ │ │ │ ├── io.h │ │ │ │ ├── limits.h │ │ │ │ ├── posix.h │ │ │ │ ├── reg.h │ │ │ │ ├── setjmp.h │ │ │ │ ├── signal.h │ │ │ │ ├── stat.h │ │ │ │ ├── stdint.h │ │ │ │ └── user.h │ │ │ │ ├── gd_qnan.h │ │ │ │ └── reloc.h │ │ ├── assert.h │ │ ├── byteswap.h │ │ ├── comp_fdt.h │ │ ├── comp_libfdt.h │ │ ├── comp_libfdt_env.h │ │ ├── compatible.h │ │ ├── ctype.h │ │ ├── dirent.h │ │ ├── endian.h │ │ ├── errno.h │ │ ├── fcntl.h │ │ ├── float.h │ │ ├── iconv.h │ │ ├── inttypes.h │ │ ├── limits.h │ │ ├── locale.h │ │ ├── math.h │ │ ├── setjmp.h │ │ ├── signal.h │ │ ├── stdarg.h │ │ ├── stdbool.h │ │ ├── stddef.h │ │ ├── stdint.h │ │ ├── stdio.h │ │ ├── stdlib.h │ │ ├── string.h │ │ ├── strings.h │ │ ├── sys │ │ │ ├── localedef.h │ │ │ ├── socket.h │ │ │ ├── stat.h │ │ │ ├── string.h │ │ │ ├── time.h │ │ │ └── types.h │ │ ├── time.h │ │ ├── unistd.h │ │ └── wchar.h │ ├── jis0208.h │ ├── ksc.h │ ├── ldexp.c │ ├── legacychars.h │ ├── local.h │ ├── localeconv.c │ ├── log.c │ ├── log10.c │ ├── log2.c │ ├── log2_data.c │ ├── log_data.c │ ├── makebuf.c │ ├── malloc.c │ ├── mb.c │ ├── mb.h │ ├── mbrtowc.c │ ├── mbtowc.c │ ├── mem.c │ ├── misc.c │ ├── modf.c │ ├── namespace.h │ ├── number.c │ ├── pow.c │ ├── pow_data.c │ ├── qsort.c │ ├── rand.c │ ├── reentrant.h │ ├── refill.c │ ├── revjis.h │ ├── scalbn.c │ ├── sin.c │ ├── smisc.c │ ├── snprintf.c │ ├── sprintf.c │ ├── sqrt.c │ ├── sscanf.c │ ├── str.c │ ├── strcspn.c │ ├── strerror.c │ ├── strftime.c │ ├── strtod.c │ ├── strtodg.c │ ├── strtof.c │ ├── strtoimax.c │ ├── strtold_subr.c │ ├── strtopx.c │ ├── strtoumax.c │ ├── stub.c │ ├── sum.c │ ├── tan.c │ ├── time.c │ ├── timevals.h │ ├── tzfile.h │ ├── ulp.c │ ├── ungetc.c │ ├── vasprintf.c │ ├── vfprintf.c │ ├── vfscanf.c │ ├── vsnprintf.c │ ├── wcio.h │ ├── wcrtomb.c │ ├── wctomb.c │ ├── wsetup.c │ └── zone.c ├── freetype-uefi │ ├── ftconfig.h │ └── ftoption.h ├── freetype.cmake ├── hivex │ ├── HivexLib.inf │ ├── LICENSE │ ├── README │ ├── hivex.cmake │ ├── include │ │ └── hivex.h │ └── lib │ │ ├── byte_conversions.h │ │ ├── handle.c │ │ ├── hivex-internal.h │ │ ├── node.c │ │ ├── offset-list.c │ │ ├── utf16.c │ │ ├── util.c │ │ ├── value.c │ │ ├── visit.c │ │ └── write.c ├── json-c │ ├── AUTHORS │ ├── COPYING │ ├── JSONC.inf │ ├── arraylist.c │ ├── arraylist.h │ ├── cmake │ │ ├── config.h.in │ │ └── json_config.h.in │ ├── debug.c │ ├── debug.h │ ├── json-c-uefi │ │ ├── config.h │ │ ├── json_config.h │ │ └── random_seed.c │ ├── json-c.cmake │ ├── json-c.sym │ ├── json.h │ ├── json_c_version.c │ ├── json_c_version.h │ ├── json_config.h.in │ ├── json_inttypes.h │ ├── json_object.c │ ├── json_object.h │ ├── json_object_iterator.c │ ├── json_object_iterator.h │ ├── json_object_private.h │ ├── json_pointer.c │ ├── json_pointer.h │ ├── json_tokener.c │ ├── json_tokener.h │ ├── json_types.h │ ├── json_util.c │ ├── json_util.h │ ├── json_visit.c │ ├── json_visit.h │ ├── libjson.c │ ├── linkhash.c │ ├── linkhash.h │ ├── math_compat.h │ ├── printbuf.c │ ├── printbuf.h │ ├── random_seed.c │ ├── random_seed.h │ ├── snprintf_compat.h │ ├── strdup_compat.h │ ├── strerror_override.c │ ├── strerror_override.h │ ├── strerror_override_private.h │ └── vasprintf_compat.h ├── libkmod │ ├── COPYING │ ├── README │ ├── hash.c │ ├── include │ │ ├── hash.h │ │ ├── libkmod-index.h │ │ ├── libkmod-internal.h │ │ ├── macro.h │ │ ├── strbuf.h │ │ └── util.h │ ├── libkmod-builtin.c │ ├── libkmod-config.c │ ├── libkmod-elf.c │ ├── libkmod-file.c │ ├── libkmod-index.c │ ├── libkmod-list.c │ ├── libkmod-module.c │ ├── libkmod-signature.c │ ├── libkmod.c │ ├── libkmod.cmake │ ├── libkmod.h │ ├── strbuf.c │ └── util.c ├── libmd │ ├── COPYING │ ├── include │ │ ├── md2.h │ │ ├── md4.h │ │ ├── md5.h │ │ ├── ripemd.h │ │ ├── rmd160.h │ │ ├── sha.h │ │ ├── sha1.h │ │ ├── sha2.h │ │ ├── sha256.h │ │ └── sha512.h │ ├── libmd.cmake │ └── src │ │ ├── helper.c │ │ ├── local-link.h │ │ ├── md2.c │ │ ├── md4.c │ │ ├── md5.c │ │ ├── rmd160.c │ │ ├── sha1.c │ │ └── sha2.c ├── libtsm │ ├── COPYING │ ├── LICENSE_htable │ ├── TSMLib.inf │ ├── external │ │ ├── CMakeLists.txt │ │ ├── wcwidth │ │ │ ├── .gitignore │ │ │ ├── .travis.yml │ │ │ ├── LICENSE.txt │ │ │ ├── test_wcwidth.c │ │ │ ├── wcwidth.c │ │ │ └── wcwidth.h │ │ └── xkbcommon │ │ │ └── xkbcommon-keysyms.h │ ├── libtsm.cmake │ └── src │ │ ├── config.h.in │ │ ├── shared │ │ ├── shl-array.h │ │ ├── shl-htable.c │ │ ├── shl-htable.h │ │ ├── shl-llog.h │ │ ├── shl-macro.h │ │ ├── shl-pty.c │ │ ├── shl-pty.h │ │ ├── shl-ring.c │ │ └── shl-ring.h │ │ └── tsm │ │ ├── libtsm-int.h │ │ ├── libtsm.h │ │ ├── tsm-render.c │ │ ├── tsm-screen.c │ │ ├── tsm-selection.c │ │ ├── tsm-unicode.c │ │ ├── tsm-vte-charsets.c │ │ └── tsm-vte.c ├── libufdt │ ├── NOTICE │ ├── OWNERS │ ├── UfdtLib.inf │ ├── include │ │ ├── libufdt.h │ │ ├── ufdt_node_pool.h │ │ ├── ufdt_overlay.h │ │ ├── ufdt_overlay_internal.h │ │ └── ufdt_types.h │ ├── libufdt.cmake │ ├── sysdeps │ │ ├── include │ │ │ └── libufdt_sysdeps.h │ │ ├── libufdt_sysdeps_posix.c │ │ └── libufdt_sysdeps_vendor.c │ ├── ufdt_convert.c │ ├── ufdt_node.c │ ├── ufdt_node_pool.c │ ├── ufdt_overlay.c │ ├── ufdt_prop_dict.c │ └── ufdt_prop_dict.h ├── libzip │ ├── AUTHORS │ ├── CMakeLists.txt │ ├── LICENSE │ ├── THANKS │ ├── ZipLib.inf │ ├── cmake-compat │ │ ├── CMakePushCheckState.cmake │ │ ├── CheckLibraryExists.cmake │ │ ├── CheckSymbolExists.cmake │ │ ├── FindBZip2.cmake │ │ ├── FindGnuTLS.cmake │ │ ├── FindLibLZMA.cmake │ │ ├── FindPackageHandleStandardArgs.cmake │ │ ├── FindPackageMessage.cmake │ │ └── SelectLibraryConfigurations.cmake │ ├── cmake-config.h.in │ ├── cmake-zipconf.h.in │ ├── cmake │ │ ├── FindMbedTLS.cmake │ │ ├── FindNettle.cmake │ │ └── FindZstd.cmake │ ├── lib │ │ ├── CMakeLists.txt │ │ ├── compat.h │ │ ├── zip.h │ │ ├── zip_add.c │ │ ├── zip_add_dir.c │ │ ├── zip_add_entry.c │ │ ├── zip_algorithm_bzip2.c │ │ ├── zip_algorithm_deflate.c │ │ ├── zip_algorithm_xz.c │ │ ├── zip_algorithm_zstd.c │ │ ├── zip_buffer.c │ │ ├── zip_close.c │ │ ├── zip_crypto.h │ │ ├── zip_crypto_commoncrypto.c │ │ ├── zip_crypto_commoncrypto.h │ │ ├── zip_crypto_gnutls.c │ │ ├── zip_crypto_gnutls.h │ │ ├── zip_crypto_mbedtls.c │ │ ├── zip_crypto_mbedtls.h │ │ ├── zip_crypto_openssl.c │ │ ├── zip_crypto_openssl.h │ │ ├── zip_crypto_win.c │ │ ├── zip_crypto_win.h │ │ ├── zip_delete.c │ │ ├── zip_dir_add.c │ │ ├── zip_dirent.c │ │ ├── zip_discard.c │ │ ├── zip_entry.c │ │ ├── zip_error.c │ │ ├── zip_error_clear.c │ │ ├── zip_error_get.c │ │ ├── zip_error_get_sys_type.c │ │ ├── zip_error_strerror.c │ │ ├── zip_error_to_str.c │ │ ├── zip_extra_field.c │ │ ├── zip_extra_field_api.c │ │ ├── zip_fclose.c │ │ ├── zip_fdopen.c │ │ ├── zip_file_add.c │ │ ├── zip_file_error_clear.c │ │ ├── zip_file_error_get.c │ │ ├── zip_file_get_comment.c │ │ ├── zip_file_get_external_attributes.c │ │ ├── zip_file_get_offset.c │ │ ├── zip_file_rename.c │ │ ├── zip_file_replace.c │ │ ├── zip_file_set_comment.c │ │ ├── zip_file_set_encryption.c │ │ ├── zip_file_set_external_attributes.c │ │ ├── zip_file_set_mtime.c │ │ ├── zip_file_strerror.c │ │ ├── zip_fopen.c │ │ ├── zip_fopen_encrypted.c │ │ ├── zip_fopen_index.c │ │ ├── zip_fopen_index_encrypted.c │ │ ├── zip_fread.c │ │ ├── zip_fseek.c │ │ ├── zip_ftell.c │ │ ├── zip_get_archive_comment.c │ │ ├── zip_get_archive_flag.c │ │ ├── zip_get_encryption_implementation.c │ │ ├── zip_get_file_comment.c │ │ ├── zip_get_name.c │ │ ├── zip_get_num_entries.c │ │ ├── zip_get_num_files.c │ │ ├── zip_hash.c │ │ ├── zip_io_util.c │ │ ├── zip_libzip_version.c │ │ ├── zip_memdup.c │ │ ├── zip_name_locate.c │ │ ├── zip_new.c │ │ ├── zip_open.c │ │ ├── zip_pkware.c │ │ ├── zip_progress.c │ │ ├── zip_random_uefi.c │ │ ├── zip_random_unix.c │ │ ├── zip_rename.c │ │ ├── zip_replace.c │ │ ├── zip_set_archive_comment.c │ │ ├── zip_set_archive_flag.c │ │ ├── zip_set_default_password.c │ │ ├── zip_set_file_comment.c │ │ ├── zip_set_file_compression.c │ │ ├── zip_set_name.c │ │ ├── zip_source_accept_empty.c │ │ ├── zip_source_begin_write.c │ │ ├── zip_source_begin_write_cloning.c │ │ ├── zip_source_buffer.c │ │ ├── zip_source_call.c │ │ ├── zip_source_close.c │ │ ├── zip_source_commit_write.c │ │ ├── zip_source_compress.c │ │ ├── zip_source_crc.c │ │ ├── zip_source_error.c │ │ ├── zip_source_file.h │ │ ├── zip_source_file_common.c │ │ ├── zip_source_file_stdio.c │ │ ├── zip_source_file_stdio.h │ │ ├── zip_source_file_stdio_named.c │ │ ├── zip_source_free.c │ │ ├── zip_source_function.c │ │ ├── zip_source_get_file_attributes.c │ │ ├── zip_source_is_deleted.c │ │ ├── zip_source_layered.c │ │ ├── zip_source_open.c │ │ ├── zip_source_pkware_decode.c │ │ ├── zip_source_pkware_encode.c │ │ ├── zip_source_read.c │ │ ├── zip_source_remove.c │ │ ├── zip_source_rollback_write.c │ │ ├── zip_source_seek.c │ │ ├── zip_source_seek_write.c │ │ ├── zip_source_stat.c │ │ ├── zip_source_supports.c │ │ ├── zip_source_tell.c │ │ ├── zip_source_tell_write.c │ │ ├── zip_source_window.c │ │ ├── zip_source_winzip_aes_decode.c │ │ ├── zip_source_winzip_aes_encode.c │ │ ├── zip_source_write.c │ │ ├── zip_source_zip.c │ │ ├── zip_source_zip_new.c │ │ ├── zip_stat.c │ │ ├── zip_stat_index.c │ │ ├── zip_stat_init.c │ │ ├── zip_strerror.c │ │ ├── zip_string.c │ │ ├── zip_unchange.c │ │ ├── zip_unchange_all.c │ │ ├── zip_unchange_archive.c │ │ ├── zip_unchange_data.c │ │ ├── zip_utf-8.c │ │ ├── zip_winzip_aes.c │ │ └── zipint.h │ ├── libzip-config.cmake.in │ ├── src │ │ ├── CMakeLists.txt │ │ ├── diff_output.c │ │ ├── diff_output.h │ │ ├── zipcmp.c │ │ ├── zipmerge.c │ │ └── ziptool.c │ └── uefi │ │ ├── config.h │ │ ├── zip_err_str.c │ │ └── zipconf.h ├── lodepng │ ├── LodePNG.inf │ ├── lodepng.c │ ├── lodepng.cmake │ └── lodepng.h ├── lua │ ├── LuaLib.inf │ ├── lapi.c │ ├── lapi.h │ ├── lauxlib.c │ ├── lauxlib.h │ ├── lbaselib.c │ ├── lcode.c │ ├── lcode.h │ ├── lcorolib.c │ ├── lctype.c │ ├── lctype.h │ ├── ldblib.c │ ├── ldebug.c │ ├── ldebug.h │ ├── ldo.c │ ├── ldo.h │ ├── ldump.c │ ├── lfunc.c │ ├── lfunc.h │ ├── lgc.c │ ├── lgc.h │ ├── linit.c │ ├── liolib.c │ ├── ljumptab.h │ ├── llex.c │ ├── llex.h │ ├── llimits.h │ ├── lmathlib.c │ ├── lmem.c │ ├── lmem.h │ ├── loadlib.c │ ├── lobject.c │ ├── lobject.h │ ├── lopcodes.c │ ├── lopcodes.h │ ├── lopnames.h │ ├── loslib.c │ ├── lparser.c │ ├── lparser.h │ ├── lprefix.h │ ├── lstate.c │ ├── lstate.h │ ├── lstring.c │ ├── lstring.h │ ├── lstrlib.c │ ├── ltable.c │ ├── ltable.h │ ├── ltablib.c │ ├── ltests.c │ ├── ltests.h │ ├── ltm.c │ ├── ltm.h │ ├── lua-uefi │ │ ├── liolib.c │ │ └── loslib.c │ ├── lua.c │ ├── lua.cmake │ ├── lua.h │ ├── luaconf.h │ ├── lualib.h │ ├── lundump.c │ ├── lundump.h │ ├── lutf8lib.c │ ├── lvm.c │ ├── lvm.h │ ├── lzio.c │ └── lzio.h ├── lvgl.cmake ├── lvgl │ ├── .editorconfig │ ├── .gitignore │ ├── Kconfig │ ├── LICENCE.txt │ ├── README.md │ ├── README_zh.md │ ├── component.mk │ ├── library.json │ ├── library.properties │ ├── lv_conf_template.h │ ├── lvgl.h │ ├── lvgl.mk │ └── src │ │ ├── core │ │ ├── lv_core.mk │ │ ├── lv_disp.c │ │ ├── lv_disp.h │ │ ├── lv_event.c │ │ ├── lv_event.h │ │ ├── lv_group.c │ │ ├── lv_group.h │ │ ├── lv_indev.c │ │ ├── lv_indev.h │ │ ├── lv_indev_scroll.c │ │ ├── lv_indev_scroll.h │ │ ├── lv_obj.c │ │ ├── lv_obj.h │ │ ├── lv_obj_class.c │ │ ├── lv_obj_class.h │ │ ├── lv_obj_draw.c │ │ ├── lv_obj_draw.h │ │ ├── lv_obj_pos.c │ │ ├── lv_obj_pos.h │ │ ├── lv_obj_scroll.c │ │ ├── lv_obj_scroll.h │ │ ├── lv_obj_style.c │ │ ├── lv_obj_style.h │ │ ├── lv_obj_style_gen.c │ │ ├── lv_obj_style_gen.h │ │ ├── lv_obj_tree.c │ │ ├── lv_obj_tree.h │ │ ├── lv_refr.c │ │ ├── lv_refr.h │ │ ├── lv_theme.c │ │ └── lv_theme.h │ │ ├── draw │ │ ├── arm2d │ │ │ ├── lv_draw_arm2d.mk │ │ │ ├── lv_gpu_arm2d.c │ │ │ └── lv_gpu_arm2d.h │ │ ├── lv_draw.c │ │ ├── lv_draw.h │ │ ├── lv_draw.mk │ │ ├── lv_draw_arc.c │ │ ├── lv_draw_arc.h │ │ ├── lv_draw_img.c │ │ ├── lv_draw_img.h │ │ ├── lv_draw_label.c │ │ ├── lv_draw_label.h │ │ ├── lv_draw_layer.c │ │ ├── lv_draw_layer.h │ │ ├── lv_draw_line.c │ │ ├── lv_draw_line.h │ │ ├── lv_draw_mask.c │ │ ├── lv_draw_mask.h │ │ ├── lv_draw_rect.c │ │ ├── lv_draw_rect.h │ │ ├── lv_draw_transform.c │ │ ├── lv_draw_transform.h │ │ ├── lv_draw_triangle.c │ │ ├── lv_draw_triangle.h │ │ ├── lv_img_buf.c │ │ ├── lv_img_buf.h │ │ ├── lv_img_cache.c │ │ ├── lv_img_cache.h │ │ ├── lv_img_decoder.c │ │ ├── lv_img_decoder.h │ │ ├── nxp │ │ │ ├── lv_draw_nxp.mk │ │ │ ├── lv_gpu_nxp.c │ │ │ ├── lv_gpu_nxp.h │ │ │ ├── pxp │ │ │ │ ├── lv_draw_nxp_pxp.mk │ │ │ │ ├── lv_draw_pxp_blend.c │ │ │ │ ├── lv_draw_pxp_blend.h │ │ │ │ ├── lv_gpu_nxp_pxp.c │ │ │ │ ├── lv_gpu_nxp_pxp.h │ │ │ │ ├── lv_gpu_nxp_pxp_osa.c │ │ │ │ └── lv_gpu_nxp_pxp_osa.h │ │ │ └── vglite │ │ │ │ ├── lv_draw_nxp_vglite.mk │ │ │ │ ├── lv_draw_vglite_arc.c │ │ │ │ ├── lv_draw_vglite_arc.h │ │ │ │ ├── lv_draw_vglite_blend.c │ │ │ │ ├── lv_draw_vglite_blend.h │ │ │ │ ├── lv_draw_vglite_rect.c │ │ │ │ ├── lv_draw_vglite_rect.h │ │ │ │ ├── lv_gpu_nxp_vglite.c │ │ │ │ └── lv_gpu_nxp_vglite.h │ │ ├── sdl │ │ │ ├── README.md │ │ │ ├── lv_draw_sdl.c │ │ │ ├── lv_draw_sdl.h │ │ │ ├── lv_draw_sdl.mk │ │ │ ├── lv_draw_sdl_arc.c │ │ │ ├── lv_draw_sdl_bg.c │ │ │ ├── lv_draw_sdl_composite.c │ │ │ ├── lv_draw_sdl_composite.h │ │ │ ├── lv_draw_sdl_img.c │ │ │ ├── lv_draw_sdl_img.h │ │ │ ├── lv_draw_sdl_label.c │ │ │ ├── lv_draw_sdl_layer.c │ │ │ ├── lv_draw_sdl_layer.h │ │ │ ├── lv_draw_sdl_line.c │ │ │ ├── lv_draw_sdl_mask.c │ │ │ ├── lv_draw_sdl_mask.h │ │ │ ├── lv_draw_sdl_polygon.c │ │ │ ├── lv_draw_sdl_priv.h │ │ │ ├── lv_draw_sdl_rect.c │ │ │ ├── lv_draw_sdl_rect.h │ │ │ ├── lv_draw_sdl_stack_blur.c │ │ │ ├── lv_draw_sdl_stack_blur.h │ │ │ ├── lv_draw_sdl_texture_cache.c │ │ │ ├── lv_draw_sdl_texture_cache.h │ │ │ ├── lv_draw_sdl_utils.c │ │ │ └── lv_draw_sdl_utils.h │ │ ├── stm32_dma2d │ │ │ ├── lv_draw_stm32_dma2d.mk │ │ │ ├── lv_gpu_stm32_dma2d.c │ │ │ └── lv_gpu_stm32_dma2d.h │ │ ├── sw │ │ │ ├── lv_draw_sw.c │ │ │ ├── lv_draw_sw.h │ │ │ ├── lv_draw_sw.mk │ │ │ ├── lv_draw_sw_arc.c │ │ │ ├── lv_draw_sw_blend.c │ │ │ ├── lv_draw_sw_blend.h │ │ │ ├── lv_draw_sw_dither.c │ │ │ ├── lv_draw_sw_dither.h │ │ │ ├── lv_draw_sw_gradient.c │ │ │ ├── lv_draw_sw_gradient.h │ │ │ ├── lv_draw_sw_img.c │ │ │ ├── lv_draw_sw_layer.c │ │ │ ├── lv_draw_sw_letter.c │ │ │ ├── lv_draw_sw_line.c │ │ │ ├── lv_draw_sw_polygon.c │ │ │ ├── lv_draw_sw_rect.c │ │ │ └── lv_draw_sw_transform.c │ │ └── swm341_dma2d │ │ │ ├── lv_draw_swm341_dma2d.mk │ │ │ ├── lv_gpu_swm341_dma2d.c │ │ │ └── lv_gpu_swm341_dma2d.h │ │ ├── extra │ │ ├── README.md │ │ ├── layouts │ │ │ ├── flex │ │ │ │ ├── lv_flex.c │ │ │ │ └── lv_flex.h │ │ │ ├── grid │ │ │ │ ├── lv_grid.c │ │ │ │ └── lv_grid.h │ │ │ └── lv_layouts.h │ │ ├── libs │ │ │ ├── bmp │ │ │ │ ├── lv_bmp.c │ │ │ │ └── lv_bmp.h │ │ │ ├── ffmpeg │ │ │ │ ├── lv_ffmpeg.c │ │ │ │ └── lv_ffmpeg.h │ │ │ ├── fsdrv │ │ │ │ ├── lv_fs_fatfs.c │ │ │ │ ├── lv_fs_posix.c │ │ │ │ ├── lv_fs_stdio.c │ │ │ │ ├── lv_fs_win32.c │ │ │ │ └── lv_fsdrv.h │ │ │ ├── gif │ │ │ │ ├── gifdec.c │ │ │ │ ├── gifdec.h │ │ │ │ ├── lv_gif.c │ │ │ │ └── lv_gif.h │ │ │ ├── lv_libs.h │ │ │ ├── qrcode │ │ │ │ ├── lv_qrcode.c │ │ │ │ ├── lv_qrcode.h │ │ │ │ ├── qrcodegen.c │ │ │ │ └── qrcodegen.h │ │ │ ├── rlottie │ │ │ │ ├── lv_rlottie.c │ │ │ │ └── lv_rlottie.h │ │ │ └── sjpg │ │ │ │ ├── lv_sjpg.c │ │ │ │ ├── lv_sjpg.h │ │ │ │ ├── tjpgd.c │ │ │ │ ├── tjpgd.h │ │ │ │ └── tjpgdcnf.h │ │ ├── lv_extra.c │ │ ├── lv_extra.h │ │ ├── lv_extra.mk │ │ ├── others │ │ │ ├── fragment │ │ │ │ ├── README.md │ │ │ │ ├── lv_fragment.c │ │ │ │ ├── lv_fragment.h │ │ │ │ └── lv_fragment_manager.c │ │ │ ├── gridnav │ │ │ │ ├── lv_gridnav.c │ │ │ │ └── lv_gridnav.h │ │ │ ├── ime │ │ │ │ ├── lv_ime_pinyin.c │ │ │ │ └── lv_ime_pinyin.h │ │ │ ├── imgfont │ │ │ │ ├── lv_imgfont.c │ │ │ │ └── lv_imgfont.h │ │ │ ├── lv_others.h │ │ │ ├── monkey │ │ │ │ ├── lv_monkey.c │ │ │ │ └── lv_monkey.h │ │ │ ├── msg │ │ │ │ ├── lv_msg.c │ │ │ │ └── lv_msg.h │ │ │ └── snapshot │ │ │ │ ├── lv_snapshot.c │ │ │ │ └── lv_snapshot.h │ │ ├── themes │ │ │ ├── basic │ │ │ │ ├── lv_theme_basic.c │ │ │ │ └── lv_theme_basic.h │ │ │ ├── default │ │ │ │ ├── lv_theme_default.c │ │ │ │ └── lv_theme_default.h │ │ │ ├── lv_themes.h │ │ │ └── mono │ │ │ │ ├── lv_theme_mono.c │ │ │ │ └── lv_theme_mono.h │ │ └── widgets │ │ │ ├── animimg │ │ │ ├── lv_animimg.c │ │ │ └── lv_animimg.h │ │ │ ├── calendar │ │ │ ├── lv_calendar.c │ │ │ ├── lv_calendar.h │ │ │ ├── lv_calendar_header_arrow.c │ │ │ ├── lv_calendar_header_arrow.h │ │ │ ├── lv_calendar_header_dropdown.c │ │ │ └── lv_calendar_header_dropdown.h │ │ │ ├── chart │ │ │ ├── lv_chart.c │ │ │ └── lv_chart.h │ │ │ ├── colorwheel │ │ │ ├── lv_colorwheel.c │ │ │ └── lv_colorwheel.h │ │ │ ├── imgbtn │ │ │ ├── lv_imgbtn.c │ │ │ └── lv_imgbtn.h │ │ │ ├── keyboard │ │ │ ├── lv_keyboard.c │ │ │ └── lv_keyboard.h │ │ │ ├── led │ │ │ ├── lv_led.c │ │ │ └── lv_led.h │ │ │ ├── list │ │ │ ├── lv_list.c │ │ │ └── lv_list.h │ │ │ ├── lv_widgets.h │ │ │ ├── menu │ │ │ ├── lv_menu.c │ │ │ └── lv_menu.h │ │ │ ├── meter │ │ │ ├── lv_meter.c │ │ │ └── lv_meter.h │ │ │ ├── msgbox │ │ │ ├── lv_msgbox.c │ │ │ └── lv_msgbox.h │ │ │ ├── span │ │ │ ├── lv_span.c │ │ │ └── lv_span.h │ │ │ ├── spinbox │ │ │ ├── lv_spinbox.c │ │ │ └── lv_spinbox.h │ │ │ ├── spinner │ │ │ ├── lv_spinner.c │ │ │ └── lv_spinner.h │ │ │ ├── tabview │ │ │ ├── lv_tabview.c │ │ │ └── lv_tabview.h │ │ │ ├── tileview │ │ │ ├── lv_tileview.c │ │ │ └── lv_tileview.h │ │ │ └── win │ │ │ ├── lv_win.c │ │ │ └── lv_win.h │ │ ├── font │ │ ├── lv_font.c │ │ ├── lv_font.h │ │ ├── lv_font.mk │ │ ├── lv_font_fmt_txt.c │ │ ├── lv_font_fmt_txt.h │ │ ├── lv_font_loader.c │ │ ├── lv_font_loader.h │ │ └── lv_symbol_def.h │ │ ├── hal │ │ ├── lv_hal.h │ │ ├── lv_hal.mk │ │ ├── lv_hal_disp.c │ │ ├── lv_hal_disp.h │ │ ├── lv_hal_indev.c │ │ ├── lv_hal_indev.h │ │ ├── lv_hal_tick.c │ │ └── lv_hal_tick.h │ │ ├── lv_api_map.h │ │ ├── lv_conf_internal.h │ │ ├── lv_conf_kconfig.h │ │ ├── lvgl.h │ │ ├── misc │ │ ├── lv_anim.c │ │ ├── lv_anim.h │ │ ├── lv_anim_timeline.c │ │ ├── lv_anim_timeline.h │ │ ├── lv_area.c │ │ ├── lv_area.h │ │ ├── lv_assert.h │ │ ├── lv_async.c │ │ ├── lv_async.h │ │ ├── lv_bidi.c │ │ ├── lv_bidi.h │ │ ├── lv_color.c │ │ ├── lv_color.h │ │ ├── lv_fs.c │ │ ├── lv_fs.h │ │ ├── lv_gc.c │ │ ├── lv_gc.h │ │ ├── lv_ll.c │ │ ├── lv_ll.h │ │ ├── lv_log.c │ │ ├── lv_log.h │ │ ├── lv_lru.c │ │ ├── lv_lru.h │ │ ├── lv_math.c │ │ ├── lv_math.h │ │ ├── lv_mem.c │ │ ├── lv_mem.h │ │ ├── lv_misc.mk │ │ ├── lv_printf.c │ │ ├── lv_printf.h │ │ ├── lv_style.c │ │ ├── lv_style.h │ │ ├── lv_style_gen.c │ │ ├── lv_style_gen.h │ │ ├── lv_templ.c │ │ ├── lv_templ.h │ │ ├── lv_timer.c │ │ ├── lv_timer.h │ │ ├── lv_tlsf.c │ │ ├── lv_tlsf.h │ │ ├── lv_txt.c │ │ ├── lv_txt.h │ │ ├── lv_txt_ap.c │ │ ├── lv_txt_ap.h │ │ ├── lv_types.h │ │ ├── lv_utils.c │ │ └── lv_utils.h │ │ └── widgets │ │ ├── lv_arc.c │ │ ├── lv_arc.h │ │ ├── lv_bar.c │ │ ├── lv_bar.h │ │ ├── lv_btn.c │ │ ├── lv_btn.h │ │ ├── lv_btnmatrix.c │ │ ├── lv_btnmatrix.h │ │ ├── lv_canvas.c │ │ ├── lv_canvas.h │ │ ├── lv_checkbox.c │ │ ├── lv_checkbox.h │ │ ├── lv_dropdown.c │ │ ├── lv_dropdown.h │ │ ├── lv_img.c │ │ ├── lv_img.h │ │ ├── lv_label.c │ │ ├── lv_label.h │ │ ├── lv_line.c │ │ ├── lv_line.h │ │ ├── lv_objx_templ.c │ │ ├── lv_objx_templ.h │ │ ├── lv_roller.c │ │ ├── lv_roller.h │ │ ├── lv_slider.c │ │ ├── lv_slider.h │ │ ├── lv_switch.c │ │ ├── lv_switch.h │ │ ├── lv_table.c │ │ ├── lv_table.h │ │ ├── lv_textarea.c │ │ ├── lv_textarea.h │ │ └── lv_widgets.mk ├── mxml │ ├── LICENSE │ ├── MiniXML.inf │ ├── config.h.in │ ├── mxml-attr.c │ ├── mxml-entity.c │ ├── mxml-file.c │ ├── mxml-get.c │ ├── mxml-index.c │ ├── mxml-node.c │ ├── mxml-private.c │ ├── mxml-private.h │ ├── mxml-search.c │ ├── mxml-set.c │ ├── mxml-string.c │ ├── mxml-uefi │ │ └── config.h │ ├── mxml.cmake │ ├── mxml.config.h.in │ └── mxml.h ├── nanosvg │ ├── LICENSE.txt │ ├── NanoSVG.inf │ ├── nanosvg.c │ ├── nanosvg.cmake │ └── src │ │ ├── nanosvg.h │ │ └── nanosvgrast.h ├── regex │ ├── RegexLib.inf │ ├── regex.cmake │ ├── regexp.c │ └── regexp.h ├── stb │ ├── LICENSE │ ├── STBLib.inf │ ├── stb.c │ ├── stb.cmake │ ├── stb_c_lexer.h │ ├── stb_connected_components.h │ ├── stb_divide.h │ ├── stb_ds.h │ ├── stb_dxt.h │ ├── stb_easy_font.h │ ├── stb_herringbone_wang_tile.h │ ├── stb_hexwave.h │ ├── stb_image.h │ ├── stb_image_resize.h │ ├── stb_image_write.h │ ├── stb_include.h │ ├── stb_leakcheck.h │ ├── stb_rect_pack.h │ ├── stb_sprintf.h │ ├── stb_textedit.h │ ├── stb_tilemap_editor.h │ ├── stb_truetype.h │ ├── stb_vorbis.c │ └── stb_voxel_render.h ├── util-linux │ ├── COPYING │ ├── README │ ├── README.licensing │ ├── include │ │ ├── blkdev.h │ │ ├── buffer.h │ │ ├── canonicalize.h │ │ ├── carefulputc.h │ │ ├── closestream.h │ │ ├── color-names.h │ │ ├── crc32.h │ │ ├── crc32c.h │ │ ├── encode.h │ │ ├── fileutils.h │ │ ├── jsonwrt.h │ │ ├── linux_version.h │ │ ├── loopdev.h │ │ ├── mangle.h │ │ ├── match.h │ │ ├── mbsalign.h │ │ ├── minix.h │ │ ├── monotonic.h │ │ ├── namespace.h │ │ ├── partx.h │ │ ├── path.h │ │ ├── pt-bsd.h │ │ ├── pt-gpt-partnames.h │ │ ├── pt-mbr-partnames.h │ │ ├── pt-mbr.h │ │ ├── pt-sgi.h │ │ ├── pt-sun.h │ │ ├── statfs_magic.h │ │ ├── strutils.h │ │ ├── sysfs.h │ │ ├── ttyutils.h │ │ ├── ul-list.h │ │ └── ul-md5.h │ ├── lib │ │ ├── blkdev.c │ │ ├── buffer.c │ │ ├── canonicalize.c │ │ ├── crc32.c │ │ ├── crc32c.c │ │ ├── encode.c │ │ ├── fileutils.c │ │ ├── jsonwrt.c │ │ ├── linux_version.c │ │ ├── loopdev.c │ │ ├── mangle.c │ │ ├── match.c │ │ ├── mbsalign.c │ │ ├── monotonic.c │ │ ├── path.c │ │ ├── strutils.c │ │ └── sysfs.c │ ├── libblkid │ │ ├── COPYING │ │ ├── blkid.h │ │ ├── blkidP.h │ │ ├── cache.c │ │ ├── config.c │ │ ├── dev.c │ │ ├── devname.c │ │ ├── devno.c │ │ ├── encode.c │ │ ├── evaluate.c │ │ ├── getsize.c │ │ ├── partitions │ │ │ ├── aix.c │ │ │ ├── aix.h │ │ │ ├── atari.c │ │ │ ├── bsd.c │ │ │ ├── dos.c │ │ │ ├── gpt.c │ │ │ ├── mac.c │ │ │ ├── minix.c │ │ │ ├── partitions.c │ │ │ ├── partitions.h │ │ │ ├── sgi.c │ │ │ ├── solaris_x86.c │ │ │ ├── sun.c │ │ │ ├── ultrix.c │ │ │ └── unixware.c │ │ ├── probe.c │ │ ├── read.c │ │ ├── resolve.c │ │ ├── save.c │ │ ├── superblocks │ │ │ ├── adaptec_raid.c │ │ │ ├── apfs.c │ │ │ ├── bcache.c │ │ │ ├── befs.c │ │ │ ├── bfs.c │ │ │ ├── bitlocker.c │ │ │ ├── bluestore.c │ │ │ ├── btrfs.c │ │ │ ├── cramfs.c │ │ │ ├── ddf_raid.c │ │ │ ├── drbd.c │ │ │ ├── drbdmanage.c │ │ │ ├── drbdproxy_datalog.c │ │ │ ├── erofs.c │ │ │ ├── exfat.c │ │ │ ├── exfs.c │ │ │ ├── ext.c │ │ │ ├── f2fs.c │ │ │ ├── gfs.c │ │ │ ├── hfs.c │ │ │ ├── highpoint_raid.c │ │ │ ├── hpfs.c │ │ │ ├── iso9660.c │ │ │ ├── isw_raid.c │ │ │ ├── jfs.c │ │ │ ├── jmicron_raid.c │ │ │ ├── linux_raid.c │ │ │ ├── lsi_raid.c │ │ │ ├── luks.c │ │ │ ├── lvm.c │ │ │ ├── minix.c │ │ │ ├── mpool.c │ │ │ ├── netware.c │ │ │ ├── nilfs.c │ │ │ ├── ntfs.c │ │ │ ├── nvidia_raid.c │ │ │ ├── ocfs.c │ │ │ ├── promise_raid.c │ │ │ ├── refs.c │ │ │ ├── reiserfs.c │ │ │ ├── romfs.c │ │ │ ├── silicon_raid.c │ │ │ ├── squashfs.c │ │ │ ├── stratis.c │ │ │ ├── superblocks.c │ │ │ ├── superblocks.h │ │ │ ├── swap.c │ │ │ ├── sysv.c │ │ │ ├── ubi.c │ │ │ ├── ubifs.c │ │ │ ├── udf.c │ │ │ ├── ufs.c │ │ │ ├── vdo.c │ │ │ ├── vfat.c │ │ │ ├── via_raid.c │ │ │ ├── vmfs.c │ │ │ ├── vxfs.c │ │ │ ├── xfs.c │ │ │ ├── zfs.c │ │ │ └── zonefs.c │ │ ├── tag.c │ │ ├── topology │ │ │ ├── dm.c │ │ │ ├── evms.c │ │ │ ├── ioctl.c │ │ │ ├── lvm.c │ │ │ ├── md.c │ │ │ ├── sysfs.c │ │ │ ├── topology.c │ │ │ └── topology.h │ │ ├── verify.c │ │ └── version.c │ ├── libfdisk │ │ ├── alignment.c │ │ ├── ask.c │ │ ├── bsd.c │ │ ├── context.c │ │ ├── dos.c │ │ ├── fdiskP.h │ │ ├── field.c │ │ ├── gpt.c │ │ ├── item.c │ │ ├── iter.c │ │ ├── label.c │ │ ├── libfdisk.h │ │ ├── partition.c │ │ ├── parttype.c │ │ ├── script.c │ │ ├── sgi.c │ │ ├── sun.c │ │ ├── table.c │ │ ├── utils.c │ │ ├── version.c │ │ └── wipe.c │ ├── libmount │ │ ├── COPYING │ │ ├── btrfs.c │ │ ├── cache.c │ │ ├── context.c │ │ ├── context_loopdev.c │ │ ├── context_mount.c │ │ ├── context_umount.c │ │ ├── context_veritydev.c │ │ ├── fs.c │ │ ├── iter.c │ │ ├── libmount.h │ │ ├── lock.c │ │ ├── monitor.c │ │ ├── mountP.h │ │ ├── optmap.c │ │ ├── optstr.c │ │ ├── tab.c │ │ ├── tab_diff.c │ │ ├── tab_parse.c │ │ ├── tab_update.c │ │ ├── utils.c │ │ └── version.c │ ├── libsmartcols │ │ ├── COPYING │ │ ├── calculate.c │ │ ├── cell.c │ │ ├── column.c │ │ ├── grouping.c │ │ ├── iter.c │ │ ├── libsmartcols.h │ │ ├── line.c │ │ ├── print-api.c │ │ ├── print.c │ │ ├── smartcolsP.h │ │ ├── symbols.c │ │ ├── table.c │ │ ├── version.c │ │ └── walk.c │ ├── libuuid │ │ ├── .dirstamp │ │ ├── COPYING │ │ ├── clear.c │ │ ├── compare.c │ │ ├── copy.c │ │ ├── gen_uuid.c │ │ ├── isnull.c │ │ ├── pack.c │ │ ├── parse.c │ │ ├── predefined.c │ │ ├── unpack.c │ │ ├── unparse.c │ │ ├── uuid.h │ │ ├── uuidP.h │ │ ├── uuid_time.c │ │ └── uuidd.h │ └── ul.cmake └── zlib │ ├── Zlib.inf │ ├── adler32.c │ ├── compress.c │ ├── crc32.c │ ├── crc32.h │ ├── deflate.c │ ├── deflate.h │ ├── gzclose.c │ ├── gzguts.h │ ├── gzlib.c │ ├── gzread.c │ ├── gzwrite.c │ ├── infback.c │ ├── inffast.c │ ├── inffast.h │ ├── inffixed.h │ ├── inflate.c │ ├── inflate.h │ ├── inftrees.c │ ├── inftrees.h │ ├── trees.c │ ├── trees.h │ ├── uncompr.c │ ├── zconf.h │ ├── zlib.cmake │ ├── zlib.h │ ├── zutil.c │ └── zutil.h ├── po ├── CMakeLists.txt └── zh_CN.po ├── prebuilts ├── kernel.txz └── vmlinuz ├── root ├── .gitignore ├── .gitkeep ├── bin ├── dev │ └── .gitkeep ├── etc │ ├── default.ttf │ ├── group │ ├── gshadow │ ├── hosts │ ├── mtab │ ├── passwd │ ├── profile │ ├── protocols │ ├── resolv.conf │ ├── services │ ├── shadow │ ├── shells │ ├── symbols.ttf │ └── terminfo │ │ ├── a │ │ └── ansi │ │ ├── d │ │ └── dumb │ │ ├── e │ │ └── emu │ │ ├── l │ │ └── linux │ │ ├── n │ │ └── ntconsole │ │ ├── p │ │ ├── pty │ │ ├── putty │ │ └── putty-256color │ │ ├── r │ │ ├── rxvt │ │ ├── rxvt-256color │ │ └── rxvt-color │ │ ├── s │ │ ├── screen │ │ └── screen-256color │ │ ├── v │ │ ├── vt100 │ │ ├── vt102 │ │ ├── vt200 │ │ └── vt220 │ │ └── x │ │ ├── xterm │ │ ├── xterm-256color │ │ ├── xterm-color │ │ └── xterm-xfree86 ├── lib ├── lib64 ├── proc │ └── .gitkeep ├── run │ └── .gitkeep ├── sbin ├── sys │ └── .gitkeep ├── tmp │ └── .gitkeep ├── usr │ ├── bin │ │ └── .gitkeep │ ├── lib │ │ └── .gitkeep │ ├── lib64 │ ├── sbin │ └── share │ │ ├── fonts │ │ ├── fontawesome5.ttf │ │ └── wqy-mono-microhei.ttf │ │ ├── mime │ │ └── mime.types │ │ ├── pixmaps │ │ ├── mime │ │ │ ├── application-x-zerosize.svg │ │ │ ├── inode-blockdevice.svg │ │ │ ├── inode-chardevice.svg │ │ │ ├── inode-dir.svg │ │ │ ├── inode-disk.svg │ │ │ ├── inode-fifo.svg │ │ │ ├── inode-file.svg │ │ │ ├── inode-mount-point.svg │ │ │ ├── inode-parent.svg │ │ │ ├── inode-socket.svg │ │ │ ├── inode-symlink.svg │ │ │ ├── text-x-plain.svg │ │ │ └── unknown.svg │ │ └── simple-init │ │ │ ├── abootimg.svg │ │ │ ├── acpi.svg │ │ │ ├── apps.svg │ │ │ ├── back.svg │ │ │ ├── backlight.svg │ │ │ ├── backup.svg │ │ │ ├── battery.svg │ │ │ ├── bg.jpg │ │ │ ├── bootmgr.svg │ │ │ ├── calendar.svg │ │ │ ├── cdrom.svg │ │ │ ├── clipboard.svg │ │ │ ├── conftool.svg │ │ │ ├── distributor-logo-absolute.svg │ │ │ ├── distributor-logo-academix.svg │ │ │ ├── distributor-logo-aix.svg │ │ │ ├── distributor-logo-alpine.svg │ │ │ ├── distributor-logo-alt-linux.svg │ │ │ ├── distributor-logo-android.svg │ │ │ ├── distributor-logo-antix.svg │ │ │ ├── distributor-logo-archbang.svg │ │ │ ├── distributor-logo-archlabs.svg │ │ │ ├── distributor-logo-archlinux.svg │ │ │ ├── distributor-logo-archman.svg │ │ │ ├── distributor-logo-artix.svg │ │ │ ├── distributor-logo-aryalinux.svg │ │ │ ├── distributor-logo-backbox.svg │ │ │ ├── distributor-logo-blackarch.svg │ │ │ ├── distributor-logo-bodhi-linux.svg │ │ │ ├── distributor-logo-bunsenlabs.svg │ │ │ ├── distributor-logo-calculate-linux.svg │ │ │ ├── distributor-logo-condres.svg │ │ │ ├── distributor-logo-debian.svg │ │ │ ├── distributor-logo-deepin.svg │ │ │ ├── distributor-logo-devuan.svg │ │ │ ├── distributor-logo-dragonflybsd.svg │ │ │ ├── distributor-logo-endeavouros.svg │ │ │ ├── distributor-logo-fedora.svg │ │ │ ├── distributor-logo-freebsd.svg │ │ │ ├── distributor-logo-freedos.svg │ │ │ ├── distributor-logo-ghostbsd.svg │ │ │ ├── distributor-logo-hyperbola.svg │ │ │ ├── distributor-logo-kali-linux.svg │ │ │ ├── distributor-logo-kaos.svg │ │ │ ├── distributor-logo-knoppix.svg │ │ │ ├── distributor-logo-korora.svg │ │ │ ├── distributor-logo-linux-lite.svg │ │ │ ├── distributor-logo-linux-mint.svg │ │ │ ├── distributor-logo-lubuntu.svg │ │ │ ├── distributor-logo-lxle.svg │ │ │ ├── distributor-logo-mac.svg │ │ │ ├── distributor-logo-madlinux.svg │ │ │ ├── distributor-logo-manjaro.svg │ │ │ ├── distributor-logo-midnightbsd.svg │ │ │ ├── distributor-logo-ms-dos.svg │ │ │ ├── distributor-logo-mx.svg │ │ │ ├── distributor-logo-netbsd.svg │ │ │ ├── distributor-logo-netrunner.svg │ │ │ ├── distributor-logo-openbsd.svg │ │ │ ├── distributor-logo-openmandriva.svg │ │ │ ├── distributor-logo-opensuse.svg │ │ │ ├── distributor-logo-parrot.svg │ │ │ ├── distributor-logo-pclinuxos.svg │ │ │ ├── distributor-logo-pisilinux.svg │ │ │ ├── distributor-logo-pop-os.svg │ │ │ ├── distributor-logo-puppy-linux.svg │ │ │ ├── distributor-logo-pureos.svg │ │ │ ├── distributor-logo-raspbian.svg │ │ │ ├── distributor-logo-rhel.svg │ │ │ ├── distributor-logo-rosa.svg │ │ │ ├── distributor-logo-salentos.svg │ │ │ ├── distributor-logo-smartos.svg │ │ │ ├── distributor-logo-solus.svg │ │ │ ├── distributor-logo-steamos.svg │ │ │ ├── distributor-logo-trueos.svg │ │ │ ├── distributor-logo-ubuntu-budgie.svg │ │ │ ├── distributor-logo-ubuntu-mate.svg │ │ │ ├── distributor-logo-ubuntu-studio.svg │ │ │ ├── distributor-logo-ubuntu.svg │ │ │ ├── distributor-logo-ultimate-edition.svg │ │ │ ├── distributor-logo-void.svg │ │ │ ├── distributor-logo-voyager.svg │ │ │ ├── distributor-logo-windows.svg │ │ │ ├── distributor-logo-zorin.svg │ │ │ ├── download.svg │ │ │ ├── efi.svg │ │ │ ├── exit.svg │ │ │ ├── fastboot.svg │ │ │ ├── filemgr.svg │ │ │ ├── gui-benchmark.svg │ │ │ ├── guipm.svg │ │ │ ├── img_cogwheel_argb.png │ │ │ ├── img_cogwheel_chroma_keyed.png │ │ │ ├── img_cogwheel_indexed16.png │ │ │ ├── img_cogwheel_rgb.png │ │ │ ├── keyboard.svg │ │ │ ├── language.svg │ │ │ ├── launcher.svg │ │ │ ├── linux.svg │ │ │ ├── logviewer.svg │ │ │ ├── mount.svg │ │ │ ├── mouse.svg │ │ │ ├── photo-viewer.svg │ │ │ ├── pointer.svg │ │ │ ├── poweroff.svg │ │ │ ├── proxmox.png │ │ │ ├── reboot.svg │ │ │ ├── regedit.svg │ │ │ ├── screen.svg │ │ │ ├── scsi.svg │ │ │ ├── serial.svg │ │ │ ├── sysinfo.svg │ │ │ ├── terminal.svg │ │ │ ├── text-editor.svg │ │ │ ├── theme.svg │ │ │ ├── twrp.png │ │ │ ├── uefi.svg │ │ │ ├── usb.svg │ │ │ └── vibrator.svg │ │ ├── simple-init │ │ ├── apps │ │ │ └── reboot.xml │ │ ├── gui-http │ │ │ ├── index.css │ │ │ ├── index.html │ │ │ ├── index.js │ │ │ ├── web_gui_render.min.js │ │ │ └── web_gui_render.wasm │ │ ├── gui │ │ │ └── reboot.xml │ │ └── icon.xml │ │ └── terminfo └── var │ ├── cache │ └── .gitkeep │ ├── lib │ └── .gitkeep │ ├── lock │ ├── log │ └── .gitkeep │ ├── run │ └── tmp │ └── .gitkeep ├── scripts ├── build-edk2.sh ├── build.sh ├── calc-lines.sh ├── environments.sh.inc ├── functions.sh.inc ├── gen-initramfs.sh ├── gen-logfs.sh ├── gen-minimal-initramfs.sh ├── gen-miniroot.sh ├── gen-rootfs-source.sh ├── install-gmo.sh ├── qemu.sh └── submodules.sh └── src ├── CMakeLists.txt ├── SimpleInitRootFS.inf ├── adbd ├── CMakeLists.txt ├── adb.c ├── adb_auth.c ├── adbd_internal.h ├── fdevent.c ├── file_sync.c ├── gadget.c ├── services.c ├── socket_local.c ├── sockets.c ├── transport.c └── usb.c ├── assets ├── CMakeLists.txt ├── SimpleInitAssets.inf └── assets.c ├── bcd ├── CMakeLists.txt ├── bcd.c ├── bcdedit.c ├── bcdstore.h ├── data.c ├── device.c ├── dump.c ├── element.c ├── element_value.c ├── lib.c ├── object.c └── store.c ├── boot ├── CMakeLists.txt ├── SimpleInitBoot.inf ├── boot.c ├── bootdef.c ├── charger.c ├── cpu.c ├── drivers.c ├── efi.c ├── efi_path.c ├── exit.c ├── linux.c ├── lua.c ├── prober.c ├── reboot.c ├── reboot_uefi.c ├── root.c ├── splash.c ├── system.c └── uefi_option.c ├── cmdline ├── CMakeLists.txt ├── androidboot.c ├── cmdline.c ├── conffs.c ├── console.c ├── gui.c ├── logfs.c ├── options.c └── root.c ├── commands ├── CMakeLists.txt ├── abootimg.c ├── adbd.c ├── arch.c ├── cat.c ├── cd.c ├── chdir.c ├── chroot.c ├── chvt.c ├── clear.c ├── close.c ├── confctl.c ├── conftools.c ├── dmesg.c ├── dumpinput.c ├── dumps.c ├── echo.c ├── exit.c ├── findfs.c ├── halt.c ├── help.c ├── initctl.c ├── initloggerd.c ├── input_code.h ├── insmod.c ├── loggerctl.c ├── ls.c ├── lsfd.c ├── lsmod.c ├── modprobe.c ├── mountpoint.c ├── poweroff.c ├── reboot.c ├── rmmod.c ├── service.c ├── setsid.c ├── simple-init.c ├── truefalse.c ├── uname.c ├── unlink.c ├── update-binary.c ├── version.c └── write.c ├── compress ├── CMakeLists.txt ├── SimpleInitCompress.inf ├── compress.c ├── compressors.c ├── gzip.c └── internal.h ├── confd ├── CMakeLists.txt ├── SimpleInitConfd.inf ├── client.c ├── confd_internal.h ├── dump.c ├── file.c ├── file_conf.c ├── internal.c ├── json_conf.c ├── server.c ├── store.c ├── uefi.c └── xml_conf.c ├── config-uefi.h ├── config.h.in ├── devd ├── CMakeLists.txt ├── devd.c ├── devd_internal.h ├── devtmpfs.c ├── dyndev.c ├── firmware.c ├── hotplug.c ├── internal.c ├── modalias.c ├── modules_load.c ├── netlink.c ├── server.c └── uevent.c ├── filesystem ├── CMakeLists.txt ├── SimpleInitFileSystem.inf ├── drivers.c ├── file.c ├── fs_internal.h ├── internal.c ├── layer │ ├── assets.c │ ├── curl.c │ ├── overlay.c │ ├── posix.c │ ├── socket.c │ ├── template.c │ ├── uefi.c │ └── zip.c ├── locked.c ├── oper.c ├── string.c ├── utils.c ├── volume.c └── volume │ ├── linux.c │ ├── linux.h │ ├── mount.c │ ├── root.c │ └── uefi.c ├── gadget ├── CMakeLists.txt ├── add.c ├── add_function.c ├── general.c ├── register.c ├── service.c ├── startstop.c └── unregister.c ├── getopt ├── CMakeLists.txt ├── getopt.c └── getopt_long.c ├── gui ├── CMakeLists.txt ├── SimpleInitGUI.inf ├── activities.c ├── activity.c ├── color.c ├── decoders │ ├── bmp.c │ ├── freetype.c │ ├── image.c │ ├── jpeg.c │ ├── png.c │ ├── stb.c │ └── svg.c ├── drivers.c ├── drivers │ ├── drm.c │ ├── dummy.c │ ├── fbdev.c │ ├── gtk.c │ ├── gui_http.h │ ├── http.c │ ├── http_ffmpeg.c │ ├── http_frame.c │ ├── http_image.c │ ├── http_input.c │ ├── input.c │ ├── modes.c │ ├── sdl2.c │ ├── stdin.c │ ├── uefi_gop.c │ ├── uefi_keyboard.c │ ├── uefi_pointer.c │ ├── uefi_touch.c │ ├── uefi_uga.c │ └── vnc.c ├── engine │ ├── activity.c │ ├── app.c │ ├── attribute.c │ ├── attributes │ │ ├── bool.c │ │ ├── generic.c │ │ ├── image.c │ │ ├── input.c │ │ ├── layout.c │ │ ├── pos.c │ │ └── size.c │ ├── code.c │ ├── data │ │ ├── attr_hands.c │ │ ├── obj_hands.c │ │ ├── style_props.c │ │ └── style_set_type.c │ ├── event.c │ ├── inline.c │ ├── lib.c │ ├── object.c │ ├── objects.c │ ├── render.c │ ├── render_internal.h │ ├── struct.c │ └── style.c ├── gui_init.c ├── guidrv.c ├── interface │ ├── apps │ │ ├── abootimg.c │ │ ├── acpi.c │ │ ├── add_mount.c │ │ ├── benchmark.c │ │ ├── boot_linux.c │ │ ├── calendar.c │ │ ├── fdt.c │ │ ├── logviewer.c │ │ ├── mount.c │ │ ├── picture.c │ │ ├── pointer_test.c │ │ ├── ramdisk.c │ │ ├── scr_test.c │ │ ├── text_editor.c │ │ ├── uefi_bootmenu.c │ │ ├── uefi_dxe_load.c │ │ ├── uefi_mass.c │ │ ├── uefi_shell.c │ │ ├── uefi_start.c │ │ └── vibrator.c │ ├── bootmgr │ │ ├── bootdata_efi.c │ │ ├── bootdata_linux.c │ │ ├── bootdata_memreg.c │ │ ├── bootdata_uefi_option.c │ │ ├── bootitem.c │ │ ├── bootmgr.c │ │ └── bootmgr.h │ ├── conftool │ │ ├── confload.c │ │ ├── confsave.c │ │ ├── conftool.c │ │ └── create.c │ ├── core │ │ ├── bootmenu.c │ │ ├── charger.c │ │ ├── clipboard.c │ │ ├── ctrl_pad.c │ │ ├── guiapp.c │ │ ├── snackbar.c │ │ ├── splash.c │ │ └── sysbar.c │ ├── filemgr │ │ ├── filemgr.c │ │ ├── fileopen.c │ │ ├── filetab.c │ │ └── fileview.c │ ├── gadget │ │ ├── add_mass.c │ │ ├── base_info.c │ │ └── gadget_view.c │ ├── guipm │ │ ├── disk_operation.c │ │ ├── disk_select.c │ │ ├── guipm.c │ │ ├── guipm.h │ │ ├── new_partition.c │ │ ├── part_operation.c │ │ ├── part_resize.c │ │ ├── part_type.c │ │ └── partitions.c │ ├── regedit │ │ ├── edit_value.c │ │ ├── regedit.c │ │ ├── regedit.h │ │ └── string.c │ ├── settings │ │ ├── backlight.c │ │ ├── language.c │ │ ├── mouse.c │ │ └── theme.c │ ├── term │ │ ├── baudrates.c │ │ ├── console.c │ │ ├── serial.h │ │ ├── serialopen.c │ │ ├── serialport.c │ │ ├── terminal.c │ │ └── termview.c │ └── widgets │ │ ├── filepicker.c │ │ ├── inputbox.c │ │ └── msgbox.c ├── lua │ ├── activity.c │ ├── lua.c │ ├── lvgl │ │ ├── lib.c │ │ ├── lvgl.c │ │ ├── obj.c │ │ └── obj_class.h │ ├── render.c │ ├── render_event.c │ ├── render_obj.c │ └── sysbar.c ├── string │ ├── align.lst │ ├── arc_mode.lst │ ├── bar_mode.lst │ ├── base_dir.lst │ ├── blend_mode.lst │ ├── border_side.lst │ ├── btnmatrix_ctrl.lst │ ├── chart_axis.lst │ ├── chart_type.lst │ ├── chart_update_mode.lst │ ├── colorwheel_mode.lst │ ├── dir.lst │ ├── dither_mode.lst │ ├── event.lst │ ├── flex_align.lst │ ├── flex_flow.lst │ ├── grad_dir.lst │ ├── grid_align.lst │ ├── img_size_mode.lst │ ├── imgbtn_state.lst │ ├── key.lst │ ├── keyboard_mode.lst │ ├── label_long.lst │ ├── menu_mode_header.lst │ ├── obj_flag.lst │ ├── opa.lst │ ├── palette.lst │ ├── part.lst │ ├── roller_mode.lst │ ├── scr_load_anim.lst │ ├── slider_mode.lst │ ├── span_mode.lst │ ├── span_overflow.lst │ ├── state.lst │ ├── string.c │ ├── style_prop.lst │ ├── table_cell_ctrl.lst │ ├── template.h │ ├── text_align.lst │ ├── text_cmd_state.lst │ ├── text_decor.lst │ └── text_flag.lst ├── theme │ └── icon.c └── tools.c ├── hardware ├── CMakeLists.txt ├── battery.c ├── led.c └── vibrate.c ├── host └── rootfs.c ├── initd ├── CMakeLists.txt ├── bootsvc.c ├── client.c ├── conffs.c ├── environ.c ├── init.c ├── logfs.c ├── preinit.c ├── protocol.c ├── reboot.c ├── run.c ├── signals.c ├── socket.c └── umount.c ├── kernelfdt ├── KernelFdtDxe.c └── KernelFdtDxe.inf ├── lib ├── CMakeLists.txt ├── SimpleInitLib.inf ├── aboot.c ├── array.c ├── base64.c ├── credential.c ├── exit.c ├── fdtparser.c ├── file.c ├── http.c ├── keyval.c ├── language.c ├── list.c ├── mime.c ├── mode.c ├── modules.c ├── mount.c ├── param.c ├── pool.c ├── proctitle.c ├── random.c ├── readable.c ├── reboot.c ├── recovery.c ├── replace.c ├── signal.c ├── stdio.c ├── strings.c ├── switchroot.c ├── uefi.c ├── uefi_string.c ├── url.c └── websocket.c ├── linux-boot ├── SimpleInitBootLinux.inf ├── aboot.c ├── arm.c ├── cmdline.c ├── compress.c ├── conf.c ├── dtb_sel.c ├── dtbo.c ├── dump.c ├── fdt.c ├── info.c ├── internal.h ├── linux.c ├── loader.c ├── mem.c ├── move.c ├── qcom.c ├── qcom.h ├── ramdisk.c ├── random.c ├── splash.c └── uefi.c ├── locate ├── SimpleInitLocate.inf ├── disk.c ├── fs.c ├── gpt.c ├── internal.h ├── locate.c ├── locates.c └── mbr.c ├── loggerd ├── CMakeLists.txt ├── SimpleInitLoggerd.inf ├── buffer.c ├── client.c ├── file_logger.c ├── internal.c ├── klog.c ├── lib.c ├── logger_internal.h ├── printk_logger.c ├── server.c ├── syslog.c └── syslog_logger.c ├── lua ├── CMakeLists.txt ├── SimpleInitLua.inf ├── abootimg.c ├── conf.c ├── data.c ├── fdisk │ ├── fdisk.c │ ├── fdisk.h │ ├── fdisk_ask.c │ ├── fdisk_context.c │ ├── fdisk_field.c │ ├── fdisk_iter.c │ ├── fdisk_label.c │ ├── fdisk_labelitem.c │ ├── fdisk_partition.c │ ├── fdisk_parttype.c │ ├── fdisk_script.c │ └── fdisk_table.c ├── feature.c ├── filesystem │ ├── fs.c │ ├── fs.h │ ├── fs_info.c │ ├── fsh.c │ └── string.c ├── init.c ├── libs.c ├── locate.c ├── logger.c ├── lua.c ├── nanosvg.c ├── recovery.c ├── stb.c ├── uefi │ ├── data │ │ ├── boot_service.c │ │ ├── bootopt.c │ │ ├── char16.c │ │ ├── devicepath.c │ │ ├── event.c │ │ ├── guid.c │ │ ├── handle.c │ │ ├── input_key.c │ │ ├── runtime_service.c │ │ ├── status.c │ │ └── time.c │ ├── file_info.c │ ├── guids.c │ ├── libs.c │ ├── libs │ │ ├── boot_logo_lib.c │ │ ├── io_lib.c │ │ ├── uefi_boot_manager_lib.c │ │ └── uefi_lib.c │ ├── lua_uefi.h │ ├── protocols │ │ ├── absolute_pointer.c │ │ ├── acpi_table.c │ │ ├── block_io.c │ │ ├── boot_logo.c │ │ ├── boot_logo2.c │ │ ├── boot_manager_policy.c │ │ ├── component_name.c │ │ ├── component_name2.c │ │ ├── deferred_image_load.c │ │ ├── disk_info.c │ │ ├── disk_io.c │ │ ├── file.c │ │ ├── graphics_output.c │ │ ├── loaded_image.c │ │ ├── partition_info.c │ │ ├── ramdisk.c │ │ ├── security2_arch.c │ │ ├── security_arch.c │ │ ├── serial_io.c │ │ ├── simple_file_system.c │ │ ├── simple_pointer.c │ │ ├── simple_text_input.c │ │ ├── simple_text_output.c │ │ └── timestamp.c │ ├── system_table.c │ └── uefi.c └── url.c ├── main ├── SimpleInitMain.inf ├── dump.c ├── main.c ├── uefimain.c └── wrapper.c ├── rootfs_data.s.in ├── service ├── CMakeLists.txt ├── conf.c ├── data.c ├── default.c ├── dump.c ├── execute.c ├── queue.c ├── scheduler.c ├── service.c ├── sigchld.c ├── start.c ├── stop.c ├── string.c └── struct.c ├── shell ├── CMakeLists.txt ├── cmd.c ├── commands.c ├── external.c ├── replace.c ├── shell.c └── shell_internal.h ├── ttyd ├── CMakeLists.txt ├── client.c ├── internal.c ├── issue.c ├── login.c ├── protocol.c ├── server.c ├── session.c ├── speed.c ├── ttyd_internal.h └── worker.c └── wasm ├── CMakeLists.txt ├── index.html ├── json-c.cmake ├── web_gui_render.c ├── web_gui_render.h ├── websocket.c ├── websocket.h └── zlib.cmake /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto 2 | *.sh text eol=lf 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.rej 2 | *.orig 3 | *.swp 4 | *.save* 5 | *.o 6 | *.a 7 | *.out 8 | *.lib 9 | *.obj 10 | *.dll 11 | *.so 12 | *.exe 13 | *.gch 14 | *.plist 15 | *.mo 16 | *.gmo 17 | *.fd 18 | *.iso 19 | *.img 20 | *.img.* 21 | *.qcow2 22 | *.vhd 23 | *.vdi 24 | *.vmdk 25 | *.cpio 26 | *.cpio.* 27 | *.ttf 28 | *.ttc 29 | *.pcf 30 | *.pcf.* 31 | *.efi 32 | vgcore.* 33 | /build* 34 | /init 35 | /init_debug 36 | /busybox 37 | initramfs*.* 38 | initrd*.* 39 | System.map* 40 | /cmake-build-* 41 | /.idea 42 | /.vscode 43 | /.cache 44 | CMakeCache.txt 45 | CMakeFiles 46 | Makefile 47 | cmake_install.cmake 48 | node_modules 49 | package.json 50 | package-lock.json 51 | fonts.scale 52 | fonts.dir 53 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "libs/freetype"] 2 | path = libs/freetype 3 | url = https://github.com/freetype/freetype.git 4 | ignore = dirty 5 | -------------------------------------------------------------------------------- /docs/en/build/linux-native.md: -------------------------------------------------------------------------------- 1 | # Linux target run native (for testing GUI Applications) 2 | 3 | ## 1. Build Main 4 | 5 | ```bash 6 | bash scripts/build.sh -DENABLE_SDL2=ON 7 | ``` 8 | output: `build/simple-init` (ELF Executable) 9 | 10 | `ENABLE_SDL2`: enable SDL2 guidrv for GUI Applications 11 | 12 | ## 2. Run GUI Application 13 | 14 | ```bash 15 | build/simple-init guiapp 16 | ``` 17 | NOTICE: need X11 environment 18 | 19 | -------------------------------------------------------------------------------- /docs/en/build/linux.md: -------------------------------------------------------------------------------- 1 | # Linux target run in initramfs 2 | 3 | ## 1. Build Main 4 | 5 | ```bash 6 | bash scripts/build.sh 7 | ``` 8 | output: `build/simple-init` (ELF Executable) 9 | 10 | ## 2. Generate minimal initramfs 11 | 12 | ```bash 13 | bash scripts/gen-minimal-initramfs.sh 14 | ``` 15 | output: `/tmp/initramfs.img` (ASCII cpio archive compress with gzip) 16 | 17 | if you want a big initramfs with commands, you can use `gen-initramfs.sh` instead `gen-minimal-initramfs.sh` 18 | 19 | ## 3. Generate testing image (just once) 20 | 21 | ```bash 22 | bash scripts/gen-logfs.sh 23 | bash scripts/gen-miniroot.sh 24 | ``` 25 | 26 | output: `/tmp/logfs.img` (FAT16 filesystem with MBR label) for save logs (LOGFS) 27 | 28 | output: `/tmp/minidisk.img` (EXT4 filesystem image) for a test switchroot 29 | 30 | ## 4. Run QEMU 31 | 32 | ```bash 33 | bash scripts/qemu.sh 34 | ``` 35 | NOTICE: you need a `prebuilts/vmlinuz` and `prebuilts/kernel.txz` for boot linux -------------------------------------------------------------------------------- /docs/en/config/boot.configs.extra.md: -------------------------------------------------------------------------------- 1 | # boot.configs.?.extra 2 | 3 | Additional parameters for different modes of boot items 4 | 5 | Type: `KEY` 6 | 7 | Supported environments: `LINUX` | `UEFI` 8 | 9 | 10 | | Name | Link | 11 | |--------------------|---------------------------------------------------------------------| 12 | | `BOOT_UEFI_OPTION` | [boot.configs.extra@uefi_option](boot.configs.extra.uefi_option.md) | 13 | | `BOOT_SWITCHROOT` | [boot.configs.extra@switchroot](boot.configs.extra.switchroot.md) | 14 | | `BOOT_REBOOT` | [boot.configs.extra@reboot](boot.configs.extra.reboot.md) | 15 | | `BOOT_LINUX` | [boot.configs.extra@linux](boot.configs.extra.linux.md) | 16 | | `BOOT_EFI` | [boot.configs.extra@efi](boot.configs.extra.efi.md) | 17 | -------------------------------------------------------------------------------- /docs/en/config/boot.configs.extra.reboot.md: -------------------------------------------------------------------------------- 1 | Reference: 2 | - [src/boot/reboot.c](../../../src/boot/reboot.c) 3 | 4 | # boot.configs.?.extra.arg 5 | 6 | Arguments at reboot 7 | 8 | Condition: [boot.configs.?.mode](boot.configs.md) is `BOOT_REBOOT` 9 | 10 | Type: `STRING` 11 | 12 | Supported environments: `UEFI` | `LINUX` 13 | -------------------------------------------------------------------------------- /docs/en/config/boot.configs.extra.uefi_option.md: -------------------------------------------------------------------------------- 1 | Reference: 2 | - [src/boot/uefi_option.c](../../../src/boot/reboot.c) 3 | 4 | # boot.configs.?.extra.option 5 | 6 | UEFI Boot item ID (BootXXXX) 7 | 8 | Condition: [boot.configs.?.mode](boot.configs.md) is `BOOT_UEFI_OPTION` 9 | 10 | Type: `INTEGER` 11 | 12 | Supported environments: `UEFI` 13 | -------------------------------------------------------------------------------- /docs/en/config/index.md: -------------------------------------------------------------------------------- 1 | # simple-init confd Config Guide 2 | 3 | ## runtime 4 | 5 | This key is reserved for program runtime and does not allow save or load from local files 6 | 7 | ## boot 8 | 9 | Used to store simple-init boot options, or boot menu items 10 | 11 | Supported environments: `LINUX` | `UEFI` 12 | 13 | Detailed options: [boot](boot.md) 14 | 15 | ## logger 16 | 17 | Special settings for logger service 18 | 19 | Supported environments: `LINUX` | `UEFI` 20 | 21 | Detailed options: [logger](logger.md) 22 | 23 | ## uefi 24 | 25 | Special settings under UEFI 26 | 27 | Supported environments: `UEFI` 28 | 29 | Detailed options: [uefi](uefi.md) 30 | -------------------------------------------------------------------------------- /docs/en/config/uefi.md: -------------------------------------------------------------------------------- 1 | # uefi 2 | 3 | Special settings under UEFI 4 | 5 | Type: `KEY` 6 | 7 | Supported environments: `UEFI` 8 | 9 | ## uefi.drivers 10 | 11 | Automatically load the specified UEFI DXE driver 12 | 13 | Type: `KEY` 14 | 15 | Supported environments: `UEFI` 16 | 17 | Reference: 18 | - [src/boot/drivers.c](../../../src/boot/drivers.c) 19 | 20 | ## uefi.drivers.? 21 | 22 | Automatically load the specified UEFI DXE driver 23 | 24 | Values: locate path [locates](locates.md) 25 | 26 | Type: `STRING` 27 | 28 | Supported environments: `UEFI` 29 | 30 | Reference: 31 | - [src/boot/drivers.c](../../../src/boot/drivers.c) 32 | -------------------------------------------------------------------------------- /docs/en/index.md: -------------------------------------------------------------------------------- 1 | ## Build Guide 2 | 3 | Note: only support build on linux 4 | 5 | ### [Linux](build/linux.md) 6 | 7 | ### [Linux Native](build/linux-native.md) 8 | 9 | ### [UEFI](build/uefi.md) 10 | 11 | ## Config Guide 12 | 13 | ### [config](config/index.md) 14 | -------------------------------------------------------------------------------- /docs/index.md: -------------------------------------------------------------------------------- 1 | [中文](zh/index.md) 2 | 3 | [English](en/index.md) 4 | -------------------------------------------------------------------------------- /docs/zh/build/linux-native.md: -------------------------------------------------------------------------------- 1 | # Linux目标本地运行 (用于测试GUI程序) 2 | 3 | ## 1. 编译主程序 4 | 5 | ```bash 6 | bash scripts/build.sh -DENABLE_SDL2=ON 7 | ``` 8 | 9 | 输出: `build/simple-init` (ELF可执行文件) 10 | 11 | `ENABLE_SDL2`: enable SDL2 guidrv for GUI Applications 12 | 13 | ## 2. 运行GUI程序 14 | 15 | ```bash 16 | build/simple-init guiapp 17 | ``` 18 | 19 | 注意: 需要X11桌面环境 20 | -------------------------------------------------------------------------------- /docs/zh/build/linux.md: -------------------------------------------------------------------------------- 1 | # Linux目标运行在initramfs 2 | 3 | ## 1. 编译主程序 4 | 5 | ```bash 6 | bash scripts/build.sh -DENABLE_SDL2=ON 7 | ``` 8 | 9 | 输出: `build/simple-init` (ELF可执行文件) 10 | 11 | ## 2. 生成最小initramfs 12 | 13 | ```bash 14 | bash scripts/gen-minimal-initramfs.sh 15 | ``` 16 | 17 | 输出: `/tmp/initramfs.img` (ASCII cpio归档使用gzip压缩) 18 | 19 | 如果你需要一个附带了常用命令的大initramfs,则使用`gen-initramfs.sh`代替`gen-minimal-initramfs.sh` 20 | 21 | ## 3. 生成测试镜像(只需要在第一次执行) 22 | 23 | ```bash 24 | bash scripts/gen-logfs.sh 25 | bash scripts/gen-miniroot.sh 26 | ``` 27 | 28 | 输出: `/tmp/logfs.img` (MBR分区表以及FAT16 文件系统)用于储存日志(LOGFS) 29 | 30 | 输出: `/tmp/minidisk.img` (EXT4文件系统镜像)用于测试switchroot 31 | 32 | ## 4. 运行QEMU 33 | 34 | ```bash 35 | bash scripts/qemu.sh 36 | ``` 37 | 38 | 注意: 你需要`prebuilts/vmlinuz`和`prebuilts/kernel.txz`用来启动Linux 39 | -------------------------------------------------------------------------------- /docs/zh/config/boot.configs.extra.md: -------------------------------------------------------------------------------- 1 | # boot.configs.?.extra 2 | 3 | 用于不同类型的启动项额外参数 4 | 5 | 类型: `KEY` (项) 6 | 7 | 支持的环境: `LINUX` | `UEFI` 8 | 9 | 10 | | 名称 | 链接 | 11 | |--------------------|---------------------------------------------------------------------| 12 | | `BOOT_UEFI_OPTION` | [boot.configs.extra@uefi_option](boot.configs.extra.uefi_option.md) | 13 | | `BOOT_SWITCHROOT` | [boot.configs.extra@switchroot](boot.configs.extra.switchroot.md) | 14 | | `BOOT_REBOOT` | [boot.configs.extra@reboot](boot.configs.extra.reboot.md) | 15 | | `BOOT_LINUX` | [boot.configs.extra@linux](boot.configs.extra.linux.md) | 16 | | `BOOT_EFI` | [boot.configs.extra@efi](boot.configs.extra.efi.md) | 17 | -------------------------------------------------------------------------------- /docs/zh/config/boot.configs.extra.reboot.md: -------------------------------------------------------------------------------- 1 | 引用: 2 | - [src/boot/reboot.c](../../../src/boot/reboot.c) 3 | 4 | # boot.configs.?.extra.arg 5 | 6 | 重启时的参数 7 | 8 | 条件: [boot.configs.?.mode](boot.configs.md)为`BOOT_REBOOT` 9 | 10 | 类型: `STRING` (字符串) 11 | 12 | 支持的环境: `UEFI` | `LINUX` 13 | -------------------------------------------------------------------------------- /docs/zh/config/boot.configs.extra.uefi_option.md: -------------------------------------------------------------------------------- 1 | 引用: 2 | - [src/boot/uefi_option.c](../../../src/boot/reboot.c) 3 | 4 | # boot.configs.?.extra.option 5 | 6 | UEFI启动项的ID (BootXXXX) 7 | 8 | 条件: [boot.configs.?.mode](boot.configs.md)为`BOOT_UEFI_OPTION` 9 | 10 | 类型: `INTEGER` (64位整型数字) 11 | 12 | 支持的环境: `UEFI` 13 | -------------------------------------------------------------------------------- /docs/zh/config/index.md: -------------------------------------------------------------------------------- 1 | # simple-init confd配置文档 2 | 3 | ## runtime 4 | 5 | 该键保留于程序运行时,不允许保存或从本地文件加载 6 | 7 | ## boot 8 | 9 | 用于储存simple-init启动选项,或启动菜单项 10 | 11 | 支持的环境: `LINUX` | `UEFI` 12 | 13 | 详细选项: [boot](boot.md) 14 | 15 | ## logger 16 | 17 | 用于储存Logger日志服务的特殊设置 18 | 19 | 支持的环境: `LINUX` | `UEFI` 20 | 21 | 详细选项: [logger](logger.md) 22 | 23 | ## uefi 24 | 25 | 用于储存UEFI下的特殊设置 26 | 27 | 支持的环境: `UEFI` 28 | 29 | 详细选项: [uefi](uefi.md) 30 | -------------------------------------------------------------------------------- /docs/zh/config/uefi.md: -------------------------------------------------------------------------------- 1 | # uefi 2 | 3 | 用于储存UEFI下的特殊设置 4 | 5 | 类型: `KEY` (项) 6 | 7 | 支持的环境: `UEFI` 8 | 9 | ## uefi.drivers 10 | 11 | 自动加载指定的UEFI DXE驱动 12 | 13 | 类型: `KEY` (项) 14 | 15 | 支持的环境: `UEFI` 16 | 17 | 引用: 18 | - [src/boot/drivers.c](../../../src/boot/drivers.c) 19 | 20 | ## uefi.drivers.? 21 | 22 | 自动加载指定的UEFI DXE驱动 23 | 24 | 取值: locate路径 [locates](locates.md) 25 | 26 | 类型: `STRING` (字符串) 27 | 28 | 支持的环境: `UEFI` 29 | 30 | 引用: 31 | - [src/boot/drivers.c](../../../src/boot/drivers.c) 32 | -------------------------------------------------------------------------------- /docs/zh/examples/logger.md: -------------------------------------------------------------------------------- 1 | # Logger日志示例 2 | 3 | ## 在新进程中,需要使用以下代码初始化日志服务 4 | 5 | ```C 6 | open_socket_logfd_default(); 7 | ``` 8 | 9 | ## 普通日志记录 10 | 11 | ```C 12 | #include"logger.h" 13 | #define TAG "test" 14 | 15 | void example_logger_1(void){ 16 | open_socket_logfd_default(); 17 | 18 | tlog_debug("This is a debug message"); 19 | 20 | tlog_notice("My PID is %d",getpid()); 21 | } 22 | ``` 23 | 24 | ``` 25 | [2021/12/22 17:54:11] test[100]: This is a debug message 26 | [2021/12/22 17:54:11] test[100]: My PID is 100 27 | ``` 28 | 29 | ## 捕获错误输出 30 | 31 | ```C 32 | #include"logger.h" 33 | #define TAG "test" 34 | 35 | void example_logger_2(void){ 36 | open_socket_logfd_default(); 37 | 38 | close(-1); 39 | telog_warn("close say"); 40 | } 41 | ``` 42 | 43 | ``` 44 | [2021/12/22 17:55:27] test[100]: close say: Bad file descriptor 45 | ``` 46 | -------------------------------------------------------------------------------- /docs/zh/index.md: -------------------------------------------------------------------------------- 1 | ## 构建指南 2 | 3 | 注意: 只支持在linux下编译 4 | 5 | ### [Linux](build/linux.md) 6 | 7 | ### [Linux调试](build/linux-native.md) 8 | 9 | ### [UEFI](build/uefi.md) 10 | 11 | ## 源码示例 12 | 13 | ### [简单的GUI APP](examples/simple-guiapp.md) 14 | 15 | ### [msgbox示例](examples/msgbox.md) 16 | 17 | ### [Logger日志示例](examples/logger.md) 18 | 19 | ## 配置指南 20 | 21 | ### [config](config/index.md) 22 | -------------------------------------------------------------------------------- /docs/zh/res/img1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BigfootACA/simple-init/3d66a6e78d519dd050fbebde4db6c5ac933f9aa4/docs/zh/res/img1.jpg -------------------------------------------------------------------------------- /docs/zh/res/img2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BigfootACA/simple-init/3d66a6e78d519dd050fbebde4db6c5ac933f9aa4/docs/zh/res/img2.jpg -------------------------------------------------------------------------------- /docs/zh/res/img3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BigfootACA/simple-init/3d66a6e78d519dd050fbebde4db6c5ac933f9aa4/docs/zh/res/img3.jpg -------------------------------------------------------------------------------- /include/KernelFdt.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef _KERNEL_FDT_H 3 | #define _KERNEL_FDT_H 4 | #include 5 | #include"fdtparser.h" 6 | #include"comp_libfdt.h" 7 | 8 | typedef struct _KERNEL_FDT_PROTOCOL { 9 | // 10 | // Device Tree pointer 11 | // 12 | fdt Fdt; 13 | 14 | // 15 | // Device Tree size 16 | // 17 | UINTN FdtSize; 18 | } KERNEL_FDT_PROTOCOL; 19 | 20 | extern EFI_GUID gKernelFdtProtocolGuid; 21 | #endif 22 | -------------------------------------------------------------------------------- /include/adbd.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2021 BigfootACA 4 | * 5 | * SPDX-License-Identifier: LGPL-3.0-or-later 6 | * 7 | */ 8 | 9 | #ifndef _ADBD_H 10 | #define _ADBD_H 11 | #include"list.h" 12 | #define LOCAL_CLIENT_PREFIX "linux-systemd-" 13 | enum adb_proto{ 14 | PROTO_NONE=0, 15 | PROTO_USB, 16 | PROTO_TCP 17 | }; 18 | struct adb_data{ 19 | char shell[512]; 20 | char banner[64]; 21 | char ffs[1024]; 22 | bool auth_enabled; 23 | int port; 24 | int notifyfd; 25 | int local_port; 26 | enum adb_proto proto; 27 | list*prop; 28 | }; 29 | extern int init_adb_data(struct adb_data*d); 30 | extern int free_adb_data(struct adb_data*d); 31 | extern int adbd_init(struct adb_data*data); 32 | #ifdef _GADGET_H 33 | extern int gadget_add_func_adbd(gadget*gadget,char*name,char*path); 34 | #endif 35 | #endif 36 | -------------------------------------------------------------------------------- /include/getopt.h: -------------------------------------------------------------------------------- 1 | #ifndef _GETOPT_H 2 | #define _GETOPT_H 3 | struct option{ 4 | const char*name; 5 | int has_arg; 6 | int*flag; 7 | int val; 8 | }; 9 | extern char *b_optarg; 10 | extern int b_optind; 11 | extern int b_opterr; 12 | extern int b_optopt; 13 | extern int b_optreset; 14 | extern int b_getopt( 15 | int argc, 16 | char*const*argv, 17 | const char*optstring 18 | ); 19 | extern int b_getlopt( 20 | int argc, 21 | char*const*argv, 22 | const char*optstring, 23 | const struct option*longopts, 24 | int*idx 25 | ); 26 | extern int b_getlopt_only( 27 | int argc, 28 | char*const*argv, 29 | const char*optstring, 30 | const struct option*longopts, 31 | int*idx 32 | ); 33 | #define no_argument 0 34 | #define required_argument 1 35 | #define optional_argument 2 36 | #endif 37 | -------------------------------------------------------------------------------- /include/gui/clipboard.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2021 BigfootACA 4 | * 5 | * SPDX-License-Identifier: LGPL-3.0-or-later 6 | * 7 | */ 8 | 9 | #ifndef _CLIPBOARD_H 10 | #define _CLIPBOARD_H 11 | 12 | enum clipboard_type{ 13 | CLIP_NULL, 14 | CLIP_TEXT, 15 | CLIP_FILE, 16 | }; 17 | 18 | extern void clipboard_reset(void); 19 | extern void clipboard_clear(void); 20 | extern void clipboard_init(void); 21 | extern int clipboard_set(enum clipboard_type type,const char*content,size_t len); 22 | extern enum clipboard_type clipboard_get_type(void); 23 | extern char*clipboard_get_content(void); 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /include/gui/fileopen.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2021 BigfootACA 4 | * 5 | * SPDX-License-Identifier: LGPL-3.0-or-later 6 | * 7 | */ 8 | 9 | #ifndef FILEOPEN_H 10 | #define FILEOPEN_H 11 | #include"filesystem.h" 12 | 13 | // src/gui/interface/filemgr/fileopen.c: show a dialog to choose file open method 14 | extern void fileopen_open(const char*path); 15 | 16 | // src/gui/interface/filemgr/fileopen.c: show a dialog to choose file open method with url 17 | extern void fileopen_open_url(url*uri); 18 | 19 | // src/gui/interface/filemgr/fileopen.c: show a dialog to choose file open method with fsh 20 | extern void fileopen_open_fsh(fsh*f); 21 | #endif 22 | -------------------------------------------------------------------------------- /include/gui/font.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2021 BigfootACA 4 | * 5 | * SPDX-License-Identifier: LGPL-3.0-or-later 6 | * 7 | */ 8 | 9 | #ifndef _FONT_H 10 | #define _FONT_H 11 | #include"gui.h" 12 | typedef enum{ 13 | FT_FONT_STYLE_NORMAL = 0, 14 | FT_FONT_STYLE_ITALIC = 1<<0, 15 | FT_FONT_STYLE_BOLD = 1<<1 16 | }lv_ft_style; 17 | extern void lv_ft_destroy(lv_font_t*font); 18 | extern bool lv_freetype_init(uint16_t max_faces, uint16_t max_sizes, uint32_t max_bytes); 19 | extern void lv_freetype_destroy(void); 20 | extern lv_font_t*lv_ft_init(const char*name,int weight,lv_ft_style style); 21 | extern lv_font_t*lv_ft_init_data(unsigned char*data,long size,int weight,lv_ft_style style); 22 | #ifdef ASSETS_H 23 | extern lv_font_t*lv_ft_init_assets(entry_dir*assets,char*path,int weight,lv_ft_style style); 24 | #endif 25 | extern lv_font_t*lv_ft_init_rootfs(char*path,int weight,lv_ft_style style); 26 | #endif 27 | -------------------------------------------------------------------------------- /include/gui/splash.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2021 BigfootACA 4 | * 5 | * SPDX-License-Identifier: LGPL-3.0-or-later 6 | * 7 | */ 8 | 9 | #ifndef _SPLASH_H 10 | #define _SPLASH_H 11 | #include"gui.h" 12 | extern int gui_splash_draw(); 13 | extern void gui_splash_exit(bool out,lv_async_cb_t after_exit); 14 | extern void gui_splash_set_text(bool out,const char*fmt,...); 15 | #endif 16 | -------------------------------------------------------------------------------- /include/locate.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2021 BigfootACA 4 | * 5 | * SPDX-License-Identifier: LGPL-3.0-or-later 6 | * 7 | */ 8 | 9 | #ifndef _LOCATE_H 10 | #define _LOCATE_H 11 | #include 12 | #include 13 | 14 | // src/locate/locate.c: find a available locate name 15 | extern char*locate_find_name(char*buf,size_t len); 16 | 17 | // src/locate/locate.c: find a efi handle by locate tag name 18 | extern EFI_HANDLE*locate_get_handle_by_tag(const char*tag); 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /include/proctitle.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2021 BigfootACA 4 | * 5 | * SPDX-License-Identifier: LGPL-3.0-or-later 6 | * 7 | */ 8 | 9 | #ifndef PROCTITLE_H 10 | #define PROCTITLE_H 11 | 12 | // src/lib/proctitle.c: copy environ 13 | extern int spt_copyenv(char*oldenv[]); 14 | 15 | // src/lib/proctitle.c: copy argvs 16 | extern int spt_copyargs(int argc,char*argv[]); 17 | 18 | // src/lib/proctitle.c: init proctitle 19 | extern void spt_init(int argc,char*argv[]); 20 | 21 | // src/lib/proctitle.c: set proctitle 22 | extern void setproctitle(const char*fmt,...) __attribute__((format(printf,1,2)));; 23 | #endif 24 | -------------------------------------------------------------------------------- /include/recovery.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2021 BigfootACA 4 | * 5 | * SPDX-License-Identifier: LGPL-3.0-or-later 6 | * 7 | */ 8 | 9 | #ifndef _RECOVERY_H 10 | #define _RECOVERY_H 11 | extern int recovery_out_fd; 12 | extern void recovery_ui_print(const char*str); 13 | extern void recovery_progress(const float frac,const int sec); 14 | extern void recovery_set_progress(const float frac); 15 | extern void recovery_log(const char*str); 16 | extern void recovery_clear_display(); 17 | extern void recovery_ui_printf(const char*fmt,...); 18 | extern void recovery_logf(const char*fmt,...); 19 | #endif 20 | -------------------------------------------------------------------------------- /libs/compatible/__expo2.c: -------------------------------------------------------------------------------- 1 | #include "math.h" 2 | 3 | /* k is such that k*ln2 has minimal relative error and x - kln2 > log(DBL_MIN) */ 4 | static const int k = 2043; 5 | static const double kln2 = 0x1.62066151add8bp+10; 6 | 7 | /* exp(x)/2 for x >= log(DBL_MAX), slightly better than 0.5*exp(x/2)*exp(x/2) */ 8 | weak_decl double __expo2(double x, double sign) 9 | { 10 | double scale; 11 | 12 | /* note that k is odd and scale*scale overflows */ 13 | INSERT_WORDS(scale, (uint32_t)(0x3ff + k/2) << 20, 0); 14 | /* exp(x - k ln2) * 2**(k-1) */ 15 | /* in directed rounding correct sign before rounding or overflow is important */ 16 | return exp(x - kln2) * (sign * scale) * scale; 17 | } 18 | -------------------------------------------------------------------------------- /libs/compatible/aarch64/lse.S: -------------------------------------------------------------------------------- 1 | .globl __aarch64_cas4_sync 2 | __aarch64_cas4_sync: 3 | mov w16, w0 4 | ldxr w0, [x2] 5 | cmp w0, w16 6 | 0: bne 1f 7 | 8 | stlxr w17, w1, [x2] 9 | cbnz w17, 0b 10 | 1: ret 11 | -------------------------------------------------------------------------------- /libs/compatible/abs.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | weak_decl int abs(int a) 4 | { 5 | return a>0 ? a : -a; 6 | } 7 | -------------------------------------------------------------------------------- /libs/compatible/ctype.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "compatible.h" 3 | weak_decl int isspace(int c){return c==' '||(unsigned)c-'\t'<5;} 4 | weak_decl int isupper(int c){return (unsigned)c-'A'<26;} 5 | weak_decl int islower(int c){return (unsigned)c-'a'<26;} 6 | weak_decl int isalpha(int c){return ((unsigned)c|32)-'a'<26;} 7 | weak_decl int isdigit(int c){return (unsigned)c-'0'<10;} 8 | weak_decl int isxdigit(int c){return isdigit(c)||((unsigned)c|32)-'a' < 6;} 9 | weak_decl int isalnum(int c){return isalpha(c)||isdigit(c);} 10 | weak_decl int iscntrl(int c){return (unsigned)c<0x20||c==0x7f;} 11 | weak_decl int isgraph(int c){return (unsigned)c-0x21<0x5e;} 12 | weak_decl int ispunct(int c){return isgraph(c)&&!isalnum(c);} 13 | weak_decl int toupper(int c){return (islower(c))?(c&0x5f):c;} 14 | weak_decl int tolower(int c){return (isupper(c))?(c|32):c;} 15 | weak_decl int isprint(int c){return (unsigned)c-0x20<0x5f;} -------------------------------------------------------------------------------- /libs/compatible/exit.c: -------------------------------------------------------------------------------- 1 | #include "setjmp.h" 2 | #include "stdlib.h" 3 | #include 4 | #include 5 | extern int main_retval; 6 | extern jmp_buf main_exit; 7 | weak_decl void exit(int status){ 8 | main_retval = status; // Save our exit status. Allows a status of 0. 9 | longjmp(main_exit, 0x55); // Get out of here. longjmp can't return 0. Use 0x55 for a non-zero value. 10 | #ifdef __GNUC__ 11 | __builtin_unreachable (); // Keep GCC happy 12 | #endif 13 | } 14 | weak_decl void abort(void){ 15 | // FUCK YOU 16 | Print(L"FATAL ERROR\n"); 17 | DEBUG((EFI_D_ERROR,"FATAL ERROR\n")); 18 | *((volatile int*)0)=0; 19 | ASSERT(FALSE); 20 | CpuDeadLoop(); 21 | #ifdef __GNUC__ 22 | __builtin_unreachable (); // Keep GCC happy 23 | #endif 24 | } 25 | -------------------------------------------------------------------------------- /libs/compatible/fabs.c: -------------------------------------------------------------------------------- 1 | 2 | #include "math.h" 3 | #include "limits.h" 4 | 5 | weak_decl double fabs(double x) 6 | { 7 | union {double f; uint64_t i;} u = {x}; 8 | u.i &= -1ULL/2; 9 | return u.f; 10 | } 11 | 12 | weak_decl float fabsf(float x) 13 | { 14 | union {float f; uint32_t i;} u = {x}; 15 | u.i &= 0x7fffffff; 16 | return u.f; 17 | } 18 | -------------------------------------------------------------------------------- /libs/compatible/frexp.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | weak_decl double frexp(double x, int *e) 5 | { 6 | union { double d; uint64_t i; } y = { x }; 7 | int ee = y.i>>52 & 0x7ff; 8 | 9 | if (!ee) { 10 | if (x) { 11 | x = frexp(x*0x1p64, e); 12 | *e -= 64; 13 | } else *e = 0; 14 | return x; 15 | } else if (ee == 0x7ff) { 16 | return x; 17 | } 18 | 19 | *e = ee - 0x3fe; 20 | y.i &= 0x800fffffffffffffull; 21 | y.i |= 0x3fe0000000000000ull; 22 | return y.d; 23 | } 24 | -------------------------------------------------------------------------------- /libs/compatible/include/arch/aarch64/bits/fenv.h: -------------------------------------------------------------------------------- 1 | #define FE_INVALID 1 2 | #define FE_DIVBYZERO 2 3 | #define FE_OVERFLOW 4 4 | #define FE_UNDERFLOW 8 5 | #define FE_INEXACT 16 6 | #define FE_ALL_EXCEPT 31 7 | #define FE_TONEAREST 0 8 | #define FE_DOWNWARD 0x800000 9 | #define FE_UPWARD 0x400000 10 | #define FE_TOWARDZERO 0xc00000 11 | 12 | typedef unsigned int fexcept_t; 13 | 14 | typedef struct { 15 | unsigned int __fpcr; 16 | unsigned int __fpsr; 17 | } fenv_t; 18 | 19 | #define FE_DFL_ENV ((const fenv_t *) -1) 20 | -------------------------------------------------------------------------------- /libs/compatible/include/arch/aarch64/bits/float.h: -------------------------------------------------------------------------------- 1 | #define FLT_EVAL_METHOD 0 2 | 3 | #define LDBL_TRUE_MIN 6.47517511943802511092443895822764655e-4966L 4 | #define LDBL_MIN 3.36210314311209350626267781732175260e-4932L 5 | #define LDBL_MAX 1.18973149535723176508575932662800702e+4932L 6 | #define LDBL_EPSILON 1.92592994438723585305597794258492732e-34L 7 | 8 | #define LDBL_MANT_DIG 113 9 | #define LDBL_MIN_EXP (-16381) 10 | #define LDBL_MAX_EXP 16384 11 | 12 | #define LDBL_DIG 33 13 | #define LDBL_MIN_10_EXP (-4931) 14 | #define LDBL_MAX_10_EXP 4932 15 | 16 | #define DECIMAL_DIG 36 17 | -------------------------------------------------------------------------------- /libs/compatible/include/arch/aarch64/bits/posix.h: -------------------------------------------------------------------------------- 1 | #define _POSIX_V6_LP64_OFF64 1 2 | #define _POSIX_V7_LP64_OFF64 1 3 | -------------------------------------------------------------------------------- /libs/compatible/include/arch/aarch64/bits/reg.h: -------------------------------------------------------------------------------- 1 | #undef __WORDSIZE 2 | #define __WORDSIZE 64 3 | -------------------------------------------------------------------------------- /libs/compatible/include/arch/aarch64/bits/setjmp.h: -------------------------------------------------------------------------------- 1 | typedef unsigned long __jmp_buf[22]; 2 | -------------------------------------------------------------------------------- /libs/compatible/include/arch/aarch64/bits/stat.h: -------------------------------------------------------------------------------- 1 | struct stat { 2 | dev_t st_dev; 3 | ino_t st_ino; 4 | mode_t st_mode; 5 | nlink_t st_nlink; 6 | uid_t st_uid; 7 | gid_t st_gid; 8 | dev_t st_rdev; 9 | unsigned long __pad; 10 | off_t st_size; 11 | blksize_t st_blksize; 12 | int __pad2; 13 | blkcnt_t st_blocks; 14 | struct timespec st_atim; 15 | struct timespec st_mtim; 16 | struct timespec st_ctim; 17 | unsigned __unused[2]; 18 | }; 19 | -------------------------------------------------------------------------------- /libs/compatible/include/arch/aarch64/bits/stdint.h: -------------------------------------------------------------------------------- 1 | typedef int32_t int_fast16_t; 2 | typedef int32_t int_fast32_t; 3 | typedef uint32_t uint_fast16_t; 4 | typedef uint32_t uint_fast32_t; 5 | 6 | #define INT_FAST16_MIN INT32_MIN 7 | #define INT_FAST32_MIN INT32_MIN 8 | 9 | #define INT_FAST16_MAX INT32_MAX 10 | #define INT_FAST32_MAX INT32_MAX 11 | 12 | #define UINT_FAST16_MAX UINT32_MAX 13 | #define UINT_FAST32_MAX UINT32_MAX 14 | 15 | #define INTPTR_MIN INT64_MIN 16 | #define INTPTR_MAX INT64_MAX 17 | #define UINTPTR_MAX UINT64_MAX 18 | #define PTRDIFF_MIN INT64_MIN 19 | #define PTRDIFF_MAX INT64_MAX 20 | #define SIZE_MAX UINT64_MAX 21 | -------------------------------------------------------------------------------- /libs/compatible/include/arch/aarch64/bits/user.h: -------------------------------------------------------------------------------- 1 | struct user_regs_struct { 2 | unsigned long long regs[31]; 3 | unsigned long long sp; 4 | unsigned long long pc; 5 | unsigned long long pstate; 6 | }; 7 | 8 | struct user_fpsimd_struct { 9 | __uint128_t vregs[32]; 10 | unsigned int fpsr; 11 | unsigned int fpcr; 12 | }; 13 | 14 | #define ELF_NREG 34 15 | typedef unsigned long elf_greg_t, elf_gregset_t[ELF_NREG]; 16 | typedef struct user_fpsimd_struct elf_fpregset_t; 17 | -------------------------------------------------------------------------------- /libs/compatible/include/arch/aarch64/fp_arch.h: -------------------------------------------------------------------------------- 1 | #define fp_barrierf fp_barrierf 2 | static inline float fp_barrierf(float x) 3 | { 4 | __asm__ __volatile__ ("" : "+w"(x)); 5 | return x; 6 | } 7 | 8 | #define fp_barrier fp_barrier 9 | static inline double fp_barrier(double x) 10 | { 11 | __asm__ __volatile__ ("" : "+w"(x)); 12 | return x; 13 | } 14 | 15 | #define fp_force_evalf fp_force_evalf 16 | static inline void fp_force_evalf(float x) 17 | { 18 | __asm__ __volatile__ ("" : "+w"(x)); 19 | } 20 | 21 | #define fp_force_eval fp_force_eval 22 | static inline void fp_force_eval(double x) 23 | { 24 | __asm__ __volatile__ ("" : "+w"(x)); 25 | } 26 | -------------------------------------------------------------------------------- /libs/compatible/include/arch/aarch64/gd_qnan.h: -------------------------------------------------------------------------------- 1 | /* $NetBSD: gd_qnan.h,v 1.1 2006/01/25 15:33:28 kleink Exp $ */ 2 | 3 | #define f_QNAN 0x7fc00000 4 | #define d_QNAN0 0x0 5 | #define d_QNAN1 0x7ff80000 6 | -------------------------------------------------------------------------------- /libs/compatible/include/arch/aarch64/reloc.h: -------------------------------------------------------------------------------- 1 | #if __BYTE_ORDER == __BIG_ENDIAN 2 | #define ENDIAN_SUFFIX "_be" 3 | #else 4 | #define ENDIAN_SUFFIX "" 5 | #endif 6 | 7 | #define LDSO_ARCH "aarch64" ENDIAN_SUFFIX 8 | 9 | #define NO_LEGACY_INITFINI 10 | 11 | #define TPOFF_K 0 12 | 13 | #define REL_SYMBOLIC R_AARCH64_ABS64 14 | #define REL_GOT R_AARCH64_GLOB_DAT 15 | #define REL_PLT R_AARCH64_JUMP_SLOT 16 | #define REL_RELATIVE R_AARCH64_RELATIVE 17 | #define REL_COPY R_AARCH64_COPY 18 | #define REL_DTPMOD R_AARCH64_TLS_DTPMOD64 19 | #define REL_DTPOFF R_AARCH64_TLS_DTPREL64 20 | #define REL_TPOFF R_AARCH64_TLS_TPREL64 21 | #define REL_TLSDESC R_AARCH64_TLSDESC 22 | 23 | #define CRTJMP(pc,sp) __asm__ __volatile__( \ 24 | "mov sp,%1 ; br %0" : : "r"(pc), "r"(sp) : "memory" ) 25 | -------------------------------------------------------------------------------- /libs/compatible/include/arch/arm/bits/fenv.h: -------------------------------------------------------------------------------- 1 | #ifndef __ARM_PCS_VFP 2 | #define FE_ALL_EXCEPT 0 3 | #define FE_TONEAREST 0 4 | #else 5 | #define FE_INVALID 1 6 | #define FE_DIVBYZERO 2 7 | #define FE_OVERFLOW 4 8 | #define FE_UNDERFLOW 8 9 | #define FE_INEXACT 16 10 | #define FE_ALL_EXCEPT 31 11 | #define FE_TONEAREST 0 12 | #define FE_DOWNWARD 0x800000 13 | #define FE_UPWARD 0x400000 14 | #define FE_TOWARDZERO 0xc00000 15 | #endif 16 | 17 | typedef unsigned long fexcept_t; 18 | 19 | typedef struct { 20 | unsigned long __cw; 21 | } fenv_t; 22 | 23 | #define FE_DFL_ENV ((const fenv_t *) -1) 24 | -------------------------------------------------------------------------------- /libs/compatible/include/arch/arm/bits/float.h: -------------------------------------------------------------------------------- 1 | #define FLT_EVAL_METHOD 0 2 | 3 | #define LDBL_TRUE_MIN 4.94065645841246544177e-324L 4 | #define LDBL_MIN 2.22507385850720138309e-308L 5 | #define LDBL_MAX 1.79769313486231570815e+308L 6 | #define LDBL_EPSILON 2.22044604925031308085e-16L 7 | 8 | #define LDBL_MANT_DIG 53 9 | #define LDBL_MIN_EXP (-1021) 10 | #define LDBL_MAX_EXP 1024 11 | 12 | #define LDBL_DIG 15 13 | #define LDBL_MIN_10_EXP (-307) 14 | #define LDBL_MAX_10_EXP 308 15 | 16 | #define DECIMAL_DIG 17 17 | -------------------------------------------------------------------------------- /libs/compatible/include/arch/arm/bits/msg.h: -------------------------------------------------------------------------------- 1 | struct msqid_ds { 2 | struct ipc_perm msg_perm; 3 | unsigned long __msg_stime_lo; 4 | unsigned long __msg_stime_hi; 5 | unsigned long __msg_rtime_lo; 6 | unsigned long __msg_rtime_hi; 7 | unsigned long __msg_ctime_lo; 8 | unsigned long __msg_ctime_hi; 9 | unsigned long msg_cbytes; 10 | msgqnum_t msg_qnum; 11 | msglen_t msg_qbytes; 12 | pid_t msg_lspid; 13 | pid_t msg_lrpid; 14 | unsigned long __unused[2]; 15 | time_t msg_stime; 16 | time_t msg_rtime; 17 | time_t msg_ctime; 18 | }; 19 | -------------------------------------------------------------------------------- /libs/compatible/include/arch/arm/bits/posix.h: -------------------------------------------------------------------------------- 1 | #define _POSIX_V6_ILP32_OFFBIG 1 2 | #define _POSIX_V7_ILP32_OFFBIG 1 3 | -------------------------------------------------------------------------------- /libs/compatible/include/arch/arm/bits/reg.h: -------------------------------------------------------------------------------- 1 | #undef __WORDSIZE 2 | #define __WORDSIZE 32 3 | /* FIXME */ 4 | -------------------------------------------------------------------------------- /libs/compatible/include/arch/arm/bits/setjmp.h: -------------------------------------------------------------------------------- 1 | typedef unsigned long long __jmp_buf[32]; 2 | -------------------------------------------------------------------------------- /libs/compatible/include/arch/arm/bits/stat.h: -------------------------------------------------------------------------------- 1 | /* copied from kernel definition, but with padding replaced 2 | * by the corresponding correctly-sized userspace types. */ 3 | 4 | struct stat { 5 | dev_t st_dev; 6 | int __st_dev_padding; 7 | long __st_ino_truncated; 8 | mode_t st_mode; 9 | nlink_t st_nlink; 10 | uid_t st_uid; 11 | gid_t st_gid; 12 | dev_t st_rdev; 13 | int __st_rdev_padding; 14 | off_t st_size; 15 | blksize_t st_blksize; 16 | blkcnt_t st_blocks; 17 | struct { 18 | long tv_sec; 19 | long tv_nsec; 20 | } __st_atim32, __st_mtim32, __st_ctim32; 21 | ino_t st_ino; 22 | struct timespec st_atim; 23 | struct timespec st_mtim; 24 | struct timespec st_ctim; 25 | }; 26 | -------------------------------------------------------------------------------- /libs/compatible/include/arch/arm/bits/stdint.h: -------------------------------------------------------------------------------- 1 | typedef int32_t int_fast16_t; 2 | typedef int32_t int_fast32_t; 3 | typedef uint32_t uint_fast16_t; 4 | typedef uint32_t uint_fast32_t; 5 | 6 | #define INT_FAST16_MIN INT32_MIN 7 | #define INT_FAST32_MIN INT32_MIN 8 | 9 | #define INT_FAST16_MAX INT32_MAX 10 | #define INT_FAST32_MAX INT32_MAX 11 | 12 | #define UINT_FAST16_MAX UINT32_MAX 13 | #define UINT_FAST32_MAX UINT32_MAX 14 | 15 | #define INTPTR_MIN INT32_MIN 16 | #define INTPTR_MAX INT32_MAX 17 | #define UINTPTR_MAX UINT32_MAX 18 | #define PTRDIFF_MIN INT32_MIN 19 | #define PTRDIFF_MAX INT32_MAX 20 | #define SIZE_MAX UINT32_MAX 21 | -------------------------------------------------------------------------------- /libs/compatible/include/arch/arm/bits/user.h: -------------------------------------------------------------------------------- 1 | typedef struct user_fpregs { 2 | struct fp_reg { 3 | unsigned sign1:1; 4 | unsigned unused:15; 5 | unsigned sign2:1; 6 | unsigned exponent:14; 7 | unsigned j:1; 8 | unsigned mantissa1:31; 9 | unsigned mantissa0:32; 10 | } fpregs[8]; 11 | unsigned fpsr:32; 12 | unsigned fpcr:32; 13 | unsigned char ftype[8]; 14 | unsigned int init_flag; 15 | } elf_fpregset_t; 16 | 17 | struct user_regs { 18 | unsigned long uregs[18]; 19 | }; 20 | #define ELF_NGREG 18 21 | typedef unsigned long elf_greg_t, elf_gregset_t[ELF_NGREG]; 22 | 23 | struct user { 24 | struct user_regs regs; 25 | int u_fpvalid; 26 | unsigned long u_tsize, u_dsize, u_ssize; 27 | unsigned long start_code, start_stack; 28 | long signal; 29 | int reserved; 30 | struct user_regs *u_ar0; 31 | unsigned long magic; 32 | char u_comm[32]; 33 | int u_debugreg[8]; 34 | struct user_fpregs u_fp; 35 | struct user_fpregs *u_fp0; 36 | }; 37 | -------------------------------------------------------------------------------- /libs/compatible/include/arch/arm/gd_qnan.h: -------------------------------------------------------------------------------- 1 | /* $NetBSD: gd_qnan.h,v 1.1 2006/01/25 15:33:28 kleink Exp $ */ 2 | 3 | #define f_QNAN 0x7fc00000 4 | #ifdef __ARMEB__ 5 | #define d_QNAN0 0x7ff80000 6 | #define d_QNAN1 0x0 7 | #else 8 | #define d_QNAN0 0x0 9 | #define d_QNAN1 0x7ff80000 10 | #endif 11 | -------------------------------------------------------------------------------- /libs/compatible/include/arch/arm/reloc.h: -------------------------------------------------------------------------------- 1 | #if __BYTE_ORDER == __BIG_ENDIAN 2 | #define ENDIAN_SUFFIX "eb" 3 | #else 4 | #define ENDIAN_SUFFIX "" 5 | #endif 6 | 7 | #if __ARM_PCS_VFP 8 | #define FP_SUFFIX "hf" 9 | #else 10 | #define FP_SUFFIX "" 11 | #endif 12 | 13 | #define LDSO_ARCH "arm" ENDIAN_SUFFIX FP_SUFFIX 14 | 15 | #define NO_LEGACY_INITFINI 16 | 17 | #define TPOFF_K 0 18 | 19 | #define REL_SYMBOLIC R_ARM_ABS32 20 | #define REL_GOT R_ARM_GLOB_DAT 21 | #define REL_PLT R_ARM_JUMP_SLOT 22 | #define REL_RELATIVE R_ARM_RELATIVE 23 | #define REL_COPY R_ARM_COPY 24 | #define REL_DTPMOD R_ARM_TLS_DTPMOD32 25 | #define REL_DTPOFF R_ARM_TLS_DTPOFF32 26 | #define REL_TPOFF R_ARM_TLS_TPOFF32 27 | #define REL_TLSDESC R_ARM_TLS_DESC 28 | 29 | #define TLSDESC_BACKWARDS 30 | 31 | #define CRTJMP(pc,sp) __asm__ __volatile__( \ 32 | "mov sp,%1 ; bx %0" : : "r"(pc), "r"(sp) : "memory" ) 33 | -------------------------------------------------------------------------------- /libs/compatible/include/arch/generic/bits/dirent.h: -------------------------------------------------------------------------------- 1 | #define _DIRENT_HAVE_D_RECLEN 2 | #define _DIRENT_HAVE_D_OFF 3 | #define _DIRENT_HAVE_D_TYPE 4 | 5 | struct dirent { 6 | ino_t d_ino; 7 | off_t d_off; 8 | unsigned short d_reclen; 9 | unsigned char d_type; 10 | char d_name[256]; 11 | }; 12 | -------------------------------------------------------------------------------- /libs/compatible/include/arch/generic/bits/fenv.h: -------------------------------------------------------------------------------- 1 | #define FE_ALL_EXCEPT 0 2 | #define FE_TONEAREST 0 3 | 4 | typedef unsigned long fexcept_t; 5 | 6 | typedef struct { 7 | unsigned long __cw; 8 | } fenv_t; 9 | 10 | #define FE_DFL_ENV ((const fenv_t *) -1) 11 | -------------------------------------------------------------------------------- /libs/compatible/include/arch/generic/bits/kd.h: -------------------------------------------------------------------------------- 1 | #include 2 | -------------------------------------------------------------------------------- /libs/compatible/include/arch/generic/bits/limits.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BigfootACA/simple-init/3d66a6e78d519dd050fbebde4db6c5ac933f9aa4/libs/compatible/include/arch/generic/bits/limits.h -------------------------------------------------------------------------------- /libs/compatible/include/arch/generic/bits/link.h: -------------------------------------------------------------------------------- 1 | typedef uint32_t Elf_Symndx; 2 | -------------------------------------------------------------------------------- /libs/compatible/include/arch/generic/bits/msg.h: -------------------------------------------------------------------------------- 1 | struct msqid_ds { 2 | struct ipc_perm msg_perm; 3 | time_t msg_stime; 4 | time_t msg_rtime; 5 | time_t msg_ctime; 6 | unsigned long msg_cbytes; 7 | msgqnum_t msg_qnum; 8 | msglen_t msg_qbytes; 9 | pid_t msg_lspid; 10 | pid_t msg_lrpid; 11 | unsigned long __unused[2]; 12 | }; 13 | -------------------------------------------------------------------------------- /libs/compatible/include/arch/generic/bits/poll.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BigfootACA/simple-init/3d66a6e78d519dd050fbebde4db6c5ac933f9aa4/libs/compatible/include/arch/generic/bits/poll.h -------------------------------------------------------------------------------- /libs/compatible/include/arch/generic/bits/statfs.h: -------------------------------------------------------------------------------- 1 | struct statfs { 2 | unsigned long f_type, f_bsize; 3 | fsblkcnt_t f_blocks, f_bfree, f_bavail; 4 | fsfilcnt_t f_files, f_ffree; 5 | fsid_t f_fsid; 6 | unsigned long f_namelen, f_frsize, f_flags, f_spare[4]; 7 | }; 8 | -------------------------------------------------------------------------------- /libs/compatible/include/arch/generic/fp_arch.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BigfootACA/simple-init/3d66a6e78d519dd050fbebde4db6c5ac933f9aa4/libs/compatible/include/arch/generic/fp_arch.h -------------------------------------------------------------------------------- /libs/compatible/include/arch/i386/bits/fenv.h: -------------------------------------------------------------------------------- 1 | #define FE_INVALID 1 2 | #define __FE_DENORM 2 3 | #define FE_DIVBYZERO 4 4 | #define FE_OVERFLOW 8 5 | #define FE_UNDERFLOW 16 6 | #define FE_INEXACT 32 7 | 8 | #define FE_ALL_EXCEPT 63 9 | 10 | #define FE_TONEAREST 0 11 | #define FE_DOWNWARD 0x400 12 | #define FE_UPWARD 0x800 13 | #define FE_TOWARDZERO 0xc00 14 | 15 | typedef unsigned short fexcept_t; 16 | 17 | typedef struct { 18 | unsigned short __control_word; 19 | unsigned short __unused1; 20 | unsigned short __status_word; 21 | unsigned short __unused2; 22 | unsigned short __tags; 23 | unsigned short __unused3; 24 | unsigned int __eip; 25 | unsigned short __cs_selector; 26 | unsigned int __opcode:11; 27 | unsigned int __unused4:5; 28 | unsigned int __data_offset; 29 | unsigned short __data_selector; 30 | unsigned short __unused5; 31 | } fenv_t; 32 | 33 | #define FE_DFL_ENV ((const fenv_t *) -1) 34 | -------------------------------------------------------------------------------- /libs/compatible/include/arch/i386/bits/float.h: -------------------------------------------------------------------------------- 1 | #ifdef __FLT_EVAL_METHOD__ 2 | #define FLT_EVAL_METHOD __FLT_EVAL_METHOD__ 3 | #else 4 | #define FLT_EVAL_METHOD 2 5 | #endif 6 | 7 | #define LDBL_TRUE_MIN 3.6451995318824746025e-4951L 8 | #define LDBL_MIN 3.3621031431120935063e-4932L 9 | #define LDBL_MAX 1.1897314953572317650e+4932L 10 | #define LDBL_EPSILON 1.0842021724855044340e-19L 11 | 12 | #define LDBL_MANT_DIG 64 13 | #define LDBL_MIN_EXP (-16381) 14 | #define LDBL_MAX_EXP 16384 15 | 16 | #define LDBL_DIG 18 17 | #define LDBL_MIN_10_EXP (-4931) 18 | #define LDBL_MAX_10_EXP 4932 19 | 20 | #define DECIMAL_DIG 21 21 | -------------------------------------------------------------------------------- /libs/compatible/include/arch/i386/bits/limits.h: -------------------------------------------------------------------------------- 1 | #define PAGESIZE 4096 2 | -------------------------------------------------------------------------------- /libs/compatible/include/arch/i386/bits/msg.h: -------------------------------------------------------------------------------- 1 | struct msqid_ds { 2 | struct ipc_perm msg_perm; 3 | unsigned long __msg_stime_lo; 4 | unsigned long __msg_stime_hi; 5 | unsigned long __msg_rtime_lo; 6 | unsigned long __msg_rtime_hi; 7 | unsigned long __msg_ctime_lo; 8 | unsigned long __msg_ctime_hi; 9 | unsigned long msg_cbytes; 10 | msgqnum_t msg_qnum; 11 | msglen_t msg_qbytes; 12 | pid_t msg_lspid; 13 | pid_t msg_lrpid; 14 | unsigned long __unused[2]; 15 | time_t msg_stime; 16 | time_t msg_rtime; 17 | time_t msg_ctime; 18 | }; 19 | -------------------------------------------------------------------------------- /libs/compatible/include/arch/i386/bits/posix.h: -------------------------------------------------------------------------------- 1 | #define _POSIX_V6_ILP32_OFFBIG 1 2 | #define _POSIX_V7_ILP32_OFFBIG 1 3 | -------------------------------------------------------------------------------- /libs/compatible/include/arch/i386/bits/reg.h: -------------------------------------------------------------------------------- 1 | #undef __WORDSIZE 2 | #define __WORDSIZE 32 3 | #define EBX 0 4 | #define ECX 1 5 | #define EDX 2 6 | #define ESI 3 7 | #define EDI 4 8 | #define EBP 5 9 | #define EAX 6 10 | #define DS 7 11 | #define ES 8 12 | #define FS 9 13 | #define GS 10 14 | #define ORIG_EAX 11 15 | #define EIP 12 16 | #define CS 13 17 | #define EFL 14 18 | #define UESP 15 19 | #define SS 16 20 | -------------------------------------------------------------------------------- /libs/compatible/include/arch/i386/bits/setjmp.h: -------------------------------------------------------------------------------- 1 | typedef unsigned long __jmp_buf[6]; 2 | -------------------------------------------------------------------------------- /libs/compatible/include/arch/i386/bits/stat.h: -------------------------------------------------------------------------------- 1 | /* copied from kernel definition, but with padding replaced 2 | * by the corresponding correctly-sized userspace types. */ 3 | 4 | struct stat { 5 | dev_t st_dev; 6 | int __st_dev_padding; 7 | long __st_ino_truncated; 8 | mode_t st_mode; 9 | nlink_t st_nlink; 10 | uid_t st_uid; 11 | gid_t st_gid; 12 | dev_t st_rdev; 13 | int __st_rdev_padding; 14 | off_t st_size; 15 | blksize_t st_blksize; 16 | blkcnt_t st_blocks; 17 | struct { 18 | long tv_sec; 19 | long tv_nsec; 20 | } __st_atim32, __st_mtim32, __st_ctim32; 21 | ino_t st_ino; 22 | struct timespec st_atim; 23 | struct timespec st_mtim; 24 | struct timespec st_ctim; 25 | }; 26 | -------------------------------------------------------------------------------- /libs/compatible/include/arch/i386/bits/stdint.h: -------------------------------------------------------------------------------- 1 | typedef int32_t int_fast16_t; 2 | typedef int32_t int_fast32_t; 3 | typedef uint32_t uint_fast16_t; 4 | typedef uint32_t uint_fast32_t; 5 | 6 | #define INT_FAST16_MIN INT32_MIN 7 | #define INT_FAST32_MIN INT32_MIN 8 | 9 | #define INT_FAST16_MAX INT32_MAX 10 | #define INT_FAST32_MAX INT32_MAX 11 | 12 | #define UINT_FAST16_MAX UINT32_MAX 13 | #define UINT_FAST32_MAX UINT32_MAX 14 | 15 | #define INTPTR_MIN INT32_MIN 16 | #define INTPTR_MAX INT32_MAX 17 | #define UINTPTR_MAX UINT32_MAX 18 | #define PTRDIFF_MIN INT32_MIN 19 | #define PTRDIFF_MAX INT32_MAX 20 | #define SIZE_MAX UINT32_MAX 21 | -------------------------------------------------------------------------------- /libs/compatible/include/arch/i386/gd_qnan.h: -------------------------------------------------------------------------------- 1 | /* $NetBSD: gd_qnan.h,v 1.1 2006/01/25 15:33:28 kleink Exp $ */ 2 | 3 | #define f_QNAN 0x7fc00000 4 | #define d_QNAN0 0x0 5 | #define d_QNAN1 0x7ff80000 6 | #define ldus_QNAN0 0x0 7 | #define ldus_QNAN1 0x0 8 | #define ldus_QNAN2 0x0 9 | #define ldus_QNAN3 0x4000 10 | #define ldus_QNAN4 0x7fff 11 | /* 2 bytes of tail padding follow, per i386 ABI */ 12 | -------------------------------------------------------------------------------- /libs/compatible/include/arch/i386/reloc.h: -------------------------------------------------------------------------------- 1 | #define LDSO_ARCH "i386" 2 | 3 | #define REL_SYMBOLIC R_386_32 4 | #define REL_OFFSET R_386_PC32 5 | #define REL_GOT R_386_GLOB_DAT 6 | #define REL_PLT R_386_JMP_SLOT 7 | #define REL_RELATIVE R_386_RELATIVE 8 | #define REL_COPY R_386_COPY 9 | #define REL_DTPMOD R_386_TLS_DTPMOD32 10 | #define REL_DTPOFF R_386_TLS_DTPOFF32 11 | #define REL_TPOFF R_386_TLS_TPOFF 12 | #define REL_TPOFF_NEG R_386_TLS_TPOFF32 13 | #define REL_TLSDESC R_386_TLS_DESC 14 | 15 | #define CRTJMP(pc,sp) __asm__ __volatile__( \ 16 | "mov %1,%%esp ; jmp *%0" : : "r"(pc), "r"(sp) : "memory" ) 17 | 18 | #define GETFUNCSYM(fp, sym, got) __asm__ ( \ 19 | ".hidden " #sym "\n" \ 20 | " call 1f\n" \ 21 | "1: addl $" #sym "-.,(%%esp)\n" \ 22 | " pop %0" \ 23 | : "=r"(*fp) : : "memory" ) 24 | -------------------------------------------------------------------------------- /libs/compatible/include/arch/x86_64/bits/fenv.h: -------------------------------------------------------------------------------- 1 | #define FE_INVALID 1 2 | #define __FE_DENORM 2 3 | #define FE_DIVBYZERO 4 4 | #define FE_OVERFLOW 8 5 | #define FE_UNDERFLOW 16 6 | #define FE_INEXACT 32 7 | 8 | #define FE_ALL_EXCEPT 63 9 | 10 | #define FE_TONEAREST 0 11 | #define FE_DOWNWARD 0x400 12 | #define FE_UPWARD 0x800 13 | #define FE_TOWARDZERO 0xc00 14 | 15 | typedef unsigned short fexcept_t; 16 | 17 | typedef struct { 18 | unsigned short __control_word; 19 | unsigned short __unused1; 20 | unsigned short __status_word; 21 | unsigned short __unused2; 22 | unsigned short __tags; 23 | unsigned short __unused3; 24 | unsigned int __eip; 25 | unsigned short __cs_selector; 26 | unsigned int __opcode:11; 27 | unsigned int __unused4:5; 28 | unsigned int __data_offset; 29 | unsigned short __data_selector; 30 | unsigned short __unused5; 31 | unsigned int __mxcsr; 32 | } fenv_t; 33 | 34 | #define FE_DFL_ENV ((const fenv_t *) -1) 35 | -------------------------------------------------------------------------------- /libs/compatible/include/arch/x86_64/bits/float.h: -------------------------------------------------------------------------------- 1 | #ifdef __FLT_EVAL_METHOD__ 2 | #define FLT_EVAL_METHOD __FLT_EVAL_METHOD__ 3 | #else 4 | #define FLT_EVAL_METHOD 0 5 | #endif 6 | 7 | #define LDBL_TRUE_MIN 3.6451995318824746025e-4951L 8 | #define LDBL_MIN 3.3621031431120935063e-4932L 9 | #define LDBL_MAX 1.1897314953572317650e+4932L 10 | #define LDBL_EPSILON 1.0842021724855044340e-19L 11 | 12 | #define LDBL_MANT_DIG 64 13 | #define LDBL_MIN_EXP (-16381) 14 | #define LDBL_MAX_EXP 16384 15 | 16 | #define LDBL_DIG 18 17 | #define LDBL_MIN_10_EXP (-4931) 18 | #define LDBL_MAX_10_EXP 4932 19 | 20 | #define DECIMAL_DIG 21 21 | -------------------------------------------------------------------------------- /libs/compatible/include/arch/x86_64/bits/limits.h: -------------------------------------------------------------------------------- 1 | #define PAGESIZE 4096 2 | -------------------------------------------------------------------------------- /libs/compatible/include/arch/x86_64/bits/posix.h: -------------------------------------------------------------------------------- 1 | #define _POSIX_V6_LP64_OFF64 1 2 | #define _POSIX_V7_LP64_OFF64 1 3 | -------------------------------------------------------------------------------- /libs/compatible/include/arch/x86_64/bits/reg.h: -------------------------------------------------------------------------------- 1 | #undef __WORDSIZE 2 | #define __WORDSIZE 64 3 | #define R15 0 4 | #define R14 1 5 | #define R13 2 6 | #define R12 3 7 | #define RBP 4 8 | #define RBX 5 9 | #define R11 6 10 | #define R10 7 11 | #define R9 8 12 | #define R8 9 13 | #define RAX 10 14 | #define RCX 11 15 | #define RDX 12 16 | #define RSI 13 17 | #define RDI 14 18 | #define ORIG_RAX 15 19 | #define RIP 16 20 | #define CS 17 21 | #define EFLAGS 18 22 | #define RSP 19 23 | #define SS 20 24 | #define FS_BASE 21 25 | #define GS_BASE 22 26 | #define DS 23 27 | #define ES 24 28 | #define FS 25 29 | #define GS 26 30 | -------------------------------------------------------------------------------- /libs/compatible/include/arch/x86_64/bits/setjmp.h: -------------------------------------------------------------------------------- 1 | typedef unsigned long __jmp_buf[8]; 2 | -------------------------------------------------------------------------------- /libs/compatible/include/arch/x86_64/bits/stat.h: -------------------------------------------------------------------------------- 1 | /* copied from kernel definition, but with padding replaced 2 | * by the corresponding correctly-sized userspace types. */ 3 | 4 | struct stat { 5 | dev_t st_dev; 6 | ino_t st_ino; 7 | nlink_t st_nlink; 8 | 9 | mode_t st_mode; 10 | uid_t st_uid; 11 | gid_t st_gid; 12 | unsigned int __pad0; 13 | dev_t st_rdev; 14 | off_t st_size; 15 | blksize_t st_blksize; 16 | blkcnt_t st_blocks; 17 | 18 | struct timespec st_atim; 19 | struct timespec st_mtim; 20 | struct timespec st_ctim; 21 | long __unused[3]; 22 | }; 23 | -------------------------------------------------------------------------------- /libs/compatible/include/arch/x86_64/bits/stdint.h: -------------------------------------------------------------------------------- 1 | typedef int32_t int_fast16_t; 2 | typedef int32_t int_fast32_t; 3 | typedef uint32_t uint_fast16_t; 4 | typedef uint32_t uint_fast32_t; 5 | 6 | #define INT_FAST16_MIN INT32_MIN 7 | #define INT_FAST32_MIN INT32_MIN 8 | 9 | #define INT_FAST16_MAX INT32_MAX 10 | #define INT_FAST32_MAX INT32_MAX 11 | 12 | #define UINT_FAST16_MAX UINT32_MAX 13 | #define UINT_FAST32_MAX UINT32_MAX 14 | 15 | #define INTPTR_MIN INT64_MIN 16 | #define INTPTR_MAX INT64_MAX 17 | #define UINTPTR_MAX UINT64_MAX 18 | #define PTRDIFF_MIN INT64_MIN 19 | #define PTRDIFF_MAX INT64_MAX 20 | #define SIZE_MAX UINT64_MAX 21 | -------------------------------------------------------------------------------- /libs/compatible/include/arch/x86_64/gd_qnan.h: -------------------------------------------------------------------------------- 1 | /* $NetBSD: gd_qnan.h,v 1.1 2006/01/25 15:33:28 kleink Exp $ */ 2 | 3 | #define f_QNAN 0x7fc00000 4 | #define d_QNAN0 0x0 5 | #define d_QNAN1 0x7ff80000 6 | #define ldus_QNAN0 0x0 7 | #define ldus_QNAN1 0x0 8 | #define ldus_QNAN2 0x0 9 | #define ldus_QNAN3 0x4000 10 | #define ldus_QNAN4 0x7fff 11 | /* 6 bytes of tail padding follow, per AMD64 ABI */ 12 | -------------------------------------------------------------------------------- /libs/compatible/include/arch/x86_64/reloc.h: -------------------------------------------------------------------------------- 1 | #define LDSO_ARCH "x86_64" 2 | 3 | #define REL_SYMBOLIC R_X86_64_64 4 | #define REL_OFFSET32 R_X86_64_PC32 5 | #define REL_GOT R_X86_64_GLOB_DAT 6 | #define REL_PLT R_X86_64_JUMP_SLOT 7 | #define REL_RELATIVE R_X86_64_RELATIVE 8 | #define REL_COPY R_X86_64_COPY 9 | #define REL_DTPMOD R_X86_64_DTPMOD64 10 | #define REL_DTPOFF R_X86_64_DTPOFF64 11 | #define REL_TPOFF R_X86_64_TPOFF64 12 | #define REL_TLSDESC R_X86_64_TLSDESC 13 | 14 | #define CRTJMP(pc,sp) __asm__ __volatile__( \ 15 | "mov %1,%%rsp ; jmp *%0" : : "r"(pc), "r"(sp) : "memory" ) 16 | 17 | #define GETFUNCSYM(fp, sym, got) __asm__ ( \ 18 | ".hidden " #sym "\n" \ 19 | " lea " #sym "(%%rip),%0\n" \ 20 | : "=r"(*fp) : : "memory" ) 21 | -------------------------------------------------------------------------------- /libs/compatible/include/assert.h: -------------------------------------------------------------------------------- 1 | #ifndef _ASSERT_H 2 | #define _ASSERT_H 3 | #include "compatible.h" 4 | #include 5 | #include 6 | #define assert ASSERT 7 | #endif 8 | -------------------------------------------------------------------------------- /libs/compatible/include/byteswap.h: -------------------------------------------------------------------------------- 1 | #ifndef _BYTESWAP_H 2 | #define _BYTESWAP_H 3 | 4 | #include 5 | 6 | static __inline uint16_t __bswap_16(uint16_t __x) 7 | { 8 | return __x<<8 | __x>>8; 9 | } 10 | 11 | static __inline uint32_t __bswap_32(uint32_t __x) 12 | { 13 | return __x>>24 | (__x>>8&0xff00) | (__x<<8&0xff0000) | __x<<24; 14 | } 15 | 16 | static __inline uint64_t __bswap_64(uint64_t __x) 17 | { 18 | return (__bswap_32(__x)+0ULL)<<32 | __bswap_32(__x>>32); 19 | } 20 | 21 | #define bswap_16(x) __bswap_16(x) 22 | #define bswap_32(x) __bswap_32(x) 23 | #define bswap_64(x) __bswap_64(x) 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /libs/compatible/include/comp_libfdt_env.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | * 3 | * Copyright (c) 2011-2014, ARM Limited. All rights reserved. 4 | * 5 | * SPDX-License-Identifier: BSD-2-Clause-Patent 6 | * 7 | **/ 8 | 9 | #ifndef _LIBFDT_ENV_H 10 | #define _LIBFDT_ENV_H 11 | #include 12 | #include 13 | #include 14 | #include 15 | typedef UINT16 fdt16_t; 16 | typedef UINT32 fdt32_t; 17 | typedef UINT64 fdt64_t; 18 | static inline uint16_t fdt16_to_cpu(fdt16_t x){return SwapBytes16(x);} 19 | #define cpu_to_fdt16(x) fdt16_to_cpu(x) 20 | static inline uint32_t fdt32_to_cpu(fdt32_t x){return SwapBytes32(x);} 21 | #define cpu_to_fdt32(x) fdt32_to_cpu(x) 22 | static inline uint64_t fdt64_to_cpu(fdt64_t x){return SwapBytes64(x);} 23 | #define cpu_to_fdt64(x) fdt64_to_cpu(x) 24 | 25 | #endif /* _LIBFDT_ENV_H */ 26 | -------------------------------------------------------------------------------- /libs/compatible/include/compatible.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2021 BigfootACA 4 | * 5 | * SPDX-License-Identifier: LGPL-3.0-or-later 6 | * 7 | */ 8 | 9 | #ifndef _COMPATIBLE_H 10 | #define _COMPATIBLE_H 11 | #include 12 | 13 | #ifdef ENABLE_UEFI 14 | extern int efi_status_to_errno(EFI_STATUS st); 15 | extern const char*efi_status_to_string(EFI_STATUS st); 16 | extern const char*efi_status_to_short_string(EFI_STATUS st); 17 | extern BOOLEAN efi_short_string_to_status(const char*str,EFI_STATUS*st); 18 | #endif 19 | #define weak_decl __attribute__((__weak__)) 20 | 21 | #endif 22 | -------------------------------------------------------------------------------- /libs/compatible/include/ctype.h: -------------------------------------------------------------------------------- 1 | #ifndef SIMPLE_INIT_CTYPE_H 2 | #define SIMPLE_INIT_CTYPE_H 3 | #include "compatible.h" 4 | int isalnum(int); 5 | int isalpha(int); 6 | int isblank(int); 7 | int iscntrl(int); 8 | int isdigit(int); 9 | int isgraph(int); 10 | int islower(int); 11 | int isprint(int); 12 | int ispunct(int); 13 | int isspace(int); 14 | int isupper(int); 15 | int isxdigit(int); 16 | int tolower(int); 17 | int toupper(int); 18 | #endif 19 | -------------------------------------------------------------------------------- /libs/compatible/include/dirent.h: -------------------------------------------------------------------------------- 1 | #ifndef SIMPLE_INIT_DIRENT_H 2 | #define SIMPLE_INIT_DIRENT_H 3 | #include "compatible.h" 4 | #include "sys/types.h" 5 | enum d_type{ 6 | DT_UNKNOWN = 0, 7 | DT_FIFO = 1, 8 | DT_CHR = 2, 9 | DT_DIR = 4, 10 | DT_BLK = 6, 11 | DT_REG = 8, 12 | DT_LNK = 10, 13 | DT_SOCK = 12, 14 | DT_WHT = 14 15 | }; 16 | #define DT_UNKNOWN DT_UNKNOWN 17 | #define DT_FIFO DT_FIFO 18 | #define DT_CHR DT_CHR 19 | #define DT_DIR DT_DIR 20 | #define DT_BLK DT_BLK 21 | #define DT_REG DT_REG 22 | #define DT_LNK DT_LNK 23 | #define DT_SOCK DT_SOCK 24 | #define DT_WHT DT_WHT 25 | struct dirent{ 26 | ino_t d_ino; 27 | off_t d_off; 28 | unsigned short int d_reclen; 29 | enum d_type d_type; 30 | char d_name[256]; 31 | }; 32 | #endif //SIMPLE_INIT_DIRENT_H 33 | -------------------------------------------------------------------------------- /libs/compatible/include/iconv.h: -------------------------------------------------------------------------------- 1 | #ifndef _ICONV_H 2 | #define _ICONV_H 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | #define __NEED_size_t 9 | 10 | #include 11 | 12 | typedef void *iconv_t; 13 | 14 | iconv_t iconv_open(const char *, const char *); 15 | size_t iconv(iconv_t, char **__restrict, size_t *__restrict, char **__restrict, size_t *__restrict); 16 | int iconv_close(iconv_t); 17 | 18 | #ifdef __cplusplus 19 | } 20 | #endif 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /libs/compatible/include/setjmp.h: -------------------------------------------------------------------------------- 1 | #ifndef _SETJMP_H 2 | #define _SETJMP_H 3 | #include "compatible.h" 4 | #include 5 | #ifdef __cplusplus 6 | extern "C" { 7 | #endif 8 | 9 | #include 10 | 11 | typedef BASE_LIBRARY_JUMP_BUFFER jmp_buf[1]; 12 | #define setjmp(env) (INTN)SetJump((env)) 13 | static inline _Noreturn void longjmp(jmp_buf env,int val){ 14 | LongJump(env,(UINTN)((val==0)?1:val)); 15 | #ifdef __GNUC__ 16 | __builtin_unreachable (); // Keep GCC happy 17 | #endif 18 | } 19 | 20 | #ifdef __cplusplus 21 | } 22 | #endif 23 | 24 | #endif 25 | -------------------------------------------------------------------------------- /libs/compatible/include/signal.h: -------------------------------------------------------------------------------- 1 | #ifndef SIMPLE_INIT_SIGNAL_H 2 | #define SIMPLE_INIT_SIGNAL_H 3 | #include "compatible.h" 4 | typedef int sig_atomic_t; 5 | #endif 6 | -------------------------------------------------------------------------------- /libs/compatible/include/stdarg.h: -------------------------------------------------------------------------------- 1 | #ifndef _STDARG_H 2 | #define _STDARG_H 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | #include "compatible.h" 9 | #define __NEED_va_list 10 | 11 | #include 12 | 13 | #define va_start(v,l) __builtin_va_start(v,l) 14 | #define va_end(v) __builtin_va_end(v) 15 | #define va_arg(v,l) __builtin_va_arg(v,l) 16 | #define va_copy(d,s) __builtin_va_copy(d,s) 17 | 18 | #ifdef __cplusplus 19 | } 20 | #endif 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /libs/compatible/include/stdbool.h: -------------------------------------------------------------------------------- 1 | #ifndef SIMPLE_INIT_STDBOOL_H 2 | #define SIMPLE_INIT_STDBOOL_H 3 | #include "compatible.h" 4 | #ifndef __cplusplus 5 | #ifdef ENABLE_UEFI 6 | typedef BOOLEAN bool; 7 | #define true TRUE 8 | #define false FALSE 9 | #else 10 | typedef _Bool bool; 11 | #if defined __STDC_VERSION__&&__STDC_VERSION__>201710L 12 | #define true ((_Bool)+1u) 13 | #define false ((_Bool)+0u) 14 | #else 15 | #define true 1 16 | #define false 0 17 | #endif 18 | #endif 19 | #endif 20 | #endif 21 | -------------------------------------------------------------------------------- /libs/compatible/include/stddef.h: -------------------------------------------------------------------------------- 1 | #ifndef _STDDEF_H 2 | #define _STDDEF_H 3 | 4 | #include "compatible.h" 5 | #ifndef NULL 6 | #ifdef __cplusplus 7 | #define NULL 0L 8 | #else 9 | #define NULL ((void*)0) 10 | #endif 11 | #endif 12 | 13 | #define __NEED_ptrdiff_t 14 | #define __NEED_size_t 15 | #define __NEED_wchar_t 16 | #if __STDC_VERSION__ >= 201112L || __cplusplus >= 201103L 17 | #define __NEED_max_align_t 18 | #endif 19 | 20 | #include 21 | 22 | #if __GNUC__ > 3 23 | #define offsetof(type, member) __builtin_offsetof(type, member) 24 | #else 25 | #define offsetof(type, member) ((size_t)( (char *)&(((type *)0)->member) - (char *)0 )) 26 | #endif 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /libs/compatible/include/strings.h: -------------------------------------------------------------------------------- 1 | #ifndef _STRINGS_H 2 | #define _STRINGS_H 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | #include "compatible.h" 9 | 10 | #define __NEED_size_t 11 | #define __NEED_locale_t 12 | #include 13 | 14 | int bcmp (const void *, const void *, size_t); 15 | void bcopy (const void *, void *, size_t); 16 | void bzero (void *, size_t); 17 | char *index (const char *, int); 18 | char *rindex (const char *, int); 19 | 20 | int ffs (int); 21 | int ffsl (long); 22 | int ffsll (long long); 23 | 24 | int strcasecmp (const char *, const char *); 25 | int strncasecmp (const char *, const char *, size_t); 26 | 27 | int strcasecmp_l (const char *, const char *, locale_t); 28 | int strncasecmp_l (const char *, const char *, size_t, locale_t); 29 | 30 | #ifdef __cplusplus 31 | } 32 | #endif 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /libs/compatible/include/sys/socket.h: -------------------------------------------------------------------------------- 1 | // 2 | // Created by bigfoot on 2022/2/8. 3 | // 4 | 5 | #ifndef SIMPLE_INIT_SOCKET_H 6 | #define SIMPLE_INIT_SOCKET_H 7 | #endif //SIMPLE_INIT_SOCKET_H 8 | -------------------------------------------------------------------------------- /libs/compatible/include/sys/time.h: -------------------------------------------------------------------------------- 1 | #ifndef _SYS_TIME_H 2 | #define _SYS_TIME_H 3 | #ifdef __cplusplus 4 | extern "C" { 5 | #endif 6 | #define __NEED_time_t 7 | #define __NEED_suseconds_t 8 | #define __NEED_struct_timeval 9 | #include "bits/alltypes.h" 10 | #include "time.h" 11 | 12 | int gettimeofday (struct timeval *__restrict, void *__restrict); 13 | 14 | #define ITIMER_REAL 0 15 | #define ITIMER_VIRTUAL 1 16 | #define ITIMER_PROF 2 17 | 18 | struct itimerval { 19 | struct timeval it_interval; 20 | struct timeval it_value; 21 | }; 22 | 23 | int getitimer (int, struct itimerval *); 24 | int setitimer (int, const struct itimerval *__restrict, struct itimerval *__restrict); 25 | int utimes (const char *, const struct timeval [2]); 26 | 27 | #ifdef __cplusplus 28 | } 29 | #endif 30 | #endif 31 | -------------------------------------------------------------------------------- /libs/compatible/include/unistd.h: -------------------------------------------------------------------------------- 1 | #ifndef _UNISTD_H 2 | #define _UNISTD_H 3 | #define __NEED_size_t 4 | #define __NEED_ssize_t 5 | #include "compatible.h" 6 | #include 7 | int usleep(unsigned); 8 | int close(int); 9 | ssize_t read(int, void *, size_t); 10 | ssize_t write(int, const void *, size_t); 11 | #endif 12 | -------------------------------------------------------------------------------- /libs/compatible/ldexp.c: -------------------------------------------------------------------------------- 1 | #include 2 | -------------------------------------------------------------------------------- /libs/compatible/mb.h: -------------------------------------------------------------------------------- 1 | #define bittab __fsmu8 2 | 3 | #include 4 | 5 | extern const uint32_t bittab[]; 6 | 7 | /* Upper 6 state bits are a negative integer offset to bound-check next byte */ 8 | /* equivalent to: ( (b-0x80) | (b+offset) ) & ~0x3f */ 9 | #define OOB(c,b) (((((b)>>3)-0x10)|(((b)>>3)+((int32_t)(c)>>26))) & ~7) 10 | 11 | /* Interval [a,b). Either a must be 80 or b must be c0, lower 3 bits clear. */ 12 | #define R(a,b) ((uint32_t)((a==0x80 ? 0x40u-b : 0u-a) << 23)) 13 | #define FAILSTATE R(0x80,0x80) 14 | 15 | #define SA 0xc2u 16 | #define SB 0xf4u 17 | 18 | /* Arbitrary encoding for representing code units instead of characters. */ 19 | #define CODEUNIT(c) (0xdfff & (signed char)(c)) 20 | #define IS_CODEUNIT(c) ((unsigned)(c)-0xdf80 < 0x80) 21 | 22 | -------------------------------------------------------------------------------- /libs/compatible/modf.c: -------------------------------------------------------------------------------- 1 | #include "math.h" 2 | 3 | weak_decl double modf(double x, double *iptr) 4 | { 5 | union {double f; uint64_t i;} u = {x}; 6 | uint64_t mask; 7 | int e = (int)(u.i>>52 & 0x7ff) - 0x3ff; 8 | 9 | /* no fractional part */ 10 | if (e >= 52) { 11 | *iptr = x; 12 | if (e == 0x400 && u.i<<12 != 0) /* nan */ 13 | return x; 14 | u.i &= 1ULL<<63; 15 | return u.f; 16 | } 17 | 18 | /* no integral part*/ 19 | if (e < 0) { 20 | u.i &= 1ULL<<63; 21 | *iptr = u.f; 22 | return x; 23 | } 24 | 25 | mask = -1ULL>>12>>e; 26 | if ((u.i & mask) == 0) { 27 | *iptr = x; 28 | u.i &= 1ULL<<63; 29 | return u.f; 30 | } 31 | u.i &= ~mask; 32 | *iptr = u.f; 33 | return x - u.f; 34 | } 35 | -------------------------------------------------------------------------------- /libs/compatible/scalbn.c: -------------------------------------------------------------------------------- 1 | #include "math.h" 2 | #include "limits.h" 3 | 4 | weak_decl double scalbn(double x, int n) 5 | { 6 | union {double f; uint64_t i;} u; 7 | double_t y = x; 8 | 9 | if (n > 1023) { 10 | y *= 0x1p1023; 11 | n -= 1023; 12 | if (n > 1023) { 13 | y *= 0x1p1023; 14 | n -= 1023; 15 | if (n > 1023) 16 | n = 1023; 17 | } 18 | } else if (n < -1022) { 19 | /* make sure final n < -53 to avoid double 20 | rounding in the subnormal range */ 21 | y *= 0x1p-1022 * 0x1p53; 22 | n += 1022 - 53; 23 | if (n < -1022) { 24 | y *= 0x1p-1022 * 0x1p53; 25 | n += 1022 - 53; 26 | if (n < -1022) 27 | n = -1022; 28 | } 29 | } 30 | u.i = (uint64_t)(0x3ff+n)<<52; 31 | x = y * u.f; 32 | return x; 33 | } 34 | 35 | weak_decl double ldexp(double x, int n) 36 | { 37 | return scalbn(x, n); 38 | } 39 | -------------------------------------------------------------------------------- /libs/compatible/strcspn.c: -------------------------------------------------------------------------------- 1 | #include 2 | -------------------------------------------------------------------------------- /libs/compatible/strtold_subr.c: -------------------------------------------------------------------------------- 1 | /* $NetBSD: strtold_subr.c,v 1.1 2006/03/15 17:35:18 kleink Exp $ */ 2 | 3 | /* 4 | * Written by Klaus Klein , November 16, 2005. 5 | * Public domain. 6 | */ 7 | 8 | /* 9 | * NOTICE: This is not a standalone file. To use it, #include it in 10 | * the format-specific strtold_*.c, like so: 11 | * 12 | * #define GDTOA_LD_FMT 13 | * #include "strtold_subr.c" 14 | */ 15 | #include "namespace.h" 16 | #include 17 | #include 18 | #include 19 | #include "gdtoa.h" 20 | 21 | weak_decl long double 22 | strtold(const char *nptr, char **endptr) 23 | { 24 | long double ld; 25 | 26 | (void)strtopx(nptr, endptr, &ld); 27 | return ld; 28 | } 29 | -------------------------------------------------------------------------------- /libs/compatible/wctomb.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int wctomb(char *s, wchar_t wc) 5 | { 6 | if (!s) return 0; 7 | return wcrtomb(s, wc, 0); 8 | } 9 | -------------------------------------------------------------------------------- /libs/hivex/HivexLib.inf: -------------------------------------------------------------------------------- 1 | [Defines] 2 | INF_VERSION = 0x00010005 3 | BASE_NAME = HivexLib 4 | FILE_GUID = 41C9667F-7AC7-441E-AED8-03B7DC86C3A5 5 | MODULE_TYPE = UEFI_APPLICATION 6 | VERSION_STRING = 1.0 7 | LIBRARY_CLASS = HivexLib 8 | 9 | [BuildOptions] 10 | GCC:*_*_*_CC_FLAGS = -include src/config-uefi.h 11 | 12 | [Packages] 13 | MdePkg/MdePkg.dec 14 | SimpleInit.dec 15 | 16 | [LibraryClasses] 17 | UefiLib 18 | SimpleInitLocate 19 | SimpleInitCompatible 20 | 21 | [Sources] 22 | libs/hivex/lib/util.c 23 | libs/hivex/lib/utf16.c 24 | libs/hivex/lib/node.c 25 | libs/hivex/lib/value.c 26 | libs/hivex/lib/handle.c 27 | libs/hivex/lib/offset-list.c 28 | libs/hivex/lib/visit.c 29 | libs/hivex/lib/write.c 30 | -------------------------------------------------------------------------------- /libs/hivex/hivex.cmake: -------------------------------------------------------------------------------- 1 | add_library(hivex STATIC 2 | libs/hivex/lib/util.c 3 | libs/hivex/lib/utf16.c 4 | libs/hivex/lib/node.c 5 | libs/hivex/lib/value.c 6 | libs/hivex/lib/handle.c 7 | libs/hivex/lib/offset-list.c 8 | libs/hivex/lib/visit.c 9 | libs/hivex/lib/write.c 10 | ) 11 | include_directories(libs/hivex/include) 12 | -------------------------------------------------------------------------------- /libs/json-c/cmake/json_config.h.in: -------------------------------------------------------------------------------- 1 | /* Define to 1 if you have the header file. */ 2 | #cmakedefine JSON_C_HAVE_INTTYPES_H @JSON_C_HAVE_INTTYPES_H@ 3 | -------------------------------------------------------------------------------- /libs/json-c/json-c-uefi/json_config.h: -------------------------------------------------------------------------------- 1 | #include "config.h" 2 | -------------------------------------------------------------------------------- /libs/json-c/json-c-uefi/random_seed.c: -------------------------------------------------------------------------------- 1 | #include 2 | int json_c_get_random_seed(void){ 3 | return (int)time(NULL) * 433494437; 4 | } 5 | -------------------------------------------------------------------------------- /libs/json-c/json_c_version.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012 Eric Haszlakiewicz 3 | * 4 | * This library is free software; you can redistribute it and/or modify 5 | * it under the terms of the MIT license. See COPYING for details. 6 | */ 7 | #include "config.h" 8 | 9 | #include "json_c_version.h" 10 | 11 | const char *json_c_version(void) 12 | { 13 | return JSON_C_VERSION; 14 | } 15 | 16 | int json_c_version_num(void) 17 | { 18 | return JSON_C_VERSION_NUM; 19 | } 20 | -------------------------------------------------------------------------------- /libs/json-c/json_config.h.in: -------------------------------------------------------------------------------- 1 | 2 | /* Define to 1 if you have the header file. */ 3 | #undef JSON_C_HAVE_INTTYPES_H 4 | -------------------------------------------------------------------------------- /libs/json-c/json_inttypes.h: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * @file 4 | * @brief Do not use, json-c internal, may be changed or removed at any time. 5 | */ 6 | #ifndef _json_inttypes_h_ 7 | #define _json_inttypes_h_ 8 | 9 | #include "json_config.h" 10 | 11 | #ifdef JSON_C_HAVE_INTTYPES_H 12 | /* inttypes.h includes stdint.h */ 13 | #include 14 | 15 | #else 16 | #include 17 | 18 | #define PRId64 "I64d" 19 | #define SCNd64 "I64d" 20 | #define PRIu64 "I64u" 21 | 22 | #endif 23 | 24 | #endif 25 | -------------------------------------------------------------------------------- /libs/json-c/libjson.c: -------------------------------------------------------------------------------- 1 | 2 | /* dummy source file for compatibility purposes */ 3 | 4 | #if defined(HAVE_CDEFS_H) 5 | #include 6 | #endif 7 | 8 | #ifndef __warn_references 9 | 10 | #if defined(__GNUC__) && defined(HAS_GNU_WARNING_LONG) 11 | 12 | #define __warn_references(sym, msg) \ 13 | __asm__(".section .gnu" #sym ",\n\t.ascii \"" msg "\"\n\t.text"); 14 | 15 | #else 16 | #define __warn_references(sym, msg) /* nothing */ 17 | #endif 18 | 19 | #endif 20 | 21 | #include "json_object.h" 22 | 23 | __warn_references(json_object_get, "Warning: please link against libjson-c instead of libjson"); 24 | 25 | /* __asm__(".section .gnu.warning." __STRING(sym) \ 26 | " ; .ascii \"" msg "\" ; .text") */ 27 | -------------------------------------------------------------------------------- /libs/json-c/random_seed.h: -------------------------------------------------------------------------------- 1 | /* 2 | * random_seed.h 3 | * 4 | * Copyright (c) 2013 Metaparadigm Pte. Ltd. 5 | * Michael Clark 6 | * 7 | * This library is free software; you can redistribute it and/or modify 8 | * it under the terms of the MIT license. See COPYING for details. 9 | * 10 | */ 11 | 12 | /** 13 | * @file 14 | * @brief Do not use, json-c internal, may be changed or removed at any time. 15 | */ 16 | #ifndef seed_h 17 | #define seed_h 18 | 19 | #ifdef __cplusplus 20 | extern "C" { 21 | #endif 22 | 23 | extern int json_c_get_random_seed(void); 24 | 25 | #ifdef __cplusplus 26 | } 27 | #endif 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /libs/json-c/strdup_compat.h: -------------------------------------------------------------------------------- 1 | #ifndef __strdup_compat_h 2 | #define __strdup_compat_h 3 | 4 | /** 5 | * @file 6 | * @brief Do not use, json-c internal, may be changed or removed at any time. 7 | */ 8 | 9 | #if !defined(HAVE_STRDUP) && defined(_MSC_VER) 10 | /* MSC has the version as _strdup */ 11 | #define strdup _strdup 12 | #elif !defined(HAVE_STRDUP) 13 | #error You do not have strdup on your system. 14 | #endif /* HAVE_STRDUP */ 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /libs/json-c/strerror_override.h: -------------------------------------------------------------------------------- 1 | #ifndef _json_strerror_override_h_ 2 | #define _json_strerror_override_h_ 3 | 4 | /** 5 | * @file 6 | * @brief Do not use, json-c internal, may be changed or removed at any time. 7 | */ 8 | 9 | #include "config.h" 10 | #include 11 | 12 | #include "json_object.h" /* for JSON_EXPORT */ 13 | 14 | #ifdef __cplusplus 15 | extern "C" { 16 | #endif 17 | 18 | #include 19 | 20 | JSON_EXPORT char *_json_c_strerror(int errno_in); 21 | 22 | #ifndef STRERROR_OVERRIDE_IMPL 23 | #define strerror _json_c_strerror 24 | #endif 25 | 26 | #ifdef __cplusplus 27 | } 28 | #endif 29 | 30 | #endif /* _json_strerror_override_h_ */ 31 | -------------------------------------------------------------------------------- /libs/json-c/strerror_override_private.h: -------------------------------------------------------------------------------- 1 | #ifndef __json_strerror_override_private_h__ 2 | #define __json_strerror_override_private_h__ 3 | 4 | /** 5 | * @file 6 | * @brief Do not use, json-c internal, may be changed or removed at any time. 7 | */ 8 | 9 | #include "json_types.h" 10 | 11 | /* Used by tests to get consistent output */ 12 | JSON_EXPORT int _json_c_strerror_enable; 13 | 14 | #endif 15 | -------------------------------------------------------------------------------- /libs/libkmod/include/hash.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | struct hash; 6 | 7 | struct hash_iter { 8 | const struct hash *hash; 9 | unsigned int bucket; 10 | unsigned int entry; 11 | }; 12 | 13 | struct hash *hash_new(unsigned int n_buckets, void (*free_value)(void *value)); 14 | void hash_free(struct hash *hash); 15 | int hash_add(struct hash *hash, const char *key, const void *value); 16 | int hash_add_unique(struct hash *hash, const char *key, const void *value); 17 | int hash_del(struct hash *hash, const char *key); 18 | void *hash_find(const struct hash *hash, const char *key); 19 | unsigned int hash_get_count(const struct hash *hash); 20 | void hash_iter_init(const struct hash *hash, struct hash_iter *iter); 21 | bool hash_iter_next(struct hash_iter *iter, const char **key, 22 | const void **value); 23 | -------------------------------------------------------------------------------- /libs/libkmod/include/strbuf.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | /* 6 | * Buffer abstract data type 7 | */ 8 | struct strbuf { 9 | char *bytes; 10 | unsigned size; 11 | unsigned used; 12 | }; 13 | 14 | void strbuf_init(struct strbuf *buf); 15 | void strbuf_release(struct strbuf *buf); 16 | void strbuf_clear(struct strbuf *buf); 17 | 18 | /* Destroy buffer and return a copy as a C string */ 19 | char *strbuf_steal(struct strbuf *buf); 20 | 21 | /* 22 | * Return a C string owned by the buffer invalidated if the buffer is 23 | * changed). 24 | */ 25 | const char *strbuf_str(struct strbuf *buf); 26 | 27 | bool strbuf_pushchar(struct strbuf *buf, char ch); 28 | unsigned strbuf_pushchars(struct strbuf *buf, const char *str); 29 | void strbuf_popchar(struct strbuf *buf); 30 | void strbuf_popchars(struct strbuf *buf, unsigned n); 31 | -------------------------------------------------------------------------------- /libs/libkmod/libkmod.cmake: -------------------------------------------------------------------------------- 1 | add_library(kmod STATIC 2 | libs/libkmod/libkmod.c 3 | libs/libkmod/libkmod-builtin.c 4 | libs/libkmod/libkmod-config.c 5 | libs/libkmod/libkmod-elf.c 6 | libs/libkmod/libkmod-file.c 7 | libs/libkmod/libkmod-index.c 8 | libs/libkmod/libkmod-list.c 9 | libs/libkmod/libkmod-module.c 10 | libs/libkmod/libkmod-signature.c 11 | libs/libkmod/hash.c 12 | libs/libkmod/util.c 13 | libs/libkmod/strbuf.c 14 | ) 15 | target_include_directories(kmod PRIVATE libs/libkmod/include) 16 | include_directories(libs/libkmod) 17 | if("${CMAKE_C_COMPILER_ID}" STREQUAL "Clang") 18 | target_compile_options(kmod PRIVATE -Wno-constant-conversion) 19 | endif() 20 | -------------------------------------------------------------------------------- /libs/libmd/include/md2.h: -------------------------------------------------------------------------------- 1 | /* $NetBSD: md2.h,v 1.5 2005/09/25 00:48:21 xtraeme Exp $ */ 2 | 3 | #ifndef _MD2_H_ 4 | #define _MD2_H_ 5 | 6 | #include 7 | 8 | #include 9 | 10 | #define MD2_DIGEST_LENGTH 16 11 | #define MD2_DIGEST_STRING_LENGTH 33 12 | 13 | /* MD2 context. */ 14 | typedef struct MD2Context { 15 | uint32_t i; 16 | unsigned char C[16]; /* checksum */ 17 | unsigned char X[48]; /* input buffer */ 18 | } MD2_CTX; 19 | 20 | #ifdef __cplusplus 21 | extern "C" { 22 | #endif 23 | 24 | void MD2Init(MD2_CTX *); 25 | void MD2Update(MD2_CTX *, const unsigned char *, unsigned int); 26 | void MD2Final(unsigned char[16], MD2_CTX *); 27 | char *MD2End(MD2_CTX *, char *); 28 | char *MD2File(const char *, char *); 29 | char *MD2FileChunk(const char *, char *, off_t, off_t); 30 | char *MD2Data(const unsigned char *, size_t, char *); 31 | 32 | #ifdef __cplusplus 33 | } 34 | #endif 35 | 36 | #endif /* _MD2_H_ */ 37 | -------------------------------------------------------------------------------- /libs/libmd/libmd.cmake: -------------------------------------------------------------------------------- 1 | add_library(md STATIC 2 | libs/libmd/src/md2.c 3 | libs/libmd/src/md4.c 4 | libs/libmd/src/md5.c 5 | libs/libmd/src/rmd160.c 6 | libs/libmd/src/sha1.c 7 | libs/libmd/src/sha2.c 8 | ) 9 | include_directories(libs/libmd/include) 10 | target_compile_options(md PRIVATE -Wno-stringop-overread) 11 | -------------------------------------------------------------------------------- /libs/libtsm/TSMLib.inf: -------------------------------------------------------------------------------- 1 | [Defines] 2 | INF_VERSION = 0x00010005 3 | BASE_NAME = TSMLib 4 | FILE_GUID = 92680644-F62E-46F2-B2EC-D362D9746CCA 5 | MODULE_TYPE = UEFI_APPLICATION 6 | VERSION_STRING = 1.0 7 | LIBRARY_CLASS = TSMLib 8 | 9 | [BuildOptions] 10 | GCC:*_*_*_CC_FLAGS = -include src/config-uefi.h 11 | 12 | [Packages] 13 | MdePkg/MdePkg.dec 14 | SimpleInit.dec 15 | 16 | [LibraryClasses] 17 | SimpleInitCompatible 18 | 19 | [Sources] 20 | libs/libtsm/src/shared/shl-htable.c 21 | libs/libtsm/src/tsm/tsm-vte.c 22 | libs/libtsm/src/tsm/tsm-render.c 23 | libs/libtsm/src/tsm/tsm-vte-charsets.c 24 | libs/libtsm/src/tsm/tsm-selection.c 25 | libs/libtsm/src/tsm/tsm-unicode.c 26 | libs/libtsm/src/tsm/tsm-screen.c 27 | libs/libtsm/external/wcwidth/wcwidth.c 28 | -------------------------------------------------------------------------------- /libs/libtsm/external/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # External vendorized code 3 | # build everything into a object library for ease of use internally 4 | # 5 | add_library(external OBJECT 6 | wcwidth/wcwidth.c 7 | ) 8 | 9 | target_include_directories(external 10 | PUBLIC 11 | ${CMAKE_CURRENT_SOURCE_DIR} 12 | ${CMAKE_CURRENT_SOURCE_DIR}/wcwidth 13 | ) 14 | set_target_properties(external PROPERTIES 15 | C_VISIBILITY_PRESET hidden 16 | POSITION_INDEPENDENT_CODE ON 17 | ) 18 | add_libtsm_compile_options(external) 19 | -------------------------------------------------------------------------------- /libs/libtsm/external/wcwidth/.gitignore: -------------------------------------------------------------------------------- 1 | test_wcwidth 2 | -------------------------------------------------------------------------------- /libs/libtsm/external/wcwidth/.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: false 2 | language: c 3 | compiler: 4 | - clang 5 | - gcc 6 | os: 7 | - linux 8 | - osx 9 | script: make test 10 | -------------------------------------------------------------------------------- /libs/libtsm/external/wcwidth/wcwidth.h: -------------------------------------------------------------------------------- 1 | #ifndef WCWIDTH_H_INCLUDED 2 | #define WCWIDTH_H_INCLUDED 3 | 4 | #include 5 | 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #endif 9 | 10 | int wcwidth(wchar_t ucs); 11 | 12 | #ifdef __cplusplus 13 | } 14 | #endif 15 | 16 | 17 | #endif 18 | -------------------------------------------------------------------------------- /libs/libtsm/libtsm.cmake: -------------------------------------------------------------------------------- 1 | include_directories( 2 | libs/libtsm/src/tsm 3 | libs/libtsm/src/shared 4 | libs/libtsm/external 5 | ) 6 | add_library(libtsm STATIC 7 | libs/libtsm/src/shared/shl-htable.c 8 | libs/libtsm/src/shared/shl-pty.c 9 | libs/libtsm/src/shared/shl-ring.c 10 | libs/libtsm/src/tsm/tsm-vte.c 11 | libs/libtsm/src/tsm/tsm-render.c 12 | libs/libtsm/src/tsm/tsm-vte-charsets.c 13 | libs/libtsm/src/tsm/tsm-selection.c 14 | libs/libtsm/src/tsm/tsm-unicode.c 15 | libs/libtsm/src/tsm/tsm-screen.c 16 | libs/libtsm/external/wcwidth/wcwidth.c 17 | ) 18 | target_compile_definitions(libtsm PRIVATE _GNU_SOURCE) 19 | target_compile_options(libtsm PRIVATE -Wno-sign-compare) 20 | if("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU") 21 | target_compile_options(libtsm PRIVATE -Wno-old-style-declaration) 22 | endif() 23 | -------------------------------------------------------------------------------- /libs/libtsm/src/config.h.in: -------------------------------------------------------------------------------- 1 | #ifndef LIBTSM_CONFIG_H 2 | #define LIBTSM_CONFIG_H 3 | 4 | /* Enable debug mode */ 5 | #cmakedefine BUILD_ENABLE_DEBUG 6 | 7 | /* Have xkbcommon library */ 8 | #cmakedefine BUILD_HAVE_XKBCOMMON 9 | 10 | #endif // LIBTSM_CONFIG_H 11 | -------------------------------------------------------------------------------- /libs/libufdt/OWNERS: -------------------------------------------------------------------------------- 1 | bowgotsai@google.com 2 | hridya@google.com 3 | szuweilin@google.com 4 | -------------------------------------------------------------------------------- /libs/libufdt/UfdtLib.inf: -------------------------------------------------------------------------------- 1 | [Defines] 2 | INF_VERSION = 0x00010005 3 | BASE_NAME = UfdtLib 4 | FILE_GUID = B6F52E2C-5128-4208-ACCF-34011042AD16 5 | MODULE_TYPE = UEFI_APPLICATION 6 | VERSION_STRING = 1.0 7 | LIBRARY_CLASS = UfdtLib 8 | 9 | [BuildOptions] 10 | GCC:*_*_*_CC_FLAGS = -include src/config-uefi.h -Wno-pointer-to-int-cast 11 | 12 | [Packages] 13 | SimpleInit.dec 14 | MdePkg/MdePkg.dec 15 | 16 | [Sources] 17 | libs/libufdt/ufdt_convert.c 18 | libs/libufdt/ufdt_node.c 19 | libs/libufdt/ufdt_node_pool.c 20 | libs/libufdt/ufdt_overlay.c 21 | libs/libufdt/ufdt_prop_dict.c 22 | libs/libufdt/sysdeps/libufdt_sysdeps_vendor.c 23 | -------------------------------------------------------------------------------- /libs/libufdt/libufdt.cmake: -------------------------------------------------------------------------------- 1 | include_directories(libs/libufdt/include) 2 | add_library( 3 | ufdt STATIC 4 | libs/libufdt/ufdt_convert.c 5 | libs/libufdt/ufdt_node.c 6 | libs/libufdt/ufdt_node_pool.c 7 | libs/libufdt/ufdt_overlay.c 8 | libs/libufdt/ufdt_prop_dict.c 9 | libs/libufdt/sysdeps/libufdt_sysdeps_posix.c 10 | ) 11 | target_include_directories(ufdt PRIVATE libs/libufdt/sysdeps/include) -------------------------------------------------------------------------------- /libs/libzip/AUTHORS: -------------------------------------------------------------------------------- 1 | Dieter Baron 2 | Thomas Klausner 3 | -------------------------------------------------------------------------------- /libs/libzip/lib/zip_random_uefi.c: -------------------------------------------------------------------------------- 1 | #include"zipint.h" 2 | #include 3 | 4 | ZIP_EXTERN bool zip_secure_random(zip_uint8_t*buffer,zip_uint16_t length){ 5 | static bool seed=false; 6 | if(!seed){ 7 | srand((unsigned int)time(NULL)); 8 | seed=true; 9 | } 10 | for(zip_uint16_t i=0;i 4 | #include"nanosvg.h" 5 | #include"nanosvgrast.h" 6 | -------------------------------------------------------------------------------- /libs/nanosvg/nanosvg.cmake: -------------------------------------------------------------------------------- 1 | include_directories(libs/nanosvg/src) 2 | add_library(nanosvg STATIC libs/nanosvg/nanosvg.c) 3 | -------------------------------------------------------------------------------- /libs/regex/RegexLib.inf: -------------------------------------------------------------------------------- 1 | [Defines] 2 | INF_VERSION = 0x00010005 3 | BASE_NAME = RegexLib 4 | FILE_GUID = A1A80C8A-DB5C-4B1C-B180-6AF5BB4841D7 5 | MODULE_TYPE = UEFI_APPLICATION 6 | VERSION_STRING = 1.0 7 | LIBRARY_CLASS = RegexLib 8 | 9 | [BuildOptions] 10 | GCC:*_*_*_CC_FLAGS = -include src/config-uefi.h 11 | 12 | [Packages] 13 | SimpleInit.dec 14 | MdePkg/MdePkg.dec 15 | 16 | [Sources] 17 | libs/regex/regexp.c 18 | libs/regex/regexp.h 19 | -------------------------------------------------------------------------------- /libs/regex/regex.cmake: -------------------------------------------------------------------------------- 1 | include_directories(libs/regex) 2 | add_library(regex STATIC libs/regex/regexp.c) 3 | 4 | -------------------------------------------------------------------------------- /libs/regex/regexp.h: -------------------------------------------------------------------------------- 1 | #ifndef regexp_h 2 | #define regexp_h 3 | 4 | typedef struct Reprog Reprog; 5 | typedef struct Resub Resub; 6 | 7 | Reprog *regexp_comp(const char *pattern, int cflags, const char **errorp); 8 | int regexp_exec(Reprog *prog, const char *string, Resub *sub, int eflags); 9 | void regexp_free(Reprog *prog); 10 | 11 | enum { 12 | /* regexp_comp flags */ 13 | REG_ICASE = 1, 14 | REG_NEWLINE = 2, 15 | 16 | /* regexp_exec flags */ 17 | REG_NOTBOL = 4, 18 | 19 | /* limits */ 20 | REG_MAXSUB = 10 21 | }; 22 | 23 | struct Resub { 24 | unsigned int nsub; 25 | struct { 26 | const char *sp; 27 | const char *ep; 28 | } sub[REG_MAXSUB]; 29 | }; 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /libs/stb/STBLib.inf: -------------------------------------------------------------------------------- 1 | [Defines] 2 | INF_VERSION = 0x00010005 3 | BASE_NAME = STBLib 4 | FILE_GUID = 8DECE55E-2FDF-4C44-900E-648D48C859F5 5 | MODULE_TYPE = UEFI_APPLICATION 6 | VERSION_STRING = 1.0 7 | LIBRARY_CLASS = STBLib 8 | 9 | [BuildOptions] 10 | GCC:*_*_*_CC_FLAGS = -include src/config-uefi.h -Wno-unused-function 11 | 12 | [Packages] 13 | MdePkg/MdePkg.dec 14 | SimpleInit.dec 15 | 16 | [LibraryClasses] 17 | SimpleInitCompatible 18 | 19 | [Sources] 20 | libs/stb/stb.c 21 | -------------------------------------------------------------------------------- /libs/stb/stb.cmake: -------------------------------------------------------------------------------- 1 | include_directories(libs/stb) 2 | add_library(stb STATIC libs/stb/stb.c) 3 | target_compile_options(stb PRIVATE 4 | -Wno-sign-compare 5 | -Wno-unused-value 6 | -Wno-unused-variable 7 | -Wno-unused-function 8 | ) 9 | if("${CMAKE_C_COMPILER_ID}" STREQUAL "Clang") 10 | target_compile_options(stb PRIVATE -Wno-self-assign) 11 | endif() 12 | -------------------------------------------------------------------------------- /libs/util-linux/README.licensing: -------------------------------------------------------------------------------- 1 | 2 | The project util-linux doesn't use the same license for all of the code. 3 | There is code under: 4 | 5 | * GPL-3.0-or-later - GNU General Public License version 3, or any later version 6 | 7 | * GPL-2.0-or-later - GNU General Public License version 2, or any later version 8 | 9 | * GPL-2.0 - GNU General Public License version 2 10 | 11 | * LGPL-2.1-or-later - GNU Lesser General Public License 2.1 or any later version 12 | 13 | * BSD-3-Clause - BSD 3-Clause "New" or "Revised" License 14 | 15 | * BSD-4-Clause-UC - BSD 4-Clause University of California-Specific 16 | 17 | * Public Domain 18 | 19 | Please, check the source code for more details. A license is usually at the start 20 | of each source file. 21 | 22 | The ./COPYING file (GPL-2.0-or-later) is the default license for code without 23 | an explicitly defined license. 24 | 25 | -------------------------------------------------------------------------------- /libs/util-linux/include/crc32.h: -------------------------------------------------------------------------------- 1 | #ifndef UL_NG_CRC32_H 2 | #define UL_NG_CRC32_H 3 | 4 | #include 5 | #include 6 | 7 | extern uint32_t ul_crc32(uint32_t seed, const unsigned char *buf, size_t len); 8 | extern uint32_t ul_crc32_exclude_offset(uint32_t seed, const unsigned char *buf, size_t len, 9 | size_t exclude_off, size_t exclude_len); 10 | 11 | #endif 12 | 13 | -------------------------------------------------------------------------------- /libs/util-linux/include/crc32c.h: -------------------------------------------------------------------------------- 1 | #ifndef UL_NG_CRC32C_H 2 | #define UL_NG_CRC32C_H 3 | 4 | #include 5 | #include 6 | 7 | extern uint32_t crc32c(uint32_t crc, const void *buf, size_t size); 8 | 9 | #endif /* UL_NG_CRC32C_H */ 10 | -------------------------------------------------------------------------------- /libs/util-linux/include/encode.h: -------------------------------------------------------------------------------- 1 | #ifndef UTIL_LINUX_ENCODE_H 2 | #define UTIL_LINUX_ENCODE_H 3 | 4 | extern size_t ul_encode_to_utf8(int enc, unsigned char *dest, size_t len, 5 | const unsigned char *src, size_t count) 6 | __attribute__((nonnull)); 7 | 8 | enum { 9 | UL_ENCODE_UTF16BE = 0, 10 | UL_ENCODE_UTF16LE, 11 | UL_ENCODE_LATIN1 12 | }; 13 | 14 | #endif 15 | -------------------------------------------------------------------------------- /libs/util-linux/include/linux_version.h: -------------------------------------------------------------------------------- 1 | #ifndef LINUX_VERSION_H 2 | #define LINUX_VERSION_H 3 | 4 | #include 5 | 6 | #ifndef KERNEL_VERSION 7 | # define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c)) 8 | #endif 9 | 10 | int get_linux_version(void); 11 | 12 | #endif /* LINUX_VERSION_H */ 13 | -------------------------------------------------------------------------------- /libs/util-linux/include/mangle.h: -------------------------------------------------------------------------------- 1 | #ifndef UTIL_LINUX_MANGLE_H 2 | #define UTIL_LINUX_MANGLE_H 3 | 4 | /* 5 | * Functions for \oct encoding used in mtab/fstab/swaps/etc. 6 | */ 7 | 8 | extern char *mangle(const char *s); 9 | 10 | extern void unmangle_to_buffer(const char *s, char *buf, size_t len); 11 | extern size_t unhexmangle_to_buffer(const char *s, char *buf, size_t len); 12 | 13 | extern char *unmangle(const char *s, const char **end); 14 | 15 | static inline void unmangle_string(char *s) 16 | { 17 | if (s) 18 | unmangle_to_buffer(s, s, strlen(s) + 1); 19 | } 20 | 21 | static inline void unhexmangle_string(char *s) 22 | { 23 | if (s) 24 | unhexmangle_to_buffer(s, s, strlen(s) + 1); 25 | } 26 | 27 | #endif /* UTIL_LINUX_MANGLE_H */ 28 | 29 | -------------------------------------------------------------------------------- /libs/util-linux/include/match.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2011 Karel Zak 3 | * 4 | * This file may be redistributed under the terms of the 5 | * GNU Lesser General Public License. 6 | */ 7 | #ifndef UTIL_LINUX_MATCH_H 8 | #define UTIL_LINUX_MATCH_H 9 | 10 | extern int match_fstype(const char *type, const char *pattern); 11 | 12 | #endif /* UTIL_LINUX_MATCH_H */ 13 | -------------------------------------------------------------------------------- /libs/util-linux/include/monotonic.h: -------------------------------------------------------------------------------- 1 | /* 2 | * No copyright is claimed. This code is in the public domain; do with 3 | * it what you wish. 4 | */ 5 | #ifndef UTIL_LINUX_MONOTONIC_H 6 | #define UTIL_LINUX_MONOTONIC_H 7 | 8 | # ifdef CLOCK_MONOTONIC_RAW 9 | # define UL_CLOCK_MONOTONIC CLOCK_MONOTONIC_RAW 10 | # else 11 | # define UL_CLOCK_MONOTONIC CLOCK_MONOTONIC 12 | # endif 13 | 14 | #include 15 | 16 | extern int get_boot_time(struct timeval *boot_time); 17 | 18 | extern time_t get_suspended_time(void); 19 | 20 | extern int gettime_monotonic(struct timeval *tv); 21 | 22 | #endif /* UTIL_LINUX_MONOTONIC_H */ 23 | -------------------------------------------------------------------------------- /libs/util-linux/include/ul-md5.h: -------------------------------------------------------------------------------- 1 | #ifndef UTIL_LINUX_MD5_H 2 | #define UTIL_LINUX_MD5_H 3 | #include "md5.h" 4 | #define UL_MD5LENGTH MD5_DIGEST_LENGTH 5 | #define UL_MD5Context MD5Context 6 | #define UL_MD5_CTX MD5_CTX 7 | #define ul_MD5Init MD5Init 8 | #define ul_MD5Update MD5Update 9 | #define ul_MD5Final MD5Final 10 | #define ul_MD5Transform MD5Transform 11 | #endif /* !UTIL_LINUX_MD5_H */ 12 | -------------------------------------------------------------------------------- /libs/util-linux/lib/linux_version.c: -------------------------------------------------------------------------------- 1 | /* 2 | * No copyright is claimed. This code is in the public domain; do with 3 | * it what you wish. 4 | */ 5 | #include 6 | #include 7 | 8 | #include "linux_version.h" 9 | 10 | int get_linux_version (void) 11 | { 12 | static int kver = -1; 13 | struct utsname uts; 14 | int x = 0, y = 0, z = 0; 15 | int n; 16 | 17 | if (kver != -1) 18 | return kver; 19 | if (uname(&uts)) 20 | return kver = 0; 21 | 22 | n = sscanf(uts.release, "%d.%d.%d", &x, &y, &z); 23 | if (n < 1 || n > 3) 24 | return kver = 0; 25 | 26 | return kver = KERNEL_VERSION(x, y, z); 27 | } 28 | -------------------------------------------------------------------------------- /libs/util-linux/libblkid/COPYING: -------------------------------------------------------------------------------- 1 | This library is free software; you can redistribute it and/or 2 | modify it under the terms of the GNU Lesser General Public 3 | License as published by the Free Software Foundation; either 4 | version 2.1 of the License, or (at your option) any later 5 | version. 6 | 7 | The complete text of the license is available in the 8 | ../Documentation/licenses/COPYING.LGPL-2.1-or-later file. 9 | -------------------------------------------------------------------------------- /libs/util-linux/libblkid/getsize.c: -------------------------------------------------------------------------------- 1 | /* 2 | * getsize.c --- get the size of a partition. 3 | * 4 | * Copyright (C) 1995, 1995 Theodore Ts'o. 5 | * Copyright (C) 2010 Karel Zak 6 | * 7 | * %Begin-Header% 8 | * This file may be redistributed under the terms of the 9 | * GNU Lesser General Public License. 10 | * %End-Header% 11 | */ 12 | 13 | #include "blkidP.h" 14 | #include "blkdev.h" 15 | 16 | /** 17 | * blkid_get_dev_size: 18 | * @fd: file descriptor 19 | * 20 | * Returns: size (in bytes) of the block device or size of the regular file or 0. 21 | */ 22 | blkid_loff_t blkid_get_dev_size(int fd) 23 | { 24 | unsigned long long bytes; 25 | 26 | if (blkdev_get_size(fd, &bytes)) 27 | return 0; 28 | 29 | return bytes; 30 | } 31 | 32 | -------------------------------------------------------------------------------- /libs/util-linux/libblkid/partitions/aix.h: -------------------------------------------------------------------------------- 1 | #ifndef BLKID_PARTITIONS_AIX_H 2 | #define BLKID_PARTITIONS_AIX_H 3 | 4 | #define BLKID_AIX_MAGIC_STRING "\xC9\xC2\xD4\xC1" 5 | #define BLKID_AIX_MAGIC_STRLEN (sizeof(BLKID_AIX_MAGIC_STRING) - 1) 6 | 7 | #endif 8 | -------------------------------------------------------------------------------- /libs/util-linux/libblkid/superblocks/bfs.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2009 Red Hat, Inc. 3 | * 4 | * This file may be redistributed under the terms of the 5 | * GNU Lesser General Public License. 6 | */ 7 | 8 | #include "superblocks.h" 9 | 10 | /* 11 | * BFS actually has two different labels in the superblock, each 12 | * of them only 6 bytes long. Until we find out what their use 13 | * we just ignore them. 14 | */ 15 | const struct blkid_idinfo bfs_idinfo = 16 | { 17 | .name = "bfs", 18 | .usage = BLKID_USAGE_FILESYSTEM, 19 | .magics = { 20 | { .magic = "\xce\xfa\xad\x1b", .len = 4 }, 21 | { .magic = NULL, .len = 0 } 22 | } 23 | }; 24 | -------------------------------------------------------------------------------- /libs/util-linux/libblkid/superblocks/refs.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2013 Karel Zak 3 | * 4 | * This file may be redistributed under the terms of the 5 | * GNU Lesser General Public License. 6 | */ 7 | 8 | #include 9 | #include "superblocks.h" 10 | 11 | 12 | const struct blkid_idinfo refs_idinfo = 13 | { 14 | .name = "ReFS", 15 | .usage = BLKID_USAGE_FILESYSTEM, 16 | .magics = 17 | { 18 | { .magic = "\000\000\000ReFS\000", .len = 8 }, 19 | { .magic = NULL, .len = 0 } 20 | } 21 | }; 22 | 23 | -------------------------------------------------------------------------------- /libs/util-linux/libmount/COPYING: -------------------------------------------------------------------------------- 1 | This library is free software; you can redistribute it and/or 2 | modify it under the terms of the GNU Lesser General Public 3 | License as published by the Free Software Foundation; either 4 | version 2.1 of the License, or (at your option) any later 5 | version. 6 | 7 | The complete text of the license is available in the 8 | ../Documentation/licenses/COPYING.LGPL-2.1-or-later 9 | -------------------------------------------------------------------------------- /libs/util-linux/libsmartcols/COPYING: -------------------------------------------------------------------------------- 1 | This library is free software; you can redistribute it and/or 2 | modify it under the terms of the GNU Lesser General Public 3 | License as published by the Free Software Foundation; either 4 | version 2.1 of the License, or (at your option) any later 5 | version. 6 | 7 | The complete text of the license is available in the 8 | ../Documentation/licenses/COPYING.LGPL-2.1-or-later file. 9 | -------------------------------------------------------------------------------- /libs/util-linux/libuuid/.dirstamp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BigfootACA/simple-init/3d66a6e78d519dd050fbebde4db6c5ac933f9aa4/libs/util-linux/libuuid/.dirstamp -------------------------------------------------------------------------------- /libs/util-linux/libuuid/COPYING: -------------------------------------------------------------------------------- 1 | This library is free software; you can redistribute it and/or 2 | modify it under the terms of the Modified BSD License. 3 | 4 | The complete text of the license is available in the 5 | ../Documentation/licenses/COPYING.BSD-3-Clause file. 6 | -------------------------------------------------------------------------------- /libs/zlib/Zlib.inf: -------------------------------------------------------------------------------- 1 | [Defines] 2 | INF_VERSION = 0x00010005 3 | BASE_NAME = Zlib 4 | FILE_GUID = C387C149-50D8-432F-8B01-0FB573440377 5 | MODULE_TYPE = UEFI_APPLICATION 6 | VERSION_STRING = 1.0 7 | LIBRARY_CLASS = Zlib 8 | 9 | [BuildOptions] 10 | GCC:*_*_*_CC_FLAGS = -include src/config-uefi.h -Wno-implicit-fallthrough 11 | 12 | [Packages] 13 | MdePkg/MdePkg.dec 14 | SimpleInit.dec 15 | 16 | [LibraryClasses] 17 | UefiLib 18 | 19 | [Sources] 20 | libs/zlib/zutil.c 21 | libs/zlib/adler32.c 22 | libs/zlib/inftrees.c 23 | libs/zlib/inflate.c 24 | libs/zlib/inffast.c 25 | libs/zlib/deflate.c 26 | libs/zlib/compress.c 27 | libs/zlib/crc32.c 28 | libs/zlib/gzread.c 29 | libs/zlib/gzwrite.c 30 | libs/zlib/gzclose.c 31 | libs/zlib/trees.c 32 | libs/zlib/uncompr.c 33 | -------------------------------------------------------------------------------- /libs/zlib/gzclose.c: -------------------------------------------------------------------------------- 1 | /* gzclose.c -- zlib gzclose() function 2 | * Copyright (C) 2004, 2010 Mark Adler 3 | * For conditions of distribution and use, see copyright notice in zlib.h 4 | */ 5 | 6 | #include "gzguts.h" 7 | 8 | /* gzclose() is in a separate file so that it is linked in only if it is used. 9 | That way the other gzclose functions can be used instead to avoid linking in 10 | unneeded compression or decompression routines. */ 11 | int ZEXPORT gzclose(gzFile file) 12 | { 13 | #ifndef NO_GZCOMPRESS 14 | gz_statep state; 15 | 16 | if (file == NULL) 17 | return Z_STREAM_ERROR; 18 | state = (gz_statep)file; 19 | 20 | return state->mode == GZ_READ ? gzclose_r(file) : gzclose_w(file); 21 | #else 22 | return gzclose_r(file); 23 | #endif 24 | } 25 | -------------------------------------------------------------------------------- /libs/zlib/inffast.h: -------------------------------------------------------------------------------- 1 | /* inffast.h -- header to use inffast.c 2 | * Copyright (C) 1995-2003, 2010 Mark Adler 3 | * For conditions of distribution and use, see copyright notice in zlib.h 4 | */ 5 | 6 | /* WARNING: this file should *not* be used by applications. It is 7 | part of the implementation of the compression library and is 8 | subject to change. Applications should only use zlib.h. 9 | */ 10 | 11 | void ZLIB_INTERNAL inflate_fast OF((z_streamp strm, unsigned start)); 12 | -------------------------------------------------------------------------------- /libs/zlib/zlib.cmake: -------------------------------------------------------------------------------- 1 | include_directories(libs/zlib) 2 | add_library( 3 | z STATIC 4 | libs/zlib/zutil.c 5 | libs/zlib/adler32.c 6 | libs/zlib/inftrees.c 7 | libs/zlib/inflate.c 8 | libs/zlib/inffast.c 9 | libs/zlib/deflate.c 10 | libs/zlib/compress.c 11 | libs/zlib/crc32.c 12 | libs/zlib/gzlib.c 13 | libs/zlib/gzread.c 14 | libs/zlib/gzwrite.c 15 | libs/zlib/gzclose.c 16 | libs/zlib/trees.c 17 | libs/zlib/uncompr.c 18 | ) 19 | target_compile_options(z PRIVATE -Wno-implicit-fallthrough) 20 | -------------------------------------------------------------------------------- /po/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | find_package(Gettext REQUIRED) 2 | set(GETTEXT_PACKAGE "simple-init") 3 | foreach(lang zh_CN) 4 | gettext_process_po_files(${lang} ALL PO_FILES po/${lang}.po) 5 | endforeach() 6 | 7 | add_custom_command( 8 | OUTPUT "${CMAKE_CURRENT_SOURCE_DIR}/root/usr/share/locale" 9 | COMMAND bash 10 | "${CMAKE_CURRENT_SOURCE_DIR}/scripts/install-gmo.sh" 11 | "${CMAKE_CURRENT_SOURCE_DIR}" 12 | "${CMAKE_CURRENT_BINARY_DIR}" 13 | "${CMAKE_SOURCE_DIR}/root" 14 | DEPENDS pofiles 15 | ) 16 | -------------------------------------------------------------------------------- /prebuilts/kernel.txz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BigfootACA/simple-init/3d66a6e78d519dd050fbebde4db6c5ac933f9aa4/prebuilts/kernel.txz -------------------------------------------------------------------------------- /prebuilts/vmlinuz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BigfootACA/simple-init/3d66a6e78d519dd050fbebde4db6c5ac933f9aa4/prebuilts/vmlinuz -------------------------------------------------------------------------------- /root/.gitignore: -------------------------------------------------------------------------------- 1 | /dev/* 2 | /sys/* 3 | /proc/* 4 | /run/* 5 | /tmp/* 6 | /usr/share/locale 7 | !.gitkeep 8 | !.gitignore 9 | -------------------------------------------------------------------------------- /root/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BigfootACA/simple-init/3d66a6e78d519dd050fbebde4db6c5ac933f9aa4/root/.gitkeep -------------------------------------------------------------------------------- /root/bin: -------------------------------------------------------------------------------- 1 | usr/bin -------------------------------------------------------------------------------- /root/dev/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BigfootACA/simple-init/3d66a6e78d519dd050fbebde4db6c5ac933f9aa4/root/dev/.gitkeep -------------------------------------------------------------------------------- /root/etc/default.ttf: -------------------------------------------------------------------------------- 1 | ../usr/share/fonts/wqy-mono-microhei.ttf -------------------------------------------------------------------------------- /root/etc/group: -------------------------------------------------------------------------------- 1 | root:x:0:root 2 | -------------------------------------------------------------------------------- /root/etc/gshadow: -------------------------------------------------------------------------------- 1 | root:::root 2 | -------------------------------------------------------------------------------- /root/etc/hosts: -------------------------------------------------------------------------------- 1 | 127.0.0.1 localhost 2 | -------------------------------------------------------------------------------- /root/etc/mtab: -------------------------------------------------------------------------------- 1 | ../proc/self/mount -------------------------------------------------------------------------------- /root/etc/passwd: -------------------------------------------------------------------------------- 1 | root:x:0:0::/:/bin/sh 2 | -------------------------------------------------------------------------------- /root/etc/profile: -------------------------------------------------------------------------------- 1 | if [ -z "${IN_BASHRC}" ]&&[ -n "${BASH}" ] 2 | then source /etc/bashrc 3 | else [ "$(id -u)" == 0 ]&&PS1='# '||PS1='$ ' 4 | fi 5 | unset IN_BASHRC 6 | export PATH="/usr/bin" 7 | if [ -r "/etc/environment" ] 8 | then while read -r i 9 | do export "${i}" 10 | done<"/etc/environment" 11 | fi 12 | if [ -r "/etc/locale.conf" ] 13 | then while read -r i 14 | do export "${i}" 15 | done<"/etc/locale.conf" 16 | fi 17 | for i in /etc/profile.d/*.sh 18 | do [ -r "$i" ]&&source "${i}" 19 | done 20 | unset i 21 | -------------------------------------------------------------------------------- /root/etc/resolv.conf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BigfootACA/simple-init/3d66a6e78d519dd050fbebde4db6c5ac933f9aa4/root/etc/resolv.conf -------------------------------------------------------------------------------- /root/etc/shadow: -------------------------------------------------------------------------------- 1 | root:::::::: 2 | -------------------------------------------------------------------------------- /root/etc/shells: -------------------------------------------------------------------------------- 1 | /bin/sh 2 | -------------------------------------------------------------------------------- /root/etc/symbols.ttf: -------------------------------------------------------------------------------- 1 | ../usr/share/fonts/fontawesome5.ttf -------------------------------------------------------------------------------- /root/etc/terminfo/a/ansi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BigfootACA/simple-init/3d66a6e78d519dd050fbebde4db6c5ac933f9aa4/root/etc/terminfo/a/ansi -------------------------------------------------------------------------------- /root/etc/terminfo/d/dumb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BigfootACA/simple-init/3d66a6e78d519dd050fbebde4db6c5ac933f9aa4/root/etc/terminfo/d/dumb -------------------------------------------------------------------------------- /root/etc/terminfo/e/emu: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BigfootACA/simple-init/3d66a6e78d519dd050fbebde4db6c5ac933f9aa4/root/etc/terminfo/e/emu -------------------------------------------------------------------------------- /root/etc/terminfo/l/linux: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BigfootACA/simple-init/3d66a6e78d519dd050fbebde4db6c5ac933f9aa4/root/etc/terminfo/l/linux -------------------------------------------------------------------------------- /root/etc/terminfo/n/ntconsole: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BigfootACA/simple-init/3d66a6e78d519dd050fbebde4db6c5ac933f9aa4/root/etc/terminfo/n/ntconsole -------------------------------------------------------------------------------- /root/etc/terminfo/p/pty: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BigfootACA/simple-init/3d66a6e78d519dd050fbebde4db6c5ac933f9aa4/root/etc/terminfo/p/pty -------------------------------------------------------------------------------- /root/etc/terminfo/p/putty: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BigfootACA/simple-init/3d66a6e78d519dd050fbebde4db6c5ac933f9aa4/root/etc/terminfo/p/putty -------------------------------------------------------------------------------- /root/etc/terminfo/p/putty-256color: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BigfootACA/simple-init/3d66a6e78d519dd050fbebde4db6c5ac933f9aa4/root/etc/terminfo/p/putty-256color -------------------------------------------------------------------------------- /root/etc/terminfo/r/rxvt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BigfootACA/simple-init/3d66a6e78d519dd050fbebde4db6c5ac933f9aa4/root/etc/terminfo/r/rxvt -------------------------------------------------------------------------------- /root/etc/terminfo/r/rxvt-256color: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BigfootACA/simple-init/3d66a6e78d519dd050fbebde4db6c5ac933f9aa4/root/etc/terminfo/r/rxvt-256color -------------------------------------------------------------------------------- /root/etc/terminfo/r/rxvt-color: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BigfootACA/simple-init/3d66a6e78d519dd050fbebde4db6c5ac933f9aa4/root/etc/terminfo/r/rxvt-color -------------------------------------------------------------------------------- /root/etc/terminfo/s/screen: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BigfootACA/simple-init/3d66a6e78d519dd050fbebde4db6c5ac933f9aa4/root/etc/terminfo/s/screen -------------------------------------------------------------------------------- /root/etc/terminfo/s/screen-256color: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BigfootACA/simple-init/3d66a6e78d519dd050fbebde4db6c5ac933f9aa4/root/etc/terminfo/s/screen-256color -------------------------------------------------------------------------------- /root/etc/terminfo/v/vt100: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BigfootACA/simple-init/3d66a6e78d519dd050fbebde4db6c5ac933f9aa4/root/etc/terminfo/v/vt100 -------------------------------------------------------------------------------- /root/etc/terminfo/v/vt102: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BigfootACA/simple-init/3d66a6e78d519dd050fbebde4db6c5ac933f9aa4/root/etc/terminfo/v/vt102 -------------------------------------------------------------------------------- /root/etc/terminfo/v/vt200: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BigfootACA/simple-init/3d66a6e78d519dd050fbebde4db6c5ac933f9aa4/root/etc/terminfo/v/vt200 -------------------------------------------------------------------------------- /root/etc/terminfo/v/vt220: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BigfootACA/simple-init/3d66a6e78d519dd050fbebde4db6c5ac933f9aa4/root/etc/terminfo/v/vt220 -------------------------------------------------------------------------------- /root/etc/terminfo/x/xterm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BigfootACA/simple-init/3d66a6e78d519dd050fbebde4db6c5ac933f9aa4/root/etc/terminfo/x/xterm -------------------------------------------------------------------------------- /root/etc/terminfo/x/xterm-256color: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BigfootACA/simple-init/3d66a6e78d519dd050fbebde4db6c5ac933f9aa4/root/etc/terminfo/x/xterm-256color -------------------------------------------------------------------------------- /root/etc/terminfo/x/xterm-color: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BigfootACA/simple-init/3d66a6e78d519dd050fbebde4db6c5ac933f9aa4/root/etc/terminfo/x/xterm-color -------------------------------------------------------------------------------- /root/etc/terminfo/x/xterm-xfree86: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BigfootACA/simple-init/3d66a6e78d519dd050fbebde4db6c5ac933f9aa4/root/etc/terminfo/x/xterm-xfree86 -------------------------------------------------------------------------------- /root/lib: -------------------------------------------------------------------------------- 1 | usr/lib -------------------------------------------------------------------------------- /root/lib64: -------------------------------------------------------------------------------- 1 | usr/lib -------------------------------------------------------------------------------- /root/proc/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BigfootACA/simple-init/3d66a6e78d519dd050fbebde4db6c5ac933f9aa4/root/proc/.gitkeep -------------------------------------------------------------------------------- /root/run/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BigfootACA/simple-init/3d66a6e78d519dd050fbebde4db6c5ac933f9aa4/root/run/.gitkeep -------------------------------------------------------------------------------- /root/sbin: -------------------------------------------------------------------------------- 1 | usr/bin -------------------------------------------------------------------------------- /root/sys/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BigfootACA/simple-init/3d66a6e78d519dd050fbebde4db6c5ac933f9aa4/root/sys/.gitkeep -------------------------------------------------------------------------------- /root/tmp/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BigfootACA/simple-init/3d66a6e78d519dd050fbebde4db6c5ac933f9aa4/root/tmp/.gitkeep -------------------------------------------------------------------------------- /root/usr/bin/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BigfootACA/simple-init/3d66a6e78d519dd050fbebde4db6c5ac933f9aa4/root/usr/bin/.gitkeep -------------------------------------------------------------------------------- /root/usr/lib/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BigfootACA/simple-init/3d66a6e78d519dd050fbebde4db6c5ac933f9aa4/root/usr/lib/.gitkeep -------------------------------------------------------------------------------- /root/usr/lib64: -------------------------------------------------------------------------------- 1 | lib -------------------------------------------------------------------------------- /root/usr/sbin: -------------------------------------------------------------------------------- 1 | bin -------------------------------------------------------------------------------- /root/usr/share/fonts/fontawesome5.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BigfootACA/simple-init/3d66a6e78d519dd050fbebde4db6c5ac933f9aa4/root/usr/share/fonts/fontawesome5.ttf -------------------------------------------------------------------------------- /root/usr/share/fonts/wqy-mono-microhei.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BigfootACA/simple-init/3d66a6e78d519dd050fbebde4db6c5ac933f9aa4/root/usr/share/fonts/wqy-mono-microhei.ttf -------------------------------------------------------------------------------- /root/usr/share/pixmaps/mime/application-x-zerosize.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /root/usr/share/pixmaps/mime/inode-dir.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /root/usr/share/pixmaps/mime/inode-disk.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /root/usr/share/pixmaps/mime/inode-file.svg: -------------------------------------------------------------------------------- 1 | application-x-zerosize.svg -------------------------------------------------------------------------------- /root/usr/share/pixmaps/mime/inode-parent.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /root/usr/share/pixmaps/mime/text-x-plain.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /root/usr/share/pixmaps/simple-init/back.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /root/usr/share/pixmaps/simple-init/battery.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /root/usr/share/pixmaps/simple-init/bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BigfootACA/simple-init/3d66a6e78d519dd050fbebde4db6c5ac933f9aa4/root/usr/share/pixmaps/simple-init/bg.jpg -------------------------------------------------------------------------------- /root/usr/share/pixmaps/simple-init/distributor-logo-artix.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /root/usr/share/pixmaps/simple-init/distributor-logo-bunsenlabs.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /root/usr/share/pixmaps/simple-init/distributor-logo-manjaro.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /root/usr/share/pixmaps/simple-init/distributor-logo-mx.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /root/usr/share/pixmaps/simple-init/distributor-logo-parrot.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /root/usr/share/pixmaps/simple-init/distributor-logo-pureos.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /root/usr/share/pixmaps/simple-init/distributor-logo-voyager.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /root/usr/share/pixmaps/simple-init/distributor-logo-windows.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /root/usr/share/pixmaps/simple-init/img_cogwheel_argb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BigfootACA/simple-init/3d66a6e78d519dd050fbebde4db6c5ac933f9aa4/root/usr/share/pixmaps/simple-init/img_cogwheel_argb.png -------------------------------------------------------------------------------- /root/usr/share/pixmaps/simple-init/img_cogwheel_chroma_keyed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BigfootACA/simple-init/3d66a6e78d519dd050fbebde4db6c5ac933f9aa4/root/usr/share/pixmaps/simple-init/img_cogwheel_chroma_keyed.png -------------------------------------------------------------------------------- /root/usr/share/pixmaps/simple-init/img_cogwheel_indexed16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BigfootACA/simple-init/3d66a6e78d519dd050fbebde4db6c5ac933f9aa4/root/usr/share/pixmaps/simple-init/img_cogwheel_indexed16.png -------------------------------------------------------------------------------- /root/usr/share/pixmaps/simple-init/img_cogwheel_rgb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BigfootACA/simple-init/3d66a6e78d519dd050fbebde4db6c5ac933f9aa4/root/usr/share/pixmaps/simple-init/img_cogwheel_rgb.png -------------------------------------------------------------------------------- /root/usr/share/pixmaps/simple-init/mount.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /root/usr/share/pixmaps/simple-init/proxmox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BigfootACA/simple-init/3d66a6e78d519dd050fbebde4db6c5ac933f9aa4/root/usr/share/pixmaps/simple-init/proxmox.png -------------------------------------------------------------------------------- /root/usr/share/pixmaps/simple-init/screen.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /root/usr/share/pixmaps/simple-init/twrp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BigfootACA/simple-init/3d66a6e78d519dd050fbebde4db6c5ac933f9aa4/root/usr/share/pixmaps/simple-init/twrp.png -------------------------------------------------------------------------------- /root/usr/share/simple-init/apps/reboot.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | reboot-menu 4 | Reboot Menu 5 | true 6 | true 7 | true 8 | /usr/share/simple-init/gui/reboot.xml 9 | 10 | -------------------------------------------------------------------------------- /root/usr/share/simple-init/gui-http/index.css: -------------------------------------------------------------------------------- 1 | body{ 2 | user-select: none; 3 | -moz-user-select: none; 4 | -webkit-user-select: none; 5 | } 6 | canvas#canvas{ 7 | background-color: black; 8 | } 9 | -------------------------------------------------------------------------------- /root/usr/share/simple-init/gui-http/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Simple Init Web Frame Buffer 8 | 9 | 10 |

11 | Speed: 0B/s  12 | Transferred: 0B  13 | FPS: 0  14 |

15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /root/usr/share/simple-init/gui-http/web_gui_render.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BigfootACA/simple-init/3d66a6e78d519dd050fbebde4db6c5ac933f9aa4/root/usr/share/simple-init/gui-http/web_gui_render.wasm -------------------------------------------------------------------------------- /root/usr/share/terminfo: -------------------------------------------------------------------------------- 1 | ../../etc/terminfo -------------------------------------------------------------------------------- /root/var/cache/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BigfootACA/simple-init/3d66a6e78d519dd050fbebde4db6c5ac933f9aa4/root/var/cache/.gitkeep -------------------------------------------------------------------------------- /root/var/lib/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BigfootACA/simple-init/3d66a6e78d519dd050fbebde4db6c5ac933f9aa4/root/var/lib/.gitkeep -------------------------------------------------------------------------------- /root/var/lock: -------------------------------------------------------------------------------- 1 | ../run/lock -------------------------------------------------------------------------------- /root/var/log/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BigfootACA/simple-init/3d66a6e78d519dd050fbebde4db6c5ac933f9aa4/root/var/log/.gitkeep -------------------------------------------------------------------------------- /root/var/run: -------------------------------------------------------------------------------- 1 | ../run -------------------------------------------------------------------------------- /root/var/tmp/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BigfootACA/simple-init/3d66a6e78d519dd050fbebde4db6c5ac933f9aa4/root/var/tmp/.gitkeep -------------------------------------------------------------------------------- /scripts/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | pushd "$(dirname "$0")/.." >/dev/null 4 | source scripts/functions.sh.inc 5 | source scripts/environments.sh.inc 6 | rm -rf root/usr/share/locale 7 | touch root 8 | cmake \ 9 | -B build -S . \ 10 | -G Ninja \ 11 | "${@}" 12 | ninja -C build -j "$(nproc)" 13 | popd >/dev/null 14 | -------------------------------------------------------------------------------- /scripts/calc-lines.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | pushd "$(dirname "$0")/.." >/dev/null 4 | source scripts/functions.sh.inc 5 | source scripts/environments.sh.inc 6 | FOLDERS=( 7 | src 8 | include 9 | po 10 | scripts 11 | ) 12 | find "${FOLDERS[@]}" -type f -print0 |\ 13 | wc --files0-from=- --lines |\ 14 | sort --numeric-sort |\ 15 | tail -n 23 16 | -------------------------------------------------------------------------------- /scripts/gen-logfs.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | pushd "$(dirname "$0")/.." >/dev/null 4 | source scripts/functions.sh.inc 5 | source scripts/environments.sh.inc 6 | [ -f "${LOGFS}" ]&&rm -f "${LOGFS}" 7 | fallocate -l "${LOGFS_SIZE}" "${LOGFS}" 8 | parted "${LOGFS}" mklabel gpt 9 | parted "${LOGFS}" mkpart logfs fat16 2048s "${LOGFS_SIZE}" 10 | _BLK="$(losetup --partscan --find --show "${LOGFS}")" 11 | [ -b "${_BLK}" ]||exit 1 12 | mkfs.vfat -n LOGFS "${_BLK}p1" 13 | losetup -d "${_BLK}" 14 | popd >/dev/null 15 | -------------------------------------------------------------------------------- /scripts/gen-rootfs-source.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | WORKSPACE="$(realpath "$(dirname $0)"/..)" 3 | BUILD="/tmp" 4 | ROOT="${WORKSPACE}/root" 5 | [ -n "${1}" ]&&WORKSPACE="${1}" 6 | [ -n "${2}" ]&&BUILD="${2}" 7 | [ -n "${3}" ]&&ROOT="${3}" 8 | set -e 9 | "${HOSTCC:-gcc}" \ 10 | -Wall -Wextra -Werror -g \ 11 | -I"${WORKSPACE}/include" \ 12 | "${WORKSPACE}/src/host/rootfs.c" \ 13 | -o "${BUILD}/assets" 14 | "${BUILD}/assets" \ 15 | "${ROOT}" \ 16 | "${BUILD}" \ 17 | assets_rootfs 18 | if [ -z "${NOBUILD}" ] 19 | then pushd "${BUILD}" >/dev/null 20 | "${CC:-${CROSS_COMPILE}gcc}" \ 21 | ${CFLAGS} \ 22 | -r -Wl,-b,binary \ 23 | -o rootfs_data.o \ 24 | rootfs.bin 25 | popd >/dev/null 26 | fi 27 | -------------------------------------------------------------------------------- /scripts/install-gmo.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | WORKSPACE="$(realpath "$(dirname $0)"/..)" 3 | BUILD="/tmp" 4 | ROOT="${WORKSPACE}/root" 5 | [ -n "${1}" ]&&WORKSPACE="${1}" 6 | [ -n "${2}" ]&&BUILD="${2}" 7 | [ -n "${3}" ]&&ROOT="${3}" 8 | for i in "${BUILD}"/*.gmo 9 | do if ! [ -f "${i}" ] 10 | then echo "${i} not found">&2 11 | exit 1 12 | fi 13 | LOCALE="$(basename "$i" .gmo)" 14 | TARGET="${ROOT}/usr/share/locale/${LOCALE}/LC_MESSAGES/simple-init.mo" 15 | install -Dm644 "${i}" "${TARGET}" 16 | done -------------------------------------------------------------------------------- /scripts/qemu.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | pushd "$(dirname "$0")/.." >/dev/null 4 | source scripts/functions.sh.inc 5 | source scripts/environments.sh.inc 6 | exec "${QEMU_BIN}" \ 7 | -m "${QEMU_MEM}" \ 8 | -enable-kvm \ 9 | -display sdl \ 10 | -kernel "${KERNEL}" \ 11 | -append "${CMDLINE} $(stty size|awk '{print "LINES="$1" COLUMNS="$2}') $*" \ 12 | -initrd "${INITRAMFS}" \ 13 | -chardev stdio,id=char0 \ 14 | -serial chardev:char0 \ 15 | -drive file="${LOGFS}",format=raw,if=none,id=sda \ 16 | -drive file="${MINIDISK}",format=raw,if=none,id=sdb \ 17 | -device virtio-blk-pci,drive=sda \ 18 | -device virtio-blk-pci,drive=sdb \ 19 | -device qxl,xres=540,yres=960 \ 20 | -vga none \ 21 | -rtc base=localtime 22 | -------------------------------------------------------------------------------- /scripts/submodules.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | pushd "$(dirname "$0")/.." >/dev/null 4 | source scripts/functions.sh.inc 5 | source scripts/environments.sh.inc 6 | ME="$(realpath "$0")" 7 | git submodule init 8 | git submodule sync --recursive 9 | git submodule update --recursive --depth=1 10 | for i in $(git submodule status|awk '{print $2}') 11 | do [ -f "${i}/.gitmodules" ]||continue 12 | pushd "${i}" >/dev/null 13 | bash "$ME" 14 | popd >/dev/null 15 | done 16 | popd >/dev/null -------------------------------------------------------------------------------- /src/SimpleInitRootFS.inf: -------------------------------------------------------------------------------- 1 | [Defines] 2 | INF_VERSION = 0x00010005 3 | BASE_NAME = SimpleInitRootFS 4 | FILE_GUID = CFE20049-25DE-403B-94DE-29EDF36A3092 5 | MODULE_TYPE = UEFI_APPLICATION 6 | VERSION_STRING = 1.0 7 | LIBRARY_CLASS = SimpleInitRootFS 8 | 9 | [BuildOptions] 10 | GCC:*_*_*_CC_FLAGS = -include src/config-uefi.h 11 | 12 | [Packages] 13 | MdePkg/MdePkg.dec 14 | SimpleInit.dec 15 | 16 | [LibraryClasses] 17 | UefiLib 18 | SimpleInitCompatible 19 | 20 | [Sources] 21 | # Simple-Init builtin rootfs generate from ./root (RUN BEFORE BUILD) 22 | # bash scripts/gen-rootfs-source.sh ./ ./build ./root 23 | ../build/rootfs.c 24 | ../build/rootfs_data.o 25 | -------------------------------------------------------------------------------- /src/adbd/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_library(init_adbd STATIC 2 | adb.c 3 | adb_auth.c 4 | fdevent.c 5 | file_sync.c 6 | services.c 7 | socket_local.c 8 | sockets.c 9 | transport.c 10 | usb.c 11 | gadget.c 12 | ) 13 | -------------------------------------------------------------------------------- /src/assets/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_library(init_assets STATIC 2 | assets.c 3 | ) 4 | -------------------------------------------------------------------------------- /src/assets/SimpleInitAssets.inf: -------------------------------------------------------------------------------- 1 | [Defines] 2 | INF_VERSION = 0x00010005 3 | BASE_NAME = SimpleInitAssets 4 | FILE_GUID = 944F44B0-E8A9-450A-9FFF-952382AEF03E 5 | MODULE_TYPE = UEFI_APPLICATION 6 | VERSION_STRING = 1.0 7 | LIBRARY_CLASS = SimpleInitAssets 8 | 9 | [BuildOptions] 10 | GCC:*_*_*_CC_FLAGS = -include src/config-uefi.h 11 | 12 | [Packages] 13 | MdePkg/MdePkg.dec 14 | SimpleInit.dec 15 | 16 | [LibraryClasses] 17 | UefiLib 18 | SimpleInitLib 19 | SimpleInitRootFS 20 | SimpleInitCompatible 21 | 22 | [Sources] 23 | # Simple-Init builtin assets library 24 | assets.c 25 | -------------------------------------------------------------------------------- /src/bcd/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_library(init_bcd STATIC 2 | data.c 3 | lib.c 4 | store.c 5 | object.c 6 | element.c 7 | element_value.c 8 | device.c 9 | dump.c 10 | ) 11 | -------------------------------------------------------------------------------- /src/boot/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_library(init_boot STATIC 2 | boot.c 3 | bootdef.c 4 | reboot.c 5 | root.c 6 | system.c 7 | charger.c 8 | lua.c 9 | ) 10 | -------------------------------------------------------------------------------- /src/boot/exit.c: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2021 BigfootACA 4 | * 5 | * SPDX-License-Identifier: LGPL-3.0-or-later 6 | * 7 | */ 8 | 9 | #include 10 | #include 11 | #include 12 | #include"boot.h" 13 | 14 | int run_boot_exit(boot_config*boot){ 15 | if(!boot->splash[0])BootLogoEnableLogo(); 16 | gBS->Exit(gImageHandle,EFI_ABORTED,0,NULL); 17 | return -1; 18 | } 19 | -------------------------------------------------------------------------------- /src/boot/lua.c: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2021 BigfootACA 4 | * 5 | * SPDX-License-Identifier: LGPL-3.0-or-later 6 | * 7 | */ 8 | 9 | #include"boot.h" 10 | #include"confd.h" 11 | #include"logger.h" 12 | #include"xlua.h" 13 | #define TAG "boot-lua" 14 | 15 | int run_boot_lua(boot_config*boot){ 16 | int r=-1; 17 | #ifdef ENABLE_LUA 18 | char*file=NULL; 19 | lua_State*st=NULL; 20 | if(!(file=confd_get_string_base(boot->key,"file",NULL))) 21 | EDONE(tlog_error("lua file path not set")); 22 | if(!(st=xlua_init())) 23 | EDONE(tlog_error("init lua context failed")); 24 | lua_pushinteger(st,0); 25 | lua_setglobal(st,"retval"); 26 | boot_config_to_lua(st,boot); 27 | lua_setglobal(st,"boot"); 28 | if((r=xlua_run(st,TAG,file))==LUA_OK){ 29 | lua_getglobal(st,"retval"); 30 | r=lua_tointeger(st,-1); 31 | } 32 | done: 33 | if(file)free(file); 34 | if(st)lua_close(st); 35 | #endif 36 | return r; 37 | } 38 | -------------------------------------------------------------------------------- /src/boot/reboot_uefi.c: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2021 BigfootACA 4 | * 5 | * SPDX-License-Identifier: LGPL-3.0-or-later 6 | * 7 | */ 8 | 9 | #include 10 | #include 11 | #include"boot.h" 12 | #include"confd.h" 13 | #include"logger.h" 14 | #include"defines.h" 15 | #include"system.h" 16 | #define TAG "reboot" 17 | 18 | int run_boot_reboot(boot_config*boot){ 19 | if(!boot)ERET(EINVAL); 20 | char*data=NULL; 21 | enum reboot_cmd cmd; 22 | switch(boot->mode){ 23 | case BOOT_REBOOT: 24 | data=confd_get_string_base(boot->key,"arg",NULL); 25 | cmd=data?REBOOT_DATA:REBOOT_COLD; 26 | break; 27 | case BOOT_HALT: 28 | case BOOT_POWEROFF:cmd=REBOOT_POWEROFF;break; 29 | default:ERET(EINVAL); 30 | } 31 | confd_save_file(NULL); 32 | adv_reboot(cmd,data); 33 | tlog_warn("reset system failed"); 34 | return -1; 35 | } 36 | -------------------------------------------------------------------------------- /src/boot/system.c: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2021 BigfootACA 4 | * 5 | * SPDX-License-Identifier: LGPL-3.0-or-later 6 | * 7 | */ 8 | 9 | #define _GNU_SOURCE 10 | #include 11 | #include"boot.h" 12 | #include"logger.h" 13 | #include"defines.h" 14 | #include"init_internal.h" 15 | #define TAG "switchroot" 16 | 17 | int run_boot_system(boot_config*boot __attribute__((unused))){ 18 | errno=0; 19 | struct init_msg msg,response; 20 | init_initialize_msg(&msg,ACTION_SVC_START); 21 | strcpy(msg.data.data,"system"); 22 | init_send(&msg,&response); 23 | if(errno!=0)telog_error("send service command failed"); 24 | errno=response.data.status.ret; 25 | if(errno!=0)telog_error("start system failed"); 26 | return response.data.status.ret; 27 | } 28 | -------------------------------------------------------------------------------- /src/boot/uefi_option.c: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2021 BigfootACA 4 | * 5 | * SPDX-License-Identifier: LGPL-3.0-or-later 6 | * 7 | */ 8 | 9 | #include 10 | #include"logger.h" 11 | #include"boot.h" 12 | #include"confd.h" 13 | #define TAG "option" 14 | 15 | int run_boot_uefi_option(boot_config*boot){ 16 | UINTN cnt=0,i=0,opt; 17 | EFI_BOOT_MANAGER_LOAD_OPTION*bo; 18 | if(confd_get_type_base(boot->key,"option")!=TYPE_INTEGER)ERET(EINVAL); 19 | if(!(bo=EfiBootManagerGetLoadOptions(&cnt,LoadOptionTypeBoot))||cnt<=0) 20 | return ENUM(trlog_warn(ENOENT,"no any option found")); 21 | opt=(UINTN)confd_get_integer_base(boot->key,"option",0x10000); 22 | if(opt>0xFFFF)ERET(EINVAL); 23 | for(i=0;i 4 | * 5 | * SPDX-License-Identifier: LGPL-3.0-or-later 6 | * 7 | */ 8 | 9 | #define _GNU_SOURCE 10 | #include 11 | #include"confd.h" 12 | #include"cmdline.h" 13 | #define TAG "cmdline" 14 | 15 | extern boot_config boot_charger; 16 | int cmdline_androidboot(char*k,char*v){ 17 | char*base="runtime.cmdline",*conf; 18 | if(strncmp(k,"androidboot.",12)!=0)return 0; 19 | k+=12; 20 | if(strcmp(k,"mode")==0){ 21 | if(strcmp(v,"charger")==0){ 22 | confd_set_string("boot.current","charger"); 23 | confd_set_save("boot.current",false); 24 | } 25 | conf=k; 26 | }else if(strcmp(k,"usbcontroller")==0)conf="udc"; 27 | else if(strcmp(k,"serialno")==0)conf="serial"; 28 | else if(strcmp(k,"bootdevice")==0)conf="disk"; 29 | else if(strlen(k)>0)conf=k; 30 | else return 0; 31 | confd_set_string_base(base,conf,v); 32 | return 0; 33 | } 34 | -------------------------------------------------------------------------------- /src/cmdline/conffs.c: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2021 BigfootACA 4 | * 5 | * SPDX-License-Identifier: LGPL-3.0-or-later 6 | * 7 | */ 8 | 9 | #include"confd.h" 10 | 11 | int cmdline_conffs(char*k __attribute__((unused)),char*v){ 12 | confd_set_string("runtime.cmdline.conffs",v); 13 | return 0; 14 | } 15 | 16 | int cmdline_conffile(char*k __attribute__((unused)),char*v){ 17 | confd_set_string("runtime.cmdline.conffile",v); 18 | return 0; 19 | } 20 | -------------------------------------------------------------------------------- /src/cmdline/console.c: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2021 BigfootACA 4 | * 5 | * SPDX-License-Identifier: LGPL-3.0-or-later 6 | * 7 | */ 8 | 9 | #define _GNU_SOURCE 10 | #include"confd.h" 11 | #include"language.h" 12 | 13 | int cmdline_console_shell(char*k __attribute__((unused)),char*v __attribute__((unused))){ 14 | confd_set_boolean("runtime.cmdline.console_shell",true); 15 | return 0; 16 | } 17 | 18 | int cmdline_language(char*k __attribute__((unused)),char*v){ 19 | lang_set(v); 20 | return 0; 21 | } 22 | -------------------------------------------------------------------------------- /src/cmdline/logfs.c: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2021 BigfootACA 4 | * 5 | * SPDX-License-Identifier: LGPL-3.0-or-later 6 | * 7 | */ 8 | 9 | #include"confd.h" 10 | 11 | int cmdline_logfs(char*k __attribute__((unused)),char*v){ 12 | confd_set_string("runtime.cmdline.logfs",v); 13 | return 0; 14 | } 15 | 16 | int cmdline_logfile(char*k __attribute__((unused)),char*v){ 17 | confd_set_string("runtime.cmdline.logfile",v); 18 | return 0; 19 | } 20 | -------------------------------------------------------------------------------- /src/commands/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_library(init_commands STATIC 2 | arch.c 3 | cat.c 4 | cd.c 5 | chdir.c 6 | clear.c 7 | dmesg.c 8 | dumps.c 9 | exit.c 10 | findfs.c 11 | help.c 12 | initloggerd.c 13 | insmod.c 14 | loggerctl.c 15 | ls.c 16 | lsmod.c 17 | modprobe.c 18 | mountpoint.c 19 | rmmod.c 20 | setsid.c 21 | truefalse.c 22 | uname.c 23 | unlink.c 24 | version.c 25 | initctl.c 26 | adbd.c 27 | service.c 28 | reboot.c 29 | poweroff.c 30 | halt.c 31 | confctl.c 32 | conftools.c 33 | chvt.c 34 | chroot.c 35 | lsfd.c 36 | close.c 37 | write.c 38 | echo.c 39 | simple-init.c 40 | abootimg.c 41 | dumpinput.c 42 | update-binary.c 43 | ) 44 | -------------------------------------------------------------------------------- /src/commands/arch.c: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2021 BigfootACA 4 | * 5 | * SPDX-License-Identifier: LGPL-3.0-or-later 6 | * 7 | */ 8 | 9 | #include 10 | #include 11 | #include"output.h" 12 | 13 | int arch_main(int argc,char**argv __attribute__((unused))){ 14 | if(argc!=1)return re_printf(1,"Usage: arch\n"); 15 | struct utsname uts; 16 | uname(&uts); 17 | puts(uts.machine); 18 | return 0; 19 | } -------------------------------------------------------------------------------- /src/commands/chdir.c: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2021 BigfootACA 4 | * 5 | * SPDX-License-Identifier: LGPL-3.0-or-later 6 | * 7 | */ 8 | 9 | #include 10 | #include 11 | #include"output.h" 12 | 13 | int chdir_main(int argc,char**argv){ 14 | if(argc==2&&argv[1])chdir(argv[1]); 15 | else errno=EINVAL; 16 | return errno!=0?re_printf(errno,"chdir"):0; 17 | } 18 | -------------------------------------------------------------------------------- /src/commands/clear.c: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2021 BigfootACA 4 | * 5 | * SPDX-License-Identifier: LGPL-3.0-or-later 6 | * 7 | */ 8 | 9 | #include 10 | #include"output.h" 11 | 12 | int clear_main(int argc,char**argv __attribute__((unused))){ 13 | if(argc!=1)return re_printf(1,"Usage: clear\n"); 14 | printf("\033[H\033[2J\033[3J"); 15 | return 0; 16 | } -------------------------------------------------------------------------------- /src/commands/close.c: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2021 BigfootACA 4 | * 5 | * SPDX-License-Identifier: LGPL-3.0-or-later 6 | * 7 | */ 8 | 9 | #define _GNU_SOURCE 10 | #include 11 | #include 12 | #include"output.h" 13 | #include"defines.h" 14 | 15 | int close_main(int argc,char**argv __attribute__((unused))){ 16 | if(argc!=2)return re_printf(1,"Usage: close \n"); 17 | char*value=argv[1],*end; 18 | int l=(int)strtol(value,&end,10); 19 | if(*end||value==end||errno!=0) 20 | return re_printf(2,"invalid file descriptor\n"); 21 | if(close(l)!=0)perror(_("close failed")); 22 | return errno; 23 | } 24 | -------------------------------------------------------------------------------- /src/commands/echo.c: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2021 BigfootACA 4 | * 5 | * SPDX-License-Identifier: LGPL-3.0-or-later 6 | * 7 | */ 8 | 9 | #define _GNU_SOURCE 10 | #include 11 | 12 | int echo_main(int argc,char**argv){ 13 | for(int i=1;i 4 | * 5 | * SPDX-License-Identifier: LGPL-3.0-or-later 6 | * 7 | */ 8 | 9 | #ifdef ENABLE_READLINE 10 | #include 11 | #include 12 | #include 13 | #include"defines.h" 14 | #include"str.h" 15 | #include"output.h" 16 | #include"../shell/shell_internal.h" 17 | 18 | int exit_main(int argc,char**argv){ 19 | if(argc<1)ERET(EINVAL); 20 | if(argc>2)return re_printf(1,"exit: too many arguments\n"); 21 | if(argc==2&&argv[1])exit_code=parse_int(argv[1],2); 22 | if(shell_running)shell_running=false; 23 | else exit(exit_code); 24 | return exit_code; 25 | } 26 | #endif 27 | -------------------------------------------------------------------------------- /src/commands/help.c: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2021 BigfootACA 4 | * 5 | * SPDX-License-Identifier: LGPL-3.0-or-later 6 | * 7 | */ 8 | 9 | #define _GNU_SOURCE 10 | #include 11 | #include"output.h" 12 | #include"defines.h" 13 | #include"str.h" 14 | #include"../shell/shell_internal.h" 15 | 16 | int help_main(int argc,char**argv __attribute__((unused))){ 17 | if(argc!=1)return re_printf(1,"Usage: help\n"); 18 | size_t max=0; 19 | const struct shell_command*cmd; 20 | for(size_t s=0;(cmd=shell_cmds[s]);s++) 21 | if(cmd->enabled)max=MAX(max,strlen(cmd->name)); 22 | for(size_t s=0;(cmd=shell_cmds[s]);s++){ 23 | if(!cmd->enabled||!cmd->name[0])continue; 24 | dprintf(STDOUT_FILENO,"%s",cmd->name); 25 | repeat(STDOUT_FILENO,' ',max-strlen(cmd->name)); 26 | dprintf(STDOUT_FILENO," - %s\n",_(cmd->help)); 27 | } 28 | return 0; 29 | } -------------------------------------------------------------------------------- /src/commands/truefalse.c: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2021 BigfootACA 4 | * 5 | * SPDX-License-Identifier: LGPL-3.0-or-later 6 | * 7 | */ 8 | 9 | int true_main(int argc __attribute__((unused)),char**argv __attribute__((unused))){return 0;} 10 | int false_main(int argc __attribute__((unused)),char**argv __attribute__((unused))){return 1;} 11 | -------------------------------------------------------------------------------- /src/commands/unlink.c: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2021 BigfootACA 4 | * 5 | * SPDX-License-Identifier: LGPL-3.0-or-later 6 | * 7 | */ 8 | 9 | #include 10 | #include"output.h" 11 | 12 | int unlink_main(int argc,char**argv){ 13 | if(argc<2)return re_printf(1,"unlink: missing operand\n"); 14 | if(argc>2)return re_printf(1,"unlink: too many arguments\n"); 15 | int r=unlink(argv[1]); 16 | return r==0?0:re_err(2,"unlink %s",argv[1]); 17 | } -------------------------------------------------------------------------------- /src/commands/version.c: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2021 BigfootACA 4 | * 5 | * SPDX-License-Identifier: LGPL-3.0-or-later 6 | * 7 | */ 8 | 9 | #include 10 | #include"defines.h" 11 | #include"version.h" 12 | 13 | int version_main(int argc,char**argv __attribute__((unused))){ 14 | puts(argc==1?VERSION_INFO:_("Usage: version")); 15 | return argc-1; 16 | } -------------------------------------------------------------------------------- /src/compress/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_library(init_compress STATIC 2 | compress.c 3 | compressors.c 4 | gzip.c 5 | ) 6 | -------------------------------------------------------------------------------- /src/compress/SimpleInitCompress.inf: -------------------------------------------------------------------------------- 1 | [Defines] 2 | INF_VERSION = 0x00010005 3 | BASE_NAME = SimpleInitCompress 4 | FILE_GUID = D48B3C80-98F3-4914-A50E-4868C345AD93 5 | MODULE_TYPE = UEFI_APPLICATION 6 | VERSION_STRING = 1.0 7 | LIBRARY_CLASS = SimpleInitCompress 8 | 9 | [BuildOptions] 10 | GCC:*_*_*_CC_FLAGS = -include src/config-uefi.h 11 | 12 | [Packages] 13 | MdePkg/MdePkg.dec 14 | MdeModulePkg/MdeModulePkg.dec 15 | SimpleInit.dec 16 | 17 | [LibraryClasses] 18 | UefiLib 19 | BaseLib 20 | BaseMemoryLib 21 | MemoryAllocationLib 22 | SimpleInitLib 23 | SimpleInitCompatible 24 | SimpleInitLoggerd 25 | Zlib 26 | 27 | [Sources] 28 | compress.c 29 | compressors.c 30 | gzip.c 31 | -------------------------------------------------------------------------------- /src/compress/compressors.c: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2021 BigfootACA 4 | * 5 | * SPDX-License-Identifier: LGPL-3.0-or-later 6 | * 7 | */ 8 | 9 | #include 10 | #include"internal.h" 11 | 12 | extern compressor compressor_gzip; 13 | compressor*compressors[]={ 14 | #ifdef ENABLE_ZLIB 15 | &compressor_gzip, 16 | #endif 17 | NULL 18 | }; 19 | -------------------------------------------------------------------------------- /src/compress/internal.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2021 BigfootACA 4 | * 5 | * SPDX-License-Identifier: LGPL-3.0-or-later 6 | * 7 | */ 8 | 9 | #ifndef _COMPRESS_INTERNAL_H 10 | #define _COMPRESS_INTERNAL_H 11 | #include 12 | #include 13 | #include"compress.h" 14 | 15 | typedef int(*compress_func)( 16 | unsigned char*inp,size_t inp_len, 17 | unsigned char*out,size_t out_len, 18 | size_t*pos,size_t*len 19 | ); 20 | 21 | typedef bool(*check_func)(unsigned char*inp,size_t inp_len); 22 | 23 | struct compressor{ 24 | const char name[256]; 25 | const char ext[32]; 26 | const char mime[64]; 27 | check_func is_format; 28 | compress_func compress; 29 | compress_func decompress; 30 | }; 31 | 32 | extern compressor*compressors[]; 33 | #endif 34 | -------------------------------------------------------------------------------- /src/confd/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_library(init_confd STATIC 2 | store.c 3 | dump.c 4 | client.c 5 | server.c 6 | internal.c 7 | file.c 8 | file_conf.c 9 | json_conf.c 10 | xml_conf.c 11 | ) 12 | -------------------------------------------------------------------------------- /src/config-uefi.h: -------------------------------------------------------------------------------- 1 | #define ENABLE_UEFI 1 2 | #define ENABLE_GUI 1 3 | #define ENABLE_FREETYPE2 1 4 | #define ENABLE_LODEPNG 1 5 | #define ENABLE_NANOSVG 1 6 | #define ENABLE_JSONC 1 7 | #define ENABLE_MXML 1 8 | #define ENABLE_STB 1 9 | #define ENABLE_LUA 1 10 | #define ENABLE_FDT 1 11 | #define ENABLE_ZLIB 1 12 | #define ENABLE_LIBTSM 1 13 | #define ENABLE_LIBZIP 1 14 | #define ENABLE_HIVEX 1 15 | #define FT2_BUILD_LIBRARY 1 16 | #define FT_CONFIG_OPTIONS_H "libs/freetype-uefi/ftoption.h" 17 | #define LV_CONF_PATH lv_conf.h 18 | #define LODEPNG_NO_COMPILE_DISK 19 | -------------------------------------------------------------------------------- /src/devd/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_library(init_devd STATIC 2 | devd.c 3 | devtmpfs.c 4 | dyndev.c 5 | firmware.c 6 | hotplug.c 7 | internal.c 8 | modalias.c 9 | netlink.c 10 | server.c 11 | uevent.c 12 | modules_load.c 13 | ) 14 | -------------------------------------------------------------------------------- /src/filesystem/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_library(init_filesystem STATIC 2 | oper.c 3 | file.c 4 | utils.c 5 | locked.c 6 | string.c 7 | volume.c 8 | drivers.c 9 | internal.c 10 | layer/template.c 11 | layer/overlay.c 12 | layer/assets.c 13 | layer/socket.c 14 | layer/posix.c 15 | layer/curl.c 16 | layer/zip.c 17 | volume/linux.c 18 | volume/mount.c 19 | volume/root.c 20 | ) 21 | -------------------------------------------------------------------------------- /src/filesystem/fs_internal.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2021 BigfootACA 4 | * 5 | * SPDX-License-Identifier: LGPL-3.0-or-later 6 | * 7 | */ 8 | 9 | #define _GNU_SOURCE 10 | #ifndef _FILESYSTEM_INTERNAL_H 11 | #define _FILESYSTEM_INTERNAL_H 12 | #include 13 | #include 14 | #include"filesystem.h" 15 | #include"fsdrv.h" 16 | #include"logger.h" 17 | #include"lock.h" 18 | #include"str.h" 19 | #define TAG "fs" 20 | #define FS_BUF_SIZE 4096 21 | #define fsh_new(drv,uri,data,flag)\ 22 | fsh_get_new(drv,uri,(void**)&(data),sizeof(*(data)),flag) 23 | #define RET(e) return (errno=(e)) 24 | #define DONE(e) {(errno=(e));goto done;} 25 | #define XRET(e,d) return (errno=((e)?:(d))) 26 | #define EXRET(e) return errno?:e 27 | #endif 28 | -------------------------------------------------------------------------------- /src/filesystem/volume/linux.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2021 BigfootACA 4 | * 5 | * SPDX-License-Identifier: LGPL-3.0-or-later 6 | * 7 | */ 8 | 9 | #ifndef FS_VOL_LINUX_H 10 | #define FS_VOL_LINUX_H 11 | #include"../fs_internal.h" 12 | extern void fill_from_mount_item(fsvol_private_info*info,struct mount_item*mnt); 13 | extern void fill_from_block_path(fsvol_private_info*info,char*block); 14 | extern void fill_from_statfs(fsvol_private_info*info,struct statfs*st); 15 | extern char*gen_id_from_mount_item(struct mount_item*item,char*buff,size_t len); 16 | #endif 17 | -------------------------------------------------------------------------------- /src/gadget/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_library(init_gadget STATIC 2 | add.c 3 | add_function.c 4 | general.c 5 | register.c 6 | startstop.c 7 | unregister.c 8 | service.c 9 | ) 10 | -------------------------------------------------------------------------------- /src/getopt/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_library(init_getopt STATIC 2 | getopt.c 3 | getopt_long.c 4 | ) 5 | -------------------------------------------------------------------------------- /src/gui/interface/term/serial.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2021 BigfootACA 4 | * 5 | * SPDX-License-Identifier: LGPL-3.0-or-later 6 | * 7 | */ 8 | 9 | #ifndef _SERIAL_H 10 | #define _SERIAL_H 11 | 12 | #include"gui/activity.h" 13 | #ifdef ENABLE_UEFI 14 | #include 15 | #include 16 | #endif 17 | 18 | struct serial_port_cfg{ 19 | #ifdef ENABLE_UEFI 20 | EFI_SERIAL_IO_PROTOCOL*proto; 21 | #else 22 | char port[256+sizeof(void*)]; 23 | #endif 24 | unsigned int baudrate; 25 | }; 26 | 27 | struct baudrate{ 28 | unsigned int speed; 29 | unsigned int number; 30 | char name[24]; 31 | }; 32 | 33 | extern struct baudrate serial_baudrates[]; 34 | extern struct gui_register guireg_serial_port; 35 | #endif 36 | -------------------------------------------------------------------------------- /src/gui/string/arc_mode.lst: -------------------------------------------------------------------------------- 1 | STR(LV_ARC_MODE_NORMAL, normal) 2 | STR(LV_ARC_MODE_SYMMETRICAL, symmetrical) 3 | STR(LV_ARC_MODE_SYMMETRICAL, sym) 4 | STR(LV_ARC_MODE_REVERSE, reverse) 5 | STR(LV_ARC_MODE_REVERSE, rev) 6 | -------------------------------------------------------------------------------- /src/gui/string/bar_mode.lst: -------------------------------------------------------------------------------- 1 | STR(LV_BAR_MODE_NORMAL, normal) 2 | STR(LV_BAR_MODE_SYMMETRICAL, symmetrical) 3 | STR(LV_BAR_MODE_SYMMETRICAL, sym) 4 | STR(LV_BAR_MODE_RANGE, range) 5 | -------------------------------------------------------------------------------- /src/gui/string/base_dir.lst: -------------------------------------------------------------------------------- 1 | STR(LV_BASE_DIR_LTR, ltr) 2 | STR(LV_BASE_DIR_RTL, rtl) 3 | STR(LV_BASE_DIR_AUTO, auto) 4 | STR(LV_BASE_DIR_NEUTRAL, neutral) 5 | STR(LV_BASE_DIR_WEAK, weak) 6 | -------------------------------------------------------------------------------- /src/gui/string/blend_mode.lst: -------------------------------------------------------------------------------- 1 | STR(LV_BLEND_MODE_NORMAL, normal) 2 | STR(LV_BLEND_MODE_ADDITIVE, additive) 3 | STR(LV_BLEND_MODE_SUBTRACTIVE, subtractive) 4 | STR(LV_BLEND_MODE_MULTIPLY, multiply) 5 | STR(LV_BLEND_MODE_REPLACE, replace) 6 | -------------------------------------------------------------------------------- /src/gui/string/border_side.lst: -------------------------------------------------------------------------------- 1 | STR(LV_BORDER_SIDE_NONE, none) 2 | STR(LV_BORDER_SIDE_BOTTOM, bottom) 3 | STR(LV_BORDER_SIDE_TOP, top) 4 | STR(LV_BORDER_SIDE_LEFT, left) 5 | STR(LV_BORDER_SIDE_RIGHT, right) 6 | STR(LV_BORDER_SIDE_FULL, full) 7 | STR(LV_BORDER_SIDE_INTERNAL, internal) 8 | STR(LV_BORDER_SIDE_INTERNAL, int) 9 | -------------------------------------------------------------------------------- /src/gui/string/btnmatrix_ctrl.lst: -------------------------------------------------------------------------------- 1 | STR(LV_BTNMATRIX_CTRL_HIDDEN, hidden) 2 | STR(LV_BTNMATRIX_CTRL_NO_REPEAT, no-repeat) 3 | STR(LV_BTNMATRIX_CTRL_DISABLED, disabled) 4 | STR(LV_BTNMATRIX_CTRL_CHECKABLE, checkable) 5 | STR(LV_BTNMATRIX_CTRL_CHECKED, checked) 6 | STR(LV_BTNMATRIX_CTRL_CLICK_TRIG, click-trig) 7 | STR(LV_BTNMATRIX_CTRL_POPOVER, popover) 8 | STR(LV_BTNMATRIX_CTRL_RECOLOR, recolor) 9 | STR(LV_BTNMATRIX_CTRL_CUSTOM_1, custom-1) 10 | STR(LV_BTNMATRIX_CTRL_CUSTOM_2, custom-2) 11 | -------------------------------------------------------------------------------- /src/gui/string/chart_axis.lst: -------------------------------------------------------------------------------- 1 | STR(LV_CHART_AXIS_PRIMARY_Y, primary-y) 2 | STR(LV_CHART_AXIS_SECONDARY_Y, secondary-y) 3 | STR(LV_CHART_AXIS_PRIMARY_X, primary-x) 4 | STR(LV_CHART_AXIS_SECONDARY_X, secondary-x) 5 | -------------------------------------------------------------------------------- /src/gui/string/chart_type.lst: -------------------------------------------------------------------------------- 1 | STR(LV_CHART_TYPE_NONE, none) 2 | STR(LV_CHART_TYPE_LINE, line) 3 | STR(LV_CHART_TYPE_BAR, bar) 4 | STR(LV_CHART_TYPE_SCATTER, scatter) 5 | -------------------------------------------------------------------------------- /src/gui/string/chart_update_mode.lst: -------------------------------------------------------------------------------- 1 | STR(LV_CHART_UPDATE_MODE_SHIFT, shift) 2 | STR(LV_CHART_UPDATE_MODE_CIRCULAR, circular) 3 | -------------------------------------------------------------------------------- /src/gui/string/colorwheel_mode.lst: -------------------------------------------------------------------------------- 1 | STR(LV_COLORWHEEL_MODE_HUE, hue) 2 | STR(LV_COLORWHEEL_MODE_SATURATION, saturation) 3 | STR(LV_COLORWHEEL_MODE_VALUE, value) 4 | -------------------------------------------------------------------------------- /src/gui/string/dir.lst: -------------------------------------------------------------------------------- 1 | STR(LV_DIR_NONE, none) 2 | STR(LV_DIR_LEFT, left) 3 | STR(LV_DIR_RIGHT, right) 4 | STR(LV_DIR_TOP, top) 5 | STR(LV_DIR_BOTTOM, bottom) 6 | STR(LV_DIR_HOR, hor) 7 | STR(LV_DIR_HOR, horizontal) 8 | STR(LV_DIR_VER, ver) 9 | STR(LV_DIR_VER, vertical) 10 | STR(LV_DIR_ALL, all) -------------------------------------------------------------------------------- /src/gui/string/dither_mode.lst: -------------------------------------------------------------------------------- 1 | STR(LV_DITHER_NONE, none) 2 | STR(LV_DITHER_ORDERED, ordered) 3 | STR(LV_DITHER_ERR_DIFF, err-diff) 4 | -------------------------------------------------------------------------------- /src/gui/string/flex_align.lst: -------------------------------------------------------------------------------- 1 | STR(LV_FLEX_ALIGN_CENTER, center) 2 | STR(LV_FLEX_ALIGN_START, start) 3 | STR(LV_FLEX_ALIGN_END, end) 4 | STR(LV_FLEX_ALIGN_START, right) 5 | STR(LV_FLEX_ALIGN_END, left) 6 | STR(LV_FLEX_ALIGN_SPACE_EVENLY, space-evenly) 7 | STR(LV_FLEX_ALIGN_SPACE_AROUND, space-around) 8 | STR(LV_FLEX_ALIGN_SPACE_BETWEEN, space-between) 9 | -------------------------------------------------------------------------------- /src/gui/string/grad_dir.lst: -------------------------------------------------------------------------------- 1 | STR(LV_GRAD_DIR_NONE, none) 2 | STR(LV_GRAD_DIR_VER, ver) 3 | STR(LV_GRAD_DIR_VER, vertical) 4 | STR(LV_GRAD_DIR_HOR, hor) 5 | STR(LV_GRAD_DIR_HOR, horizontal) 6 | -------------------------------------------------------------------------------- /src/gui/string/grid_align.lst: -------------------------------------------------------------------------------- 1 | STR(LV_GRID_ALIGN_STRETCH, stretch) 2 | STR(LV_GRID_ALIGN_CENTER, center) 3 | STR(LV_GRID_ALIGN_START, start) 4 | STR(LV_GRID_ALIGN_END, end) 5 | STR(LV_GRID_ALIGN_START, right) 6 | STR(LV_GRID_ALIGN_END, left) 7 | STR(LV_GRID_ALIGN_SPACE_EVENLY, space-evenly) 8 | STR(LV_GRID_ALIGN_SPACE_AROUND, space-around) 9 | STR(LV_GRID_ALIGN_SPACE_BETWEEN, space-between) 10 | -------------------------------------------------------------------------------- /src/gui/string/img_size_mode.lst: -------------------------------------------------------------------------------- 1 | STR(LV_IMG_SIZE_MODE_VIRTUAL, virtual) 2 | STR(LV_IMG_SIZE_MODE_VIRTUAL, virt) 3 | STR(LV_IMG_SIZE_MODE_REAL, real) -------------------------------------------------------------------------------- /src/gui/string/imgbtn_state.lst: -------------------------------------------------------------------------------- 1 | STR(LV_IMGBTN_STATE_RELEASED, rel) 2 | STR(LV_IMGBTN_STATE_RELEASED, released) 3 | STR(LV_IMGBTN_STATE_PRESSED, pr) 4 | STR(LV_IMGBTN_STATE_DISABLED, disabled) 5 | STR(LV_IMGBTN_STATE_CHECKED_RELEASED, checked-released) 6 | STR(LV_IMGBTN_STATE_CHECKED_RELEASED, checked-rel) 7 | STR(LV_IMGBTN_STATE_CHECKED_PRESSED, checked-pressed) 8 | STR(LV_IMGBTN_STATE_CHECKED_PRESSED, checked-pr) 9 | STR(LV_IMGBTN_STATE_CHECKED_DISABLED, checked-disabled) 10 | -------------------------------------------------------------------------------- /src/gui/string/key.lst: -------------------------------------------------------------------------------- 1 | STR(LV_KEY_UP, up) 2 | STR(LV_KEY_DOWN, down) 3 | STR(LV_KEY_RIGHT, right) 4 | STR(LV_KEY_LEFT, left) 5 | STR(LV_KEY_ESC, esc) 6 | STR(LV_KEY_DEL, del) 7 | STR(LV_KEY_BACKSPACE, backspace) 8 | STR(LV_KEY_ENTER, enter) 9 | STR(LV_KEY_NEXT, next) 10 | STR(LV_KEY_PREV, prev) 11 | STR(LV_KEY_HOME, home) 12 | STR(LV_KEY_END, end) 13 | -------------------------------------------------------------------------------- /src/gui/string/keyboard_mode.lst: -------------------------------------------------------------------------------- 1 | STR(LV_KEYBOARD_MODE_TEXT_LOWER, text-lower) 2 | STR(LV_KEYBOARD_MODE_TEXT_LOWER, lower) 3 | STR(LV_KEYBOARD_MODE_TEXT_UPPER, text-upper) 4 | STR(LV_KEYBOARD_MODE_TEXT_UPPER, upper) 5 | STR(LV_KEYBOARD_MODE_SPECIAL, special) 6 | STR(LV_KEYBOARD_MODE_SPECIAL, spec) 7 | STR(LV_KEYBOARD_MODE_NUMBER, number) 8 | STR(LV_KEYBOARD_MODE_NUMBER, num) 9 | STR(LV_KEYBOARD_MODE_USER_1, user-1) 10 | STR(LV_KEYBOARD_MODE_USER_2, user-2) 11 | STR(LV_KEYBOARD_MODE_USER_3, user-3) 12 | STR(LV_KEYBOARD_MODE_USER_4, user-4) 13 | -------------------------------------------------------------------------------- /src/gui/string/label_long.lst: -------------------------------------------------------------------------------- 1 | STR(LV_LABEL_LONG_WRAP, wrap) 2 | STR(LV_LABEL_LONG_WRAP, break) 3 | STR(LV_LABEL_LONG_DOT, dot) 4 | STR(LV_LABEL_LONG_SCROLL, sroll) 5 | STR(LV_LABEL_LONG_SCROLL, scroll) 6 | STR(LV_LABEL_LONG_SCROLL_CIRCULAR, sroll-cric) 7 | STR(LV_LABEL_LONG_SCROLL_CIRCULAR, sroll-cricle) 8 | STR(LV_LABEL_LONG_SCROLL_CIRCULAR, sroll-cricular) 9 | STR(LV_LABEL_LONG_SCROLL_CIRCULAR, scroll-cric) 10 | STR(LV_LABEL_LONG_SCROLL_CIRCULAR, scroll-cricle) 11 | STR(LV_LABEL_LONG_SCROLL_CIRCULAR, scroll-cricular) 12 | STR(LV_LABEL_LONG_CLIP, clip) 13 | STR(LV_LABEL_LONG_CLIP, crop) 14 | -------------------------------------------------------------------------------- /src/gui/string/menu_mode_header.lst: -------------------------------------------------------------------------------- 1 | STR(LV_MENU_HEADER_TOP_FIXED, top-fixed) 2 | STR(LV_MENU_HEADER_TOP_UNFIXED, top-unfixed) 3 | STR(LV_MENU_HEADER_BOTTOM_FIXED, bottom-fixed) 4 | -------------------------------------------------------------------------------- /src/gui/string/opa.lst: -------------------------------------------------------------------------------- 1 | STR(LV_OPA_TRANSP, trans) 2 | STR(LV_OPA_TRANSP, transp) 3 | STR(LV_OPA_TRANSP, transparent) 4 | STR(LV_OPA_0, 0) 5 | STR(LV_OPA_10, 10) 6 | STR(LV_OPA_20, 20) 7 | STR(LV_OPA_30, 30) 8 | STR(LV_OPA_40, 40) 9 | STR(LV_OPA_50, 50) 10 | STR(LV_OPA_60, 60) 11 | STR(LV_OPA_70, 70) 12 | STR(LV_OPA_80, 80) 13 | STR(LV_OPA_90, 90) 14 | STR(LV_OPA_100, 100) 15 | STR(LV_OPA_COVER, cover) -------------------------------------------------------------------------------- /src/gui/string/palette.lst: -------------------------------------------------------------------------------- 1 | STR(LV_PALETTE_RED, red) 2 | STR(LV_PALETTE_PINK, pink) 3 | STR(LV_PALETTE_PURPLE, purple) 4 | STR(LV_PALETTE_DEEP_PURPLE, deep-purple) 5 | STR(LV_PALETTE_INDIGO, indigo) 6 | STR(LV_PALETTE_BLUE, blue) 7 | STR(LV_PALETTE_LIGHT_BLUE, light-blue) 8 | STR(LV_PALETTE_CYAN, cyan) 9 | STR(LV_PALETTE_TEAL, teal) 10 | STR(LV_PALETTE_GREEN, green) 11 | STR(LV_PALETTE_LIGHT_GREEN, light-green) 12 | STR(LV_PALETTE_LIME, lime) 13 | STR(LV_PALETTE_YELLOW, yellow) 14 | STR(LV_PALETTE_AMBER, amber) 15 | STR(LV_PALETTE_ORANGE, orange) 16 | STR(LV_PALETTE_DEEP_ORANGE, deep-orange) 17 | STR(LV_PALETTE_BROWN, brown) 18 | STR(LV_PALETTE_BLUE_GREY, blue-grey) 19 | STR(LV_PALETTE_GREY, grey) 20 | STR(_LV_PALETTE_LAST, last) 21 | STR(LV_PALETTE_NONE, none) 22 | -------------------------------------------------------------------------------- /src/gui/string/part.lst: -------------------------------------------------------------------------------- 1 | STR(LV_PART_MAIN, default) 2 | STR(LV_PART_MAIN, main) 3 | STR(LV_PART_SCROLLBAR, scrollbar) 4 | STR(LV_PART_INDICATOR, indicator) 5 | STR(LV_PART_KNOB, knob) 6 | STR(LV_PART_SELECTED, selected) 7 | STR(LV_PART_ITEMS, items) 8 | STR(LV_PART_TICKS, ticks) 9 | STR(LV_PART_CURSOR, cursor) 10 | STR(LV_PART_CUSTOM_FIRST, custom-first) 11 | STR(LV_PART_ANY, any) 12 | -------------------------------------------------------------------------------- /src/gui/string/roller_mode.lst: -------------------------------------------------------------------------------- 1 | STR(LV_ROLLER_MODE_NORMAL, normal) 2 | STR(LV_ROLLER_MODE_INFINITE, infinite) 3 | STR(LV_ROLLER_MODE_INFINITE, inf) 4 | -------------------------------------------------------------------------------- /src/gui/string/scr_load_anim.lst: -------------------------------------------------------------------------------- 1 | STR(LV_SCR_LOAD_ANIM_NONE, none) 2 | STR(LV_SCR_LOAD_ANIM_OVER_LEFT, over-left) 3 | STR(LV_SCR_LOAD_ANIM_OVER_RIGHT, over-right) 4 | STR(LV_SCR_LOAD_ANIM_OVER_TOP, over-top) 5 | STR(LV_SCR_LOAD_ANIM_OVER_BOTTOM, over-bottom) 6 | STR(LV_SCR_LOAD_ANIM_MOVE_LEFT, move-left) 7 | STR(LV_SCR_LOAD_ANIM_MOVE_RIGHT, move-right) 8 | STR(LV_SCR_LOAD_ANIM_MOVE_TOP, move-top) 9 | STR(LV_SCR_LOAD_ANIM_MOVE_BOTTOM, move-bottom) 10 | STR(LV_SCR_LOAD_ANIM_FADE_ON, fade-on) 11 | -------------------------------------------------------------------------------- /src/gui/string/slider_mode.lst: -------------------------------------------------------------------------------- 1 | STR(LV_SLIDER_MODE_NORMAL, normal) 2 | STR(LV_SLIDER_MODE_SYMMETRICAL, symmetrical) 3 | STR(LV_SLIDER_MODE_SYMMETRICAL, sym) 4 | STR(LV_SLIDER_MODE_RANGE, range) 5 | -------------------------------------------------------------------------------- /src/gui/string/span_mode.lst: -------------------------------------------------------------------------------- 1 | STR(LV_SPAN_MODE_FIXED, fixed) 2 | STR(LV_SPAN_MODE_EXPAND, expand) 3 | STR(LV_SPAN_MODE_BREAK, break) -------------------------------------------------------------------------------- /src/gui/string/span_overflow.lst: -------------------------------------------------------------------------------- 1 | STR(LV_SPAN_OVERFLOW_CLIP, clip) 2 | STR(LV_SPAN_OVERFLOW_ELLIPSIS, ellipsis) 3 | -------------------------------------------------------------------------------- /src/gui/string/state.lst: -------------------------------------------------------------------------------- 1 | STR(LV_STATE_DEFAULT, default) 2 | STR(LV_STATE_CHECKED, checked) 3 | STR(LV_STATE_FOCUSED, focused) 4 | STR(LV_STATE_FOCUS_KEY, focus-key) 5 | STR(LV_STATE_EDITED, edited) 6 | STR(LV_STATE_HOVERED, hovered) 7 | STR(LV_STATE_PRESSED, pressed) 8 | STR(LV_STATE_SCROLLED, scrolled) 9 | STR(LV_STATE_DISABLED, disabled) 10 | STR(LV_STATE_USER_1, user-1) 11 | STR(LV_STATE_USER_2, user-2) 12 | STR(LV_STATE_USER_3, user-3) 13 | STR(LV_STATE_USER_4, user-4) 14 | STR(LV_STATE_ANY, any) -------------------------------------------------------------------------------- /src/gui/string/table_cell_ctrl.lst: -------------------------------------------------------------------------------- 1 | STR(LV_TABLE_CELL_CTRL_MERGE_RIGHT, merge-right) 2 | STR(LV_TABLE_CELL_CTRL_TEXT_CROP, text-crop) 3 | STR(LV_TABLE_CELL_CTRL_CUSTOM_1, custom-1) 4 | STR(LV_TABLE_CELL_CTRL_CUSTOM_2, custom-2) 5 | STR(LV_TABLE_CELL_CTRL_CUSTOM_3, custom-3) 6 | STR(LV_TABLE_CELL_CTRL_CUSTOM_4, custom-4) 7 | -------------------------------------------------------------------------------- /src/gui/string/template.h: -------------------------------------------------------------------------------- 1 | static struct NAME{ 2 | const TYPE code; 3 | const char*type; 4 | const char*name; 5 | }NAME[]={ 6 | #define STR(_type,_str) {.code=(_type),.type=(#_type),.name=(#_str)}, 7 | #include TARGET 8 | #undef STR 9 | }; 10 | DECL_CMP_CONV(lv_,NAME,NULL,CODE,code,const TYPE,string,type,const char*) 11 | DECL_CMP_CONV(lv_,NAME,NULL,CODE,code,const TYPE,name,name,const char*) 12 | DECL_STRCASECMP_XCONV(lv_,NAME,string,type,const char*,CODE,code,TYPE) 13 | DECL_STRCASECMP_XCONV(lv_,NAME,name,name,const char*,CODE,code,TYPE) 14 | #undef NAME 15 | #undef CODE 16 | #undef TYPE 17 | #undef TARGET 18 | -------------------------------------------------------------------------------- /src/gui/string/text_align.lst: -------------------------------------------------------------------------------- 1 | STR(LV_TEXT_ALIGN_AUTO, auto) 2 | STR(LV_TEXT_ALIGN_CENTER, center) 3 | STR(LV_TEXT_ALIGN_LEFT, left) 4 | STR(LV_TEXT_ALIGN_RIGHT, right) 5 | STR(LV_TEXT_ALIGN_LEFT, start) 6 | STR(LV_TEXT_ALIGN_RIGHT, end) 7 | -------------------------------------------------------------------------------- /src/gui/string/text_cmd_state.lst: -------------------------------------------------------------------------------- 1 | STR(LV_TEXT_CMD_STATE_WAIT, wait) 2 | STR(LV_TEXT_CMD_STATE_PAR, par) 3 | STR(LV_TEXT_CMD_STATE_IN, in) 4 | -------------------------------------------------------------------------------- /src/gui/string/text_decor.lst: -------------------------------------------------------------------------------- 1 | STR(LV_TEXT_DECOR_NONE, none) 2 | STR(LV_TEXT_DECOR_UNDERLINE, underline) 3 | STR(LV_TEXT_DECOR_STRIKETHROUGH, strikethrough) 4 | -------------------------------------------------------------------------------- /src/gui/string/text_flag.lst: -------------------------------------------------------------------------------- 1 | STR(LV_TEXT_FLAG_NONE, none) 2 | STR(LV_TEXT_FLAG_RECOLOR, recolor) 3 | STR(LV_TEXT_FLAG_EXPAND, expand) 4 | STR(LV_TEXT_FLAG_FIT, fit) 5 | -------------------------------------------------------------------------------- /src/hardware/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_library(init_hardware STATIC 2 | led.c 3 | vibrate.c 4 | battery.c 5 | ) 6 | -------------------------------------------------------------------------------- /src/hardware/vibrate.c: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2021 BigfootACA 4 | * 5 | * SPDX-License-Identifier: LGPL-3.0-or-later 6 | * 7 | */ 8 | 9 | #define _GNU_SOURCE 10 | #include 11 | #include 12 | #include"system.h" 13 | #include"pathnames.h" 14 | #include"hardware.h" 15 | 16 | void vibrate(int time){ 17 | if(time<0||time>0xFFFF)return; 18 | if(fd_write_int( 19 | AT_FDCWD, 20 | _PATH_SYS_CLASS"/timed_output/vibrator/enable", 21 | time,true 22 | )==0)return; 23 | int v=led_find("vibrator"); 24 | if(v<0)return; 25 | fd_write_int(v,"duration",time,true); 26 | fd_write_int(v,"activate",1,true); 27 | close(v); 28 | } 29 | -------------------------------------------------------------------------------- /src/initd/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_library(init_initd STATIC 2 | environ.c 3 | init.c 4 | logfs.c 5 | preinit.c 6 | reboot.c 7 | run.c 8 | signals.c 9 | umount.c 10 | protocol.c 11 | socket.c 12 | client.c 13 | bootsvc.c 14 | conffs.c 15 | ) 16 | -------------------------------------------------------------------------------- /src/initd/bootsvc.c: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2021 BigfootACA 4 | * 5 | * SPDX-License-Identifier: LGPL-3.0-or-later 6 | * 7 | */ 8 | 9 | #include"init_internal.h" 10 | #include"gadget.h" 11 | #include"shell.h" 12 | #include"boot.h" 13 | #ifdef ENABLE_GUI 14 | #include"gui.h" 15 | #endif 16 | 17 | extern int register_bootmenu(); 18 | extern int register_ttyd(); 19 | 20 | int(*register_services[])()={ 21 | #ifdef ENABLE_READLINE 22 | ®ister_console_shell, 23 | #endif 24 | ®ister_default_boot, 25 | ®ister_ttyd, 26 | ®ister_gadget_service, 27 | #ifdef ENABLE_GUI 28 | ®ister_guiapp, 29 | #endif 30 | ®ister_bootmenu, 31 | NULL 32 | }; 33 | 34 | int init_register_all_service(){ 35 | for(int i=0;register_services[i];i++) 36 | register_services[i](); 37 | return 0; 38 | } 39 | -------------------------------------------------------------------------------- /src/initd/reboot.c: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2021 BigfootACA 4 | * 5 | * SPDX-License-Identifier: LGPL-3.0-or-later 6 | * 7 | */ 8 | 9 | #define _GNU_SOURCE 10 | #include 11 | #include 12 | #include"service.h" 13 | #include"init_internal.h" 14 | #include"system.h" 15 | #include"logger.h" 16 | #define TAG "reboot" 17 | 18 | int call_reboot(enum reboot_cmd rb,char*cmd){ 19 | tlog_emerg("call kernel reboot."); 20 | kill_all(); 21 | adv_reboot(rb,cmd); 22 | return 0; 23 | } 24 | 25 | int kill_all(){ 26 | service_wait_all_stop(); 27 | xsleep(1); 28 | kill(-1,SIGTERM); 29 | tlog_alert("sending SIGTERM to all proceesses..."); 30 | sync(); 31 | xsleep(3); 32 | init_do_exit(); 33 | xsleep(1); 34 | kill(-1,SIGKILL); 35 | tlog_alert("sending SIGKILL to all proceesses..."); 36 | sync(); 37 | xsleep(1); 38 | return 0; 39 | } -------------------------------------------------------------------------------- /src/kernelfdt/KernelFdtDxe.inf: -------------------------------------------------------------------------------- 1 | [Defines] 2 | INF_VERSION = 0x0010005 3 | BASE_NAME = KernelFdtDxe 4 | FILE_GUID = F1249C4E-8995-4BB6-9D44-E0CD4FF709FC 5 | MODULE_TYPE = DXE_DRIVER 6 | VERSION_STRING = 1.0 7 | ENTRY_POINT = KernelFdtMain 8 | 9 | [BuildOptions] 10 | GCC:*_*_*_CC_FLAGS = -include src/config-uefi.h 11 | 12 | [Packages] 13 | MdePkg/MdePkg.dec 14 | SimpleInit.dec 15 | 16 | [LibraryClasses] 17 | UefiLib 18 | DebugLib 19 | UefiDriverEntryPoint 20 | SimpleInitLib 21 | 22 | [Sources] 23 | KernelFdtDxe.c 24 | 25 | [Pcd] 26 | gSimpleInitTokenSpaceGuid.PcdDeviceTreeStore 27 | 28 | [Protocols] 29 | gKernelFdtProtocolGuid 30 | 31 | [Depex] 32 | TRUE 33 | -------------------------------------------------------------------------------- /src/lib/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_library(init_lib STATIC 2 | array.c 3 | credential.c 4 | exit.c 5 | file.c 6 | keyval.c 7 | list.c 8 | mode.c 9 | modules.c 10 | mount.c 11 | param.c 12 | pool.c 13 | proctitle.c 14 | readable.c 15 | reboot.c 16 | replace.c 17 | signal.c 18 | stdio.c 19 | strings.c 20 | switchroot.c 21 | base64.c 22 | language.c 23 | fdtparser.c 24 | aboot.c 25 | random.c 26 | mime.c 27 | websocket.c 28 | http.c 29 | url.c 30 | recovery.c 31 | ) 32 | -------------------------------------------------------------------------------- /src/lib/mode.c: -------------------------------------------------------------------------------- 1 | #define _GNU_SOURCE 2 | #include 3 | // from busybox libbb/mode_string.c 4 | static const mode_t flags[]={ 5 | S_IRUSR,S_IWUSR,S_IXUSR,S_ISUID, 6 | S_IRGRP,S_IWGRP,S_IXGRP,S_ISGID, 7 | S_IROTH,S_IWOTH,S_IXOTH,S_ISVTX 8 | }; 9 | 10 | static const char types[16]="?pc?d?b?-?l?s???"; 11 | static const char modes[7]="rwxSTst"; 12 | 13 | const char*mode_string(mode_t mode){ 14 | static char buf[12]; 15 | char*p=buf; 16 | int i=0; 17 | *p=types[(mode>>12)&0xF]; 18 | do{ 19 | int j=0,k=0; 20 | do{ 21 | *++p='-'; 22 | if(mode&flags[i+j])*p=modes[j],k=j; 23 | }while(++j<3); 24 | if(mode&flags[i+j])*p=modes[3+(k&2)+((i&8)>>3)]; 25 | i+=4; 26 | }while(i<12); 27 | return buf; 28 | } 29 | -------------------------------------------------------------------------------- /src/loggerd/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_library(init_loggerd STATIC 2 | buffer.c 3 | client.c 4 | file_logger.c 5 | internal.c 6 | klog.c 7 | printk_logger.c 8 | server.c 9 | syslog.c 10 | syslog_logger.c 11 | lib.c 12 | ) 13 | -------------------------------------------------------------------------------- /src/loggerd/SimpleInitLoggerd.inf: -------------------------------------------------------------------------------- 1 | [Defines] 2 | INF_VERSION = 0x00010005 3 | BASE_NAME = SimpleInitLoggerd 4 | FILE_GUID = 88FE3206-389E-4737-B97F-0A029C5508D3 5 | MODULE_TYPE = UEFI_APPLICATION 6 | VERSION_STRING = 1.0 7 | LIBRARY_CLASS = SimpleInitLoggerd 8 | 9 | [BuildOptions] 10 | GCC:*_*_*_CC_FLAGS = -include src/config-uefi.h 11 | 12 | [Packages] 13 | MdePkg/MdePkg.dec 14 | SimpleInit.dec 15 | 16 | [LibraryClasses] 17 | PcdLib 18 | BaseLib 19 | UefiLib 20 | DebugLib 21 | PrintLib 22 | BaseMemoryLib 23 | MemoryAllocationLib 24 | SimpleInitLocate 25 | 26 | [Guids] 27 | gEfiFileInfoGuid 28 | 29 | [Pcd] 30 | gSimpleInitTokenSpaceGuid.PcdLoggerdMinLevel 31 | 32 | [Sources] 33 | # Simple-Init loggerd UEFI wrapper 34 | client.c 35 | buffer.c 36 | lib.c 37 | -------------------------------------------------------------------------------- /src/loggerd/syslog_logger.c: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (C) 2021 BigfootACA 4 | * 5 | * SPDX-License-Identifier: LGPL-3.0-or-later 6 | * 7 | */ 8 | 9 | #include 10 | #include 11 | #include 12 | #include"logger.h" 13 | #include"defines.h" 14 | 15 | int syslog_logger(char*name __attribute__((unused)),struct log_item *log){ 16 | if(!log->time)ERET(EFAULT); 17 | openlog(log->tag,LOG_CONS,LOG_DAEMON); 18 | syslog(logger_level2klevel(log->level),"%s",(char*)log->content); 19 | closelog(); 20 | return (int)strlen(log->content); 21 | } 22 | -------------------------------------------------------------------------------- /src/lua/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_library(init_lua STATIC 2 | data.c 3 | conf.c 4 | logger.c 5 | lua.c 6 | libs.c 7 | feature.c 8 | nanosvg.c 9 | abootimg.c 10 | init.c 11 | url.c 12 | stb.c 13 | recovery.c 14 | filesystem/fs.c 15 | filesystem/fsh.c 16 | filesystem/fs_info.c 17 | filesystem/string.c 18 | fdisk/fdisk.c 19 | fdisk/fdisk_ask.c 20 | fdisk/fdisk_context.c 21 | fdisk/fdisk_field.c 22 | fdisk/fdisk_label.c 23 | fdisk/fdisk_labelitem.c 24 | fdisk/fdisk_partition.c 25 | fdisk/fdisk_parttype.c 26 | fdisk/fdisk_script.c 27 | fdisk/fdisk_table.c 28 | fdisk/fdisk_iter.c 29 | ) 30 | -------------------------------------------------------------------------------- /src/main/wrapper.c: -------------------------------------------------------------------------------- 1 | extern int _simple_init_primary_main(int argc,char**argv); 2 | int main(int argc,char**argv){ 3 | return _simple_init_primary_main(argc,argv); 4 | } -------------------------------------------------------------------------------- /src/rootfs_data.s.in: -------------------------------------------------------------------------------- 1 | .globl _binary_rootfs_bin_start 2 | _binary_rootfs_bin_start: 3 | .incbin "%DIR%/rootfs.bin" 4 | .globl _binary_rootfs_bin_end 5 | _binary_rootfs_bin_end: 6 | .globl _binary_rootfs_bin_size 7 | _binary_rootfs_bin_size: 8 | .quad _binary_rootfs_bin_end-_binary_rootfs_bin_start 9 | -------------------------------------------------------------------------------- /src/service/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_library(init_service STATIC 2 | struct.c 3 | execute.c 4 | service.c 5 | scheduler.c 6 | data.c 7 | sigchld.c 8 | start.c 9 | stop.c 10 | queue.c 11 | default.c 12 | string.c 13 | dump.c 14 | conf.c 15 | ) 16 | -------------------------------------------------------------------------------- /src/shell/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_library(init_shell STATIC 2 | cmd.c 3 | commands.c 4 | external.c 5 | replace.c 6 | shell.c 7 | ) 8 | -------------------------------------------------------------------------------- /src/ttyd/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_library(init_ttyd STATIC 2 | speed.c 3 | issue.c 4 | login.c 5 | server.c 6 | worker.c 7 | session.c 8 | internal.c 9 | protocol.c 10 | client.c 11 | ) 12 | -------------------------------------------------------------------------------- /src/wasm/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.10) 2 | project(simple-init-wasm C) 3 | set(CMAKE_C_STANDARD 99) 4 | include(json-c.cmake) 5 | include(zlib.cmake) 6 | add_executable( 7 | web_gui_render 8 | web_gui_render.c 9 | websocket.c 10 | ) 11 | target_link_libraries( 12 | web_gui_render 13 | websocket.js 14 | jsonc 15 | z 16 | ) 17 | set_target_properties( 18 | web_gui_render PROPERTIES LINK_FLAGS " 19 | -s EXPORTED_RUNTIME_METHODS='[\"ccall\",\"cwrap\"]' 20 | -s EXPORTED_FUNCTIONS='[\"_malloc\"]' 21 | -s WASM=1 -gsource-map" 22 | ) 23 | -------------------------------------------------------------------------------- /src/wasm/zlib.cmake: -------------------------------------------------------------------------------- 1 | include_directories(../../libs/zlib) 2 | add_library( 3 | z STATIC 4 | ../../libs/zlib/zutil.c 5 | ../../libs/zlib/adler32.c 6 | ../../libs/zlib/inftrees.c 7 | ../../libs/zlib/inflate.c 8 | ../../libs/zlib/inffast.c 9 | ../../libs/zlib/deflate.c 10 | ../../libs/zlib/compress.c 11 | ../../libs/zlib/crc32.c 12 | ../../libs/zlib/gzlib.c 13 | ../../libs/zlib/gzread.c 14 | ../../libs/zlib/gzwrite.c 15 | ../../libs/zlib/gzclose.c 16 | ../../libs/zlib/trees.c 17 | ../../libs/zlib/uncompr.c 18 | ) 19 | target_compile_options( 20 | z PRIVATE 21 | -Wno-implicit-fallthrough 22 | -Wno-deprecated-non-prototype 23 | ) 24 | --------------------------------------------------------------------------------