forked from mirrored-repos/manjaro-tools
util-iso-boot: make the copy paths more structured
This commit is contained in:
parent
a4fc8325df
commit
d455564eb6
2 changed files with 8 additions and 11 deletions
|
@ -44,15 +44,14 @@ prepare_boot_extras(){
|
||||||
}
|
}
|
||||||
|
|
||||||
prepare_grub(){
|
prepare_grub(){
|
||||||
local platform=i386-pc img='core.img' grub=$2/boot/grub efi=$2/efi/boot \
|
local platform=i386-pc img='core.img' grub=$3/boot/grub efi=$3/efi/boot \
|
||||||
data_live=$1/usr/share/grub lib=usr/lib/grub prefix=/boot/grub data=/usr/share/grub \
|
lib=$1/usr/lib/grub prefix=/boot/grub theme=$2/usr/share/grub data=$1/usr/share/grub
|
||||||
path="${work_dir}/rootfs"
|
|
||||||
|
|
||||||
prepare_dir ${grub}/${platform}
|
prepare_dir ${grub}/${platform}
|
||||||
|
|
||||||
cp ${data_live}/cfg/*.cfg ${grub}
|
cp ${theme}/cfg/*.cfg ${grub}
|
||||||
|
|
||||||
cp ${path}/${lib}/${platform}/* ${grub}/${platform}
|
cp ${lib}/${platform}/* ${grub}/${platform}
|
||||||
|
|
||||||
msg2 "Building %s ..." "${img}"
|
msg2 "Building %s ..." "${img}"
|
||||||
|
|
||||||
|
@ -74,16 +73,16 @@ prepare_grub(){
|
||||||
prepare_dir ${efi}
|
prepare_dir ${efi}
|
||||||
prepare_dir ${grub}/${platform}
|
prepare_dir ${grub}/${platform}
|
||||||
|
|
||||||
cp ${path}/${lib}/${platform}/* ${grub}/${platform}
|
cp ${lib}/${platform}/* ${grub}/${platform}
|
||||||
|
|
||||||
msg2 "Building %s ..." "${img}"
|
msg2 "Building %s ..." "${img}"
|
||||||
|
|
||||||
grub-mkimage -d ${grub}/${platform} -o ${efi}/${img} -O ${platform} -p ${prefix} iso9660
|
grub-mkimage -d ${grub}/${platform} -o ${efi}/${img} -O ${platform} -p ${prefix} iso9660
|
||||||
|
|
||||||
prepare_dir ${grub}/themes
|
prepare_dir ${grub}/themes
|
||||||
cp -r ${data_live}/themes/${iso_name}-live ${grub}/themes/
|
cp -r ${theme}/themes/${iso_name}-live ${grub}/themes/
|
||||||
cp ${data}/unicode.pf2 ${grub}
|
cp ${data}/unicode.pf2 ${grub}
|
||||||
cp -r ${data_live}/{locales,tz} ${grub}
|
cp -r ${theme}/{locales,tz} ${grub}
|
||||||
|
|
||||||
local size=4M mnt="${mnt_dir}/efiboot" efi_img="$2/efi.img"
|
local size=4M mnt="${mnt_dir}/efiboot" efi_img="$2/efi.img"
|
||||||
msg2 "Creating fat image of %s ..." "${size}"
|
msg2 "Creating fat image of %s ..." "${size}"
|
||||||
|
|
|
@ -396,9 +396,7 @@ make_grub(){
|
||||||
if [[ ! -e ${work_dir}/build.${FUNCNAME} ]]; then
|
if [[ ! -e ${work_dir}/build.${FUNCNAME} ]]; then
|
||||||
msg "Prepare [/iso/boot/grub]"
|
msg "Prepare [/iso/boot/grub]"
|
||||||
|
|
||||||
local path="${work_dir}/livefs"
|
prepare_grub "${work_dir}/rootfs" "${work_dir}/livefs" "${iso_root}"
|
||||||
|
|
||||||
prepare_grub "${path}" "${iso_root}"
|
|
||||||
|
|
||||||
configure_grub "${iso_root}/boot/grub/kernels.cfg"
|
configure_grub "${iso_root}/boot/grub/kernels.cfg"
|
||||||
configure_grub_theme "${iso_root}/boot/grub/variable.cfg"
|
configure_grub_theme "${iso_root}/boot/grub/variable.cfg"
|
||||||
|
|
Loading…
Reference in a new issue