end of project
[linux-gpu-amd-si.git] / src_install
blob9f30b3deb6d42fd5bbd7a5c726f6b75318d8ba1c
1 #!/bin/sh
3 patch_wrapper()
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"
10 patch_r=$?
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"
15 else
16 echo "patch got something really wrong, aborting"
17 exit 1
22 #=======
24 if test -z "$1"; then
25 echo "Missing the target linux source tree"
26 exit 1
29 LINUX_SRC_DIR=$1
30 ALGA_SRC_DIR=$PWD
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/"
42 #=======
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/"