embedded: Change how buildroot patch is applied

- Apply with p1, using a patch generated from git-format-patch.
- Use POSIX 'cd' over 'pushd, popd'
- Use OLDPWD to the find the patch, rather than making assumptions
  about the relative location of it.
This commit is contained in:
Tom Dewey 2024-06-19 10:50:03 +01:00 committed by Tom Dewey
parent 725d651f96
commit 686ad14308

View file

@ -7,7 +7,7 @@ BUILDROOT_TAR=buildroot-2024.02.3.tar.gz
if [ ! -e "${BUILDROOT}" ]; then if [ ! -e "${BUILDROOT}" ]; then
tar xvf "${BUILDROOT_TAR}" tar xvf "${BUILDROOT_TAR}"
pushd ${BUILDROOT} && patch -p0 < buildroot-mesa3d.patch && popd cd "${BUILDROOT}" && patch -p1 < "${OLDPWD}/buildroot-mesa3d.patch" && cd -
fi fi
if [ ! -e "${BUILDROOT}/.config" ]; then if [ ! -e "${BUILDROOT}/.config" ]; then