On 09/01/2017 21:20, Frank Kunz wrote:
Am 08.01.2017 um 22:29 schrieb Alexander Graf:
For the gfx command line you may want to add a second console=tty or so?
That did not help so far so solve my login problem. In the mean time I
started to modify the initrd that the /boot/mbrid file does not match.
But no idea yet what could be wrong. I haven't found out where it is set
during the image build process, how to debug that?

The mbrid file gets generated by kiwi when it writes the MBR ID field in
the MBR of the target device. So they really should be in sync. If they
are not, something goes wrong in the u-boot-install/setup scripts.

Also, have you verified that the target device is actually visible from
within the kiwi initrd? Maybe the module is missing?

I modified the initrd init/include scripts to print the device names
that were used for the search run, and the mmcblk0 is there, and some
value is read out. So the driver seems to be ok. The value read from
/boot/mbrid is a different value.

That sounds to me like something is messing with the MBR after it got created. The MBR ID inside the raw image's MBR and the mbrid file are both created by kiwi and usually well aligned.



To verify, just boot with kiwidebug=1 as kernel parameter and you should
get into a shell after kiwi failed to find its boot device.


That is the problem I have. The shell is started on /dev/tty2, but I
need it on the same tty as the serial console is. How can this be
configured?

You should get the terminal on the serial console if the serial console is the default output (console=ttyS0 / ttyAMA0 / whatever only, no console=tty)


Does EFI not work yet or have you not tried?
No, I have not tried yet. Not sure if that will work.

EFI booting makes it much easier to modify things like the kernel
command line. It also allows you to install and select multiple kernel
versions in parallel.

To make use of it, all you need is a valid "$fdtfile" variable in the
U-Boot default environment. Then set the respective define in the
Images.kiwi.in file for your board and you should be set. You might need
to convert the GPT that kiwi generates to an MBR. See existing snippets
in the u-boot scripts for that.


That sounds interesting. I quick tested that by just setting the
environment variable and by that two partitions are generated. First
partition is a EFI-System partition and the second one a Linux
filesystem. This cannot be booted by the soc first stage loader. It
expects a partition with ID 0xa2 that has a header+spl loader. For the
upstream uboot it has to be the first partition on the SD card. How to
add an arbitrary first partition with KIWI oem?

Now it gets tricky. To simplify the code, U-Boot's internal scripts assume that the EFI partition is always the first partition. So we need to keep it there.

What SoC exactly are you targetting? Usually most of them have some way to put the SPL at a magic offset on the SD card.


Alex
--
To unsubscribe, e-mail: [email protected]
To contact the owner, e-mail: [email protected]

Reply via email to