nanoboot: Tiny bootloader for NanoPi comparable to RaspberryPi loader.
authorFlorian Boor <florian.boor@kernelconcepts.de>
Fri, 11 Sep 2015 20:44:59 +0000 (22:44 +0200)
committerFlorian Boor <florian.boor@kernelconcepts.de>
Fri, 11 Sep 2015 20:44:59 +0000 (22:44 +0200)
Signed-off-by: Florian Boor <florian.boor@kernelconcepts.de>
recipes-tools/nanoboot/files/nanopi/nanoboot.txt [new file with mode: 0644]
recipes-tools/nanoboot/nanoboot_git.bb [new file with mode: 0644]

diff --git a/recipes-tools/nanoboot/files/nanopi/nanoboot.txt b/recipes-tools/nanoboot/files/nanopi/nanoboot.txt
new file mode 100644 (file)
index 0000000..d01f812
--- /dev/null
@@ -0,0 +1,14 @@
+nanopi
+#quiet - don't produce any messages except for errors
+#cmdline = ... - set the kernel command line
+#        default is console=ttySAC0,115200 root=/dev/mmcblk0p2
+#rootfstype=ext4 rootwait
+#    cmdline += ... - append to the kernel command line
+#    kernel = ... - set the kernel filename
+#        default is zImage
+#    kernel_address = ... - set the kernel load address
+#        default is 0x30008000
+#    initramfs = ... - set the initramfs file
+#        default is blank, meaning no initramfs
+#    initramfs_address = ... - set the initramfs load address
+#        default is 0x33000000
diff --git a/recipes-tools/nanoboot/nanoboot_git.bb b/recipes-tools/nanoboot/nanoboot_git.bb
new file mode 100644 (file)
index 0000000..535151b
--- /dev/null
@@ -0,0 +1,42 @@
+DESCRIPTION = "Minimalistic bootloader for NanoPi"
+HOMEPAGE = "https://github.com/ARMWorks/NanoPi-nanoboot"
+SECTION = "bootloaders"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=a23a74b3f4caf9616230789d94217acb"
+
+SRCREV = "24adb19902ad48834800eb4e6fd6b87bd2faed85"
+PV = "v0.0+git${SRCPV}"
+
+SRC_URI = "git://github.com/ARMWorks/NanoPi-nanoboot.git;protocol=https;branch=master;rev=24adb19902ad48834800eb4e6fd6b87bd2faed85 \
+           file://nanoboot.txt"
+
+S = "${WORKDIR}/git"
+
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+
+inherit deploy
+
+
+EXTRA_OEMAKE = 'CROSS_COMPILE=${TARGET_PREFIX} CC="${TARGET_PREFIX}gcc ${TOOLCHAIN_OPTIONS}" V=1'
+FILES_${PN} = "/boot ${sysconfdir}"
+
+do_configure () {
+}
+
+do_compile () {
+       oe_runmake
+}
+
+do_install () {
+        install -d ${D}/boot
+        install ${S}/build/nanoboot.bin ${D}/boot/
+        install ${WORKDIR}/nanoboot.txt ${D}/boot/
+}
+
+do_deploy () {
+        install -d ${DEPLOYDIR}
+        install ${S}/build/nanoboot.bin ${DEPLOYDIR}/
+        install ${WORKDIR}/nanoboot.txt ${DEPLOYDIR}/
+}
+
+addtask deploy before do_build after do_compile