df7354c651b63463311ad8e0cf9b4ba8b49f956f
[pti/rtp.git] / meta-stx / recipes-bsp / grub / grub_2.02.bbappend
1 #
2 ## Copyright (C) 2019 Wind River Systems, Inc.
3 #
4 #  Licensed under the Apache License, Version 2.0 (the "License");
5 #  you may not use this file except in compliance with the License.
6 #  You may obtain a copy of the License at
7 #
8 #      http://www.apache.org/licenses/LICENSE-2.0
9 #
10 #  Unless required by applicable law or agreed to in writing, software
11 #  distributed under the License is distributed on an "AS IS" BASIS,
12 #  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 #  See the License for the specific language governing permissions and
14 #  limitations under the License.
15
16 TRANSFORM_NAME = "s,grub,grub2,"
17 EXTRA_OECONF += "--program-transform-name=${TRANSFORM_NAME}"
18
19 do_install_append() {
20     for file in ${D}${bindir}/grub2-* ${D}${sbindir}/grub2-*; do
21         ln -sf $(basename ${file}) $(echo ${file}|sed 's/grub2/grub/')
22     done
23 }
24
25 FILES_${PN}-editenv = "${bindir}/grub2-editenv"
26
27 pkg_postinst_ontarget_${PN}() {
28         grub-mkconfig -o /boot/grub/grub.cfg
29 }