All Board Android Without Ramdisk

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

All Board Android Without Ramdisk

All Board Android Without Ramdisk

Ramdisk is unnecessary thing for some embedded systems, but it's required for Android

.

You can develop an Android system with no ramdisk (initrd/initramfs), just follow these steps:

1) Remove RAMDISK support from kernel:

General setup  --->
            [ ] Initial RAM filesystem and RAM disk (initramfs/initrd) support

Create a single rootfs:

cd myandroid/out/target/product/imx51_BBG

mkdir rootfs
sudo cp -a system rootfs/
sudo cp -a root/* rootfs/
sudo cp -a recovery rootfs/

Since you are using a single filesystem, then comment out these lines from rootfs/init.rc:

#mount ext3 /dev/block/mmcblk0p2 /system
#mount ext3 /dev/block/mmcblk0p2 /system ro remount
#mount ext3 /dev/block/mmcblk0p5 /data nosuid nodev
#mount ext3 /dev/block/mmcblk0p6 /cache nosuid nodev

Create just one partition into your MMC or Flash memory:

  • Partition 1: 200MB+ as EXT3 will be used as system(rootfs). Remember to skip 4MB to save kernel.

It is a good idea to create a second partition (VFAT) to mount as /data to save user files.

Mount that "system" partition and copy all content of rootfs:

sudo mount /dev/sdb1 -t ext3 /mnt
sudo cp -a .../target/product/imx51_BBG/rootfs/* /mnt
sudo umount /mnt

Now just setup your bootloader parameter correctly (i.e. MMC Partition 1):

setenv bootargs_base 'setenv bootargs root=/dev/mmcblk0p1 rootfstype=ext3 console=ttymxc0,115200 noinitrd'
Labels (1)
Tags (1)
Comments

Hi,

is this manual usable with your Android 4.2.2. 1.1.0 release on an SabreSD Board (imx6q)?

Greets,

Michael

Hi Michael,

    I have follow above steps for sabrelite board(imx6q) but for me it wasn't successful.Need to check init.rc as well as init.freescale.rc ,

these two files will change significantly.For me it only shows android boot screen & gives following log message continously.

request_suspend_state: wakeup (0->0) at 557886633736 (1970-01-02 00:09:07.375188064 UTC)

init: untracked pid 5514 exited

init: untracked pid 5515 exited

pid  number changes

regards,

sasidhar

Hi sasidhar,

i have tested it on the weekend with the same errors. If you start "logcat" you see some errors. All of them are founded on various "File not Found" Errors. After that I take a look in dmesg and found the message "<6>EXT4-fs (mmcblk1p2): re-mounted. Opts: (null)". The command "mount" told me, that the root system is read only mounted!! Thats the main problem of "all" File not Fround Errors.

You can solv it by editing the init.rc in / of your sd card. Comment out the line 146: "mount rootfs rootfs / ro remount" After that, I think Android will start. (I can't check it, because i have no monitor at the time... :-S)

Another Problem I found are the permission rights on the init Files. So check that the whole filesytem is own by root and the init.* Files and uevent* are only writeable by the owner (chmod 0644).

Greets,

Michael

Try to type "logcat" in console for more details

Hi Jian,

i have stolen a Monitor from a colleague (he is in holiday). My Android is now working. So sasidhar have to edit the init.rc if he would use android without ramdisk.


Greets,

Michael

Hi Michael,

                  I have tried by commenting "mount rootfs rootfs / ro remount" line and its work fine for me. Thank you very much.

Regards,

Sasidhar

No ratings
Version history
Last update:
‎08-06-2012 09:02 AM
Updated by: