Jump to content

Armbian for Amlogic S9xxx kernel 5.x


balbes150

Recommended Posts

30 minutes ago, balbes150 said:

When using Khadas Ubuntu in eMMC (using Ubuntu's option to write to eMMC via USB Burn Tool) is a bad option for General use with external systems (which run from SD card and USB flash drive). All versions of Khadas Ubuntu to write to eMMC, have an error in u-boot, which does not properly run external systems. If you want to run Armbian with external media, the eMMC should be strictly firmware with regular Android. I have explained this problem many times on the Khadas forum.

 

The only reason I burned Ubuntu and not Android was because the Ubuntu build was newer and I was hoping that the latest u-boot patches was present. For me it doesn't really matter as I'm regardless going to install Armbian to eMMC and never use either Ubuntu or Android. Thanks for the tip btw:)

 

I'll burn the next Android build when it arrive to see if RAM is increased. How much available RAM do you have with the build you are testing on your VIM3?

Link to comment
Share on other sites

31 minutes ago, Z11ntal33r said:

I'll burn the next Android build when it arrive to see if RAM is increased. How much available RAM do you have with the build you are testing on your VIM3?

root@aml:~# free -m
              total        used        free      shared  buff/cache   available
Mem:           3353         796        1947          67         609        2414
Swap:          1023           0        1023

 

IMHO for the maximum size of available memory can be used u-boot-2019 (it can be installed in eMMC) and specially optimized DTB (with minimal memory reserves for video and other things). But while u-boot-2019 for VIM3 is not in the public domain (it is, but not for General use :) ).

Link to comment
Share on other sites

17 hours ago, balbes150 said:

According to the log, the kernel panic is caused by the absence of eMMC. You can try to change the DTB and remove the partition from eMMC (infu how to do this look in this and neighboring topics).

@balbes150 I tried to remove everything related to emmc in the dtb file, but the kernel still panics. I think next thing to do should be to remove emmc from the uboot parameters. I posted the bootlog. Thankyou

bootlog3.txt

Link to comment
Share on other sites

I want to test some features with diff. kernels and create a custom image.

 

I compiled an image with https://github.com/chewitt/linux/tree/linux-5.1-amlgx. The process finished successfully and the image was created properly. 

I copied the DTB binary file ( meson-gxl-s905d-ki-plus.dtb my device ) into dtb folder and modified uEnv.ini, but the device doesn't start, it is always rebooting.

 

Did I skip any step? Any advice?

 

Thanks in advance

Link to comment
Share on other sites

On 8/12/2018 at 10:19 AM, balbes150 said:

Install Armbian to eMMC.

1. Be sure to activate multi-boot using the new image. If multiboot previously activated is required to repeat activation using files in a new image.

2. Run Armbian from external media, run "ddbr" and create full backup eMMC.

3. Execute script “/boot/create-mbr-linux.sh”

4. and install Armbian on eMMC execute script “/root/install.sh”.

 

Please note, this is a test installation, which was tested only on a few models. Possible errors (Armbian will not boot) when you are working on unverified models which used non-standard distribution of partitions in the eMMC. Therefore, be sure to back up the "ddbr" utility before running the scripts.

 

I followed the instructions and moved the installation to the eMMC on my amlogic s905w tanix tx3 mini tv box (except for running /boot/create-mbr-linux.sh, since the file is not there, and install.sh seemed to create the partitions in any case). Thank you so much, @balbes150.

 

The first partition (the FAT) one seems to leave some empty space (about 700mb) before it. Is this by design? Does uboot need that much space?

 

 

 

Link to comment
Share on other sites

Is this https://forum.armbian.com/topic/7913-nanopi-k2-microsd-error/ patch included in latest version? I have exactly same problem with this samsung microsd card.  I was using version 5.37 and I didn't see there any problems with this card.

Link to comment
Share on other sites

On 8/25/2019 at 10:36 PM, balbes150 said:

