-stage3-kernel/linux-4.6.2/vmlinux:
- rm -rf stage3-kernel/linux-4.6.2
- cat stage3-kernel/linux-4.6.2.tar.xz | tar -x --xz -C stage3-kernel
- cd stage3-kernel/linux-4.6.2 && \
- git init
- cd stage3-kernel/linux-4.6.2 && \
- git remote add origin https://github.com/lowrisc/riscv-linux.git
- cd stage3-kernel/linux-4.6.2 && \
- git fetch
- cd stage3-kernel/linux-4.6.2 && \
- git checkout -f -t origin/debug-v0.3
- cd stage3-kernel/linux-4.6.2 && \
- patch -p1 < spi_sd_power_hack.patch
- cd stage3-kernel/linux-4.6.2 && \
- make ARCH=riscv defconfig
- cd stage3-kernel/linux-4.6.2 && \
+stage3-kernel/linux-$(KERNEL_VERSION)/vmlinux:
+ rm -rf stage3-kernel/linux-$(KERNEL_VERSION)
+ cp -a $(LOCAL_LINUX_GIT_COPY) stage3-kernel/linux-$(KERNEL_VERSION) || { \
+ mkdir stage3-kernel/linux-$(KERNEL_VERSION) && \
+ cd stage3-kernel/linux-$(KERNEL_VERSION) && \
+ git init; \
+ }
+ cd stage3-kernel/linux-$(KERNEL_VERSION) && \
+ git remote add riscv https://github.com/riscv/riscv-linux && \
+ git fetch riscv && \
+ git checkout -f linux-4.1.y-riscv && \
+ make mrproper && \
+ make ARCH=riscv defconfig && \