[Arm-netbook] Dissecting the SD Card Image

Alejandro Martínez zen at itram.es
Fri Apr 20 21:11:06 BST 2012


I got to enable VGA, basing on files:
novo7_android2.3.4/android2.3.4/device/softwinner/crane-common/hardware/libhardware/display/display.cpp
and
novo7_android2.3.4/android2.3.4/device/softwinner/crane-common/hardware/include/drv_display_sun4i.h

from the android image source drop. The driver is easily controllable
through ioctl's.

The framebuffer keeps being 720p no matter what resolution you set VGA
to. It seems another command is needed to change the framebuffer size.

#include <stdint.h>
#include <string.h>
#include <unistd.h>
#include <errno.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <sys/types.h>
#include <sys/mman.h>



int main(int argc, char const *argv[])
{

	unsigned long   args[4];
    int             ret = -1;

	int disp = open("/dev/disp", O_RDWR, 0);
	args[0]         = displayno;
    args[1]         = 0;
    args[2]         = 0;
    args[3]         = 0;
   ret = ioctl(disp,0x200,(unsigned long)args); //turn VGA on

    args[1] = 0xb; //set mode to 720p
    ret = ioctl(disp,0x202,(unsigned long)args); //set the mode
  ret = ioctl(disp,0x200,(unsigned long)args); //turn VGA on again

	return 0;
}

On Fri, Apr 20, 2012 at 5:56 PM, cnxsoft <cnxsoft at cnx-software.com> wrote:
>
> On 20/04/2012 21:25, Paul Kench wrote:
>
> I can confirm that my instructions work.
>
>
>
> I have a ubuntu login on my serial console! Don’t know the root password though, I ‘ll have to manually edit the passwd file or some such.
>
>
>
> The gzipped cpio image is still well over a gig so the file-size is still an issue.
>
>
>
> I’ll see if I can get a minimal debian root fs to boot. (maybe armhf, double exciting), and then stick it in my rockbox.
>
>
>
> Paul
>
>
>
> Thanks. Finally, I got it to work.
>
> Note that you need to use HDMI to see the Ubuntu desktop. VGA won't work, at least on my side.
>
> _______________________________________________
> arm-netbook mailing list arm-netbook at lists.phcomp.co.uk
> http://lists.phcomp.co.uk/mailman/listinfo/arm-netbook
> Send large attachments to arm-netbook at files.phcomp.co.uk



More information about the arm-netbook mailing list