mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-11-29 21:04:06 +02:00
add jffs2root from whiterussian/
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@2255 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
e96724f6de
commit
d37a8552b4
@ -3,7 +3,7 @@
|
|||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME := base-files-arch
|
PKG_NAME := base-files-arch
|
||||||
PKG_RELEASE := 1
|
PKG_RELEASE := 2
|
||||||
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
|
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
|
||||||
|
|
||||||
include $(TOPDIR)/package/rules.mk
|
include $(TOPDIR)/package/rules.mk
|
||||||
|
@ -76,6 +76,7 @@ int main(int argc, char **argv)
|
|||||||
struct mtd_info_user mtdInfo;
|
struct mtd_info_user mtdInfo;
|
||||||
unsigned long len;
|
unsigned long len;
|
||||||
struct trx_header *ptr;
|
struct trx_header *ptr;
|
||||||
|
char *buf;
|
||||||
|
|
||||||
if (((fd = open(FILENAME, O_RDWR)) < 0)
|
if (((fd = open(FILENAME, O_RDWR)) < 0)
|
||||||
|| ((len = lseek(fd, 0, SEEK_END)) < 0)
|
|| ((len = lseek(fd, 0, SEEK_END)) < 0)
|
||||||
@ -106,6 +107,15 @@ int main(int argc, char **argv)
|
|||||||
msync(ptr,sizeof(struct trx_header),MS_SYNC|MS_INVALIDATE);
|
msync(ptr,sizeof(struct trx_header),MS_SYNC|MS_INVALIDATE);
|
||||||
printf("Partition moved; please reboot\n");
|
printf("Partition moved; please reboot\n");
|
||||||
}
|
}
|
||||||
|
} else if (argc > 1 && !strcmp(argv[1], "--clean")) {
|
||||||
|
buf = (char *) ptr;
|
||||||
|
if (buf[ptr->offsets[1] - 1] == 0) {
|
||||||
|
init_crc32();
|
||||||
|
buf[ptr->offsets[1] - 1] = 1;
|
||||||
|
ptr->crc32 = crc32buf((void *) &(ptr->flag_version), ptr->len - offsetof(struct trx_header, flag_version));
|
||||||
|
msync(ptr,sizeof(struct trx_header),MS_SYNC|MS_INVALIDATE);
|
||||||
|
printf("Partition marked as clean\n");
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
int x;
|
int x;
|
||||||
printf(" erase: 0x%08x\n",mtdInfo.erasesize);
|
printf(" erase: 0x%08x\n",mtdInfo.erasesize);
|
||||||
|
Loading…
Reference in New Issue
Block a user