Any plan for basic mainline linux support?

gneville
Posts: 13
Joined: Sun Jun 09, 2019 5:24 am
languages_spoken: english
ODROIDs: n2
Has thanked: 1 time
Been thanked: 0
Contact:

Re: Any plan for basic mainline linux support?

Unread post by gneville » Fri Jun 14, 2019 10:35 pm

miskol wrote:
Fri Jun 14, 2019 4:06 pm
gneville wrote:
Fri Jun 14, 2019 2:26 pm
So I built from miskol's Armbian fork but it resulted in the device not being able to boot, nothing appeared on the screen via HDMI.

Code: Select all

git clone https://github.com/xlazom00/build.git -b odroidn2-linux-5-13
git branch
./compile.sh
sudo BETA=yes EXPERT=yes ./compile.sh
Which gave me:

Code: Select all

Armbian_5.88.190614_Odroidn2_Ubuntu_bionic_dev_5.1.0.img
sudo BETA=yes EXPERT=yes BOARD=odroidn2 BRANCH=dev RELEASE=bionic BUILD_DESKTOP=no KERNEL_ONLY=no KERNEL_CONFIGURE=no ./compile.sh
booting fine
you should build development kernel
https://github.com/xlazom00/build/blob/ ... 2.conf#L32

That's pretty much what the summary out showed my build options were for doing a repeat build. I ran ./compile and I wanted to change the kernel config as I needed some modules for kubernetes. If I wanted to run your CLI command which .config file should I edit to manually add the modules I want to build first (ie. What's the location of the .config file that the script uses to build from for an odroid n2?) It looks like it's https://github.com/xlazom00/build/blob/ ... dev.config

Thanks

gneville
Posts: 13
Joined: Sun Jun 09, 2019 5:24 am
languages_spoken: english
ODROIDs: n2
Has thanked: 1 time
Been thanked: 0
Contact:

Re: Any plan for basic mainline linux support?

Unread post by gneville » Sat Jun 15, 2019 5:26 am

Still can't get miskol armbian build to boot. Did a complete fresh rebuild changing no setting what so ever and then burn the image using Etcher.

Code: Select all

sudo rm -rf build/
git clone https://github.com/xlazom00/build.git -b odroidn2-linux-5-13
cd build
sudo BETA=yes EXPERT=yes BOARD=odroidn2 BRANCH=dev RELEASE=bionic BUILD_DESKTOP=no KERNEL_ONLY=no KERNEL_CONFIGURE=no ./compile.sh


[ o.k. ] Writing U-boot bootloader [ /dev/loop2 ]
[ o.k. ] Done building [ /home/gneville/build/output/images/Armbian_5.88.190615_Odroidn2_Ubuntu_bionic_dev_5.1.0.img ]
[ o.k. ] Runtime [ 29 min ]
[ o.k. ] Repeat Build Options [ BOARD=odroidn2 BRANCH=dev RELEASE=bionic BUILD_DESKTOP=no KERNEL_ONLY=no KERNEL_CONFIGURE=no ]

I even tried another build using elatllat's .config file he posted overwriting config/kernel/linux-odroidn2-dev.config

Code: Select all

cat > config/kernel/linux-odroidn2-dev.config
git add -A
git commit -m 'update odroid .config'
sudo BETA=yes EXPERT=yes BOARD=odroidn2 BRANCH=dev RELEASE=bionic BUILD_DESKTOP=no KERNEL_ONLY=no KERNEL_CONFIGURE=no ./compile.sh

miskol
Posts: 231
Joined: Wed Jan 15, 2014 2:58 am
languages_spoken: english,slovak
Has thanked: 0
Been thanked: 7 times
Contact:

Re: Any plan for basic mainline linux support?

Unread post by miskol » Sat Jun 15, 2019 5:39 am

gneville wrote:
Sat Jun 15, 2019 5:26 am
Still can't get miskol armbian build to boot. Did a complete fresh rebuild changing no setting what so ever and then burn the image using Etcher.

Code: Select all

sudo rm -rf build/
git clone https://github.com/xlazom00/build.git -b odroidn2-linux-5-13
cd build
sudo BETA=yes EXPERT=yes BOARD=odroidn2 BRANCH=dev RELEASE=bionic BUILD_DESKTOP=no KERNEL_ONLY=no KERNEL_CONFIGURE=no ./compile.sh


[ o.k. ] Writing U-boot bootloader [ /dev/loop2 ]
[ o.k. ] Done building [ /home/gneville/build/output/images/Armbian_5.88.190615_Odroidn2_Ubuntu_bionic_dev_5.1.0.img ]
[ o.k. ] Runtime [ 29 min ]
[ o.k. ] Repeat Build Options [ BOARD=odroidn2 BRANCH=dev RELEASE=bionic BUILD_DESKTOP=no KERNEL_ONLY=no KERNEL_CONFIGURE=no ]

I even tried another build using elatllat's .config file he posted overwriting config/kernel/linux-odroidn2-dev.config

Code: Select all

cat > config/kernel/linux-odroidn2-dev.config
git add -A
git commit -m 'update odroid .config'
sudo BETA=yes EXPERT=yes BOARD=odroidn2 BRANCH=dev RELEASE=bionic BUILD_DESKTOP=no KERNEL_ONLY=no KERNEL_CONFIGURE=no ./compile.sh
ouuuu
sorry I got it :)
git clone https://github.com/xlazom00/build.git -b odroidn2-linux-5-13
cd build
git checkout odroidn2-linux-5-13
touch .ignore_changes # this is important!!!
sudo BETA=yes EXPERT=yes BOARD=odroidn2 BRANCH=dev RELEASE=bionic BUILD_DESKTOP=no KERNEL_ONLY=no KERNEL_CONFIGURE=no ./compile.sh



armbian will switch to git master :)
but when you create file .ignore_changes, it will ignore all changes/branches
soooooooorrrrrrrryyyyy :)

gneville
Posts: 13
Joined: Sun Jun 09, 2019 5:24 am
languages_spoken: english
ODROIDs: n2
Has thanked: 1 time
Been thanked: 0
Contact:

Re: Any plan for basic mainline linux support?

Unread post by gneville » Sat Jun 15, 2019 7:31 am

Thanks miskol, Creating the .ignore_changes file now produces an image name of Armbian_5.88.190615_Odroidn2_Ubuntu_bionic_dev_5.2.0-rc2.img

This now successfully boots! However I've still got the same network issues as before where the NIC isn't picking up a DHCP address. It still doesn't work with a static IP.

Build steps:

Code: Select all

git clone https://github.com/xlazom00/build.git -b odroidn2-linux-5-13
cd build
git branch
touch .ignore_changes
git checkout odroidn2-linux-5-13
sudo BETA=yes EXPERT=yes BOARD=odroidn2 BRANCH=dev RELEASE=bionic BUILD_DESKTOP=no KERNEL_ONLY=no KERNEL_CONFIGURE=no ./compile.sh
Select "Full OS image for flashing"
Select "Show a kernel configuration menu before compilation"

Set the following options for kubernetes:

Code: Select all

General Setup > Control Group Support > PIDs controller - Should have a star already
Networking support > Networking Options > Network packet filtering framework (Netfilter) > IP set support - Set to star 
Networking support > Networking Options > Network packet filtering framework (Netfilter) > Core Netfilter Configuration > Netfilter Xtables support (required for ip_tables) - set to star
Networking support > Networking Options > Network packet filtering framework (Netfilter) > Core Netfilter Configuration > set target and match support - Set to star
Save as .config and exit

miskol
Posts: 231
Joined: Wed Jan 15, 2014 2:58 am
languages_spoken: english,slovak
Has thanked: 0
Been thanked: 7 times
Contact:

Re: Any plan for basic mainline linux support?

Unread post by miskol » Sat Jun 15, 2019 9:02 pm

gneville wrote:
Sat Jun 15, 2019 7:31 am
Thanks miskol, Creating the .ignore_changes file now produces an image name of Armbian_5.88.190615_Odroidn2_Ubuntu_bionic_dev_5.2.0-rc2.img

This now successfully boots! However I've still got the same network issues as before where the NIC isn't picking up a DHCP address. It still doesn't work with a static IP.
I don't have any problem with NIC
but I didn't change anything in kernel config. kernel config is same as for Ondroid C2 with N2 hw enabled

gneville
Posts: 13
Joined: Sun Jun 09, 2019 5:24 am
languages_spoken: english
ODROIDs: n2
Has thanked: 1 time
Been thanked: 0
Contact:

Re: Any plan for basic mainline linux support?

Unread post by gneville » Sat Jun 15, 2019 10:39 pm

I did try a build with no modifications but still networking doesn't work. :(

gneville
Posts: 13
Joined: Sun Jun 09, 2019 5:24 am
languages_spoken: english
ODROIDs: n2
Has thanked: 1 time
Been thanked: 0
Contact:

Re: Any plan for basic mainline linux support?

Unread post by gneville » Sun Jun 16, 2019 4:24 pm

I've managed to get networking working by hard coding speed and duplex to 100M, if I try 1G it fails to work, Very odd!

Code: Select all

ethtool -s eth0 speed 100 duplex full autoneg off
Anyone else successfully running at 1G full duplex?

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

Re: Any plan for basic mainline linux support?

Unread post by mad_ady » Sun Jun 16, 2019 5:50 pm

If you're not using Hardkernel's stock uboot, there's a patch to increase tx voltage, without witch some boards have problems at gigabit. I don't have the patch offhand, but it's a one-line change in u-boot.

elatllat
Posts: 1586
Joined: Tue Sep 01, 2015 8:54 am
languages_spoken: english
ODROIDs: XU4, N1, N2
Has thanked: 25 times
Been thanked: 74 times
Contact:

Re: Any plan for basic mainline linux support?

Unread post by elatllat » Sun Jun 16, 2019 5:58 pm


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

Re: Any plan for basic mainline linux support?

Unread post by mad_ady » Sun Jun 16, 2019 6:42 pm

Yes, that one, thanks!

back2future
Posts: 263
Joined: Sun Jul 23, 2017 3:19 pm
languages_spoken: english
Has thanked: 11 times
Been thanked: 5 times
Contact:

Re: Any plan for basic mainline linux support?

Unread post by back2future » Sun Jun 16, 2019 7:15 pm

Compilation environment doesn't accept default ntfs filesystem, because of wrong directory permissions.
[ dpkg-deb: error: control directory has bad permissions ]
Just in case somebody starts downloads and compilation attempt on ntfs (12.6 GiB disk usage til that point): copy build folder to ext4 fs and restart compiling, works (xz standard compresses 15.9GiB to 3.5GiB)
[ while ntfs is a posix compatible filesystem, learned, that (re)mounting with UUID=partitionsUUID /mountable_directory ntfs-3g auto,users,permissions 0 0 (e.g. fstab line) can be another possibility enabling chmod/chown, but have not tried yet. ]
Last edited by back2future on Sun Jun 16, 2019 8:39 pm, edited 3 times in total.

miskol
Posts: 231
Joined: Wed Jan 15, 2014 2:58 am
languages_spoken: english,slovak
Has thanked: 0
Been thanked: 7 times
Contact:

Re: Any plan for basic mainline linux support?

Unread post by miskol » Sun Jun 16, 2019 8:12 pm

