← Back to team overview

ubuntu-phone team mailing list archive

Re: Initrd for X86

 

I added this to the default cmdline using Boardconfig.mk:

datapart=/dev/block/mmcblk0p9 boot=touch debug rw console=tty0,115200n8
no_console_suspend=1

I modify too the init scrip so now it does ln -s /dev/userdata
/dev/block/mmcblk0p9

Neither of this work. And it's supposed that if a data partition is not
found it launch adbd so i can get a shell, and this doesnt happens.

About creating the initrd... yes, i know it and this is the way that we do
(integrated in the build scripts). We use a folder with all files
extracted, made our modifications and the build Makefile create the
ramdisk.img, but we extract the files from
https://launchpad.net/ubuntu/trusty/+package/ubuntu-touch-generic-initrd,
using i386 arch and i'm not really sure that this has been tested, because
by example in this package the conf/arch.conf file has armhf inside it but
the package is for i386. This is why i try to compile the sources of this
package, to make sure that all files are for i386.

Oh, and modify the init by hand doesnt work, because at every build the
package is downloades and the ramdisk re-created using it, so if you create
a ramdisk at hand will be deleted.

---------------------------------------------------------------------------------------------
Que todos esos ceros y unos vayan directamente a tu mierdecilla de teléfono
inteligente y que cualquier inutil sea capaz de suscribirse en 12 segundos *no
es «magia», es sudor y talento.*



On Tue, Mar 18, 2014 at 4:42 PM, Ricardo Salveti de Araujo <
ricardo.salveti@xxxxxxxxxxxxx> wrote:

> On Tue, Mar 18, 2014 at 11:53 AM, Corvus <lcuervo@xxxxxxxxx> wrote:
> > Hello.
> >
> > My name is Luis Cuervo and I am an Android/FFOS engineer.
> >
> > Right now i'm working with a Geeksphone Revolution
> > (http://www.geeksphone.com/) and I get FFOS working on it. It's a X86
> > device. I have all sources needed to build any image but i signed a NDA
> and
> > cant share them :( .
> >
> > I was thinking in porting Ubuntu Touch too so i follow all the
> documentation
> > in Ubuntu Wiki and get it compiled. I have the ubuntu system.img with the
> > android system.img and android ramdisk inside, and get a boot.img with
> the
> > ubuntu ramdisk. I added all the boot parameters (datapart, console,
> etc.) so
> > all might work, but it doesnt boot.
> >
> > With some test that Ricardo Salveti ask me to do i am pretty sure now
> that
> > the problem is with the initrd. Something is not working and i dont know
> > what is it. It doesnt start adbd so i cannot see what is happening but i
> > know that init script is launching because i test changing the adbd
> serial
> > with echo and it changes.
>
> That's good to know at least. And checking the initrd binary, it seems
> adbd is correct in there as well.
>
> My next guess would be that you need to make sure you're actually able
> to mount the data partition, otherwise init will indeed fail.
>
> From the touch script (initrd):
> 42     partlist="userdata UDA DATAFS USERDATA"
> 58     # find the right partition
> 59     for partname in $partlist; do
> 60         part=$(find /dev -name $partname|tail -1)
> 61         [ -z "$part" ] && continue
> 62         path=$(readlink -f $part)
> 63         [ -n "$path" ] && break
> 64     done
> 65
> 66     # override with a possible cmdline parameter
> 67     if grep -q datapart= /proc/cmdline; then
> 68         for x in $(cat /proc/cmdline); do
> 69             case ${x} in
> 70             datapart=*)
> 71                 path=${x#*=}
> 72                 ;;
> 73             esac
> 74         done
> 75     fi
>
> It tries to find a partition with any of that following names
> (userdata, UDA, etc), and if not found, it also tries to grab it from
> the kernel command line. If you know what is your data partition
> already, try giving that to your boot cmdline (might need to change it
> with abootimg).
>
> > I try to compile initrd (the one in launchpad version 0.69) and doesnt
> > finish, because i need i386 arch and i dont have any computer with this
> > architecture and when i try to use a virtual machine (virtualbox) lxc
> daemon
> > doesnt start so it creates a initrd file, but i am not really sure if it
> is
> > correctly created. It doesnt boot anyway :(
>
> You don't need to compile it, you can just extract, change and create
> it again by hand (as described by
>
> http://www.thegeekstuff.com/2009/07/how-to-view-modify-and-recreate-initrd-img/
> ).
>
> Cheers,
> --
> Ricardo Salveti de Araujo
>

Follow ups

References