Skip to content

Commit

Permalink
Add x86_64 linux configuration
Browse files Browse the repository at this point in the history
This adds the config required to build an EFI executable with inbuilt
initramfs on x86_64 systems.
  • Loading branch information
EmilyShepherd committed Apr 22, 2023
1 parent f6a6138 commit c867f6d
Show file tree
Hide file tree
Showing 4 changed files with 5,271 additions and 7 deletions.
25 changes: 19 additions & 6 deletions pkgs/boot/linux/build
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@

install_target="zinstall modules_install dtbs_install"
case "$ARCH" in
amd64) install_target="install modules_install" ;;
arm64) install_target="zinstall modules_instlal dtbs_install" ;;
esac
type=make

pre_build() {
Expand All @@ -16,13 +19,23 @@ pre_build() {

if ! test -f .config
then
cp ../config .config
cp ../config.${ARCH} .config
fi
}

post_build() {
mkdir -p ${BOOTPART}/boot
cp ${INSTALL_PATH}/vmlinuz* ${BOOTPART}/boot/kernel8.img
cp -r ${BUILD_DIR}/lib/modules ${BOOTPART}/boot/
find ${INSTALL_PATH} -name '*.dtb' | xargs -I{} cp {} ${BOOTPART}/boot/
mkdir -p ${DATAPART}
cp -r ${BUILD_DIR}/lib/modules ${DATAPART}/

case "$ARCH" in
x86_64)
mkdir -p ${BOOTPART}/EFI/Boot
cp ${INSTALL_PATH}/vmlinuz ${BOOTPART}/EFI/Boot/Bootx64.efi
;;
arm64)
mkdir -p ${BOOTPART}/boot
cp ${INSTALL_PATH}/vmlinuz* ${BOOTPART}/boot/kernel8.img
find ${INSTALL_PATH} -name '*.dtb' | xargs -I{} cp {} ${BOOTPART}/boot/
;;
esac
}
File renamed without changes.
Loading

0 comments on commit c867f6d

Please sign in to comment.