Просмотр исходного кода

package: Add yafut

This is a yaffs implementation in user space, a helper for Mikrotik
bootloaders expecting the kernel in a partition with yaffs filesystem.

While flashing a prepared image has not been successful yet, writing the
kernel from an nfsroot works well:

| # nand erase /dev/mtd1
| # yafut -d /dev/mtd1 -w -i /path/to/kernel -o /kernel

Check by listing contents:

| # yafut -d /dev/mtd1 -l

Signed-off-by: Phil Sutter <phil@nwl.cc>
Phil Sutter 1 неделя назад
Родитель
Сommit
b8990aebc6
2 измененных файлов с 40 добавлено и 0 удалено
  1. 31 0
      package/yafut/Makefile
  2. 9 0
      target/config/Config.in.tools

+ 31 - 0
package/yafut/Makefile

@@ -0,0 +1,31 @@
+# This file is part of the OpenADK project. OpenADK is copyrighted
+# material, please see the LICENCE file in the top-level directory.
+
+include $(ADK_TOPDIR)/rules.mk
+
+PKG_NAME:=		yafut
+PKG_VERSION:=		git
+PKG_RELEASE:=		1
+PKG_HASH:=		e342c93
+PKG_DESCR:=		Access yaffs contents from user space
+PKG_SECTION:=		sys/fs
+PKG_BUILDDEP:=		cmake-host
+PKG_SITES:=		https://github.com/kempniu/yafut.git
+DISTFILES:=             $(PKG_NAME)-$(PKG_VERSION).tar.gz
+
+include $(ADK_TOPDIR)/mk/host.mk
+include $(ADK_TOPDIR)/mk/package.mk
+
+$(eval $(call HOST_template,YAFUT,yafut,${PKG_VERSION}-${PKG_RELEASE}))
+$(eval $(call PKG_template,YAFUT,yafut,$(PKG_VERSION)-$(PKG_RELEASE),$(PKG_DEPENDS),$(PKG_DESCR),$(PKG_SECTION)))
+
+HOST_CONFIG_STYLE:=	cmake
+CONFIG_STYLE:=		cmake
+
+yafut-install:
+	$(INSTALL_DIR) $(IDIR_YAFUT)/usr/bin
+	$(INSTALL_BIN) $(WRKINST)/usr/bin/yafut \
+		$(IDIR_YAFUT)/usr/bin
+
+include ${ADK_TOPDIR}/mk/host-bottom.mk
+include $(ADK_TOPDIR)/mk/pkg-bottom.mk

+ 9 - 0
target/config/Config.in.tools

@@ -288,6 +288,15 @@ config ADK_HOST_BUILD_OPKG
 	default y if ADK_HOST_NEED_OPKG
 	default n
 
+config ADK_HOST_NEED_YAFUT
+	bool
+	default n
+
+config ADK_HOST_BUILD_YAFUT
+	bool
+	default y if ADK_HOST_NEED_YAFUT
+	default n
+
 config ADK_HOST_NEED_SQUASHFS_TOOLS
 	bool
 	default n