-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace the orange pi zero kernel with our own build - one with worki…
…ng wifi
- Loading branch information
1 parent
7e012e2
commit ef98c12
Showing
5 changed files
with
98 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# | ||
# Rules to use the local kernel build dir | ||
# | ||
|
||
# FIXME | ||
# - add an arch to the zImage | ||
|
||
LOCAL_KERNEL = ../../linux/build/linux/zImage | ||
LOCAL_MODULES = ../../linux/build/modules-$(DEBIAN_ARCH).lzma | ||
|
||
$(LOCAL_KERNEL): | ||
$(MAKE) -C ../../linux build/linux/zImage DEBIAN_ARCH=$(DEBIAN_ARCH) | ||
|
||
$(addsuffix .cpio,$(basename $(LOCAL_MODULES))): | ||
$(MAKE) -C ../../linux build/linux/modules-$(DEBIAN_ARCH).cpio DEBIAN_ARCH=$(DEBIAN_ARCH) | ||
|
||
$(BUILD)/boot/dtb/%.dtb: ../../linux/build/linux/dtb/%.dtb | ||
mkdir -p $(dir $@) | ||
cp $< $@ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
|
||
# dont track the build dir | ||
build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
# | ||
# Download a pre-built Linux kernel | ||
# | ||
|
||
# FIXME | ||
# - this is currently single arch - need to rename the tar file and the | ||
# extraction dir | ||
|
||
# Its not really "debian" arch, but this is the same var name as elsewhere | ||
DEBIAN_ARCH = armhf | ||
|
||
# Where should we look for the linux.tar.gz file? | ||
REPO = https://github.com/hamishcoleman/linux | ||
RELEASE_TAG = mvp4.12 | ||
|
||
# Standardised directory names | ||
BUILD = build | ||
TAG = $(BUILD)/tags | ||
|
||
URL = $(REPO)/releases/download/$(RELEASE_TAG)/linux.tar.xz # FIXME - arch | ||
|
||
DTBS = sun8i-h2-plus-orangepi-zero.dtb | ||
|
||
BUILD_DEPENDS = xz-utils wget | ||
|
||
# install any packages needed for the builder | ||
build-depends: $(TAG)/build-depends | ||
$(TAG)/build-depends: Makefile | ||
sudo apt-get -y install $(BUILD_DEPENDS) | ||
$(call tag,build-depends) | ||
|
||
CLEAN_FILES += $(BUILD)/linux.tar.xz # FIXME - arch | ||
$(BUILD)/linux.tar.xz: Makefile # FIXME - arch | ||
mkdir -p $(dir $@) | ||
wget -c -O $@ $(URL) | ||
touch $@ | ||
|
||
CLEAN_FILES += $(BUILD)/linux # FIXME - arch | ||
$(BUILD)/linux/zImage $(BUILD)/linux/lib/modules $(addprefix $(BUILD)/linux/dtb/,$(DTBS)): $(BUILD)/linux.tar.xz | ||
tar -m -x -f $< -C $(BUILD) | ||
|
||
# Add the kernel specific binaries to this cpio file | ||
$(BUILD)/modules-$(DEBIAN_ARCH).cpio: $(BUILD)/linux/lib/modules # FIXME - arch | ||
( \ | ||
cd $(BUILD)/linux; \ | ||
find lib/modules -print0 | cpio -0 -H newc -R 0:0 -o \ | ||
) > $@ | ||
|
||
# Generic makefile rules below here | ||
|
||
clean: | ||
rm -rf $(CLEAN_FILES) | ||
|
||
reallyclean: | ||
rm -rf $(BUILD) | ||
|
||
define tag | ||
@echo Touching tag $1 | ||
@mkdir -p $(TAG) | ||
@touch $(TAG)/$1 | ||
endef | ||
|