Group: Hardware/Computers/Laptops/Freeable laptops/Hercules eCAFE
(Created page with "== Introduction == Hercules made the following laptops with an I.MX51 ARM system on a chip: * eCAFE EX HD * eCAFE slim HD Here are some more information on the hardware: * 5...") |
m (GNUtoo moved page Group:Hardware/Computers/Laptops/Hercules eCAFE to Group:Hardware/Computers/Laptops/Freeable laptops/Hercules eCAFE: verified to boot with fully free software (see the page).) |
||
(34 intermediate revisions by the same user not shown) | |||
Line 6: | Line 6: | ||
Here are some more information on the hardware: | Here are some more information on the hardware: | ||
− | * 512M of RAM | + | * 512M of RAM which is soldered. It's also probably the maximum ammount of RAM supported by the I.MX51. |
* There is an USB OTG port | * There is an USB OTG port | ||
* The device is capable of booting from an SD card | * The device is capable of booting from an SD card | ||
+ | * The device has a glossy display ([https://en.wikipedia.org/wiki/Glossy_display#Adverse_health_effects glossy displays are dangerous for the health]) | ||
+ | * The eCAFE EX HD has an HDMI port, which enables to use an external display that is not glossy. | ||
They ship with u-boot, and more recent u-boot versions have been maintained by the free software and open source communities. | They ship with u-boot, and more recent u-boot versions have been maintained by the free software and open source communities. | ||
There is also a device tree available but it needs to be upstreamed in Linux. | There is also a device tree available but it needs to be upstreamed in Linux. | ||
− | Once that will be upstreamed, it will be possible to use them with only free software, with u-boot and Parabola, but it will still have some [https://www.fsf.org/resources/hw/single-board-computers serious flaws] as important features like the | + | Once that will be upstreamed, it will be possible to use them with only free software, with u-boot and Parabola, but it will still have some [https://www.fsf.org/resources/hw/single-board-computers serious flaws] as important features like the WiFi and accelerated video decoding will still be missing. |
+ | |||
+ | The 3D acceleration doesn't work: The I.MX51 and I.MX53 can use the adreno driver but there is no free firmware. This creates various issues (like lightdm and sddm crashing), so the best way to deal with it is to try to remove the 'msm' driver from the kernel or disable it at runtime before starting lightdm with the following command (as root): | ||
+ | echo msm > /sys/class/drm/card0/device/driver/unbind | ||
+ | |||
+ | In Parabola I tried to add module_blacklist=msm to the kernel command line but the msm driver is builtin so it has no effect, so for now we need to do the commands above to get desktop environment working. | ||
+ | |||
+ | == Source code == | ||
+ | |||
+ | Some patches for Linux (including the dts) and u-boot did exist as part of [https://gitlab.com/shagu/meta-teapot meta-teapot]. | ||
+ | |||
+ | == Hardware documentation == | ||
+ | |||
+ | === UART === | ||
+ | |||
+ | There is an unpopulated connector for the serial port with UART1 being written under it. | ||
+ | |||
+ | There is an arrow on the left of the connector. Here's the pinout. | ||
+ | > [?][TX?][][][RX][GND][GND][GND] | ||
+ | |||
+ | The [https://www.ti.com/lit/ds/symlink/max3232e.pdf MAX3232] that is nearby most probably provides the 5V voltage compatible with common USB serial port adapters. | ||
+ | |||
+ | Status: | ||
+ | * RX works (115200 8N1 at boot => We can see u-boot logs) | ||
+ | * TX unknown | ||
+ | |||
+ | === JTAG === | ||
+ | There is an unpopulated connector with "JTAG" being written on it. I didn't test it. | ||
+ | |||
+ | == Booting == | ||
+ | To boot you need: | ||
+ | * To install a bootloader on a microSD, the internal eMMC, or to load it through USB | ||
+ | * To install Parabola (or another FSDG distribution) on a (micro)SD card. | ||
+ | |||
+ | === hardware information === | ||
+ | * The SD slot that is used during boot is located on the side of the laptop. | ||
+ | * The switch to boot on the SD changes the bootorder and makes the bootrom loads the bootloader from the SD slot that is on the side. This has been verified by looking at the serial port logs. It's also documented in the recovery manual. | ||
+ | |||
+ | === Installing parabola on an SD card === | ||
+ | To install Parabola on a SD (or microSD with a microSD<->SD adapter): | ||
+ | * Make sure that the microSD to SD card adapter/SD card switch isn't set to write protect | ||
+ | * Install Parabola ARM on a SD/microSD as usual with only one ext4 partition | ||
+ | |||
+ | Then u-boot will boot on the SD/microsd. It will look for the following files: | ||
+ | * /boot/extlinux/extlinux.conf which must contains an extlinux configuration file | ||
+ | * /boot/dtbs/linux-libre/mx5-mx51_na04.dtb which must contain the dtb (the location needs to be fixed to be /boot/dtbs/linux-libre/mx51_na04.dtb instead). | ||
+ | |||
+ | To compile mx5-mx51_na04.dtb you can use the following repository: https://framagit.org/GNUtoo/dts/-/tree/hercules-ecafe/v5.1-dts-raw | ||
+ | |||
+ | As for the extlinux.conf, beside adding console=ttymxc0,115200 the rest is pretty much standard and the documentation about it can be found in the Parabola ARM installation instructions on the Parabola wiki. Here's an example: | ||
+ | menu title Welcome to U-Boot with Extlinux support! | ||
+ | |||
+ | timeout 1 | ||
+ | |||
+ | label Parabola GNU/Linux-libre, linux-libre kernel | ||
+ | kernel /boot/vmlinuz-linux-libre | ||
+ | append rootwait loglevel=8 rw console=ttymxc0,115200 root=/dev/mmcblk1p1 | ||
+ | fdtdir /boot/dtbs/linux-libre | ||
+ | initrd /boot/initramfs-linux-libre.img | ||
+ | |||
+ | === Building u-boot === | ||
+ | * Build a dirty fork of u-boot for this devices from https://framagit.org/GNUtoo/u-boot/-/tree/gnutoo/hercules-ecafe/u-boot-v2019.01-dirty | ||
+ | |||
+ | === Adding u-boot to an SD card === | ||
+ | To boot u-boot from the microSD/SD | ||
+ | * Make sure that the microSD to SD card adapter/SD card switch isn't set to write protect | ||
+ | * Install u-boot on the microSD/SD: | ||
+ | dd if=u-boot.imx of=/dev/sdc bs=512 seek=2 conv=fsync | ||
+ | * Make sure that the switch is set to boot on the external SD slot | ||
+ | * Open the screen (it can't boot otherwise) | ||
+ | * plug the power | ||
+ | * Put the microSD inside | ||
+ | * Press the power button | ||
+ | |||
+ | === Loading u-boot from USB === | ||
+ | Alternatively, you can also just load the bootloader from USB. | ||
+ | |||
+ | To do that: | ||
+ | * Make sure that the switch is set to boot on the external SD and that there are no bootloaders on the microSD/SD | ||
+ | * Open the screen (it can't boot otherwise) | ||
+ | * plug the power | ||
+ | * Start pressing the power button | ||
+ | * Connect an USB cable between the eCafe and another computer | ||
+ | * From another computer, run sudo imx_usb ./u-boot.imx | ||
+ | |||
+ | === During boot === | ||
+ | |||
+ | At boot the display will be black most of the time, so if you don't have an UART soldered it will not be very fun to debug. | ||
+ | |||
+ | See also the [[/boot_log|boot log]] for details on the kernel version and for understanding what works or doesn't work. | ||
+ | |||
+ | == Status == | ||
+ | |||
+ | With the documentation on this page, users can manage to boot Parabola. | ||
+ | |||
+ | So far the following work fine: | ||
+ | * Ethernet works | ||
+ | * Keyboard, touchpad, eMMC, USB host work | ||
+ | * Display work but the GPU needs to be disabled manually in Parabola (that needs to be fixed in Parabola). | ||
+ | * The Webcam is untested | ||
+ | * The HDMI port didn't work | ||
+ | * No sound (that needs to be fixed) | ||
+ | * No USB OTG (that needs to be fixed) | ||
+ | * WiFi doesn't work (nonfree firmware) but USB WiFi cards probably work fine. | ||
+ | |||
+ | == TODO == | ||
+ | * <s>Find a proper header for the Serial connector</s> I soldered a cable instead. The cable went through the microSD slot that is on the bottom of the laptop. | ||
+ | * <s>Find a way to change the u-boot environement</s> | ||
+ | * <s>Boot Parabola:</s> | ||
+ | * Upstream the Linux dts | ||
+ | * Upstream u-boot support (and make use of the Linux dts for that) | ||
+ | * Add support for that device in Parabola by also packaging u-boot for that device. |
Latest revision as of 21:08, 14 March 2023
Contents
Introduction
Hercules made the following laptops with an I.MX51 ARM system on a chip:
- eCAFE EX HD
- eCAFE slim HD
Here are some more information on the hardware:
- 512M of RAM which is soldered. It's also probably the maximum ammount of RAM supported by the I.MX51.
- There is an USB OTG port
- The device is capable of booting from an SD card
- The device has a glossy display (glossy displays are dangerous for the health)
- The eCAFE EX HD has an HDMI port, which enables to use an external display that is not glossy.
They ship with u-boot, and more recent u-boot versions have been maintained by the free software and open source communities. There is also a device tree available but it needs to be upstreamed in Linux.
Once that will be upstreamed, it will be possible to use them with only free software, with u-boot and Parabola, but it will still have some serious flaws as important features like the WiFi and accelerated video decoding will still be missing.
The 3D acceleration doesn't work: The I.MX51 and I.MX53 can use the adreno driver but there is no free firmware. This creates various issues (like lightdm and sddm crashing), so the best way to deal with it is to try to remove the 'msm' driver from the kernel or disable it at runtime before starting lightdm with the following command (as root):
echo msm > /sys/class/drm/card0/device/driver/unbind
In Parabola I tried to add module_blacklist=msm to the kernel command line but the msm driver is builtin so it has no effect, so for now we need to do the commands above to get desktop environment working.
Source code
Some patches for Linux (including the dts) and u-boot did exist as part of meta-teapot.
Hardware documentation
UART
There is an unpopulated connector for the serial port with UART1 being written under it.
There is an arrow on the left of the connector. Here's the pinout.
> [?][TX?][][][RX][GND][GND][GND]
The MAX3232 that is nearby most probably provides the 5V voltage compatible with common USB serial port adapters.
Status:
- RX works (115200 8N1 at boot => We can see u-boot logs)
- TX unknown
JTAG
There is an unpopulated connector with "JTAG" being written on it. I didn't test it.
Booting
To boot you need:
- To install a bootloader on a microSD, the internal eMMC, or to load it through USB
- To install Parabola (or another FSDG distribution) on a (micro)SD card.
hardware information
- The SD slot that is used during boot is located on the side of the laptop.
- The switch to boot on the SD changes the bootorder and makes the bootrom loads the bootloader from the SD slot that is on the side. This has been verified by looking at the serial port logs. It's also documented in the recovery manual.
Installing parabola on an SD card
To install Parabola on a SD (or microSD with a microSD<->SD adapter):
- Make sure that the microSD to SD card adapter/SD card switch isn't set to write protect
- Install Parabola ARM on a SD/microSD as usual with only one ext4 partition
Then u-boot will boot on the SD/microsd. It will look for the following files:
- /boot/extlinux/extlinux.conf which must contains an extlinux configuration file
- /boot/dtbs/linux-libre/mx5-mx51_na04.dtb which must contain the dtb (the location needs to be fixed to be /boot/dtbs/linux-libre/mx51_na04.dtb instead).
To compile mx5-mx51_na04.dtb you can use the following repository: https://framagit.org/GNUtoo/dts/-/tree/hercules-ecafe/v5.1-dts-raw
As for the extlinux.conf, beside adding console=ttymxc0,115200 the rest is pretty much standard and the documentation about it can be found in the Parabola ARM installation instructions on the Parabola wiki. Here's an example:
menu title Welcome to U-Boot with Extlinux support! timeout 1 label Parabola GNU/Linux-libre, linux-libre kernel kernel /boot/vmlinuz-linux-libre append rootwait loglevel=8 rw console=ttymxc0,115200 root=/dev/mmcblk1p1 fdtdir /boot/dtbs/linux-libre initrd /boot/initramfs-linux-libre.img
Building u-boot
- Build a dirty fork of u-boot for this devices from https://framagit.org/GNUtoo/u-boot/-/tree/gnutoo/hercules-ecafe/u-boot-v2019.01-dirty
Adding u-boot to an SD card
To boot u-boot from the microSD/SD
- Make sure that the microSD to SD card adapter/SD card switch isn't set to write protect
- Install u-boot on the microSD/SD:
dd if=u-boot.imx of=/dev/sdc bs=512 seek=2 conv=fsync
- Make sure that the switch is set to boot on the external SD slot
- Open the screen (it can't boot otherwise)
- plug the power
- Put the microSD inside
- Press the power button
Loading u-boot from USB
Alternatively, you can also just load the bootloader from USB.
To do that:
- Make sure that the switch is set to boot on the external SD and that there are no bootloaders on the microSD/SD
- Open the screen (it can't boot otherwise)
- plug the power
- Start pressing the power button
- Connect an USB cable between the eCafe and another computer
- From another computer, run sudo imx_usb ./u-boot.imx
During boot
At boot the display will be black most of the time, so if you don't have an UART soldered it will not be very fun to debug.
See also the boot log for details on the kernel version and for understanding what works or doesn't work.
Status
With the documentation on this page, users can manage to boot Parabola.
So far the following work fine:
- Ethernet works
- Keyboard, touchpad, eMMC, USB host work
- Display work but the GPU needs to be disabled manually in Parabola (that needs to be fixed in Parabola).
- The Webcam is untested
- The HDMI port didn't work
- No sound (that needs to be fixed)
- No USB OTG (that needs to be fixed)
- WiFi doesn't work (nonfree firmware) but USB WiFi cards probably work fine.
TODO
-
Find a proper header for the Serial connectorI soldered a cable instead. The cable went through the microSD slot that is on the bottom of the laptop. Find a way to change the u-boot environementBoot Parabola:- Upstream the Linux dts
- Upstream u-boot support (and make use of the Linux dts for that)
- Add support for that device in Parabola by also packaging u-boot for that device.