|
1 |
| -# Create an ESP image that has an UKI, systemd-boot and the matching configs |
| 1 | +# Create an ESP image that has a type #2 EFI UKI and systemd-boot |
2 | 2 |
|
3 | 3 | # Optional subfolder, dependant on where the ESP partition gets mounted
|
4 | 4 | # intended to only have a leading slash, no trailing slash e.g. '/EFI', or just empty, ''
|
5 | 5 | ESPFOLDER ?= "/EFI"
|
6 | 6 |
|
7 |
| -# Optional initrd, filname inside ${DEPLOY_DIR_IMAGE} |
8 |
| -ESPINITRD ?= "" |
9 |
| - |
10 |
| -# Title as shown on the console |
11 |
| -UKI_TITLE ?= "${DISTRO_NAME} ${DISTRO_VERSION} - ${MACHINE}" |
12 |
| - |
13 |
| -# Kernel CMDLINE |
14 |
| -UKI_CMDLINE = " " |
15 |
| -UKI_CMDLINE[export] = "1" |
16 |
| - |
17 | 7 | do_ukiesp() {
|
18 | 8 | mkdir -p ${IMAGE_ROOTFS}${ESPFOLDER}/loader/entries
|
| 9 | + mkdir -p ${IMAGE_ROOTFS}${ESPFOLDER}/Linux |
19 | 10 |
|
20 | 11 | # Copy over files from deploy into the rootfs
|
21 |
| - install -m 0755 ${DEPLOY_DIR_IMAGE}/${UKI_FILENAME} ${IMAGE_ROOTFS}${ESPFOLDER} |
22 |
| - install -m 0644 ${DEPLOY_DIR_IMAGE}/${KERNEL_DEVICETREE} ${IMAGE_ROOTFS}${ESPFOLDER} |
| 12 | + install -m 0755 ${DEPLOY_DIR_IMAGE}/${UKI_FILENAME} ${IMAGE_ROOTFS}${ESPFOLDER}/Linux |
23 | 13 |
|
24 | 14 | # Add global settings to systemd-boot config
|
25 | 15 | echo "timeout 5" > ${IMAGE_ROOTFS}${ESPFOLDER}/loader/loader.conf
|
26 | 16 |
|
27 |
| - # copy over kernel and optional initrd and dtb |
28 |
| - echo "title ${UKI_TITLE}" > ${IMAGE_ROOTFS}${ESPFOLDER}/loader/entries/boot.conf |
29 |
| - echo "linux /${UKI_FILENAME}" >> ${IMAGE_ROOTFS}${ESPFOLDER}/loader/entries/boot.conf |
30 |
| - |
31 |
| - # Assemble CMDLINE |
32 |
| - # FIXME: don't use QCOM_* variables |
33 |
| - if [ -n "${QCOM_BOOTIMG_ROOTFS}" ]; then |
34 |
| - UKI_CMDLINE="$UKI_CMDLINE root=${QCOM_BOOTIMG_ROOTFS} rw rootwait" |
35 |
| - fi |
36 |
| - if [ -n "${SERIAL_CONSOLES}" ]; then |
37 |
| - tmp="${SERIAL_CONSOLES}" |
38 |
| - for entry in $tmp ; do |
39 |
| - baudrate=`echo $entry | sed 's/\;.*//'` |
40 |
| - tty=`echo $entry | sed -e 's/^[0-9]*\;//' -e 's/\;.*//'` |
41 |
| - console="$tty","$baudrate"n8 |
42 |
| - UKI_CMDLINE="$UKI_CMDLINE console=$console" |
43 |
| - done |
44 |
| - fi |
45 |
| - if [ -n "${KERNEL_CMDLINE_EXTRA}" ]; then |
46 |
| - UKI_CMDLINE="$UKI_CMDLINE ${KERNEL_CMDLINE_EXTRA}" |
47 |
| - fi |
48 |
| - echo "options $UKI_CMDLINE" >> ${IMAGE_ROOTFS}${ESPFOLDER}/loader/entries/boot.conf |
49 |
| - |
50 |
| - if [ -n "${ESPINITRD}" ] ; then |
51 |
| - install -m 0644 ${DEPLOY_DIR_IMAGE}/${ESPINITRD} ${IMAGE_ROOTFS}${ESPFOLDER} |
52 |
| - echo "initrd /${ESPINITRD}" >> ${IMAGE_ROOTFS}${ESPFOLDER}/loader/entries/boot.conf |
53 |
| - fi |
54 |
| - echo "devicetree /${KERNEL_DEVICETREE}" >> ${IMAGE_ROOTFS}${ESPFOLDER}/loader/entries/boot.conf |
55 | 17 | }
|
56 | 18 |
|
57 | 19 | addtask ukiesp after do_deploy uki before do_image_complete do_image_wic
|
|
0 commit comments