Welcome! Log In Create A New Profile

Advanced

HP T5325 Thin Client U-Boot-2017.07-tld-1

Posted by bodhi 
Kamal
Re: HP T5325 Thin Client U-Boot-2016.05-tld-1
September 22, 2017 01:20AM
> - To complete the setup for your network configuration, you need to set these envs. Assuming you want to use the default ipaddr and serverip, and your router is 192.168.0.1.

I guess it need not be the case as evident from the output obtained after booting the device with kwboot.

BTW, is compiling U-BOOT for HP T5325 a complicated process? Say one starts by downloading the latest version from http://git.denx.de/u-boot.git/. I have seen that one needs to use commands like 'make myBoardId_config' and then 'make'. So I thought may be the first command should look like 'make DB-88F6281A-BP_config' for HP T5325. But I am not sure if that source code bundle contains required files for HP T5325.
Re: HP T5325 Thin Client U-Boot-2016.05-tld-1
September 22, 2017 01:21AM
> > - To complete the setup for your network
> configuration, you need to set these envs.
> Assuming you want to use the default ipaddr and
> serverip, and your router is 192.168.0.1.
>
> I guess it need not be the case as evident from
> the output obtained after booting the device with
> kwboot.
>

What is your router IP?

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: HP T5325 Thin Client U-Boot-2016.05-tld-1
September 22, 2017 03:10AM
Kamal Wrote:
-------------------------------------------------------
> BTW, is compiling U-BOOT for HP T5325 a
> complicated process? Say one starts by downloading
> the latest version from
> http://git.denx.de/u-boot.git/. I have seen that
> one needs to use commands like 'make
> myBoardId_config' and then 'make'. So I thought
> may be the first command should look like 'make
> DB-88F6281A-BP_config' for HP T5325. But I am not
> sure if that source code bundle contains required
> files for HP T5325.

There is more to it than the basic commands to build u-boot. The config file may be just a starting point (minimum basic config settings) for a bunch of like hardware boards i.e. kirkwood. The complications are in selecting (make menuconfig) all of the particulars for the specific device i.e. ethernet, usb, wifi, memory type etc.


make mrproper #run from base directory for u-boot source to clean/clear any settings

export CROSS_COMPILE=~/Downloads/gcc-linaro-6.3.1-2017.05-x86_64_arm-linux-gnueabi/bin/arm-linux-gnueabi- #to set your cross compiler on a different (faster) system than the system the u-boot is intended for

export ARCH=mach-kirkwood # to set the architecture for the intended device armel, armhf etc.

make dreamplug_defconfig #call and set the basic config file for your device

make menuconfig # set the small details for your specific device based on hardware and or programs to include

make -j4 # compile u-boot for your device -j# for number of cpu's to utilize for faster compiling

is just a sample if you want to look deeper into the options under the menuconfig that goes into making a working u-boot for a device.

I don't remember if dreamplug_defconfig was in the original u-boot source or if i snagged it from someplace else and added it to my source incase it doesn't woek for you should you try it.
Kamal
Re: HP T5325 Thin Client U-Boot-2016.05-tld-1
September 22, 2017 05:29AM
> What is your router IP?

dhcp command sets all those related envs correctly. Here's the output with the old U-BOOT:

HP>> dhcp
BOOTP broadcast 1
*** Unhandled DHCP Option in OFFER/ACK: 28
*** Unhandled DHCP Option in OFFER/ACK: 28
DHCP client bound to address 10.42.0.50

HP>> printenv
...
gatewayip=10.42.0.1
netmask=255.255.255.0
ipaddr=10.42.0.50
serverip=10.42.0.1
Kamal
Re: HP T5325 Thin Client U-Boot-2016.05-tld-1
September 22, 2017 07:45AM
Thanks feas.

I just gave a shot anyway - at least to see what happens:

Install packages need to compile (on Ubuntu 16.4):

sudo apt-get install libc6-armel-cross libc6-dev-armel-cross binutils-arm-linux-gnueabi libncurses5-dev gcc-arm-linux-gnueabi

After downloading u-boot source code:

kamal@chrome:~/tmp/uboot/u-boot-2017.09$ make mrproper
  CLEAN   examples/standalone
  CLEAN   tools
  CLEAN   tools/lib tools/common
  CLEAN   u-boot.lds u-boot.cfg.configs u-boot.kwb u-boot.map u-boot-nodtb.bin u-boot.srec u-boot.cfg u-boot.bin u-boot u-boot.sym System.map
  CLEAN   scripts/basic
  CLEAN   scripts/kconfig
  CLEAN   include/config include/generated
  CLEAN   .config .config.old include/autoconf.mk.dep include/autoconf.mk include/config.h
