ubuntu-phone team mailing list archive
-
ubuntu-phone team
-
Mailing list archive
-
Message #07004
Re: Initrd for X86
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