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

Re: Tutorial of native sata boot for pogoplug pro

$
0
0
Bodhi and Shnee, I have been able to access repeatedly and my terminal allows me to copy and paste text only after reboot for some reason but here is where I am at so far:

 root@Desktop-MS-7578:/home/russ# picocom -b 115200 /dev/ttyUSB0
picocom v2.2

port is        : /dev/ttyUSB0
flowcontrol    : none
baudrate is    : 115200
parity is      : none
databits are   : 8
stopbits are   : 1
escape is      : C-a
local echo is  : no
noinit is      : no
noreset is     : no
nolock is      : no
send_cmd is    : sz -vv
receive_cmd is : rz -vv -E
imap is        : 
omap is        : 
emap is        : crcrlf,delbs,

Type [C-a] [C-h] to see available commands

Terminal ready

U-Boot SPL 2013.10-ga72eb8f-dirty (Feb 19 2014 - 15:21:12)
  Boot device: SATA
Attempting to set PLLA to 800 MHz ...
  plla_ctrl0 : 0000030a
  plla_ctrl1 : 00400000
  plla_ctrl2 : 007f0068
  plla_ctrl3 : 00000193

PLLA Set
Bus 0: OK 
  Device 0: 
reading bootargs.bin
reading u-boot.img
reading u-boot.img


U-Boot 2013.10-ga72eb8f-dirty (Feb 19 2014 - 15:21:12) for OXNAS

DRAM:  128 MiB
IDE:   Bus 0: OK 
  Device 0: Model: WDC WD7500BPKT-75PK4T0 Firm: 01.01A01 Ser#:  WD-WXD1A61R3456
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 715404.8 MB = 698.6 GB (1465149168 x 512)
NAND:  128 MiB
reading u-boot.env
In:    serial
Out:   serial
Err:   serial
Net:   mii0
## Error: "safeboot" not defined
Hit any key to stop autoboot:  0 
** File not found /boot/uImage **
** File not found /boot/dts/ox820-pogoplug-classic.dtb **
libfdt fdt_check_header(): FDT_ERR_BADMAGIC
No FDT memory address configured. Please configure
the FDT address via "fdt addr <address>" command.
Aborting!
Wrong Image Format for bootm command
ERROR: can't get kernel image!
OX820 # printenv
SET_dtb=fdt addr ${fdtaddr} ; fdt header
autoload=no
baudrate=115200
bootcmd=run ideboot
bootdelay=3
bootnew=bootm 60000000 - 61000000
bootold=bootm 60000000
console=console=ttyS0,115200n8
ethact=mii0
ethaddr=74:F0:6D:6A:1D:17
ext2_dtb=ext2load ide 0:2 61000000 /boot/dts/ox820-pogoplug-classic.dtb
ext2_ideboot=run ext2_uimage ; run ext2_dtb ; run SET_dtb ; run bootnew
ext2_uimage=ext2load ide 0:2 60000000 /boot/uImage
ext4_dtb=ext4load ide 0:2 61000000 /boot/dts/ox820-pogoplug-classic.dtb
ext4_ideboot=run ext4_uimage ; run ext4_dtb ; run SET_dtb ; run bootnew
ext4_uimage=ext4load ide 0:2 60000000 /boot/uImage
fdtaddr=61000000
filesize=1b79
ideboot=run ext4_ideboot
idebootold=${loadold} ;${bootold}
imgaddr=60000000
ipaddr=10.0.0.71
keypressed=1
mtdids=nand0=41000000.nand
mtdparts=mtdparts=41000000.nand:14m(boot),-(data)
netcon=echo switch to net console;setenv stderr nc;setenv stdin nc;setenv stdout nc;echo switch to net console
preboot=run safeboot
serialcon=echo switch to serial console;setenv stderr serial;setenv stdin serial;setenv stdout serial;echo switch to serial console
stderr=serial
stdin=serial
stdout=serial
updboot=bootp;tftp 60000000 u-boot.img;ide write 60000000 400 400

Environment size: 1267/16380 bytes
OX820 #



Thanks for getting me in!!!!! will do more later:) Echowarrior108

Re: Garbage characters on directory and/or file name

$
0
0
So it looks like you got it sorted out. Great! Right after I posted I thought about locales and dpkg-reconfigure and the trouble I had long ago with foreign characters. That was going to be my next suggestion, but you beat me to it.

-JT

Re: cmake complains g++-7 is not able to compile a simple test program.

$
0
0
Did you also install g++-7 when you installed gcc-7? If not, try to install it the same way you installed gcc-7.

-JT

Re: Tutorial of native sata boot for pogoplug pro

$
0
0
echowarrior108,

Congrats :)