kamal@chrome:~/tmp/uboot/u-boot-2017.09$ export CROSS_COMPILE=/usr/bin/arm-linux-gnueabi-
kamal@chrome:~/tmp/uboot/u-boot-2017.09$ export ARCH=mach-kirkwood
kamal@chrome:~/tmp/uboot/u-boot-2017.09$ make dreamplug_defconfig
  HOSTCC  scripts/basic/fixdep
  HOSTCC  scripts/kconfig/conf.o
  SHIPPED scripts/kconfig/zconf.tab.c
  SHIPPED scripts/kconfig/zconf.lex.c
  SHIPPED scripts/kconfig/zconf.hash.c
  HOSTCC  scripts/kconfig/zconf.tab.o
  HOSTLD  scripts/kconfig/conf
#
# configuration written to .config
#
kamal@chrome:~/tmp/uboot/u-boot-2017.09$ make menuconfig
  HOSTCC  scripts/kconfig/mconf.o
  HOSTCC  scripts/kconfig/lxdialog/checklist.o
  HOSTCC  scripts/kconfig/lxdialog/util.o
  HOSTCC  scripts/kconfig/lxdialog/inputbox.o
  HOSTCC  scripts/kconfig/lxdialog/textbox.o
  HOSTCC  scripts/kconfig/lxdialog/yesno.o
  HOSTCC  scripts/kconfig/lxdialog/menubox.o
  HOSTLD  scripts/kconfig/mconf
scripts/kconfig/mconf  Kconfig


*** End of the configuration.
*** Execute 'make' to start the build or try 'make help'.

kamal@chrome:~/tmp/uboot/u-boot-2017.09$ make -j2
scripts/kconfig/conf  --silentoldconfig Kconfig
  CHK     include/config.h
  UPD     include/config.h
  CFG     u-boot.cfg
  GEN     include/autoconf.mk.dep
  GEN     include/autoconf.mk
*** Your GCC is older than 6.0 and will not be supported starting in v2018.01.
  CHK     include/config/uboot.release
  CHK     include/generated/timestamp_autogenerated.h
  UPD     include/generated/timestamp_autogenerated.h

#### MANY MANY LINES WERE PRESENT HERE ####

  CC      examples/standalone/hello_world.o
  LD      examples/standalone/libstubs.o
  LD      examples/standalone/hello_world
  OBJCOPY examples/standalone/hello_world.srec
  OBJCOPY examples/standalone/hello_world.bin
  LD      u-boot
  OBJCOPY u-boot.srec
  OBJCOPY u-boot-nodtb.bin
  SYM     u-boot.sym
  COPY    u-boot.bin
  MKIMAGE u-boot.kwb
  CFGCHK  u-boot.cfg

Testing the generated u-boot image:

kamal@chrome:~/tmp/uboot/u-boot-2017.09$ kwboot  -t -B 115200 /dev/ttyUSB0 -b u-boot.kwb  -p
Sending boot message. Please reboot the target...\
Sending boot image...
  0 % [......................................................................]
  3 % [......................................................................]
  6 % [......................................................................]
  9 % [......................................................................]
 12 % [......................................................................]
 15 % [......................................................................]
 18 % [......................................................................]
 21 % [......................................................................]
 24 % [......................................................................]
 27 % [......................................................................]
 31 % [......................................................................]
 34 % [......................................................................]
 37 % [......................................................................]
 40 % [......................................................................]
 43 % [......................................................................]
 46 % [......................................................................]
 49 % [......................................................................]
 52 % [......................................................................]
 55 % [......................................................................]
 58 % [......................................................................]
 62 % [......................................................................]
 65 % [......................................................................]
 68 % [......................................................................]
 71 % [......................................................................]
 74 % [......................................................................]
 77 % [......................................................................]
 80 % [......................................................................]
 83 % [......................................................................]
 86 % [......................................................................]
 89 % [......................................................................]
 93 % [......................................................................]
 96 % [......................................................................]
 99 % [....................]
[Type Ctrl-\ + c to quit]


U-Boot 2017.09 (Sep 22 2017 - 14:23:14 +0100)
Marvell-DreamPlug

