Hi guys! (and girls maybe?
)
I'm trying to port newest android version to cubieboard 2 and I have a little problem at this moment. If anyone have experience with porting android 4.4 and higher it will be great if you could help me.
I have problem with mounting partitions with fstab.sunXi file by init program. If anyone could share a logs with loglevel=7 from init from android 4.4 or higher (from any allwinner chip)?
I've got that error message:
fs_mgr: __mount(source=/dev/block/by-name/system,target=/system,type=ext4)=-1
fs_mgr: Failed to mount an un-encryptable or wiped partition on/dev/block/by-name/system at /system options: (null) error: No such file or directory
Can anyone tell me from where got "/by-name" folder? What a program create that folder? I'm looking for any information about fstab.sunXi file and mounting by that file too.
with "exec /sbin/busybox sh /sbin/init_parttion.sh" adding in init.rc
without "exec /sbin/busybox sh /sbin/init_parttion.sh" adding in init.rc
Can anyone send me result of "adb ls /dev/block" on allwinner android 4.4 or higher ?
EDIT(6.01.15):
I found some interesting function in A23 sunxi source code in system/core/util.c:
I merge that function with my source code and that program create /dev/block/by-name/ folder with partitions. But mount_all function in init program generate the same error above.
Any ideas?
Regards from Poland,
NeyroN

I'm trying to port newest android version to cubieboard 2 and I have a little problem at this moment. If anyone have experience with porting android 4.4 and higher it will be great if you could help me.
I have problem with mounting partitions with fstab.sunXi file by init program. If anyone could share a logs with loglevel=7 from init from android 4.4 or higher (from any allwinner chip)?
I've got that error message:
fs_mgr: __mount(source=/dev/block/by-name/system,target=/system,type=ext4)=-1
fs_mgr: Failed to mount an un-encryptable or wiped partition on/dev/block/by-name/system at /system options: (null) error: No such file or directory
Can anyone tell me from where got "/by-name" folder? What a program create that folder? I'm looking for any information about fstab.sunXi file and mounting by that file too.
with "exec /sbin/busybox sh /sbin/init_parttion.sh" adding in init.rc
Code Select
$ adb ls /dev/block
000041ed 000001a4 00000006 .
000041ed 00000d34 0000002e ..
0000a1ff 00000010 00000006 UDISK
0000a1ff 00000010 00000006 cache
0000a1ff 00000010 00000006 data
0000a1ff 00000010 00000006 private
0000a1ff 00000010 00000006 misc
0000a1ff 00000010 00000006 databk
0000a1ff 00000010 00000006 recovery
0000a1ff 00000010 00000006 system
0000a1ff 00000010 00000006 boot
0000a1ff 00000010 00000006 env
0000a1ff 00000010 00000006 bootloader
00006180 00000000 00000003 loop7
00006180 00000000 00000003 loop6
00006180 00000000 00000003 loop5
00006180 00000000 00000003 loop4
00006180 00000000 00000003 loop3
00006180 00000000 00000003 loop2
00006180 00000000 00000003 loop1
00006180 00000000 00000003 loop0
without "exec /sbin/busybox sh /sbin/init_parttion.sh" adding in init.rc
Code Select
$ adb ls /dev/block
000041ed 000001a4 00000006 .
000041ed 00000d34 0000002e ..
00006180 00000000 00000003 loop7
00006180 00000000 00000003 loop6
00006180 00000000 00000003 loop5
00006180 00000000 00000003 loop4
00006180 00000000 00000003 loop3
00006180 00000000 00000003 loop2
00006180 00000000 00000003 loop1
00006180 00000000 00000003 loop0
Can anyone send me result of "adb ls /dev/block" on allwinner android 4.4 or higher ?
EDIT(6.01.15):
I found some interesting function in A23 sunxi source code in system/core/util.c:
Code Select
void get_kernel_cmdline_partitions(void)
{
char cmdline[1024], partition_dev[32], partition_name[32];
char *ptr;
int fd, len, ret;
char dev[64], partition[64];
char *endptr;
mode_t perm;
mkdir("/dev/block", 0755);
mkdir("/dev/block/by-name", 0755);
fd = open("/proc/cmdline", O_RDONLY);
if (fd >= 0) {
int n = read(fd, cmdline, 1023);
if (n < 0) n = 0;
/* get rid of trailing newline, it happens */
if (n > 0 && cmdline[n-1] == '\n') n--;
cmdline[n] = 0;
close(fd);
} else {
cmdline[0] = 0;
}
ptr = strstr(cmdline, "partitions=");
if (ptr == NULL) {
ERROR(">> cmdline not contain partition info!\n");
return;
}
ptr += strlen("partitions=");
memset(dev, 0, sizeof(dev));
memset(partition, 0, sizeof(partition));
memset(partition_dev, 0, sizeof(partition_dev));
memset(partition_name, 0, sizeof(partition_name));
while (ptr && *ptr) {
char *x = strchr(ptr, '@');
len = x - ptr;
memccpy(partition_name, ptr, '@', len);
ptr = x + 1;
x = strchr(ptr, ':');
if(x == NULL) {
len = strlen(ptr);
} else {
len = x - ptr;
}
memccpy(partition_dev, ptr, ':', len);
snprintf(partition, sizeof(partition), "/dev/block/by-name/%s", partition_name);
snprintf(dev, sizeof(dev), "/dev/block/%s", partition_dev);
symlink(dev, partition);
memset(dev, 0, sizeof(dev));
memset(partition, 0, sizeof(partition));
memset(partition_dev, 0, sizeof(partition_dev));
memset(partition_name, 0, sizeof(partition_name));
if(x == NULL)
break;
else
ptr = x + 1;
}
}
I merge that function with my source code and that program create /dev/block/by-name/ folder with partitions. But mount_all function in init program generate the same error above.

Any ideas?
Regards from Poland,
NeyroN