Alpine on Wandboard Revision B1

5 posts / 0 new
Last post
#1 Sun, 2017-08-13 16:50
Iodun
  • Iodun's picture
  • Offline
  • Last seen: 7 months 22 hours ago
  • Joined: 2017-08-13

I am trying to install Alpine Linux on my Wandboard RevB1, but so far it just won't boot.
Based on the Alpine Wiki it should work though: imx6q-wandboard-revb1
https://wiki.alpinelinux.org/wiki/Alpine_on_ARM

# 1. Created the partition table and partition on the SD card

Command (m for help): p
Disk /dev/mmcblk0: 30 GiB, 32227983360 bytes, 62945280 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x00000000

Device Boot Start End Sectors Size Id Type
/dev/mmcblk0p1 * 2048 2099199 2097152 1G c W95 FAT32 (LBA)

# 2. Formated the partition with FAT
mkfs.fat /dev/mmcblk0p1

# 3. Mounted the partition and copied the Alpine files
noroot@visxha2 /run/media/noroot/5DC9-3AF2 $ ls -al
total 24
drwx------ 6 noroot users 4096 Jan 1 1970 .
drwxr-x---+ 3 root root 60 Aug 13 16:07 ..
-rw-r--r-- 1 noroot users 612 Jun 17 11:47 alpine.apkovl.tar.gz
drwx------ 3 noroot users 4096 Jun 17 11:47 apks
drwx------ 3 noroot users 4096 Jun 17 11:47 boot
drwx------ 2 noroot users 4096 Jun 17 11:47 extlinux
drwx------ 10 noroot users 4096 Jun 17 11:47 u-boot

# 4. Unmounted the partition and installed SPL and u-boot.img as stated in the README.txt
dd if=wandboard/SPL of=/dev/mmcblk0 bs=1k seek=1
dd if=wandboard/u-boot.img of=/dev/mmcblk0 bs=1k seek=69
sync

# 5. Inserted the SD card into my Wandboard and tried to boot
I put the SD card into the correct slot on the CPU Board (not the Baseboard with the connectors).
When pluging in the power connector I can see a Wandboard Logo on the connected HDMI Monitor for a few seconds.
Then the Monitor goes into Standby and nothing further happens.
I tried to connect the serial port, but there also isn't any output at all.

What am I doing wrong?
Is there anyone with a working Alpine on Wandboard setup?

Thanks a lot,
Benni

Wed, 2017-08-30 20:57
Iodun
  • Iodun's picture
  • Offline
  • Last seen: 7 months 22 hours ago
  • Joined: 2017-08-13

Finally I got some output on the serial port:

U-Boot SPL 2017.01 (Apr 28 2017 - 05:22:06)
Trying to boot from MMC1
 
U-Boot 2017.01 (Apr 28 2017 - 05:22:06 +0000)
 
CPU:   Freescale i.MX6Q rev1.2 at 792 MHz
Reset cause: POR
Board: Wandboard rev B1
I2C:   ready
DRAM:  2 GiB
MMC:   FSL_SDHC: 0, FSL_SDHC: 1
*** Warning - bad CRC, using default environment
 
auto-detected panel HDMI
Display: HDMI (1024x768)
In:    serial
Out:   serial
Err:   serial
Net:   FEC [PRIME]
Hit any key to stop autoboot:  0 
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
Found /extlinux/extlinux.conf
Retrieving file: /extlinux/extlinux.conf
reading /extlinux/extlinux.conf
221 bytes read in 15 ms (13.7 KiB/s)
1:	Linux hardened
Retrieving file: /boot/initramfs-hardened
reading /boot/initramfs-hardened
5571666 bytes read in 287 ms (18.5 MiB/s)
Retrieving file: /boot/vmlinuz-hardened
reading /boot/vmlinuz-hardened
3466104 bytes read in 186 ms (17.8 MiB/s)
append: modules=loop,squashfs,sd-mod,usb-storage quiet 
Retrieving file: /boot/dtbs/imx6q-wandboard-revb1.dtb
reading /boot/dtbs/imx6q-wandboard-revb1.dtb
33296 bytes read in 60 ms (541 KiB/s)
## Flattened Device Tree blob at 18000000
   Booting using the fdt blob at 0x18000000
   Using Device Tree in place at 18000000, end 1800b20f
 
Starting kernel ...

And there its getting stuck forever.
I will keep this thread updated, when I figured out whats wrong.