SoC:   Kirkwood 88F6281_A1
SPI:   ready
DRAM:  512 MiB
WARNING: Caches not enabled
SF: unrecognized JEDEC id bytes: 00, 00, 00
*** Warning - spi_flash_probe() failed, using default environment

In:    serial
Out:   serial
Err:   serial
Net:   egiga0
Error: egiga0 address not set.
, egiga1
Error: egiga1 address not set.

PHY reset timed out
88E1116 Initialized on egiga0
PHY reset timed out
88E1116 Initialized on egiga1
IDE:   ide_preinit failed
Hit any key to stop autoboot:  0 
=> printenv 
baudrate=115200
bootcmd=setenv ethact egiga0; ${x_bootcmd_ethernet}; setenv ethact egiga1; ${x_bootcmd_ethernet}; ${x_bootcmd_usb}; ${x_bootcmd_kernel}; setenv bootargs ${x_bootargs} ${x_bootargs_root}; bootm 0x6400000;
bootdelay=3
ethact=egiga0
stderr=serial
stdin=serial
stdout=serial
x_bootargs=console=ttyS0,115200
x_bootargs_root=root=/dev/sda2 rootdelay=10
x_bootcmd_ethernet=ping 192.168.2.1
x_bootcmd_kernel=fatload usb 0 0x6400000 uImage
x_bootcmd_usb=usb start

Environment size: 496/4092 bytes
=> help usb
usb - USB sub-system

Usage:
usb start - start (scan) USB controller
usb reset - reset (rescan) USB controller
usb stop [f] - stop USB [f]=force stop
usb tree - show USB device tree
usb info [dev] - show available USB devices
usb test [dev] [port] [mode] - set USB 2.0 test mode
    (specify port 0 to indicate the device's upstream port)
    Available modes: J, K, S[E0_NAK], P[acket], F[orce_Enable]
usb storage - show details of USB storage devices
usb dev [dev] - show or set current USB storage device
usb part [dev] - print partition table of one or all USB storage    devices
usb read addr blk# cnt - read `cnt' blocks starting at block `blk#'
    to memory address `addr'
usb write addr blk# cnt - write `cnt' blocks starting at block `blk#'
    from memory address `addr'
=> usb start
starting USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 1 USB Device(s) found
       scanning usb for storage devices... 0 Storage Device(s) found
=> ide reset

Reset IDE: ide_preinit failed
=> dhcp
*** ERROR: `ethaddr' not set
=> setenv ethaddr 'f4:ce:46:24:38:b3'
=> dhcp
BOOTP broadcast 1
DHCP client bound to address 10.42.0.50 (4 ms)
*** Warning: no boot file name; using '0A2A0032.img'
Using egiga0 device
TFTP from server 10.42.0.1; our IP address is 10.42.0.50
Filename '0A2A0032.img'.
Load address: 0x800000
Loading: *
TFTP error: 'File not found' (1)
Not retrying...
=> printenv 
baudrate=115200
bootcmd=setenv ethact egiga0; ${x_bootcmd_ethernet}; setenv ethact egiga1; ${x_bootcmd_ethernet}; ${x_bootcmd_usb}; ${x_bootcmd_kernel}; setenv bootargs ${x_bootargs} ${x_bootargs_root}; bootm 0x6400000;
bootdelay=3
ethact=egiga0
ethaddr=f4:ce:46:24:38:b3
stderr=serial
stdin=serial
stdout=serial
x_bootargs=console=ttyS0,115200
x_bootargs_root=root=/dev/sda2 rootdelay=10
x_bootcmd_ethernet=ping 192.168.2.1
x_bootcmd_kernel=fatload usb 0 0x6400000 uImage
x_bootcmd_usb=usb start

Environment size: 524/4092 bytes
=> setenv x 'y'
=> saveenv 
Saving Environment to SPI Flash...
SF: unrecognized JEDEC id bytes: 00, 00, 00
*** Warning - spi_flash_probe() failed, using default environment

=>

I didn't select anything during menuconfig step. The compilation went fine, generated u-boot image loaded. But as you said, there seems to be more to it :)

I guess I should live with the old version of U-BOOT :)
Re: HP T5325 Thin Client U-Boot-2016.05-tld-1
September 22, 2017 08:35AM
The dream plug is a different device. I just used that as an easy example as I had it in a text file already.
Look through all the configuration options when in "menuconfig" that is where all the magic is.
I will not pretend to know anymore than what I have given you already.
Just trying to get u-boot working for a device with a config already provided can be difficult and these guys and or gals make them to work for multiple devices while not messing up another device.
You can really start to appreciate a small portion of the talent they share with us. All the time to configure, compile, test and try again and again and again until it works is just apart of the whole process.
Re: HP T5325 Thin Client U-Boot-2016.05-tld-1
September 22, 2017 03:53PM
Kamal,

