Welcome! Log In Create A New Profile

Advanced

Debian on HP T5325 Thin Client

Posted by Gravelrash 
Re: Debian on HP T5325 Thin Client
December 01, 2017 01:39AM
Ray,

> You clearly must be using a previous version of
> the kirkwood-t5325.dtb file as a hexdump of that
> file distributed with both
> linux-4.13.5-kirkwood-tld-1 and
> linux-4.14.1-kirkwood-tld-1 shows the 'permanent
> u-boot env' twice and never mentions 'hp_env' at
> all.

Your assumption is wrong. When in doubt, you shoud read the instruction again first to see if you have missed anything.


Here is the installation instruction step A.6.b (Installation from stock OS):

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.

Note that the mtdparts layout are changed in the following fw_setenv commands. So when you reboot into Debian roots, the mtdparts will have a new layout.

/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'


And here is the installation instruction step B.2 (B. Installation from the latest Debian rootfs):

Quote

B. Installation from the latest Debian rootfs

- If you have installed the latest Debian rootfs, but your u-boot is still stock, then follow all the steps in this section B.
- If you are upgrading from uboot.2016.05-tld-1 then you only need to do step 1 to step 4 in this section B.

Steps:

1. Boot into Debian rootfs, extract u-boot images

cd /boot
tar -xf uboot.2017.07-tld-1.t5325.bodhi.tar
tar -xf uboot.2016.05-tld-1.environment.bodhi.tar

2. Verify the MTD flash definition in your Debian rootfs. Note the mtd0 and mtd2 definition, they must be identical to your current mtd0 and mtd2. Also note that stock mtd definition is different. So if your mtdpart defintion is still stock, please post question before continue.

cat /proc/mtd
dev: size erasesize name
mtd0: 00080000 00010000 "uboot"
mtd1: 00040000 00010000 "sdd_firmware"
mtd2: 00010000 00010000 "uboot_env"
mtd3: 00010000 00010000 "permanent_uboot_env"
mtd4: 00010000 00010000 "hp_env"

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Debian on HP T5325 Thin Client
December 01, 2017 07:42PM
Both linux 4.13.5 and 4.14.1 have the following section in the kirkwood-t5325.dts file:

			flash@0 {
				#address-cells = <1>;
				#size-cells = <1>;
				compatible = "st,m25p80", "jedec,spi-nor";
				spi-max-frequency = <86000000>;
				reg = <0>;
				mode = <0>;

				partition@0 {
					reg = <0x0 0x80000>;
					label = "u-boot";
				};

				partition@1 {
					reg = <0x80000 0x40000>;
					label = "SSD firmware";
				};

				partition@2 {
					reg = <0xc0000 0x10000>;
					label = "u-boot env";
				};

				partition@3 {
					reg = <0xd0000 0x10000>;
					label = "permanent u-boot env";
				};

				partition@4 {
					reg = <0xd0000 0x10000>;
					label = "permanent u-boot env";
				};
			};
		};

Note: label = "permanent u-boot env"; occurs in both partition 3 and 4.

Your patch file you include with the kernel includes the following patch for kirkwood-t5325.dts

diff -Naur --no-dereference a/arch/arm/boot/dts/kirkwood-t5325.dts b/arch/arm/boot/dts/kirkwood-t5325.dts
--- a/arch/arm/boot/dts/kirkwood-t5325.dts      2017-11-21 00:49:25.000000000 -0800
+++ b/arch/arm/boot/dts/kirkwood-t5325.dts      2017-11-22 21:17:15.492900079 -0800
@@ -1,6 +1,9 @@
 /*
- * Device Tree file for HP t5325 Thin Client"
+ * Device Tree file for HP t5325 Thin Client
  *
+ * Copyright (c) 2016-2017, bodhi <mibodhi@gmail.com>
+ *
+ * based on
  * Copyright (C) 2014
  *
  * Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
@@ -174,9 +177,21 @@
                compatible = "gpio-poweroff";
                pinctrl-0 = <&pmx_power_off>;
                pinctrl-names = "default";
-               gpios = <&gpio1 17 GPIO_ACTIVE_HIGH>;
+               gpios = <&gpio1 16 GPIO_ACTIVE_HIGH>;
        };
 
+        gpio-leds {
+                compatible = "gpio-leds";
+                pinctrl-0 = <&pmx_led>;
+                pinctrl-names = "default";
+
+                health {
+                        label = "status:green:health";
+                        gpios = <&gpio0 21 GPIO_ACTIVE_HIGH>;
+                        default-state = "keep";
+                };
+        };
+
        sound {
                compatible = "simple-audio-card";
                simple-audio-card,format = "i2s";
@@ -195,7 +210,7 @@
                simple-audio-card,mclk-fs = <256>;
 
                simple-audio-card,cpu {
-                       sound-dai = <&audio>;
+                       sound-dai = <&audio0 0>;
                };
 
                simple-audio-card,codec {
@@ -227,3 +242,7 @@
 &pcie0 {
        status = "okay";
 };
+&audio0 {
+        #sound-dai-cells = <1>;
+        status = "ok";
+};

This does not fix the issue with identical labels for partition 3 and 4.

Ray
Re: Debian on HP T5325 Thin Client
December 01, 2017 08:31PM
Ray,

We are not using the definition in DTS. What is relevant is in the bootargs. If your bootargs mtdparts is correct then your mtd definition in Linux will be correct.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Debian on HP T5325 Thin Client
December 01, 2017 08:57PM
Bodhi,

Thank you for your patience. It appears that my installation was picking up the mtdparts from the DTS because there was a typo error in my mtdparts! Seems my mtdparts was:

mtdparts=mtdparts=spi0.0,512K(uboot),256K(sdd_firmware),64K(uboot_env),64K(permanent_uboot_env),64K(hp_env)

Note the "," instead of ":" after spi0.0!

Ray
Re: Debian on HP T5325 Thin Client
December 01, 2017 09:05PM
rayknight Wrote:
-------------------------------------------------------
> Bodhi,
>
> Thank you for your patience. It appears that my
> installation was picking up the mtdparts from the
> DTS because there was a typo error in my mtdparts!
> Seems my mtdparts was:
>
>
> mtdparts=mtdparts=spi0.0,512K(uboot),256K(sdd_firmware),64K(uboot_env),64K(permanent_uboot_env),64K(hp_env)
>
>
> Note the "," instead of ":" after spi0.0!
>

Ah :) that explains it!

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

Your Email:


Subject:


Spam prevention:
Please, solve the mathematical question and enter the answer in the input field below. This is for blocking bots that try to post this form automatically.
Question: how much is 9 plus 5?
Message: