diff options
author | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2021-01-16 08:32:14 (EST) |
---|---|---|
committer | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2021-01-16 08:32:14 (EST) |
commit | 2eaa08271dd61d95b6bc363ef6126c271e977024 (patch) | |
tree | a8e9d3c2a774a7b6b34117c9fa842f7fae2190bc /src/cmd | |
parent | 002c6082e50872a65defb00f3311604c8ad11647 (diff) |
cmd/mkinitramfs: Remove command
Will be replaced by an installer backend.
Also, the name "mkINITramfs" (emphasis added) never really made sense
here. In ProteanOS, the RAM-based file system is the final file system,
not an initial one.
Diffstat (limited to 'src/cmd')
-rw-r--r-- | src/cmd/local.mk | 3 | ||||
-rw-r--r-- | src/cmd/mkinitramfs.sh | 88 |
2 files changed, 1 insertions, 90 deletions
diff --git a/src/cmd/local.mk b/src/cmd/local.mk index a925de2..b863449 100644 --- a/src/cmd/local.mk +++ b/src/cmd/local.mk @@ -4,5 +4,4 @@ prokit_SOURCES += \ src/cmd/install.sh \ src/cmd/shell.sh \ src/cmd/opkg.sh \ - src/cmd/build.sh \ - src/cmd/mkinitramfs.sh + src/cmd/build.sh diff --git a/src/cmd/mkinitramfs.sh b/src/cmd/mkinitramfs.sh deleted file mode 100644 index 08543ee..0000000 --- a/src/cmd/mkinitramfs.sh +++ /dev/null @@ -1,88 +0,0 @@ -# "mkinitramfs" command -# -# Copyright (C) 2016 Patrick McDermott -# -# This file is part of the ProteanOS Development Kit. -# -# The ProteanOS Development Kit is free software: you can redistribute -# it and/or modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# The ProteanOS Development Kit is distributed in the hope that it -# will be useful, but WITHOUT ANY WARRANTY; without even the implied -# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with the ProteanOS Development Kit. If not, see -# <http://www.gnu.org/licenses/>. - -cmd_mkinitramfs_optstring='l:i:' - -cmd_mkinitramfs_main() -{ - local linux_output= - local initramfs_output= - local root= - local dev= - - if ! get_options "${@}"; then - print_cmd_usage 'mkinitramfs' >&2 - return 1 - fi - shift $((${OPTIND} - 1)) - - if [ "x${cmd_mkinitramfs_opt_l-}" = 'x' ]; then - print_cmd_usage 'mkinitramfs' >&2 - return 1 - fi - if [ "x${cmd_mkinitramfs_opt_i-}" = 'x' ]; then - print_cmd_usage 'mkinitramfs' >&2 - return 1 - fi - if [ ${#} -lt 1 ]; then - print_cmd_usage 'mkinitramfs' >&2 - return 1 - fi - - linux_output="${cmd_mkinitramfs_opt_l}" - initramfs_output="${cmd_mkinitramfs_opt_i}" - root="${1}" - shift 1 - - dev='' - if is_block "${root}"; then - dev="${root}" - if ! root="$(block_mount "${dev}")"; then - return 2 - fi - fi - - if ! profile_detect "${root}"; then - [ "x${dev}" != 'x' ] && block_umount "${root}" - return 2 - fi - arch="$(cat -- "${root}/etc/proteanos_arch")" - plat="$(cat -- "${root}/etc/proteanos_plat")" - - if ! img="$(profile_find_kernel "${root}" "${arch}" "${plat}")"; then - error "$(get_msg 'cmd_mkinitramfs_kernel_not_found')" - [ "x${dev}" != 'x' ] && block_umount "${root}" - return 2 - fi - cp -p -- "${root}/${img}" "${linux_output}" - - (cd -- "${root}" && profile_make_initramfs "${arch}" "${plat}") \ - >"${initramfs_output}" - - [ "x${dev}" != 'x' ] && block_umount "${root}" - - return 0 -} - -cmd_mkinitramfs_register() -{ - register_cmd 'mkinitramfs' -} -__init cmd_mkinitramfs_register |