← Back to team overview

ubuntu-phone team mailing list archive

Re: more than one scripts/touch file??

 

On 9 October 2013 10:45, Patrick Seemann <patsee14@xxxxxxxxx> wrote:
> thanks for the fast answers! I'm starting to get a sense of how things work
> :)
>
> the abootimg tool is indeed a great way to modify the ramdisk, but what do I
> have to do in order to modify the ramdisk that lives in the boot.img file
> inside my device specific .zip "cm-10.1...p4wifi.zip".
>
> Because I just realized that pulling the ramdisk from my data partition and
> modifying it makes no sense, as the touch script fails before even mounting
> the data partition. So the real ramdisk must live inside the boot.img file.
> I know I can use unpackbootimg to extract the ramdisk from the boot.img
> file, but how can I control what goes in there in the first place, when
> compiling a flashable image ?
>
> Using a broken boot.img containing the wrong ramdisk and having to later
> extract it, change it, and repack to everything a new boot.img and putting
> the new boot.img into the cm .zip seems to be the wrong approach^^
>

make bacon (or whatever target / command you use to invoke build)
Update $OUT/ramdisk.img
Remove $OUT/boot.img
Remove $OUT/*.zip
make bacon (or whatever target / command you use to invoke build)

Will rebuild boot.img and *.zip with the new ramdisk.

Regards,

Dmitrijs.


>
>
> On Wed, Oct 9, 2013 at 10:12 AM, Oliver Grawert <ogra@xxxxxxxxxx> wrote:
>>
>> hi,
>> Am Dienstag, den 08.10.2013, 23:29 +0100 schrieb Dmitrijs Ledkovs:
>> > On 8 October 2013 22:12, Patrick Seemann <patsee14@xxxxxxxxx> wrote:
>>
>> > cd $(mktemp -d)
>> > gzip -dc /path/to/ramdisk.img | cpio -ivd
>> > <edit touch/script>
>> > find . | cpio -o -H newc | gzip > ../new-ramdisk.img
>> whee ... how complex ...
>>
>> (make sure to have the abootimg package installed)
>>
>> ogra@anubis:~/Devel/tmp$ abootimg-unpack-initrd initrd.img
>> 77994 blocks
>> ogra@anubis:~/Devel/tmp$ ls ramdisk/
>> bin  conf  etc  init  lib  lib64  run  sbin  scripts
>> ogra@anubis:~/Devel/tmp$ abootimg-pack-initrd
>> initrd.img already exist.
>> ogra@anubis:~/Devel/tmp$ rm initrd.img
>> ogra@anubis:~/Devel/tmp$ abootimg-pack-initrd
>> ogra@anubis:~/Devel/tmp$ ls initrd.img
>> initrd.img
>>
>> ciao
>>         oli
>>
>> --
>> 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
>>
>
>
>
> --
> Patrick Seemann
>
> launchpad: ~patrickseemann
> irc.freenode.net: seepa
>
> --
> 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
>


Follow ups

References