September 22, 2019, 06:49:21 am

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.

Messages - 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
maybe go to lichee/tools/pack/chips/sun7i/configs/android/sugar-cubieboard2, rename sys_config.fex to sys_config_hdmi.fex and again rename sys_config_lcd.fex to sys_config.fex. Go to yourSDKfolder/android/ and do 'pack'.

Tell if that works.

Regards,
NeyroN
3
Hi,

But GPIO is actually working great on Cubieboard2 Android. Kernel provide nice gpio interface which you can use by your Android app. Try this: go to adb shell, and try change your pin options (/sys/class/gpio/gpio*).

Regards,
NeyroN
4
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
5
Hello again,

Is there someone who enable 1wire on android cubieboard2 ?

I used lastest android sdk but it isn't still support for 1wire sunxi driver. 
6
So there is no tutorial to integrate new stable kernel into Android build process?
7
Oh, you dont understood me ;)  I mean I dont see all options that I need turn on in kernel 3.3 menuconfig to enable 1 wire.

Tutorial ( http://docs.cubieboard.org/tutorials/cb1/customization/ds18b20_via_1-wire ) says I need to select:

Device Drivers  --->
   
  • GPIO Support  --->
            <*>   GPIO Support for sunxi platform
        <*> Dallas's 1-wire support  --->
            <*> 1-wire sunxi support
            1-wire Bus Masters  --->
                <*> GPIO 1-wire busmaster
            1-wire Slaves  --->
                <*> Thermal family implementation

    But in my kernel I can see only:

    Device Drivers  --->
        <*> Dallas's 1-wire support  --->
            1-wire Bus Masters  --->
                <*> GPIO 1-wire busmaster
            1-wire Slaves  --->
                <*> Thermal family implementation

    Where I can find others options? When I compile only with that options I don't see 1-wire folder in /sys/bus folder...

    Thanks
    NeyroN
8
ok. I must something turn on to enable that options in kerner 3.3? (in kernel 3.4 I can't see that options too)

Device Drivers  --->
GPIO Support  --->
        <*>   GPIO Support for sunxi platform
<*> Dallas's 1-wire support  --->
        <*> 1-wire sunxi support
9
These instructions not working for me (for SDK with kernel 3.4) :(
SDK with kernel 3.3 works great.
10
Thanks for your reply.

I've used android sdk with kernel 3.3 from http://dl.cubieboard.org/software/a20-cubieboard/android/A20-android-4.2.tar.xz for my cubieboard2 and its work correctly. I want to add 1-wire support so I 'make ARCH=arm menuconfig' in lichee/linux-3.3 folder but I can't find there all needed options.

From:
Device Drivers  --->
   
  • GPIO Support  --->
            <*>   GPIO Support for sunxi platform
        <*> Dallas's 1-wire support  --->
            <*> 1-wire sunxi support
            1-wire Bus Masters  --->
                <*> GPIO 1-wire busmaster
            1-wire Slaves  --->
                <*> Thermal family implementation

    I can find only:
    Device Drivers  --->
        <*> Dallas's 1-wire support  --->
            1-wire Bus Masters  --->
                <*> GPIO 1-wire busmaster
            1-wire Slaves  --->
                <*> Thermal family implementation

    There is no GPIO Support for sunxi platform and 1-wire sunxi support options :(

    I try using SDK from your link but when I update builded fimware to cubieboard2 then system doesn't start. I copy linux-3.4/arch/arm/configs/cubieboard2_defconfig to linux-3.4/.config  and  linux-3.4/arch/arm/configs/cubieboard2_defconfig to linux-3.4/arch/arm/configs/sun7ismp_android_defconfig .
    Should I do something more to build correctly image for cubieboard2 by that SDK?


    Thanks
    NeyroN
11
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
12
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