mad_ady wrote:
Sun Jun 16, 2019 5:50 pm
If you're not using Hardkernel's stock uboot, there's a patch to increase tx voltage, without witch some boards have problems at gigabit. I don't have the patch offhand, but it's a one-line change in u-boot.
armbian and my fork use hardkernel's u-boot so that patch is there

I'm on 1GBit ethernet but my switch is like 50cm from board :)

but maybe this:
http://lists.infradead.org/pipermail/li ... 12352.html
http://lists.infradead.org/pipermail/li ... 12350.html

miskol
Posts: 231
Joined: Wed Jan 15, 2014 2:58 am
languages_spoken: english,slovak
Has thanked: 0
Been thanked: 7 times
Contact:

Re: Any plan for basic mainline linux support?

Unread post by miskol » Sun Jun 16, 2019 10:14 pm

gneville wrote:
Sun Jun 16, 2019 4:24 pm
I've managed to get networking working by hard coding speed and duplex to 100M, if I try 1G it fails to work, Very odd!

Code: Select all

ethtool -s eth0 speed 100 duplex full autoneg off
Anyone else successfully running at 1G full duplex?
https://pastebin.com/d0Rtyu6m
100MB/s download without problem

elatllat
Posts: 1586
Joined: Tue Sep 01, 2015 8:54 am
languages_spoken: english
ODROIDs: XU4, N1, N2
Has thanked: 25 times
Been thanked: 74 times
Contact:

Re: Any plan for basic mainline linux support?

Unread post by elatllat » Thu Jun 20, 2019 8:09 pm

elatllat wrote:
Fri Jun 14, 2019 10:24 pm
...

Code: Select all

[30292.971480] usb 2-1.1: reset SuperSpeed Gen 1 USB device number 4 using xhci-hcd
[30292.992139] sd 0:0:0:0: [sda] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x07 driverbyte=0x00
[30292.992157] sd 0:0:0:0: [sda] tag#0 CDB: opcode=0x28 28 00 00 00 00 00 00 00 08 00
[30292.992164] print_req_error: I/O error, dev sda, sector 0 flags 0
[30292.992615] Buffer I/O error on dev sda, logical block 0, async page read
...
The USB bug I was having seems to be fixed in 5.2.0-rc5-N2 :D

elatllat
Posts: 1586
Joined: Tue Sep 01, 2015 8:54 am
languages_spoken: english
ODROIDs: XU4, N1, N2
Has thanked: 25 times
Been thanked: 74 times
Contact:

Re: Any plan for basic mainline linux support?

Unread post by elatllat » Fri Jun 21, 2019 8:00 am

My 5.2 crypto (xts) speed is about half of 4.9. anyone know a config or commit that might help?

balbes150
Posts: 18
Joined: Fri Feb 26, 2016 5:55 pm
languages_spoken: english
Has thanked: 0
Been thanked: 7 times
Contact:

Re: Any plan for basic mainline linux support?

Unread post by balbes150 » Sat Jun 22, 2019 1:16 am

elatllat wrote:
Fri Jun 21, 2019 8:00 am
My 5.2 crypto (xts) speed is about half of 4.9. anyone know a config or commit that might help?
The main kernel is only running all core at 1.2 (not 1.8\1.9), so the performance will be lower. :roll:

elatllat
Posts: 1586
Joined: Tue Sep 01, 2015 8:54 am
languages_spoken: english
ODROIDs: XU4, N1, N2
Has thanked: 25 times
Been thanked: 74 times
Contact:

Re: Any plan for basic mainline linux support?

Unread post by elatllat » Sat Jun 22, 2019 4:59 am

cpufreq-info said "no or unknown cpufreq driver is active on this CPU"
This dts commit looks relevant, not sure how to translate that to upstream.

miskol
Posts: 231
Joined: Wed Jan 15, 2014 2:58 am
languages_spoken: english,slovak
Has thanked: 0
Been thanked: 7 times
Contact:

Re: Any plan for basic mainline linux support?

Unread post by miskol » Sun Jun 23, 2019 4:30 am

elatllat wrote:
Sat Jun 22, 2019 4:59 am
cpufreq-info said "no or unknown cpufreq driver is active on this CPU"
This dts commit looks relevant, not sure how to translate that to upstream.
here is neil's upstream work
http://lists.infradead.org/pipermail/li ... 12373.html

But I am not able to make it to work
https://github.com/xlazom00/build/tree/ ... roidn2-dev

maier-johno
Posts: 7
Joined: Sun May 12, 2019 1:09 am
languages_spoken: german, a little bit english
ODROIDs: N2
Has thanked: 3 times
Been thanked: 1 time
Contact:

Re: Any plan for basic mainline linux support?

Unread post by maier-johno » Wed Jul 10, 2019 2:04 am

Hi Guys,

is it now possible to use the current kernel 5.2? If so, is there a tutorial?

Many thanks for any support!
Best regards, johno

elatllat
Posts: 1586
Joined: Tue Sep 01, 2015 8:54 am
languages_spoken: english
ODROIDs: XU4, N1, N2
Has thanked: 25 times
Been thanked: 74 times
Contact:

Re: Any plan for basic mainline linux support?

Unread post by elatllat » Wed Jul 10, 2019 2:20 am

maier-johno wrote:
Wed Jul 10, 2019 2:04 am
is it now possible to use the current kernel ...?
Yes.
maier-johno wrote:
Wed Jul 10, 2019 2:04 am
If so, is there a tutorial?

Code: Select all

#!/bin/bash

#
# kernel.sh
#

set -e

RC=false
F=/opt
LOG=../linux_make.log

O="0x1080000"
DT="$(date -Iminutes)"
DEV="$(find /dev/mmcblk? | tail -n 1)"
DIR="/boot/$DT"
if [ -d "$DIR" ] ; then
	echo RTFM >&2
	exit 1
fi
cd "$F"
if [ ! -d "$F/linux" ] ; then
	apt-get update
	apt-get upgrade -yqq
	apt-get install -yqq u-boot-tools build-essential git libncurses5-dev libssl-dev bison flex bc
	apt-mark hold bootini linux-odroid-n2 2>/dev/null || true
	if [ "$RC" == "true" ] ; then
                git clone --quiet --depth 1 --branch master      https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git linux
        else
                git clone --quiet --depth 1 --branch linux-5.4.y https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git   linux
        fi
	wget 'https://forum.odroid.com/download/file.php?id=10041' -qO park.txt
	cd linux
	git apply -3 ../park.txt
	TM="$(grep MemTotal /proc/meminfo | perl -pe 's/[^0-9]+//g')"
        if [ "$TM" -gt 3000000 ] ; then
                #0x70000000 for 2GB
                perl -pi -e 's/0x40000000/0xf0000000/g' arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts
        fi
else
	cd linux
fi
OLD=$(uname -r)
if [ ! -d "/boot/$OLD" ] ; then
	mkdir /boot/"$OLD"
	cp /media/boot/* /boot/"$OLD"/
	cp -r "/lib/modules/$OLD" /boot/"$OLD"_modules
fi
if [ ! -f ".config" ] ; then
	make defconfig
	perl -pi -e 's/CONFIG_ARCH_[^_]*=y|.*(DEBUG|NOUVEAU).*//g' .config
	echo "CONFIG_MDIO_BUS_MUX_MESON_G12A=y
CONFIG_ARCH_MESON=y
CONFIG_SQUASHFS_XZ=y
CONFIG_BLK_DEV_DM=y
CONFIG_DM_CRYPT=y
CONFIG_FUSE_FS=y
CONFIG_SQUASHFS_XZ=y
CONFIG_PNFS_BLOCK=y
CONFIG_CRYPTO_CBC=y
CONFIG_CRYPTO_ECB=y
CONFIG_CRYPTO_XTS=y
CONFIG_CRYPTO_USER_API=y
CONFIG_CRYPTO_USER_API_HASH=y
CONFIG_CRYPTO_USER_API_SKCIPHER=y
CONFIG_USB_UAS=y

CONFIG_BLK_DEV_MD=m
CONFIG_MD_AUTODETECT=m
CONFIG_MD_LINEAR=m
CONFIG_MD_RAID0=m
CONFIG_MD_RAID1=m
CONFIG_MD_RAID10=m
CONFIG_MD_RAID456=m
CONFIG_XOR_BLOCKS=m
CONFIG_ASYNC_CORE=m
CONFIG_ASYNC_MEMCPY=m
CONFIG_ASYNC_XOR=m
CONFIG_ASYNC_PQ=m
CONFIG_ASYNC_RAID6_RECOV=m
CONFIG_RAID6_PQ=m
CONFIG_LIBCRC32C=m

CONFIG_WIRELESS=n
CONFIG_WLAN=n
" >> .config
	make olddefconfig