At this point, it is unbricked :) Now you can boot into Debian. And set up booting with USB rootfs. Keep this HDD as a rescue mechanism, until you can boot with u-boot in NAND and USB rootfs. After that, you can switch back to HDD rootfs if you like to do that.

Re: Tutorial of native sata boot for pogoplug pro

Re: Garbage characters on directory and/or file name

$
0
0
JT,

I don't recall using dpkg-reconfigure at all. I think if you apt-get install locales, everything should be good.

Re: Install Debian on Seagate GoFlex's hard drive

$
0
0
bodhi Wrote:
-------------------------------------------------------
> dips0502,
>
> > The current value for these variables are:
> >
> > rootfstype=ext3
> > mtdparts=mtdparts=orion_nand:1M(u-boot),4M(uImage),32M(rootfs),-(data)
> >
> >
> > I guess I should be keeping these. Just need a confirmation.
>
> Yes, it looks good. That's the correct mtdparts. And remmeber when you created the rootfs on USB stick, the instruction said use Ext3. So if you did that then this env rootfstype is correct. Also make sure the ethaddr was set to your MAC address.
>
Hello Bodhi,

Now, I am trying to flash your u-boot on my Seagate GoFLEX Home as well as my Seagate GoFLEX NET. It looks like the same as a Seagate Dockstar's mtdparts you mentioned here. So, I reckon it safe to use the above mtdparts and with the following command for both my Seagate GoFLEX Home and/or Seagate GoFLEX NET.
fw_setenv mtdparts 'mtdparts=orion_nand:1M(u-boot),4M(uImage),32M(rootfs),-(data)'

Also, since I will be formatting my SATA HDD with an EXT4, then I should change from rootfstype=ext3 to rootfstype=ext4 in the environment setting, right?

Re: Debian Installation on Thecus N2350 (Marvell Armada 385)

$
0
0
lordzahl,

> @bodhi: Okay, if i understand you correctly i
> should still use the dtb from your Debian/linux
> Images. We also do not need the kernel config. The
> only thing which is missing (at the moment) is the
> USB power.

Correct.

>
> So i was thinking, the dts, which is used for this
> box does indeed not enable USB power on boot. We
> can see that, since i was not able to boot the box
> with stock kernel and dtb from usb.

True.

> But there are other dts files for 385/388
> processors, which show how to enable usb power.
> The talk about gpio pin 12 in gpio1 (there seem to
> be to gpio groups 0 and 1).
> I'll attach the dts files to this post.
> The armada-38x-modular.dts shows also how to power
> up USB via a "gpio expander".

Yes, I did implement USB power for the Zyxel NAS326. Each box is likely to have a different GPIO for USB power. For the NAS326:

armada-380-zyxel-nas326.dts
+                usb2_power: regulator@1 {
+                        compatible = "regulator-fixed";
+                        reg = <1>;
+                        regulator-name = "USB2 Power";
+                        regulator-min-microvolt = <5000000>;
+                        regulator-max-microvolt = <5000000>;
+                        enable-active-high;
+                        regulator-always-on;
+                        regulator-boot-on;
+                        gpio = <&gpio1 11 GPIO_ACTIVE_HIGH>;
+                };

So we can search the GPL for this number. If you found the code you think is right, please post.

Re: Install Debian on Seagate GoFlex's hard drive

$
0
0
habibie,

> Now, I am trying to flash your u-boot on my
> Seagate GoFLEX Home as well as my Seagate GoFLEX
> NET. It looks like the same as a Seagate
> Dockstar's mtdparts you mentioned
> here.
> So, I reckon it safe to use the above mtdparts and
> with the following command for both my Seagate
> GoFLEX Home and/or Seagate GoFLEX NET.
>
fw_setenv mtdparts
> 'mtdparts=orion_nand:1M(u-boot),4M(uImage),32M(rootfs),-(data)'

Correct.

> Also, since I will be formatting my SATA HDD with
> an EXT4, then I should change from
> rootfstype=ext3 to rootfstype=ext4
> in the environment setting, right?

However, there is no need to adjust anything other what I wrote in the u-boot installation instruction. For example, that rootfstype is obsolete, we don't use it anymore. I'd suggest that you just follow the installation instruction and not looking at any other threads such as this one for info. It is easy to get confused by conflicting info from multiple threads.

Re: Choice of init system

$
0
0
leitmotiv,

Stay with sysvinit for now. No need to worry about it being obsolete yet.

Re: Tutorial of native sata boot for pogoplug pro

$
0
0
You Guys are all Awesome!!!!!!!!! I got a ways to go, but getting this unbricked is supercool!!!!probably will have more questions along the way, but gonna keep plugging (pun intended) away at it! Thanks!!!!!
echowarrior108

Re: other USB ports

