Quantcast
Channel: Linux Device Hacking - Debian
Viewing all 26623 articles
Browse latest View live

Re: Debian on Dell Kace M300

$
0
0
Quote

He didn't, but his /proc/cpu/alignment output from his m300 running LMS listed 3 alignment faults - no idea really how to interpret what caused them and as these are in the "system" category vs. the "user" category I'm guessing that these are corrected automatically by the kernel and the entries are just informational - as opposed to the user faults where you can control how faults are handled by echoing the various numeric options to /proc/cpu/alignment. ?

True. I don't think the kernel has anything to do with it in this case. Some applications have bugs regarding alignment. It is best that they fix the code. We realy should not mess with system settings. As long as the kernel was built correctly (GCC also has type of bug before, but it got fixed quickly), and the rootfs architecture is correct, no need to do anything.

Re: ix2-200 boots USB but not HDD

$
0
0
@damnit_

> I created it per your method
> https://forum.doozan.com/read.php?2,12096

Then, I think to simplify the issue, you should use the kernel uImage and uInitrd from Debian-5.2.9-kirkwood-tld-1-rootfs-bodhi.tar.bz2.

After you got the box to boot successfully with a consistent system, then you can go back to install mainline kernel if you'd like to do so.

Re: Errors in Boot Log for Dell M300

Re: Debian on Dell Kace M300

$
0
0
Out of curiosity, I booted back up the factory Dell M300 image and checked the alignment setting:

root@dellkaceM300:~# cat /proc/cpu/alignment 
User:		0
System:		0
Skipped:	0
Half:		0
Word:		0
DWord:		0
Multi:		0
User faults:	2 (fixup)

So that's kind of interesting. It's not being set via the cmdline:

root@dellkaceM300:~# cat /proc/cmdline 
console=ttyS0,115200 mtdparts=spi_flash:0x7f000@0(uboot),0x1000@0x7f000(u-boot-env)

I thought it was being set in the kernel config:

root@dellkaceM300:/# grep -i alignment /boot/config-2.6.32-5-kirkwood 
CONFIG_ALIGNMENT_TRAP=y

but I see that this setting is the same in your kernel config, though Mike's output shows /proc/cpu/alignment set to 0 (ignore) for user faults.

So how is it being set to 2 on the factory load? Odds are that had my Alpine load defaulted to 2 somehow, I would have never had any issues with apk and been blissfully ignorant that all those alignment faults were happening behind the scenes. Not sure what's better. Would have saved me many hours of head scratching.

//edit, just verified that adding alignment=2 to the kernel command line options does set /proc/cpu/alignment to 2 (fixup)

earlyprintk root=/dev/sda2 alignment=2 console=ttyS0,115200 mtdparts=spi_flash:0x7f000@0(uboot),0x1000@0x7f000(u-boot-env)
localhost:~# cat /proc/cpu/alignment 
User:		0
System:		0 (0x0)
Skipped:	0
Half:		0
Word:		0
DWord:		0
Multi:		0
User faults:	2 (fixup)

Re: Debian on Dell Kace M300

$
0
0
sodface,

2.6.32-5-kirkwood is a very old kernel. And being a stock kernel, It could have settings enabled in some patched code, too. I don't think it should be compared to modern kernel.

The GCC and the kernel have evolved so much from that day to the present.

Re: Debian on Dell Kace M300

$
0
0
bodhi, while I agree with your statements, I think that the following is also true (even today) as far as the alignment setting goes:

- The debian config you guys are currently using sets /proc/cpu/alignment to User faults: 0 (ignore)
- Due to this setting, applications that perform unaligned memory operations may exhibit unexpected behavior because the kernel will not correct it and the program will continue running with unpredictable and undesirable results
- Setting /proc/cpu/alignment to User faults: 2 (fixup) will allow the same applications to operate normally because the kernel will correct the memory accesses, at the cost of extra cpu cycles and therefore degraded performance

I decided to check the setting on one of my Raspberry Pi Zero W's that runs the official armhf release of Alpine Linux and it was set to 2 (fixup).

I think I will probably go with the 2 (fixup) setting going forward, just to be safe.

Re: Debian on Dell Kace M300

$
0
0
sodface,

> I think I will probably go with the 2 (fixup)
> setting going forward, just to be safe.

That would be a good work around for bad behavior applications!

However, I think Debian is more correct in that such applications bugs should be fixed. Unless you can make it apparent so that users can submit a bug report, it is like sweeping dirts under the rug :) Besides, there is no guarantee that the kernel could fix it up successfully. Some of the out of alignment problem could also cause unpredictable behavior. I mean... pick your your poison :)

In real world mission critical applications, these problems must be fixed.

Re: Debian on Dell Kace M300

$
0
0
bodhi Wrote:
-------------------------------------------------------
> However, I think Debian is more correct in that
> such applications bugs should be fixed. Unless you
> can make it apparent so that users can submit a
> bug report, it is like sweeping dirts under the
> rug :) Besides, there is no guarantee that the
> kernel could fix it up successfully. Some of the
> out of alignment problem could also cause
> unpredictable behavior. I mean... pick your your
> poison :)
>
> In real world mission critical applications, these
> problems must be fixed.

Agree, except when User faults is set to 0 (ignore) the misbehaving application doesn't necessarily crash or exit but continues to run with unpredictable results!

To detect faulty applications, it should be set to 4 or 5 so the process exits with Bus error and doesn't continue to run. 0 is probably the worst setting, which is what you have now!

Re: Debian on Dell Kace M300

$
0
0
> Agree, except when User faults is set to 0
> (ignore) the misbehaving application doesn't
> necessarily crash or exit but continues to run
> with unpredictable results!

That's not the behavior in Debian as I known of. But I guess it's all academic. Glad you got it figured out what to do in Alpine!

Re: Debian on Dell Kace M300

$
0
0
bodhi Wrote:
-------------------------------------------------------
> That's not the behavior in Debian as I known of.
> But I guess it's all academic. Glad you got it
> figured out what to do in Alpine!
I'm still trying to figure out what the default behavior in Debian is supposed to be, based on Mike's output it looked like it default to 0 (ignore). If that's the only place where that setting is set and checked.

The Debian wiki page that I linked to earlier, last updated in 2017 (though wikis are hard to keep everything current), says:

Quote

word accesses must be aligned to a multiple of their size

Accesses from non-aligned locations give garbled results

For example, loading a 32-bit word from a non-aligned pointer reads an aligned 32-bit word from the next lowest 32-bit-aligned location (ignoring the lower 2 bits of the pointer) and then rotates the result so that the byte indicated by the pointer ends up in the least significant byte.

This applies to 16-bit, 32-bit and 64-bit data.

