History

mklive: added -v kerver option

Noah Huppert committed 7 years ago

Commit 7ca1cbc1 parent 5859e791 file · +20 −2Browse files

Unified · Split

mklive.sh.in+20−2
@@ -81,6 +81,7 @@ directory if unset). · 80 unmodified lines
81 81
82 -C "cmdline args" Add additional kernel command line arguments.82 -C "cmdline args" Add additional kernel command line arguments.
83 -T "title" Modify the bootloader title.83 -T "title" Modify the bootloader title.
84 -v linux<version> Install a custom Linux version on ISO image (linux meta-package if unset).
84 -K Do not remove builddir.85 -K Do not remove builddir.
85 86
86The $PROGNAME script generates a live image of the Void Linux distribution.87The $PROGNAME script generates a live image of the Void Linux distribution.
@@ -293,7 +294,7 @@ generate_iso_image() { · 206 unmodified lines
293#294#
294# main()295# main()
295#296#
296while getopts "a:b:r:c:C:T:Kk:l:i:I:s:S:o:p:h" opt; do297while getopts "a:b:r:c:C:T:Kk:l:i:I:s:S:o:p:v:h" opt; do
297 case $opt in298 case $opt in
298 a) BASE_ARCH="$OPTARG";;299 a) BASE_ARCH="$OPTARG";;
299 b) BASE_SYSTEM_PKG="$OPTARG";;300 b) BASE_SYSTEM_PKG="$OPTARG";;
@@ -310,6 +311,7 @@ while getopts "a:b:r:c:C:T:Kk:l:i:I:s:S:o:p:h" opt; do · 10 unmodified lines
310 p) PACKAGE_LIST="$OPTARG";;311 p) PACKAGE_LIST="$OPTARG";;
311 C) BOOT_CMDLINE="$OPTARG";;312 C) BOOT_CMDLINE="$OPTARG";;
312 T) BOOT_TITLE="$OPTARG";;313 T) BOOT_TITLE="$OPTARG";;
314 v) LINUX_VERSION="$OPTARG";;
313 h) usage;;315 h) usage;;
314 *) usage;;316 *) usage;;
315 esac317 esac
@@ -378,10 +380,26 @@ copy_void_keys "$VOIDHOSTDIR" · 62 unmodified lines
378XBPS_ARCH=$BASE_ARCH $XBPS_INSTALL_CMD -r "$ROOTFS" ${XBPS_REPOSITORY} -S380XBPS_ARCH=$BASE_ARCH $XBPS_INSTALL_CMD -r "$ROOTFS" ${XBPS_REPOSITORY} -S
379XBPS_ARCH=$ARCH $XBPS_INSTALL_CMD -r "$VOIDHOSTDIR" ${XBPS_REPOSITORY} -S381XBPS_ARCH=$ARCH $XBPS_INSTALL_CMD -r "$VOIDHOSTDIR" ${XBPS_REPOSITORY} -S
380 382
381_linux_series=$(XBPS_ARCH=$BASE_ARCH $XBPS_QUERY_CMD -r "$ROOTFS" ${XBPS_REPOSITORY:=-R} -x linux|head -1)383# Get linux version for ISO
384# If linux version option specified use
385if [ -n "$LINUX_VERSION" ]; then
386 if ! echo "$LINUX_VERSION" | grep "linux[0-9._]*"; then
387 die "-v option must be in format linux<version>"
388 fi
389
390 _linux_series="$LINUX_VERSION"
391 PACKAGE_LIST="$PACKAGE_LIST $LINUX_VERSION"
392else # Otherwise find latest stable version from linux meta-package
393 _linux_series=$(XBPS_ARCH=$BASE_ARCH $XBPS_QUERY_CMD -r "$ROOTFS" ${XBPS_REPOSITORY:=-R} -x linux|head -1)
394fi
395
382_kver=$(XBPS_ARCH=$BASE_ARCH $XBPS_QUERY_CMD -r "$ROOTFS" ${XBPS_REPOSITORY:=-R} -p pkgver ${_linux_series})396_kver=$(XBPS_ARCH=$BASE_ARCH $XBPS_QUERY_CMD -r "$ROOTFS" ${XBPS_REPOSITORY:=-R} -p pkgver ${_linux_series})
383KERNELVERSION=$($XBPS_UHELPER_CMD getpkgversion ${_kver})397KERNELVERSION=$($XBPS_UHELPER_CMD getpkgversion ${_kver})
384 398
399if [ "$?" -ne "0" ]; then
400 die "Failed to find kernel package version"
401fi
402
385: ${OUTPUT_FILE="void-live-${BASE_ARCH}-${KERNELVERSION}-$(date +%Y%m%d).iso"}403: ${OUTPUT_FILE="void-live-${BASE_ARCH}-${KERNELVERSION}-$(date +%Y%m%d).iso"}
386 404
387print_step "Installing software to generate the image: ${REQUIRED_PKGS} ..."405print_step "Installing software to generate the image: ${REQUIRED_PKGS} ..."

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t