maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Alternatives (https://talk.maemo.org/forumdisplay.php?f=36)
-   -   Introducing ubiboot N9 (multiboot OS loader) (https://talk.maemo.org/showthread.php?t=89345)

juiceme 2017-08-17 20:35

Re: Introducing ubiboot N9 (multiboot OS loader)
 
Quote:

Originally Posted by marmistrz (Post 1532792)
Quote:

Originally Posted by juiceme (Post 1532790)
How far do you get, I assume debian starts to at least some extent?
The kernel you are using, did you compile it yourself with all the patches needed to make it work on N9?

That was installed from the repo. 4.9 should have the most needed patches
http://elinux.org/N950

The patches for display were not merged yet, though.

Ooh, I was not aware such a recent kernel has been fixed to work with N9(50)... Maybe I need to try that myself.

How's the init system in your kernel; is it expecting to use systemd or sysvinit? As I presume you are taking some arm debian disk image and integrating that with the elinux kernel?


Quote:

Originally Posted by marmistrz (Post 1532792)
Quote:

Originally Posted by juiceme (Post 1532790)
Easiest is to enable serial console and connect to N9's serial port with minicom; that is pretty much foolproof. Same way you will get kernel logs visible while the device is booting.

and without unscrewing the device? :) I'm a little afraid I'll break my N950.

I don't know about N950 (since I only ever was allowed once to hold @eekkelund's device in my hands for about a minute :p) but in N9 the access to serial port is through the simtray, there is no need to open the device for that :D

Any other way to access the device requires you to have a daemon running in it, which basically means your userland needs to start.
For debugging init problems this is not the optimal strategy :p