> So when the device is flashed, U-BOOT does not get
> a DHCP IP address. But the same U-BOOT image used
> with kwboot works as expected.

Thanks for reporting this problem. Indeed, I think you did a very good test, I might have missed something while rebasing from U-Boot-2015.10-tld-2 to U-Boot-2016.05-tld-1.

As about your question why "Debian-4.4.0-kirkwood-tld-1-rootfs-bodhi.tar.bz2 rootfs must be prepared in advance", this was because we need to use fw_setenv binary on the rootfs. And this is something you need to do any way to run Debian.

Quote

6. And add fw_env.config to your stock OS. And then reference your saved current_envs.txt in step 2 to restore box specific info in u-boot envs.

a. Add fw_env.config to your stock OS.

echo "/dev/mtd0 0x00000 0x10000 0x10000" > /etc/fw_env.config

b. Modify envs and also setup netconsole. Replace xx below with your box specific settings.

/tmp/sdb1/usr/bin/fw_setenv arcNumber '2846'
/tmp/sdb1/usr/bin/fw_setenv mtdparts 'mtdparts=spi0.0:512K(uboot),256K(sdd_firmware),64K(uboot_env),64K(permanent_uboot_env),64K(hp_env)'
/tmp/sdb1/usr/bin/fw_setenv ethaddr 'xx:xx:xx:xx:xx:xx'
/tmp/sdb1/usr/bin/fw_setenv devices 'usb ide'
/tmp/sdb1/usr/bin/fw_setenv dtb_file '/boot/dts/kirkwood-t5325.dtb'


I'll look into this problem in near future when I get access to my build environment. In the mean time you could try to flash older version. You only need to flash U-Boot-2015.10-tld-2, and leave the new default envs as is.


Quote

This is the official released version for HP Thin Client T5325 U-Boot-2015.10-tld-2.

Download U-boot at Dropbox

uboot.2015.10-tld-2.t5325.bodhi.tar
md5
ac89dbd287c5a7e9d10410756dbadedf
sha256
ab5543a28db6c0c05815c5ab829a727d042b09cabe2cc7799b72aae40d86dcf5

There are 2 files in the tarball

uboot.2015.10-tld-2.t5325.mtd0.kwb
uboot.2014.07-tld-3.environment.64K.img

-bodhi
===========================
Forum Wiki
bodhi's corner
Kamal
Re: HP T5325 Thin Client U-Boot-2016.05-tld-1
September 23, 2017 01:52AM
> And this is something you need to do any way to run Debian.

With the original version of U-BOOT I found in my HP T5325 (U-Boot 1.1.4 (Jan 8 2010 - 14:03:56) MIC version : 3.4.19-16), I could run ThinPro, Debian 8 and Debian 9.

Debian 9 did not show /dev/mtd* devices even though they were visible in Debian 8. I didn't do much to figure out why it was happing in Debian 9. But the OS was running with DHCP networking.

For Debian 8 to be booted either from USB, or from internal IDE and finally to boot ThinPro from IDE if the first two fail, I use the following envs:

setenv mainlineLinux 'no'

setenv debian8usb 'usb start;ext2load usb 0:1 0x800000 /uImage;setenv bootargs $(debian8usb_bootargs);bootm 0x800000'
setenv debian8usb_bootargs 'console=ttyS0,115200n8 console=tty0 video=xgifb root=/dev/sda2 rw'

setenv debian8ide 'ide reset;ext2load ide 0:1 0x800000 /uImage;setenv bootargs $(debian8ide_bootargs);bootm 0x800000'
setenv debian8ide_bootargs 'console=ttyS0,115200n8 console=tty0 video=xgifb root=/dev/sda2 rw'

setenv bootcmd 'setenv mainlineLinux yes;run debian8usb;run debian8ide;setenv mainlineLinux no;run thinpro'

In case anyone tries Debian 9, envs similar to the following might work (I tried and deleted them later on, so typing them as I remember):

