grub: avoid mounting the read-only root filesystem
[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     sed -i -e 's/ ro / rw /' ${D}${sysconfdir}/grub.d/10_linux
25 }
26
27 FILES_${PN}-editenv = "${bindir}/grub2-editenv"
28
29 pkg_postinst_ontarget_${PN}() {
30         grub-mkconfig -o /boot/grub/grub.cfg
31 }