Dietpi: XU4 | Prep for 4.9 kernel | Offer test image

Created on 26 Apr 2017  ·  21Comments  ·  Source: MichaIng/DietPi

4.9 kernel image for TESTING purposes only:

- http://dietpi.com/downloads/images/no_release/(NR_4.x)_DietPi_OdroidXU4-armv7-(Jessie).7z


Meveric's repo/packages is changing to 4.9 kernel. Test and update images/patch existing systems.
_Many thanks to meveric for the heads up and additional info_

  • uuid of rootfs required for boot
Enhancement Odroid XU4

All 21 comments

Hi Fourdee. Can I help on something with this task?

I may have some free time soon, maybe to test this and improve that config dir thing we discussed about syncthing.

@joaofl

Hi Fourdee. Can I help on something with this task?

By all means, thanks for offering 👍
Once i figure out how will we patch uuid in boot.ini and fstab to replace /dev/mmcxxxx, should be good to test.
I'll also create a new image with the kernel installed, for testing.

Patch Notes / Prep for 4.9 kernel install:

  • 🈯️ Replace /dev/mmcblk0p* in /etc/fstab + boot.ini with UUID as required by 4.9 kernel+uboot
#MMC0p1
UUID_CURRENT=$(blkid /dev/mmcblk0p1 -s UUID -o value)
sed -i "s#^/dev/mmcblk0p1#UUID=$UUID_CURRENT#g" /etc/fstab 
systemctl daemon-reload

#MMC0p2
UUID_CURRENT=$(blkid /dev/mmcblk0p2 -s UUID -o value)
sed -i "s#^/dev/mmcblk0p2#UUID=$UUID_CURRENT#g" /etc/fstab 
systemctl daemon-reload

sed -i "s#root=/dev/mmcblk0p2#root=UUID=$UUID_CURRENT#g" /DietPi/boot.ini

#XU4 DTB (If XU4 board):
sed -i "s#exynos5422-odroidxu3.dtb#exynos5422-odroidxu4.dtb#g" /DietPi/boot.ini

since with Kernel 4.9 the boot device is no longer always mmcblk0 but can also be mmcblk1 if you start from SD card


GPU driver changes:

You'll also find the new xf86-video-armsoc driver which is needed for Desktop and G2D acceleration.
Make sure you set option "NoFlip" "true" in /etc/X11/xorg.conf to make sure vsync is working where it's required.

wget http://oph.mdrjr.net/meveric/kernel/XU3/4.9.x/xf86-video-armsoc-odroid_20170419-1.4.1-1+deb8_armhf.deb -O package.deb
dpkg -i package.deb

Install 4.9 kernel:

wget http://oph.mdrjr.net/meveric/kernel/XU3/4.9.x/linux-image-4.9.24+_4.9.24-20170428-XU3_armhf.deb -O package.deb
dpkg -i package.deb
  • SD: SystemD fails boot waiting on mmc0p1, try UUID in fstab.
  • 🈹 Yep, kernel 4.9 requires both mmc0p* entries in fstab to be UUID
  • 🈴 System boots, no ethernet. dmesg | grep eth = usbcore: registered new interface driver cdc_ether
    Thanks to Meveric for heads up, dtb's for XU3/4 4.9 kernel are now unique.

  • 🈯️ If XU4 board:

sed -i "s#exynos5422-odroidxu3.dtb#exynos5422-odroidxu4.dtb#g" /DietPi/boot.ini

Weird, if serial UART is connected to SBC pins and USB UART pins (GND/TX/RX), but not connected to a USB socket, system fails to boot.

@joaofl

Any chance you could test this (and ethernet status) on your XU4?

To install 4.9 kernel, as per https://github.com/Fourdee/DietPi/issues/899#issuecomment-298170796:

  • Run code in "Patch Notes"
  • Then code in "Install kernel test:"

@Fourdee

My first test was with my current setup, in which I already had the UUID set on both files (fstab and boot.ini) since I was booting from an USB pendrive.
However it failed to boot. It halts at:
Apr 30 02:08:37 DietPi systemd[427]: Failed at step EXEC spawning /bin/plymouth: No such file or directory
(journal file attached).
journal.txt

My second test was on a new install:
It halts at that same plymouth issue. But there are other errors concerning the mmcmblk1 (timed out). See the journal attached.
journal-freshinstall.txt
.

Is there an easy way to rollback to the previous kernel and fix this issue?

@joaofl

Thanks for testing.

Is there an easy way to rollback to the previous kernel and fix this issue?

Yep, if you copy the contents of /boot on the image file, to SD card/EMMC, excluding:

  • dietpi.txt
  • /dietpi (folder)

And modules from image in 2nd partition, to rootfs:

  • /lib/modules

Should boot back up


since I was booting from an USB pendrive.