[OK, yes there are other ways of course, you could build serial-emulation-for-usb in your kernel, or route kernel logging to audio port or modulate the status led with it... however you probably don't want to know about those methods]

eekkelund 2017-08-17 20:49

Re: Introducing ubiboot N9 (multiboot OS loader)
 
If I am correct the serial port is accessed via 3.5mm headphone plug in N950. So there wouldn't be need to tear phone apart(maybe). But somebody needs to comfirm this. :)

marmistrz 2017-08-17 21:19

Re: Introducing ubiboot N9 (multiboot OS loader)
 
I have journalctl installed, so I think I have the full right to assume it's systemd.

My steps were:
1. Create a partition, setup ubiboot
2. Mount the partition from the ubiboot rescue, follow this guide:
http://blog.lazy-evaluation.net/post...bootstrap.html
3. install the kernel package linux-image-armmp

That's the normal upstream kernel, as provided by Debian.

I guess I have no serial cable...

juiceme 2017-08-17 21:57

Re: Introducing ubiboot N9 (multiboot OS loader)
 
What I meant; what is the debian rootfs you installed to your mmcblk0p4 partition?
When your kernel boots does it find all it needs on the rootfs?

And you still did not answer; how far does the boot go, do you see anything at all on your device screen after ubiboot hands the execution to the debian kernel?

And another thing; have you checked that the debian kernel handles the CPU L2 cache initialization correctly? (See the section 4. of ubiboot README file...)

marmistrz 2017-08-18 16:48

Re: Introducing ubiboot N9 (multiboot OS loader)
 
[QUOTE=juiceme;1532806]What I meant; what is the debian rootfs you installed to your mmcblk0p4 partition?
When your kernel boots does it find all it needs on the rootfs?[/code]
I created an empty ext4 partition and bootstrapped latest Debian Stretch onto it using `debootstrap`.


Quote:

Originally Posted by juiceme (Post 1532806)
And you still did not answer; how far does the boot go, do you see anything at all on your device screen after ubiboot hands the execution to the debian kernel?

I don't know. I have no journal logs in /var/log, even though I use persistent storage mode in journald.conf


Quote:

Originally Posted by juiceme (Post 1532806)
And another thing; have you checked that the debian kernel handles the CPU L2 cache initialization correctly? (See the section 4. of ubiboot README file...)

How can I check it?

Here's my kernel config, I don't really know what to look for: https://pastebin.com/1T9DBbbb

Maybe the problem is that I didn't append the device tree part manually?

n950 2018-03-01 16:56

Re: Introducing ubiboot N9 (multiboot OS loader)
 
I would like to telnet with ubiboot small on my Ubuntu 17.10 i386.
when i run telnet 192.168.2.15 not work.
Unable to connect to remote host...
when i run ifconfig -a i have no usb0 in the list
my n9 is named enp0s29....
Do i need to set up something before run telnet command

wicket 2018-03-01 19:15

Re: Introducing ubiboot N9 (multiboot OS loader)
 
Quote:

Originally Posted by n950 (Post 1541842)
I would like to telnet with ubiboot small on my Ubuntu 17.10 i386.
when i run telnet 192.168.2.15 not work.
Unable to connect to remote host...
when i run ifconfig -a i have no usb0 in the list
my n9 is named enp0s29....
Do i need to set up something before run telnet command

Try the following:

Code:

ifconfig enp0s29 up 192.168.2.1
That ought to bring up the USB interface on the same subnet as the N9.

juiceme 2018-03-02 11:13

Re: Introducing ubiboot N9 (multiboot OS loader)
 
Quote:

Originally Posted by wicket (Post 1541848)
That ought to bring up the USB interface on the same subnet as the N9.

Yes.

0.3.6-tiny is a stripped/limited version that does not have dhcpd enabled.
The tiny version was made specifically for the people who have bad kernel partition so that it can fit in there... It's recommended to use 0.3.7 for everybody else.

wicket 2018-03-02 17:06

Re: Introducing ubiboot N9 (multiboot OS loader)
 
Quote:

Originally Posted by juiceme (Post 1541887)
Yes.

0.3.6-tiny is a stripped/limited version that does not have dhcpd enabled.
The tiny version was made specifically for the people who have bad kernel partition so that it can fit in there... It's recommended to use 0.3.7 for everybody else.

There are versions 0.3.6 and 0.3.7? What??? Where does one even find these? They are not mentioned in the README, nor wiki page, nor can they be found under http://www.swagman.org/juice/ubiboot/ubiboot-02/. I just took ubiboot-02_0.3.5_301013.tar and flashed zImage_2.6.32.54-ubiboot-02-small_060114 as it seemed to be the latest.

If I'm honest, I found the documentation (README and wiki) to be out of date and incomplete. After a lot of pain, I eventually figured it out.

Parts of the README I found confusing:

Quote:

The corresponding "G_OS<x>_<y>_FILE" is the path to the bootable kernel.
Only in the comment in the ubiboot.conf file does it say that the path should be relative to the ubiboot FS but there was nothing to explain the layout of ubiboot FS and no way of knowing the layout without telneting in (which telneting itself may not be obvious to some if they used the "small" kernel which appears to be the latest, as I did).

Quote:

The G_OS<x>_PARTITION and G_OS<x>_NAME identifiers define the partition
where the boot kernels are searched for.
For example, Harmattan kernels are by default located on mmcblk0p2 in the
/boot/ directory, which resolves to "/boot/Harmattan/boot/" in the script.
When you are running Harmattan, this dame directory resolves to /boot/
It's not clear that the "Harmattan" name is taken from the value of G_OS<x>_NAME. Again, I needed to telnet in to understand this properly.

It's not clear that each rootfs should be copied/unpacked to a dedicated partition unless handled by a preinit script. This really confused me. Combined with the problems mentioned above, I incorrectly thought that maybe G_OS<x>_<y>_FILE was being used to specify the rootfs location as well as the kernel.

I don't want to sound like I'm complaining, I just hope this will help others to avoid the problems I had. Although it would also be nice if you would fix the documentation juiceme. ;)

It might also be nice to have a new ubiboot with a recent kernel and recent kexec tools. ;)

EDIT: One more thing, my experience would have been far less painful if ubiboot had printed an error message to tell me that my kernel image was not found before running kexec. I had no idea why it was failing and thought there was a problem with the kernel I built.

juiceme 2018-03-02 18:44

Re: Introducing ubiboot N9 (multiboot OS loader)
 
Ya @wicket!

These are all valid critique points, I admit that I have always been somewhat lazy to document things!
Indeed I should at some point take time to tidy up things a bit... :D:D

The fact is that ubiboot is a bit of work-in-progress-stalled-indefinetely when my attention turned to other things, sadly. I kind of was in the middle of updating some new functionality into it (device charging, wlan set-up, etc...) when I stopped working on it.

Most if not all sources are in my github, except some experimental stuff still in my personal svn repo.


All times are GMT. The time now is 07:08.

vBulletin® Version 3.8.8