5 cd $
(dirname "$LINUX_SRC_DIR/$1")
6 echo "Patching $LINUX_SRC_DIR/$1 with $ALGA_SRC_DIR/$1.patch"
7 #removed for busybox version of patch
8 #patch --forward --unified --reject-file=- --input="$ALGA_SRC_DIR/$1.patch"
9 patch -N -i "$ALGA_SRC_DIR/$1.patch"
11 if test $patch_r -ne 0; then
12 echo "Something went wrong when applying $ALGA_SRC_DIR/$1.patch"
13 if test $patch_r -eq 1; then
14 echo "patch probably already applied, proceeding"
16 echo "patch got something really wrong, aborting"
25 echo "Missing the target linux source tree"
32 patch_wrapper include
/drm
/drm_pciids.h
34 patch_wrapper drivers
/video
/Kconfig
36 cp -R "$ALGA_SRC_DIR/drivers/gpu/alga" "$LINUX_SRC_DIR/drivers/gpu/"
38 patch_wrapper drivers
/gpu
/Makefile
40 cp -R "$ALGA_SRC_DIR/include/alga" "$LINUX_SRC_DIR/include/"
43 #shared headers with userland
45 patch_wrapper include
/uapi
/Kbuild
47 cp -R "$ALGA_SRC_DIR/include/uapi/alga" "$LINUX_SRC_DIR/include/uapi/"