Wed, 2017-08-30 21:40
Iodun
  • Iodun's picture
  • Offline
  • Last seen: 7 months 22 hours ago
  • Joined: 2017-08-13

Checked all supported Alpine versions:

Alpine 3.3.3
* WORKS!
* No HDMI Output

Alpine 3.4.6
* WORKS!
* No HDMI Output

Alpine 3.5.2
* Empty u-boot directory!
* https://bugs.alpinelinux.org/issues/7181

Alpine 3.5.2 with U-Boot 2015.04 from Alpine 3.4
* Stuck at "Starting kernel ..."

Alpine 3.5.2 with U-Boot 2017.01 from Alpine 3.6
* Stuck at "Starting kernel ..."

Alpine 3.6.2
* Stuck at "Starting kernel ..."

Thu, 2017-08-31 01:33
Iodun
  • Iodun's picture
  • Offline
  • Last seen: 7 months 22 hours ago
  • Joined: 2017-08-13

Finally I can tell exactly what is going on:
1) HDMI output does not work at all on my Wandboards, so its impossible to login via display and keyboard.
2) Serial console output has been disabled since Alpine 3.5 (no idea why), so its impossible to login via serial console.
3) Alpine does not use its network interfaces by default, so there is no DHCP and no IP and you obviously can't login via SSH.

That leaves us with no single sign that Alpine has been booted properly... although its actually working... :D
The solution is to fix any (or multiple) of the 3 communication channels listed above.

So far I managed to enable the serial console again, what in turn allows you to setup and use SSH.
This can be achieved by changing boot options in the exlinux.conf, but first lets see what changed in the past:

Alpine 3.4.6 VS. Alpine 3.5.2

0a1,4
> TIMEOUT 20
> PROMPT 1
> DEFAULT grsec
> 
2,7c6,10
<   MENU DEFAULT
<   MENU LABEL Linux grsec
<   LINUX /boot/vmlinuz-grsec
<   INITRD /boot/initramfs-grsec
<   DEVICETREEDIR /boot/dtbs
<   APPEND BOOT_IMAGE=/boot/vmlinuz-grsec modules=loop,squashfs,sd-mod,usb-storage modloop=/boot/modloop-grsec console=${console}
---
> MENU LABEL Linux grsec
> KERNEL /boot/vmlinuz-grsec
> INITRD /boot/initramfs-grsec
> DEVICETREEDIR /boot/dtbs
> APPEND modules=loop,squashfs,sd-mod,usb-storage quiet 

Alpine 3.5.2 VS. Alpine 3.6.2

3c3
< DEFAULT grsec
---
> DEFAULT hardened
5,8c5,8
< LABEL grsec
< MENU LABEL Linux grsec
< KERNEL /boot/vmlinuz-grsec
< INITRD /boot/initramfs-grsec
---
> LABEL hardened
> MENU LABEL Linux hardened
> KERNEL /boot/vmlinuz-hardened
> INITRD /boot/initramfs-hardened

The problem is that console=${console} has been replaced with quiet since Alpine version 3.5.
Fixing that is pretty easy of course and the following extlinux.conf works properly with Alpine 3.6:

TIMEOUT 20
PROMPT 1
DEFAULT hardened
 
LABEL hardened
MENU LABEL Linux hardened
KERNEL /boot/vmlinuz-hardened
INITRD /boot/initramfs-hardened
DEVICETREEDIR /boot/dtbs
APPEND modules=loop,squashfs,sd-mod,usb-storage console=${console}

Next step is to figure out why HDMI output isn't working at all.

Wed, 2017-09-20 18:02
ReproducibleBui...
  • ReproducibleBuildsAreAGoodStandard's picture
  • Offline
  • Last seen: 1 month 3 weeks ago
  • Joined: 2017-05-05

I am using a laptop with Radeon graphics and the current standard Alpine release 3.6.2, and in case it could help, I wonder whether passing on a parameter into the bootloader (which is syslinux on Alpine, not grub) similar to radeon.audio=1 might help:
https://community.linuxmint.com/tutorial/view/1051
http://zeroset.mnim.org/2013/11/17/sound-over-hdmi-with-amdati-radeon-hd-543054505470-on-ubuntu/
https://help.ubuntu.com/community/RadeonDriver
Mind you, it didn't help me to get alsamixer to display level handles for my HDMI audio card, as it only says 'S/PDIF' level '00', but on my previous install I did manage to get sound to play (not this way though, but somehow) through my HDMI TV monitor (video works fine).

Log in or register to post comments