Trying to get mainline kernel working on N1

User avatar
meveric
Posts: 10429
Joined: Mon Feb 25, 2013 2:41 pm
languages_spoken: german, english
ODROIDs: X2, U2, U3, XU-Lite, XU3, XU3-Lite, C1, XU4, C2, C1+, XU4Q, HC1, N1, Go, H2 (N4100), N2
Has thanked: 16 times
Been thanked: 126 times
Contact:

Re: Trying to get mainline kernel working on N1

Unread post by meveric » Fri Feb 01, 2019 5:14 pm

mad_ady wrote:
Fri Feb 01, 2019 5:01 pm
@rooted: you can try my ubuntu 18.04 image - it should contain most of what OverSun mentioned. But there may be bugs lurking around... (last time kodi would not react to mouse/keyboard input, but it worked with hardware decoding).
Have you changed the permissions that the user has access to the mouse and keyboard devices?
I think by default a user does not have the permissions.
On the desktop this is handled by xinput drivers, but when you run Kodi it runs under GBM and the user needs to have access to the physical devices.
Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
If you want to add my repository to your image read my HOWTO integrate my repo into your image.

User avatar
rooted
Posts: 6610
Joined: Fri Dec 19, 2014 9:12 am
languages_spoken: english
Location: Gulf of Mexico, US
Has thanked: 104 times
Been thanked: 20 times
Contact:

Re: Trying to get mainline kernel working on N1

Unread post by rooted » Fri Feb 01, 2019 7:24 pm

How soon we forget things when stressed, I will try your image Adrian. Thanks for the reminder.

User avatar
mad_ady
Posts: 6513
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1, H2, N2
Location: Bucharest, Romania
Has thanked: 163 times
Been thanked: 123 times
Contact:

Re: Trying to get mainline kernel working on N1

Unread post by mad_ady » Fri Feb 01, 2019 8:20 pm

Thanks for the suggestion @meveric. I'm currently moving my n1 into production and haven't tried further, but maybe @rooted can have a look when he experiences the problem.

User avatar
OverSun
Posts: 1491
Joined: Mon Apr 29, 2013 5:12 pm
languages_spoken: english
Has thanked: 0
Been thanked: 18 times
Contact:

Re: Trying to get mainline kernel working on N1

Unread post by OverSun » Mon Jul 15, 2019 3:16 pm

Maybe everyone forgot about N1, but in reality rk3399 chipset is becoming more and more supported with mainline kernel and I actually returned back to solid N1 product that's becoming better and better with time.
First of all I was able to compile recent u-boot for the board, and mainline u-boot 2019.07 is way more stable than hardkernel one. It solidly boot every time without any issues and work really cool.
After that I was able to make pretty solid .dts file for the latest 5.2 kernel and this one boots great, everything works, including I think panfrost Lima driver (didn't test that though, I'm planning the board for headless server since N2 is better for Kodi).
I was thinking of making repos of all that, but at some point I realised that every guy who has N1 should be able to do compilation and flashing himself and know how to do that.
So I just attach four files here, the u-boot idbloader.img, trust.img and uboot.img that can be flashed using sd_fuse.sh and rk3399-odroidn1.dts from 5.2 kernel in one archive.

Issues I have so far is non-working reboot, the board hangs at "Rebooting", and network card not being able to successfully negotiate network speed, it always go for 1Gbit, and if you other end is only 100Mbit compatible that will make it not work. I use ethtool at start to force the speed and it's all fine. Have no idea what's wrong with it, there are no warnings or errors, it's just that autonegotiation on N1 side excitingly go for 1Gbit all the time.
Attachments
n1-u-boot-v2019.07-and-5.2-dts.tar.gz
(1.69 MiB) Downloaded 19 times
These users thanked the author OverSun for the post (total 3):
mad_ady (Tue Jul 16, 2019 2:34 am) • elatllat (Tue Jul 16, 2019 6:06 am) • rooted (Wed Jul 17, 2019 12:50 pm)

User avatar
OverSun
Posts: 1491
Joined: Mon Apr 29, 2013 5:12 pm
languages_spoken: english
Has thanked: 0
Been thanked: 18 times
Contact:

Re: Trying to get mainline kernel working on N1

Unread post by OverSun » Mon Jul 15, 2019 3:49 pm

Few notes on booting, since this is mainline u-boot it doesn't use "boot.ini" and is going to search for boot.scr or other types of boot files. (boot.scr in /boot is the easiest way of doing that).
This is the content of source I use to generate it, which also can be used to boot from u-boot command line:

Code: Select all

setenv ethaddr be:f9:8f:92:be:d9
setenv bootargs earlyprintk console=ttyS2,115200 root=/dev/mmcblk1p1 net.ifnames=0 biosdevname=0 fsck.mode=auto fsck.repair=yes mitigations=off rootwait ro
load ${devtype} ${devnum} ${kernel_addr_r} /boot/vmlinuz-5.2.1+
load ${devtype} ${devnum} ${fdt_addr_r} /boot/rk3399-odroidn1.dtb
booti ${kernel_addr_r} - ${fdt_addr_r}
and boot.scr is generated from this as

Code: Select all

mkimage -A arm64 -T script -O linux -d boot.txt boot.scr
These users thanked the author OverSun for the post:
mad_ady (Tue Jul 16, 2019 2:35 am)

brad
Posts: 964
Joined: Tue Mar 29, 2016 1:22 pm
languages_spoken: english
ODROIDs: C2 N1 N2 H2 (64 bit ftw)
Location: Australia
Has thanked: 16 times
Been thanked: 32 times
Contact:

Re: Trying to get mainline kernel working on N1

Unread post by brad » Mon Jul 15, 2019 5:09 pm

My N1 is still rock solid as a basic fileserver running happily in the background for me. I think you are right mainline support has picked up quiet a bit for rk3399 I need to get back and do some more testing (I now have a working UART adatptor for it so no excuses for me now) :)
These users thanked the author brad for the post:
mad_ady (Tue Jul 16, 2019 2:35 am)

User avatar
mad_ady
Posts: 6513
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1, H2, N2
Location: Bucharest, Romania
Has thanked: 163 times
Been thanked: 123 times
Contact:

Re: Trying to get mainline kernel working on N1

Unread post by mad_ady » Tue Jul 16, 2019 3:07 am

Thank you both for keeping the N1 alive. Mine is doing NAS/lan monitoring/Home Automation, so I can't experiment, sadly. (I wouldn't want to replace it with the N2 for its lack of sata ports). I'm also using the gpio pins for a 1-wire temperature sensor and an ir blaster (with the odroid-lirc driver stolen from xu4). So, I'd like to make sure those work before upgrading the kernel. Who knows, maybe when I'm home alone (if ever) I can experiment too.

A couple of questions:
1. Can the mainline uboot boot the old 4.4 kernel? I'm using Oversun's 4.4 branch, without reboot issues)
2. Do you know if the reboot issue is caused by uboot or the kernel?

Regarding ethernet I seem to remember that somebody (either @Oversun or @crashoverride) told me to change a setting in the dtb to make it receive packets. Not sure if it's relevant to this problem...

Anyway, looking forward to your experiments. Don't forget to document stuff for those of us who'll follow your steps in a few months :)

User avatar
OverSun
Posts: 1491
Joined: Mon Apr 29, 2013 5:12 pm
languages_spoken: english
Has thanked: 0
Been thanked: 18 times
Contact:

Re: Trying to get mainline kernel working on N1

Unread post by OverSun » Tue Jul 16, 2019 4:37 am

Reset seems to be caused by u-boot I believe.
There is a rk3399-reset block specific for N1 in N1 kernel dtb, but it's compatible with gpio-reset and I've upgraded it, seems to be not working. u-boot is my only guess in that case.
I have high suspicion there are many things that are wrongly setup in u-boot dts and kernel dts that make hardware have issues. It would be really helpful if Odroid provide logical schematic, like a draft of the board where it's shown what's connected to what, so proper .dts can be created...
Ethernet is setup according to what was discussed here, it's another kind of issues, it's autonegotiation not working properly. it always negotiate to 1G, even when other side explicitly says 100Mbit...
I think mainline u-boot boots 4.4 kernel without any problems.

If not reboot issue I would forget about ethernet thing... But without proper headless reboot I cannot leave it as a server unfortunately, have to keep digging. A schematic would really be extremely helpful... @odroid?

User avatar
OverSun
Posts: 1491
Joined: Mon Apr 29, 2013 5:12 pm
languages_spoken: english
Has thanked: 0
Been thanked: 18 times
Contact:

Re: Trying to get mainline kernel working on N1

Unread post by OverSun » Wed Jul 17, 2019 5:52 am

Allright, I do some adjustments still so I decided to put it to github anyways.
I did some sync between u-boot and kernel .dts'es, and now even hdmi (including 5.2 linux panfrost lima driver), sound, cec, this stuff works. There are none warnings or problems during boot, all devices are visible where they should be, PCI, gpio, SATA, that kind of stuff...
Unfortunately same problem with no reboot and network card going 1Gbit all the time is still there.
With the reboot I suspect this is linux kernel problem, because I hit mentioned gpio from uboot and board went reset, so it all work in hardware, and should work as described in software as well according to "gpio-reset" driver doc. But it doesn't.
There are still few things that doesn't add up and are different in u-boot and kernel .dts even originally, I've asked odroid for datasheet which can be digged and proper .dts composed, no answer yet and could be never, but so far almost everything work on mainline, this is really cool.
https://github.com/Owersun/u-boot/tree/odroid-n1
https://github.com/Owersun/linux-hardke ... idn1-5.2.y
PS. you would need to read README.rockchip to compile u-boot, u-boot itself is not everything what's needed, there is also rkbin and arm-trusted-firmware required.
These users thanked the author OverSun for the post (total 2):
mad_ady (Wed Jul 17, 2019 12:13 pm) • rooted (Wed Jul 17, 2019 12:51 pm)

User avatar
OverSun
Posts: 1491
Joined: Mon Apr 29, 2013 5:12 pm
languages_spoken: english
Has thanked: 0
Been thanked: 18 times
Contact:

Re: Trying to get mainline kernel working on N1

Unread post by OverSun » Sat Jul 20, 2019 8:53 pm

I have finished sync-up and update of .dts files in u-boot (for 2019.07 latest version) and for kernel (for 5.2.y version).
All work great, except same problems with reboot and ethernet. This thing seems to be related to mistakes in initial .dts that were compensated by drivers in 4.4 kernel. And this is something that cannot be solved without the datasheet. No reply from odroid still, sad new on that side.
It would be really helpful to have a simple schematic what's connected where, don't know why it's not disclosed, there should be absolutely nothing secret in that...

User avatar
mad_ady
Posts: 6513
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1, H2, N2
Location: Bucharest, Romania
Has thanked: 163 times
Been thanked: 123 times
Contact:

Re: Trying to get mainline kernel working on N1

Unread post by mad_ady » Sat Jul 20, 2019 9:44 pm

+1 for odroid's help on the matter. Full mainline on the N1 would be awesome :)

User avatar
OverSun
Posts: 1491
Joined: Mon Apr 29, 2013 5:12 pm
languages_spoken: english
Has thanked: 0
Been thanked: 18 times
Contact:

Re: Trying to get mainline kernel working on N1

Unread post by OverSun » Sat Jul 20, 2019 9:56 pm

It is already somewhat full.
Everything meant for rk3399 is working what's in mainline. sound, hdmi, panfrost gpu driver, sata, gpio, usb, you name it. I believe even HDR is going to be working when it's in mainline. I think reboot and ethernet issue are something related to wrong .dts settings I cannot figure out myself. Let's see what's 5.3 is going to bring, from what I saw what was merged today there are some fixes and additions to rk3399. It could be some of them could be it.
These users thanked the author OverSun for the post (total 2):
mad_ady (Sat Jul 20, 2019 11:31 pm) • rooted (Sun Jul 21, 2019 7:59 am)

User avatar
rooted
Posts: 6610
Joined: Fri Dec 19, 2014 9:12 am
languages_spoken: english
Location: Gulf of Mexico, US
Has thanked: 104 times
Been thanked: 20 times
Contact:

Re: Trying to get mainline kernel working on N1

Unread post by rooted » Sun Jul 21, 2019 7:59 am

Thanks for staying on top on this and sharing, very useful to us few with a N1.

moon.linux
Posts: 1165
Joined: Thu Oct 02, 2014 11:42 pm
languages_spoken: english
Has thanked: 0
Been thanked: 0
Contact:

Re: Trying to get mainline kernel working on N1

Unread post by moon.linux » Sat Jul 27, 2019 11:20 am

@oversun
Thank for your good work.
I tired to compile the u-boot for odroid n1 at my end and ran into compilation issue, which I fixed locally.
But the document for building uboot.img ,trust.img idbloader.img is bit confuse plz share the instruction to build this u-boot images.

Are your enable SPL image to build uboot.img ?

User avatar
OverSun
Posts: 1491
Joined: Mon Apr 29, 2013 5:12 pm
languages_spoken: english
Has thanked: 0
Been thanked: 18 times
Contact:

Re: Trying to get mainline kernel working on N1

Unread post by OverSun » Sun Jul 28, 2019 3:37 am

Allright, this is how I do it:

I build on x86_64 host, you would need linaro gcc 7.4.1 toolchain in ~/toolchain/gcc-linaro-7.4.1-2019.02-x86_64_aarch64-linux-gnu directory and make sure it's reachable and useable.
In the directory where I build there are three directories,
u-boot which is git odroid-n1 of https://github.com/Owersun/u-boot.git
rkbit which is git master of https://github.com/rockchip-linux/rkbin.git

this is the script that has the steps I do:

Code: Select all

#!/bin/bash

export CFLAGS=
export CXXFLAGS=
export CPPFLAGS=
export CROSS_COMPILE=aarch64-linux-gnu-
export PATH=$PATH:~/toolchain/gcc-linaro-7.4.1-2019.02-x86_64_aarch64-linux-gnu/bin

cd u-boot
make clean
make odroidn1_defconfig
make

./tools/mkimage  -n rk3399 -T rksd -d ../rkbin/bin/rk33/rk3399_ddr_800MHz_v1.23.bin ../idbloader.img
cat ../rkbin/bin/rk33/rk3399_miniloader_v1.19.bin >> ../idbloader.img

cd ../rkbin
./tools/trust_merger RKTRUST/RK3399TRUST.ini
./tools/loaderimage --pack --uboot ../u-boot/u-boot-dtb.bin ../uboot.img
mv trust.img ../
there is going to be a failure notice about generating uboot.itb, thing is that this file is not needed in this case, so you can freely ignore it.
you will have after that three files that can be flashed the way hardkernel sdfuse https://github.com/hardkernel/u-boot/bl ... /sdfuse.sh does that.
These users thanked the author OverSun for the post:
mad_ady (Sun Jul 28, 2019 1:30 pm)

moon.linux
Posts: 1165
Joined: Thu Oct 02, 2014 11:42 pm
languages_spoken: english
Has thanked: 0
Been thanked: 0
Contact:

Re: Trying to get mainline kernel working on N1

Unread post by moon.linux » Sun Jul 28, 2019 11:15 am

Thanks I have taken similar approach to build these image.
By the way did you get the SPL or TPL images to work with rk3399 boards.

By the way this board has LPDR3/4 ram chip.

User avatar
OverSun
Posts: 1491
Joined: Mon Apr 29, 2013 5:12 pm
languages_spoken: english
Has thanked: 0
Been thanked: 18 times
Contact:

Re: Trying to get mainline kernel working on N1

Unread post by OverSun » Sun Jul 28, 2019 5:10 pm

Nope, I didn't try any other images than this produces (u-boot-dtb.bin).
I know the memory is different, but other rkbin loaders doesn't work.

User avatar
mad_ady
Posts: 6513
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1, H2, N2
Location: Bucharest, Romania
Has thanked: 163 times
Been thanked: 123 times
Contact:

Re: Trying to get mainline kernel working on N1

Unread post by mad_ady » Sat Aug 03, 2019 3:28 am

@OverSun: I have some (silly?) questions about your boot.txt example that you use to generate boot.scr (I will try to migrate to your uboot/kernel during this month, but I want to minimize my downtime).
Your example is:

Code: Select all

setenv ethaddr be:f9:8f:92:be:d9
setenv bootargs earlyprintk console=ttyS2,115200 root=/dev/mmcblk1p1 net.ifnames=0 biosdevname=0 fsck.mode=auto fsck.repair=yes mitigations=off rootwait ro
load ${devtype} ${devnum} ${kernel_addr_r} /boot/vmlinuz-5.2.1+
load ${devtype} ${devnum} ${fdt_addr_r} /boot/rk3399-odroidn1.dtb
booti ${kernel_addr_r} - ${fdt_addr_r}
Should this be merged with what's in boot.ini? Or is it standalone? I find it weird that a lot of the variables are not defined anywhere. Also some specific questions:
* ethaddr is the mac address used only by uboot?
* console=ttyS2 is the equivalent of the onboard serial? (ttyAML0)?
* /dev/mmcblk1p1 - are you using sd card? I suspect it's not a "standard" HK image layout with /media/boot and partition 2 rootfs, right? I should use /dev/mmcblk0p2 for my "standard emmc"
* you're not using an initrd. Assuming I don't need early drivers, can it still fsck and repair a broken rootfs, or not? I'm guessing no, with the exception, maybe if the rootfs can be mounted read-only and then it finds fsck.
* when building the kernel, can I start from make oldconfig? Or should I start with a new base and track down what I added? I'll still need to add the odroid-lirc module to control my AC and keep my fingers crossed...

Thanks!

User avatar
OverSun
Posts: 1491
Joined: Mon Apr 29, 2013 5:12 pm
languages_spoken: english
Has thanked: 0
Been thanked: 18 times
Contact:

Re: Trying to get mainline kernel working on N1

Unread post by OverSun » Sat Aug 03, 2019 4:09 am

this is standalone script, if you want anything from boot.ini - copy it from there. just remember that all specific settings like hdmitx=whatever most probably are not going to affect anything on vanilla kernel.
all the variables that are unset are coming from u-boot stadard environment that is fused to u-boot. There are commands in u-boot that are now pretty mature, they pretty effectively search for boot.scr script throuh eMMC/SD, different partitions, different directories, and when found execute it. At the time of it's execution those variables are going to point to where boot.scr was found. As mostly it's kept next to the kernel it's pretty safe to use like this. Very convenient, very universal.
ethaddr is set by uboot to the .dts, and kernel is able to read it from there. network drivers mostly now comply to the procedure of getting mac - read from hw, if not found read from .dts (which also propogates to .dts used by uboot), generate randomly.
console=ttyS2 is equivalent of what was ttyAML0 before. previously there was special driver for console that implemented special device ttyAML0, on mainline kernel this is different and all is standart now, uart is connected to serial, serial is standard serial, no special driver is needed.
/dev/mmcblk1 is eMMC. sd card is /dev/mmcblk0
yes, the "ro" option mounts rootfs read only and repairs it if needed. never had problems with that, I sometimes use initramfs, sometimes don't don't really see a need of that mostly.
I guess it's better to take odroidn1_defconfig I have in my branch, make with it, and then modify the configuration as you want on top of it. I composed the config with everything that is mentioned in .dts, I'm not sure oldconfig from 4.4 is going to have all the drivers by correct names that are now referenced in .dts.
These users thanked the author OverSun for the post:
mad_ady (Sat Aug 03, 2019 1:28 pm)

User avatar
mad_ady
Posts: 6513
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1, H2, N2
Location: Bucharest, Romania
Has thanked: 163 times
Been thanked: 123 times
Contact:

Re: Trying to get mainline kernel working on N1

Unread post by mad_ady » Thu Aug 15, 2019 9:57 pm

Ok, I've been preparing all week. I put the kid to sleep and I've messed with my N1's uboot in hopes of going to mainline in the near future. For now I want to run mainline uboot and legacy 4.4 kernel. Made backups of old uboot and flashed the new one. This is my boot.scr:

Code: Select all

setenv ethaddr 00:1e:06:ae:d4:2e
setenv bootargs earlyprintk console=ttyS2,115200 root=/dev/mmcblk1p2 net.ifnames=0 biosdevname=0 fsck.mode=auto fsck.repair=yes mitigations=off rootwait ro usb-storage.quirks=0x174c:0x1153:u usb-storage.quirks=0x152d:0x0578:u
load ${devtype} ${devnum} ${kernel_addr_r} /boot/Image.owersun
load ${devtype} ${devnum} ${fdt_addr_r} /boot/rk3399-odroidn1-linux-owersun.dtb
booti ${kernel_addr_r} - ${fdt_addr_r}
I've copied the 4.4 kernel and dtb in /boot. My filesystem structure is the stock HardKernel structure - with mmcblk1p1 a 128MB vfat partition and mmcblk1p2 the ext4 rootfs.

Now, when I rebooted, uboot did not load boot.scr:

Code: Select all

