Quantcast
Channel: Linux Device Hacking
Viewing all 47100 articles
Browse latest View live

Re: Changes in SD Card access in U-Boot 2017.07-tld-1?

$
0
0
Derek,

> Yea, I have tested another SD card briefly, and
> seems to have the same results...

Try Sandisk.

>
> Do you recall which version of uBoot you started
> with the 'improved' MMC access? I am thinking of
> downgrading the uBoot to make sure it boots
> everytime...

That would be the version before 2017.07-tld-1:

https://forum.doozan.com/read.php?3,12381

Quote

Last Updated 28 Oct 2017
Updated 06 Dec 2017 (replace Sheevaplug with newer version 2017.07-tld-2)

I've uploaded 2017.07-tld-1 U-Boot images for Pogo E02, GoFlexNet, GoFlex Home, Dockstar, Pogo V4/Mobile, iConnect, Netgear Stora, Sheevaplug, NSA320, NSA325, NSA310S/320S, NSA310, HP-T5325, and Dreamplug.

The HP Thin Client T5325 installation procedure is different from other Kirkwood u-boots, see this thread for installation instruction and download link..

The Marvell Dreamplug box installation procedure is different from other Kirkwood u-boots, see this thread for installation instruction and download link.

New/updated in 2017.07-tld-1 version:

- Rebase u-boot code to track mainline 2017.07.
- Incorporated patch to fix "EHCI timed out on TD" error with USB drives.
- SD cards: Use the mainline version of MMC driver for Pogo V4/Mobile and Sheevaplug

Re: Dell Wyse T10 / T50

$
0
0
Koen,

> according to this document it should have 1Gbs.
> http://www.netsolutionworks.com/datasheets/Dell-Wyse-T-class-IA.pdf.

Yes. It is 1Gbs.

> My last comment isn't meant as a complaint, I
> wouldn't have got this far without your help. Just
> hoping that someone reading the forum may have
> some clever ideas how to continue from here on.
>

The dove-wyse-t50.dts file I've attached is an example of how to proceed. This SoC DTS tree has everything we need already (except Ethernet which might take some works). We just need to turn it on in the dove-wyse-t50.dts. See the SPI and PCIe nodes? we don't repeat the whole definition, just the status.


> I've appended your latest dtb file and rebooted
> the device. The dmesg output is attached below.
>

It looks very good! everything seems to work.

Ethernet is an issue that can be resolved by looking inside stock OS, or the GPL source.

Re: How to unbrick GoFlex Home?

$
0
0
balanga

I expected the envs contains mtdparts definition, so we don't have to calculate it. But it was apparently not available so I need to define the layout.

Re: Dell Wyse T10 / T50

$
0
0
Quote

I've checked the uImage of the original system but it doesn't have a dtb file appended.

This stock kernel is too old to have DTB in it. Flatten Device Tree was introduced into the Linux kernel circa 3.16. In a non-FDT kernek, all hardware devices were defined in the source code. Therefore GPL is an easy way to find info.

Re: How to unbrick GoFlex Home?

Help with Netgear Stora u-boot installation

$
0
0
Hello!

I have Netgear Stora.

login as: admin
Stora version 10.0.x
-bash-3.2$ cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00100000 00020000 "u-boot"
mtd1: 00600000 00020000 "uImage"
mtd2: 0f900000 00020000 "root"
Problem no.1:
-bash-3.2$ sudo fw_printenv ethaddr
audit_log_user_command(): Connection refused
Warning: Bad CRC, using default environment
## Error: "ethaddr" not defined
Quote
current_envs.txt
bootcmd=bootp; setenv bootargs root=/dev/nfs nfsroot=${serverip}:${rootpath} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off; bootm
bootdelay=5
baudrate=115200

Problem no.2 (?):
bash-3.2# dmesg | grep -i 'bad'
Scanning device for bad blocks
Bad eraseblock 120 at 0x00f00000
Bad eraseblock 1144 at 0x08f00000
Bad eraseblock 1352 at 0x0a900000
Bad eraseblock 2010 at 0x0fb40000
Bad eraseblock 2011 at 0x0fb60000
UBI: number of bad PEBs:         5
UBI: number of PEBs reserved for bad PEB handling: 38
Not Problem? All OK?