You can test for this kind of error without recompiling, using the pseudo-file /proc/cpu/alignment. Catting it tells you whether misaligned user accesses are detected and fixed up or not (the default setting is usually no, 0).

Another mode is "fixup", in which the kernel will quietly perform correct unaligned access for user processes.

https://wiki.debian.org/ArmEabiFixes#word_accesses_must_be_aligned_to_a_multiple_of_their_size

Maybe running a test program on Debian would confirm or deny the default behavior, something like:
https://github.com/gavingolden/Unaligned-Memory-Access

But I will drop this now unless I come up with any other info. I think I have a way ahead for Alpine and one of the developers for the application I was having issues with has just committed another code fix for it so hopefully that should be good now anyway.

Thanks for the help!

Re: Help with iomega ix4-200d installation

$
0
0
I took a look at that GPL code you found, it looks like it has some things in there specific to the ix4-200d but seems to be missing some things. Specifically, the driver for the lcd doesn't seem to be anywhere that I can find. There is a kernel image in there and I can see from it's strings that it was built with the lcd driver but I don't see the actual source in there anywhere. There do appear to be some patches specific to sata which may be of interest though.

Speaking of the LCD... working form other sources I've been able to get some more features working in my example script. I managed to get both read/write operations working and have added the ability to read common image file types via a python library.

I pulled this out using the read function this morning which I thought might be amusing:

00011111111111111111111111111111111111111111111111111111111111100000111111111111111111111111111111111111111111111111111111111111
00011111111111111111111111111111111111111111111111111111111111000000011111111111111111111111111111111111111111111111111111111111
00011111111111111111111111111111111111111111111111111111111111000000011111111111111111111111111111111111111111111111111111111111
00011111111111111111111111111111111111111111111111111111111111000000011111111111111111111111111111111111111111111111111111111111
00011111111111111111111111111111111111111111111111111111111111000000011111111111111111111111111111111111111111111111111111111111
00011111111111111111111111111111111111111111111111111111111111000000011111111111111111111111111111111111111111111111111111111111
00011111111111111111111111111111111111111111111111111111111111100000111111111111111111111111111111111111111111111111111111111111
00011111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
00011111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
00011111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
00011111111111111111111111111111111111111111111111111110000000000000000000001111111111111111111111111111111111111111111111111111
00011111111111111111111111111111111111111111111111111110000000000000000000000111111111111111111111111111111111111111111111111111
00011111111111111111111111111111111111111111111111111100000111111111100000000111111111111111111111111111111111111111111111111111
00011111111111111111111111111111111111111111111111111100000111111111100000000111111111111111111111111111111111111111111111111111
00011111111111111111111111111111111111111111111111111100000111111111110000000111111111111111111111111111111111111111111111111111
00011111111111111111111111111111111111111111111111111100000111111111110000000111111111111111111111111111111111111111111111111111
00011111111111111111111111111111111111111111111111111100000111111111110000000111111111111111111111111111111111111111111111111111
00011111111111111111111111111111111111111111111111111100000000111111110000000111111111111111111111111111111111111111111111111111
00011111111111111111111111111111111111111111111111111100000000011111110000000111111111111111111111111111111111111111111111111111
00011111111111111111111111111111111111111111111111111100000000011111110000000111111111111111111111111111111111111111111111111111
00011111111111111111111111111111111111111111111111111100000000011111110000000111111111111111111111111111111111111111111111111111
00011111111111111111111111111111111111111111111111111100000000011111110000000111111111111111111111111111111111111111111111111111
00011111111111111111111111111111111111111111111111111100000000011111110000000111111111111111111111111111111111111111111111111111
00011111111111111111111111111111111111111111111111111100000000011111110000000111111111111111111111111111111111111111111111111111
00011111111111111111111111111111111111111111111111111100000000011111110000000111111111111111111111111111111111111111111111111111
00011111111111111111111111111111111111111111111111111100000000011111110000000111111111111111111111111111111111111111111111111111
00011111111111111111111111111111111111111111111111111100000000011111110000000111111111111111111111111111111111111111111111111111
00011111111111111111111111111111111111111111111111111100000000011111110000000111111111111111111111111111111111111111111111111111
00011111111111111111111111111111111111111111111111111100000000011111110000000111111111111111111111111111111111111111111111111111
00011111111111111111111111111111111111111111111111111100000000011111110000000111111111111111111111111111111111111111111111111111
00011111111111111111111111111111111111111111111111111100000000011111110000000111111111111111111111111111111111111111111111111111
00011111111111111111111111111111111111111111111111111100000000011111110000000111111111111111111111111111111111111111111111111111
00011111111111111111111111111111111111111111111111111100000000011111110000000111111111111111111111111111111111111111111111111111
00011111111111111111111111111111111111111111111111111100000000011111110000000111111111111111111111111111111111111111111111111111
00011111111111111111111111111111111111111111111111111100000000011111110000000111111111111111111111111111111111111111111111111111
00011111111111111111111111111111111111111111111111111100000000011111110000000111111111111111111111111111111111111111111111111111
00011111111111111111111111111111111111111111111111111100000000011111100000000111111111111111111111111111111111111111111111111111
00011111111111111111111111111111111111111111111111111100000000000000000000000111111111111111111111111111111111111111111111111111
00011111111111111111111111111111111111111111111111111110000000000000000000000111111111111111111111111111111111111111111111111111
00011111111111111111111111111111111111111111111111111110000000000000000000001111111111111111111111111111111111111111111111111111
00011111111111111111111111111111100011111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
00011111111111111111111111111111100011111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
00011111111111111111111111111111100011111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
00011111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
00011111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
00011111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
00011111111111111111111111111111000011110000000111000100000110000011110000001111000000000110000001111111111111111111111111111111
00011111111111111111111111111111100011100011100011000000000000000011100011000110001100011101110000111111111111111111111111111111
00011111111111111111111111111111100011000011100011000011000011100001000111000110001110001111111000111111111111111111111111111111
00011111111111111111111111111111100011000111100001000111100011100001000111000100001110001111111000111111111111111111111111111111
00011111111111111111111111111111100011000111100001000111100011100001000100000110001100011111100000111111111111111111111111111111
00011111111111111111111111111111100011000111100001000111100011100001000111111110001100011100011000111111111111111111111111111111
00011111111111111111111111111111100011000111100001000111100011100001000111111111000000111000111000111111111111111111111111111111
00011111111111111111111111111111100011000111100001000111100011100001000011111111001111111000111000111111111111111111111111111111
00011111111111111111111111111111100011000011100011000111100011100001100011111110001111111000111000111111111111111111111111111111
00011111111111111111111111111111100011100011000111000111100011100001100000000110000000011000010000111111111111111111111111111111
00011111111111111111111111111111100011111000001111000111100011100001111000011111000000000100001100011111111111111111111111111111
00011111111111111111111111111111111111111111111111111111111111111111111111111110111110000111111111111111111111111111111111111111
00011111111111111111111111111111111111111111111111111111111111111111111111111100011111000111111111111111111111111111111111111111
00011111111111111111111111111111111111111111111111111111111111111111111111111100011111000111111111111111111111111111111111111111
00011111111111111111111111111111111111111111111111111111111111111111111111111100011111001111111111111111111111111111111111111111
00011111111111111111111111111111111111111111111111111111111111111111111111111110011110011111111111111111111111111111111111111111
00011111111111111111111111111111111111111111111111111111111111111111111111111111000001111111111111111111111111111111111111111111
00011111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111