Pay attention. The multi-boot scripts have been updated, I recommend to re-activate the multi-boot using the new scripts. In the scripts added ability to run Android without removing the external media Armbian. To do this in the first section of the external media (/boot) to create an empty file boot_android. If you have this file, each time you restart, either the external system or Android from eMMC will start in turn. To disable this mode, you need to delete the file boot_android external media.

Dear @balbes150

Thank you. I followed your instruction and sound worked correctly.

Link to comment
Share on other sites

Will this work on a GT-King ? if so, which DTB is needed? I tried all the G12x DTBs and none of them seem to work.

Edit: this is the UART log

 

reading /dtb/meson-g12b-odroid-n2.dtb
43263 bytes read in 11 ms (3.8 MiB/s)
[rsvmem] get fdtaddr NULL!
rsvmem - reserve memory

Usage:
rsvmem check                   - check reserved memory
rsvmem dump                    - dump reserved memory

rsvmem check failed
## Loading init Ramdisk from Legacy Image at 13000000 ...
   Image Name:   uInitrd
   Image Type:   AArch64 Linux RAMDisk Image (gzip compressed)
   Data Size:    7990726 Bytes = 7.6 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
Start read misc partition datas!
info->magic =
info->version_major = 1
info->version_minor = 0
info->slots[0].priority = 15
info->slots[0].tries_remaining = 7
info->slots[0].successful_boot = 0
info->slots[1].priority = 14
info->slots[1].tries_remaining = 7
info->slots[1].successful_boot = 0
info->crc32 = -1075449479
active slot = 0
active_slot is normal
load dtb from 0x1000000 ......
      Amlogic multi-dtb tool
      Single dtb detected
## Flattened Device Tree blob at 01000000
   Booting using the fdt blob at 0x1000000
find 1 dtbos
No androidboot.dtbo_idx configured
And no dtbos will be applied
libfdt fdt_path_offset() returned FDT_ERR_NOTFOUND
[rsvmem] fdt get prop fail.
   Loading Ramdisk to 7f061000, end 7f7ffdc6 ... OK
   Loading Device Tree to 000000001fff2000, end 000000001ffff9b4 ... OK

Starting kernel ...

uboot time: 6934369 us

 

Edited by niabi
Link to comment
Share on other sites

On 8/25/2019 at 10:20 PM, balbes150 said:

The new version Armbiam 20190825 kernel 5.3.0. In this version the temperature display on G12 works.

For reasons not yet clear, the G12 has a conflict with this kernel with PULSEAUDIO. To turn the sound on models with G12 (s905x2 S922x a311d) you need to perform these steps.

1. Remove package "pulseaudio".

2. Reboot the system.

3. Once run the command "sudo /root/g12_sound.sh".

When you remove the pulseaudio package, not volume control.

Alternatively, you can install the "pnmixer" package that works with ALSA.

 

Khadas VIM3 and Ugoos AM6

Full-screen 1080p video playback from Youtube (Chromium) to works at a temperature no higher than 55 (without a fan). :)

 

 

 

Armbian_5.94_Aml-g12_Ubuntu_bionic_next_5.3.0-rc6-next-20190827_desktop

No hdmi sound with my s905 either

20190825 was ok

 

...20190901 fixed it :) thanks

Link to comment
Share on other sites

On 8/26/2019 at 11:34 AM, Pietrotti97 said:

@balbes150 I tried to remove everything related to emmc in the dtb file, but the kernel still panics. I think next thing to do should be to remove emmc from the uboot parameters. I posted the bootlog. Thankyou

bootlog3.txt 20.18 kB · 8 downloads

@balbes150 I tried via cli to remove the emmc variable from Uboot but I found no option for it. Next I tried to download one of the newer debian versions but no one seems to boot, via UART uboot doesn't start. Can You help me ? Thankyou.

Link to comment
Share on other sites

3 hours ago, niabi said:

Thank you for the reply, is there any particular reason?

The box is a completely mess. Just read up on different forums about ppl whom have plenty of problems with one thing or the other. In addition, it's an oven with temperatures around 70C without stress testing and it's thermal throttling and reducing cpu frequency in the manner of how often people breath...  I'm sad to say that you get what you pay for :/ 