Problem no.3:
Quote
bodhi
(replace xxx with the real saved values)
fw_setenv mtdparts 'xxxxxxxxx'
fw_setenv ethaddr 'xx:xx:xx:xx:xx:xx'
ethaddr I look in DHCP, ok.
Where to find mtdparts? Default value for Stora?

Thanx!

Re: How to unbrick GoFlex Home?

Re: 2017.07 U-Boot Kirkwood - GoFlexNet, GoFlexHome, PogoE02, Dockstar, iConnect, NetgearStora, PogoV4/Mobile, Sheevaplug, NSA325, NSA320, NSA310S, NSA320S, NSA310, HP T5325, Dreamplug


Re: Help with Netgear Stora u-boot installation

$
0
0
igrblkv,


Problem no.1 and Problem no.2 are OK.

You are in stock OS, and the fw_printenv/setenv are not available.

The bad blocks are far away from mtd0, where u-boot is.

Problem no.3

New u-boot installation does not require mtdparts and ethaddr. A local MAC address will be used. And then you can set it to the real one later.

Re: How to unbrick GoFlex Home?

$
0
0
bodhi Wrote:
-------------------------------------------------------
> balanga Wrote:
> -------------------------------------------------------
> > What is preventing me re-installing Stock from
> a
> > USB stick?
> >
> >
> http://support.goflexhome.hipserv.com/en/reflash/index.html
>
> Have you tried that factory restore?

Not yet, I was scared of breaking something.

Re: Help with Netgear Stora u-boot installation

$
0
0
OK!
-bash-3.2$ sudo flash_erase /dev/mtd0 0 4
audit_log_user_command(): Connection refused
Erasing 128 Kibyte @ 60000 -- 100 % complete

-bash-3.2$ sudo nandwrite /dev/mtd0 uboot.2017.07-tld-1.netgear_ms2110.mtd0.kwb
audit_log_user_command(): Connection refused
Writing data to block 0 at offset 0x0
Writing data to block 1 at offset 0x20000
Writing data to block 2 at offset 0x40000
Writing data to block 3 at offset 0x60000

-bash-3.2$ cd /tmp
-bash-3.2$ tar -xf uboot.2016.05-tld-1.environment.bodhi.tar

-bash-3.2$ sudo flash_erase /dev/mtd0 0xc0000 1
audit_log_user_command(): Connection refused
Erasing 128 Kibyte @ c0000 -- 100 % complete

-bash-3.2$ sudo nandwrite -s 786432 /dev/mtd0 uboot.2016.05-tld-1.environment.img
audit_log_user_command(): Connection refused
Writing data to block 6 at offset 0xc0000

-bash-3.2$ sudo fw_setenv arcNumber 2743
audit_log_user_command(): Connection refused
-bash-3.2$ sudo fw_setenv machid
audit_log_user_command(): Connection refused
-bash-3.2$ sudo fw_setenv bootcmd_uenv 'run uenv_load; if test $uenv_loaded -eq 1; then run uenv_import; fi; sleep 3'
audit_log_user_command(): Connection refused