fi
echo "ETA=~0.5 hours from $DT"
{
	make clean
	make -j "$(nproc)"
	make modules_install
	R=$(make kernelrelease)
	cp -r "/lib/modules/$R" "$DIR"_modules
	rm /media/boot/* || true
	mkdir "$DIR"
	mkimage -A arm64 -O linux -T kernel -C none -a $O -e $O -n "$R" -d arch/arm64/boot/Image "$DIR/uImage"
} > $LOG 2> $LOG.err
cp arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtb "$DIR/n2.dtb"
echo "ODROIDN2-UBOOT-CONFIG

setenv bootargs \"root=${DEV}p2 rootwait rw clk_ignore_unused console=ttyAML0,115200\"
setenv dtb_loadaddr \"0x1000000\"
fatload mmc \${devno}:1 \${dtb_loadaddr} n2.dtb
fatload mmc \${devno}:1 0x01080000 uImage
bootm 0x1080000 - \${dtb_loadaddr}
" > "$DIR/boot.ini"
cp "$DIR"/* /media/boot/
sync
sleep 1
shutdown -r now
Here are builds of 5.4.y and 5.5.y if you want. (8.4 MB vs the ~1.6 GB for compiling it yourself.)

Switching the minimal image to the 5.3 build as the root user looks like this;

Code: Select all

#install the best archive tool
apt install -y p7zip-full

# backup
mkdir -p ~/backup/boot
mv /media/boot/* ~/backup/boot/

# switch
7z x ~/boot.7z -o/media/boot/
7z x ~/modules.7z -o/lib/modules/

# if using a sdcard
#perl -pi -e 's/blk0/blk1/g' /media/boot/boot.ini

# apply 
sync
shutdown -r now
(Thanks to others in this thread for sharing what worked for them)
Attachments
patch_5.4.txt
(3.07 KiB) Downloaded 30 times
park_2019-10-28.txt
(3.08 KiB) Downloaded 42 times
Last edited by elatllat on Mon Dec 09, 2019 10:35 am, edited 38 times in total.
These users thanked the author elatllat for the post (total 6):
maier-johno (Sat Jul 13, 2019 8:12 pm) • sbi (Mon Jul 15, 2019 2:36 am) • Rising_Sun (Wed Jul 17, 2019 5:58 am) • Noneangel (Mon Jul 22, 2019 5:49 am) • xabolcs (Tue Aug 06, 2019 3:15 pm) • DanDroid (Thu Aug 29, 2019 4:18 am)

maier-johno
Posts: 7
Joined: Sun May 12, 2019 1:09 am
languages_spoken: german, a little bit english
ODROIDs: N2
Has thanked: 3 times
Been thanked: 1 time
Contact:

Re: Any plan for basic mainline linux support?

Unread post by maier-johno » Wed Jul 10, 2019 2:40 am

Hello elatllat,

woof! Thank you! :-)
I will try it!

Best regards, johno

maier-johno
Posts: 7
Joined: Sun May 12, 2019 1:09 am
languages_spoken: german, a little bit english
ODROIDs: N2
Has thanked: 3 times
Been thanked: 1 time
Contact:

Re: Any plan for basic mainline linux support?

Unread post by maier-johno » Wed Jul 10, 2019 2:52 am

hm, the script doesn't work. Is there an explanation for the script?

I would like to do it manually so I understand what is important. But thanks anyway!

elatllat
Posts: 1586
Joined: Tue Sep 01, 2015 8:54 am
languages_spoken: english
ODROIDs: XU4, N1, N2
Has thanked: 25 times
Been thanked: 74 times
Contact:

Re: Any plan for basic mainline linux support?

Unread post by elatllat » Wed Jul 10, 2019 3:42 am

maier-johno wrote:
Wed Jul 10, 2019 2:52 am
...doesn't work...
hard to help with so little information. (bash -x script)
maier-johno wrote:
Wed Jul 10, 2019 2:52 am
...explanation...?
just read the man page of any command you don't understand.

... when the kernel is ready for users that don't understand some basics there will be an easy installation method.

Nuems
Posts: 133
Joined: Thu Sep 19, 2013 3:50 am
languages_spoken: english, german
ODROIDs: xu, c1
Has thanked: 0
Been thanked: 1 time
Contact:

Re: Any plan for basic mainline linux support?

Unread post by Nuems » Wed Jul 10, 2019 4:03 am

elatllat wrote:
Wed Jul 10, 2019 3:42 am
maier-johno wrote:
Wed Jul 10, 2019 2:52 am
...doesn't work...
hard to help with so little information. (bash -x script)
There are four "if"s but just three "fi"s. Just saying.
These users thanked the author Nuems for the post:
maier-johno (Sat Jul 13, 2019 8:13 pm)

elatllat
Posts: 1586
Joined: Tue Sep 01, 2015 8:54 am
languages_spoken: english
ODROIDs: XU4, N1, N2
Has thanked: 25 times
Been thanked: 74 times
Contact:

Re: Any plan for basic mainline linux support?

Unread post by elatllat » Wed Jul 10, 2019 4:06 am

Nuems wrote:
Wed Jul 10, 2019 4:03 am
..."if"s...
Thanks, I fixed that copy paste fail.

maier-johno
Posts: 7
Joined: Sun May 12, 2019 1:09 am
languages_spoken: german, a little bit english
ODROIDs: N2
Has thanked: 3 times
Been thanked: 1 time
Contact:

Re: Any plan for basic mainline linux support?

Unread post by maier-johno » Thu Jul 11, 2019 4:55 am

Thanks guys for the help! I will try it again soon (when I have a backup). I'm not sure because i'm booting from a USB harddisk. If the script works, then it's really fantastic!

Still, I want to understand what it does exactly and how it works. I'm new and things like "UBOOT" etc. doesn't tell me much.... ;-)

elatllat
Posts: 1586
Joined: Tue Sep 01, 2015 8:54 am
languages_spoken: english
ODROIDs: XU4, N1, N2
Has thanked: 25 times
Been thanked: 74 times
Contact:

Re: Any plan for basic mainline linux support?

Unread post by elatllat » Thu Jul 11, 2019 5:43 am

maier-johno wrote:
Thu Jul 11, 2019 4:55 am
...things like "UBOOT" etc. doesn't tell me much.... ;-)
Google is your friend;
https://en.wikipedia.org/wiki/Das_U-Boot
So is apt;

Code: Select all

apt show uboot | grep -v Maintainer
Package: uboot
Version: 20180417-1
Priority: extra
Section: kernel
Installed-Size: 938 kB
Provides: uboot
Download-Size: 260 kB
APT-Manual-Installed: yes
APT-Sources: http://deb.odroid.in/5422-s bionic/main armhf Packages
Description: U-Boot binaries for 5422

DanDroid
Posts: 10
Joined: Sun Mar 31, 2019 3:58 pm
languages_spoken: english
ODROIDs: N2
Has thanked: 16 times
Been thanked: 0
Contact:

Re: Any plan for basic mainline linux support?

Unread post by DanDroid » Fri Jul 12, 2019 5:00 pm

elatllat wrote:
Wed Jul 10, 2019 2:20 am
it now possible to use the current kernel 5.2?
Only if you apply some patches aimed at 5.3
Does this mean that the N2 might be able to run 5.3 without user hacks?

Rising_Sun
Posts: 7
Joined: Fri Jul 12, 2019 5:09 pm
languages_spoken: english
ODROIDs: Odroid N2
Has thanked: 1 time
Been thanked: 0
Contact:

Re: Any plan for basic mainline linux support?

Unread post by Rising_Sun » Fri Jul 12, 2019 5:20 pm

Hey,

I used elatllat script, had to change linux to linux-amlogic at "if [ ! -d "$F/linux" ] ; then" and "cd linux". #Not needed anymore with the updated script
It compiled and rebooted succesfully but the device outputs only a black screen and network does not come up.
Last edited by Rising_Sun on Mon Jul 15, 2019 5:58 am, edited 1 time in total.

aplund
Posts: 17
Joined: Mon May 27, 2019 7:57 am
languages_spoken: english
ODROIDs: ODROID-N2
Has thanked: 0
Been thanked: 0
Contact:

Re: Any plan for basic mainline linux support?

Unread post by aplund » Fri Jul 12, 2019 5:54 pm

I'm still struggling with this. Using the linux-amlogic branch of khilman referred to by elatllat above, I get the below output and nothing further.

It's the "FDT_ERR_NOTFOUND" and "[rsvmem] fdt get prop fail." that make me wonder.

Code: Select all

G12B:BL:6e7c85:7898ac;FEAT:E0F83180:2000;POC:F;RCY:0;EMMC:0;READ:0;0.0
bl2_stage_init 0x01
bl2_stage_init 0x81
hw id: 0x0000 - pwm id 0x01
bl2_stage_init 0xc1
bl2_stage_init 0x02

L0:00000000
L1:00000703
L2:00008067
L3:04000000
B2:00002000
B1:e0f83180

TE: 278084

BL2 Built : 10:47:19, Jan 14 2019. g12b g152d217 - guotai.shen@droid11-sz

Board ID = 4
Set A53 clk to 24M
Set A73 clk to 24M
Set clk81 to 24M
A53 clk: 1200 MHz
A73 clk: 1200 MHz
CLK81: 166.6M
smccc: 000486d5
eMMC boot @ 0
sw8 s
sd/emmc cmd 8 arg 0x00000000 status 01ff3000
DDR driver_vesion: LPDDR4_PHY_V_0_1_11 build time: Jan 14 2019 10:47:15
board id: 4
Load FIP HDR from eMMC, src: 0x00010200, des: 0xfffd0000, size: 0x00004000, part: 0
fw parse done
Load ddrfw from eMMC, src: 0x00030200, des: 0xfffd0000, size: 0x0000c000, part: 0
Load ddrfw from eMMC, src: 0x0002c200, des: 0xfffd0000, size: 0x00004000, part: 0
PIEI prepare done
Cfg max: 2, cur: 1. Board id: 255. Force loop cfg
DDR4 probe
ddr clk to 1320MHz
Load ddrfw from eMMC, src: 0x00014200, des: 0xfffd0000, size: 0x0000c000, part: 0
Check phy result
INFO : End of initialization
INFO : End of read enable training
INFO : End of fine write leveling
INFO : End of read dq deskew training
INFO : End of MPR read delay center optimization
INFO : End of Write leveling coarse delay
INFO : End of write delay center optimization
INFO : End of read delay center optimization
INFO : End of max read latency training
INFO : Training has run successfully!
1D training succeed
Load ddrfw from eMMC, src: 0x00020200, des: 0xfffd0000, size: 0x0000c000, part: 0
Check phy result
INFO : End of initialization
INFO : End of 2D read delay Voltage center optimization
INFO : End of 2D write delay Voltage center optimization
INFO : Training has run successfully!

R0_RxClkDly_Margin==94 ps 8
R0_TxDqDly_Margi==106 ps 9


R1_RxClkDly_Margin==0 ps 0
R1_TxDqDly_Margi==0 ps 0

 dwc_ddrphy_apb_wr((0<<20)|(2<<16)|(0<<12)|(0xb0):0001 

 ddr scramble enable 
2D training succeed
auto size-- 65535DDR cs0 size: 2048MB
DDR cs1 size: 2048MB
DMC_DDR_CTRL: 00600024DDR size: 3928MB
cs0 DataBus test pass
cs1 DataBus test pass
cs0 AddrBus test pass
cs1 AddrBus test pass
 pre test  bdlr_100_average==425 bdlr_100_min==425 bdlr_100_max==425 bdlr_100_cur==425
 aft test  bdlr_100_average==425 bdlr_100_min==425 bdlr_100_max==425 bdlr_100_cur==425
100bdlr_step_size ps== 430
result report
boot times 0Enable ddr reg access
00000000
emmc switch 3 ok
Authentication key not yet programmed
get rpmb counter error 0x00000007
00000000
emmc switch 0 ok
Load FIP HDR from eMMC, src: 0x00010200, des: 0x01700000, size: 0x00004000, part: 0
Load BL3X from eMMC, src: 0x0003c200, des: 0x0172c000, size: 0x00098000, part: 0
0.0;M3 CHK:0;cm4_sp_mode 0
E30HDR
MVN_1=0x00000000
MVN_2=0x00000000
[Image: g12b_v1.1.3375-8f9c8a7 2019-01-24 10:44:46 guotai.shen@droid11-sz]
OPS=0x40
ring efuse init
chipver efuse init
29 0a 40 00 01 16 02 00 00 05 30 32 54 52 4d 50 
[0.019924 Inits done]
secure task start!
high task start!
low task start!
run into bl31
NOTICE:  BL31: v1.3(release):ab8811b
NOTICE:  BL31: Built : 15:03:31, Feb 12 2019
NOTICE:  BL31: G12A normal boot!
NOTICE:  BL31: BL33 decompress pass
ERROR:   Error initializing runtime service opteed_fast


U-Boot 2015.01-3 (Apr 27 2019 - 09:46:56) Arch Linux ARM

DRAM:  3.5 GiB
Relocation Offset is: d6ef4000
spi_post_bind(spifc): req_seq = 0
register usb cfg[0][1] = 00000000d7f85930
MMC:   aml_priv->desc_buf = 0x00000000d3ee47c0
aml_priv->desc_buf = 0x00000000d3ee6b00
SDIO Port C: 0, SDIO Port B: 1
co-phase 0x3, tx-dly 0, clock 400000
co-phase 0x3, tx-dly 0, clock 400000
co-phase 0x3, tx-dly 0, clock 400000
emmc/sd response timeout, cmd8, status=0x1ff2800
emmc/sd response timeout, cmd55, status=0x1ff2800
co-phase 0x3, tx-dly 0, clock 400000
co-phase 0x1, tx-dly 0, clock 40000000
aml_sd_retry_refix[983]:delay = 0x0,gadjust =0x2000
[mmc_startup] mmc refix success
[mmc_init] mmc init success
In:    serial
Out:   serial
Err:   serial
vpu: error: vpu: check dts: FDT_ERR_BADMAGIC, load default parameters
vpu: clk_level = 7
vpu: set clk: 666667000Hz, readback: 666666667Hz(0x100)
vpu: vpu_clk_gate_init_off finish
vpp: vpp_init
vpp: g12a/b osd1 matrix rgb2yuv ..............
vpp: g12a/b osd2 matrix rgb2yuv..............
vpp: g12a/b osd3 matrix rgb2yuv..............
cvbs_config_hdmipll_g12a
cvbs_set_vid2_clk
reading boot-logo.bmp.gz
** Unable to read file boot-logo.bmp.gz **
reading boot-logo.bmp
** Unable to read file boot-logo.bmp **
movi: not registered partition name, logo
movi - Read/write command from/to SD/MMC for ODROID board

Usage:
movi <read|write> <partition|sector> <offset> <address> [<length>]
    - <read|write>  the command to access the storage
    - <offset>  the offset from the start of given partiton in lba
    - <address>  the memory address to load/store from/to the storage device
    - [<length>]  the size of the block to read/write in bytes
    - all parameters must be hexa-decimal only

[OSD]check dts: FDT_ERR_BADMAGIC, load default fb_addr parameters
[OSD]set initrd_high: 0x3d800000
[OSD]fb_addr for logo: 0x3d800000
[OSD]check dts: FDT_ERR_BADMAGIC, load default fb_addr parameters
[OSD]fb_addr for logo: 0x3d800000
[OSD]VPP_OFIFO_SIZE:0xfff01fff
[CANVAS]canvas init
[CANVAS]addr=0x3d800000 width=5760, height=2160
[OSD]wait_vsync_wakeup exit
cvbs: outputmode[1080p60hz] is invalid
vpp: vpp_matrix_update: 2
set hdmitx VIC = 16
config HPLL = 5940000 frac_rate = 1
HPLL: 0x3b3a04f7
HPLL: 0x1b3a04f7
HPLLv1: 0xdb3a04f7
config HPLL done
j = 6  vid_clk_div = 1
hdmitx phy setting done
hdmitx: set enc for VIC: 16
enc_vpu_bridge_reset[1312]
rx version is 1.4 or below  div=10
Net:   dwmac.ff3f0000
Hit Enter or space or Ctrl+C key to stop autoboot -- :  1  0 
reading boot.ini
254 bytes read in 2 ms (124 KiB/s)
## Executing script at 01000000
reading n2.dtb
20865 bytes read in 3 ms (6.6 MiB/s)
reading uImage-new
18582080 bytes read in 516 ms (34.3 MiB/s)
ee_gate_off ...
## Booting kernel from Legacy Image at 01080000 ...
   Image Name:   linux-next
   Image Type:   AArch64 Linux Kernel Image (uncompressed)
   Data Size:    18582016 Bytes = 17.7 MiB
   Load Address: 01080000
   Entry Point:  01080000
   Verifying Checksum ... OK
load dtb from 0x1000000 ......
## Flattened Device Tree blob at 01000000
   Booting using the fdt blob at 0x1000000
libfdt fdt_path_offset() returned FDT_ERR_NOTFOUND
   Loading Kernel Image(COMP_NONE) ... OK
   kernel loaded at 0x01080000, end = 0x02238a00
libfdt fdt_path_offset() returned FDT_ERR_NOTFOUND
[rsvmem] fdt get prop fail.
   Loading Device Tree to 000000001fff7000, end 000000001ffff180 ... OK

Starting kernel ...

uboot time: 6588612 us

elatllat
Posts: 1586
Joined: Tue Sep 01, 2015 8:54 am
languages_spoken: english
ODROIDs: XU4, N1, N2
Has thanked: 25 times
Been thanked: 74 times
Contact:

Re: Any plan for basic mainline linux support?

Unread post by elatllat » Sat Jul 13, 2019 12:45 am

The dts got merged into next,
but boot stops at the rtc.
I'll check again at 5.3-rc1 for a 100% mainline boot,
back to the patched 5.2 for now.

aplund
Posts: 17
Joined: Mon May 27, 2019 7:57 am
languages_spoken: english
ODROIDs: ODROID-N2
Has thanked: 0
Been thanked: 0
Contact:

Re: Any plan for basic mainline linux support?

Unread post by aplund » Sun Jul 14, 2019 6:41 am

Well, I'm not sure why this changed when I fiddled with kernel config options, but now I can partially boot. I can also partially boot in qemu.

Code: Select all

## Booting kernel from Legacy Image at 01080000 ...
   Image Name:   linux-next
   Image Type:   AArch64 Linux Kernel Image (uncompressed)
   Data Size:    19386880 Bytes = 18.5 MiB
   Load Address: 01080000
   Entry Point:  01080000
   Verifying Checksum ... OK
load dtb from 0x1000000 ......
## Flattened Device Tree blob at 01000000
   Booting using the fdt blob at 0x1000000
libfdt fdt_path_offset() returned FDT_ERR_NOTFOUND
   Loading Kernel Image(COMP_NONE) ... OK
   kernel loaded at 0x01080000, end = 0x022fd200
libfdt fdt_path_offset() returned FDT_ERR_NOTFOUND
[rsvmem] fdt get prop fail.
   Loading Device Tree to 000000001fff3000, end 000000001ffffe28 ... OK

Starting kernel ...

uboot time: 49805953 us
[    0.000000][    T0] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
[    0.000000][    T0] Linux version 5.2.0-rc7-ARCH+ (lund@sarek) (gcc version 9.1.0 (GCC)) #11 SMP PREEMPT Sat Jul 13 23:13:31 AEST 2019
[    0.000000][    T0] Machine model: Hardkernel ODROID-N2
[    0.000000][    T0] earlycon: meson0 at MMIO 0x00000000ff803000 (options '115200n8')
[    0.000000][    T0] printk: bootconsole [meson0] enabled
[    0.000000][    T0] efi: Getting EFI parameters from FDT:
[    0.000000][    T0] efi: UEFI not found.
[    0.000000][    T0] Reserved memory: created CMA memory pool at 0x00000000dd800000, size 256 MiB
[    0.000000][    T0] OF: reserved mem: initialized node linux,cma, compatible id shared-dma-pool
[    0.000000][    T0] psci: probing for conduit method from DT.
[    0.000000][    T0] psci: PSCIv1.0 detected in firmware.
[    0.000000][    T0] psci: Using standard PSCI v0.2 function IDs
[    0.000000][    T0] psci: MIGRATE_INFO_TYPE not supported.
[    0.000000][    T0] psci: SMC Calling Convention v1.1
[    0.000000][    T0] percpu: Embedded 32 pages/cpu s90328 r8192 d32552 u131072
[    0.000000][    T0] Detected VIPT I-cache on CPU0
[    0.000000][    T0] CPU features: detected: ARM erratum 845719
[    0.000000][    T0] CPU features: kernel page table isolation disabled by kernel configuration
[    0.000000][    T0] Built 1 zonelists, mobility grouping on.  Total pages: 956832
[    0.000000][    T0] Kernel command line: root=/dev/mmcblk1p2 rootwait rw console=ttyAML0,115200 earlycon
[    0.000000][    T0] Dentry cache hash table entries: 524288 (order: 10, 4194304 bytes)
[    0.000000][    T0] Inode-cache hash table entries: 262144 (order: 9, 2097152 bytes)
[    0.000000][    T0] Memory: 3524156K/3888128K available (10172K kernel code, 1332K rwdata, 3644K rodata, 3712K init, 812K bss, 101828K reserved, 262144K cma-reserved)
[    0.000000][    T0] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=6, Nodes=1
[    0.000000][    T0] ftrace: allocating 34400 entries in 135 pages
[    0.000000][    T0] rcu: Preemptible hierarchical RCU implementation.
[    0.000000][    T0] rcu: 	RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=6.
[    0.000000][    T0] 	Tasks RCU enabled.
[    0.000000][    T0] rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies.
[    0.000000][    T0] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=6
[    0.000000][    T0] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
[    0.000000][    T0] GIC: Using split EOI/Deactivate mode
[    0.000000][    T0] OF: of_irq_init: children remain, but no parents
[    0.000000][    T0] random: get_random_bytes called from start_kernel+0x320/0x4bc with crng_init=0
[    0.000000][    T0] arch_timer: cp15 timer(s) running at 24.00MHz (phys).
[    0.000000][    T0] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x588fe9dc0, max_idle_ns: 440795202592 ns
[    0.000003][    T0] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns
[    0.008897][    T0] Console: colour dummy device 80x25
[    0.013947][    T0] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=96000)
[    0.024943][    T0] pid_max: default: 32768 minimum: 301
[    0.030379][    T0] LSM: Security Framework initializing
[    0.035642][    T0] SELinux:  Initializing.
[    0.039856][    T0] *** VALIDATE SELinux ***
[    0.044151][    T0] Mount-cache hash table entries: 8192 (order: 4, 65536 bytes)
[    0.051556][    T0] Mountpoint-cache hash table entries: 8192 (order: 4, 65536 bytes)
[    0.059802][    T0] *** VALIDATE proc ***
[    0.063639][    T0] *** VALIDATE cgroup1 ***
[    0.067734][    T0] *** VALIDATE cgroup2 ***
[    0.096103][    T1] ASID allocator initialised with 65536 entries
[    0.104089][    T1] rcu: Hierarchical SRCU implementation.
[    0.112373][    T1] EFI services will not be available.
[    0.120132][    T1] smp: Bringing up secondary CPUs ...
[    0.152496][    T0] Detected VIPT I-cache on CPU1
[    0.152544][    T0] CPU1: Booted secondary processor 0x0000000001 [0x410fd034]
[    0.185011][    T0] CPU features: detected: ARM erratum 858921
[    0.185018][    T0] spectrev2 mitigation disabled by kernel configuration
[    0.185024][    T0] Detected VIPT I-cache on CPU2
[    0.185035][    T0] CPU features: SANITY CHECK: Unexpected variation in SYS_ID_AA64MMFR0_EL1. Boot CPU: 0x00000000001122, CPU2: 0x00000000101122
[    0.185045][    T0] CPU features: Unsupported CPU feature variation detected.
[    0.185055][    T0] arch_timer: Enabling local workaround for ARM erratum 858921
[    0.185069][    T0] arch_timer: CPU2: Trapping CNTVCT access
[    0.185076][    T0] CPU2: Booted secondary processor 0x0000000100 [0x410fd092]
[    0.216549][    T0] Detected VIPT I-cache on CPU3
[    0.216557][    T0] CPU features: SANITY CHECK: Unexpected variation in SYS_ID_AA64MMFR0_EL1. Boot CPU: 0x00000000001122, CPU3: 0x00000000101122
[    0.216569][    T0] arch_timer: Enabling local workaround for ARM erratum 858921
[    0.216576][    T0] arch_timer: CPU3: Trapping CNTVCT access
[    0.216581][    T0] CPU3: Booted secondary processor 0x0000000101 [0x410fd092]
[    0.248620][    T0] Detected VIPT I-cache on CPU4
[    0.248628][    T0] CPU features: SANITY CHECK: Unexpected variation in SYS_ID_AA64MMFR0_EL1. Boot CPU: 0x00000000001122, CPU4: 0x00000000101122
[    0.248640][    T0] arch_timer: Enabling local workaround for ARM erratum 858921
[    0.248646][    T0] arch_timer: CPU4: Trapping CNTVCT access
[    0.248651][    T0] CPU4: Booted secondary processor 0x0000000102 [0x410fd092]
[    0.280662][    T0] Detected VIPT I-cache on CPU5
[    0.280670][    T0] CPU features: SANITY CHECK: Unexpected variation in SYS_ID_AA64MMFR0_EL1. Boot CPU: 0x00000000001122, CPU5: 0x00000000101122
[    0.280682][    T0] arch_timer: Enabling local workaround for ARM erratum 858921
[    0.280688][    T0] arch_timer: CPU5: Trapping CNTVCT access
[    0.280693][    T0] CPU5: Booted secondary processor 0x0000000103 [0x410fd092]
[    0.280773][    T1] smp: Brought up 1 node, 6 CPUs
[    0.464377][    T1] SMP: Total of 6 processors activated.
[    0.469797][    T1] CPU features: detected: 32-bit EL0 Support
[    0.475673][    T1] CPU features: detected: CRC32 instructions
[    0.481694][    T1] CPU: All CPU(s) started at EL2
[    0.486367][   T11] alternatives: patching kernel code
[    0.492472][    T1] devtmpfs: initialized
[    0.503391][    T1] Registered cp15_barrier emulation handler
[    0.503499][    T1] Registered setend emulation handler
[    0.509065][    T1] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[    0.519268][    T1] futex hash table entries: 2048 (order: 5, 131072 bytes)
[    0.532936][    T1] pinctrl core: initialized pinctrl subsystem
[    0.533746][    T1] DMI not present or invalid.
[    0.538085][    T1] NET: Registered protocol family 16
[    0.543316][    T1] audit: initializing netlink subsys (disabled)
[    0.549174][   T56] audit: type=2000 audit(0.412:1): state=initialized audit_enabled=0 res=1
[    0.557573][    T1] cpuidle: using governor menu
[    0.562362][    T1] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers.
[    0.570862][    T1] DMA: preallocated 256 KiB pool for atomic allocations
[    0.576565][    T1] Serial: AMBA PL011 UART driver
[    0.597052][    T1] cryptd: max_cpu_qlen set to 1000
[    0.601198][    T1] SCSI subsystem initialized
[    0.601475][    T1] usbcore: registered new interface driver usbfs
[    0.607099][    T1] usbcore: registered new interface driver hub
[    0.613180][    T1] usbcore: registered new device driver usb
[    0.618984][    T1] media: Linux media interface: v0.10
[    0.624178][    T1] videodev: Linux video capture interface: v2.00
[    0.630403][    T1] pps_core: LinuxPPS API ver. 1 registered
[    0.636017][    T1] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.645920][    T1] PTP clock support registered
[    0.651025][    T1] Advanced Linux Sound Architecture Driver Initialized.
[    0.657849][    T1] NetLabel: Initializing
[    0.661494][    T1] NetLabel:  domain hash size = 128
[    0.666580][    T1] NetLabel:  protocols = UNLABELED CIPSOv4 CALIPSO
[    0.672997][    T1] NetLabel:  unlabeled traffic allowed by default
[    0.679605][    T1] clocksource: Switched to clocksource arch_sys_counter
[    0.744874][    T1] VFS: Disk quotas dquot_6.6.0
[    0.744941][    T1] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
[    0.755982][    T1] NET: Registered protocol family 2
[    0.756874][    T1] tcp_listen_portaddr_hash hash table entries: 2048 (order: 3, 32768 bytes)
[    0.765133][    T1] TCP established hash table entries: 32768 (order: 6, 262144 bytes)
[    0.773203][    T1] TCP bind hash table entries: 32768 (order: 7, 524288 bytes)
[    0.780599][    T1] TCP: Hash tables configured (established 32768 bind 32768)
[    0.787755][    T1] UDP hash table entries: 2048 (order: 4, 65536 bytes)
[    0.794447][    T1] UDP-Lite hash table entries: 2048 (order: 4, 65536 bytes)
[    0.801722][    T1] NET: Registered protocol family 1
[    0.812317][    T1] Initialise system trusted keyrings
[    0.812442][    T1] workingset: timestamp_bits=46 max_order=20 bucket_order=0
[    0.825413][    T1] NET: Registered protocol family 38
[    0.825450][    T1] Key type asymmetric registered
[    0.829734][    T1] Asymmetric key parser 'x509' registered
[    0.835347][    T1] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 247)
[    0.843549][    T1] io scheduler mq-deadline registered
[    0.848714][    T1] io scheduler kyber registered
[    0.854828][    T1] GPIO line 447 (usb-hub-reset) hogged as output/high
[    0.867948][    T1] soc soc0: Amlogic Meson G12B (S922X) Revision 29:a (40:2) Detected
[    0.870909][    T1] Serial: 8250/16550 driver, 4 ports, IRQd    0.881388][    T1] ff803000.serial: ttyAML0 at MMIO 0xff803000 (irq = 12, base_baud = 1500000) is a meson_uart
[    0.891522][    T1] printk: console [ttyAML0] enabled
[    0.891522][    T1] printk: console [ttyAML0] enabled
[    0.895937][    T1] printk: bootconsole [meson0] disabled
[    0.895937][    T1] printk: bootconsole [meson0] disabled
[    0.912649][    T1] loop: module loaded
[    0.913006][    T1] zram: Added device: zram0
[    0.915440][    T1] mtdoops: mtd device (mtddev=name/number) must be supplied
[    0.922485][    T1] libphy: Fixed MDIO Bus: probed
[    0.927756][    T1] meson8b-dwmac ff3f0000.ethernet: PTP uses main clock
[    0.933634][    T1] meson8b-dwmac ff3f0000.ethernet: no reset control found
[    0.940868][    T1] meson8b-dwmac ff3f0000.ethernet: User ID: 0x11, Synopsys ID: 0x37
[    0.948299][    T1] meson8b-dwmac ff3f0000.ethernet: 	DWMAC1000
[    0.954156][    T1] meson8b-dwmac ff3f0000.ethernet: DMA HW capability register supported
[    0.962263][    T1] meson8b-dwmac ff3f0000.ethernet: RX Checksum Offload Engine supported
[    0.970368][    T1] meson8b-dwmac ff3f0000.ethernet: COE Type 2
[    0.976233][    T1] meson8b-dwmac ff3f0000.ethernet: TX Checksum insertion supported
[    0.983908][    T1] meson8b-dwmac ff3f0000.ethernet: Wake-Up On Lan supported
[    0.991003][    T1] meson8b-dwmac ff3f0000.ethernet: Normal descriptors
[    0.997539][    T1] meson8b-dwmac ff3f0000.ethernet: Ring mode enabled
[    1.004009][    T1] meson8b-dwmac ff3f0000.ethernet: Enable RX Mitigation via HW Watchdog Timer
[    1.012709][    T1] libphy: stmmac: probed
[    1.017718][    T1] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    1.023855][    T1] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    1.030878][    T1] usbcore: registered new interface driver cdc_acm
[    1.036956][    T1] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
[    1.045601][    T1] usbcore: registered new interface driver uas
[    1.051561][    T1] usbcore: registered new interface driver usb-storage
[    1.058195][    T1] usbcore: registered new interface driver ums-cypress
[    1.064874][    T1] usbcore: registered new interface driver usbserial_generic
[    1.071990][    T1] usbserial: USB Serial support registered for generic
[    1.078948][    T1] mousedev: PS/2 mouse device common for all mice
[    1.084953][    T1] usbcore: registered new interface driver xpad
[    1.090929][    T1] i2c /dev entries driver
[    1.095838][    T1] ledtrig-cpu: registered to indicate activity on CPUs
[    1.101823][    T1] meson-sm: secure-monitor enabled
[    1.106677][    T1] hidraw: raw HID events driver (C) Jiri Kosina
[    1.112755][    T1] usbcore: registered new interface driver usbhid
[    1.118808][    T1] usbhid: USB HID core driver
[    1.124027][    T1] Initializing XFRM netlink socket
[    1.128219][    T1] NET: Registered protocol family 17
[    1.133317][    T1] Key type dns_resolver registered
[    1.138611][    T1] registered taskstats version 1
[    1.142960][    T1] Loading compiled-in X.509 certificates
[    1.159909][    T1] hctosys: unable to open rtc device (rtc0)
[    1.160141][    T1] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[    1.169652][    T1] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[    1.175615][   T43] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
[    1.179739][    T1] ALSA device list:
[    1.184773][   T43] cfg80211: failed to load regulatory.db
[    1.193826][    T1]   No soundcards found.
[    1.203547][    T1] Waiting for root device /dev/mmcblk1p2...

elatllat
Posts: 1586
Joined: Tue Sep 01, 2015 8:54 am
languages_spoken: english
ODROIDs: XU4, N1, N2
Has thanked: 25 times
Been thanked: 74 times
Contact:

Re: Any plan for basic mainline linux support?

Unread post by elatllat » Sun Jul 14, 2019 6:53 am

You may want to use mmcblk0 (vs 1) depending on whether you're using a SDcard or emmc.

brad
Posts: 982
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: 39 times
Contact:

Re: Any plan for basic mainline linux support?

Unread post by brad » Sun Jul 14, 2019 9:48 am

aplund wrote:
Sun Jul 14, 2019 6:41 am
Well, I'm not sure why this changed when I fiddled with kernel config options, but now I can partially boot. I can also partially boot in qemu.

Code: Select all

## Booting kernel from Legacy Image at 01080000 ...
   Image Name:   linux-next
   Image Type:   AArch64 Linux Kernel Image (uncompressed)
   Data Size:    19386880 Bytes = 18.5 MiB
   Load Address: 01080000
   Entry Point:  01080000
   Verifying Checksum ... OK
load dtb from 0x1000000 ......
## Flattened Device Tree blob at 01000000
   Booting using the fdt blob at 0x1000000
libfdt fdt_path_offset() returned FDT_ERR_NOTFOUND
   Loading Kernel Image(COMP_NONE) ... OK
   kernel loaded at 0x01080000, end = 0x022fd200
libfdt fdt_path_offset() returned FDT_ERR_NOTFOUND
[rsvmem] fdt get prop fail.
   Loading Device Tree to 000000001fff3000, end 000000001ffffe28 ... OK

Starting kernel ...

uboot time: 49805953 us
[    0.000000][    T0] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
[    0.000000][    T0] Linux version 5.2.0-rc7-ARCH+ (lund@sarek) (gcc version 9.1.0 (GCC)) #11 SMP PREEMPT Sat Jul 13 23:13:31 AEST 2019
[    0.000000][    T0] Machine model: Hardkernel ODROID-N2
[    0.000000][    T0] earlycon: meson0 at MMIO 0x00000000ff803000 (options '115200n8')
[    0.000000][    T0] printk: bootconsole [meson0] enabled
[    0.000000][    T0] efi: Getting EFI parameters from FDT:
[    0.000000][    T0] efi: UEFI not found.
[    0.000000][    T0] Reserved memory: created CMA memory pool at 0x00000000dd800000, size 256 MiB
[    0.000000][    T0] OF: reserved mem: initialized node linux,cma, compatible id shared-dma-pool
[    0.000000][    T0] psci: probing for conduit method from DT.
[    0.000000][    T0] psci: PSCIv1.0 detected in firmware.
[    0.000000][    T0] psci: Using standard PSCI v0.2 function IDs
[    0.000000][    T0] psci: MIGRATE_INFO_TYPE not supported.
[    0.000000][    T0] psci: SMC Calling Convention v1.1
[    0.000000][    T0] percpu: Embedded 32 pages/cpu s90328 r8192 d32552 u131072
[    0.000000][    T0] Detected VIPT I-cache on CPU0
[    0.000000][    T0] CPU features: detected: ARM erratum 845719
[    0.000000][    T0] CPU features: kernel page table isolation disabled by kernel configuration
[    0.000000][    T0] Built 1 zonelists, mobility grouping on.  Total pages: 956832
[    0.000000][    T0] Kernel command line: root=/dev/mmcblk1p2 rootwait rw console=ttyAML0,115200 earlycon
[    0.000000][    T0] Dentry cache hash table entries: 524288 (order: 10, 4194304 bytes)
[    0.000000][    T0] Inode-cache hash table entries: 262144 (order: 9, 2097152 bytes)
[    0.000000][    T0] Memory: 3524156K/3888128K available (10172K kernel code, 1332K rwdata, 3644K rodata, 3712K init, 812K bss, 101828K reserved, 262144K cma-reserved)
[    0.000000][    T0] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=6, Nodes=1
[    0.000000][    T0] ftrace: allocating 34400 entries in 135 pages
[    0.000000][    T0] rcu: Preemptible hierarchical RCU implementation.
[    0.000000][    T0] rcu: 	RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=6.
[    0.000000][    T0] 	Tasks RCU enabled.
[    0.000000][    T0] rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies.
[    0.000000][    T0] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=6
[    0.000000][    T0] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
[    0.000000][    T0] GIC: Using split EOI/Deactivate mode
[    0.000000][    T0] OF: of_irq_init: children remain, but no parents
[    0.000000][    T0] random: get_random_bytes called from start_kernel+0x320/0x4bc with crng_init=0
[    0.000000][    T0] arch_timer: cp15 timer(s) running at 24.00MHz (phys).
[    0.000000][    T0] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x588fe9dc0, max_idle_ns: 440795202592 ns
[    0.000003][    T0] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns
[    0.008897][    T0] Console: colour dummy device 80x25
[    0.013947][    T0] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=96000)
[    0.024943][    T0] pid_max: default: 32768 minimum: 301
[    0.030379][    T0] LSM: Security Framework initializing
[    0.035642][    T0] SELinux:  Initializing.
[    0.039856][    T0] *** VALIDATE SELinux ***
[    0.044151][    T0] Mount-cache hash table entries: 8192 (order: 4, 65536 bytes)
[    0.051556][    T0] Mountpoint-cache hash table entries: 8192 (order: 4, 65536 bytes)
[    0.059802][    T0] *** VALIDATE proc ***
[    0.063639][    T0] *** VALIDATE cgroup1 ***
[    0.067734][    T0] *** VALIDATE cgroup2 ***
[    0.096103][    T1] ASID allocator initialised with 65536 entries
[    0.104089][    T1] rcu: Hierarchical SRCU implementation.
[    0.112373][    T1] EFI services will not be available.
[    0.120132][    T1] smp: Bringing up secondary CPUs ...
[    0.152496][    T0] Detected VIPT I-cache on CPU1
[    0.152544][    T0] CPU1: Booted secondary processor 0x0000000001 [0x410fd034]
[    0.185011][    T0] CPU features: detected: ARM erratum 858921
[    0.185018][    T0] spectrev2 mitigation disabled by kernel configuration
[    0.185024][    T0] Detected VIPT I-cache on CPU2
[    0.185035][    T0] CPU features: SANITY CHECK: Unexpected variation in SYS_ID_AA64MMFR0_EL1. Boot CPU: 0x00000000001122, CPU2: 0x00000000101122
[    0.185045][    T0] CPU features: Unsupported CPU feature variation detected.
[    0.185055][    T0] arch_timer: Enabling local workaround for ARM erratum 858921
[    0.185069][    T0] arch_timer: CPU2: Trapping CNTVCT access
[    0.185076][    T0] CPU2: Booted secondary processor 0x0000000100 [0x410fd092]
[    0.216549][    T0] Detected VIPT I-cache on CPU3
[    0.216557][    T0] CPU features: SANITY CHECK: Unexpected variation in SYS_ID_AA64MMFR0_EL1. Boot CPU: 0x00000000001122, CPU3: 0x00000000101122
[    0.216569][    T0] arch_timer: Enabling local workaround for ARM erratum 858921
[    0.216576][    T0] arch_timer: CPU3: Trapping CNTVCT access
[    0.216581][    T0] CPU3: Booted secondary processor 0x0000000101 [0x410fd092]
[    0.248620][    T0] Detected VIPT I-cache on CPU4
[    0.248628][    T0] CPU features: SANITY CHECK: Unexpected variation in SYS_ID_AA64MMFR0_EL1. Boot CPU: 0x00000000001122, CPU4: 0x00000000101122
[    0.248640][    T0] arch_timer: Enabling local workaround for ARM erratum 858921
[    0.248646][    T0] arch_timer: CPU4: Trapping CNTVCT access
[    0.248651][    T0] CPU4: Booted secondary processor 0x0000000102 [0x410fd092]
[    0.280662][    T0] Detected VIPT I-cache on CPU5
[    0.280670][    T0] CPU features: SANITY CHECK: Unexpected variation in SYS_ID_AA64MMFR0_EL1. Boot CPU: 0x00000000001122, CPU5: 0x00000000101122
[    0.280682][    T0] arch_timer: Enabling local workaround for ARM erratum 858921
[    0.280688][    T0] arch_timer: CPU5: Trapping CNTVCT access
[    0.280693][    T0] CPU5: Booted secondary processor 0x0000000103 [0x410fd092]
[    0.280773][    T1] smp: Brought up 1 node, 6 CPUs
[    0.464377][    T1] SMP: Total of 6 processors activated.
[    0.469797][    T1] CPU features: detected: 32-bit EL0 Support
[    0.475673][    T1] CPU features: detected: CRC32 instructions
[    0.481694][    T1] CPU: All CPU(s) started at EL2
[    0.486367][   T11] alternatives: patching kernel code
[    0.492472][    T1] devtmpfs: initialized
[    0.503391][    T1] Registered cp15_barrier emulation handler
[    0.503499][    T1] Registered setend emulation handler
[    0.509065][    T1] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[    0.519268][    T1] futex hash table entries: 2048 (order: 5, 131072 bytes)
[    0.532936][    T1] pinctrl core: initialized pinctrl subsystem
[    0.533746][    T1] DMI not present or invalid.
[    0.538085][    T1] NET: Registered protocol family 16
[    0.543316][    T1] audit: initializing netlink subsys (disabled)
[    0.549174][   T56] audit: type=2000 audit(0.412:1): state=initialized audit_enabled=0 res=1
[    0.557573][    T1] cpuidle: using governor menu
[    0.562362][    T1] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers.
[    0.570862][    T1] DMA: preallocated 256 KiB pool for atomic allocations
[    0.576565][    T1] Serial: AMBA PL011 UART driver
[    0.597052][    T1] cryptd: max_cpu_qlen set to 1000
[    0.601198][    T1] SCSI subsystem initialized
[    0.601475][    T1] usbcore: registered new interface driver usbfs
[    0.607099][    T1] usbcore: registered new interface driver hub
[    0.613180][    T1] usbcore: registered new device driver usb
[    0.618984][    T1] media: Linux media interface: v0.10
[    0.624178][    T1] videodev: Linux video capture interface: v2.00
[    0.630403][    T1] pps_core: LinuxPPS API ver. 1 registered
[    0.636017][    T1] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.645920][    T1] PTP clock support registered
[    0.651025][    T1] Advanced Linux Sound Architecture Driver Initialized.
[    0.657849][    T1] NetLabel: Initializing
[    0.661494][    T1] NetLabel:  domain hash size = 128
[    0.666580][    T1] NetLabel:  protocols = UNLABELED CIPSOv4 CALIPSO
[    0.672997][    T1] NetLabel:  unlabeled traffic allowed by default
[    0.679605][    T1] clocksource: Switched to clocksource arch_sys_counter
[    0.744874][    T1] VFS: Disk quotas dquot_6.6.0
[    0.744941][    T1] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
[    0.755982][    T1] NET: Registered protocol family 2
[    0.756874][    T1] tcp_listen_portaddr_hash hash table entries: 2048 (order: 3, 32768 bytes)
[    0.765133][    T1] TCP established hash table entries: 32768 (order: 6, 262144 bytes)
[    0.773203][    T1] TCP bind hash table entries: 32768 (order: 7, 524288 bytes)
[    0.780599][    T1] TCP: Hash tables configured (established 32768 bind 32768)
[    0.787755][    T1] UDP hash table entries: 2048 (order: 4, 65536 bytes)
[    0.794447][    T1] UDP-Lite hash table entries: 2048 (order: 4, 65536 bytes)
[    0.801722][    T1] NET: Registered protocol family 1
[    0.812317][    T1] Initialise system trusted keyrings
[    0.812442][    T1] workingset: timestamp_bits=46 max_order=20 bucket_order=0
[    0.825413][    T1] NET: Registered protocol family 38
[    0.825450][    T1] Key type asymmetric registered
[    0.829734][    T1] Asymmetric key parser 'x509' registered
[    0.835347][    T1] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 247)
[    0.843549][    T1] io scheduler mq-deadline registered
[    0.848714][    T1] io scheduler kyber registered
[    0.854828][    T1] GPIO line 447 (usb-hub-reset) hogged as output/high
[    0.867948][    T1] soc soc0: Amlogic Meson G12B (S922X) Revision 29:a (40:2) Detected
[    0.870909][    T1] Serial: 8250/16550 driver, 4 ports, IRQd    0.881388][    T1] ff803000.serial: ttyAML0 at MMIO 0xff803000 (irq = 12, base_baud = 1500000) is a meson_uart
[    0.891522][    T1] printk: console [ttyAML0] enabled
[    0.891522][    T1] printk: console [ttyAML0] enabled
[    0.895937][    T1] printk: bootconsole [meson0] disabled
[    0.895937][    T1] printk: bootconsole [meson0] disabled
[    0.912649][    T1] loop: module loaded
[    0.913006][    T1] zram: Added device: zram0
[    0.915440][    T1] mtdoops: mtd device (mtddev=name/number) must be supplied
[    0.922485][    T1] libphy: Fixed MDIO Bus: probed
[    0.927756][    T1] meson8b-dwmac ff3f0000.ethernet: PTP uses main clock
[    0.933634][    T1] meson8b-dwmac ff3f0000.ethernet: no reset control found
[    0.940868][    T1] meson8b-dwmac ff3f0000.ethernet: User ID: 0x11, Synopsys ID: 0x37
[    0.948299][    T1] meson8b-dwmac ff3f0000.ethernet: 	DWMAC1000
[    0.954156][    T1] meson8b-dwmac ff3f0000.ethernet: DMA HW capability register supported
[    0.962263][    T1] meson8b-dwmac ff3f0000.ethernet: RX Checksum Offload Engine supported
[    0.970368][    T1] meson8b-dwmac ff3f0000.ethernet: COE Type 2
[    0.976233][    T1] meson8b-dwmac ff3f0000.ethernet: TX Checksum insertion supported
[    0.983908][    T1] meson8b-dwmac ff3f0000.ethernet: Wake-Up On Lan supported
[    0.991003][    T1] meson8b-dwmac ff3f0000.ethernet: Normal descriptors
[    0.997539][    T1] meson8b-dwmac ff3f0000.ethernet: Ring mode enabled
[    1.004009][    T1] meson8b-dwmac ff3f0000.ethernet: Enable RX Mitigation via HW Watchdog Timer
[    1.012709][    T1] libphy: stmmac: probed
[    1.017718][    T1] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    1.023855][    T1] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    1.030878][    T1] usbcore: registered new interface driver cdc_acm
[    1.036956][    T1] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
[    1.045601][    T1] usbcore: registered new interface driver uas
[    1.051561][    T1] usbcore: registered new interface driver usb-storage
[    1.058195][    T1] usbcore: registered new interface driver ums-cypress
[    1.064874][    T1] usbcore: registered new interface driver usbserial_generic
[    1.071990][    T1] usbserial: USB Serial support registered for generic
[    1.078948][    T1] mousedev: PS/2 mouse device common for all mice
[    1.084953][    T1] usbcore: registered new interface driver xpad
[    1.090929][    T1] i2c /dev entries driver
[    1.095838][    T1] ledtrig-cpu: registered to indicate activity on CPUs
[    1.101823][    T1] meson-sm: secure-monitor enabled
[    1.106677][    T1] hidraw: raw HID events driver (C) Jiri Kosina
[    1.112755][    T1] usbcore: registered new interface driver usbhid
[    1.118808][    T1] usbhid: USB HID core driver
[    1.124027][    T1] Initializing XFRM netlink socket
[    1.128219][    T1] NET: Registered protocol family 17
[    1.133317][    T1] Key type dns_resolver registered
[    1.138611][    T1] registered taskstats version 1
[    1.142960][    T1] Loading compiled-in X.509 certificates
[    1.159909][    T1] hctosys: unable to open rtc device (rtc0)
[    1.160141][    T1] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[    1.169652][    T1] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[    1.175615][   T43] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
[    1.179739][    T1] ALSA device list:
[    1.184773][   T43] cfg80211: failed to load regulatory.db
[    1.193826][    T1]   No soundcards found.
[    1.203547][    T1] Waiting for root device /dev/mmcblk1p2...
I haven't been using the N2 for a while and this all all from memory but the FDT_ERR_NOTFOUND / rsvmem I remember is nothing to worry about it just means that uboot cannot read / modify the dtb file (different format in mainline) and can be ignored as we don't really need to modify it within uboot environment. its still loaded and passed onto the kernel

In regards to waiting "Waiting for root device /dev/mmcblk1p2" a couple of things

- this is waiting for an sdcard. Are you using sd card or mmc? For emmc you need to specific root=/dev/mmcblk0p2 instead
- As you are not running a ramdisk we need to have all the emmc / sd drivers built into to kernel as we can not load modules until the disk is mounted. I think this is the main one
CONFIG_MMC_MESON_GX=y
- We need to have "rootwait" option set also in the boot for some cards to tell the kernel to wait for a bit until driver has initialised or we see the message you received
- If you are booting an image like armbian with no fat partition then you might need to modify the partition being used as there is only 1 ext partition. root would like something like /dev/mmcblk0p1

As an example my bootargs for hardkernel ubuntu are (This is emmc with rootwait set)...

setenv bootargs "console=ttyAML0,115200 root=/dev/mmcblk0p2 rw rootwait"

As a side note, emmc / sd numbers in uboot / mmc are swapped. mmc 1 (eg fatload 1:1) is emmc card but in linux it is 0 eg mmcblk0, sd is 0 in uboot but 1 in kernel

aplund
Posts: 17
Joined: Mon May 27, 2019 7:57 am
languages_spoken: english
ODROIDs: ODROID-N2
Has thanked: 0
Been thanked: 0
Contact:

Re: Any plan for basic mainline linux support?

Unread post by aplund » Sun Jul 14, 2019 12:28 pm

elatllat wrote:
Sat Jul 13, 2019 12:45 am
The dts got merged into next,
but boot stops at the rtc.
I'll check again at 5.3-rc1 for a 100% mainline boot,
back to the patched 5.2 for now.
I'm running into this now that I have a working kernel output. This can be bypassed by adding 'clk_ignore_unused' into your cmdline. There must be something missing from the dtb.

sbi
Posts: 14
Joined: Wed May 01, 2019 8:07 pm
languages_spoken: german, english
ODROIDs: xu4, n2
Has thanked: 1 time
Been thanked: 0
Contact:

Re: Any plan for basic mainline linux support?

Unread post by sbi » Sun Jul 14, 2019 10:22 pm

I also managed to get to this point where the boot stopps at the rtc.
aplund wrote:
Sun Jul 14, 2019 12:28 pm
This can be bypassed by adding 'clk_ignore_unused' into your cmdline. There must be something missing from the dtb.
With clk_ignore_unused, the boot continues and later when my root fs is setup I get

Code: Select all

[    7.563615] meson-vrtc ff8000a8.rtc: meson_vrtc_read_time
[    7.563750] meson-vrtc ff8000a8.rtc: registered as rtc0
and a lot of loaded modules

Code: Select all

root@n2 ~ # lsmod
Module                  Size  Used by
meson_dw_hdmi          20480  0
meson_drm              53248  1 meson_dw_hdmi
dw_hdmi                32768  1 meson_dw_hdmi
meson_gxl              16384  0
dwmac_generic          16384  0
drm_kms_helper        184320  5 meson_dw_hdmi,meson_drm,dw_hdmi
realtek                20480  0
dwmac_meson8b          16384  0
drm                   450560  5 meson_dw_hdmi,meson_drm,drm_kms_helper,dw_hdmi
stmmac_platform        20480  2 dwmac_meson8b,dwmac_generic
snd_soc_meson_axg_sound_card    20480  0
stmmac                135168  3 dwmac_meson8b,stmmac_platform,dwmac_generic
meson_ir               16384  0
mdio_mux_meson_g12a    16384  0
axg_audio              57344  12
snd_soc_meson_axg_tdm_interface    16384  1 snd_soc_meson_axg_sound_card
rc_core                36864  2 meson_ir
snd_soc_meson_axg_tdmout    20480  0
snd_soc_meson_axg_frddr    24576  0
drm_panel_orientation_quirks    20480  1 drm
sclk_div               16384  1 axg_audio
meson_rng              16384  0
meson_canvas           16384  1 meson_drm
rtc_meson_vrtc         16384  1
reset_meson_audio_arb    16384  3
nvmem_meson_efuse      16384  0
snd_soc_meson_axg_tdm_formatter    16384  2 snd_soc_meson_axg_tdm_interface,snd_soc_meson_axg_tdmout
snd_soc_meson_axg_fifo    16384  1 snd_soc_meson_axg_frddr
clk_phase              16384  1 axg_audio
rng_core               16384  1 meson_rng
crct10dif_ce           16384  1
ipv6                  372736  20
so maybe there is just some driver not compiled in?


@aplund is your ethernet working? I get this

Code: Select all

[    8.906219] meson8b-dwmac ff3f0000.ethernet: PTP uses main clock
[    8.906712] meson8b-dwmac ff3f0000.ethernet: no reset control found
[    8.913906] meson8b-dwmac ff3f0000.ethernet: User ID: 0x11, Synopsys ID: 0x37
[    8.919914] meson8b-dwmac ff3f0000.ethernet:         DWMAC1000
[    8.925067] meson8b-dwmac ff3f0000.ethernet: DMA HW capability register supported
[    8.932499] meson8b-dwmac ff3f0000.ethernet: RX Checksum Offload Engine supported
[    8.939896] meson8b-dwmac ff3f0000.ethernet: COE Type 2
[    8.945072] meson8b-dwmac ff3f0000.ethernet: TX Checksum insertion supported
[    8.952057] meson8b-dwmac ff3f0000.ethernet: Wake-Up On Lan supported
[    8.958510] meson8b-dwmac ff3f0000.ethernet: Normal descriptors
[    8.964310] meson8b-dwmac ff3f0000.ethernet: Ring mode enabled
[    8.970100] meson8b-dwmac ff3f0000.ethernet: Enable RX Mitigation via HW Watchdog Timer
but

Code: Select all

root@n2 ~ # ifconfig eth0 up
[  619.332793] meson8b-dwmac ff3f0000.ethernet eth0: Could not attach to PHY
[  619.333933] meson8b-dwmac ff3f0000.ethernet eth0: stmmac_open: Cannot attach to PHY (error: -19)
SIOCSIFFLAGS: No such device
root@n2 ~ #

elatllat
Posts: 1586
Joined: Tue Sep 01, 2015 8:54 am
languages_spoken: english
ODROIDs: XU4, N1, N2
Has thanked: 25 times
Been thanked: 74 times
Contact:

Re: Any plan for basic mainline linux support?

Unread post by elatllat » Mon Jul 15, 2019 2:18 am

aplund wrote:
Sun Jul 14, 2019 12:28 pm
...clk_ignore_unused...
Thanks, I updated the example script I posted.

Code: Select all

uname -r
5.2.0-next-20190712
sbi wrote:
Sun Jul 14, 2019 10:22 pm
...a lot of loaded modules... ethernet working? ...
Did you edit the conf to enable Ethernet and disable the bloat? (as shown in above example script)

sbi
Posts: 14
Joined: Wed May 01, 2019 8:07 pm
languages_spoken: german, english
ODROIDs: xu4, n2
Has thanked: 1 time
Been thanked: 0
Contact:

Re: Any plan for basic mainline linux support?

Unread post by sbi » Mon Jul 15, 2019 5:33 am

elatllat wrote:
Mon Jul 15, 2019 2:18 am
Did you edit the conf to enable Ethernet and disable the bloat? (as shown in above example script)
I must have overlooked the config adaptations in your script :shock:. Mine was with bare defconfig + btrfs enabled. I will give it a try (also with the next branch).

Rising_Sun
Posts: 7
Joined: Fri Jul 12, 2019 5:09 pm
languages_spoken: english
ODROIDs: Odroid N2
Has thanked: 1 time
Been thanked: 0
Contact:

Re: Any plan for basic mainline linux support?

Unread post by Rising_Sun » Mon Jul 15, 2019 6:50 am

Had to put make olddefconfig into your new script.

Code: Select all

	echo "CONFIG_MDIO_BUS_MUX_MESON_G12A=y" >> .config
	echo "CONFIG_ARCH_MESON=y" >> .config
	make olddefconfig                ###here
fi
Now its compiling. Testing soon.

PS:
Its booting fine and network is up too. :D

PS2: Seems reboot from sdcard still not working.

aplund
Posts: 17
Joined: Mon May 27, 2019 7:57 am
languages_spoken: english
ODROIDs: ODROID-N2
Has thanked: 0
Been thanked: 0
Contact:

Re: Any plan for basic mainline linux support?

Unread post by aplund » Mon Jul 15, 2019 5:57 pm

I'm somewhat stuck again. What drivers are needed to get emmc working? I have the following and I can't see /dev/mmcblk**

Code: Select all

mmc_block              53248  0
meson_gx_mmc           28672  0
pwrseq_emmc            16384  0
mmc_core              188416  3 mmc_block,pwrseq_emmc,meson_gx_mmc

Rising_Sun
Posts: 7
Joined: Fri Jul 12, 2019 5:09 pm
languages_spoken: english
ODROIDs: Odroid N2
Has thanked: 1 time
Been thanked: 0
Contact:

Re: Any plan for basic mainline linux support?

Unread post by Rising_Sun » Mon Jul 15, 2019 8:39 pm

Seems only 1GB RAM of 4GB is available to the system.
MiB Mem : 986.477 total, 384.945 free, 342.410 used, 259.121 buff/cache
Is seen in top.
In 5.2.0-next-20190715.
dmesg outputs:

Code: Select all

[    0.000000] Reserved memory: created CMA memory pool at 0x00000000e0000000, size 256 MiB
[    0.000000] OF: reserved mem: initialized node linux,cma, compatible id shared-dma-pool
[    0.000000] NUMA: No NUMA configuration found
[    0.000000] NUMA: Faking a node at [mem 0x0000000000000000-0x000000003fffffff]
[    0.000000] NUMA: NODE_DATA [mem 0x2fdbb840-0x2fdbcfff]
[    0.000000] Zone ranges:
[    0.000000]   DMA32    [mem 0x0000000000000000-0x000000003fffffff]
[    0.000000]   Normal   empty
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x0000000004ffffff]
[    0.000000]   node   0: [mem 0x0000000005300000-0x000000003fffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x000000003fffffff]

Code: Select all

[    0.000000] Memory: 745704K/1045504K available (10172K kernel code, 832K rwdata, 30
40K rodata, 2304K init, 412K bss, 37656K reserved, 262144K cma-reserved)


PS: changed the following in the arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtb:
from 0x40000000 to 0xf0000000

Code: Select all

        memory@0 {
                device_type = "memory";
                reg = <0x0 0x0 0x0 0xf0000000>;
        };
Now 3.7GB Ram is available.

reg = <0x0 0x0 0x0 0xfc000000>;
and
reg = <0x0 0x0 0x0 0xffffffff>;
and
reg = <0x0 0x0 0x00000001 0x00000000>;

did not boot.

PS: Is 0xf0000000 the maximal possible value because the device reserves 256Mb? 100000000-10000000=f0000000 ?

aplund
Posts: 17
Joined: Mon May 27, 2019 7:57 am
languages_spoken: english
ODROIDs: ODROID-N2
Has thanked: 0
Been thanked: 0
Contact:

Re: Any plan for basic mainline linux support?

Unread post by aplund » Tue Jul 16, 2019 11:36 am

Has anyone with the ethernet problem tried the amlogic/v5.3/dt64 branch from git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic.git?

There seems to have been some issue with the ethernet reset line and the device trees were changed very recently to address the issue.

aplund
Posts: 17
Joined: Mon May 27, 2019 7:57 am
languages_spoken: english
ODROIDs: ODROID-N2
Has thanked: 0
Been thanked: 0
Contact:

Re: Any plan for basic mainline linux support?

Unread post by aplund » Tue Jul 16, 2019 3:29 pm

aplund wrote:
Mon Jul 15, 2019 5:57 pm
I'm somewhat stuck again. What drivers are needed to get emmc working? I have the following and I can't see /dev/mmcblk**

Code: Select all

mmc_block              53248  0
meson_gx_mmc           28672  0
pwrseq_emmc            16384  0
mmc_core              188416  3 mmc_block,pwrseq_emmc,meson_gx_mmc
Have you checked if you have included the voltage regulator drivers? Even though most of them a "fixed", drivers won't probe if you don't include the regulator drivers.

elatllat
Posts: 1586
Joined: Tue Sep 01, 2015 8:54 am
languages_spoken: english
ODROIDs: XU4, N1, N2
Has thanked: 25 times
Been thanked: 74 times
Contact:

Re: Any plan for basic mainline linux support?

Unread post by elatllat » Tue Jul 16, 2019 4:29 pm

Rising_Sun wrote:
Mon Jul 15, 2019 8:39 pm
...from 0x40000000 to 0xf0000000...
I wonder why Neal did that, or why he put the CPU at 1/2 speed.

(script updated)

Rising_Sun
Posts: 7
Joined: Fri Jul 12, 2019 5:09 pm
languages_spoken: english
ODROIDs: Odroid N2
Has thanked: 1 time
Been thanked: 0
Contact:

Re: Any plan for basic mainline linux support?

Unread post by Rising_Sun » Tue Jul 16, 2019 7:15 pm

elatllat wrote:
Tue Jul 16, 2019 4:29 pm
Rising_Sun wrote:
Mon Jul 15, 2019 8:39 pm
...from 0x40000000 to 0xf0000000...
I wonder why Neal did that, or why he put the CPU at 1/2 speed.

(script updated)
I think 0x70000000 (0x80000000-0x10000000) would be more safe in the script because there are devices with 2GB. Maybe a switch?

elatllat
Posts: 1586
Joined: Tue Sep 01, 2015 8:54 am
languages_spoken: english
ODROIDs: XU4, N1, N2
Has thanked: 25 times
Been thanked: 74 times
Contact:

Re: Any plan for basic mainline linux support?

Unread post by elatllat » Tue Jul 16, 2019 11:32 pm

Rising_Sun wrote:
Tue Jul 16, 2019 7:15 pm
...0x40000000...

Code: Select all

N2> free -m | head -n 2
              total        used        free      shared  buff/cache   available
Mem:           3704          87        3316           0         300        3545
              
N2> dmesg | grep Memory
[    0.000000] Memory: 3528872K/3888128K available (10236K kernel code, 834K rwdata, 3060K rodata, 2304K init, 412K bss, 97112K reserved, 262144K cma-reserved)

N2> uname -r
5.2.0-next-20190712-3
I did not experience that issue...

Rising_Sun
Posts: 7
Joined: Fri Jul 12, 2019 5:09 pm
languages_spoken: english
ODROIDs: Odroid N2
Has thanked: 1 time
Been thanked: 0
Contact:

Re: Any plan for basic mainline linux support?

Unread post by Rising_Sun » Wed Jul 17, 2019 3:53 am

elatllat wrote:
Tue Jul 16, 2019 11:32 pm
Rising_Sun wrote:
Tue Jul 16, 2019 7:15 pm
...0x40000000...
I did not experience that issue...
Dunno what is happening mabye some regression after 5.2.0-next-20190712-3? I was using 5.2.0-next-20190715 when I noticed it.

My output with 0xf0000000.

Code: Select all

odroid:~$ dmesg | grep Memory
[    0.000000] Memory: 3569944K/3929088K available (10108K kernel code, 832K rwdata, 3040K rodata, 2304K init, 412K bss, 97000K reserved, 262144K cma-reserved)

odroid:~$ free -m | head -n 2
              total        used        free      shared  buff/cache   available
Mem:           3744         609        2614           2         519        3057

odroid:~$ uname -r
5.2.0-next-20190716-dirty
I changed the value to 0xefd00000 for testing. (4GB-256MB-3MB)
Made more sense for me because in meson-g12a.dtsi the reserved memory is 256MB+3MB.
Is this unnecessary? Does secmon use the memory of cma anyway? I dont see any differences other than loss of 3MB memory.

Code: Select all

                /* 3 MiB reserved for ARM Trusted Firmware (BL31) */
                secmon_reserved: secmon@5000000 {
                        reg = <0x0 0x05000000 0x0 0x300000>;
                        no-map;
                };

                linux,cma {
                        compatible = "shared-dma-pool";
                        reusable;
                        size = <0x0 0x10000000>;
                        alignment = <0x0 0x400000>;
                        linux,cma-default;
                };

aplund
Posts: 17
Joined: Mon May 27, 2019 7:57 am
languages_spoken: english
ODROIDs: ODROID-N2
Has thanked: 0
Been thanked: 0
Contact:

Re: Any plan for basic mainline linux support?

Unread post by aplund » Wed Jul 17, 2019 6:47 pm

It seems there is also no battery RTC in the device tree. I tried this but it didn't work for me:

Code: Select all

diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts
index 81780ffcc7f0..79771b7dd55b 100644
--- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts
@@ -384,3 +384,27 @@
        /* Enable the hub which is connected to this port */
        phy-supply = <&hub_5v>;
 };
