Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Odroid_C2: Switch to linux-amlogic #744

Merged
merged 7 commits into from Sep 27, 2016

Conversation

@Kwiboo
Copy link
Member

commented Sep 17, 2016

This will make Odroid C2 use LE's linux-amlogic and use similar patches as WeTek Hub.

Kernel config changes need review, my goal was to limit difference between C2 and WH.

This is still in early stage but needs to be tested by more people.

Copy link
Contributor

left a comment

kernel changes look good to me if runtime tested.

there are unrelated stuff enabled, that not much people may use (xfs/jfs/reiserfs/watchdog etc) but it's good to have them in sync with other projects.


#
# Generic Driver Options
#
CONFIG_UEVENT_HELPER_PATH=""
CONFIG_UEVENT_HELPER_PATH="/sbin/mdev"

This comment has been minimized.

Copy link
@stefansaraev

stefansaraev Sep 17, 2016

Contributor

this one is fine as "", LE does not use uevent helper.

CONFIG_DEVTMPFS=y
CONFIG_DEVTMPFS_MOUNT=y
CONFIG_STANDALONE=y
CONFIG_PREVENT_FIRMWARE_BUILD=y
CONFIG_FW_LOADER=y
CONFIG_FIRMWARE_IN_KERNEL=y
CONFIG_EXTRA_FIRMWARE=""
# CONFIG_FW_LOADER_USER_HELPER is not set
CONFIG_FW_LOADER_USER_HELPER=y

This comment has been minimized.

Copy link
@stefansaraev

stefansaraev Sep 17, 2016

Contributor

this is not used and should be disabled.

@@ -1207,14 +1231,19 @@ CONFIG_MTD_NAND=y
# LPDDR flash memory drivers
#
# CONFIG_MTD_LPDDR is not set
# CONFIG_MTD_UBI is not set
CONFIG_MTD_UBI=y

This comment has been minimized.

Copy link
@stefansaraev

stefansaraev Sep 17, 2016

Contributor

not sure if this has use case on odroids, but does not harm.

CONFIG_SQUASHFS_FILE_CACHE=y
# CONFIG_SQUASHFS_FILE_DIRECT is not set
CONFIG_SQUASHFS_DECOMP_SINGLE=y
# CONFIG_SQUASHFS_FILE_CACHE is not set

This comment has been minimized.

Copy link
@stefansaraev

stefansaraev Sep 17, 2016

Contributor

keeping squashfs as it was is better, imo. but that's personal opinion

This comment has been minimized.

Copy link
@kszaq

kszaq Sep 19, 2016

Contributor

@stefansaraev Why do you prefer FILE_CACHE over FILE_DIRECT? I'm curious if you've seen performance benefits from the former?

@CvH CvH added the HARDWARE label Sep 17, 2016
@lrusak

This comment has been minimized.

Copy link
Member

commented Sep 17, 2016

Can the fixup kernel patches be applied to the linux-amlogic repo instead?

@@ -123,18 +125,19 @@ CONFIG_RD_GZIP=y
# CONFIG_RD_BZIP2 is not set
# CONFIG_RD_LZMA is not set
# CONFIG_RD_XZ is not set
# CONFIG_RD_LZO is not set
CONFIG_RD_LZO=y

This comment has been minimized.

Copy link
@stefansaraev

stefansaraev Sep 17, 2016

Contributor

not needed

CONFIG_EMBEDDED=y
CONFIG_HAVE_PERF_EVENTS=y
CONFIG_PERF_USE_VMALLOC=y

#
# Kernel Performance Events And Counters
#
# CONFIG_PERF_EVENTS is not set
# CONFIG_VM_EVENT_COUNTERS is not set
CONFIG_PERF_EVENTS=y

This comment has been minimized.

Copy link
@stefansaraev

stefansaraev Sep 17, 2016

Contributor

any reason for this?

# CONFIG_MINIX_SUBPARTITION is not set
# CONFIG_SOLARIS_X86_PARTITION is not set
# CONFIG_UNIXWARE_DISKLABEL is not set
CONFIG_LDM_PARTITION=y

This comment has been minimized.

Copy link
@stefansaraev

stefansaraev Sep 17, 2016

Contributor

windows users may want to attach their ntfs drives via usb enclosures. ldm should not be removed.

@@ -350,7 +339,10 @@ CONFIG_FORCE_MAX_ZONEORDER=11
#
# Boot options
#
CONFIG_CMDLINE=""
CONFIG_CMDLINE=" "

This comment has been minimized.

Copy link
@stefansaraev

stefansaraev Sep 17, 2016

Contributor

is this tested ?

CONFIG_AM_VDEC_H264_4K2K=y
CONFIG_AM_VDEC_H265=y
CONFIG_AM_VDEC_VP9=y
CONFIG_AM_VDEC_MJPEG=y
CONFIG_AM_ENCODER=y
# CONFIG_AM_JPEG_ENCODER is not set
CONFIG_AM_JPEG_ENCODER=y

This comment has been minimized.

Copy link
@stefansaraev

stefansaraev Sep 17, 2016

Contributor

this probably does nothing anyway.

@@ -1040,10 +1032,11 @@ CONFIG_TVIN_HDMI=y
# CONFIG_AM_VECM is not set
# CONFIG_AML_NAND is not set
CONFIG_AM_INPUT=y
# CONFIG_AM_SARADC is not set
CONFIG_AM_SARADC=y

This comment has been minimized.

Copy link
@stefansaraev

stefansaraev Sep 17, 2016

Contributor

I dont think we have sar adc on wh board.

@stefansaraev

This comment has been minimized.

Copy link
Contributor

commented Sep 17, 2016

meh. aaca684 changes wetek hub config. cc @codesnake

@Kwiboo Kwiboo referenced this pull request Sep 17, 2016
@Kwiboo Kwiboo force-pushed the Kwiboo:c2 branch from 9b90faf to 473b9ce Sep 17, 2016
@Kwiboo

This comment has been minimized.

Copy link
Member Author

commented Sep 17, 2016

@lrusak kernel patches have been sent to linux-amlogic

The kernel config changes causes issues as I have had a few kernel crashes today, some reboots on the C2 have halted with:

  • Unable to handle kernel paging request at virtual address 3000000000068d7
  • Unable to handle kernel NULL pointer dereference at virtual address 00000000
  • init[1]: undefined instruction: pc=ffffffc00111abc0
@wrxtasy

This comment has been minimized.

Copy link
Contributor

commented Sep 19, 2016

To note also. I'm getting Cross Compile Badness issues when compiling this version of libamcodec for C2:
https://github.com/LibreELEC/LibreELEC.tv/blob/master/packages/multimedia/libamcodec/package.mk#L29

I use a Codesnake supplied package that compiles without issues:
https://github.com/wrxtasy/LibreELEC.tv.7.0/blob/libreelec-7.1/packages/multimedia/libamcodec/package.mk#L29

@chewitt

This comment has been minimized.

Copy link
Member

commented Sep 19, 2016

@Kwiboo linux-amlogic changes are merged so please update hashes and rebase, thx

Kwiboo added 7 commits Sep 19, 2016
This moves aarch64 common patches to $PKG_DIR/patches/aarch64 until $DEVICE is supported
This makes Odroid C2 use linux-amlogic and similar linux patches as WeTek Hub
u-boot patch updated to allow overwriting env vars
boot.ini updated to reflect missing features in linux-amlogic
This adds support for setting max_freq and maxcpus bootargs
Also adds a patch for missing CEC wake-up code
@Kwiboo Kwiboo force-pushed the Kwiboo:c2 branch from 473b9ce to a3a662a Sep 19, 2016
@Kwiboo

This comment has been minimized.

Copy link
Member Author

commented Sep 19, 2016

This is now rebased and limits the number of kernel config changes.
Patches shared between WH and C2 have been moved to $PKG_DIR/patches/aarch64/.

@wrxtasy

This comment has been minimized.

Copy link
Contributor

commented Sep 20, 2016

I'm of the view that we should seriously think about re-doing the whole boot.ini file for the C2 and be done with it instead of constantly over patching in the update.sh script. Its not like we have a final release here yet anyways.

I've actually editted out a some junk into a nicer layout, and even that should be trimmed further I believe:
https://github.com/wrxtasy/LibreELEC.tv.7.0/blob/libreelec-7.1/projects/Odroid_C2/bootloader/boot.ini

Also for SoC heat and stability purposes we should stick with a hard and fast CPU Clock speed of 1.536GHz and not give LE C2 users the chance to mess with it, configured as such:

setenv odroidp2 "${disableuhs} consoleblank=0 max_freq=1536 maxcpus=4"

@lrusak

This comment has been minimized.

Copy link
Member

commented Sep 20, 2016

@wrxtasy I think the best thing to do with the boot.ini is to seperate stuff out for defaults and user defined options, if we can have a default boot.ini that we ship so that we can always make changes to it and a boot.ini that the user can add or change options. This way we can always have a good default for booting and that if the user messes something up then they just need to delete their custom boot.ini file and it will always boot.

@lrusak

This comment has been minimized.

Copy link
Member

commented Sep 27, 2016

I built this PR with jenkins and just tested and it seems to be working great to me 👍

@chewitt chewitt merged commit 521a42c into LibreELEC:master Sep 27, 2016
@Stane1983

This comment has been minimized.

Copy link

commented on 40cab05 Sep 29, 2016

Really?! Generalize basically Amlogic related patches to all aarch64 projects? I just don't get it...

This comment has been minimized.

Copy link
Member

replied Sep 29, 2016

@Stane1983 what's the issue here?

This comment has been minimized.

Copy link

replied Sep 29, 2016

Nothing really, for this repository as is it works just fine. It's just not right.... platform != architecture if you want. Call me crazy :)

@Kwiboo Kwiboo deleted the Kwiboo:c2 branch Oct 4, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
8 participants
You can’t perform that action at this time.