BananaPi BPI-M3 New Image: ArchLinux-4.18.1-1-ARCH 2018-08-19


(Andriy Pankevych) #1

Continuing the discussion from Banana Pi BPI-M3 new image :Arch Linux sunxi kernel-4.18-rc3 and uboot- 2018.01 2018-07-19:

BananaPi-M3-Archlinux-4.18.1-1-ARCH Image for BananaPi-M3 Archlinux Kernel: 4.18.1-1-ARCH U-Boot: 2018.09-rc1

  • U-Boot: 2018.09-rc1
  • Kernel: 4.18.1-1-ARCH
  • SMP works
  • Ethernet works
  • Wifi works
  • HDMI works
  • LCD needs to be checked(I would appreciate if someone can check it)
  • GPIO works(WiringPi)
  • BPI tools included
  • I2C enabled(In TDB file)

Clean CLI only. System is upgraded by 08.19.2018. root/root

Direct download Image link(Updated 08-22-2018):

https://drive.google.com/open?id=1wATkI9v5aWRElMSGDbfZy8jeT4M3toR6

P.S.

Onboard leds do not work properly, solid red led is fine.


Banana Pi BPI-M3 new image :Arch Linux sunxi kernel-4.18-rc3 and uboot- 2018.01 2018-07-19
#2

Well, doesn’t work on BPI-M3 v1.2 Image flashed with Etcher. Display (connected through HDMI) says there is no signal. Ethernet LED was on for a few seconds and then goes dark. No DHCP entry on the router. Any ideas? :confused:


(Andriy Pankevych) #3

I saw the same so I check my HDMI connection on my laptop and then plugged HDMI cable to BPI while it was on.

Try following:

  1. Disconnect HDMI cable.
  2. Power on BPI
  3. Wait for a minute till it boots up
  4. Connect HDMI cable

P.S. Why don’t you use UART to check what is going on?


#4

It didn’t work. I don’t have UART connector… Uh, but wait. I have an Arduino, add some magics and here are logs: https://pastebin.com/V5ckAZp7


(Andriy Pankevych) #5

So u-boot works and kernel boots but there are some errors with root partition. Maybe this is because of Etcher(I use dd) but I don’t beleave this much. Can you try to check root partition on SD card please? e.g.:

$ sudo e2fsck -fy /dev/mmcblk0p2


#6

Sure. e2fsck says:

$ LANG=“en_EN” sudo e2fsck -fy /dev/mmcblk0p2 e2fsck 1.44.3 (10-July-2018) Journal version not supported by this e2fsck. Abort? yes

BPI-ROOT: ********** WARNING: Filesystem still has errors **********

I thought Etcher may be the issue too so I’ve tried to flash another SD card with DD. Both get the same fsck error.


(Andriy Pankevych) #7

This realy is wierd. Here is what I see on my side:

> env LANG=“en_EN” sudo e2fsck -fy /dev/mmcblk0p2
> e2fsck 1.44.3 (10-July-2018)
> Pass 1: Checking inodes, blocks, and sizes
> Pass 2: Checking directory structure
> Pass 3: Checking directory connectivity
> Pass 4: Checking reference counts
> Pass 5: Checking group summary information
> BPI-ROOT: 60078/466032 files (0.6% non-contiguous), 936586/1861376 blocks

I don’t understand why your e2fsck does not understant journal fs but anyway this is not the core issue. I’ll dump the image and upload it again.


(Andriy Pankevych) #8

Can you try this one please:

https://drive.google.com/open?id=1d3rfQ-59jpMutXhDU4JPUewpy2c4IX-Y


#9

No luck with this image too :confused: I’ve flashed it with 2 PCs on 2 different cards. Unmounted SDs cleanly. Same error persists. fsck reports orphaned inodes even just after the flashing. I’ll try with another card on another configuration once more.


(Andriy Pankevych) #10

So simple thing and so many troubles :slight_smile:

Here is what I did:

  1. Umount all file systems

  2. Checked all file systems:

  • e2fsck -vf /dev/mmcblk0p2
  • fsck.vfat /dev/mmcblk0p1
  1. Create image file:

    dd if=/dev/mmcblk0 bs=1M | pv | zip ./ArchLinuxARM-BPI-M3-08-22-2018.img.zip

  2. Create checksum:

    md5sum ./ArchLinuxARM-BPI-M3-08-22-2018.img.zip 514069560c36c2a5d85ddc04fd9ca8b5 ./ArchLinuxARM-BPI-M3-08-22-2018.img.zip

  3. Write image to SD

    unzip -p ./ArchLinuxARM-BPI-M3-08-22-2018.img.zip | pv | dd of=/dev/mmcblk0 bs=10M status=noxfer

  4. Insert SD to BPI and power on. Here is logs:

    https://pastebin.com/APwzfQaE

Image:

https://drive.google.com/open?id=1wATkI9v5aWRElMSGDbfZy8jeT4M3toR6


#11

This one worked lovely! Thanks! Flashed with your exact command. Inserted to BPI and login prompt was waiting. HDMI works, USB works, Ethernet works. I’ve been playing around with pacman and I saw some dmesg logs like

[  224.250427] EXT4-fs warning (device mmcblk0p2): ext4_dirent_csum_verify:354: inode #3197: comm pacman: No space for directory leaf checksum. Please run e2fsck -D.
[  224.265031] EXT4-fs error (device mmcblk0p2): ext4_find_entry:1448: inode #3197: comm pacman: checksumming directory block 0
[  225.640867] EXT4-fs warning (device mmcblk0p2): ext4_dirent_csum_verify:354: inode #4105: comm pacman: No space for directory leaf checksum. Please run e2fsck -D.
[  225.655461] EXT4-fs error (device mmcblk0p2): ext4_find_entry:1448: inode #4105: comm pacman: checksumming directory block 0

And directly from pacman

error: could not open file /var/lib/pacman/local/gc-7.6.6-1/desc: Bad message
error: could not open file /var/lib/pacman/local/linux-armv7-4.18.1-1/desc: Bad message
error: 'linux-armv7-4.18.1-1': description file is missing
error: 'linux-armv7-4.18.1-1': file list is missing
error: 'gc-7.6.6-1': description file is missing
error: 'gc-7.6.6-1': file list is missing

But installed packages seem to work properly.


(Andriy Pankevych) #12

Finally :slight_smile:. Glad to hear this.

Regarding the errors in logs - you can try to re-check the file system and simply re-install these packages. But keep in mind, if kernel will be upgraded or re-installed than tdb file will also be updated and I2C won’t work.


(mic_e) #13

Thanks for the image.

I can confirm that the following works:

  • HDMI
  • Multitouch USB HID (this does not work with Kernel 3.4)
  • Wifi
  • Fast Ethernet

Gigabit Ethernet has a high packet loss rate (> 50%) and is thus unusable.

In order to get 2D acceleration, I installed the packages

odroid-c1-libgl-headers odroid-c1-libgl-x11

which contain a Mali driver.

Initially, the system didn’t boot up at all because it timed out while mounting /boot, for some reason. I worked around this issue by uncommeting that line in /etc/fstab.

I have experimentally determined the GPIO pin assignments in /sys/class/gpio:

- 1: 3V3
- 2: 5V
- 3: GPIO 229
- 4: 5V
- 5: GPIO 228
- 6: GND
- 7: GPIO 362
- 8: GPIO 32
- 9: GND
- 10: GPIO 33
- 11: GPIO 68
- 12: GPIO 35
- 13: GPIO 71
- 14: GND
- 15: GPIO 81
- 16: GPIO 34
- 17: 3V3
- 18: GPIO 360
- 19: GPIO 64
- 20: GND
- 21: GPIO 65
- 22: GPIO 361
- 23: GPIO 66
- 24: GPIO 67
- 25: GND
- 26: GPIO 234
- 27: ID_SD
- 28: ID_SC
- 29: GPIO 82
- 30: GND
- 31: GPIO 202
- 32: GPIO 205
- 33: GPIO 203
- 34: GND
- 35: GPIO 204
- 36: GPIO 133
- 37: GPIO 132
- 38: GPIO 146
- 39: GND
- 40: GPIO 147

(Andriy Pankevych) #14

Thanks for your investigation.

Regarding odroid package, is it really Mali video in BPI M3. Isn’t it PowerVR SGX544MP1? Can you please explain how did you determine GPIO pin assignments?


(mic_e) #15

Regarding the GPU: I have no idea. I simply wildly tried different things until I found something that worked…

Regarding the GPIO pin assignments: I wrote a small Python script which exports all available IO pins, configures them as outputs, then toggles them in a pattern which helps figure out which pin is which.

Basically I connect an LED to one of the pins, then the script toggles one half of all GPIOs, asks me whether the LED was toggled to figure out which half the pin is in, then toggles one half of those, and so on. Classic bisecting. It takes only about 15 seconds to identify the GPIO number that way.


(Andriy Pankevych) #16

Thanks for your input.