+
+&periphs_pinctrl {
+        i2c3_to_gpioa:i2c3_gpioa {
+                mux {
+                        groups = "GPIOA_14",
+                                "GPIOA_15";
+                        function = "gpio_periphs";
+                        drive-strength-microamp = <3000>;
+                };
+        };
+};
+
+&i2c3 {
+        status = "okay";
+        pinctrl-names = "default","gpio_periphs";
+        pinctrl-0 = <&i2c3_sck_h_pins &i2c3_sda_a_pins>;
+        pinctrl-1 = <&i2c3_to_gpioa>;
+        clock-frequency = <100000>;             /* default 100k */
+
+        pcf8563: rtc@51 {
+                compatible = "nxp,pcf8563";
+                reg = <0x51>;
+        };
+};

sbi
Posts: 14
Joined: Wed May 01, 2019 8:07 pm
languages_spoken: german, english
ODROIDs: xu4, n2
Has thanked: 1 time
Been thanked: 0
Contact:

Re: Any plan for basic mainline linux support?

Unread post by sbi » Fri Jul 19, 2019 2:42 pm

Finally guys, after not beeing able to compile the next kernel with brtfs, this issue seems to be fixed in current upstream and I am up and running with mainline :)

Network working, memory working.

Code: Select all

n2 ~ # free -m | head -n 2
              total        used        free      shared  buff/cache   available
Mem:           3703         234        2708           0         760        3386
n2 ~ # uname -r
5.2.0-next-20190718

Rising_Sun
Posts: 7
Joined: Fri Jul 12, 2019 5:09 pm
languages_spoken: english
ODROIDs: Odroid N2
Has thanked: 1 time
Been thanked: 0
Contact:

Re: Any plan for basic mainline linux support?

Unread post by Rising_Sun » Sat Jul 20, 2019 3:18 am

Removed the line with 0xf0000000 for testing. Have only 1GB Ram available.

Code: Select all

odroid:~$ free -m | head -n 2
              total        used        free      shared  buff/cache   available
Mem:            986         324         426           2         234         590

odroid:~$ uname -a
Linux odroid 5.2.0-next-20190719 #1 SMP Fri Jul 19 15:35:15 CEST 2019 aarch64 aarch64 aarch64 GNU/Linux

Post Reply

Return to “General Topics”

Who is online

Users browsing this forum: No registered users and 2 guests