Changeset View
Standalone View
tools/boot/install-boot.sh
Context not available. | |||||
dev=$1 | dev=$1 | ||||
dst=$2 | dst=$2 | ||||
newfs_msdos -a 32 ${dev} | newfs_msdos -F 32 -c 1 ${dev} | ||||
imp: don't know if we have a 'panic' routine :)
| |||||
Done Inline ActionsNo, but we do have die bcran: No, but we do have `die` | |||||
mntpt=$(mktemp -d /tmp/stand-test.XXXXXX) | mntpt=$(mktemp -d /tmp/stand-test.XXXXXX) | ||||
mount -t msdos ${dev} ${mntpt} | mount -t msdosfs ${dev} ${mntpt} | ||||
mkdir -p ${mntpt}/efi/boot | mkdir -p ${mntpt}/EFI/BOOT | ||||
cp ${dst}/boot/loader.efi ${mntpt}/efi/boot/bootx64.efi | cp ${dst}/boot/loader.efi ${mntpt}/EFI/BOOT/BOOTx64.efi | ||||
umount ${mntpt} | umount ${mntpt} | ||||
rmdir ${mntpt} | rmdir ${mntpt} | ||||
} | } | ||||
Context not available. | |||||
Done Inline Actionsefibootname=$(get_uefi_bootname) imp: efibootname=$(get_uefi_bootname)
per above | |||||
Done Inline ActionsI'd add efibootfile here too, since it's just used in this function. imp: I'd add efibootfile here too, since it's just used in this function.
| |||||
Done Inline ActionsAre these two locals? I'd add them to the local list if so. I don't see where else they are used. imp: Are these two locals? I'd add them to the local list if so. I don't see where else they are… | |||||
Done Inline ActionsI'd also match ? here. getopts returns ? when there's no args in the getopt list that match. imp: I'd also match ? here. getopts returns ? when there's no args in the getopt list that match.
| |||||
Done Inline ActionsI'd be tempted to create constants for these magic numbers. Then the user of this file can also use them to prevent their proliferation. imp: I'd be tempted to create constants for these magic numbers. Then the user of this file can also… | |||||
Done Inline ActionsI would be tempted to go a slightly more conservative route of renaming it instead. That would allow someone to recover back to this if they have a bad new loader. imp: I would be tempted to go a slightly more conservative route of renaming it instead. That would… | |||||
Done Inline ActionsThe problem is that many systems will o my have 800KB available on the ESP. So in those situations it’s not possible to have more than one copy. bcran: The problem is that many systems will o my have 800KB available on the ESP. So in those… | |||||
Done Inline ActionsThis looks weird... What are you trying to accomplish? imp: This looks weird... What are you trying to accomplish?
| |||||
Done Inline ActionsOh that needs a comment. bcran: Oh that needs a comment.
efibootmgr doesn’t mark new entries active, so this code figures out… | |||||
Done Inline ActionsI'm trying to see if there's an existing boot entry - filtering out other OSes that use different paths to their loader. If there is, we don't need to create a new one. bcran: I'm trying to see if there's an existing boot entry - filtering out other OSes that use… | |||||
Done Inline ActionsThis doesn't look right at all. srcroot seems to be /usr/src, while DESTDIR is where we install into... Is that intentional? If so, that seems like a poorly named variable. imp: This doesn't look right at all. srcroot seems to be /usr/src, while DESTDIR is where we install… | |||||
Done Inline ActionsHere, srcroot is where we’re copying files from, to install onto the ESP. bcran: Here, srcroot is where we’re copying files from, to install onto the ESP. |
don't know if we have a 'panic' routine :)