Can I load the old system (aka stock OS) with the new uBoot?
OR
How can I install Debian on disks (I want RAID1, e.g.: http://www.sysadmin.in.ua/info/index/21/24/29 ) without USB-flash drive? There is a TFTP, but did not find any "live" links with uImage.di/uInitrd.di/uImage/uInitrd... E.g.: https://sites.google.com/site/samelent/ustanovka-debian-na-netgear-stora

THANKS!

Re: Help with Netgear Stora u-boot installation

$
0
0
igrblkv Wrote:
> Can I load the old system (aka stock OS) with the
> new uBoot?

setenv mainlineLinux 'no'
setenv arcNumber
setenv bootcmd_ide
setenv bootcmd 'nand read.e 0x800000 0x100000 0x300000; setenv bootargs $(console) $(bootargs_root); bootm 0x800000'
saveenv
reset
DO NOT WORK!

U-Boot 2017.07-tld-1 (Sep 05 2017 - 00:38:05 -0700)
Netgear Stora MS2110

SoC:   Kirkwood 88F6281_A0
DRAM:  128 MiB
WARNING: Caches not enabled
NAND:  256 MiB
In:    serial
Out:   serial
Err:   serial
Net:   egiga0
PHY reset timed out
88E1116 Initialized on egiga0
Hit any key to stop autoboot:  0

NAND read: device 0 offset 0x100000, size 0x300000
 3145728 bytes read: OK
## Booting kernel from Legacy Image at 00800000 ...
   Image Name:   Linux-2.6.22.18-Netgear
   Created:      2010-06-13  23:54:53 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2788728 Bytes = 2.7 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK

Starting kernel ...

Uncompressing Linux............................................................................................................................................................ done, booting the kernel.

Re: How to unbrick GoFlex Home?

$
0
0
balanga Wrote:
-------------------------------------------------------
> bodhi Wrote:
> -------------------------------------------------------
> > balanga Wrote:
> >
> -------------------------------------------------------
> > > What is preventing me re-installing Stock
> from
> > a
> > > USB stick?
> > >
> > >
> >
> http://support.goflexhome.hipserv.com/en/reflash/index.html
> >
> > Have you tried that factory restore?
>
> Not yet, I was scared of breaking something.

I just tried and it would not restore, but thankfully did not beak anything.

Re: Help with Netgear Stora u-boot installation

$
0
0
igrblkv,

1. When hacking, ie. installing u-boot and rootfs, you should be root. Never use sudo. sudo is for a standard user.

2. Can I load the old system (aka stock OS) with the new uBoot?

No it will not work with stock OS.

3. See here for Debian rootfs installation:

https://forum.doozan.com/read.php?2,12096

Quote

Latest released kernel:linux-4.17.2-kirkwood-tld-1-bodhi.tar.bz2 (23 June 2018)
Latest released rootfs: Debian-4.12.1-kirkwood-tld-1-rootfs-bodhi.tar.bz2 (24 Jul 2017)

Note: If this is your first time installation, then you need rootfs Debian-4.12.1-kirkwood-tld-1-rootfs-bodhi.tar.bz2 (this has kernel 4.12.1-kirkwood-tld-1 already installed).

Scroll down to

Quote

Updated 24 Jul 2017:

Basic Debian stretch Kirkwood rootfs for most Kirwood plugs:

- tarball size: 188M
- install size: 488M
- 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, and sysvinit-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-4.12.1-kirkwood-tld-1-rootfs-bodhi.tar.bz2

md5:
bf3d29569943875df348fb5ca03b348c
sha256:
4ed5714fdb123cdb40e973f3d0754e91cd199b75a9874018f2b5dc9cfa8ae8bb

Re: How to unbrick GoFlex Home?

$
0
0
bodhi Wrote:
-------------------------------------------------------
> balanga
>
> I expected the envs contains mtdparts definition,
> so we don't have to calculate it. But it was
> apparently not available so I need to define the
> layout.



Log in to Arch, and set mtdparts:

fw_setenv mtdparts 'mtdparts=orion_nand:1M(u-boot),6M(uImage),-(root)'

Reboot. Log back into Arch.

cat /proc/mtd


Now look at the mtd dumps one more time to confrimr (this time use the -h option to see the size better).

ls -larth mtd

Re: How to unbrick GoFlex Home?

$
0
0
bodhi Wrote:
-------------------------------------------------------
>
> Reboot. Log back into Arch.
>
>
> cat /proc/mtd
>

[root@alarm ~]# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00100000 00020000 "u-boot"
mtd1: 00600000 00020000 "uImage"
mtd2: 0f900000 00020000 "root"

This the same as Stock.


>
> Now look at the mtd dumps one more time to
> confrimr (this time use the -h option to see the
> size better).
>
>
> ls -larth mtd
>

Not sure I understand this.... Do I run it from /proc?

I get:-

[root@alarm /]# cd /proc
[root@alarm proc]#  ls -larth mtd
-r--r--r-- 1 root root 0 Aug 12 18:10 mtd

[root@alarm proc]# cat mtd
dev:    size   erasesize  name
mtd0: 00100000 00020000 "u-boot"
mtd1: 00600000 00020000 "uImage"
mtd2: 0f900000 00020000 "root"

Now do I run:-

flash_erase /dev/mtd0
nandwrite -on /dev/mtd0 mtd0
flash_erase /dev/mtd1
nandwrite -on /dev/mtd1 mtd1
flash_erase /dev/mtd2
nandwrite -on /dev/mtd2 mtd2

Presumably I need to mount the USB stick first and cd to the directory which contains mtd0 mtd1 mtd2...

Re: How to unbrick GoFlex Home?

$
0
0
I just gave it a shot running this shell script:-

/mnt/usb is my mounted USB stick containing the mtd files as well as tools

cd /mnt/usb/tools
./flash_erase /dev/mtd0
./nandwrite -on /dev/mtd0 /mnt/usb/mtd/mtd0
./flash_erase /dev/mtd1
./nandwrite -on /dev/mtd1 /mnt/usb/mtd/mtd1
./flash_erase /dev/mtd2
./nandwrite -on /dev/mtd2 /mnt/usb/mtd/mtd2

This is what I got:-

Script started on 2018-08-12 22:57:07+00:00
root@alarm:/mnt/smb/gfh
[root@alarm gfh]# sh restore
restore: line 2: ./flash_erase: Permission denied
restore: line 3: ./nandwrite: Permission denied
restore: line 4: ./flash_erase: Permission denied
restore: line 5: ./nandwrite: Permission denied
restore: line 6: ./flash_erase: Permission denied
restore: line 7: ./nandwrite: Permission denied
[root@alarm:/mnt/smb/gfh
[root@alarm gfh]# exit
exit

Script done on 2018-08-12 22:58:52+00:00

Re: kwboot

$
0
0
Not seeming to make any progress.... Looking on Github there is the u-boot git - https://github.com/u-boot/u-boot which contains kwboot under tools, but I can't figure out where to get started. I only want to build kwboot. Any clues would be appreciated.

Re: How to unbrick GoFlex Home?

$
0
0
Your Arch mtds now is the same as stock. So yes, you are ready to flash the nanddumped mtds.

[root@alarm ~]# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00100000 00020000 "u-boot"
mtd1: 00600000 00020000 "uImage"
mtd2: 0f900000 00020000 "root"

Now for sanity. Recall you listed the mtds in stock OS this way.

bash-3.2# ls -al mtd 
total 262424 
drwxr-xr-x 2 root root 4096 Aug 11 12:15 . 
drwxr-xr-x 5 root root 4096 Aug 11 12:04 .. 
-rw-r--r-- 1 root root 1048576 Aug 11 12:15 mtd0 
-rw-r--r-- 1 root root 6291456 Aug 11 12:15 mtd1 
-rw-r--r-- 1 root root 261095424 Aug 11 12:17 mtd2

Now repeat that with -h so that we can see the size of the mtd dumps in MBytes.

 
cd /mnt/usb
ls -lath mtd

To make the binaries executable

cd /mnt/usb/tools
chmod +x flash_erase
chmod +x flash_erase

And your script looks OK

cd /mnt/usb/tools
./flash_erase /dev/mtd0
./nandwrite -on /dev/mtd0 /mnt/usb/mtd/mtd0
./flash_erase /dev/mtd1
./nandwrite -on /dev/mtd1 /mnt/usb/mtd/mtd1
./flash_erase /dev/mtd2
./nandwrite -on /dev/mtd2 /mnt/usb/mtd/mtd2

Re: How to unbrick GoFlex Home?

$
0
0
bodhi Wrote:
-------------------------------------------------------
>
> And your script looks OK
>
>
> cd /mnt/usb/tools
> ./flash_erase /dev/mtd0
> ./nandwrite -on /dev/mtd0 /mnt/usb/mtd/mtd0
> ./flash_erase /dev/mtd1
> ./nandwrite -on /dev/mtd1 /mnt/usb/mtd/mtd1
> ./flash_erase /dev/mtd2
> ./nandwrite -on /dev/mtd2 /mnt/usb/mtd/mtd2
>

flash_erase: error!: no start erase block specified
flash_erase: error!: no erase block count specified
flash_erase: error!: Try `--help' for more information
Input file is not page-aligned. Use the padding option.
nandwrite: error!: Data was only partially written due to error
Viewing all 47100 articles
Browse latest View live


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