Hi,

after years of just ignoring openSUSE for rpi, and using
yocto/openembedded, I thought I'd try it again. After all, I could even
get support for it on raspi3 (which I do not yet have) ;-)

It is still broken the same as when I last tried.

The reason when booted normally, as almost everyone does, start.elf
reads config.txt, configures the hardware according to it *and passes
some customized boot parameters to the kernel*.

Example (on a working yocto/OE-build, but raspbian does the same):

root@raspi02:~# cat /proc/cmdline
dma.dmachans=0x7f35 bcm2708_fb.fbwidth=640 bcm2708_fb.fbheight=480
bcm2708.boardrev=0xe bcm2708.serial=0x6xxxxxxx
smsc95xx.macaddr=B8:27:EB:A9:00:DE bcm2708_fb.fbswap=1
sdhci-bcm2708.emmc_clock_freq=250000000 vc_mem.mem_base=0x1fa00000
vc_mem.mem_size=0x20000000  dwc_otg.lpm_enable=0 console=ttyAMA0,115200
kgdboc=ttyAMA0,115200 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait
console=tty0

now some of these are static, namely
root@raspi02:~# strings /media/mmcblk0p1/start.elf|grep root=
console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1
root=/dev/mmcblk0p2 rootfstype=ext4 rootwait

but others are dynamic, and filled in by start.elf
root@raspi02:~# strings /media/mmcblk0p1/start.elf|grep ^dma\\.
dma.dmachans=0x%x bcm2708_fb.fbwidth=%d bcm2708_fb.fbheight=%d
bcm2708.boardrev=0x%x bcm2708.serial=0x%x
root@raspi02:~# strings /media/mmcblk0p1/start.elf|grep vc_mem\\.
 vc_mem.mem_base=0x%x vc_mem.mem_size=0x%x

The worst part of this is, that the serial number and the mac address
are not set. The NIC comes up with a random mac address and the raspi
gets a new IP address on every boot. Not nice.

So what's needed to fix this?

Due to the convoluted way openSUSE does boot, the command line needs to
be passed from start.elf to u-boot (easy, see below), then from u-boot
to grub2-efi (here I gave up) and then in grub.cfg to the kernel.

I have a patched, working u-boot-rpi2 in
https://build.opensuse.org/package/show/home:seife:branches:Base:System/u-boot-rpi2

(this is a proof of concept patch, it exports the command line as
"bootargs_orig" variable to the u-boot shell)

I'm back to openembedded on the raspis for now, will check if SLES12-SP2
is really sold with this bug too, once I get my hands on an raspberrypi3 :-)

have fun,
        seife
-- 
Stefan Seyfried

"For a successful technology, reality must take precedence over
 public relations, for nature cannot be fooled." -- Richard Feynman
-- 
To unsubscribe, e-mail: opensuse-arm+unsubscr...@opensuse.org
To contact the owner, e-mail: opensuse-arm+ow...@opensuse.org

Reply via email to