← Back to team overview

ubuntu-phone team mailing list archive

Re: [Porting] Need help with porting problems - initrd / mount

 

I spent some time using mako prebuilt images and my Nexus 4.

You need 3 img files, 2 zip files and 2 reboots in recovery mode to get to working system.
I still don't know how to create the zip files - they're not created by standard build and contain tgz.
My next step is to make working recovery (that matches Cyanogen process): having some build problems + headless system.

Copy/paste from https://wiki.ubuntu.com/Touch/Building:


* Install the bootloader, recovery and system images using the android fastboot tool 
adb reboot fastboot fastboot flash recovery saucy-preinstalled-recovery-armel+grouper.img fastboot flash boot saucy-preinstalled-boot-armhf+grouper.img fastboot flash system saucy-preinstalled-system-armel+grouper.img
	* Boot your device into recovery mode 
adb reboot recovery
	* Copy the zip file to the /sdcard/ directory naming it "autodeploy.zip" on the device using adb 
adb push /path/to/your/downloaded/saucy-preinstalled-touch-armel+grouper.zip /sdcard/autodeploy.zip
	* Reboot into recovery mode 
(This will install the file you copied in the previous step) 
adb reboot recovery
	* Make sure you are in recovery mode again for the second step 
	* Get the saucy-preinstalled-touch-armhf.zip file 
	* Copy the zip file to the /sdcard/ directory naming it "autodeploy.zip" on the device using adb 
adb push /path/to/your/downloaded/saucy-preinstalled-touch-armhf.zip /sdcard/autodeploy.zipReboot into recovery mode 





>________________________________
> From: François Leblanc <fleblanc50@xxxxxxxxx>
>To: Dmitry Smirnov <divis1969@xxxxxxxxx> 
>Cc: Ivo Stoyanov <ivostoy@xxxxxxxxx>; ubuntu-phone <ubuntu-phone@xxxxxxxxxxxxxxxxxxx> 
>Sent: Thursday, November 21, 2013 8:52 AM
>Subject: Re: [Ubuntu-phone] [Porting] Need help with porting problems - initrd / mount
> 
>
>
>One main problem is what does exactly phablet-flash do and how can we do same for unsupported yet device?
>
>Dmitry Smirnov <divis1969@xxxxxxxxx> a écrit :
>
>
>Hi,
>
>
>I also have the same problem and I do not yet overcome it (due to some lack of time for this task).
>You can refer https://lists.launchpad.net/ubuntu-phone/msg05006.html to get some more info on it.
>
>
>
>Per my understanding (probably not 100% correct) the process of deploying Ubuntu is the following
>1. It relies on recovery procedure. AOSP/Codeaurora does not have the same recovery procedure as CM, so you will need to do additional changes in it (beyond porting phablet itself). Specifically, some busybox utilities should be integrated into recovery
>2. There are 2 models of deploying/running ubuntu:
>-  first one (older) is using /data/ubuntu folder for the hardware-independent ubuntu filesystem. This model is deprecated and you (most likely) won't be able to use it (it depends on what phablet branch did you ported, I suppose. Since you already see initrd procedure, you use the newer model). Recovery procedure unpacks autodeploy.zip into /data/ubuntu
>- second is using /data/system.img for ubuntu. This system.img seems created by phablet-flash utility by creating some specific script and placing it to /cache partition and running recovery. Probably there is a procedure to convert old model to new one (I did not finish with learning it). The problem with this utility is that it does allow you to work with some predefined/supported devices.
>This new model is also using your built (or original, from stock) system.img (converted to EXT2,3or4) as the android image to be run/used in LXC container. This is accomplished by phablet-flash, I guess.
>
>
>At the moment I'm considering 2 ways to proceed:
>1. Create the ubuntu system.img manually or while building Android parts.
>2. Modify phablet-flash to create the ubuntu system.img for my device.
>
>
>
>
>
>
>
>2013/11/21 Ivo Stoyanov <ivostoy@xxxxxxxxx>
>
>Greetings,
>>
>>
>>I need help related to UT porting to new device. I am not kernel dev and I struggling for 2nd week.
>>
>>
>>
>>I followed the porting guide, I am able to build and boot the kernel.
>>Stuck with some mount/partition problems...
>>
>>
>>My goal is Inforce Computing IFC6410 MSM8960 dev.board.
>>I have working Android 4.1 kernel from IFC and also Nexus4 (mako) device and build to compare to.
>>
>>
>>I see mounting errors during boot.
>>[    6.175919] initrd: mounting /dev/mmcblk0p13
>>[    6.185106] EXT3-fs (mmcblk0p13): error: couldn't mount because of unsupported optional features (40)
>>[    6.252159] EXT2-fs (mmcblk0p13): error: couldn't mount because of unsupported optional features (44)
>>[    6.343262] EXT4-fs (mmcblk0p13): recovery complete
>>[    6.348084] EXT4-fs (mmcblk0p13): mounted filesystem with ordered data mode. Opts: (null)
>>[    6.356233] initrd: Couldn't find a system partition.
>>Couldn't find a system partition. Spawning adbd ...
>>
>>
>>Luckily I can do adb shell - and I see only initrd barebone system.
>>
>>
>>
>>p13 is userdata.img. For some reason the image smaller than I'd expect.
>>
>>
>>Initially I used same partitions as Android but noticed system and usr are too small so I tried to bump them.
>>
>>
>>Here is related part of BoardConfig:
>>
>>
>>BOARD_KERNEL_CMDLINE := console=ttyHSL0,115200,n8 androidboot.hardware=msm8960
>>
>>BOARD_MKBOOTIMG_ARGS := --ramdisk_offset 0x01600000
>>
>># from mako
>>#BOARD_BOOTIMAGE_PARTITION_SIZE := 23068672 # 22M
>>#BOARD_RECOVERYIMAGE_PARTITION_SIZE := 23068672 # 22M
>>#BOARD_SYSTEMIMAGE_PARTITION_SIZE := 880803840 # 840M
>>#BOARD_USERDATAIMAGE_PARTITION_SIZE := 6189744128 #
 5.9G