Link to comment
Share on other sites

1 hour ago, Z11ntal33r said:

The box is a completely mess. Just read up on different forums about ppl whom have plenty of problems with one thing or the other. In addition, it's an oven with temperatures around 70C without stress testing and it's thermal throttling and reducing cpu frequency in the manner of how often people breath...  I'm sad to say that you get what you pay for :/ 

I know that, which is why I wanted to turn it into a headless server using Armbian, right now I have it running Emby server with Android, works really well  but I would rather not use android at all

Link to comment
Share on other sites

 

16 hours ago, Pietrotti97 said:

I tried via cli to remove the emmc variable from Uboot but I found no option for it. Next I tried to download one of the newer debian versions but no one seems to boot, via UART uboot doesn't start. Can You help me ? Thankyou.

All new G12 images have a different u-boot version (for g12b models). To run on your hardware, you need to burn the old image and then manually replace all the files from the new image in both (BOOT ROOTFS) sections of the Sd card.

 

12 hours ago, niabi said:

is there any particular reason?

I don't have this equipment.

 

 

Link to comment
Share on other sites

8 hours ago, balbes150 said:

 

I don't have this equipment.

 

 

Is there any way I could help with making it work ? it seems a dtb might be all that its needed since it is working already on other s922x devices.

Link to comment
Share on other sites

On 8/26/2019 at 10:51 AM, serat said:

 

I followed the instructions and moved the installation to the eMMC on my amlogic s905w tanix tx3 mini tv box (except for running /boot/create-mbr-linux.sh, since the file is not there, and install.sh seemed to create the partitions in any case). Thank you so much, @balbes150.

 

The first partition (the FAT) one seems to leave some empty space (about 700mb) before it. Is this by design? Does uboot need that much space?

 

 

 

Hi, @balbes150

If possible, can you please answer why the first FAT partition has 700 mb empty before it? Will I brick my uboot if I change it to something smaller, say 16mb or something.

 

Also, I tried to follow the variety of answers on getting amlogic s905w tanix tx3 mini's wifi. Has anyone managed to get it working?

 

Thank you

 

  

Link to comment
Share on other sites

On 9/3/2019 at 5:41 PM, niabi said:

Is there any way I could help with making it work ? it seems a dtb might be all that its needed since it is working already on other s922x devices.

You will help if you create DTS and all the necessary kernel drivers for this model and send these patches to the main kernel. When these patches are included in the main kernel, there will be support for your model.

 

On 9/4/2019 at 3:27 AM, serat said:

If possible, can you please answer why the first FAT partition has 700 mb empty before it? Will I brick my uboot if I change it to something smaller, say 16mb or something.

I have answered this question many times. Look for this info in the topics in this section.

 

 

 

To all

Image update 5.95 20190904.

Link to comment
Share on other sites

Recently I found out that userspace programs cannot allocate memory beyond 900MB for some reason. The box has 2GB of ram, but no matter what I do, the ram usage (observed in htop) will be capped at about 900MB. The disk cache can use the memory beyond 900MB, but user programs can't. I've tried opening a large amount of tabs in Chromium or Firefox, stress-ng --vm, none of them can utilize the memory beyond 900MB and will simply act like the system has ran out of memory.

 

Note that I needed to turn off the zram swap or my system will freeze if it uses more than 1GB of ram. I can reliably reproduce this issue on the latest Armbian_5.95_Aml-g12_Ubuntu_disco_default_5.3.0-rc6_desktop_20190904 image available on your yandex disk. I'm completely out of ideas now, could you please explain what's going on with the memory issue?

 

Update:
I checked the device tree file and found this:

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

/proc/meminfo also says "CmaTotal:         917504 kB", so basically this chunk is reserved and can't be used by normal user programs? Why is it reserved like this? I've tried removing this range, and userspace programs are suddenly able to utilize more than 900MB of ram now. Even without that range in the device tree, CmaTotal is still around 256MB, since the kernel is compiled with `CONFIG_CMA_SIZE_MBYTES=256`.

