Author Topic: Alarmz On Sl-c1000  (Read 8139 times)

Varti

  • Administrator
  • Hero Member
  • *****
  • Posts: 1263
    • View Profile
Alarmz On Sl-c1000
« on: December 16, 2016, 04:32:38 am »
Hi,

I have opened this thread to document my attempts to run Alarmz on my Akita (SL-C1000). As you probably already know, Alarmz is currently declared as not tested on that Zaurus. Yesterday night I have finally found some free time to test it, and I'd like to write down everything I'm trying to do so that I won't forget anything in case I'll have to postpone any further testing due to lack of time, and in case these info could be useful for other C1000 users here. Please feel free to comment and/or point to any error in my post.

The first blocking step is alarmz's own kexecboot, which doesn't run on the Akita since it lacks specific code for that model. Luckily the official kexecboot does support the Akita, there's a specific build for it. I have tried two versions of it: the old one based on the 2.6.2x kernel, and the latest one (released last May) based on 4.4.8. Both can be found here:

https://github.com/LinuxPDA/linux-kexecboot...e/master/zaurus

The 2.6 kexec works as expected, though it doesn't support ext4 partitions, which the 4.4.8 one does. Alarmz on an ext4 partition should run faster than on an ext3 one, but if at the end I'll not manage to boot the latest kexec, I'll try the 2.6/ext3 setup.

I have not been able to run the 4.4.8 kexec so far. At first I thought that the problem might be the modified partition table on my NAND: I had previously resized the root partition from 58 MB to 32, in order to install Cacko on NAND. I had a conversation on IRC with Ant (Kexecboot's Zaurus maintainer), he has told me that the latest kexec supports only root partitions with a default size of 58 MB, unlike older kexec versions. I have therefore done a NAND restore using Trisoft's backup, but I still had the same problems, as I will explain below.

At the first boot, a screen with the Open Embedded logo is displayed. The boot seem to remain stuck to that image, I have waited for a couple of minutes but nothing happened. After a switch off/on cycle, the screen went black, then the kexec menu was briefly shown for a fraction of second, then the screen turned black again. After unplugging the charger and the battery, waiting for 5 seconds then plugging them back, nothing is displayed anymore. The charger LED is turned off for a second, turned on and turned back off again after a second. I have tried to reflash kexec to no avail, the Open Embedded screen still isn't shown anymore, so I'll have to do the NAND restore again in order to go back one step and try to do something else when the OE logo is shown. This is what I'll try next:

- do the NAND restore again; when the OE logo is shown, leave the Zaurus untouched for a longer time and see if it makes any difference
- (thanks Ant for the hint!) the original Sharp's ROM has the rootfs and second rootfs formatted as JFFSv1 which seems that cannot be mounted by newer kexecboot with kernel >= 2.6. Try to flash again kexec with updater.sh, but this time flash the rootfs and 2nd rootfs too with an JFFSv2 image, i.e.:
   1) zImage     for kernel
   2) initrd.bin for rootfs in mtd2
   3) home.bin   for second rootfs in mtd3 (optional)
as described here: http://cgit.openembedded.org/meta-handheld...n/README.zaurus . Use two copies of the following file, named as initrd.bin and home.bin:
https://github.com/LinuxPDA/builds_OE_2016-...33.rootfs.jffs2
- have an ext4 SD with Alarmz on it inserted. If the menu can be seen again, see if it's possible to navigate in the menu and select the Alarmz partition before the screen turns black again
- report the issues on #kexecboot. In case a dmesg log is generated and stored anywhere in the NAND, consider doing a NAND dump via the maintenance menu and see if the dmesg log can be extracted from there.
- try the kexec 2.6/ext3 partition solution

Varti
« Last Edit: April 03, 2017, 06:15:10 am by Varti »
Planet Gemini PDA WiFi/LTE with Mediatek x27
SL-C1000 running Arch Linux ARM May2017, K30225 Wi-Fi CF Card, 64GB SDXC card
and many other Zauruses!

greguu

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 433
    • View Profile
    • http://github.com/greguu
Alarmz On Sl-c1000
« Reply #1 on: December 17, 2016, 01:46:12 am »
Hi Varti,

How long did you wait while the OE logo was displayed ?
Kexecboot is possibly parsing your NAND or has trouble doing so.


Cheers!
Gemini-PDA (Sailfish X and Android) / LG Nexus 5 (Android 11) / Nokia N9 (MeeGo/Harmattan)
Sharp Zaurus C3100 (Borzoi) - Void Linux (voidz) Kernel 5.0.0 - Hardware (Buffalo CF LAN, DLink 660 CF WiFi, ASIX AX88772 USB Ethernet)

Varti

  • Administrator
  • Hero Member
  • *****
  • Posts: 1263
    • View Profile
Alarmz On Sl-c1000
« Reply #2 on: December 28, 2016, 05:05:23 am »
Quote from: greguu
How long did you wait while the OE logo was displayed ?
Kexecboot is possibly parsing your NAND or has trouble doing so.
I waited for approx. a minute before resetting it.
Yesterday I have tried again to boot kexec, but still without success. Here's what I did:

- NAND restore, kexec 4.4.8 install. This time the OE splash logo didn't appear at all, and the charging LED was again turning off-on-off, nothing happens after
- flashed the zImage kexec, initrd.bin and home.bin files on NAND on one go to get rid of JFFSv1 partitions, same behaviour as above
- tried again the alarmz's kexec, to see if the default NAND partitioning plus the use of JFFSv2 filesystem would make any difference. On boot, the charging LED blinks one time per second for a minute, then it fallbacks to the root NAND, in my case it has booted OE.