>>#BOARD_FLASH_BLOCK_SIZE := 131072 # (BOARD_KERNEL_PAGESIZE * 64)
>>
>>TARGET_USERIMAGES_USE_EXT4 := true
>>BOARD_BOOTIMAGE_PARTITION_SIZE := 0x00A00000
>>BOARD_RECOVERYIMAGE_PARTITION_SIZE := 0x00A00000
>>
>>#BOARD_USERDATAIMAGE_PARTITION_SIZE:= 10 737 418 240 # 10G?
>>BOARD_USERDATAIMAGE_PARTITION_SIZE :=  1547436032 # 6189744128
>>TARGET_USERIMAGES_USE_EXT4 := true
>>
>>#BOARD_SYSTEMIMAGE_PARTITION_SIZE := 536870912
>>BOARD_SYSTEMIMAGE_PARTITION_SIZE := 880803840 # 840M
>>
>>BOARD_CACHEIMAGE_PARTITION_SIZE := 33554432
>>BOARD_PERSISTIMAGE_PARTITION_SIZE := 5242880
>>BOARD_TOMBSTONESIMAGE_PARTITION_SIZE := 268435456
>>BOARD_FLASH_BLOCK_SIZE := 131072 # (BOARD_KERNEL_PAGESIZE * 64)
>>
>>BOARD_USES_SECURE_SERVICES := true
>>
>>
>>Any help is appreciated.
>>
>>
>>
>>Thanks-Ivo
>>
>>--
>>Mailing list: https://launchpad.net/~ubuntu-phone
>>Post to     : ubuntu-phone@xxxxxxxxxxxxxxxxxxx
>>Unsubscribe : https://launchpad.net/~ubuntu-phone
>>More help   : https://help.launchpad.net/ListHelp
>>
>>
>
>
>

References