December 14, 2019, 03:52:33 pm

News:

Have you visited the Allwinner Chipset wiki? - http://linux-sunxi.org/


Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - neyron

1
Hi guys!  (and girls maybe?  :P )

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

$ 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

$ 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:

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
2
Hello,

There is any tutorial to build newest linux-sunxi kernel and connect it with android to livesuit.img file?

In lastest linux-sunxi kernel sources there is a /android/configs/ folder where we can find README file that explain how to create android kernel .config. I thing we can build by that file android suitable kernel. But how can I connect that kernel with android and create livesuit image?

Best regards,
NeyroN
3
Hi,

I want to add 1-wire support for my cubieboard2 android kernel config to connect DS18B20. In lechee/linux-3.3 I 'make menuconfig' then I load config which I want to edit. I check 1-wire support and save config. But when I open that new config by gedit I see it's completely different than old config. Why?

Thanks,
NeyroN
4
Hi,

In lichee folder i have kernel 3.3 version. How can I update that to newest stable kernel from https://github.com/linux-sunxi/linux-sunxi ?

Thanks
NeyroN