kernel– 如何修改Android引导顺序以便从SD卡引导

kernel– 如何修改Android引导顺序以便从SD卡引导,第1张

概述我一直在研究如何从SD卡启动Android.这是带有说明的帖子:Victory!Itooksdbags’sstockzip(4.3)andextracteditonmycomputer.Iusedunmkbootimgtoextracttheinitramfs.gzandkernel.gzfromtheboot.imgintheROM.Iunzippedtheinitramfsandun-cpio’

我一直在研究如何从SD卡启动Android.
这是带有说明的帖子:

Victory!

I took sdbags’s stock zip (4.3) and extracted it on my computer. I used unmkbootimg to extract the initramfs.gz and kernel.gz from the boot.img in the ROM. I unzipped the initramfs and un-cpio’d it, then modifIEd macallan.fstab to refer to /dev/block/mmcblk1p1 for /data, p2 for /system, and p3 for /cache. I also modifIEd init.macallan.rc to avoID having it try to make filesystems on the emmC — I want it not to try touching the emmC at all.

Next I rebuilt the initramfs.gz. I bought a good quality class 10 microsd and partitioned it on my computer with 3 primary partitions, one for /data, one for /system, and one for /cache (about 2GB and 1GB for /system and /cache). I made ext4 filesystems on all 3 partitions, mounted p2, and copIEd the rom over and installed it by hand using the updater-script as a guIDe. Then I unmounted and popped the SD card into my TF701t.

To boot it, I put my tablet into fastboot mode. I booted the kernel and ramdisk using ‘fastboot boot’ — no need for kexec from recovery. I can do this without any reliance whatsoever on the internal emmC. It took awhile to boot up, but it booted first try. The app drawer was a bit slow to come up, but I’m pretty happy I get to use my tablet at all! This whole process turned out to be MUCH easIEr than I expected it would be, and I’m quite confIDent I Could do this to boot any ROM I wanted. I only use stock because of driver issues with my bluetooth keyboard.

Still willing to try my hand at maintaining cromi’s ROM2SD branch though

Thanks everyone for all of your help!

然后有更详细的说明here:

To answer your question, I don’t kNow. My method works for booting because I changed the ROM’s IDea of what device/partition /system and /data live on. I don’t kNow where your device holds its IDea of which partition holds the radio firmware. If it’s somewhere in the initramfs, then you can modify it in the same way I modifIEd mine and tell it to load the radio off of the external SD. If the ROM is hardcoded to look for the radio on the internal SD, then you may be screwed.

A quick note on the initramfs for those curIoUs: the initramfs (initrd, initramdisk, etc) is a compressed miniature linux filesystem holding the bare essentials necessary to get a linux system running. The initrd’s job is to figure out where the filesystem(s) are that hold the actual linux installation, mount them, and hand over control to that linux system.

It’s not absolutely necessary to use an initrd to boot a linux system, but it makes it a lot easIEr because you can load drivers, prepare the filesystem, etc. The stock ROM for the TF701t (and I’m assuming most, if not all ROMs for all androID devices) use an initrd to mount /system, /data, and any other necessary partitions. I’m just telling it to mount those from my external SD instead of internal.

I don’t kNow how radio partitions work. Is it just a raw firmware image on the partition, or is it an ext4 (or other) filesystem with a firmware binary file on it? The latter case might mean the initrd mounts the radio firmware along with everything else it does before handing over control to androID, so it might mean you can change it to a partition on the external card.

我不太明白,我希望能够进行一些细化,因为这似乎与linux *** 作系统(inramfs.gz,kernel.gz和一般的启动过程)有类似的处理.

解决方法:

我真的不知道从SD卡启动的标准方式,它是否容易取决于您使用的AndroID设备:

例如,如果你有一个Nexus设备,你可以从Play商店下载MultiROM,你很高兴.它通常从未如此简单;我目前正试图让我的基于Mediatek MT6575的设备从SD卡启动,因为内部emmC内存已经死了,还没有管理它,所以我想现在它已经’砖了’.

我在这里要说的是,没有逐步指南可以与所有设备一起使用,因为有大量设备,每个设备都有不同的分区布局,内核等.

我将提供一些关于如何从SD启动几个不同设备的示例,希望您能够看到所涉及的内容,如果您说出您拥有的设备,我可能会遇到该设备的工作方法.

Boot Android from SdCard wiki – 这是’sunxi’安卓平板电脑的网站,但信息很有用,因为它包含有关编辑恢复和启动分区的信息,即使SD卡图像只能在sunxi平板电脑上运行.

Use SD instead of eMMC on GS3 – 逐步介绍如何对SD卡进行分区和编辑boot.img.我在我的MT6575上尝试过这种方法,但只是更改fstab上的信息是不够的,它仍然试图从emmC启动我的设备,但如果你有GS3,这是理想的.

Multiboot for MediaTek devices – 如何在内部emmC上安装1个ROM,在SD卡上安装第二个ROM.如果您有一个mediatek设备,可以一步一步地提供.

Convert ROM to boot from SD card – 考虑到诺基亚X2,但我现在要通过这种方法,立即安装两个系统分区,SD系统分区的挂载点是/ system-ext

这就是我现在所拥有的,如果您设法从SD启动,请发表评论,说明您使用的方法和使用的设备,谢谢. 总结

以上是内存溢出为你收集整理的kernel – 如何修改Android引导顺序以便从SD卡引导全部内容,希望文章能够帮你解决kernel – 如何修改Android引导顺序以便从SD卡引导所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/web/1111979.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-29
下一篇 2022-05-29

发表评论

登录后才能评论

评论列表(0条)

保存