setenv debian9usb 'usb start;ext2load usb 0:1 0x800000 /uImage;ext2load usb 0:1 0x01100000 /uInitrd;setenv bootargs $(debian9usb_bootargs);bootm 0x800000 0x01100000'
setenv debian9usb_bootargs 'console=ttyS0,115200n8 console=tty0 video=xgifb root=/dev/sda2 rw'

The above approach depends on installing Debian on the USB or internal IDE where /boot is configured to reside in the first partition and / in the second partition (of the USB or internal IDE).

Setting envs while running Debian 8 or Debian 9 did not work. I am not sure if a custom /etc/fw_env.config would work with the version of U-BOOT I am using.

Again, all those are applicable to the original version of U-BOOT that I found in my HP T5325 (U-Boot 1.1.4 (Jan 8 2010 - 14:03:56) MIC version : 3.4.19-16). I preferred the ability to switch between Debian and ThinPro without flashing different versions of U-BOOT.

I'm gonna miss some interesting features of newer versions of U-BOOT.
Re: HP T5325 Thin Client U-Boot-2016.05-tld-1
September 23, 2017 02:42AM
Kamal,

> I'm gonna miss some interesting features of newer
> versions of U-BOOT.

Right! that's the whole reason for a modern u-boot. However, you don't really miss that many features if you don't know yet what you will need. Until that time, if you are happy running vanilla mainline kernel, then it's the best one for you.

-bodhi
===========================
Forum Wiki
bodhi's corner
Kamal
Re: HP T5325 Thin Client U-Boot-2016.05-tld-1
September 23, 2017 07:31AM
> However, you don't really miss that many features if you don't know yet what you will need. Until that time, if you are happy running vanilla mainline kernel, then it's the best one for you.

True! That's why people will discard the modern versions of U-Boot, modern vanilla mainline kernel, plus other modern kernels.
Re: HP T5325 Thin Client U-Boot-2016.05-tld-1
September 25, 2017 04:08AM
I've tracked down this problem in the T5325 network bring up during u-boot booting. Will fix this in the next u-boot release.

In the mean time, it should not effect booting into USB or SATA (through internal flash).

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: HP T5325 Thin Client U-Boot-2016.05-tld-1
November 01, 2017 09:31PM
I will upload the u-boot-2017.07-tld-1 version for this box shortly, when I have time to update the installation instruction.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: HP T5325 Thin Client U-Boot-2017.07-tld-1
November 05, 2017 03:59PM
I've uploaded the HP Thin Client T5325 U-Boot-2017.07-tld-1. Please see 1st post for download link and installation instruction.

The network problem in u-boot has been fixed in this release.

The latest installation instruction has been revised to have 2 sections:

A. Installation from stock OS
B. Installation from the latest Debian rootfs

-bodhi
===========================
Forum Wiki
bodhi's corner



Edited 2 time(s). Last edit at 11/05/2017 04:03PM by bodhi.
Re: HP T5325 Thin Client U-Boot-2017.07-tld-1
November 29, 2017 04:36AM
wish i still had one to play with....
Re: HP T5325 Thin Client U-Boot-2017.07-tld-1
November 29, 2017 12:37PM
Gravelrash,

> wish i still had one to play with....

Did you gift it away :) I actually put in the last piece of the puzzle. The network was misconfigured so it was only intermittenly working during boot (Thanks to Kamal who reported this problem).

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: HP T5325 Thin Client U-Boot-2017.07-tld-1
November 30, 2017 04:09AM
bodhi Wrote:
-------------------------------------------------------
> Did you gift it away :) I actually put in the last
> piece of the puzzle. The network was misconfigured
> so it was only intermittenly working during boot
> (Thanks to Kamal who reported this problem).

It was (as most of my toys seem to be) liberated by enthusiastic colleagues... strangely enough they dont seem to manage to grasp that small fruit labelled dev boards will do just as well for there needs.... hmmmmmm

:))
Re: HP T5325 Thin Client U-Boot-2017.07-tld-1
November 30, 2017 04:45AM
Gravelrash Wrote:

> It was (as most of my toys seem to be) liberated
> by enthusiastic colleagues... strangely enough
> they dont seem to manage to grasp that small fruit
> labelled dev boards will do just as well for there
> needs.... hmmmmmm
>
> :))

Yeah :) I guess it is a little more exotic to use little old boxes that nobody else has, and does more or less the same thing as a brand new fruit board :))

-bodhi
===========================
Forum Wiki
bodhi's corner
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: