-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
uboot: init (firmwareOdroidC2/C4, ubootOdroidC4) Hardkernel's Odroid C4 and Odroid C2 board support, drop Armbian dependency #101454
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
Closed
Closed
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
85f95e3
maintainers: add aarapov
arapov d362b62
uboot: init (firmwareOdroidC2/C4) hardkernel's Odroid C2/C4 fw blobs
arapov b16b71e
uboot: init (ubootOdroidC4) Hardkernel's Odroid C4 board support
arapov 7a36dcb
uboot: (ubootOdroidC2) retire Armbian dependency
arapov c4294ff
uboot: (firmwareOdroidC2/C4) drop patches for 2021.01
arapov 65ac463
uboot: (firmwareOdroidC2/C4) switch fetchgit to fetchFromGitHub
arapov fe7cb7e
meson64-tools: init
arapov e219927
uboot: (ubootOdroidC4) use meson64-tools instead of aml_encrypt_g12a
arapov b38ab55
uboot: (firmwareOdroidC2/C4) oneline and sort list of files to install
arapov 10799d0
uboot: (firmwareOdroidC2/C4) use postPatch instead of prePatch
arapov 7cf5a0e
uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = […
arapov File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| { lib, stdenv, fetchFromGitHub, buildPackages }: | ||
|
|
||
| stdenv.mkDerivation rec { | ||
| pname = "meson64-tools"; | ||
| version = "unstable-2020-08-03"; | ||
|
|
||
| src = fetchFromGitHub { | ||
| owner = "angerman"; | ||
| repo = pname; | ||
| rev = "a2d57d11fd8b4242b903c10dca9d25f7f99d8ff0"; | ||
| sha256 = "1487cr7sv34yry8f0chaj6s2g3736dzq0aqw239ahdy30yg7hb2v"; | ||
| }; | ||
|
|
||
| buildInputs = with buildPackages; [ openssl bison yacc flex bc python3 ]; | ||
|
|
||
| preBuild = '' | ||
| patchShebangs . | ||
| substituteInPlace mbedtls/programs/fuzz/Makefile --replace "python2" "python" | ||
| substituteInPlace mbedtls/tests/Makefile --replace "python2" "python" | ||
| ''; | ||
|
|
||
| makeFlags = [ "PREFIX=$(out)/bin" ]; | ||
|
|
||
| meta = with lib; { | ||
| homepage = "https://github.com/angerman/meson64-tools"; | ||
| description = "Tools for Amlogic Meson ARM64 platforms"; | ||
| license = licenses.unfree; # https://github.com/angerman/meson64-tools/issues/2 | ||
| maintainers = with maintainers; [ aarapov ]; | ||
| }; | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,148 @@ | ||
| { stdenv | ||
| , lib | ||
| , fetchpatch | ||
| , fetchFromGitHub | ||
| , buildPackages | ||
| , pkgsCross | ||
| }: | ||
|
|
||
| let | ||
| buildHardkernelFirmware = { | ||
| version ? null | ||
| , src ? null | ||
| , name ? "" | ||
| , filesToInstall | ||
| , installDir ? "$out" | ||
| , defconfig | ||
| , extraMeta ? {} | ||
| , ... } @ args: stdenv.mkDerivation ({ | ||
| pname = "uboot-hardkernel-firmware-${name}"; | ||
|
|
||
| nativeBuildInputs = [ | ||
| buildPackages.git | ||
| buildPackages.hostname | ||
| pkgsCross.arm-embedded.stdenv.cc | ||
| ]; | ||
|
|
||
| depsBuildBuild = [ | ||
| buildPackages.gcc49 | ||
| ] ++ lib.optional (stdenv.buildPlatform != stdenv.hostPlatform) buildPackages.stdenv.cc | ||
| ++ lib.optional (!stdenv.isAarch64) pkgsCross.aarch64-multiplatform.buildPackages.gcc49; | ||
|
|
||
| makeFlags = [ | ||
| "CROSS_COMPILE=${stdenv.cc.targetPrefix}" | ||
arapov marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| "CROSS_COMPILE_32=${pkgsCross.arm-embedded.stdenv.cc.targetPrefix}" | ||
| "${defconfig}" "bl301.bin" | ||
| ] | ||
| ++ lib.optional (!stdenv.isAarch64) "CROSS_COMPILE=${pkgsCross.aarch64-multiplatform.stdenv.cc.targetPrefix}"; | ||
|
|
||
| installPhase = '' | ||
| mkdir -p ${installDir} | ||
| cp ${lib.concatStringsSep " " filesToInstall} ${installDir} | ||
| ''; | ||
|
|
||
| meta = with lib; { | ||
| homepage = "https://www.hardkernel.com/"; | ||
| description = "Das U-Boot from Hardkernel with Odroid embedded devices firmware and support"; | ||
| license = licenses.unfreeRedistributableFirmware; | ||
| maintainers = with maintainers; [ aarapov ]; | ||
| } // extraMeta; | ||
| } // removeAttrs args [ "extraMeta" ]); | ||
| preBuild = '' | ||
| substituteInPlace Makefile --replace "/bin/pwd" "pwd" | ||
| ''; | ||
| in { | ||
| inherit buildHardkernelFirmware preBuild; | ||
|
|
||
| firmwareOdroidC2 = buildHardkernelFirmware { | ||
| defconfig = "odroidc2_config"; | ||
| name = "firmware-odroid-c2"; | ||
| version = "2015.01"; | ||
| src = fetchFromGitHub { | ||
| owner = "hardkernel"; | ||
| repo = "u-boot"; | ||
| rev = "fac4d2da0a1b61dfdeaca0034a45151ff5983fb8"; | ||
| sha256 = "09s0y69ilrwnvqi1g11axsnhylq8kfljwqxdfjifa227mi0kzq37"; | ||
| }; | ||
|
|
||
| patches = [ # https://wiki.odroid.com/odroid-c2/software/building_u-boot | ||
| (fetchpatch { | ||
| url = "https://github.com/hardkernel/u-boot_firmware/commit/5ce504067bb83de03d17173d5585e849df5d5a33.patch"; | ||
| sha256 = "0m9slsv7lwm2cf2akmx1x6mqzmfckrvw1r0nls91w6g40982qwly"; | ||
| }) | ||
| (fetchpatch { | ||
| url = "https://github.com/hardkernel/u-boot_firmware/commit/0002fa877ca919e808e5fb7675194f17abde5d8d.patch"; | ||
| sha256 = "0hr6037xl69v9clch8i3vr80vgfn453wcvza630mzifkkn2d1fh8"; | ||
| }) | ||
| (fetchpatch { | ||
| url = "https://github.com/hardkernel/u-boot_firmware/commit/b129006d2bdd0aee3bc78593f9401b0873e6baf9.patch"; | ||
| sha256 = "1bj7mb6h8njpvimjbjgv801ay97gwdgg9cd1hlv39fwqvv1nzfir"; | ||
| }) | ||
| (fetchpatch { | ||
| url = "https://github.com/hardkernel/u-boot_firmware/commit/d3642b8329a605f641046cf25aeba935fa2f06dc.patch"; | ||
| sha256 = "0iw06zvw8407s3r3n6v89z6jj8r6lwy0qm1izhf815qi3wxh55pq"; | ||
| }) | ||
| (fetchpatch { | ||
| url = "https://github.com/hardkernel/u-boot_firmware/commit/911ab14f86b7c820aa3fe310b7eb7be0398292b1.patch"; | ||
| sha256 = "1sq4mynw6iivx2xm0hp55x7r58bvfgav62d169q5mwgi9imbv6kg"; | ||
| }) | ||
| (fetchpatch { | ||
| url = "https://github.com/hardkernel/u-boot_firmware/commit/b7b90c1099b057d35ebae886b7846b5d9bfb4143.patch"; | ||
| sha256 = "17x5fc2rphgz6jybya7yk35j4h9iq0b7cnq2qhkq3lpw2060ldlg"; | ||
| }) | ||
| ]; | ||
|
|
||
| preBuild = '' | ||
| substituteInPlace ./arch/arm/cpu/armv8/gxb/firmware/scp_task/Makefile \ | ||
| --replace "CROSS_COMPILE" "CROSS_COMPILE_32" | ||
| '' + preBuild; | ||
|
|
||
| filesToInstall = [ | ||
| "build/scp_task/bl301.bin" | ||
| "fip/gxb/bl2.package" | ||
| "fip/gxb/bl30.bin" | ||
| "sd_fuse/bl1.bin.hardkernel" | ||
| "sd_fuse/sd_fusing.sh" | ||
| ]; | ||
|
|
||
| extraMeta.platforms = [ "aarch64-linux" ]; | ||
arapov marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| }; | ||
|
|
||
| # https://wiki.odroid.com/odroid-c4/software/building_u-boot | ||
| firmwareOdroidC4 = buildHardkernelFirmware { | ||
| name = "firmware-odroid-c4"; | ||
| defconfig = "odroidc4_defconfig"; | ||
| version = "2015.01"; | ||
| src = fetchFromGitHub { | ||
| owner = "hardkernel"; | ||
| repo = "u-boot"; | ||
| rev = "90ebb7015c1bfbbf120b2b94273977f558a5da46"; | ||
| sha256 = "0kv9hpsgpbikp370wknbyj6r6cyhp7hng3ng6xzzqaw13yy4qiz9"; | ||
| }; | ||
|
|
||
| preBuild = '' | ||
| substituteInPlace ./arch/arm/cpu/armv8/g12a/firmware/scp_task/Makefile \ | ||
| --replace "CROSS_COMPILE" "CROSS_COMPILE_32" | ||
| '' + preBuild; | ||
|
|
||
| filesToInstall = [ | ||
| "build/board/hardkernel/odroidc4/firmware/acs.bin" | ||
| "build/scp_task/bl301.bin" | ||
| "fip/g12a/aml_ddr.fw" | ||
| "fip/g12a/bl2.bin" | ||
| "fip/g12a/bl30.bin" | ||
| "fip/g12a/bl31.img" | ||
| "fip/g12a/ddr3_1d.fw" | ||
| "fip/g12a/ddr4_1d.fw" | ||
| "fip/g12a/ddr4_2d.fw" | ||
| "fip/g12a/diag_lpddr4.fw" | ||
| "fip/g12a/lpddr3_1d.fw" | ||
| "fip/g12a/lpddr4_1d.fw" | ||
| "fip/g12a/lpddr4_2d.fw" | ||
| "fip/g12a/piei.fw" | ||
| "sd_fuse/sd_fusing.sh" | ||
| ]; | ||
|
|
||
| extraMeta.platforms = [ "aarch64-linux" ]; | ||
arapov marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| }; | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.