Link to comment
Share on other sites

2 hours ago, qstaq said:

@utgf I have just gone through this problem with some S905 boxes. The problem was not the DTB (though changing it did give me a little extra usable RAM), the problem was with legacy u-boot

 

 

 

Thanks for pointing me to the right direction, but sadly I can't make get the mainline u-boot to work. Everything I do seems to lead to the same "Synchronous Abort" handler error.

Link to comment
Share on other sites

9 hours ago, utgf said:

 

Thanks for pointing me to the right direction, but sadly I can't make get the mainline u-boot to work. Everything I do seems to lead to the same "Synchronous Abort" handler error.

Have you tried libretech u-boot? It worked for me on S905x/w/x2 devices. I used balbes150 AMLG12 armbian build and then chainloaded The libretech u-boot from the AML u-boot

 

https://github.com/libre-computer-project/libretech-u-boot

Link to comment
Share on other sites

Hi, @balbes150

 

I want to use dkms to build the kernel modules I need. However, there is a problem with the linux-headers-aml-g12 package (at least for Debian Buster), where for some reason the scripts are built for x86_64.

 

root@aml:~# file /usr/src/linux-headers-5.3.0-rc6-aml-g12/scripts/mod/modpost
/usr/src/linux-headers-5.3.0-rc6-aml-g12/scripts/mod/modpost: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=37623a5bbaf64b5e167da1f3a2cf2e0e3aade20f, for GNU/Linux 3.2.0, not stripped
 

Actually, there are 15 files in scripts directory with x86-64 arch (find /usr/src/linux-headers-5.3.0-rc6-aml-g12/scripts/ -name '*'|xargs file|grep x86-64).

 

 

Could you please compile the scripts for the aarch64 architecture and rebuild this package?

Link to comment
Share on other sites

1 hour ago, Petr Fedchenkov said:

Could you please compile the scripts for the aarch64 architecture and rebuild this package?

 

Try:
cd /usr/src/linux-headers-5.3.0-rc6-aml-g12/

make scripts

Link to comment
Share on other sites

39 minutes ago, Igor said:

 

Try:
cd /usr/src/linux-headers-5.3.0-rc6-aml-g12/

make scripts

 

Thank you for answer.

Unfortunately, it doesn`t work (and no desire to do this manually after installing the package). 

 

root@aml:/usr/src/linux-headers-5.3.0-rc6-aml-g12# make scripts
arch/arm64/Makefile:56: CROSS_COMPILE_COMPAT not defined or empty, the compat vDSO will not be built
  HOSTCC  scripts/selinux/genheaders/genheaders
scripts/selinux/genheaders/genheaders.c:18:10: fatal error: classmap.h: No such file or directory
 #include "classmap.h"
          ^~~~~~~~~~~~
compilation terminated.
make[3]: *** [scripts/Makefile.host:90: scripts/selinux/genheaders/genheaders] Error 1
make[2]: *** [scripts/Makefile.build:497: scripts/selinux/genheaders] Error 2
make[1]: *** [scripts/Makefile.build:497: scripts/selinux] Error 2
make: *** [Makefile:1097: scripts] Error 2
 

 

 

But in a cloned repo from git it works, and I have already compiled a number of modules using files from git (for Ceph storage). But, for me the main problem is the lack of automation (I want to use dkms for building modules after kernel update), i.e. linux-headers seem to be attached, but they do not work properly.

 

 

 

Link to comment
Share on other sites

8 hours ago, Petr Fedchenkov said:

but in a cloned repo from git it works, and I have already compiled a number of modules using files from git (for Ceph storage). But, for me the main problem is the lack of automation (I want to use dkms for building modules after kernel update), i.e. linux-headers seem to be attached, but they do not work properly.


- selinux is(was?) broken on several kernels and workaround is to disable it. Then headers are compiled properly. I have seen this before, but in general fixing isssues with resources we have can easily take years.

- dkms had troubles in the past and here is the same. Deep investigation is needed.

- you are running bleeding edge kernel. Things will not work smoothly. You need to add a lot more work to get there.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines