PINE64
Android kernel booting - Printable Version

+- PINE64 (https://forum.pine64.org)
+-- Forum: PINE A64(+) (https://forum.pine64.org/forumdisplay.php?fid=4)
+--- Forum: Linux on Pine A64(+) (https://forum.pine64.org/forumdisplay.php?fid=6)
+--- Thread: Android kernel booting (/showthread.php?tid=289)

Pages: 1 2 3


Android kernel booting - drag00n - 02-13-2016

I am extracting boot img from partition 9 of the sdcard, extracted it and indicated the ramdisk to load /sbin/init from main partition.
I repackaged it, dd'd to the partition again and booted, but it boots flawlessly again. No need to say that i was expecting to see a panic on the serial console, because /sbin/init doesnt exist.

Can anyone confirm that the main kernel is on sdX9 of the sdcard? Or is it the recover partition?
Or maybe it boots from recover whenever an error arises?

I already got a debootstrapped linux ready to copy, but i was expecting to have this ready before...

Thanks in advance.
Drag00n


RE: Android kernel booting - patrickhwood - 02-13-2016

I think that's recovery. Try sdX6.

I got the android kernel to boot Ubuntu 14.04, but only serial console for now. The disp and hdmi modules load, but my monitor doesn't detect a signal.


RE: Android kernel booting - drag00n - 02-13-2016

Thanks, I'll try later and will post some info...


RE: Android kernel booting - drag00n - 02-14-2016

Yep, indeed... Partition 9 was recover... I missed the bootargs [FACE WITH COLD SWEAT].
So the good one is sdX6

partitions=bootloader@mmcblk0p2:env@mmcblk0p5:boot@mmcblk0p6Confusedystem@mmcblk0p7:misc@mmcblk0p8:recovery@mmcblk0p9:cache@mmcblk0p10:metadata@mmcblk0p11:private@mmcblk0p12:alog@mmcblk0p13:UDISK@mmcblk0p1

Also i had to edit to enforcing=0 as my debootstrapped jessie had no selinux... I'll post any advance just in case anyone cares


RE: Android kernel booting - patrickhwood - 02-14-2016

(02-14-2016, 03:45 AM)drag00n Wrote: Yep, indeed... Partition 9 was recover... I missed the bootargs [FACE WITH COLD SWEAT].
So the good one is sdX6

partitions=bootloader@mmcblk0p2:env@mmcblk0p5:boot@mmcblk0p6Confusedystem@mmcblk0p7:misc@mmcblk0p8:recovery@mmcblk0p9:cache@mmcblk0p10:metadata@mmcblk0p11:private@mmcblk0p12:alog@mmcblk0p13:UDISK@mmcblk0p1

Also i had to edit to enforcing=0 as my debootstrapped jessie had no selinux... I'll post any advance just in case anyone cares
Where are the bootargs stored?

EDIT: never mind; I found them in partition 5. Looks like this has a header and checksum.


RE: Android kernel booting - drag00n - 02-14-2016

Yes, part5, but no cksums... I hex edited it and worked [FACE WITH TEARS OF JOY]

Well, my box works with 3.10... I have to test hdmi, WiFi and so... Tty stops working but i have no inittab so ill add it to rc.local until i realize a way to do it properly with systemd, so new to me...eth100 working, later ill try to use 1000 but should be the same.
Also surprised with temperature... Android burned my finger when idle, and with linux i can barely tell if it is powered on...

Talk later..
Drag00n


RE: Android kernel booting - patrickhwood - 02-14-2016

(02-14-2016, 12:51 PM)drag00n Wrote: Yes, part5, but no cksums... I hex edited it and worked [FACE WITH TEARS OF JOY]

Well, my box works with 3.10... I have to test hdmi, WiFi and so... Tty stops working but i have no inittab so ill add it to rc.local until i realize a way to do it properly with systemd, so new to me...eth100 working, later ill try to use 1000 but should be the same.
Also surprised with temperature... Android burned my finger when idle, and with linux i can barely tell if it is powered on...

Talk later..
Drag00n

I think you might notice that the environment has reset to the default one rather than taking it from partition 5 after you modified it.  Are you getting the uboot countdown from 3 now?  bootdelay is set to 0 in the environment on the SD partition, which disables it.


RE: Android kernel booting - drag00n - 02-14-2016

(02-14-2016, 03:32 PM)patrickhwood Wrote:
(02-14-2016, 12:51 PM)drag00n Wrote: Yes, part5, but no cksums... I hex edited it and worked [FACE WITH TEARS OF JOY]

Well, my box works with 3.10... I have to test hdmi, WiFi and so... Tty stops working but i have no inittab so ill add it to rc.local until i realize a way to do it properly with systemd, so new to me...eth100 working, later ill try to use 1000 but should be the same.
Also surprised with temperature... Android burned my finger when idle, and with linux i can barely tell if it is powered on...

Talk later..
Drag00n

I think you might notice that the environment has reset to the default one rather than taking it from partition 5 after you modified it.  Are you getting the uboot countdown from 3 now?  bootdelay is set to 0 in the environment on the SD partition, which disables it.

Oh my, you're totally right...

I missed the line:
*** Warning - bad CRC, using default environment

So I got very lucky that default goes with selinux disabled...

And yes, now I can enter sunxi prompt from u-boot. (before I was thinking I was too slow to hit anything...)

Sorry, but I'm relatively new to ARM devices and bootloaders, be patient with me Wink

Thanks for the point.

drag00n

PS: Can I find somewhere good info about how u-boot works? I am totally blind about it and would like to know more...


RE: Android kernel booting - patrickhwood - 02-14-2016

See http://www.denx.de/wiki/U-Boot

Note that the android uboot is a little different than the mainline, and Allwinner's a bit different from the android one.

To update the environment, there's a tool that comes with uboot called mkenvimage. It's built as part of uboot in tools/mkenvimage. Just create an ascii file with key=value settings, one per line, and do

mkenvimage -s 131072 u-boot.env.txt -o /dev/sdb5


RE: Android kernel booting - drag00n - 02-15-2016

I'll take a look. Thanks!!!