Next time I'll try the following:
- NAND restore, and kexec 4.4.8 and JFFSv2 flashing, then I'll leave my Z untouched after the single LED blink for a while, to see if something actually happens if I wait, even if the OE screen is not displayed.
- flashing kexec 4.4.8 by hand, and to flash both kexec and rootfs by hand, following the instructions on README.zaurus
- trying with a different SD card (a 1GB max one), or via the CF card, maybe the SD card I'm using is damaged
- check if, using Sharp's debug menu, it is possible to check for damaged sectors on the NAND, and if so if any is found
- NAND restore, this time without flashing the mtd2 and mtd3 partitions (since I remember seeing the logo only when those two partitions weren't reflashed). If successful, go to console and run ubiformat /dev/mtd2 and ubiformat /dev/mtd3, see if it makes any difference
- trying the kexec 2.6/ext3 partition solution (note: mind the boot.cfg syntax change when switching back to 2.6)

It would be nice if someone with a C1000 like me would try this kexec too, to check if it's a problem with my HW, or if kexec itself is the culprit.

Varti
« Last Edit: March 16, 2017, 05:53:32 am by Varti »
Planet Gemini PDA WiFi/LTE with Mediatek x27
SL-C1000 running Arch Linux ARM May2017, K30225 Wi-Fi CF Card, 64GB SDXC card
and many other Zauruses!

greguu

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 433
    • View Profile
    • http://github.com/greguu
Alarmz On Sl-c1000
« Reply #3 on: May 27, 2017, 03:42:48 am »
I know you tested the latest kernel  , thanks for your support! I started a new post : https://www.oesf.org/forum/index.php?showtopic=34558
Gemini-PDA (Sailfish X and Android) / LG Nexus 5 (Android 11) / Nokia N9 (MeeGo/Harmattan)
Sharp Zaurus C3100 (Borzoi) - Void Linux (voidz) Kernel 5.0.0 - Hardware (Buffalo CF LAN, DLink 660 CF WiFi, ASIX AX88772 USB Ethernet)

Varti

  • Administrator
  • Hero Member
  • *****
  • Posts: 1263
    • View Profile
Alarmz On Sl-c1000
« Reply #4 on: June 08, 2017, 05:34:21 am »
Thanks greguu!

Just for reference, I have checked for badblocks on my NAND, luckily none were found. Also, I have run fsck and an SD tool called f3 on both my 1GB SD card I use for flashing, and my 64GB SDHC card, no problems have been found on them.

I recommend using f3 to check for errors on SD cards and to detect fake ones, i.e. cards with a much smaller capacity than the declared one. I have some doubts about the 64GB card, which I bought at a very low price from a reseller on Amazon, luckily it turned out to be a genuine card.

http://oss.digirati.com.br/f3/

Varti
Planet Gemini PDA WiFi/LTE with Mediatek x27
SL-C1000 running Arch Linux ARM May2017, K30225 Wi-Fi CF Card, 64GB SDXC card
and many other Zauruses!

slaanesh

  • Newbie
  • *
  • Posts: 16
    • View Profile
    • http://www.slaanesh.net/
Alarmz On Sl-c1000
« Reply #5 on: August 14, 2017, 10:19:07 pm »
Quote from: greguu
Hi Varti,

How long did you wait while the OE logo was displayed ?
Kexecboot is possibly parsing your NAND or has trouble doing so.

When I start my SL-C1000, I have to wait a minute or so before the Arch Linux boot menu appears.

greguu

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 433
    • View Profile
    • http://github.com/greguu
Alarmz On Sl-c1000
« Reply #6 on: August 15, 2017, 02:24:04 am »
Hi Slaanesh,

what kexecboot kernel do you use ? the 2.6 frankenstein ?

If yes, then what is the output before the kexecboot menu shows ?

You can also go into the kexecboot menu and trigger a "rescan" and see a bit more details. You can share these here, that would help.

It is possibly because of the NAND parsing. I am not sure how long it takes for Varti. On my C3100 it is quite quick with UBIFS, I think JFFS2 is slow.

Greguu

Quote from: slaanesh
Quote from: greguu
Hi Varti,

How long did you wait while the OE logo was displayed ?
Kexecboot is possibly parsing your NAND or has trouble doing so.

When I start my SL-C1000, I have to wait a minute or so before the Arch Linux boot menu appears.
Gemini-PDA (Sailfish X and Android) / LG Nexus 5 (Android 11) / Nokia N9 (MeeGo/Harmattan)
Sharp Zaurus C3100 (Borzoi) - Void Linux (voidz) Kernel 5.0.0 - Hardware (Buffalo CF LAN, DLink 660 CF WiFi, ASIX AX88772 USB Ethernet)

Varti

  • Administrator
  • Hero Member
  • *****
  • Posts: 1263
    • View Profile
Alarmz On Sl-c1000
« Reply #7 on: August 15, 2017, 08:32:28 am »
On my C1000 with the 2.6 frankenstein kexecboot, from the moment I press the switch on button it boots into the graphical menu in ca. 9 seconds. I use a 64GB SDXC with a ext3 partition with the 4.12 kernel, an f2fs partition with the Alarmz rootfs, and a swap one.

Varti
Planet Gemini PDA WiFi/LTE with Mediatek x27
SL-C1000 running Arch Linux ARM May2017, K30225 Wi-Fi CF Card, 64GB SDXC card
and many other Zauruses!