Re: Install Debian on Seagate GoFlex's hard drive

$
0
0
Bodhi,

Thank you and now my Seagate GoFLEX Home is up running with debian ARM.

Re: cmake complains g++-7 is not able to compile a simple test program.

$
0
0
renojim Wrote:
-------------------------------------------------------
> Did you also install g++-7 when you installed gcc-7? If not, try to install it the same way you installed gcc-7.
>
> -JT
>
I did forget to install g++-7 package. However, after installing the g++-7 package, the problem remains the same. When I used the -o switch, it seemed to compile a simple hello.c++ file. However, the compiled hello isn't executable, but rather an ASCII text file (see below). This probably means the gcc-7 package I installed from buster repo is useless.
[debian@debian:/home/local/PEOPLE/debian/works/C++ 62%] ~ g++ -c hello.c++
g++: fatal error: ‘-c’ is not a valid option to the preprocessor
compilation terminated.
[debian@debian:/home/local/PEOPLE/debian/works/C++ 63%] ~ g++ -o hello hello.c++
[debian@debian:/home/local/PEOPLE/debian/works/C++ 64%] ~ ls -la
total 664
drwxr-xr-x  3 debian users   4096 Mar 18 00:55 .
drwxr-xr-x  4 debian users   4096 Mar 18 00:37 ..
drwxr-xr-x 17 debian users   4096 Dec  3 13:50 BMP
-rw-r--r--  1 debian users 661956 Mar 18 00:55 hello
-rw-r--r--  1 debian users    102 Mar 18 00:53 hello.c++
[debian@debian:/home/local/PEOPLE/debian/works/C++ 65%] ~ file hello
hello: C++ source, ASCII text
[debian@debian:/home/local/PEOPLE/debian/works/C++ 66%] ~

Re: Debian Installation on Thecus N2350 (Marvell Armada 385)

$
0
0
Ok found a whole bunch of GPIOs.

/* N2350 GPIO(MPP) Definition */
static const unsigned char FAN_TACH = 6;
static const unsigned char STAT_LED_WHITE = 14;
static const unsigned char STAT_LED_RED = 15;
static const unsigned char USB_LED_WHITE = 16;
static const unsigned char USB_LED_RED = 17;
static const unsigned char PWR_LED_RED = 18;
static const unsigned char HDD1_LED_WHITE = 19;
static const unsigned char HDD0_LED_WHITE = 20;
static const unsigned char USB3_PORT0_EN = 21;
static const unsigned char USB3_PORT1_EN = 24;
static const unsigned char HDD0_ATTACH = 26;
static const unsigned char HDD1_ATTACH = 27;
static const unsigned char PWR_LED_BLUE = 43;
static const unsigned char HDD0_EN = 44;
static const unsigned char HDD1_EN = 45;
static const unsigned char HDD0_LED_RED = 46;
static const unsigned char HDD1_LED_RED = 47;
static const unsigned char FAN_CTRL = 48;
static const unsigned char PWR_BTN = 49;
static const unsigned char RESET_BTN = 50;
static const unsigned char BUZZER_CTRL = 51;
static const unsigned char USB_COPY_BTN = 52;
static const unsigned char USB_OVER_CURRENT = 53;
static const unsigned char PWROFF_CTRL = 54;
static const unsigned char TEMPERATURE_INT = 55;

Most likely this is what we are looking for to power the 2 USB ports:
static const unsigned char USB3_PORT0_EN = 21;
static const unsigned char USB3_PORT1_EN = 24;

Re: Debian Installation on Thecus N2350 (Marvell Armada 385)

$
0
0
I'll write an initial DTS for this Thecus N2350 and upload it for testing.

Re: other USB ports

$
0
0
lordzahl,

Do you have a picture for this box that you can upload here? Is there a serial pinouts header?

Re: other USB ports

$
0
0
Hi bodhi,
Great that you found the GPIO definitions.

bodhi Wrote:
> Do you have a picture for this box that you can
> upload here? Is there a serial pinouts header?
I have linked an article with a picture in the first post.
But if still needed i can get pictures myself and upload them here directly.

It seems like J2 might be an unpopulated GPIO (20 pin)?
Cheers, Manuel

Re: other USB ports

$
0
0
Hi Manuel,

I see I've missed that picture :) Looks like J1 is a 4-holes pinout? hope it is not a 4 solder buttons!

J2 looks like JTAG pinout (usually 20 pins).

Re: other USB ports

$
0
0
hi bodhi,

Yes, J1 is a 4 hole pinout, which could be easily soldered and is used for the serial console by me at the moment. I just put some loose wires in these holes.
I'll attach a picture of the backside of the pcb to this post.
Viewing all 26681 articles
Browse latest View live


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