Re: Errors in Boot Log for Dell M300

$
0
0
I updated the initramfs using update-initramfs -u, and regenerated uInitrd. It apparently did something, as the new file size was slightly different than previous.

Booted OK.

Second boot today completed, but got this message on serial:
INIT: version 2.93 booting
[info] Using makefile-style concurrent boot in runlevel S.
findfs: unable to resolve 'LABEL=sata_rootfs'
[ ok ] Starting hotplug events dispatcher: systemd-udevd.
[ ok ] Synthesizing the initial hotplug events (subsystems)...done.
[....] Synthesizing the initial hotplug events (devices)...[   21.902410][  T388] systemd-udevd[388]: Using default interface naming scheme 'v240'.
[ ok                                                       done.
[....] Waiting for /dev to be fully populated...[   22.178242][  T388] systemd-udevd[388]: link_config: autonegotiation is unset or enabled, the speed and duplex are not writable.
[   22.269214][  T400] watchdog: f1020300.watchdog-timer: driver supplied timeout (4294967295) out of range
[   22.454870][  T400] watchdog: f1020300.watchdog-timer: falling back to default timeout (21)
[   22.517065][  T379] sd 0:0:0:0: Attached scsi generic sg0 type 0
[   22.602208][  T400] orion_wdt: Initial timeout 21 sec
[   22.810083][  T401] systemd-udevd[401]: link_config: autonegotiation is unset or enabled, the speed and duplex are not writable.
[   22.917641][  T389] marvell-cesa f1030000.crypto: CESA device successfully registered
done.
[ ok ] Setting hostname to 'm300-2'...done.
[warn] Not activating swap on swapfile. ... (warning).
[   24.790557][  T627] EXT4-fs (sda1): re-mounted. Opts: errors=remount-ro
[info] Will now check all file systems.
fsck from util-linux 2.33.1
Checking all file systems.
LABEL=sata_rootfs is mounted
LABEL=data is not mounted
[/sbin/fsck.ext3 (1) -- /mnt/data] fsck.ext3 -y -C0 /dev/sda2
e2fsck 1.44.5 (15-Dec-2018)
data: clean, 12/715264 files, 330688/2860800 blocks
[....] Done checking file systems. A log is being saved in /var/log/fsck/checkfs[ ok hat location is writable..
[ ok ] Cleaning up temporary files...[....] Cleaning /tmp...done.
[ ok .
[....] Will now mount local filesystems:[   26.108072][  T910] EXT4-fs (sda2): mounting ext3 file system using the ext4 subsystem
[   26.127435][  T910] EXT4-fs (sda2): mounted filesystem with ordered data mode. Opts: (null)
. ok
[....] Will now activate swapfile swap:swapon: /mnt/data/swapfile1: insecure permissions 0644, 0600 suggested.
swapon: /mnt/data/swapfile1: found signature [pagesize=4096, signature=swap]
swapon: /mnt/data/swapfile1: pagesize=4096, swapsize=1073741824, devsize=1073741824
swapon /mnt/data/swapfile1
[   27.128610][  T956] Adding 1048572k swap on /mnt/data/swapfile1.  Priority:-2 extents:14 across:1125440k SSFS
done.
Although, swap was activated later.
Also this:
Starting version 241
Begin: Loading essential drivers ... done.
Begin: Running /scripts/init-premount ... done.
Begin: Mounting root file system ... Begin: Running /scripts/local-top ... done.
Begin: Running /scripts/local-premount ... done.
udevadm: relocation error: udevadm: symbol sigisemptyset version GLIBC_2.4 not defined in file libc.so.6 with link time reference
Begin: Will now check root file system ... fsck from util-linux 2.33.1
[/sbin/fsck.ext3 (1) -- /dev/sda1] fsck.ext3 -a -C0 /dev/sda1
sata_rootfs: clean, 40787/262144 files, 526717/1048576 blocks

Any significance to these?

Other boot errors I've had also relate to this libc.so.6 file (which is linked to libc-2.28.so). Note that I did apt-get update/apt-get upgrade on this box. Could this have created a version mismatch or something? Is there a log of what update did? I can't find one.

Re: Errors in Boot Log for Dell M300

$
0
0
Mike,

> I updated the initramfs using update-initramfs -u,
> and regenerated uInitrd. It apparently did
> something, as the new file size was slightly
> different than previous.

That a good sign. Meaning you really needed to regenerate it.

> Booted OK.

> udevadm: relocation error: udevadm:
> symbol sigisemptyset version GLIBC_2.4 not defined
> in file libc.so.6 with link time
> reference


> Any significance to these?

Only the udevadm error above is relevant. However, I would test boot a couple time with both SATA rootfs and another non-rootfs USB drive plugged in at boot.


>
> Other boot errors I've had also relate to this
> libc.so.6 file (which is linked to libc-2.28.so).
> Note that I did apt-get update/apt-get upgrade on
> this box. Could this have created a version
> mismatch or something? Is there a log of what
> update did? I can't find one.

The logs can be found in /var/log.

Each time you do apt-get upgrade, a new initrd might be created and apt will output a message like this (suppose you are running 5.2.9-kirkwood-tld-1):
update-initramfs: Generating /boot/initrd.img-5.2.9-kirkwood-tld-1
Then you need to recreate uInitrd.

If you don't recall seeing that or not (e.g. exiting terminal) then do a listing to check the timestamp.
ls -lart /boot
If you see uInitrd is older than the latest initrd.img-5.2.9-kirkwood-tld-1 kernel file then you know that uInitrd is obsolete and need to be recreated (This is the reason my instruction always uses "cp -a" so that timestamp is preserved when a file is copied).

Re: Help with iomega ix4-200d installation

$
0
0
> I pulled this out using the read function this
> morning which I thought might be amusing:
>
>
> 00011111111111111111111111111111111111111111111111111111111111100000111111111111111111111111111111111111111111111111111111111111
> 00011111111111111111111111111111111111111111111111111111111111000000011111111111111111111111111111111111111111111111111111111111
> 00011111111111111111111111111111111111111111111111111111111111000000011111111111111111111111111111111111111111111111111111111111
> 00011111111111111111111111111111111111111111111111111111111111000000011111111111111111111111111111111111111111111111111111111111
> 00011111111111111111111111111111111111111111111111111111111111000000011111111111111111111111111111111111111111111111111111111111
> 00011111111111111111111111111111111111111111111111111111111111000000011111111111111111111111111111111111111111111111111111111111
> 00011111111111111111111111111111111111111111111111111111111111100000111111111111111111111111111111111111111111111111111111111111
> 00011111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
> 00011111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
> 00011111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
> 00011111111111111111111111111111111111111111111111111110000000000000000000001111111111111111111111111111111111111111111111111111
> 00011111111111111111111111111111111111111111111111111110000000000000000000000111111111111111111111111111111111111111111111111111
> 00011111111111111111111111111111111111111111111111111100000111111111100000000111111111111111111111111111111111111111111111111111
> 00011111111111111111111111111111111111111111111111111100000111111111100000000111111111111111111111111111111111111111111111111111
> 00011111111111111111111111111111111111111111111111111100000111111111110000000111111111111111111111111111111111111111111111111111
> 00011111111111111111111111111111111111111111111111111100000111111111110000000111111111111111111111111111111111111111111111111111
> 00011111111111111111111111111111111111111111111111111100000111111111110000000111111111111111111111111111111111111111111111111111
> 00011111111111111111111111111111111111111111111111111100000000111111110000000111111111111111111111111111111111111111111111111111
> 00011111111111111111111111111111111111111111111111111100000000011111110000000111111111111111111111111111111111111111111111111111
> 00011111111111111111111111111111111111111111111111111100000000011111110000000111111111111111111111111111111111111111111111111111
> 00011111111111111111111111111111111111111111111111111100000000011111110000000111111111111111111111111111111111111111111111111111
> 00011111111111111111111111111111111111111111111111111100000000011111110000000111111111111111111111111111111111111111111111111111
> 00011111111111111111111111111111111111111111111111111100000000011111110000000111111111111111111111111111111111111111111111111111
> 00011111111111111111111111111111111111111111111111111100000000011111110000000111111111111111111111111111111111111111111111111111
> 00011111111111111111111111111111111111111111111111111100000000011111110000000111111111111111111111111111111111111111111111111111
> 00011111111111111111111111111111111111111111111111111100000000011111110000000111111111111111111111111111111111111111111111111111
> 00011111111111111111111111111111111111111111111111111100000000011111110000000111111111111111111111111111111111111111111111111111
> 00011111111111111111111111111111111111111111111111111100000000011111110000000111111111111111111111111111111111111111111111111111
> 00011111111111111111111111111111111111111111111111111100000000011111110000000111111111111111111111111111111111111111111111111111
> 00011111111111111111111111111111111111111111111111111100000000011111110000000111111111111111111111111111111111111111111111111111
> 00011111111111111111111111111111111111111111111111111100000000011111110000000111111111111111111111111111111111111111111111111111
> 00011111111111111111111111111111111111111111111111111100000000011111110000000111111111111111111111111111111111111111111111111111
> 00011111111111111111111111111111111111111111111111111100000000011111110000000111111111111111111111111111111111111111111111111111
> 00011111111111111111111111111111111111111111111111111100000000011111110000000111111111111111111111111111111111111111111111111111
> 00011111111111111111111111111111111111111111111111111100000000011111110000000111111111111111111111111111111111111111111111111111
> 00011111111111111111111111111111111111111111111111111100000000011111110000000111111111111111111111111111111111111111111111111111
> 00011111111111111111111111111111111111111111111111111100000000011111100000000111111111111111111111111111111111111111111111111111
> 00011111111111111111111111111111111111111111111111111100000000000000000000000111111111111111111111111111111111111111111111111111
> 00011111111111111111111111111111111111111111111111111110000000000000000000000111111111111111111111111111111111111111111111111111
> 00011111111111111111111111111111111111111111111111111110000000000000000000001111111111111111111111111111111111111111111111111111
> 00011111111111111111111111111111100011111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
> 00011111111111111111111111111111100011111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
> 00011111111111111111111111111111100011111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
> 00011111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
> 00011111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
> 00011111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
> 00011111111111111111111111111111000011110000000111000100000110000011110000001111000000000110000001111111111111111111111111111111
> 00011111111111111111111111111111100011100011100011000000000000000011100011000110001100011101110000111111111111111111111111111111
> 00011111111111111111111111111111100011000011100011000011000011100001000111000110001110001111111000111111111111111111111111111111
> 00011111111111111111111111111111100011000111100001000111100011100001000111000100001110001111111000111111111111111111111111111111
> 00011111111111111111111111111111100011000111100001000111100011100001000100000110001100011111100000111111111111111111111111111111
> 00011111111111111111111111111111100011000111100001000111100011100001000111111110001100011100011000111111111111111111111111111111
> 00011111111111111111111111111111100011000111100001000111100011100001000111111111000000111000111000111111111111111111111111111111
> 00011111111111111111111111111111100011000111100001000111100011100001000011111111001111111000111000111111111111111111111111111111
> 00011111111111111111111111111111100011000011100011000111100011100001100011111110001111111000111000111111111111111111111111111111
> 00011111111111111111111111111111100011100011000111000111100011100001100000000110000000011000010000111111111111111111111111111111
> 00011111111111111111111111111111100011111000001111000111100011100001111000011111000000000100001100011111111111111111111111111111
> 00011111111111111111111111111111111111111111111111111111111111111111111111111110111110000111111111111111111111111111111111111111
> 00011111111111111111111111111111111111111111111111111111111111111111111111111100011111000111111111111111111111111111111111111111
> 00011111111111111111111111111111111111111111111111111111111111111111111111111100011111000111111111111111111111111111111111111111
> 00011111111111111111111111111111111111111111111111111111111111111111111111111100011111001111111111111111111111111111111111111111
> 00011111111111111111111111111111111111111111111111111111111111111111111111111110011110011111111111111111111111111111111111111111
> 00011111111111111111111111111111111111111111111111111111111111111111111111111111000001111111111111111111111111111111111111111111
> 00011111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
> 
>

Like the Ascii art of old :)

Re: Help with iomega ix4-200d installation

$
0
0
I implemented that to troubleshoot some bit order issues but now that I have it working it's super helpful to get a sense for how things are showing up on the screen without having to physically sit in front of it.

Ascii art is a fun bonus.

Re: Debian on Synology RS816 (Armada 385)

$
0
0
bodhi Wrote:
-------------------------------------------------------
> Richard,
>
> Don't need to find it. Let me see if I can upload
> my Marvell xxx 38x u-boot GPL tarball that I got
> from the manufacturer for you to try to compile
> later. I'm also swamped right now with works so
> cannot spend much time to do this.


this link you said 1.4g and you have a slow speed of internet.

Re: Debian on Synology RS816 (Armada 385)

$
0
0
youxiaojie,

> this link you said 1.4g and you have a slow speed
> of internet.

I forgot all about this! will have to look if I had uploaded this tarball :)

Re: ix2-200 boots USB but not HDD

$
0
0
I reloaded my original HDDs with jessie rootfs and booted from the USB stick to try nandwrite with your uImage & uInitrd but it fails
root@debian:~# nandwrite -p /dev/mtd2 /mnt/uImage-bodhi
Image 4975416 bytes, NAND page 512 bytes, OOB area 16 bytes, device size 3145728 bytes
nandwrite: error!: Input file does not fit into device
           error 0 (Success)
nandwrite: error!: Data was only partially written due to error
           error 0 (Success)


I also tried copy your uImage & uInitrd to my USB stick and try booting with them but it stalls out booting the kernel
Marvell>> bootm 0x00800000 0x01100000
## Booting image at 00800000 ...
   Image Name:   Linux-5.2.9-kirkwood-tld-1
   Created:      2020-02-14  20:02:37 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    4975352 Bytes =  4.7 MB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
OK
## Loading Ramdisk Image at 01100000 ...
   Image Name:   initrd.img-5.2.9-kirkwood-tld-1
   Created:      2020-02-24  15:34:56 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    9713872 Bytes =  9.3 MB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.

Since I followed your technique to install rootfs on HDD can't I just boot from those uImage & uInitrd? I definitely broke something now because:
Hit any key to stop autoboot:  0

NAND read: device 0 offset 0x100000, size 0x300000
 3145728 bytes read: OK

NAND read: device 0 offset 0x1000000, size 0x1000000
 16777216 bytes read: ERROR
## Booting image at 00800000 ...
   Image Name:   Linux-3.16.0-6
   Created:      2020-02-06  12:34:50 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2076864 Bytes =  2 MB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
OK
## Loading Ramdisk Image at 02100000 ...
Bad Magic Number

IX4-200d - no boot - i think no HDD power

$
0
0
So after i reinstall the software using some help that i found online.

i got this now:

         __  __                      _ _
        |  \/  | __ _ _ ____   _____| | |
        | |\/| |/ _` | '__\ \ / / _ \ | |
        | |  | | (_| | |   \ V /  __/ | |
        |_|  |_|\__,_|_|    \_/ \___|_|_|
 _   _     ____              _
| | | |   | __ )  ___   ___ | |_
| | | |___|  _ \ / _ \ / _ \| __|
| |_| |___| |_) | (_) | (_) | |_
 \___/    |____/ \___/ \___/ \__|  ** uboot_ver:v1.1.1 **

 ** MARVELL BOARD: IX4-110 LE

U-Boot 1.1.4 (Mar 10 2011 - 15:01:57) Marvell version: 3.4.18

U-Boot code: 00600000 -> 0067FFF0  BSS: -> 006CF600

Soc: 88F6281 A1 (DDR2)
CPU running @ 1200Mhz L2 running @ 400Mhz
SysClock = 400Mhz , TClock = 200Mhz

DRAM CAS Latency = 5 tRP = 5 tRAS = 18 tRCD=6
DRAM CS[0] base 0x00000000   size 256MB
DRAM CS[1] base 0x10000000   size 256MB
DRAM Total size 512MB  16bit width
Found 0x20 i2c device
Set Power State as Always On
Addresses 8M - 0M are saved for the U-Boot usage.
Mem malloc Initialization (8M - 7M): Done
NAND:32 MB
Found ADT7473, program LED ...(led_volt=90)  OK
Found ADT7473, program thermal/Fan ...(pwm_min=0) (pwm_max=130) (therm=67) (temp_min=60)  OK

Marvell Serial ATA Adapter
Integrated Sata device found


CPU : Marvell Feroceon (Rev 1)
Found initrd at 0x2d8000

Streaming disabled
Write allocate disabled

Module 0 is RGMII
Module 1 is RGMII

USB 0: host mode
PEX 0: PCI Express Root Complex Interface
PEX interface detected Link X1
SCSI:  AHCI 0001.0000 32 slots 3 ports 3 Gbps 0x7 impl IDE mode
flags: 64bit ncq stag led pmp slum part
scanning bus for devices...
Net:   egiga0 [PRIME], egiga1
Hit any key to stop autoboot:  0

NAND read: device 0 offset 0xb0000, size 0x228000

Reading data from 0x2d7e00 -- 100% complete.
 2260992 bytes read: OK

NAND read: device 0 offset 0x2d8000, size 0x300000

Reading data from 0x5b9400 --  96% complete.reading NAND page at offset 0x5c0000 failed
 3145728 bytes read: ERROR
## Booting image at 02000000 ...
   Image Name:   Linux-2.6.22.18
   Created:      2012-01-05  18:29:43 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    1910204 Bytes =  1.8 MB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
OK
## Loading Ramdisk Image at 12000000 ...
   Image Name:
   Created:      2012-05-02  20:38:45 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    1831340 Bytes =  1.7 MB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK

Starting kernel ...

Uncompressing Linux.......................................................................................................................... done, booting the kernel.
Linux version 2.6.22.18 (soho@bsoho149.lss.emc.com) (gcc version 4.3.2 (crosstool-NG-1.3.1) ) #1 Thu Jan 5 13:29:36 EST 2012
CPU: ARM926EJ-S [56251311] revision 1 (ARMv5TE), cr=00053977
Machine: Feroceon-KW
Using UBoot passing parameters structure
Memory policy: ECC disabled, Data cache writeback
CPU0: D VIVT write-back cache
CPU0: I cache: 16384 bytes, associativity 4, 32 byte lines, 128 sets
CPU0: D cache: 16384 bytes, associativity 4, 32 byte lines, 128 sets
Built 1 zonelists.  Total pages: 130048
Kernel command line: console=ttyS0,115200 mtdparts=nand_mtd:0xa0000@0x0(uboot),0x10000@0xa0000(env),0x228000@0xb0000(zImage),0x300000@0x2d8000(initrd),32m@0x0(flash)
PID hash table entries: 2048 (order: 11, 8192 bytes)
Console: colour dummy device 80x30
Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
Memory: 256MB 256MB 0MB 0MB = 512MB total
Memory: 513920KB available (3520K code, 283K data, 120K init)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
NET: Registered protocol family 16

CPU Interface
-------------
SDRAM_CS0 ....base 00000000, size 256MB
SDRAM_CS1 ....base 10000000, size 256MB
SDRAM_CS2 ....disable
SDRAM_CS3 ....disable
PEX0_MEM ....base e8000000, size 128MB
PEX0_IO ....base f2000000, size   1MB
INTER_REGS ....base f1000000, size   1MB
NFLASH_CS ....base fa000000, size   2MB
SPI_CS ....base f4000000, size  16MB
BOOT_ROM_CS ....no such
DEV_BOOTCS ....no such
CRYPT_ENG ....base f0000000, size   2MB

  Marvell Development Board (LSP Version KW_LSP_4.2.7_patch21)-- IX4-110  Soc: 88F6281 A1 LE

 Detected Tclk 200000000 and SysClk 400000000
MV Buttons Device Load
Marvell USB EHCI Host controller #0: c0876600
PEX0 interface detected Link X1
PCI: bus0: Fast back to back transfers disabled
SCSI Scattered Spinup:
SCSI Scattered Spinup Feature Status: Enabled
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
NET: Registered protocol family 2
Time: kw_clocksource clocksource has been installed.
IP route cache hash table entries: 16384 (order: 4, 65536 bytes)
TCP established hash table entries: 65536 (order: 7, 524288 bytes)
TCP bind hash table entries: 65536 (order: 6, 262144 bytes)
TCP: Hash tables configured (established 65536 bind 65536)
TCP reno registered
checking if image is initramfs...it isn't (no cpio magic); looks like an initrd
Freeing initrd memory: 1788K
RTC registered
Use the XOR engines (acceleration) for enhancing the following functions:
  o RAID 5 Xor calculation
  o kernel memcpy
  o kenrel memzero
Number of XOR engines to use: 4
cesadev_init(c0011e28)
mvCesaInit: sessions=640, queue=64, pSram=f0000000
MV Buttons Driver Load
Registering unionfs 2.5.1 (for 2.6.22.19)
Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
io scheduler noop registered
io scheduler anticipatory registered (default)
Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing disabled
serial8250.0: ttyS0 at MMIO 0xf1012000 (irq = 33) is a 16550A
serial8250.0: ttyS1 at MMIO 0xf1012100 (irq = 34) is a 16550A
RAMDISK driver initialized: 16 RAM disks of 5120K size 1024 blocksize
loop: module loaded
Loading Marvell Ethernet Driver:
  o Cached descriptors in DRAM
  o DRAM SW cache-coherency
  o Single RX Queue support - ETH_DEF_RXQ=0
  o Single TX Queue support - ETH_DEF_TXQ=0
  o TCP segmentation offload enabled
  o Receive checksum offload enabled
  o Transmit checksum offload enabled
  o Network Fast Processing (Routing) supported
  o Driver ERROR statistics enabled
  o Driver INFO statistics enabled
  o Proc tool API enabled
  o Rx descripors: q0=128
  o Tx descripors: q0=532
  o Loading network interface(s):
    o eth0, ifindex = 1, GbE port = 0
    o eth1, ifindex = 2, GbE port = 1

mvFpRuleDb (c0ac0000): 16384 entries, 65536 bytes
e100: Intel(R) PRO/100 Network Driver, 3.5.17-k4-NAPI
e100: Copyright(c) 1999-2006 Intel Corporation
Marvell Storage Controller is found, using IRQ 9.
scsi0 : Marvell Storage Controller
Integrated Sata device found
scsi1 : Marvell SCSI to SATA adapter
scsi2 : Marvell SCSI to SATA adapter
NFTL driver: nftlcore.c $Revision: 1.98 $, nftlmount.c $Revision: 1.41 $
NAND device: Manufacturer ID: 0xec, Chip ID: 0x75 (Samsung NAND 32MiB 3,3V 8-bit)
Scanning device for bad blocks
5 cmdlinepart partitions found on MTD device nand_mtd
Using command line partition definition
Creating 5 MTD partitions on "nand_mtd":
0x00000000-0x000a0000 : "uboot"
0x000a0000-0x000b0000 : "env"
0x000b0000-0x002d8000 : "zImage"
0x002d8000-0x005d8000 : "initrd"
0x00000000-0x02000000 : "flash"
ehci_marvell ehci_marvell.70059: Marvell Orion EHCI
ehci_marvell ehci_marvell.70059: new USB bus registered, assigned bus number 1
ehci_marvell ehci_marvell.70059: irq 19, io base 0xf1050100
ehci_marvell ehci_marvell.70059: USB 2.0 started, EHCI 1.00, driver 10 Dec 2004
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
USB Universal Host Controller Interface driver v3.0
usb 1-1: new high speed USB device using ehci_marvell and address 2
usb 1-1: configuration #1 chosen from 1 choice
hub 1-1:1.0: USB hub found
hub 1-1:1.0: 4 ports detected
usbcore: registered new interface driver usblp
drivers/usb/class/usblp.c: v0.13: USB Printer Device Class driver
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
mice: PS/2 mouse device common for all mice
i2c /dev entries driver
attach_adapter....
adt7473_detect....
adt7473 0-002e: adt7473 chip found
md: linear personality registered for level -1
md: raid0 personality registered for level 0
md: raid1 personality registered for level 1
md: raid10 personality registered for level 10
raid6: int32x1     92 MB/s
raid6: int32x2    118 MB/s
raid6: int32x4    130 MB/s
raid6: int32x8     98 MB/s
raid6: using algorithm int32x4 (130 MB/s)
md: raid6 personality registered for level 6
md: raid5 personality registered for level 5
md: raid4 personality registered for level 4
raid5: measuring checksumming speed
   arm4regs  :  1087.200 MB/sec
   8regs     :   806.000 MB/sec
   32regs    :   881.200 MB/sec
raid5: using function: arm4regs (1087.200 MB/sec)
device-mapper: ioctl: 4.11.0-ioctl (2006-10-12) initialised: dm-devel@redhat.com
dm_crypt using the OCF package.
wix gpio_init
wix_lcm: WIX LCM driver version 0.1
TCP cubic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
md: Autodetecting RAID arrays.
md: autorun ...
md: ... autorun DONE.
RAMDISK: Compressed image found at block 0
EXT2-fs warning: checktime reached, running e2fsck is recommended
VFS: Mounted root (ext2 filesystem).
cat: can't open '/sys/block/sda/removable': No such file or directory
cat: can't open '/sys/block/sdb/removable': No such file or directory
cat: can't open '/sys/block/sdc/removable': No such file or directory
cat: can't open '/sys/block/sdd/removable': No such file or directory
mdadm: No devices to examine
cat: can't open '/sys/block///size': No such file or directory
mdadm: No devices to examine
cat: can't open '/sys/block///size': No such file or directory
mdadm: No devices to examine
cat: can't open '/sys/block///size': No such file or directory
mdadm: No devices to examine
cat: can't open '/sys/block///size': No such file or directory
Sys UUID is :0
Valid Disk 1 in md0:
Valid Disk 2 in md0:
Valid Disk 3 in md0:
Valid Disk 4 in md0:
USB Device node is /dev/sda1
Trying to see the if the reset button is pressed or not
Started
/dev/btns file does not exist creating it
Opened /dev/btns with fd 3
Reset Key Status: Button Id = 29 Push Count = 0 Release Count = 0
Checking for valid image in hard drives
mdadm: /dev/md0 not identified in config file.
e2fsck 1.41.3 (12-Oct-2008)
ext2fs_check_if_mouEXT2-fs: unable to read superblock
nt: No such fileFAT: unable to read boot sector
 or directory while determining whether /dev/md0 is mounted.
e2fsck: Invalid argument while trying to open /dev/md0

The superblock could not be read or does not describe a correct ext2
filesystem.  If the device is valid and it really contains an ext2
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
    e2fsck -b 8193 <device>

mount: mounting /dev/md0 on sysroot/boot failed: Input/output error
Checking if there is an attached EMC Imager
mount: mounting /dev/sda1 on /usb_drive failed: No such device or address
Going in to Network Imaging Mode
umount: cannot umount /dev/md0: Invalid argument
umount: cannot umount /usb_drive: Invalid argument
eth0: started
udhcpc (v1.9.2) started
Sending discover...
Sending discover...
Sending discover...
Sending discover...
Sending discover...
Sending discover...
Sending discover...
Sending discover...
Sending discover...
Sending discover...
No lease, failing
Device Model- ix4-200d
Device: Socket Listening on: 2081
Mac address = 00:50:43:d2:12:36
Send: Network is unreachable
Mounting config image...
mount: mounting /sysroot/boot/images/config on /sysroot/boot/etc failed: No such file or directory
umount: cannot umount /sysroot/boot/etc: Invalid argument
umount: cannot umount /dev/md0: Invalid argument
Constructing root filesystem...
cp: cannot stat '/sysroot/mnt/apps/ram': No such file or directory
Bootstrapping ...
Initialization complete.
Freeing init memory: 120K
init started: BusyBox v1.9.2 (2012-01-05 15:00:07 EST)
starting pid 425, tty '': '/etc/init.d/rcS'
starting pid 428, tty '': 'umount'
BusyBox v1.9.2 (2012-01-05 15:00:07 EST) multi-call binary

Usage: umount [flags] FILESYSTEM|DIRECTORY

Unmount file systems

Options:

        -r      Try to remount devices as read-only if mount is busy
        -l      Lazy umount (detach filesystem)
        -f      Force umount (i.e., unreachable NFS server)
        -D      Do not free loop device (if a loop device has been used)

The system is going down NOW!
Sending SIGTERM to all processes
Sending SIGKILL to all processes
Requesting system reboot
md: stopping all md devices.
Restarting system.
Reseting !!

This is what i didi before that:
Required Software:
• Winrar or compatible software
• Putty
• TFTPD server - tftpd64.450.rar
• Recovery package - ix4-200d-recovery-2.1.42.18967.rar
• Recovery files - files.rar
• Firmware package - ix4-200d-2.1.48.30125.tgz

Required Hardware:
• Iomega IX4-200d with HDD's
• TTL to USB cable
• USB thumb drive
• Spare network cable

USB Thumb drive preparation:
1) Format a USB thumb drive with fat32 
2) Decompress "ix4-200d-recovery-2.1.42.18967.rar"
3) Copy the emctools folder (and subfolders) to USB drive.


Target hard drive preparation:
1) Delete all partitions (If any exists) (I Used GParted Live CD)

Iomega IX4-200d preparation:
1) Put target hard drive into slot 1 (Other slots empty)
2) Attach TTL cable to three header pins (See pinout.jpg) 
	a. Ground wire to Ground pin
	b. TX wire to RX pin
	c. RX wire to TX pin
	d. Don’t connect the red (power) wire
3) Insert USB thumb drive prepared earlier in the back of the Iomega IX4-200d

PC preparations:
1) Attach Ethernet cable between PC and Iomega IX4-200d
2) Install drivers for TTL cable before connecting cable
	a. Attach TTL cable to PC – Wait for driver to load
	b. Write down the COM port (Usually COM3)
3) Decompress "files.rar"
4) Copy zImage and initrd files to folder containing the TFTPD64.EXE server
5) Disable any TFTP servers on system if any exist
6) Set the following static IP address - 10.4.50.5
7) Turn off Windows Firewall
8) Start the server program TFTPD64.EXE 
9) Start putty 
	a. Select connection type serial
	b. Set speed to 115200 
	c. Set serial line to the Com port assigned to the TTL cable
	e. Select “serial” category on left
	f. Ensure data bits 8, stop bits 1, Parity None, Flow XON/XOFF
	g. Set the values accordingly if necessary
10) Open the session (“Open” button at bottom)


Starting the recovery process:
1) Turn on the Iomega IX4-200d and watch boot process in putty window.
	a. If nothing appears in the putty window
		i. Check the TTL wiring on the Iomega IX4-200d
		ii. Double check the port setting in putty 
2) Press any key after the boot process starts
	a. "press any key to interrupt the autoboot..." message for 1 second
	b. marvell>>
3) Retry 1 and 2 until you get to the marvell>> prompt 
4) Copy and paste the following commands at the prompt, one at a time and press enter key:
resetenv
tftpboot 0x2000000 zImage
tftpboot 0x12000000 initrd
nand erase 0x2d8000 0x2e4047
nand erase 0xb0000 0x1fb1d8
nand write.e 0x12000000 0x2d8000 0x2e4047
nand write.e 0x2000000 0x0b0000 0x1fb1d8
reset
5) The NAS will reboot, create the boot partitions on hard drive, populate them, and power off.
6) Remove the USB stick from the Iomega IX4-200d.
7) Connect Iomega IX4-200d back to router/switch
8) Put additional prepared hard drives into Iomega IX4-200d (if you wish) in sequence
9) Turn the PC firewall back on
10) Reset PC network adapter settings and connect PC to router/switch
11) Shut down TFPTD server on PC
12) Power on the Iomega IX4-200d

Final Steps:
1) Wait for Iomega IX4-200d to fully boot up (100%)
2) The front display will include the IP address assigned to the Iomega IX4-200d-200d
3) Open your browser and navigate to the Iomega IX4-200d IP address
4) Upgrade to the lattest firmware v2.1.48.30125 by installing the "ix4-200d-2.1.48.30125.tgz"
5) Configure the device to meet your requirements
6) It will take many hours for the Iomega IX4-200d to reconfigure the disks for use but you're all set.

in case you need it
Marvell>> printenv
bootdelay=1
baudrate=115200
loads_echo=0
ipaddr=10.4.50.165
serverip=10.4.50.5
rootpath=/mnt/ARM_FS/
netmask=255.255.255.0
run_diag=yes
CASset=min
MALLOC_len=1
ethprime=egiga0
bootargs_root=root=/dev/nfs rw
bootargs_end=:::DB88FXX81:eth0:none
image_name=uImage
console=console=ttyS0,115200 mtdparts=nand_mtd:0xa0000@0x0(uboot),0x00010000@0x000a0000(param),32m@0x0(flash)
uboot_start=0x0
uboot_size=0xa0000
env_start=0xa0000
env_size=0x10000
kernel_start=0xb0000
kernel_size=0x228000
initrd_size=0x300000
make_boot_args=setenv bootargs console=ttyS0,115200 mtdparts=nand_mtd:$(uboot_size)@$(uboot_start)(uboot),$(env_size)@$(env_start)(env),$(kernel_size)@$(kernel_start)(zImage),$(initrd_size)@$(initrd_start)(initrd),32m@0x0(flash);
flash_load=run make_boot_args;nand read.e 0x2000000 $(kernel_start) $(kernel_size);nand read.e 0x12000000 $(initrd_start) $(initrd_size);bootm 0x2000000 0x12000000;
bootcmd=run flash_load;
standalone=fsload 0x2000000 $(image_name);setenv bootargs $(console) root=/dev/mtdblock0 rw ip=$(ipaddr):$(serverip)$(bootargs_end); bootm 0x2000000;
ethaddr=00:50:43:d2:12:36
ethmtu=1500
mvNetConfig=mv_net_config=(00:11:88:0f:62:81,0:1:2:3),mtu=1500
usb0Mode=host
nandEcc=1bit
netretry=no
rcvrip=169.254.100.100
loadaddr=0x02000000
autoload=no
uboot_ver=v1.1.1
stdin=serial
stdout=serial
stderr=serial
mainlineLinux=no
enaMonExt=no
enaCpuStream=no
enaWrAllo=no
pexMode=RC
disL2Cache=no
setL2CacheWT=yes
disL2Prefetch=yes
enaICPref=yes
enaDCPref=yes
sata_dma_mode=yes
netbsd_en=no
vxworks_en=no
initrd_start=0x2d8000
disaMvPnp=no
eth1addr=00:50:43:d2:12:37
enaAutoRecovery=yes
pcieTune=no
ethact=egiga0

Environment size: 1627/16380 bytes

can someone help me?

Re: ix2-200 boots USB but not HDD

$
0
0
Quote

I reloaded my original HDDs with jessie rootfs and booted from the USB stick to try nandwrite with your uImage & uInitrd but it fails
root@debian:~# nandwrite -p /dev/mtd2 /mnt/uImage-bodhi
Image 4975416 bytes, NAND page 512 bytes, OOB area 16 bytes, device size 3145728 bytes
nandwrite: error!: Input file does not fit into device
error 0 (Success)
nandwrite: error!: Data was only partially written due to error
error 0 (Success)

It failed because uImage is larger than the mtd2 size. Now the uImage on NAND has been corrupted. You can't boot with it any more.

Quote

I also tried copy your uImage & uInitrd to my USB stick and try booting with them but it stalls out booting the kernel

You will need to follow the rootfs installation instruction step by step while creating the USB rootfs. And in addition to that, when attempt to boot, some envs are needed to be adjusted (booting with stock u-boot).

=================



Let's do that USB rootfs. Note that you need to do Step 4.


Quote

Updated 25 Aug 2019:

Basic Debian buster Kirkwood rootfs for most Kirwood plugs:

- tarball size: 209M
- install size: 536M
- The init system used in this rootfs is sysvinit . To boot with systemd, see note 2 below.
- Installed packages: nano, avahi, ntp, busybox-syslogd (log to RAM), htop, isc-dhcp-client, dialog, bzip2, nfs server/client, iperf, ethtool, sysvinit-core, sysvinit, sysvinit-utils, u-boot-tools, and mtd-utils.
- see LED controls in /etc/rc.local, and /etc/init.d/halt
- see some useful aliases in /root/.profile
- root password: root

Download at Dropbox:

Debian-5.2.9-kirkwood-tld-1-rootfs-bodhi.tar.bz2

md5:
cd8ad170aa1a9fdc2a0a1c43ab1c0721
sha256:
8ccbbced367b4c2bf3728262e882f8232aff0fecd1c0c767219a0cab49a0b9bf


And remember to check the hash of what you download, as always.

Installation:

Installation can be done on any Linux box, with a fresh USB drive (SD card or HDD would work fine too).

Note: all steps below must be done while logging in as root user (not sudo). If you are not the root user then don't continue, because the rootfs will not work.

1. Format a new USB drive with a single Ext3 partition, and label it rootfs. If you are running the latest U-Boot for Kirkwood then you can use Ext4.

2. Mount the drive on a Linux box. cd to top level directory and extract it. It is assuming the USB drive is mounted at /media/sdb1
cd /media/sdb1
tar -xjf Debian-5.2.9-kirkwood-tld-1-rootfs-bodhi.tar.bz2

3. Adjust fstab (optional).

Edit /media/sdb1/etc/fstab entry for root device to match the rootfstype of your rootfstype if you use Ext4 or Ext2. However, you can keep it as is without problem in booting since the kernel will figure out which file system the rootfs was formatted.

LABEL=rootfs / ext3 noatime,errors=remount-ro 0 1

4. Create uImage with embedded DTB for booting with older u-boots (2012 or earlier). Do not do this step if you have installed the latest U-Boot for Kirkwood (or are installing this u-boot at the same time).

Please replace kirkwood-goflexnet.dtb below with the correct DTB name for your box (see the folder /media/sdb1/boot/dts for the exact spelling of your Kirkwood box name).

Generate the uImage with DTB embedded inside:
cd /media/sdb1/boot
cp -a zImage-5.2.9-kirkwood-tld-1 zImage.fdt
cat dts/kirkwood-goflexnet.dtb >> zImage.fdt
mv uImage uImage.orig
mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n Linux-5.2.9-kirkwood-tld-1 -d zImage.fdt uImage
sync

If your Linux box does not have mkimage, then install it

apt-get install u-boot-tools

5. Done. Take this USB rootfs to your plug and cold start. After booted into Debian, see Note1 and Note2 below. It is very important that you do Note1 steps to secure your box.

And plug in the USB rootfs, start serial console, and power up the box. Interrupt serial console and

printenv

I will post a few envs adjustment to boot with this rootfs.
Viewing all 26623 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>