��@���@`����@���H�������������@�@��MMC:   dwmmc@fe320000: 1, sdhci@fe330000: 0
In:    serial@ff1a0000
Out:   serial@ff1a0000
Err:   serial@ff1a0000
Net:
Error: ethernet@fe300000 address not set.
eth-1: ethernet@fe300000
Hit any key to stop autoboot:  2 switch to partitions #0, OK
mmc0(part 0) is current device
Scanning mmc 0:1...
** Unable to read file / **
Card did not respond to voltage select!
starting USB...
Bus usb@fe380000: USB EHCI 1.00
Bus usb@fe3c0000: USB EHCI 1.00
scanning bus usb@fe380000 for devices... 1 USB Device(s) found
scanning bus usb@fe3c0000 for devices... missing environment variable: pxeuuid
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/00000000
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/0000000
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/00000
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/0000
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/000
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/00
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/0
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/default-arm-rk3399-odroidn1_rk3399
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/default-arm-rk3399
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/default-arm
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/default
No ethernet found.
Config file not found
No ethernet found.

# version
U-Boot 2019.07-00007-gdd9367bbe3 (Aug 03 2019 - 09:01:33 +0300)

aarch64-linux-gnu-gcc (Linaro GCC 7.4-2019.02) 7.4.1 20181213 [linaro-7.4-2019.02 revision 56ec6f6b99cc167ff0c2f8e1a2eed33b1edc85d4]
GNU ld (Linaro_Binutils-2019.02) 2.28.2.20170706

My guess is - it expects boot.scr to be on the first partition inside /boot, right? Is it ok if I copy it to my vfat partition inside a "boot" directory? Can this uboot read vfat partitions?

Despite this problem, I tried to have it boot manually by my pasting the contents of boot.scr:

Code: Select all

# setenv ethaddr 00:1e:06:ae:d4:2e
# setenv bootargs earlyprintk console=ttyS2,115200 root=/dev/mmcblk1p2 net.ifnames=0 biosdevname=0 fsck.mode=auto fsck.repair=yes mitigations=off rootwait ro usb-storage.quirks=0x174c:0x1153:u usb-storage.quirks=0x152d:0x0578:u
# load ${devtype} ${devnum} ${kernel_addr_r} /boot/Image.owersun
# load ${devtype} ${devnum} ${fdt_addr_r} /boot/rk3399-odroidn1-linux-owersun.dtb
# booti ${kernel_addr_r} - ${fdt_addr_r}
Bad Linux ARM64 Image magic!
and it didn't boot. My guess here is that the old kernel is in the "Image" format and the new uboot may be expecting a different one. If yes which one? Can I convert the binary Image to the new format without recompiling the old kernel?

Also, loading an initrd didn't work as I expected:

Code: Select all

# load ${devtype} ${devnum} ${initrd_addr} /boot/uInitrd.owersun
load - load binary file from a filesystem

Usage:
load <interface> [<dev[:part]> [<addr> [<filename> [bytes [pos]]]]]
    - Load binary file 'filename' from partition 'part' on device
       type 'interface' instance 'dev' to address 'addr' in memory.
      'bytes' gives the size to load in bytes.
      If 'bytes' is 0 or omitted, the file is read until the end.
      'pos' gives the file byte position to start reading from.
      If 'pos' is 0 or omitted, the file is read from the start.
I'll try to retry next tuesday when I hope to have a bit of time. In the meantime I reverted to the old uboot (backups FTW!)

User avatar
OverSun
Posts: 1491
Joined: Mon Apr 29, 2013 5:12 pm
languages_spoken: english
Has thanked: 0
Been thanked: 18 times
Contact:

Re: Trying to get mainline kernel working on N1

Unread post by OverSun » Thu Aug 15, 2019 10:04 pm

you have problematic u-boot build with .dts WIP.
I've worked with it some time and there is a chance you checkout out version that doesn't boot.
The u-boot u have wrongly initialize emmc to lower capabilities it can do due to some voltage regulator options adjusted wrong, it cannot read emmc at all, you can see it by this lines:
Scanning mmc 0:1...
** Unable to read file / **
Card did not respond to voltage select!

Please try the latest version in git:
https://github.com/Owersun/u-boot/tree/odroid-n1
These users thanked the author OverSun for the post:
mad_ady (Thu Aug 15, 2019 10:20 pm)

User avatar
mad_ady
Posts: 6513
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1, H2, N2
Location: Bucharest, Romania
Has thanked: 163 times
Been thanked: 123 times
Contact:

Re: Trying to get mainline kernel working on N1

Unread post by mad_ady » Thu Aug 15, 2019 10:23 pm

Indeed, I see you have newer commits. I'll start fresh next week. Thanks

brad
Posts: 964
Joined: Tue Mar 29, 2016 1:22 pm
languages_spoken: english
ODROIDs: C2 N1 N2 H2 (64 bit ftw)
Location: Australia
Has thanked: 16 times
Been thanked: 32 times
Contact:

Re: Trying to get mainline kernel working on N1

Unread post by brad » Thu Aug 15, 2019 10:39 pm

@OverSun thanks for you work far, I havent had a chance to test as yet though.

@mad_ady a few things as you want 4.4 kernel

- Im not exactly sure how OverSun has setup the uboot environment but mainline uboot should go searching for a boot.scr on the root partitions of all detected devices and then even try to find it on default pxe network server on the LAN. Normally it will find it on the root of the partition but it may even go search in /boot/ in OverSun's build unsure of this. You can generally ignore the "Card did not respond to voltage select!" but oversun could be right about the card not being detected. Do you have boot.src in boot partition on the vfat? If not try it. ext3 and ext4 partition support is optional in mainline uboot build but I assume this is added in OverSun's build.

When you enter the boot command manually and see "Bad Linux ARM64 Image magic!" this generally means mainline uboot cannot boot the image and considering its legacy hardkernel 4.4 will be the reason why. hardkernel kernel requires a different entry point than mainline linux. The custom entrypoint can usually be defined by wrapping the kernel in a uImage format which allows a custom entry point to be specified in the uImage header. Unfortunately for the moment I don't know what this is as I have not looked at it yet.

Lastly for legacy kernel the serial should be "ttyFIQ0" rather than "ttyS2" (mainline) or "ttyAML0" (amlogic boards). This is a parameter which gets passed to the kernel (not used in uboot)

User avatar
mad_ady
Posts: 6513
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1, H2, N2
Location: Bucharest, Romania
Has thanked: 163 times
Been thanked: 123 times
Contact:

Re: Trying to get mainline kernel working on N1

Unread post by mad_ady » Fri Aug 16, 2019 12:35 am

Thank for pointing out the serial port mistake. I knew about it, but forgot I was booting 4.4 when I wrote the file. Will correct it.

boot.scr exists only in mmcblk1p2/boot for now, but I can move it elsewhere if needed. I'll do more experiments next time, hopefully I won't be as time constrained, and now I know revert works.

User avatar
mad_ady
Posts: 6513
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1, H2, N2
Location: Bucharest, Romania
Has thanked: 163 times
Been thanked: 123 times
Contact:

Re: Trying to get mainline kernel working on N1

Unread post by mad_ady » Tue Aug 20, 2019 1:24 am

Quick question - to compile mainline kernel are these commands roughly correct?

Code: Select all

make odroidn1_defconfig
make -j 6 Image dtbs modules
sudo cp arch/arm64/boot/Image arch/arm64/boot/dts/rockchip/rk3399-odroidn1.dt* /boot/
sudo make modules_install
sudo make firmware_install
sudo make headers_install INSTALL_HDR_PATH=/usr
kver=`make kernelrelease`
sudo cp .config /boot/config-${kver}
Do we keep the dtb that came from the kernel, or do we use your dtb that you posted earlier? Is "Image" the correct format that is understood by mainline uboot?

User avatar
OverSun
Posts: 1491
Joined: Mon Apr 29, 2013 5:12 pm
languages_spoken: english
Has thanked: 0
Been thanked: 18 times
Contact:

Re: Trying to get mainline kernel working on N1

Unread post by OverSun » Tue Aug 20, 2019 2:14 am

All I do is
make
make modules_install install
cp -av arch/arm64/boot/dts/rockchip/rk3399-odroidn1.dtb /boot
this produces modules and the vmlinuz file that I just write into boot.txt (mostly change the version) and generate boot.scr out of it.
This is of course using my branch in git where rk3399-odroidn1.dtb is present (and is actually the only change to mainline kernel).
These users thanked the author OverSun for the post:
mad_ady (Tue Aug 20, 2019 2:23 pm)

User avatar
mad_ady
Posts: 6513
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1, H2, N2
Location: Bucharest, Romania
Has thanked: 163 times
Been thanked: 123 times
Contact:

Re: Trying to get mainline kernel working on N1

Unread post by mad_ady » Sun Sep 01, 2019 1:25 am

Ok, the little kid is with his mother in the park so daddy gets to play with the N1.
This time I recompiled u-boot (did a git pull on your repo yesterday), and also recompiled the 5.2.1 kernel based on your repo, with the goal of migrating to mainline uboot and mainline kernel.
I fused the emmc and rebooted with console attached. My boot.scr is built with this config:

Code: Select all

$ strings /boot/boot.scr
f]i"
setenv ethaddr 00:1e:06:ae:d4:2e
setenv bootargs earlyprintk console=ttyS2,115200 root=/dev/mmcblk1p2 net.ifnames=0 biosdevname=0 fsck.mode=auto fsck.repair=yes mitigations=off rootwait ro usb-storage.quirks=0x174c:0x1153:u,0x152d:0x0578:u
load ${devtype} ${devnum} ${kernel_addr_r} /boot/vmlinuz-5.2.1+
load ${devtype} ${devnum} ${fdt_addr_r} /boot/rk3399-odroidn1.dtb
booti ${kernel_addr_r} - ${fdt_addr_r}
Here is the boot log, with some commands issued by me manually:

Code: Select all

U-Boot 2019.10-rc2-01501-gce78fb2834 (Aug 30 2019 - 16:31:15 +0300)
  
Model: Odroid-N1-RK3399 Board
DRAM:  3.9 GiB
MMC:   dwmmc@fe320000: 1, sdhci@fe330000: 0
In:    serial@ff1a0000
Out:   serial@ff1a0000
Err:   serial@ff1a0000
rockchip_dnl_key_pressed: adc_channel_single_shot fail!
Net:
Error: ethernet@fe300000 address not set.
eth-1: ethernet@fe300000
Hit any key to stop autoboot:  0
switch to partitions #0, OK
mmc0(part 0) is current device
Scanning mmc 0:1...
** Unable to read file / **
Card did not respond to voltage select!
starting USB...
Bus usb@fe380000: USB EHCI 1.00
Bus usb@fe3c0000: USB EHCI 1.00
Bus dwc3: Register 2000140 NbrPorts 2
Starting the controller
USB XHCI 1.10
Bus dwc3: Register 2000140 NbrPorts 2
Starting the controller
USB XHCI 1.10
scanning bus usb@fe380000 for devices... 1 USB Device(s) found
scanning bus usb@fe3c0000 for devices... 1 USB Device(s) found
scanning bus dwc3 for devices... 1 USB Device(s) found
scanning bus dwc3 for devices... 1 USB Device(s) found
       scanning usb for storage devices... 0 Storage Device(s) found

Device 0: unknown device
No ethernet found.
missing environment variable: pxeuuid
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/00000000
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/0000000
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/000000
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/00000
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/0000
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/000
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/00
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/0
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/default-arm-rk3399-odroidn1_rk3399
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/default-arm-rk3399
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/default-arm
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/default
No ethernet found.
Config file not found
No ethernet found.
No ethernet found.

# printenv
arch=arm
baudrate=115200
board=odroidn1_rk3399
board_name=odroidn1_rk3399
boot_a_script=load ${devtype} ${devnum}:${distro_bootpart} ${scriptaddr} ${prefix}${script}; source ${scriptaddr}
boot_efi_binary=if fdt addr ${fdt_addr_r}; then bootefi bootmgr ${fdt_addr_r};else bootefi bootmgr ${fdtcontroladdr};fi;load ${devtype} ${devnum}:${distro_bootpart} ${kernel_addr_r} efi/boot/bootaa64.efi; if fdt addr ${fdt_addr_r}; then bootefi ${kernel_addr_r} ${fdt_addr_r};else bootefi ${kernel_addr_r} ${fdtcontroladdr};fi
boot_extlinux=sysboot ${devtype} ${devnum}:${distro_bootpart} any ${scriptaddr} ${prefix}${boot_syslinux_conf}
boot_net_usb_start=usb start
boot_prefixes=/ /boot/
boot_script_dhcp=boot.scr.uimg
boot_scripts=boot.scr.uimg boot.scr
boot_syslinux_conf=extlinux/extlinux.conf
boot_targets=mmc0 mmc1 usb0 pxe dhcp 
bootcmd=run distro_bootcmd
bootcmd_dhcp=run boot_net_usb_start; if dhcp ${scriptaddr} ${boot_script_dhcp}; then source ${scriptaddr}; fi;setenv efi_fdtfile ${fdtfile}; setenv efi_old_vci ${bootp_vci};setenv efi_old_arch ${bootp_arch};setenv bootp_vci PXEClient:Arch:00011:UNDI:003000;setenv bootp_arch 0xb;if dhcp ${kernel_addr_r}; then tftpboot ${fdt_addr_r} dtb/${efi_fdtfile};if fdt addr ${fdt_addr_r}; then bootefi ${kernel_addr_r} ${fdt_addr_r}; else bootefi ${kernel_addr_r} ${fdtcontroladdr};fi;fi;setenv bootp_vci ${efi_old_vci};setenv bootp_arch ${efi_old_arch};setenv efi_fdtfile;setenv efi_old_arch;setenv efi_old_vci;
bootcmd_mmc0=devnum=0; run mmc_boot
bootcmd_mmc1=devnum=1; run mmc_boot
bootcmd_pxe=run boot_net_usb_start; dhcp; if pxe get; then pxe boot; fi
bootcmd_usb0=devnum=0; run usb_boot
bootdelay=2
bootfstype=fat
cpu=armv8
distro_bootcmd=for target in ${boot_targets}; do run bootcmd_${target}; done
efi_dtb_prefixes=/ /dtb/ /dtb/current/
fdt_addr_r=0x01f00000
fdtcontroladdr=f5f2ba68
kernel_addr_r=0x02080000
load_efi_dtb=load ${devtype} ${devnum}:${distro_bootpart} ${fdt_addr_r} ${prefix}${efi_fdtfile}
mmc_boot=if mmc dev ${devnum}; then devtype=mmc; run scan_dev_for_boot_part; fi
partitions=uuid_disk=${uuid_gpt_disk};name=loader1,start=32K,size=4000K,uuid=${uuid_gpt_loader1};name=loader2,start=8MB,size=4MB,uuid=${uuid_gpt_loader2};name=trust,size=4M,uuid=${uuid_gpt_atf};name=boot,size=112M,bootable,uuid=${uuid_gpt_boot};name=rootfs,size=-,uuid=B921B045-1DF0-41C3-AF44-4C6F280D3FAE;
pxefile_addr_r=0x00600000
ramdisk_addr_r=0x04000000
sata_boot=if sata dev ${devnum}; then devtype=sata; run scan_dev_for_boot_part; fi
scan_dev_for_boot=echo Scanning ${devtype} ${devnum}:${distro_bootpart}...; for prefix in ${boot_prefixes}; do run scan_dev_for_extlinux; run scan_dev_for_scripts; done;run scan_dev_for_efi;
scan_dev_for_boot_part=part list ${devtype} ${devnum} -bootable devplist; env exists devplist || setenv devplist 1; for distro_bootpart in ${devplist}; do if fstype ${devtype} ${devnum}:${distro_bootpart} bootfstype; then run scan_dev_for_boot; fi; done; setenv devplist
scan_dev_for_efi=setenv efi_fdtfile ${fdtfile}; for prefix in ${efi_dtb_prefixes}; do if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${efi_fdtfile}; then run load_efi_dtb; fi;done;if test -e ${devtype} ${devnum}:${distro_bootpart} efi/boot/bootaa64.efi; then echo Found EFI removable media binary efi/boot/bootaa64.efi; run boot_efi_binary; echo EFI LOAD FAILED: continuing...; fi; setenv efi_fdtfile
scan_dev_for_extlinux=if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${boot_syslinux_conf}; then echo Found ${prefix}${boot_syslinux_conf}; run boot_extlinux; echo SCRIPT FAILED: continuing...; fi
scan_dev_for_scripts=for script in ${boot_scripts}; do if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${script}; then echo Found U-Boot script ${prefix}${script}; run boot_a_script; echo SCRIPT FAILED: continuing...; fi; done
scriptaddr=0x00500000
soc=rk3399
stderr=serial@ff1a0000
stdin=serial@ff1a0000
stdout=serial@ff1a0000
usb_boot=usb start; if usb dev ${devnum}; then devtype=usb; run scan_dev_for_boot_part; fi
vendor=rockchip
  
Environment size: 4011/32764 bytes

# mmcinfo
Device: sdhci@fe330000
Manufacturer ID: 15
OEM: 100
Name: BJTD4 
Bus Speed: 52000000
Mode: MMC High Speed (52MHz)
Rd Block Len: 512
MMC version 5.1
High Capacity: Yes
Capacity: 29.1 GiB
Bus Width: 8-bit
Erase Group Size: 512 KiB
HC WP Group Size: 8 MiB
User Capacity: 29.1 GiB WRREL
Boot Capacity: 4 MiB ENH
RPMB Capacity: 4 MiB ENH

# fatls mmc 0:1
 15839240   Image.owersun
            backup-4.4/
 19654664   Image
      689   boot.ini.4.4
      313   boot.ini.default
      813   boot.ini
      705   boot.ini.petitboot
   204800   idbspl.bin
    72839   rk3399-odroidn1-linux.dtb
 11526152   Image.mainline
    22367   rk3399-odroidn1-linux.dts
   788844   u-boot.itb
  9648346   uInitrd
  3543910   uInitrd.igz
    55252   rk3399-odroidn1-mainline.dtb
  9761217   uInitrd.mainline
  7554157   uInitrd.owersun
      813   boot.ini.owersun
    93314   rk3399-odroidn1-linux-owersun.dtb
      748   boot.ini.mainline

19 file(s), 1 dir(s)
# ext4ls mmc 0:2
<DIR>       4096 .
<DIR>       4096 ..
<DIR>      16384 lost+found
<DIR>       4096 snap
<DIR>       4096 boot
<DIR>       4096 srv
<DIR>      12288 etc
<DIR>       4096 dev
<DIR>       4096 DataVolume
<DIR>       4096 root
<DIR>       4096 backup
<DIR>       4096 sys
<DIR>       4096 media
<DIR>       4096 proc
<DIR>       4096 run
<DIR>       4096 bin
<DIR>       4096 mnt
<DIR>       4096 var
<DIR>       4096 usr
<DIR>       4096 opt
<DIR>       4096 lib
<DIR>      12288 sbin
<DIR>       4096 tmp
<DIR>       4096 home
<DIR>       4096 tee
             932 webmin-setup.out
       134217728 .journal

# ext4ls mmc 0:2 boot
<DIR>       4096 .
<DIR>       4096 ..
          144129 config-4.4.169
         7554157 uInitrd-4.4.169
         7557000 initrd.img-4.4.169
<DIR>       4096 uboot-mainline
             519 boot4.4.txt
             409 boot.txt
        15839240 Image.owersun
           93314 rk3399-odroidn1-linux-owersun.dtb
         7554157 uInitrd.owersun
             481 boot.scr
             591 boot4.4.scr
             441 boot4.4-noinitrd.txt
             513 boot4.4-noinitrd.scr
        16757248 vmlinuz-5.2.1+
         3772174 System.map-5.2.1+
         9892741 initrd.img-5.0.0-rc3-329696-g2d7194c14b31
          228076 config-5.2.1+
           56270 rk3399-odroidn1.dtb
         9582691 initrd.img-5.2.1+
        16482816 vmlinuz-5.2.1+.old
              69 make_boot_scr.sh
         3714466 System.map-5.2.1+.old
          227540 config-5.2.1+.old

# setenv ethaddr 00:1e:06:ae:d4:2e
# setenv bootargs earlyprintk console=ttyS2,115200 root=/dev/mmcblk1p2 net.ifnames=0 biosdevname=0 fsck.mode=auto fsck.repair=yes mitigations=off rootwait ro usb-storage.quirks=0x174c:0x1153:u,0x152d:0x0578:u
# load ${devtype} ${devnum} ${kernel_addr_r} /boot/vmlinuz-5.2.1+
# load ${devtype} ${devnum} ${fdt_addr_r} /boot/rk3399-odroidn1.dtb
# booti ${kernel_addr_r} - ${fdt_addr_r}
## Flattened Device Tree blob at 01f00000
   Booting using the fdt blob at 0x1f00000
   Loading Device Tree to 00000000f5f10000, end 00000000f5f29c81 ... OK
fdt_find_or_add_subnode: chosen: FDT_ERR_BADSTRUCTURE
ERROR: /chosen node create failed
 - must RESET the board to recover.

FDT creation failed! hanging...### ERROR ### Please RESET the board ###
I have a 32G Orange EMMC connected to the N1. It seems uboot can see it just fine (I listed the first partition just for reference, I know it's not used), but it can't boot from it. It may be it's searching for boot.scr only on the first partition (and I have it on the second one). I may need to try to create /boot/boot.scr on the vfat partition (if uboot can accept the first partition as vfat - not sure).
But in any case, I tried to load the commands manually and it failed. Not sure where it would try to map /boot (for /boot/vmlinuz, etc) if it's on the second partition. I'm guessing it's relative to where boot.scr was found, right? In this case I may need to move kernel/dtb together with boot.scr on the first partition, right?

Any other suggestions?
I will need to see when my next maintenance window will be - maybe monday if weather permits...

User avatar
mad_ady
Posts: 6513
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1, H2, N2
Location: Bucharest, Romania
Has thanked: 163 times
Been thanked: 123 times
Contact:

Re: Trying to get mainline kernel working on N1

Unread post by mad_ady » Fri Sep 06, 2019 5:25 pm

Ok, took some time to tinker and I managed to boot mainline on the N1.
What I did was what I suggested above:

Code: Select all

mkdir /media/boot/boot
cp /boot/vmlinuz-5.2.1+ /boot/rk3399-odroidn1.dtb /boot/boot.txt /boot/boot.scr /media/boot/boot
On reboot the kernel booted automatically, though was unable to remount the filesystem rw. This was due to a mistake of mine in the /etc/fstab I had the wrong UUID for the rootfs. Once I fixed that it booted correctly.

Code: Select all

adrianp@aldebaran64:~$ uname -a
Linux aldebaran64 5.2.1+ #4 SMP Sat Aug 31 18:42:24 EEST 2019 aarch64 aarch64 aarch64 GNU/Linux

Welcome to Ubuntu 18.04.3 LTS!

[   16.194262] systemd[1]: Set hostname to <aldebaran64>.
[   16.404332] random: systemd: uninitialized urandom read (16 bytes read)
[   16.412589] systemd[1]: Created slice User and Session Slice.
[  OK  ] Created slice User and Session Slice.
[   16.430100] random: systemd: uninitialized urandom read (16 bytes read)
[   16.437676] systemd[1]: Started Forward Password Requests to Wall Directory Watch.
[  OK  ] Started Forward Password Requests to Wall Directory Watch.
[   16.462082] random: systemd: uninitialized urandom read (16 bytes read)
[   16.470093] systemd[1]: Created slice System Slice.
[  OK  ] Created slice System Slice.
[   16.486321] systemd[1]: Listening on Journal Audit Socket.
[  OK  ] Listening on Journal Audit Socket.
[   16.502176] systemd[1]: Listening on fsck to fsckd communication Socket.
[  OK  ] Listening on fsck to fsckd communication Socket.
[   16.526231] systemd[1]: Listening on Device-mapper event daemon FIFOs.
[  OK  ] Listening on Device-mapper event daemon FIFOs.
[   16.550282] systemd[1]: Listening on Journal Socket.
[  OK  ] Listening on Journal Socket.
         Mounting NFSD configuration filesystem...
         Mounting Huge Pages File System...
         Mounting RPC Pipe File System...
[   16.593958] Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
[  OK  ] Listening on RPCbind Server Activation Socket.
         Mounting Kernel Debug File System...
         Starting Nameserver information manager...
[  OK  ] Listening on udev Control Socket.
[  OK  ] Listening on /dev/initctl Compatibility Named Pipe.
[  OK  ] Listening on Network Service Netlink Socket.
[  OK  ] Reached target Swap.
         Starting Create list of required st…ce nodes for the current kernel...
[  OK  ] Reached target Slices.
         Mounting POSIX Message Queue File System...
         Starting Restore / save the current clock...
[  OK  ] Created slice system-serial\x2dgetty.slice.
         Starting Set the console keyboard layout...
         Starting File System Check on Root Device...
[  OK  ] Listening on Syslog Socket.
[  OK  ] Started ntp-systemd-netif.path.
[  OK  ] Listening on udev Kernel Socket.
         Starting udev Coldplug all Devices...
[  OK  ] Listening on Journal Socket (/dev/log).
         Starting Journal Service...
         Starting Load Kernel Modules...
[  OK  ] Reached target System Time Synchronized.
[  OK  ] Mounted NFSD configuration filesystem.
[  OK  ] Mounted Huge Pages File System.
[  OK  ] Started Journal Service.
[  OK  ] Mounted RPC Pipe File System.
[  OK  ] Mounted Kernel Debug File System.
[  OK  ] Started Create list of required sta…vice nodes for the current kernel.
[  OK  ] Mounted POSIX Message Queue File System.
[  OK  ] Started Restore / save the current clock.
[  OK  ] Started Set the console keyboard layout.
[FAILED] Failed to start Load Kernel Modules.
See 'systemctl status systemd-modules-load.service' for details.
[  OK  ] Started Nameserver information manager.
[  OK  ] Started File System Check Daemon to report status.
[  OK  ] Reached target Network (Pre).
         Starting Apply Kernel Variables...
         Mounting Kernel Configuration File System...
         Starting Create Static Device Nodes in /dev...
         Starting pNFS block layout mapping daemon...
[  OK  ] Started udev Coldplug all Devices.
[  OK  ] Mounted Kernel Configuration File System.
[  OK  ] Started pNFS block layout mapping daemon.
[  OK  ] Started Apply Kernel Variables.
[  OK  ] Started File System Check on Root Device.
[  OK  ] Started Create Static Device Nodes in /dev.
         Starting Remount Root and Kernel File Systems...
[FAILED] Failed to start Remount Root and Kernel File Systems.
See 'systemctl status systemd-remount-fs.service' for details.
[  OK  ] Reached target Local File Systems (Pre).
         Mounting /tmp...
         Starting Flush Journal to Persistent Storage...
         Starting udev Kernel Device Manager...
         Starting Load/Save Random Seed...
[  OK  ] Mounted /tmp.
[  OK  ] Started Load/Save Random Seed.
[  OK  ] Started udev Kernel Device Manager.
         Starting Network Service...
[  OK  ] Started Dispatch Password Requests to Console Directory Watch.
[  OK  ] Reached target Local Encrypted Volumes.
[  OK  ] Started Flush Journal to Persistent Storage.
[  OK  ] Started Network Service.
         Starting Load Kernel Modules...
         Starting Remount Root and Kernel File Systems...
         Starting Wait for Network to be Configured...
[FAILED] Failed to start Load Kernel Modules.
See 'systemctl status systemd-modules-load.service' for details.
[FAILED] Failed to start Remount Root and Kernel File Systems.
See 'systemctl status systemd-remount-fs.service' for details.
[  OK  ] Found device /dev/ttyS2.
[  OK  ] Found device /dev/disk/by-label/boot.
         Mounting /media/boot...
[  OK  ] Mounted /media/boot.
[  OK  ] Reached target Local File Systems.
         Starting Set console font and keymap...
         Starting Tell Plymouth To Write Out Runtime Data...
         Starting Preprocess NFS configuration...
         Starting Create Volatile Files and Directories...
         Starting Enable support for additional executable binary formats...
         Starting Raise network interfaces...
[  OK  ] Started Set console font and keymap.
[  OK  ] Started Tell Plymouth To Write Out Runtime Data.
[  OK  ] Started Preprocess NFS configuration.
[FAILED] Failed to start Create Volatile Files and Directories.
See 'systemctl status systemd-tmpfiles-setup.service' for details.
[  OK  ] Started Enable support for additional executable binary formats.
[  OK  ] Started MD array monitor.
[  OK  ] Reached target Sound Card.
[FAILED] Failed to start Network Name Resolution.
See 'systemctl status systemd-resolved.service' for details.
         Starting Create Volatile Files and Directories...
         Starting Tell Plymouth To Write Out Runtime Data...
         Starting Load Kernel Modules...
[  OK  ] Reached target Host and Network Name Lookups.
[  OK  ] Reached target NFS client services.
         Starting NFSv4 ID-name mapping service...
[  OK  ] Started Raise network interfaces.
[FAILED] Failed to start Create Volatile Files and Directories.
See 'systemctl status systemd-tmpfiles-setup.service' for details.
[  OK  ] Started Tell Plymouth To Write Out Runtime Data.
[FAILED] Failed to start Load Kernel Modules.
See 'systemctl status systemd-modules-load.service' for details.
[  OK  ] Started NFSv4 ID-name mapping service.
         Starting Tell Plymouth To Write Out Runtime Data...
         Starting Load Kernel Modules...
[  OK  ] Stopped Network Name Resolution.
         Starting Create Volatile Files and Directories...
[  OK  ] Started Tell Plymouth To Write Out Runtime Data.
[FAILED] Failed to start Load Kernel Modules.
See 'systemctl status systemd-modules-load.service' for details.
[FAILED] Failed to start Create Volatile Files and Directories.
See 'systemctl status systemd-tmpfiles-setup.service' for details.
[FAILED] Failed to start Network Name Resolution.
See 'systemctl status systemd-resolved.service' for details.
         Starting Create Volatile Files and Directories...
         Starting Tell Plymouth To Write Out Runtime Data...
         Starting Load Kernel Modules...
[FAILED] Failed to start Create Volatile Files and Directories.
See 'systemctl status systemd-tmpfiles-setup.service' for details.
[  OK  ] Started Tell Plymouth To Write Out Runtime Data.
[FAILED] Failed to start Load Kernel Modules.
See 'systemctl status systemd-modules-load.service' for details.
[FAILED] Failed to start Load Kernel Modules.
See 'systemctl status systemd-modules-load.service' for details.
[  OK  ] Stopped Network Name Resolution.
         Starting Tell Plymouth To Write Out Runtime Data...
         Starting Create Volatile Files and Directories...
[  OK  ] Started Tell Plymouth To Write Out Runtime Data.
[FAILED] Failed to start Create Volatile Files and Directories.
See 'systemctl status systemd-tmpfiles-setup.service' for details.
[FAILED] Failed to start Network Name Resolution.
See 'systemctl status systemd-resolved.service' for details.
[FAILED] Failed to start Load Kernel Modules.
See 'systemctl status systemd-modules-load.service' for details.
[FAILED] Failed to start Tell Plymouth To Write Out Runtime Data.
See 'systemctl status plymouth-read-write.service' for details.
[FAILED] Failed to start Create Volatile Files and Directories.
See 'systemctl status systemd-tmpfiles-setup.service' for details.
         Starting RPC bind portmap service...
[FAILED] Failed to start Network Time Synchronization.
See 'systemctl status systemd-timesyncd.service' for details.
         Starting Update UTMP about System Boot/Shutdown...
[  OK  ] Started RPC bind portmap service.
[  OK  ] Started Wait for Network to be Configured.
[FAILED] Failed to start Tell Plymouth To Write Out Runtime Data.
See 'systemctl status plymouth-read-write.service' for details.
[  OK  ] Stopped Network Name Resolution.
[  OK  ] Stopped Network Time Synchronization.
[FAILED] Failed to start Create Volatile Files and Directories.
See 'systemctl status systemd-tmpfiles-setup.service' for details.
[FAILED] Failed to start Network Name Resolution.
See 'systemctl status systemd-resolved.service' for details.
[FAILED] Failed to start Tell Plymouth To Write Out Runtime Data.
See 'systemctl status plymouth-read-write.service' for details.
[FAILED] Failed to start Create Volatile Files and Directories.
See 'systemctl status systemd-tmpfiles-setup.service' for details.
[FAILED] Failed to start Network Time Synchronization.
See 'systemctl status systemd-timesyncd.service' for details.
[FAILED] Failed to start Load Kernel Modules.
See 'systemctl status systemd-modules-load.service' for details.
[  OK  ] Reached target RPC Port Mapper.
[  OK  ] Stopped Network Time Synchronization.
[FAILED] Failed to start Load Kernel Modules.
See 'systemctl status systemd-modules-load.service' for details.
[FAILED] Failed to start Tell Plymouth To Write Out Runtime Data.
See 'systemctl status plymouth-read-write.service' for details.
[  OK  ] Stopped Network Name Resolution.
[FAILED] Failed to start Create Volatile Files and Directories.
See 'systemctl status systemd-tmpfiles-setup.service' for details.
[FAILED] Failed to start Network Time Synchronization.
See 'systemctl status systemd-timesyncd.service' for details.
[FAILED] Failed to start Network Name Resolution.
See 'systemctl status systemd-resolved.service' for details.
[FAILED] Failed to start Load Kernel Modules.
See 'systemctl status systemd-modules-load.service' for details.
[FAILED] Failed to start Create Volatile Files and Directories.
See 'systemctl status systemd-tmpfiles-setup.service' for details.
[FAILED] Failed to start Tell Plymouth To Write Out Runtime Data.
See 'systemctl status plymouth-read-write.service' for details.
[FAILED] Failed to start Update UTMP about System Boot/Shutdown.
See 'systemctl status systemd-update-utmp.service' for details.
[DEPEND] Dependency failed for Update UTMP about System Runlevel Changes.
[  OK  ] Stopped Network Name Resolution.
[FAILED] Failed to start Tell Plymouth To Write Out Runtime Data.
See 'systemctl status plymouth-read-write.service' for details.
[FAILED] Failed to start Load Kernel Modules.
See 'systemctl status systemd-modules-load.service' for details.
[  OK  ] Stopped Network Time Synchronization.
[FAILED] Failed to start Create Volatile Files and Directories.
See 'systemctl status systemd-tmpfiles-setup.service' for details.
[FAILED] Failed to start Network Name Resolution.
See 'systemctl status systemd-resolved.service' for details.
         Starting Update UTMP about System Boot/Shutdown...
[FAILED] Failed to start Network Time Synchronization.
See 'systemctl status systemd-timesyncd.service' for details.
[  OK  ] Stopped Network Time Synchronization.
[FAILED] Failed to start Network Time Synchronization.
See 'systemctl status systemd-timesyncd.service' for details.
[FAILED] Failed to start Update UTMP about System Boot/Shutdown.
See 'systemctl status systemd-update-utmp.service' for details.
[  OK  ] Stopped Network Time Synchronization.
[FAILED] Failed to start Network Time Synchronization.
See 'systemctl status systemd-timesyncd.service' for details.
[  OK  ] Reached target System Initialization.
[  OK  ] Started Daily apt download activities.
[  OK  ] Started resolvconf-pull-resolved.path.
[  OK  ] Reached target Paths.
[  OK  ] Listening on Avahi mDNS/DNS-SD Stack Activation Socket.
[  OK  ] Started Daily apt upgrade and clean activities.
[  OK  ] Started Clean PHP session files every 30 mins.
[  OK  ] Started Daily Cleanup of Temporary Directories.
[  OK  ] Started Message of the Day.
[  OK  ] Listening on UUID daemon activation socket.
[  OK  ] Listening on D-Bus System Message Bus Socket.
[  OK  ] Started Discard unused blocks once a week.
[  OK  ] Listening on lircd.socket.
[  OK  ] Started Trigger anacron every hour.
[  OK  ] Reached target Timers.
         Starting Docker Socket for the API.
[  OK  ] Listening on Docker Socket for the API.
[  OK  ] Reached target Sockets.
[  OK  ] Reached target Basic System.
[  OK  ] Started ntp-systemd-netif.service.
         Starting Avahi mDNS/DNS-SD Stack...
         Starting hdidle to turn off WDC HDD on inactivity...
         Starting Dispatcher daemon for systemd-networkd...
[  OK  ] Started D-Bus System Message Bus.
         Starting Save/Restore Sound Card State...
         Starting Hass.io AppArmor...
         Starting System Logging Service...
[  OK  ] Started Deferred execution scheduler.
         Starting lircd(8) initialization helper tool...
         Starting Initializes zram swaping...
[  OK  ] Started Run anacron jobs.
[  OK  ] Started Busybox shell on port 9999.
[  OK  ] Started Handle events from IR remotes decoded by lircd(8).
         Starting LSB: LVM2 metadata daemon...
         Starting WPA supplicant...
[  OK  ] Started Convert IR remotes button p…ses to mouse movements and clicks.
[  OK  ] Started Regular background program processing daemon.
[  OK  ] Started Keepass password backup.
[  OK  ] Started Set the CPU Frequency Scaling governor.
         Starting Restore /etc/resolv.conf i…fore the ppp link was shut down...
         Starting Login Service...
         Starting LSB: LVM2 poll daemon...
[  OK  ] Started System Logging Service.
[  OK  ] Started hdidle to turn off WDC HDD on inactivity.
[  OK  ] Started Hass.io AppArmor.
[  OK  ] Started lircd(8) initialization helper tool.
[  OK  ] Started Initializes zram swaping.
[  OK  ] Started Restore /etc/resolv.conf if…before the ppp link was shut down.
[  OK  ] Started Dispatcher daemon for systemd-networkd.
[  OK  ] Started Save/Restore Sound Card State.
[  OK  ] Started Avahi mDNS/DNS-SD Stack.
[  OK  ] Started LSB: LVM2 metadata daemon.
[  OK  ] Started LSB: LVM2 poll daemon.
[  OK  ] Started WPA supplicant.
[  OK  ] Started Login Service.
[  OK  ] Reached target Network.
         Starting MySQL Community Server...
         Starting Transmission BitTorrent Daemon...
         Starting OpenBSD Secure Shell server running on Big Cores...
         Starting containerd container runtime...
         Starting OpenBSD Secure Shell server...
[  OK  ] Reached target Network is Online.
         Starting Message of the Day...
         Starting Samba NMB Daemon...
         Starting Ubuntu FAN network setup...
         Starting Munin Node...
         Starting /etc/rc.local Compatibility...
         Starting LSB: web-based administration interface for Unix systems...
         Starting NFS Mount Daemon...
[  OK  ] Started Unattended Upgrades Shutdown.
         Starting Fail2Ban Service...
         Starting Daily apt download activities...
[  OK  ] Started IR AC MQTT Agent.
[  OK  ] Started Flexible IR remote input/output application support.
[  OK  ] Started Forward LIRC button presses as uinput events.
[   21.163727] rc.local[662]: performance
[  OK  ] Started OpenBSD Secure Shell server running on Big Cores.
[  OK  ] Started containerd container runtime.
[  OK  ] Started NFS Mount Daemon.
[  OK  ] Started Fail2Ban Service.
[   21.208768] rc.local[662]: 4-5
         Starting NFS server and services...
         Starting Docker Application Container Engine...
[  OK  ] Started OpenBSD Secure Shell server.
[  OK  ] Stopped Wait for Network to be Configured.
         Stopping Network Service...
[  OK  ] Stopped NFS server and services.
[  OK  ] Started Ubuntu FAN network setup.
[  OK  ] Stopped Network Service.
[  OK  ] Reached target Remote File Systems (Pre).
[  OK  ] Reached target Remote File Systems.
         Starting LSB: Start ntop daemon...
         Starting LSB: mosquitto MQTT v3.1 message broker...
         Starting LSB: Mount debugfs on /sys/kernel/debug...
[FAILED] Failed to start The Apache HTTP Server.
See 'systemctl status apache2.service' for details.
         Starting Disk Cache Cleaning Daemon for Apache HTTP Server...
         Starting LSB: Tool to automatically… submit kernel crash signatures...
         Starting Permit User Sessions...
[   21.465877] rc.local[662]: CPU0: governor performance -> ondemand
         Starting LSB: Load kernel modules needed to enable cpufreq scaling...
[   21.504420] rc.local[662]: CPU1: governor performance -> ondemand
         Starting LSB: Netplan calendar service....
[   21.536321] rc.local[662]: CPU2: governor performance -> ondemand
         Starting Automounts filesystems on demand...
[   21.564322] rc.local[662]: CPU3: governor performance -> ondemand
         Starting LSB: backup and restore program...
[   21.592650] rc.local[662]: CPU4: governor performance -> ondemand
         Stopping NFS Mount Daemon...
[   21.620489] rc.local[662]: CPU5: governor performance -> ondemand
         Stopping NFSv4 ID-name mapping service...
[   21.649103] rc.local[662]: <13>Sep  6 10:12:35 /etc/rc.local: Applying ondemand tweaks
[  OK  ] Started Transmission BitTorrent Daemon.
[   21.680573] rc.local[662]: <13>Sep  6 10:12:35 /etc/rc.local: Set thermal trip points to 60C
[   21.709957] rc.local[662]: /etc/rc.local: 87: /etc/rc.local: cannot create /sys/devices/virtual/thermal/thermal_zone0/trip_point_0_temp: Permission denied
[  OK  ] Stopped NFSv4 ID-name mapping service.
[FAILED] Failed to start Message of the Day.
See 'systemctl status motd-news.service' for details.
[FAILED] Failed to start Samba NMB Daemon.
See 'systemctl status nmbd.service' for details.
[FAILED] Failed to start Munin Node.
See 'systemctl status munin-node.service' for details.
[FAILED] Failed to start /etc/rc.local Compatibility.
See 'systemctl status rc-local.service' for details.
[  OK  ] Stopped NFS Mount Daemon.
[  OK  ] Started LSB: Start ntop daemon.
[  OK  ] Started Disk Cache Cleaning Daemon for Apache HTTP Server.
[  OK  ] Started LSB: Tool to automatically …nd submit kernel crash signatures.
[  OK  ] Started Permit User Sessions.
[  OK  ] Started Automounts filesystems on demand.
[  OK  ] Started LSB: backup and restore program.
[FAILED] Failed to start Docker Application Container Engine.
See 'systemctl status docker.service' for details.
[DEPEND] Dependency failed for Hass.io supervisor.
         Starting Network Service...
[  OK  ] Stopped Munin Node.
         Starting Munin Node...
         Starting LSB: Launch backuppc server...
         Starting Hold until boot process finishes up...
         Starting Terminate Plymouth Boot Screen...
         Starting Samba SMB Daemon...
[  OK  ] Started Network Service.
[  OK  ] Started LSB: mosquitto MQTT v3.1 message broker.
[  OK  ] Started LSB: Mount debugfs on /sys/kernel/debug.
[  OK  ] Started LSB: Load kernel modules needed to enable cpufreq scaling.
[  OK  ] Started LSB: Netplan calendar service..
[  OK  ] Started LSB: Launch backuppc server.
[  OK  ] Started Hold until boot process finishes up.
[FAILED] Failed to start Munin Node.
See 'systemctl status munin-node.service' for details.
[  OK  ] Started Terminate Plymouth Boot Screen.
[FAILED] Failed to start Samba SMB Daemon.
See 'systemctl status smbd.service' for details.
         Starting Set console scheme...
[  OK  ] Started Serial Getty on ttyS2.
         Starting LSB: set CPUFreq kernel parameters...
[  OK  ] Started Set console scheme.
[  OK  ] Created slice system-getty.slice.
[  OK  ] Started Getty on tty1.
[  OK  ] Reached target Login Prompts.
[FAILED] Failed to start Daily apt download activities.
See 'systemctl status apt-daily.service' for details.
[  OK  ] Stopped Munin Node.
         Starting Munin Node...
[  OK  ] Started LSB: set CPUFreq kernel parameters.
         Starting LSB: Set sysfs variables from /etc/sysfs.conf...
[  OK  ] Started LSB: Set sysfs variables from /etc/sysfs.conf.
[FAILED] Failed to start MySQL Community Server.
See 'systemctl status mysql.service' for details.
[FAILED] Failed to start Munin Node.
See 'systemctl status munin-node.service' for details.
[  OK  ] Stopped Munin Node.
         Starting Munin Node...
[  OK  ] Stopped MySQL Community Server.
         Starting MySQL Community Server...
[FAILED] Failed to start Munin Node.
See 'systemctl status munin-node.service' for details.
[  OK  ] Stopped Munin Node.
         Starting Munin Node...
[FAILED] Failed to start Munin Node.
See 'systemctl status munin-node.service' for details.
[  OK  ] Stopped Munin Node.
[FAILED] Failed to start Munin Node.
See 'systemctl status munin-node.service' for details.
[FAILED] Failed to start MySQL Community Server.
See 'systemctl status mysql.service' for details.
[  OK  ] Stopped Docker Application Container Engine.
[  OK  ] Closed Docker Socket for the API.
         Stopping Docker Socket for the API.
         Starting Docker Socket for the API.
[  OK  ] Stopped MySQL Community Server.
         Starting MySQL Community Server...
[  OK  ] Listening on Docker Socket for the API.
         Starting Docker Application Container Engine...
[FAILED] Failed to start Docker Application Container Engine.
See 'systemctl status docker.service' for details.
[FAILED] Failed to start MySQL Community Server.
See 'systemctl status mysql.service' for details.
[  OK  ] Stopped MySQL Community Server.
         Starting MySQL Community Server...
[  OK  ] Started LSB: web-based administration interface for Unix systems.

Ubuntu 18.04.3 LTS aldebaran64 ttyS2



root@aldebaran64:~# mount | grep /dev
/dev/mmcblk1p2 on / type ext4 (ro,relatime,stripe=32732)

root@aldebaran64:~# systemctl status systemd-remount-fs.service
● systemd-remount-fs.service - Remount Root and Kernel File Systems
   Loaded: loaded (/lib/systemd/system/systemd-remount-fs.service; static; vendor preset: enabled)
   Active: failed (Result: exit-code) since Fri 2019-09-06 10:12:32 EEST; 5min ago
     Docs: man:systemd-remount-fs.service(8)
           https://www.freedesktop.org/wiki/Software/systemd/APIFileSystems
  Process: 349 ExecStart=/lib/systemd/systemd-remount-fs (code=exited, status=1/FAILURE)
 Main PID: 349 (code=exited, status=1/FAILURE)

Sep 06 10:12:32 aldebaran64 systemd[1]: Starting Remount Root and Kernel File Systems...
Sep 06 10:12:32 aldebaran64 systemd-remount-fs[349]: mount: /: can't find UUID=e139ce78-9841-40fe-8823-96a304a09859.
Sep 06 10:12:32 aldebaran64 systemd-remount-fs[349]: /bin/mount for / exited with exit status 1.
Sep 06 10:12:32 aldebaran64 systemd[1]: systemd-remount-fs.service: Main process exited, code=exited, status=1/FAILURE
Sep 06 10:12:32 aldebaran64 systemd[1]: systemd-remount-fs.service: Failed with result 'exit-code'.
Sep 06 10:12:32 aldebaran64 systemd[1]: Failed to start Remount Root and Kernel File Systems.

root@aldebaran64:~# blkid | grep mmcblk1p2
/dev/mmcblk1p2: LABEL="rootfs" UUID="a130ca78-0841-400a-8823-06a304a00850" TYPE="ext4" PARTUUID="630bb630-02"
root@aldebaran64:~# 
root@aldebaran64:~# cat /etc/fstab
UUID=e139ce78-9841-40fe-8823-96a304a09859 / ext4 errors=remount-ro,noatime 0 1
LABEL=boot /media/boot vfat defaults 0 1
tmpfs /tmp tmpfs defaults,noatime,mode=1777,size=1024M 0 0

root@aldebaran64:~# mount -o remount,rw /
mount: /: can't find UUID=e139ce78-9841-40fe-8823-96a304a09859.
I did notice some network issues on first boot - delays and packet losts at some point, though subsequent iperf tests were fine. The problems may be caused by my docker containers starting up...

Code: Select all

adrianp  ~  ping aldebaran
PING aldebaran (192.168.1.5) 56(84) bytes of data.
64 bytes from aldebaran (192.168.1.5): icmp_seq=3 ttl=64 time=1019 ms
64 bytes from aldebaran (192.168.1.5): icmp_seq=5 ttl=64 time=199 ms
64 bytes from aldebaran (192.168.1.5): icmp_seq=8 ttl=64 time=111 ms
64 bytes from aldebaran (192.168.1.5): icmp_seq=9 ttl=64 time=27.3 ms
64 bytes from aldebaran (192.168.1.5): icmp_seq=10 ttl=64 time=66.8 ms
64 bytes from aldebaran (192.168.1.5): icmp_seq=11 ttl=64 time=123 ms
64 bytes from aldebaran (192.168.1.5): icmp_seq=12 ttl=64 time=4.20 ms
64 bytes from aldebaran (192.168.1.5): icmp_seq=14 ttl=64 time=287 ms
64 bytes from aldebaran (192.168.1.5): icmp_seq=15 ttl=64 time=94.0 ms
64 bytes from aldebaran (192.168.1.5): icmp_seq=16 ttl=64 time=549 ms
64 bytes from aldebaran (192.168.1.5): icmp_seq=17 ttl=64 time=307 ms
64 bytes from aldebaran (192.168.1.5): icmp_seq=18 ttl=64 time=227 ms
64 bytes from aldebaran (192.168.1.5): icmp_seq=25 ttl=64 time=143 ms
64 bytes from aldebaran (192.168.1.5): icmp_seq=26 ttl=64 time=28.4 ms
64 bytes from aldebaran (192.168.1.5): icmp_seq=28 ttl=64 time=367 ms
64 bytes from aldebaran (192.168.1.5): icmp_seq=30 ttl=64 time=58.1 ms
64 bytes from aldebaran (192.168.1.5): icmp_seq=33 ttl=64 time=101 ms
64 bytes from aldebaran (192.168.1.5): icmp_seq=34 ttl=64 time=77.3 ms
64 bytes from aldebaran (192.168.1.5): icmp_seq=35 ttl=64 time=119 ms
64 bytes from aldebaran (192.168.1.5): icmp_seq=36 ttl=64 time=351 ms
64 bytes from aldebaran (192.168.1.5): icmp_seq=39 ttl=64 time=2454 ms
64 bytes from aldebaran (192.168.1.5): icmp_seq=40 ttl=64 time=2998 ms
64 bytes from aldebaran (192.168.1.5): icmp_seq=43 ttl=64 time=1687 ms
64 bytes from aldebaran (192.168.1.5): icmp_seq=44 ttl=64 time=1906 ms
64 bytes from aldebaran (192.168.1.5): icmp_seq=45 ttl=64 time=1036 ms
64 bytes from aldebaran (192.168.1.5): icmp_seq=46 ttl=64 time=608 ms
64 bytes from aldebaran (192.168.1.5): icmp_seq=47 ttl=64 time=5.94 ms
64 bytes from aldebaran (192.168.1.5): icmp_seq=48 ttl=64 time=23.2 ms
64 bytes from aldebaran (192.168.1.5): icmp_seq=49 ttl=64 time=2.00 ms
64 bytes from aldebaran (192.168.1.5): icmp_seq=50 ttl=64 time=204 ms
64 bytes from aldebaran (192.168.1.5): icmp_seq=51 ttl=64 time=5.76 ms
64 bytes from aldebaran (192.168.1.5): icmp_seq=52 ttl=64 time=6.21 ms
64 bytes from aldebaran (192.168.1.5): icmp_seq=53 ttl=64 time=166 ms
64 bytes from aldebaran (192.168.1.5): icmp_seq=54 ttl=64 time=12.2 ms
64 bytes from aldebaran (192.168.1.5): icmp_seq=55 ttl=64 time=65.9 ms
64 bytes from aldebaran (192.168.1.5): icmp_seq=56 ttl=64 time=68.9 ms
64 bytes from aldebaran (192.168.1.5): icmp_seq=57 ttl=64 time=124 ms
64 bytes from aldebaran (192.168.1.5): icmp_seq=58 ttl=64 time=0.869 ms
64 bytes from aldebaran (192.168.1.5): icmp_seq=59 ttl=64 time=0.822 ms
64 bytes from aldebaran (192.168.1.5): icmp_seq=60 ttl=64 time=0.863 ms
64 bytes from aldebaran (192.168.1.5): icmp_seq=61 ttl=64 time=0.815 ms
64 bytes from aldebaran (192.168.1.5): icmp_seq=62 ttl=64 time=0.692 ms
64 bytes from aldebaran (192.168.1.5): icmp_seq=63 ttl=64 time=0.684 ms
64 bytes from aldebaran (192.168.1.5): icmp_seq=64 ttl=64 time=0.735 ms
64 bytes from aldebaran (192.168.1.5): icmp_seq=65 ttl=64 time=0.851 ms

 adrianp  ~  sudo iperf3 -c 192.168.1.5 -p 5001
Connecting to host 192.168.1.5, port 5001
[  4] local 192.168.1.11 port 57630 connected to 192.168.1.5 port 5001
[ ID] Interval           Transfer     Bandwidth       Retr  Cwnd
[  4]   0.00-1.00   sec   112 MBytes   943 Mbits/sec    0    492 KBytes       
[  4]   1.00-2.00   sec   111 MBytes   935 Mbits/sec    0    518 KBytes       
[  4]   2.00-3.00   sec   112 MBytes   938 Mbits/sec    0    577 KBytes       
[  4]   3.00-4.00   sec   112 MBytes   936 Mbits/sec    0    604 KBytes       
[  4]   4.00-5.00   sec   111 MBytes   934 Mbits/sec    0    604 KBytes       
[  4]   5.00-6.00   sec   112 MBytes   936 Mbits/sec    0    635 KBytes       
[  4]   6.00-7.00   sec   111 MBytes   934 Mbits/sec    0    635 KBytes       
[  4]   7.00-8.00   sec   112 MBytes   937 Mbits/sec    0    716 KBytes       
[  4]   8.00-9.00   sec   111 MBytes   933 Mbits/sec    0    716 KBytes       
[  4]   9.00-10.00  sec   112 MBytes   936 Mbits/sec    0    716 KBytes       
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bandwidth       Retr
[  4]   0.00-10.00  sec  1.09 GBytes   936 Mbits/sec    0             sender
[  4]   0.00-10.00  sec  1.09 GBytes   933 Mbits/sec                  receiver

iperf Done.
 adrianp  ~  sudo iperf3 -c 192.168.1.5 -R -p 5001
Connecting to host 192.168.1.5, port 5001
Reverse mode, remote host 192.168.1.5 is sending
[  4] local 192.168.1.11 port 57634 connected to 192.168.1.5 port 5001
[ ID] Interval           Transfer     Bandwidth
[  4]   0.00-1.00   sec   112 MBytes   937 Mbits/sec                  
[  4]   1.00-2.00   sec   112 MBytes   939 Mbits/sec                  
[  4]   2.00-3.00   sec   112 MBytes   938 Mbits/sec                  
[  4]   3.00-4.00   sec   112 MBytes   938 Mbits/sec                  
[  4]   4.00-5.00   sec   112 MBytes   938 Mbits/sec                  
[  4]   5.00-6.00   sec   112 MBytes   941 Mbits/sec                  
[  4]   6.00-7.00   sec   112 MBytes   941 Mbits/sec                  
[  4]   7.00-8.00   sec   112 MBytes   941 Mbits/sec                  
[  4]   8.00-9.00   sec   112 MBytes   940 Mbits/sec                  
[  4]   9.00-10.00  sec   112 MBytes   940 Mbits/sec                  
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bandwidth       Retr
[  4]   0.00-10.00  sec  1.10 GBytes   941 Mbits/sec   49             sender
[  4]   0.00-10.00  sec  1.09 GBytes   940 Mbits/sec                  receiver

iperf Done.
However, it did crash once (it was mostly idle):

Code: Select all

root@aldebaran64:~# [  792.160782] SError Interrupt on CPU5, code 0xbf000000 -- SError
[  792.160784] CPU: 5 PID: 22802 Comm: munin-html Not tainted 5.2.1+ #4
[  792.160785] Hardware name: Hardkernel ODROID-N1 (DT)
[  792.160785] pstate: 20000005 (nzCv daif -PAN -UAO)
[  792.160786] pc : copy_page+0x3c/0xe4
[  792.160787] lr : __cpu_copy_user_page+0x14/0x38
[  792.160787] sp : ffff0000179dbc20
[  792.160788] x29: ffff0000179dbc20 x28: 0000000000000000 
[  792.160790] x27: ffff80008aabad60 x26: ffff800009c01000 
[  792.160791] x25: ffff8000560a2880 x24: ffff80008aabad00 
[  792.160793] x23: ffff000010fc8000 x22: ffff80005ae79f00 
[  792.160794] x21: ffff0000179dbd90 x20: ffff7e0000270040 
[  792.160796] x19: ffff800009c01000 x18: 0000000000000d80 
[  792.160797] x17: 0000aaaad510a158 x16: 0000080100000001 
[  792.160798] x15: 0000aaaad51111d8 x14: 0000aaaad510cc50 
[  792.160800] x13: 0000080100000001 x12: 0000aaaad51111c0 
[  792.160801] x11: 0000aaaad5109110 x10: 0000440300000001 
[  792.160803] x9 : 0000aaaad510e910 x8 : 0000000000000000 
[  792.160804] x7 : 00000000000000aa x6 : 0000aaaad510bd20 
[  792.160806] x5 : 0000000000001001 x4 : 0000000000000000 
[  792.160807] x3 : 000000006c6d7468 x2 : 2e306e75745f6669 
[  792.160808] x1 : ffff80000b367200 x0 : ffff800009c01180 
[  792.160810] Kernel panic - not syncing: Asynchronous SError Interrupt
[  792.160811] CPU: 5 PID: 22802 Comm: munin-html Not tainted 5.2.1+ #4
[  792.160811] Hardware name: Hardkernel ODROID-N1 (DT)
[  792.160812] Call trace:
[  792.160813]  dump_backtrace+0x0/0x140
[  792.160813]  show_stack+0x14/0x20
[  792.160814]  dump_stack+0xa8/0xcc
[  792.160815]  panic+0x144/0x324
[  792.160815]  nmi_panic+0x6c/0x70
[  792.160816]  arm64_serror_panic+0x74/0x88
[  792.160816]  do_serror+0x114/0x118
[  792.160817]  el1_error+0x84/0xf8
[  792.160817]  copy_page+0x3c/0xe4
[  792.160818]  wp_page_copy+0xe8/0x6a8
[  792.160819]  do_wp_page+0xa8/0x6d0
[  792.160819]  __handle_mm_fault+0x928/0x10c8
[  792.160820]  handle_mm_fault+0xe0/0x178
[  792.160820]  do_page_fault+0x1b8/0x458
[  792.160821]  do_mem_abort+0x3c/0x98
[  792.160822]  el0_da+0x20/0x24
[  792.160834] SMP: stopping secondary CPUs
[  792.160835] Kernel Offset: disabled
[  792.160835] CPU features: 0x0002,2000600c
[  792.160836] Memory Limit: none
Will keep an eye on stability...

Edit: Yup, reboot seems to be broken :(

Code: Select all

[ 1327.483201] sd 3:0:0:0: [sdc] Synchronizing SCSI cache
[ 1327.502019] sd 2:0:0:0: [sdb] Synchronizing SCSI cache
[ 1327.508063] sd 0:0:0:0: [sda] Synchronizing SCSI cache
[ 1327.549571] reboot: Restarting system
��������������C>��
                  ������g�

User avatar
mad_ady
Posts: 6513
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1, H2, N2
Location: Bucharest, Romania
Has thanked: 163 times
Been thanked: 123 times
Contact:

Re: Trying to get mainline kernel working on N1

Unread post by mad_ady » Fri Sep 06, 2019 5:44 pm

Update: died again, same kind of panic. It's strange that it doesn't reboot on panic, though it's set to reboot after 20s...

Code: Select all

aldebaran64 login: [  114.469728] hassio: port 5(vethd9501b5) entered blocking state
[  114.476323] hassio: port 5(vethd9501b5) entered disabled state
[  114.483121] device vethd9501b5 entered promiscuous mode
[  115.295538] eth0: renamed from veth7b83aeb
[  115.322224] IPv6: ADDRCONF(NETDEV_CHANGE): vethd9501b5: link becomes ready
[  115.330157] hassio: port 5(vethd9501b5) entered blocking state
[  115.336730] hassio: port 5(vethd9501b5) entered forwarding state
[  524.955305] SError Interrupt on CPU1, code 0xbf000000 -- SError
[  524.955311] CPU: 1 PID: 694 Comm: transmission-da Not tainted 5.2.1+ #4
[  524.955314] Hardware name: Hardkernel ODROID-N1 (DT)
[  524.955317] pstate: 20000005 (nzCv daif -PAN -UAO)
[  524.955320] pc : __arch_copy_from_user+0x1bc/0x240
[  524.955323] lr : copyin+0x48/0x58
[  524.955325] sp : ffff0000146ebab0
[  524.955328] x29: ffff0000146ebab0 x28: 0000000000000000 
[  524.955335] x27: ffff0000146ebbf0 x26: 0000000000076000 
[  524.955341] x25: 0000000000000000 x24: ffff0000146ebd70 
[  524.955347] x23: ffff8000b4e38950 x22: ffff800009c08000 
[  524.955353] x21: ffff0000146ebd60 x20: 0000000000001000 
[  524.955359] x19: 0000000000001000 x18: 0000000000000000 
[  524.955365] x17: 0000000000000003 x16: 0000000000000000 
[  524.955372] x15: 0000000018e76000 x14: 5a819a6b2e88df67 
[  524.955378] x13: 5ea589b7b8d390e2 x12: e3f383f0e96b090d 
[  524.955384] x11: e25a529397c21817 x10: b907831349da21a6 
[  524.955390] x9 : 599dcf356d1fa95f x8 : c256cf9f6fa1a6cb 
[  524.955396] x7 : da287b4ff578fc03 x6 : ffff800009c070d0 
[  524.955402] x5 : ffff800009c08000 x4 : 0000000000000000 
[  524.955408] x3 : 0000ffff7c98e790 x2 : 0000000000000ec0 
[  524.955414] x1 : 0000ffff7c98e8a0 x0 : ffff800009c07000 
[  524.955422] Kernel panic - not syncing: Asynchronous SError Interrupt
[  524.955426] CPU: 1 PID: 694 Comm: transmission-da Not tainted 5.2.1+ #4
[  524.955429] Hardware name: Hardkernel ODROID-N1 (DT)
[  524.955431] Call trace:
[  524.955434]  dump_backtrace+0x0/0x140
[  524.955436]  show_stack+0x14/0x20
[  524.955439]  dump_stack+0xa8/0xcc
[  524.955441]  panic+0x144/0x324
[  524.955444]  nmi_panic+0x6c/0x70
[  524.955446]  arm64_serror_panic+0x74/0x88
[  524.955449]  do_serror+0x114/0x118
[  524.955451]  el1_error+0x84/0xf8
[  524.955454]  __arch_copy_from_user+0x1bc/0x240
[  524.955457]  iov_iter_copy_from_user_atomic+0xd8/0x3e8
[  524.955460]  iomap_write_actor+0xc4/0x190
[  524.955463]  iomap_apply+0xb4/0x140
[  524.955466]  iomap_file_buffered_write+0x74/0xb0
[  524.955469]  xfs_file_buffered_aio_write+0xd0/0x2c8
[  524.955471]  xfs_file_write_iter+0xa8/0xe0
[  524.955474]  new_sync_write+0xe8/0x188
[  524.955477]  __vfs_write+0x2c/0x38
[  524.955479]  vfs_write+0xa4/0x1b0
[  524.955482]  ksys_pwrite64+0x70/0xb0
[  524.955484]  __arm64_sys_pwrite64+0x1c/0x28
[  524.955487]  el0_svc_common.constprop.0+0x64/0x160
[  524.955490]  el0_svc_handler+0x28/0x78
[  524.955492]  el0_svc+0x8/0xc
[  524.955684] SMP: stopping secondary CPUs
[  524.955687] Kernel Offset: disabled
[  524.955690] CPU features: 0x0002,2000600c
[  524.955692] Memory Limit: none
This time it was no longer idle, it was downloading something...

I'll revert back to 4.4 for now. I'm sorry it's unstable for me, but I am happy to have tried at least.
If anybody wants to try, let me know and I'll pack the kernel and uboot and share them (if you're to busy to start from scratch)...

Edit: Ok, one last test. I changed the governor to performance and will try again, to see if it's governor related... I'm seeing again big fluctuations in ping reply:

Code: Select all

64 bytes from aldebaran (192.168.1.5): icmp_seq=722 ttl=64 time=126 ms
64 bytes from aldebaran (192.168.1.5): icmp_seq=723 ttl=64 time=88.5 ms
64 bytes from aldebaran (192.168.1.5): icmp_seq=724 ttl=64 time=378 ms
64 bytes from aldebaran (192.168.1.5): icmp_seq=725 ttl=64 time=118 ms
64 bytes from aldebaran (192.168.1.5): icmp_seq=726 ttl=64 time=442 ms
64 bytes from aldebaran (192.168.1.5): icmp_seq=727 ttl=64 time=58.9 ms
64 bytes from aldebaran (192.168.1.5): icmp_seq=728 ttl=64 time=202 ms
64 bytes from aldebaran (192.168.1.5): icmp_seq=729 ttl=64 time=70.0 ms
64 bytes from aldebaran (192.168.1.5): icmp_seq=730 ttl=64 time=7.78 ms

User avatar
mad_ady
Posts: 6513
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1, H2, N2
Location: Bucharest, Romania
Has thanked: 163 times
Been thanked: 123 times
Contact:

Re: Trying to get mainline kernel working on N1

Unread post by mad_ady » Fri Sep 06, 2019 5:57 pm

Ping replies have gotten worse:

Code: Select all

64 bytes from aldebaran (192.168.1.5): icmp_seq=996 ttl=64 time=6014 ms
64 bytes from aldebaran (192.168.1.5): icmp_seq=997 ttl=64 time=5543 ms
64 bytes from aldebaran (192.168.1.5): icmp_seq=998 ttl=64 time=6572 ms
64 bytes from aldebaran (192.168.1.5): icmp_seq=999 ttl=64 time=8560 ms
64 bytes from aldebaran (192.168.1.5): icmp_seq=1000 ttl=64 time=11510 ms

... and it crashed again, on performance this time...

Code: Select all

root@aldebaran64:~# [  598.762885] SError Interrupt on CPU1, code 0xbf000000 -- SError
[  598.762888] CPU: 1 PID: 7364 Comm: tmux: server Not tainted 5.2.1+ #4
[  598.762890] Hardware name: Hardkernel ODROID-N1 (DT)
[  598.762891] pstate: 20000005 (nzCv daif -PAN -UAO)
[  598.762892] pc : copy_page+0x68/0xe4
[  598.762893] lr : __cpu_copy_user_page+0x14/0x38
[  598.762895] sp : ffff000011fbbc20
[  598.762896] x29: ffff000011fbbc20 x28: 0000000000000000
[  598.762899] x27: ffff8000dbdf25e0 x26: ffff800009c42000
[  598.762902] x25: ffff80006dac4380 x24: ffff8000dbdf2580
[  598.762904] x23: ffff000010fc8000 x22: ffff80007d7170c0
[  598.762907] x21: ffff000011fbbd90 x20: ffff7e0000271080
[  598.762909] x19: ffff800009c42000 x18: 0000000000000300
[  598.762912] x17: 0000aaaab6b40c70 x16: 0000000000000000
[  598.762915] x15: 0000aaaab6b40c60 x14: 0000000000000000
[  598.762917] x13: 0000aaaab6b40c50 x12: 0000000000000000
[  598.762920] x11: 0000aaaab6b40cc0 x10: 0000000000000000
[  598.762922] x9 : 0000aaaab6b40cb0 x8 : 0000000000000000
[  598.762925] x7 : 0000aaaab6b40ca0 x6 : 0000000000000000
[  598.762928] x5 : 0000aaaab6b40c90 x4 : 0000000000000000
[  598.762930] x3 : 0000aaaab6b40c80 x2 : 0000000000000000
[  598.762933] x1 : ffff80000b19dc80 x0 : ffff800009c42c00
[  598.762936] Kernel panic - not syncing: Asynchronous SError Interrupt
[  598.762938] CPU: 1 PID: 7364 Comm: tmux: server Not tainted 5.2.1+ #4
[  598.762939] Hardware name: Hardkernel ODROID-N1 (DT)
[  598.762940] Call trace:
[  598.762941]  dump_backtrace+0x0/0x140
[  598.762942]  show_stack+0x14/0x20
[  598.762943]  dump_stack+0xa8/0xcc
[  598.762944]  panic+0x144/0x324
[  598.762945]  nmi_panic+0x6c/0x70
[  598.762946]  arm64_serror_panic+0x74/0x88
[  598.762947]  do_serror+0x114/0x118
[  598.762948]  el1_error+0x84/0xf8
[  598.762949]  copy_page+0x68/0xe4
[  598.762950]  wp_page_copy+0xe8/0x6a8
[  598.762951]  do_wp_page+0xa8/0x6d0
[  598.762952]  __handle_mm_fault+0x928/0x10c8
[  598.762953]  handle_mm_fault+0xe0/0x178
[  598.762955]  do_page_fault+0x1b8/0x458
[  598.762955]  do_mem_abort+0x3c/0x98
[  598.762957]  el0_da+0x20/0x24
[  598.762959] SError Interrupt on CPU3, code 0xbf000000 -- SError
[  598.762961] CPU: 3 PID: 10399 Comm: /usr/share/muni Not tainted 5.2.1+ #4
[  598.762962] Hardware name: Hardkernel ODROID-N1 (DT)
[  598.762963] pstate: 60000000 (nZCv daif -PAN -UAO)
[  598.762965] pc : 0000ffff9eb8deb8
[  598.762965] lr : 0000ffff9ec6760c
[  598.762967] sp : 0000ffffd688dee0
[  598.762967] x29: 0000ffffd688dee0 x28: 0000000000000000
[  598.762970] x27: 0000000000000000 x26: 0000ffff9ecd8b30
[  598.762973] x25: 0000ffff9ed57ab8 x24: 0000ffff9ed56000
[  598.762975] x23: 0000ffff9ed58000 x22: 0000ffff9ed57000
[  598.762978] x21: 0000ffff9ed57ab8 x20: 0000000000000001
[  598.762981] x19: 0000ffff9ed58aa0 x18: 0000ffffa1bbaa70
[  598.762983] x17: 0000ffffa1ae9ef8 x16: 0000ffff9ed55000
[  598.762986] x15: 0000000000000000 x14: 0000000000000002
[  598.762988] x13: 000000000000270f x12: 0000000000000001
[  598.762991] x11: 0000000000000000 x10: 0000aaaaca496a48
[  598.762993] x9 : 0000aaaaca496a3c x8 : 0000aaaac9061010
[  598.762996] x7 : 0000ffffa1cf73c0 x6 : 0000aaaaca496a30
[  598.762998] x5 : 0000000000000000 x4 : 0000aaaaca496a30
[  598.763001] x3 : 0000000000000000 x2 : 0000000000000020
[  598.763004] x1 : 0000ffff9ed57ab8 x0 : 0000000000000001
[  599.929688] SMP: stopping secondary CPUs
[  599.929689] SMP: failed to stop secondary CPUs 1,3
[  599.929690] Kernel Offset: disabled
[  599.929691] CPU features: 0x0002,2000600c
[  599.929692] Memory Limit: none

Oh, backup, where art thou?

User avatar
OverSun
Posts: 1491
Joined: Mon Apr 29, 2013 5:12 pm
languages_spoken: english
Has thanked: 0
Been thanked: 18 times
Contact:

Re: Trying to get mainline kernel working on N1

Unread post by OverSun » Fri Sep 06, 2019 7:28 pm

Something is wrong with stmmac on the latest kernel for sure. As I've mentioned it's obviously working wrong for me.
Reboot and network are something weird.
These users thanked the author OverSun for the post:
mad_ady (Fri Sep 06, 2019 9:06 pm)

Post Reply

Return to “Projects”

Who is online

Users browsing this forum: No registered users and 0 guests