OESF Portables Forum
Model Specific Forums => Sharp Zaurus => Zaurus - Arch Linux ARM support => Topic started by: greguu on May 27, 2017, 03:40:42 am
-
Hi,
as you may know, current 3.10.y and previous 3.x kexecboot kernels fail to boot on C1000 / Akita.
There is a workaround to boot the latest 4.12-rc1 kernel on Akita by using a 2.6.26 based kexecboot kernel that supports kexecboot 0.6.
If you are an C1000/Akita owner and would like to try ArchLinux ARM on your Zaurus, please follow the below steps:
- Prepare a SD card with the latest C3x00 rootfs (yes, it will work on C1000 once you change your kexecboot kernel)
- For more information see : https://www.oesf.org/forum/index.php?showtopic=34421 (https://www.oesf.org/forum/index.php?showtopic=34421)
- Install Guide : https://github.com/greguu/ZALARM-install (https://github.com/greguu/ZALARM-install) (Note: This guide needs updating, please share your experience and ask in this thread for help if needed)
- Make sure you format your SD card with ext3!
- Flash the 2.6.26 based "frankenstein" kexecboot kernel. (Experimental release)
- See the linux-2.6.26-c1000-frankenstein.tar.gz attached.
- This kernel does allow booting to ext2/3 only. There is NO support for ext4 or F2FS. If you like to use a ext4 or F2FS for root, you need to create a seperate ext3 /boot parition
- This kernel features kexecboot 0.6 and does recognize the recent boot.cfg format.
- Enter the SD card and boot into Arch Linux ARM.
- Note: There may be unforeseen issues with C1000 / Akita. This is an experimental test release.
- Please advise of any issues in this thread. We need some Akita testers !
Hopefully we can get an unified kexecboot kernel for all Cxx00 series Zaurus soon. In the meantime this is the only workaround for C1000 users.
Cheers!
-
I have done some tests in the past days on my Akita, these are my results so far.
I have successfully booted the latest Alarmz rootfs on an ext3 partition by installing the 2.6 based kexecboot, and I have also managed to boot the rootfs from an ext4 partition. Since the 2.6 based kexec doesn't support neither ext4 nor f2fs partitions, I created a small ext3 partition on my SD and installed the latest 3.10 kexec on it. So, I was basically booting kexec 2.6, manually selecting kexec 3.10, and using this kexec I booted Alarmz. Now I'd like to avoid having to run two kexecs in succession, so I have followed greguu's advice and used the latest 4.12 kernel in the first partition instead of kexec, and I also changed the rootfs partition from ext4 to the new f2fs. So basically I have repartitioned my 64GB SD to 3 primary partitions:
- a 10MB ext3 one, with a boot/ directory containing the latest 4.12 kernel and a modified boot.cfg, see below
- a 48GB f2fs one with the rootfs
- a swap partition
I have left some free space at the end of the SD card, so that if the swap partition becomes corrupted due to wearing, I'll move it to the next free space on the card.
BTW, I have found that the kernel is found and booted by kexec also if it is copied in the root directory and renamed to zImage. Unfortunately, this way the boot.cfg file isn't recognised (neither by placing it in the root directory, on inside boot/), so the boot stops at one point since the root partition can't be found.
In order to point the kernel to the root partition on sda2, I have set the "root=" parameter inside boot.cfg to my root partition, i.e. /dev/mmcblk0p2. Greguu has also suggested that adding a real_root parameter and setting it to the root partition should work, too. Apparently, real_root isn't a valid kernel parameter, it is actually a script which changes the root partition once it is already booted, and this requires initrd to be used:
https://unix.stackexchange.com/questions/16...root-and-cdroot (https://unix.stackexchange.com/questions/16098/description-of-linux-kernel-boot-parameters-real-root-and-cdroot)
Alarmz uses noinitrd as a parameter, so I believe this solution won't work, although I haven't tried it.
I have also seen that the rootfs won't boot if /dev/sda2 is set in boot.cfg instead of /dev/mmcblk0p2, an "Unable to mount root fs on unknown-block(0,2)" error is shown. The reason might be that, at that point, sda2 isn't mounted yet.
Using this configuration I have managed to boot the rootfs on the f2fs partition. Unfortunately, I have managed to do this only once. Every other attempt to boot it again fails: the Arch Linux ARM logo is shown, but no log text is displayed at all, even after 10 minutes. The system is not freezed, since it is possible to type any text in this state, but there are no errors displayed when return is pressed, only the typed text is shown. The reason might be that I have used "halt" in order to switch off my Akita, but this command has failed, since the shell was still displayed although no more commands could be entered, so I had to unplug the power supply and remove the battery. This command might have left the filesystem to a corrupted state, so next time I'll try to run a fsck on the partition, and/or to delete and create again the filesystem, I'll report back. From what I have read in the other threads, "poweroff" seems to be the only reliable way to switch off the device.
In the meanwhile I have also tested two new beta kexec binaries for Akita provided by ant, based on the 3.10 and 3.2 kernels, but they both refuse to boot, it seems that they have to be compiled using specific gcc versions.
One last question, is the 2.6 kexec in the attachment the same as the one here?
https://github.com/greguu/linux-3.10.y-c3x0...xec-r0/releases (https://github.com/greguu/linux-3.10.y-c3x00-f2fs-kexec-r0/releases)
I guess it is, I just wanted to confirm this.
More news will follow.
Varti
-
I have found the culprit, I have modified the root label in boot.cfg but I have misspelled /dev/mmcblk0p2, silly me. Now the system boots everytime, and it seems to be stable.
I have successfully activated the swap partition, I'm now trying to locally install wireless_tools-30.pre9-1-arm.pkg.tar.xz but it's always failing ("could not lock database: read-only file system"), even if I try it under su, since the f2fs filesystem is mounted as read-only. I have changed my /etc/fstab as follows:
/dev/mmcblk0p2 / f2fs rw,noatime,nodiratime,commit=600,reservation,defaults 0 1
but with no avail, any hint?
Varti
-
I have found the culprit, I have modified the root label in boot.cfg but I have misspelled /dev/mmcblk0p2, silly me. Now the system boots everytime, and it seems to be stable.
I have successfully activated the swap partition, I'm now trying to locally install wireless_tools-30.pre9-1-arm.pkg.tar.xz but it's always failing ("could not lock database: read-only file system"), even if I try it under su, since the f2fs filesystem is mounted as read-only. I have changed my /etc/fstab as follows:
/dev/mmcblk0p2 / f2fs rw,noatime,nodiratime,commit=600,reservation,defaults 0 1
but with no avail, any hint?
Varti
well, good, some progress!
f2fs needs some extra settings to work.
You created a seperate boot partition /dev/mmcblk0p1 with ext3 I assume ?
Then you have your main root on /dev/mmcblk0p2 with f2fs ?
It seems you changed the file system type in your fstab, but left some of the ext3/4 specific options. This may be the issue. (?)
Please share your complete fstab.
Can you share your complete boot.cfg, too ? Did you add swap to the fstab ?
Here is an example fstab that should work with 2.6 kexecboot and 4.12-rc1 kernel, booting from ext3 and setting root to f2fs:
#
# /etc/fstab: static file system information
#
#
# /dev/sdb2
/dev/mmcblk0p2 / f2fs rw,relatime,background_gc=on,inline_data,extent_cache,active_logs=6 0 0
# /dev/sdb1
/dev/mmcblk0p1 /boot ext3 rw,relatime,data=ordered 0 2
-
well, good, some progress!
f2fs needs some extra settings to work.
You created a seperate boot partition /dev/mmcblk0p1 with ext3 I assume ?
Then you have your main root on /dev/mmcblk0p2 with f2fs ?
Yes, that's how my SD is partitioned.
It seems you changed the file system type in your fstab, but left some of the ext3/4 specific options. This may be the issue. (?)
Please share your complete fstab.
Can you share your complete boot.cfg, too ? Did you add swap to the fstab ?
In my fstab I only have /dev/mmcblk0p2 defined, I haven't added the swap partition yet to it, I only mounted it manually. Here's the complete fstab:
#
# /etc/fstab: static file system information
#
#
/dev/mmcblk0p2 / f2fs rw,noatime,nodiratime,commit=600,reservation,defaults 0 1
# Use /dev/sda1 for first partition on microdrive
and my boot.cfg in mmcblk0p1 (I have left the one in mmcblk0p2 untouched since I believe it is not being used):
LABEL=ArchLinuxARM
KERNEL=/boot/zImage-4.12.0-rc1-c3x00-r0
APPEND=root=/dev/mmcblk0p2 rootfstype=f2fs fbcon=rotate:1 noinitrd loglevel=3
Here is an example fstab that should work with 2.6 kexecboot and 4.12-rc1 kernel, booting from ext3 and setting root to f2fs:
#
# /etc/fstab: static file system information
#
#
# /dev/sdb2
/dev/mmcblk0p2 / f2fs rw,relatime,background_gc=on,inline_data,extent_cache,active_logs=6 0 0
# /dev/sdb1
/dev/mmcblk0p1 /boot ext3 rw,relatime,data=ordered 0 2
I see the partition options are different, I'll try them and see if they work.
Varti
-
Hi,
I have modified the fstab entry as you suggested, the root partition is now correctly mounted as read/write, thanks for the help. I'll later take a look at the parameters to eventually tweak them.
Regarding the wifi connection, I have successfully installed by hand both wireless_tools and hostapd, I have tried for a couple of times to connect to my smartphone, configured as a tethered modem, without success, though I have done the tests in a hurry so I need to do some more tests, I'll report back later.
I have attached here, as requested, two outputs of the "journalctl -xe" command; the second has been done after my first wifi connection attempts, I have included both just in case. You'll see many "corgi-lcd spi2.1: failed to request GPIO207 for backlight_on" error messages, and there are some more messages regarding backlighting, please let me know if you need more tests.
Varti
-
Hi,
I have modified the fstab entry as you suggested, the root partition is now correctly mounted as read/write, thanks for the help. I'll later take a look at the parameters to eventually tweak them.
Regarding the wifi connection, I have successfully installed by hand both wireless_tools and hostapd, I have tried for a couple of times to connect to my smartphone, configured as a tethered modem, without success, though I have done the tests in a hurry so I need to do some more tests, I'll report back later.
I have attached here, as requested, two outputs of the "journalctl -xe" command; the second has been done after my first wifi connection attempts, I have included both just in case. You'll see many "corgi-lcd spi2.1: failed to request GPIO207 for backlight_on" error messages, and there are some more messages regarding backlighting, please let me know if you need more tests.
Varti
Apart from these errors , do you experience any issues with the backlight ? Can you suspend/resume and does the backlight turn off after some time ?
The errors indicate that some GPIO is not found. This may be related to the kernel or systemd. Difficult to troubleshoot for me without a C1000. Maybe Ant knows more about GPIO207 and Akita.
-
I also have an SL-C1000 and would be interested in getting ALARM going on my Zaurus. I will try the above procedure and report back once complete.
-
Apart from these errors , do you experience any issues with the backlight ? Can you suspend/resume and does the backlight turn off after some time ?
The errors indicate that some GPIO is not found. This may be related to the kernel or systemd. Difficult to troubleshoot for me without a C1000. Maybe Ant knows more about GPIO207 and Akita.
Thanks for your help, this evening I should have some free time to make more tests on the back-lightning and wifi issues.
@slaanesh
Welcome!
Varti
-
Okay I have installed ALARM on both an SL-C1000 and SL-C3000.
The minimal installs on both look great so far - I haven't had a chance to do much else.
I get the GPIO207 issue as above re: backlight_on.
Is there anything you want me to test out or try?
I'm only using an EXT3 FS.
So far so good! Thanks for your efforts with this.
-
Is there anything you want me to test out or try?
If you have a Wifi card (CF or USB), it would be interesting to check if it works, especially on an SL-C1000.
Varti
-
Is there anything you want me to test out or try?
If you have a Wifi card (CF or USB), it would be interesting to check if it works, especially on an SL-C1000.
Varti
I only have a WiFi SD card but of course this won't work.
I would be happy and actually prefer USB networking.
Start g_ether automatically (does it do this by default?)
echo g_ether > /etc/modules-load.d/g_ether.conf
Create a usb0 device for netctl:
vim /etc/netctl/usb0
Connection=ethernet
Description='Connection via USB'
Interface=usb0
IP=static
Address=('192.168.7.2/30')
Auto start on boot:
netctl enable usb0
Start it:
ifconfig usb0 up
Doesn't seem to do anything on my Win7 box - but will try on my Mac OS X box later.
Should USB networking work?
-
Just found a problem on the SL-C1000:
Some of capital letters only work with either the left or right shift key but not both.
ie. to get 'A' I have to use the right hand side 'shift' key. ie <rshift>+a, <lshift>+a doesn't work.
Capital 'S' is the opposite: I can only type it with the left 'shift' key. ie <lshift>+s, <rshift>+s doesn't work.
Caps lock always works.
Probably GPIO misconfiguration (assuming the keyboard is GPIO driven?).
-
I noticed that too, I think this was introduced in the 4.12-rc1 kernel. Can you confirm that is the kernel you booted ? If yes, try the version below 4.9-rc3.
Just found a problem on the SL-C1000:
Some of capital letters only work with either the left or right shift key but not both.
ie. to get 'A' I have to use the right hand side 'shift' key. ie <rshift>+a, <lshift>+a doesn't work.
Capital 'S' is the opposite: I can only type it with the left 'shift' key. ie <lshift>+s, <rshift>+s doesn't work.
Caps lock always works.
Probably GPIO misconfiguration (assuming the keyboard is GPIO driven?).
-
I need to check, I have not used USB Ethernet driver for many years.
The feature was called USB gadget in the kernel that allows USB Ethernet on PXA27x.
You may need to load a module to get it to work as it is not auto loaded. gadget "pxa27x_udc" should be name of the module.
CF WiFi , CF LAN and USB LAN adaptors are known to work with ArchLinuxARM.
Is there anything you want me to test out or try?
If you have a Wifi card (CF or USB), it would be interesting to check if it works, especially on an SL-C1000.
Varti
I only have a WiFi SD card but of course this won't work.
I would be happy and actually prefer USB networking.
Start g_ether automatically (does it do this by default?)
echo g_ether > /etc/modules-load.d/g_ether.conf
Create a usb0 device for netctl:
vim /etc/netctl/usb0
Connection=ethernet
Description='Connection via USB'
Interface=usb0
IP=static
Address=('192.168.7.2/30')
Auto start on boot:
netctl enable usb0
Start it:
ifconfig usb0 up
Doesn't seem to do anything on my Win7 box - but will try on my Mac OS X box later.
Should USB networking work?
-
I noticed that too, I think this was introduced in the 4.12-rc1 kernel. Can you confirm that is the kernel you booted ? If yes, try the version below 4.9-rc3.
Just found a problem on the SL-C1000:
Some of capital letters only work with either the left or right shift key but not both.
ie. to get 'A' I have to use the right hand side 'shift' key. ie <rshift>+a, <lshift>+a doesn't work.
Capital 'S' is the opposite: I can only type it with the left 'shift' key. ie <lshift>+s, <rshift>+s doesn't work.
Caps lock always works.
Probably GPIO misconfiguration (assuming the keyboard is GPIO driven?).
I can confirm it's the 4.12.0-rc1 kernel.
-
I noticed that too, I think this was introduced in the 4.12-rc1 kernel. Can you confirm that is the kernel you booted ? If yes, try the version below 4.9-rc3.
Just found a problem on the SL-C1000:
Some of capital letters only work with either the left or right shift key but not both.
ie. to get 'A' I have to use the right hand side 'shift' key. ie <rshift>+a, <lshift>+a doesn't work.
Capital 'S' is the opposite: I can only type it with the left 'shift' key. ie <lshift>+s, <rshift>+s doesn't work.
Caps lock always works.
Probably GPIO misconfiguration (assuming the keyboard is GPIO driven?).
I can confirm it's the 4.12.0-rc1 kernel.
Thanks, I will review this with the next kernel build. If it is too much of an issue, please use 4.9-rc3 in the meantime.
-
Thanks, I will review this with the next kernel build. If it is too much of an issue, please use 4.9-rc3 in the meantime.
It's no big deal at the moment.
I'd like to start my project but the real blocker for me is that I can't get USB ethernet working.
-
Thanks, I will review this with the next kernel build. If it is too much of an issue, please use 4.9-rc3 in the meantime.
It's no big deal at the moment.
I'd like to start my project but the real blocker for me is that I can't get USB ethernet working.
https://archlinuxarm.org/forum/viewtopic.php?f=48&t=5504 (https://archlinuxarm.org/forum/viewtopic.php?f=48&t=5504)
Try the suggestions in that thread.
-
Seems that guide is old as some of the directories and files references don't exist on my filesystem.
Also starting with the usb cable plugged in to my computer results in a hang at boot time:
[ Ok ] Started udev Coldplug all Devices.
This is the last line of the boot sequence and it just sits there forever.
-
Seems that guide is old as some of the directories and files references don't exist on my filesystem.
Also starting with the usb cable plugged in to my computer results in a hang at boot time:
[ Ok ] Started udev Coldplug all Devices.
This is the last line of the boot sequence and it just sits there forever.
Yes, the USB Ethernet Gadget only works if setup on both computers and can be a pain to setup. I have not attempted it for ages. I would recommend to get a USB to Ethernet adaptor instead ( ASIX AX88772 based ) or a CF Ethernet card. Some CF WiFi cards are still available too.
-
Hi all,
@greguu: Thank you for your work!
I have installed ALARM on my C1000 following the installation howto yesterday. Here are some observations:
Installing the 2.6-kexecboot firmware worked like a charm.
I used the most recent rootfs and replaced the kernel with the slightly updated/fixed one provided by greguu (file date of zImage: 20.02.2018 vs. 11.02.2018)
Rootfs: https://github.com/greguu/alarm-zaurus-c3x00/releases (https://github.com/greguu/alarm-zaurus-c3x00/releases) (Attention: the release on the top is NOT the most recent one. Scroll down.)
Kernel: https://github.com/greguu/linux-4.14.18-c3x00/releases (https://github.com/greguu/linux-4.14.18-c3x00/releases)
I made the following changes to the rootfs.
All paths are absolute paths, so you need to adjust them if you are changing the rootfs on a SD card mounted on your main computer.
Create /etc/dropbear/ directory
This directory is missing in the rootfs which causes dropbear to drop any SSH connection requests.
mkdir /etc/dropbear/
Swap file instead of partition (might have drawbacks).
[div class=\'codetop\']CODE[/div][div class=\'codemain\' style=\'height:200px;white-space:pre;overflow:auto\']dd if=/dev/zero of=/swapfile bs=1024 count=400000
mkswap /swapfile
swapon /swapfile
[/div]
in /etc/sysctl.d/zaurus:
vm.swappiness=10
in /etc/fstab (i also changed rootfs type to ext3 here):
/swapfile none swap sw 0 0
Upgrading Arch
The following was necessary to upgrade Arch (I used a CF network card to connect to the internet):
[div class=\'codetop\']CODE[/div][div class=\'codemain\' style=\'height:200px;white-space:pre;overflow:auto\']pacman -Syu
pacman-key --init
pacman-key --populate
pacman-key --refresh
pacman -S vim # etc...[/div]
Backlight problem
The backlight on my Akita can not be controlled by the kernel:
corgi-lcd spi2.1: failed to request GPIO207 for backlight_on
There are two gpiochips available in /sys/class/gpio/:
[div class=\'codetop\']CODE[/div][div class=\'codemain\' style=\'height:200px;white-space:pre;overflow:auto\']root: ~ $ cat /sys/class/gpio/gpiochip0/label
gpio-pxa
root: ~ $ cat /sys/class/gpio/gpiochip0/base
0
root: ~ $ cat /sys/class/gpio/gpiochip0/ngpio
121
root: ~ $ cat /sys/class/gpio/gpiochip192/label
sharp-scoop.0
root: ~ $ cat /sys/class/gpio/gpiochip192/base
192
root: ~ $ cat /sys/class/gpio/gpiochip192/ngpio
12
[/div]
So, no GPIO 207 seems to be available. I'm not sure about the mapping.
As backlight control does not work, the backlight will not switch off on suspend.
I would appreciate any hints on how to fix this issue.
USB device/gadget mode
The Zaurus boots with USB host mode, i.e. one may attach USB devices with a OTG adapter cable.
I would have liked to activate USB device mode but did not get it to work yet.
It is possible to load the pxa27x_udc and g_ether modules. However, these do not automatically switch the USB port to device mode. IIRC, one might need to toggle some GPIO pins?
Power management
The MAX1111 ADC seems to report battery voltage / temp and charging voltage.
One can read out values via /sys/class/hwmon/hwmon0/device/in0_input
(etc.).
However, an error message appears in dmesg:
max1111 spi2.2: spi_sync failed with -108
There are no files in /sys/class/power_supply/
. Thus, it is not possible to directly read battery status.
Drawing on framebuffer
I do not want to run X11. Therefore, I tried running PyQt apps directly on the framebuffer.
This works (in principle) in this way (after installing python-pyqt5):
[div class=\'codetop\']CODE[/div][div class=\'codemain\' style=\'height:200px;white-space:pre;overflow:auto\']$ export QT_QPA_PLATFORM=linuxfb
$ python demo.py -qws
[/div]
This shows my demo app directly (and fullscreen) on the display. However, text is not rendered at all, and the widgets do not receive touchscreen or keyboard input. I haven't had time to address these issues yet.
I would greatly appreciate any tips regarding the aforementioned issues.
-
An excerpt from dmesg showing power management errors:
[div class=\'codetop\']CODE[/div][div class=\'codemain\' style=\'height:200px;white-space:pre;overflow:auto\'][ 2106.573003] PM: noirq suspend of devices failed
[ 2106.648693] usb usb1: root hub lost power or was reset
[ 2106.915414] corgi-lcd spi2.1: failed to request GPIO207 for backlight_on
[ 2106.916743] OOM killer enabled.
[ 2106.916759] Restarting tasks ... done.
[ 2106.960863] PM: suspend exit
[ 2120.801892] sharpsl-pm sharpsl-pm: Fatal Off
[ 2120.801994] PM: suspend entry (deep)
[ 2120.802008] PM: Syncing filesystems ... done.
[ 2121.022417] Freezing user space processes ... (elapsed 0.005 seconds) done.
[ 2121.027627] OOM killer disabled.
[ 2121.027639] Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
[ 2121.029158] Suspending console(s) (use no_console_suspend to debug)
[ 2121.191199] max1111 spi2.2: spi_sync failed with -108
[ 2121.191199] max1111 spi2.2: spi_sync failed with -108
[ 2121.191199] max1111 spi2.2: spi_sync failed with -108
[ 2121.191199] max1111 spi2.2: spi_sync failed with -108
[ 2121.191199] max1111 spi2.2: spi_sync failed with -108
[ 2121.191199] sharpsl-pm sharpsl-pm: Error: AC check failed: voltage -108.
[ 2121.191199] sharpsl-pm sharpsl-pm: Offline Charger: Error occurred.
[ 2121.191199] sharpsl-pm sharpsl-pm: Charging Error!
[ 2122.028649] usb usb1: root hub lost power or was reset
[ 2122.294406] OOM killer enabled.
[ 2122.294422] Restarting tasks ...
[ 2122.295445] corgi-lcd spi2.1: failed to request GPIO207 for backlight_on
[ 2122.349729] done.
[ 2122.360647] PM: suspend exit
[ 5576.875554] export_store: invalid GPIO 207
[/div]
-
Backlight problem
The backlight on my Akita can not be controlled by the kernel:
corgi-lcd spi2.1: failed to request GPIO207 for backlight_on
There are two gpiochips available in /sys/class/gpio/:
[div class=\'codetop\']CODE[/div][div class=\'codemain\' style=\'height:200px;white-space:pre;overflow:auto\']root: ~ $ cat /sys/class/gpio/gpiochip0/label
gpio-pxa
root: ~ $ cat /sys/class/gpio/gpiochip0/base
0
root: ~ $ cat /sys/class/gpio/gpiochip0/ngpio
121
root: ~ $ cat /sys/class/gpio/gpiochip192/label
sharp-scoop.0
root: ~ $ cat /sys/class/gpio/gpiochip192/base
192
root: ~ $ cat /sys/class/gpio/gpiochip192/ngpio
12
[/div]
So, no GPIO 207 seems to be available. I'm not sure about the mapping.
As backlight control does not work, the backlight will not switch off on suspend.
I would appreciate any hints on how to fix this issue.
Hi,
I can confirm that backlight control doesn't work on my Akita, too, and it seems only these models are affected.
@greguu: I might find some free time during these days to help debugging this issue with the serial Zaurus cable I have.
Varti
-
Thanks for your reply (and the wonderful forum)!
I dug a little bit through kernel sources.
I guess that the root cause for most problems (also battery power not being available via sysfs) is that the kernel thinks that this is a Spitz device, not an Akita.
Spitz and Akita handle many things (e.g., backlight) differently, because the Spitz devices have an additional (SCOOP) controller which they need for the internal drive.
On Spitz, the backlight GPIO seems to be attached to this controller, whereas the Akita has to handle things via another GPIO.
arch/arm/mach-pxa/include/mach/spitz.h:
#define SPITZ_GPIO_BACKLIGHT_ON (SPITZ_SCP2_GPIO_BASE + 7)
#define AKITA_GPIO_BACKLIGHT_ON (AKITA_IOEXP_GPIO_BASE + 3)
(That's probably where GPIO207 is coming from).
So, why does the kernel think that it is running on a Spitz? My guess is that somehow the wrong ARM machine ID is set (see http://www.simtec.co.uk/products/SWLINUX/f...ng_article.html (http://www.simtec.co.uk/products/SWLINUX/files/booting_article.html) and https://www.arm.linux.org.uk/developer/machines/) (https://www.arm.linux.org.uk/developer/machines/)).
But I haven't yet found out why the wrong machine ID is set.
The code setting the machine ID seems to be in arch/arm/boot/compressed/head-sharpsl.S
It checks whether 16 MiB of flash are available (-> Spitz), and if not: if a second SCOOP chip is available (-> Borzoi). If neither of these conditions are true, it stores the Akita Machine ID in the CPU register.
Maybe the kexecboot loader somehow changes the machine ID?
-
Oh, I seem to have gotten something wrong:
arch/arm/mach-pxa/include/mach/spitz.h:
#define SPITZ_GPIO_BACKLIGHT_ON (SPITZ_SCP2_GPIO_BASE + 7)
#define AKITA_GPIO_BACKLIGHT_ON (AKITA_IOEXP_GPIO_BASE + 3)
(That's probably where GPIO207 is coming from).
So, why does the kernel think that it is running on a Spitz?
I was wrong. GPIO207 is the right one for Akita. So, the Machine ID is set correctly. However, for some reason, the IO Expander (Max7310 connected via I2C) does not show GPIO pins to the kernel.
Still stumped.
-
Hmm, maybe this is the culprit:
CONFIG_GPIO_PCA953X is not set
(from greguu's 5.0 kernel config)
The PCA953X driver is responsible for making the MAX7310 IO expander's GPIO pins available to the system - and spitz.c seems to try to register the GPIO pins:
#if defined(CONFIG_I2C_PXA) || defined(CONFIG_I2C_PXA_MODULE)
static struct pca953x_platform_data akita_pca953x_pdata = {
.gpio_base = AKITA_IOEXP_GPIO_BASE,
};
static struct i2c_board_info spitz_i2c_devs[] = {
{
.type = "wm8750",
.addr = 0x1b,
}, {
.type = "max7310",
.addr = 0x18,
.platform_data = &akita_pca953x_pdata,
},
};
@greguu : would it be possible for you to recompile the 5.0 kernel with this flag enabled?
-
Nice detective work, and thanks for your kind words about the forum, I'm really happy to see the Zaurus subforums to be still useful to someone. I'd also like to have backilght control working on the Akita, I have pinged greguu on IRC, he's lately probably busy with other stuff.
Varti
-
@greguu : would it be possible for you to recompile the 5.0 kernel with this flag enabled?
Hi raphman,
Sure thing, can do. See kernel attached. Unfortunately I have no C1000 to test myself.
This flag is actually part of the akita defconfig and I must have missed it some time ago..
Nice to see some usage of the 5.0 kernel and the old rootfs.
Battery status could be read via apm tools in the distant past, but I have not looked into it since then.
Last time I used framebuffer with QT amd GTK was via DirectFB. This worked surprisingly well but the project is abandoned for several years now.
Cheers!
-
Sure thing, can do. I will have a look tomorrow and can build the kernel with this flag enabled. Unfortunately I have no C1000 to test myself.
Happy to test. Did you document the required cross-compilation toolchain somewhere? I'd be happy to compile the kernel myself.
Have you booted the 5.0 kernel with ALARM on your C1000 ?
Yes.
It seems that the latest (old) rootfs for ALARM still worked fine for initial setup, but could you do a clean upgrade with pacman -Syu ?
Yes. See my first post for the steps it took me.
Another important change I had to make (and somehow forgot to document at first): One needs to manually create /etc/dropbear/ - otherwise dropbear will fail to accept any SSH connection requests.
(...)
You may want to try the Void port that is available too, but it may lack some packages... still WIP. You can request packages in the voidz thead for the next build if needed.
Yeah, I had a look but wanted to stay with a more common distro first as it makes troubleshooting and trying out things a little bit easier.
What would be the main benefits of using Voidz in you opinion?
-
I updated the previous post in the meantime and added the kernel for testing.
I use the xbps-src tool from void linux nowadays to build the kernel. All required is on my github.
Voidz is more lightweight, uses less memory. Downside is packages are not prebuild as with ALARM.
-
hi
I have been using my C1K since 2008 with 2.6.23. I have recently acquired a secondhand C3200, and I'd like to know about kernel differences between these to models, if any.
Any special patch from C1K to C3K?
What is the status of modern (>2.6.23) kernels?
I remember I didn't update to 2.6.24/2.6.26 because they had problems with suspend, and problem with the battery recharge circuit
Have these bugs/issues been already fixed in the meanwhile?
Thanks :D
-
Hello and welcome back,
about the differences, as mentioned the only one between spitz and akita in kernel is that akita needs this:
CONFIG_GPIO_PCA953X=y
which iirc selects as well
CONFIG_GPIO_PCA953X_IRQ=y
Apart this the kernels are identical.
Now, about power management...bad notes.
So refined as with 2.x is still a dream :/
At lest som e4.x kexecboot can 'suspend' from within kexecboot (in menu is shutdown).
cheers
A.A.
-
I recently have taken the c1000 out of the drawer where it had been sitting since 2010.
I am running now the alarmz rootfs of Feb 11, 2018. Thanks for the effort to support these old systems.
frank7d
-
Welcome back Frank, and thanks for trying out AlarmZ! You should give VoidZ a try too, it's lighter and uses less resources than alarmz.
Varti
-
hi
I applied all the patches found in Void, to vanilla kernel { 5.0-rc3, 5.4.229 }.
~ arch/arm/mach-pxa/spitz.c
~ drivers/mmc/core/slot-gpio.c
~ drivers/mmc/host/pxamci.c
~ drivers/mmc/host/mmc_spi.c
~ drivers/mmc/host/of_mmc_spi.c
~ drivers/ata/pata_pcmcia.c
~ drivers/pcmcia/soc_common.c
~ drivers/pcmcia/soc_common.h
~ include/linux/mmc/slot-gpio.h
~ include/linux/platform_data/mmc-pxamci.h
~ include/linux/spi/mmc_spi.h
(patches, modified these files)
Tested on my c1k, both k5 kernels boot find, but the suspend does not work at all.
When I press the suspend button, the screen makes a bright flash.
Sometimes the screen even goes white, and I can't see the text console anymore.
-
as you may know, current 3.10.y and previous 3.x kexecboot kernels fail to boot on C1000 / Akita.
why did it fail?
what was/is the problem?