summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick 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)
commit2eaa08271dd61d95b6bc363ef6126c271e977024 (patch)
treea8e9d3c2a774a7b6b34117c9fa842f7fae2190bc
parent002c6082e50872a65defb00f3311604c8ad11647 (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.
-rw-r--r--locale/C.sh7
-rw-r--r--man/local.mk3
-rw-r--r--man/prokit-mkinitramfs.8in46
-rw-r--r--man/prokit.1in3
-rw-r--r--src/cmd/local.mk3
-rw-r--r--src/cmd/mkinitramfs.sh88
6 files changed, 2 insertions, 148 deletions
diff --git a/locale/C.sh b/locale/C.sh
index d1891c4..ee4e237 100644
--- a/locale/C.sh
+++ b/locale/C.sh
@@ -103,13 +103,6 @@ msg_prokit_cmd_build_summary='build a package'
msg_prokit_cmd_build_usage='<root> [-l] [<option> ...] <pkg-dir>'
msg_prokit_cmd_build_not_a_dir='Not a directory: %s'
-# src/cmd/mkinitramfs.sh
-msg_prokit_cmd_mkinitramfs_summary='generate an initramfs containing an '\
-'installed system'
-msg_prokit_cmd_mkinitramfs_usage='-l <linux-output> -i <initramfs-output> '\
-'<root>'
-msg_prokit_cmd_mkinitramfs_kernel_not_found='No Linux image found'
-
# src/profile.sh
msg_prokit_profile_not_found='Profile "%s" not found'
msg_prokit_profile_not_detected='No installed system found at "%s"'
diff --git a/man/local.mk b/man/local.mk
index 3acf881..fef3059 100644
--- a/man/local.mk
+++ b/man/local.mk
@@ -7,5 +7,4 @@ man8_sources = \
man/prokit-install.8in \
man/prokit-shell.8in \
man/prokit-opkg.8in \
- man/prokit-build.8in \
- man/prokit-mkinitramfs.8in
+ man/prokit-build.8in
diff --git a/man/prokit-mkinitramfs.8in b/man/prokit-mkinitramfs.8in
deleted file mode 100644
index a6796e4..0000000
--- a/man/prokit-mkinitramfs.8in
+++ /dev/null
@@ -1,46 +0,0 @@
-.TH PROKIT-MKINITRAMFS 8 \
-"2019-04-27" "@PACKAGE_NAME@ @PACKAGE_VERSION@" "@MANUAL@"
-
-.SH NAME
-prokit-mkinitramfs \- Generate an initramfs containing an installed system
-
-.SH SYNOPSIS
-\fBprokit mkinitramfs\fP \fB-l\fP \fIlinux-output\fP
-\fB-i\fP \fIinitramfs-output\fP \fIroot\fP
-
-.SH DESCRIPTION
-\fBprokit mkinitramfs\fP generates an initial RAM-based file system image
-containing an installed system found at \fIroot\fP.
-.P
-If \fIroot\fP is a block device node, the block device is mounted and the
-initial RAM-based file system is generated from the device's file system.
-
-.SH OPTIONS
-.TP
-.BI \-l \ linux-output
-Copy a Linux image from the system at \fIroot\fP to \fIlinux-output\fP.
-.TP
-.BI \-i \ initramfs-output
-Write the initial RAM-based file system image to \fIinitramfs-output\fP.
-
-.SH EXAMPLES
-
-.IP \[bu]
-# prokit mkinitramfs -l vmlinuz -i initrd.img $root
-
-.SH COPYRIGHT
-Copyright (C) 2016 Patrick McDermott
-.P
-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.
-.P
-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.
-.P
-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/>.
diff --git a/man/prokit.1in b/man/prokit.1in
index df8693e..7f85e59 100644
--- a/man/prokit.1in
+++ b/man/prokit.1in
@@ -40,9 +40,6 @@ Manage packages with opkg
.TP
.BR prokit-build (8)
Build a package
-.TP
-.BR prokit-mkinitramfs (8)
-Generate an initramfs containing an installed system
.SH COPYRIGHT
Copyright (C) 2014 Patrick McDermott
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