Ah, you may need to manually pull in the UUID of this rootfs drive, and replace:

  • /boot/boot.ini | root=/dev/ with root=UUID=1234455801234 (replace with your UUID's)
  • /etc/fstab | entry for / with UUID=1234779898

Possible solutions regarding Failed at step EXEC spawning /bin/plymouth: No such file or directory
https://unix.stackexchange.com/a/178640

If you test again, before rebooting after kernel update, we should probably check patched /etc/fstab and blkid match:

cat /etc/fstab
cat /DietPi/boot.ini | grep 'root='

🈯️ Network bandwidth much improved over 3.x (was around 400Mbit):

Client connecting to 192.168.0.112, TCP port 5001
TCP window size: 87.5 KByte (default)
------------------------------------------------------------
[  5] local 192.168.0.111 port 51702 connected with 192.168.0.112 port 5001
[ ID] Interval       Transfer     Bandwidth
[  5]  0.0-30.0 sec  3.28 GBytes   938 Mbits/sec
[  4] local 192.168.0.111 port 5001 connected with 192.168.0.112 port 38925
[  4]  0.0-30.0 sec  2.68 GBytes   766 Mbits/sec

@Fourdee
Indeed, by commenting two custom mounts I had on my fstab, it booted. Buuuut, without ethernet.

On dmesg, it shows that it failed to boot some modules for example the s5p which was not found. also fuse, IPV6... I guess the first is from the GPU that in fact I did not install since I dont use it currently.

How did you get your ethernet working? I remember someone mentioned this issue in some other forum, I'll try to figure it out.

I also noticed that Dietpi fails to fetch CPU governor settings...

@joaofl

Buuuut, without ethernet.

For XU3/4, dtb's are now unique. So if your running a XU4:

sed -i "s#exynos5422-odroidxu3.dtb#exynos5422-odroidxu4.dtb#g" /DietPi/boot.ini
reboot

@joaofl

I also noticed that Dietpi fails to fetch CPU governor settings...

Interactive is not available in 4.9, ondemand and performance govs only:
freqs are for cpu 0
image

DietPi should cycle through govs and re-apply, if current one does not exist.

@Fourdee
Thanks! It works now. Buuut, :) Cloudshell stopped working... Is the SPI module loaded? I could help on testing that as well.

@Fourdee

Is the CPU limited to 1.3 GHz? 2.0 doesn't show in the list of frequencies available, however It still throttle up to 2.0.
When I test the ethernet speed using iperf, I get almost 0.8 Gbps, but when transferring a file through sftp, I get at most 220 Mbps (28 MB/s). I believe the bottleneck in this case is the CPU. What do you think?

Minor issue:

  • As "On demand" is not available, when I chose to change the "On demand sampling rate" I get the error:
cat: /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate_min: No such file or directory
/DietPi/dietpi/dietpi-config: line 1424: / 1000 : syntax error: operand expected (error token is "/ 1000 ")

@joaofl

Is the CPU limited to 1.3 GHz?

Yep, for cores 0-3, other cores are still 2GHz. They must of tweaked max frequencies a little to try to reduce known heat issues with XU4.

but when transferring a file through sftp, I get at most 220 Mbps (28 MB/s). I believe the bottleneck in this case is the CPU. What do you think?

Not sure, disk/IO bottleneck maybe?

when I chose to change the "On demand sampling rate" I get the error:

Good find, new location is:

/sys/devices/system/cpu/cpufreq/ondemand/min_sampling_rate

dietpi-cpu_set

/DietPi/dietpi/dietpi-cpu_set: line 117: /sys/devices/system/cpu/cpu0/cpufreq/ondemand/up_threshold: No such file or directory
/DietPi/dietpi/dietpi-cpu_set: line 118: /sys/devices/system/cpu/cpu0/cpufreq/ondemand/sampling_rate: No such file or directory
/DietPi/dietpi/dietpi-cpu_set: line 119: /sys/devices/system/cpu/cpu0/cpufreq/ondemand/sampling_down_factor: No such file or directory

New locations are:

/sys/devices/system/cpu/cpufreq/ondemand

ToDo:

root@DietPi:~# blkid
/dev/mmcblk1: PTUUID="000f1766" PTTYPE="dos"
/dev/mmcblk1p1: SEC_TYPE="msdos" LABEL="boot" UUID="5886-8548" TYPE="vfat" PARTUUID="000f1766-01"
/dev/mmcblk1p2: LABEL="rootfs" UUID="a4f12232-1670-43f4-8eca-49bfbe4d01ee" TYPE="ext4" PARTUUID="000f1766-02"

Hi @Fourdee,
maybe this is already resolved in your testing image, but I encountered the following problem when building and running my own 4.9 kernel from official hardkernel repo on XU4:
the script /boot/diepi/dietpi-obtain_hw_model was not able to detect XU4 anymore because /proc/cpuinfo doesn't contain the odroid-string anymore:

cat /proc/cpuinfo
...
Hardware : SAMSUNG EXYNOS (Flattened Device Tree)
Revision : 0100
Serial : 0000000000000000

This leads to dietpi-update not pulling the right files and trying to install rPi files on odroid (fortunately I cancelled update fast enough).

@rncwnd79

because /proc/cpuinfo doesn't contain the odroid-string anymore:

Thanks for the report. 👍
Although this appears fine on the current 4.9 kernel from Meveric. Maybe we'll see this in the next update.

You can avoid the string check and force the HW_MODEL index, for XU4:

echo 11 > /etc/.dietpi_hw_model_identifier

I'll add that by default to our next XU4 image, to avoid this.

  • 🈴 Seems to have no effect. Kodi is extremely jittery in 4.9 with updated GPU driver:
    Option      "NoFlip" "true"

Ok, Meverics right, 4.9 is still in active dev, so lets wait for it to become stable:

  • 🈯️ Prep for 4.9 kernel is now completed during v150 patch (unique DTB's and UUID reqs)
  • 🈯️ 4.9 kernel will not be installed during v150, we'll wait for Meveric to officially release 4.9 via apt
  • 🈯️ We'll offer a 4.9 kernel test image for our users: http://dietpi.com/downloads/images/no_release/(NR_4.x)_DietPi_OdroidXU4-armv7-(Jessie).7z

Prep completed.

Will mark this ticket as completed. Open up a new one for further 4.9 testing:
https://github.com/Fourdee/DietPi/issues/926

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Fourdee picture Fourdee  ·  3Comments

pfeerick picture pfeerick  ·  3Comments

Fourdee picture Fourdee  ·  3Comments

bhaveshgohel picture bhaveshgohel  ·  3Comments

k-plan picture k-plan  ·  3Comments