diff --git a/config/DS918+/6.2.4-25556/config.json b/config/DS918+/6.2.4-25556/config.json index 7ce91bcd6..39e627257 100644 --- a/config/DS918+/6.2.4-25556/config.json +++ b/config/DS918+/6.2.4-25556/config.json @@ -113,7 +113,8 @@ }, "bootp1_copy": { "@@@PAT@@@/GRUB_VER": "GRUB_VER", - "@@@COMMON@@@/EFI": "EFI" + "@@@COMMON@@@/EFI/boot/SynoBootLoader.conf": "EFI/BOOT/", + "@@@COMMON@@@/EFI/boot/SynoBootLoader.efi": "EFI/BOOT/" }, "bootp2_copy": { "@@@PAT@@@/GRUB_VER": "GRUB_VER", diff --git a/config/DS918+/7.0-41890/config.json b/config/DS918+/7.0-41890/config.json index f77859f36..5f2b2c314 100644 --- a/config/DS918+/7.0-41890/config.json +++ b/config/DS918+/7.0-41890/config.json @@ -113,7 +113,8 @@ }, "bootp1_copy": { "@@@PAT@@@/GRUB_VER": "GRUB_VER", - "@@@COMMON@@@/EFI": "EFI" + "@@@COMMON@@@/EFI/boot/SynoBootLoader.conf": "EFI/BOOT/", + "@@@COMMON@@@/EFI/boot/SynoBootLoader.efi": "EFI/BOOT/" }, "bootp2_copy": { "@@@PAT@@@/GRUB_VER": "GRUB_VER", diff --git a/config/_common/grub-template.conf b/config/_common/grub-template.conf index 16f6716bf..ad6ec1d59 100644 --- a/config/_common/grub-template.conf +++ b/config/_common/grub-template.conf @@ -45,4 +45,17 @@ set gfxmode=auto insmod vbe insmod vga +# UEFI +insmod efi_gop +insmod efi_uga + +insmod font +if loadfont ${prefix}/unicode.pf2 +then + insmod gfxterm + set gfxmode=auto + set gfxpayload=keep + terminal_output gfxterm +fi + @@@MENU_ENTRIES@@@ diff --git a/config/_common/ramdisk-003-post-init-script-LOWER.patch b/config/_common/ramdisk-003-post-init-script-LOWER.patch index 4d176fa35..edccb90dd 100644 --- a/config/_common/ramdisk-003-post-init-script-LOWER.patch +++ b/config/_common/ramdisk-003-post-init-script-LOWER.patch @@ -6,7 +6,7 @@ functions or quotes in v7, to make diffing and management of these patches easie +++ b/usr/sbin/init.post @@ -18,5 +18,28 @@ fi - Mmount $RootDevice /tmpRoot -o barrier=1 + mount $RootDevice /tmpRoot -o barrier=1 +############################################################################################ +SED_PATH='/tmpRoot/usr/bin/sed' diff --git a/ext/boot-image-template.img.gz b/ext/boot-image-template.img.gz index 0be47050e..fc82598dd 100644 Binary files a/ext/boot-image-template.img.gz and b/ext/boot-image-template.img.gz differ diff --git a/ext/build-template-image.txt b/ext/build-template-image.txt index 4beba4744..9f70908f9 100644 --- a/ext/build-template-image.txt +++ b/ext/build-template-image.txt @@ -29,6 +29,14 @@ The following settings were detected by ./configure for the binary release: With stack smashing protector: No ******************************************************* +mkdir build-pc && cd build-pc +../configure --prefix=$PWD/usr -sbindir=$PWD/sbin --sysconfdir=$PWD/etc --disable-werror +make && make install +cd .. +mkdir build && cd build +../configure --prefix=$PWD/usr -sbindir=$PWD/sbin --sysconfdir=$PWD/etc --disable-werror --with-platform=efi --target=x86_64 +make && make install + ######################################################################################################################## ### Create the image ######################################################################################################################## @@ -77,14 +85,18 @@ mkfs.ext2 /dev/loop8p2 ######################################################################################################################## mkdir temp-mount-p1 mount /dev/loop8p1 ./temp-mount-p1 -./grub-2.06/grub-install \ - -d ./grub-2.06/grub-core \ - --target=i386-pc --no-floppy -s \ - --root-directory=$PWD/temp-mount-p1 \ +./grub-2.06/build-pc/grub-install \ + --target=i386-pc --recheck -s \ + --boot-directory=$PWD/temp-mount-p1/boot \ /dev/loop8 -# small note: --root-directory MUST be an absolute path (or it will create it in /) + +./grub-2.06/build/grub-install \ + --target=x86_64-efi \ + --efi-directory=$PWD/temp-mount-p1 \ + --removable --no-nvram -s --no-bootsector --boot-directory=$PWD/temp-mount-p1/boot sync umount /dev/loop8p1 +losetup -d /dev/loop8 ######################################################################################################################## ### Pack image