foolish question: is it possible to boot an android device from sd card and then load/boot minix ramdisk?

186 views
Skip to first unread message

r0ller

unread,
May 30, 2017, 9:47:21 AM5/30/17
to minix3
Hi All,

First of all sorry for all the lame assumptions and my ignorance in this area but I was just pondering about if it'd be possible at all to pack minix3 on to a properly prepared sd card that could be used to boot an android device as it'd pretend to be a custom ROM (as the android hacker guys say) that actually would prepare and load a minix3 ramdisk. So it'd be kind of a two step boot: 1) custom android ROM 2) minix3 from ramdisk. The first thing I learned when googling around was that custom ROMs need a properly partitioned sd card using at least ext2. That may be important after minix3 is successfully booted as in order to access further stuff on the sd card, minix3 must be able to mount/read/write the fs and as far as I know ext2 partitions can be mounted w/o problems by minix3 but ext3 or ext4 not. How far would minix3 get at all with the boot? I know that a lot depends on the device/hw but still. Any comments/ideas/thoughts are welcome:)

Best regards,
r0ller

Jean-Baptiste Boric

unread,
May 30, 2017, 12:30:14 PM5/30/17
to minix3
Hi,

(Note: I won't mention all the hard-coded stuff inside the kernel and other things that currently expect a BeagleBoard-class board, so I'm assuming we're three months into the future, when Nikita's work would be merged and we'd have proper multi-board vendor support for ARM.)

If you just craft an image the device's bootloader would understand (which would load everything in memory, create the relevant boot info data and pass execution to the kernel), the boot process will hang inside set_machine_id() in pre_init.c since the kernel doesn't recognize what it is running on top of.

If you add a BSP (Board Support Package) for your Android device in the kernel, then init will hang because tty doesn't have a driver for your board.

Filling the missing pieces in tty (I presume there are test points for an UART you can connect to on the device's motherboard), you should reach a point where the rc script in the ramdisk will be executed. Assuming you exec() a shell before things go wrong, you will effectively land inside the ramdisk with an interactive shell prompt.

Now, the default ramdisk has just enough stuff in it to mount the root partition and pass execution to it, so there's not much to do. You can add stuff to the ramdisk, but you'll need to start writing drivers to do interesting stuff.

What I've succinctly described is basically the first steps to create a MINIX port to an unsupported ARM board family where everything goes A-OK. Obviously, in the real world Murphy's Law is a cruel mistress.

r0ller

unread,
May 30, 2017, 5:53:33 PM5/30/17
to minix3
Hi Jean-Baptiste,

If I got it right, then the best bet would be to take e.g. a Mediatek developer board that is as close as possible to an existing Mediatek SoC based mobile phone and start tinkering with that, right? Like the hw of the phones listed at:



Unfortunately, I'm quite far from being an os developer but I just like the idea of putting minix3 work on a mobile:)

Thanks & regards,
r0ller

bertbr...@googlemail.com

unread,
May 31, 2017, 6:36:58 AM5/31/17
to minix3
from my POV, its more promising to have support for the DragonBoard 410c, if you wanna target a mobile device. It comes with a SnapDragon 410c chipset, which is pretty near to most of the mobiles being out there (the difference between Snapdragon 410 and Snapdragon 800er series is not so big!). 

r0ller

unread,
Jun 1, 2017, 2:36:32 AM6/1/17
to minix3
Hi,

Ok, thanks for the hint. I'll need to dig deeper in this maybe first by asking a question in the android hacking forums of the xda-developers site. Before jumping into this, I'd really need to make sure that I don't have to port twice:) Actually, the neo900 would be the easiest option as it's just a beagleboard afaik but it's ~500Eur.

Regards,
r0ller

r0ller

unread,
Sep 11, 2017, 3:52:24 AM9/11/17
to minix3
Hi All,

Nothing peculiar, just a public paper on investigating porting android to minix3;)


Regards,
r0ller

r0ller

unread,
Sep 11, 2017, 6:56:09 AM9/11/17
to minix3
This seems to be the repo on github (which I forked in order that it does not get lost) that belongs to the paper, using pandaboard for the implementation:


Regards,
r0ller
Reply all
Reply to author
Forward
0 new messages