Skip to content

Instantly share code, notes, and snippets.

@MitchRatquest
Last active May 25, 2017 23:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MitchRatquest/58260974f47f063fe564e122d374e308 to your computer and use it in GitHub Desktop.
Save MitchRatquest/58260974f47f063fe564e122d374e308 to your computer and use it in GitHub Desktop.
*WIP* buildroot nanopi neo working Linux nanopi-neo 4.10.1 #1 SMP Tue May 23 12:44:00 CDT 2017 armv7l GNU/Linux
#!/bin/bash
VERSION=2017.05-rc2
wget https://git.busybox.net/buildroot/snapshot/buildroot-"$VERSION".tar.gz
tar zvxf buildroot-"$VERSION".tar.gz
mkdir patches
cd patches
#from this friendly blog: https://blog.christophersmart.com/2016/10/23/building-and-booting-upstream-linux-and-u-boot-for-orange-pi-one-arm-board/
# [v4,01/10] ethernet: add sun8i-emac driver
wget https://patchwork.kernel.org/patch/9365783/raw/ \
-O sun8i-emac-patch-1.patch
# [v4,04/10] ARM: dts: sun8i-h3: Add dt node for the syscon
wget https://patchwork.kernel.org/patch/9365773/raw/ \
-O sun8i-emac-patch-4.patch
# [v4,05/10] ARM: dts: sun8i-h3: add sun8i-emac ethernet driver
wget https://patchwork.kernel.org/patch/9365757/raw/ \
-O sun8i-emac-patch-5.patch
# [v4,07/10] ARM: dts: sun8i: Enable sun8i-emac on the Orange PI One
wget https://patchwork.kernel.org/patch/9365767/raw/ \
-O sun8i-emac-patch-7.patch
# [v4,09/10] ARM: sunxi: Enable sun8i-emac driver on sunxi_defconfig
wget https://patchwork.kernel.org/patch/9365779/raw/ \
-O sun8i-emac-patch-9.patch
cd ..
#cp -R patches/ buildroot-"$VERSION"/
#cp Config.in buildroot-"$VERSION"/package #gotta add the packages to the config file
#cp -R tk/ buildroot-"$VERSION"/package/
#cp -R puredata/ buildroot-"$VERSION"/package/
#cp 0002-no-fixstrtod.patch buildroot-"$VERSION"/package/tcl
#cp -R nanopi_neo_synth/ buildroot-"$VERSION"/board/
#cp busybox.config buildroot-"$VERSION"/package/busybox/ DONT DO THIS, set it as the config in menuconfig
#idea is to have files one level above buildroot, copy them in to place, and build everything from the top level
make O=$PWD -C buildroot-2017.05-rc2/ defconfig BR2_DEFCONFIG=../nanopi_neo_synth_buildroot_defconfig
#make O=$PWD -C buildroot-2017.05-rc2 defconfig BR2_DEFCONFIG=nanopi_neo_synth_buildroot_defconfig
#use $(TOPDIR)/../defconfig style in build menus
#make || cd $(pwd)/build/puredata-0.46-7 && ./autogen.sh && cd ../../ && make
# ^ you will fail the autogen script ^ so run it ^ and return to your directory
#now that doesn't compile uboot with a working dtb that enables booting, but i manually tweaked two configs into one config.
#you can find that in another gist
#your output will be in buildroot-$(VERSION)/output/images/sdcard.img Burn that to an sd card and manually copy over the dts from my other tree
wget https://gist.githubusercontent.com/MitchRatquest/1d374cf3389a318b35fb493830a018a9/raw/c755c6f088aca040e4f607d05b9610f04ff46c66/sun8i-h3-nanopi-neo.dts
dtc -I dts -O dtb -o sun8i-h3-nanopi-neo.dtb sun8i-h3-nanopi-neo.dts
#cp sun8i-h3-nanopi-neo.dtb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment