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

Tracking: my patchset vs. mainline #4

Closed
wants to merge 28 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
34adc67
github: setup CI workflow configurations
paralin Aug 8, 2020
9300b85
.github: add per-branch upstream file
paralin Aug 20, 2020
3225cc4
github: add additional packages to defconfig
paralin Aug 8, 2020
5088f82
Revert "package/systemd: bump version to 246"
paralin Aug 12, 2020
2ae2d2a
Revert "toolchain-external: update Arm AArch64 BE toolchain 9.2-2019.12"
paralin Jan 10, 2020
dc646bd
package/rngd: start rngd early in the boot process
paralin Jul 2, 2020
a4c8d54
package/tini: install docker-init symlink if not exists
paralin Jul 19, 2020
f11059f
package/docker-proxy: bump to feeff4
paralin Jan 10, 2020
95bef0e
package/linux-firmware: bump to version 20200817
paralin Jun 5, 2020
6170f2e
package/linux-firmware: add support for nvidia files
paralin Jun 6, 2020
5e49b65
package/rpi-firmware: bump to latest working rev
paralin Aug 2, 2020
97e8acb
package/nvidia-modprobe: new package
paralin Aug 1, 2020
0216656
package/linux4tegra: new package
paralin Aug 1, 2020
1fc14d0
package/nvidia-container-runtime: new package
paralin Aug 1, 2020
b0a2886
package/libnvidia-container: new package
paralin Aug 1, 2020
157ec60
package/nvidia-container-toolkit: new package
paralin Aug 1, 2020
53a5132
configs/jetsontx2_defconfig: new nvidia jetson tx2 defconfig
paralin Aug 1, 2020
8bfcff3
package/go: implement go modules integration
paralin Mar 16, 2019
47a3670
package/runc: remove unnecessary workspace identifier
paralin Dec 5, 2019
c08195f
package/docker-containerd: fix go-module package identifier/targets
paralin Dec 5, 2019
31b8267
package/docker-engine: fix go-module package identifier
paralin Dec 5, 2019
4607ab4
package/docker-cli: fix go-module package identifier
paralin Dec 5, 2019
7123e81
package/docker-proxy: fix go-module package identifier
paralin Dec 7, 2019
7db717e
package/mender-artifact: fix go-module package build target
paralin Aug 13, 2020
dc5f8dd
package/delve: new package
paralin Dec 16, 2019
227670e
[WIP] package/rpi-userland: add support for aarch64 build
paralin Aug 18, 2020
bf8a92d
package/linux-firmware: add option for intel iwlwifi 22260
paralin Aug 20, 2020
7e18dfa
package/nvidia-driver: bump to 450.57 for 64 bit and 390.138 for x86
paralin Aug 23, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/buildroot-upstream
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
origin/upstream-master
59 changes: 59 additions & 0 deletions .github/workflows/buildroot-e2e.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: CI

# Controls when the action will run.
on:
push:
branches: [master, skiff, skiff-next]
pull_request:
branches: [skiff, skiff-next, upstream-master]

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# Steps represent a sequence of tasks
steps:
# Checks-out the repo under $GITHUB_WORKSPACE
- uses: actions/checkout@v2

- name: Cache build cache and downloads
uses: actions/cache@v2
env:
cache-name: cache-buildroot
with:
path: ~/br-cache/
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('Makefile') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-

# Detect changes vs upstream-master
- name: Detect changes vs upstream
run: |
cd $GITHUB_WORKSPACE
git fetch
export BUILDROOT_UPSTREAM=$(cat .github/buildroot-upstream)
echo "::set-env name=CHANGED_VS_UPSTREAM::$(git diff --diff-filter=ACM --name-only $BUILDROOT_UPSTREAM | xargs)"

# Run check-package on changed files
- name: Run check-package on all changed files and setup env
run: |
cd $GITHUB_WORKSPACE
./utils/check-package $CHANGED_VS_UPSTREAM

# Installing buildroot deps
- name: Install buildroot apt deps
run: |
sudo apt-get install -y libelf-dev

# Test a build
- name: Run a generic build
run: |
cd $GITHUB_WORKSPACE
make defconfig BR2_DEFCONFIG=$(pwd)/.github/workflows/buildroot-e2e_defconfig
make -s all legal-info BR2_CCACHE_DIR=${HOME}/br-cache/ccache BR2_DL_DIR=${HOME}/br-cache/dl

120 changes: 120 additions & 0 deletions .github/workflows/buildroot-e2e_defconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
BR2_x86_64=y
BR2_x86_core_avx2=y
BR2_CCACHE=y
BR2_OPTIMIZE_FAST=y
BR2_TOOLCHAIN_BUILDROOT_GLIBC=y
BR2_TOOLCHAIN_BUILDROOT_CXX=y
BR2_GCC_ENABLE_LTO=n
BR2_INIT_SYSTEMD=y
# BR2_TARGET_ENABLE_ROOT_LOGIN is not set
BR2_SYSTEM_BIN_SH_BASH=y
BR2_ENABLE_LOCALE_WHITELIST="C en_US en_US.UTF-8"
BR2_GENERATE_LOCALE="en_US.UTF-8"
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_DEFCONFIG="x86_64"
BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y
BR2_PACKAGE_BZIP2=y
BR2_PACKAGE_GZIP=y
BR2_PACKAGE_LZ4=y
BR2_PACKAGE_UNZIP=y
BR2_PACKAGE_XZ=y
BR2_PACKAGE_ZIP=y
BR2_PACKAGE_LSOF=y
BR2_PACKAGE_BINUTILS=y
BR2_PACKAGE_GREP=y
BR2_PACKAGE_E2FSPROGS=y
BR2_PACKAGE_E2FSPROGS_RESIZE2FS=y
BR2_PACKAGE_MMC_UTILS=y
BR2_PACKAGE_LINUX_FIRMWARE=y
BR2_PACKAGE_LINUX_FIRMWARE_AMDGPU=y
BR2_PACKAGE_LINUX_FIRMWARE_I915=y
BR2_PACKAGE_LINUX_FIRMWARE_NVIDIA=y
BR2_PACKAGE_LINUX_FIRMWARE_RADEON=y
BR2_PACKAGE_LINUX_FIRMWARE_ATHEROS_6002=y
BR2_PACKAGE_LINUX_FIRMWARE_ATHEROS_6003=y
BR2_PACKAGE_LINUX_FIRMWARE_ATHEROS_6004=y
BR2_PACKAGE_LINUX_FIRMWARE_ATHEROS_7010=y
BR2_PACKAGE_LINUX_FIRMWARE_ATHEROS_9170=y
BR2_PACKAGE_LINUX_FIRMWARE_ATHEROS_9271=y
BR2_PACKAGE_LINUX_FIRMWARE_BRCM_BCM43XX=y
BR2_PACKAGE_LINUX_FIRMWARE_BRCM_BCM43XXX=y
BR2_PACKAGE_LINUX_FIRMWARE_RALINK_RT61=y
BR2_PACKAGE_LINUX_FIRMWARE_RALINK_RT73=y
BR2_PACKAGE_LINUX_FIRMWARE_RALINK_RT2XX=y
BR2_PACKAGE_LINUX_FIRMWARE_RTL_81XX=y
BR2_PACKAGE_LINUX_FIRMWARE_RTL_87XX=y
BR2_PACKAGE_LINUX_FIRMWARE_RTL_88XX=y
BR2_PACKAGE_I2C_TOOLS=y
BR2_PACKAGE_LM_SENSORS=y
BR2_PACKAGE_LM_SENSORS_FANCONTROL=y
BR2_PACKAGE_LSHW=y
BR2_PACKAGE_LSSCSI=y
BR2_PACKAGE_POWERTOP=y
BR2_PACKAGE_RNG_TOOLS=y
BR2_PACKAGE_SPI_TOOLS=y
BR2_PACKAGE_USBUTILS=y
BR2_PACKAGE_LIBZIP=y
BR2_PACKAGE_LZO=y
BR2_PACKAGE_CA_CERTIFICATES=y
BR2_PACKAGE_LIBSSH=y
BR2_PACKAGE_LIBSSH2=y
BR2_PACKAGE_LIBFUSE=y
BR2_PACKAGE_LIBCURL=y
BR2_PACKAGE_LIBCURL_CURL=y
BR2_PACKAGE_CRDA=y
BR2_PACKAGE_ETHTOOL=y
BR2_PACKAGE_IPUTILS=y
BR2_PACKAGE_IW=y
BR2_PACKAGE_NETWORK_MANAGER=y
BR2_PACKAGE_NTP=y
BR2_PACKAGE_NTP_NTPDATE=y
BR2_PACKAGE_NTP_NTPDC=y
BR2_PACKAGE_NTP_NTPQ=y
BR2_PACKAGE_OPENSSH=y
BR2_PACKAGE_RSYNC=y
BR2_PACKAGE_WGET=y
BR2_PACKAGE_WIREGUARD_TOOLS=y
BR2_PACKAGE_WPA_SUPPLICANT=y
BR2_PACKAGE_WPA_SUPPLICANT_AP_SUPPORT=y
BR2_PACKAGE_WPA_SUPPLICANT_EAP=y
BR2_PACKAGE_WPA_SUPPLICANT_HOTSPOT=y
BR2_PACKAGE_WPA_SUPPLICANT_WPS=y
BR2_PACKAGE_WPA_SUPPLICANT_CLI=y
BR2_PACKAGE_WPA_SUPPLICANT_WPA_CLIENT_SO=y
BR2_PACKAGE_WPA_SUPPLICANT_PASSPHRASE=y
BR2_PACKAGE_WPA_SUPPLICANT_DBUS=y
BR2_PACKAGE_FILE=y
BR2_PACKAGE_TINI=y
BR2_PACKAGE_COREUTILS=y
BR2_PACKAGE_DOCKER_CLI=y
BR2_PACKAGE_DOCKER_CLI_STATIC=y
BR2_PACKAGE_DOCKER_ENGINE_EXPERIMENTAL=y
# BR2_PACKAGE_SYSTEMD_NETWORKD is not set
# BR2_PACKAGE_SYSTEMD_RESOLVED is not set
# BR2_PACKAGE_SYSTEMD_TIMEDATED is not set
# BR2_PACKAGE_SYSTEMD_TIMESYNCD is not set
BR2_PACKAGE_UTIL_LINUX_CHFN_CHSH=y
BR2_PACKAGE_UTIL_LINUX_FALLOCATE=y
BR2_PACKAGE_UTIL_LINUX_KILL=y
BR2_PACKAGE_UTIL_LINUX_LINE=y
BR2_PACKAGE_UTIL_LINUX_LOGIN=y
BR2_PACKAGE_UTIL_LINUX_MORE=y
BR2_PACKAGE_UTIL_LINUX_NEWGRP=y
BR2_PACKAGE_UTIL_LINUX_RFKILL=y
BR2_PACKAGE_UTIL_LINUX_SETPRIV=y
BR2_PACKAGE_UTIL_LINUX_SU=y
BR2_PACKAGE_VIM=y
# BR2_PACKAGE_VIM_RUNTIME is not set
BR2_TARGET_ROOTFS_CPIO=y
BR2_TARGET_ROOTFS_CPIO_GZIP=y
# BR2_TARGET_ROOTFS_TAR is not set
BR2_TARGET_GRUB2=y
BR2_TARGET_GRUB2_X86_64_EFI=y
BR2_TARGET_GRUB2_BUILTIN_MODULES="boot linux ext2 fat squash4 part_msdos part_gpt normal efi_gop chain"
BR2_TARGET_GRUB2_INSTALL_TOOLS=y
BR2_PACKAGE_HOST_DOSFSTOOLS=y
BR2_PACKAGE_HOST_GENEXT2FS=y
BR2_PACKAGE_HOST_GENIMAGE=y
BR2_PACKAGE_HOST_JQ=y
BR2_PACKAGE_HOST_MTOOLS=y
BR2_PACKAGE_HOST_PARTED=y
1 change: 1 addition & 0 deletions board/jetsontx2
85 changes: 85 additions & 0 deletions board/nvidia/readme.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
NVIDIA Jetson TX2

Intro
=====

This configuration adds support for the Jetson TX2 devkit. It should be
compatible with the other Jetson-series boards as well, but has not yet been
tested. (Other boards include the tx2i, nano...)

Building
========

Configure Buildroot
-------------------

For Jetson TX2:

$ make jetsontx2_defconfig

Build the rootfs
----------------

You may now build your rootfs with:

$ make


Flashing
========

Once the build process is finished you will have the target binaries in the
output/images directory, with a symlink to linux4tegra.

Flashing to the internal eMMC is done by booting to the official recovery mode,
and flashing the system from there. The default factory-flashed TX2 is suitable.

There are a lot of cases where the TX2 will not boot properly unless all of the
peripherals are fully disconnected, power is disconnected, everything fully
resets, and then the power is introduced back again.

The recovery mode of the Jetson is used to flash. Entering recovery:

- Start with the machine powered off + fully unplugged.
- Plug in the device to power, and connect a HDMI display.
- Connect a micro-USB cable from the host PC to the target board.
- Power on the device by holding the start button until the red light is lit.
- Hold down the RST button and REC button simultaneously.
- Release the RST button while holding down the REC button.
- Wait a few seconds, then release the REC button.

To flash over USB:

```
cd output/images/linux4tegra
sudo bash ./flash.sh \
-I ../rootfs.ext2 \
-K ../Image \
-L ../u-boot-dtb.bin \
-C "ramdisk_size=100000 net.ifnames=0 elevator=deadline" \
-d ../tegra186-quill-p3310-1000-c03-00-base.dtb \
jetson-tx2-devkit mmcblk0p1
```

This will run the `flash.sh` script from L4T, and will setup the kernel, u-boot,
persist + boot-up partition mmcblk0p1. This may overwrite your existing work so
use it for initial setup only.

## Bootup Process

The TX2 and recent boards boot from the internal eMMC, at mmcblk0p1. The Jetson
Nano can boot to a SD card.

A "secure boot" process is used, with multiple bootloaders:

- BootROM -> MB1 (TrustZone)
- MB2/BPMP -> (Non-Trustzone)
- Cboot (uses Little Kernel)
- Uboot
- Kernel

Uboot is flashed to the mmcblk0p1 emmc partition.

Cboot could be compiled from source, and the source is available from the
official sources, however, we do not (yet) compile cboot.

52 changes: 52 additions & 0 deletions configs/jetsontx2_defconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
BR2_aarch64=y
BR2_cortex_a57=y

# enable specific optimizations
BR2_TARGET_OPTIMIZATION="-march=armv8-a+crypto -mcpu=cortex-a57+crypto"

# Toolchain reference: docs.nvidia.com: "Jetson Linux Driver Package Toolchain"
BR2_TOOLCHAIN_BUILDROOT_CXX=y
BR2_BINUTILS_VERSION_2_32_X=y

BR2_SYSTEM_DHCP="eth0"

# Linux headers same as kernel, a 4.9 series
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_9=y

BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_TARBALL=y
BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="$(call github,madisongh,linux-tegra-4.9,0be1a57448010ae60505acf4e2153638455cee7c)/linux-tegra-4.9.140-r1.tar.gz"
BR2_LINUX_KERNEL_DEFCONFIG="tegra"

# Build the DTB from the kernel sources
BR2_LINUX_KERNEL_DTS_SUPPORT=y
BR2_LINUX_KERNEL_INTREE_DTS_NAME="_ddot_/_ddot_/_ddot_/_ddot_/nvidia/platform/t18x/quill/kernel-dts/tegra186-quill-p3310-1000-c03-00-base"

BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y

BR2_PACKAGE_LINUX4TEGRA=y
BR2_PACKAGE_NVIDIA_CONTAINER_TOOLKIT=y

BR2_PACKAGE_LINUX_FIRMWARE=y
BR2_PACKAGE_LINUX_FIRMWARE_RTL_88XX=y

# Required tools to create the image
BR2_PACKAGE_HOST_DOSFSTOOLS=y
BR2_PACKAGE_HOST_JQ=y
BR2_PACKAGE_HOST_PARTED=y

# Filesystem / image
BR2_TARGET_ROOTFS_EXT2=y
BR2_TARGET_ROOTFS_EXT2_4=y
BR2_TARGET_ROOTFS_EXT2_SIZE="1024M"
# BR2_TARGET_ROOTFS_TAR is not set

# Uboot
BR2_TARGET_UBOOT=y
BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
BR2_TARGET_UBOOT_CUSTOM_TARBALL=y
BR2_TARGET_UBOOT_CUSTOM_TARBALL_LOCATION="$(call github,paralin,u-boot-tegra,e6da093be3cc593ef4294e1922b3391ede9c94da)/u-boot-tegra-e6da09.tar.gz"
BR2_TARGET_UBOOT_BOARD_DEFCONFIG="p2771-0000-500"
BR2_TARGET_UBOOT_NEEDS_DTC=y
BR2_TARGET_UBOOT_FORMAT_DTB_BIN=y

6 changes: 6 additions & 0 deletions package/Config.in
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ menu "Debugging, profiling and benchmark"
source "package/cache-calibrator/Config.in"
source "package/clinfo/Config.in"
source "package/dacapo/Config.in"
source "package/delve/Config.in"
source "package/dhrystone/Config.in"
source "package/dieharder/Config.in"
source "package/dmalloc/Config.in"
Expand Down Expand Up @@ -480,6 +481,7 @@ endmenu
source "package/libuio/Config.in"
source "package/linux-backports/Config.in"
source "package/linux-serial-test/Config.in"
source "package/linux4tegra/Config.in"
source "package/linuxconsoletools/Config.in"
source "package/lirc-tools/Config.in"
source "package/lm-sensors/Config.in"
Expand All @@ -500,6 +502,7 @@ endmenu
source "package/nanocom/Config.in"
source "package/neard/Config.in"
source "package/nvidia-driver/Config.in"
source "package/nvidia-modprobe/Config.in"
source "package/nvidia-tegra23/Config.in"
source "package/nvme/Config.in"
source "package/ofono/Config.in"
Expand Down Expand Up @@ -1508,6 +1511,7 @@ menu "Hardware handling"
source "package/libllcp/Config.in"
source "package/libmbim/Config.in"
source "package/libnfc/Config.in"
source "package/libnvidia-container/Config.in"
source "package/libpciaccess/Config.in"
source "package/libphidget/Config.in"
source "package/libpri/Config.in"
Expand Down Expand Up @@ -2382,6 +2386,8 @@ menu "System tools"
source "package/netifrc/Config.in"
source "package/numactl/Config.in"
source "package/nut/Config.in"
source "package/nvidia-container-runtime/Config.in"
source "package/nvidia-container-toolkit/Config.in"
source "package/openrc/Config.in"
source "package/openvmtools/Config.in"
source "package/pamtester/Config.in"
Expand Down
18 changes: 18 additions & 0 deletions package/delve/Config.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
config BR2_PACKAGE_DELVE
bool "delve"
depends on BR2_PACKAGE_HOST_GO_TARGET_ARCH_SUPPORTS
depends on BR2_PACKAGE_HOST_GO_TARGET_CGO_LINKING_SUPPORTS
depends on BR2_TOOLCHAIN_HAS_THREADS
depends on BR2_TOOLCHAIN_USES_GLIBC # go, cgo
depends on !BR2_TOOLCHAIN_USES_UCLIBC # go
depends on BR2_USE_MMU # go
help
Delve is a debugger for the Go programming language.

https://github.com/go-delve/delve

comment "delve needs a glibc toolchain w/ threads"
depends on BR2_PACKAGE_HOST_GO_TARGET_ARCH_SUPPORTS
depends on BR2_PACKAGE_HOST_GO_TARGET_CGO_LINKING_SUPPORTS
depends on !BR2_TOOLCHAIN_HAS_THREADS || !BR2_TOOLCHAIN_USES_GLIBC
depends on BR2_USE_MMU
3 changes: 3 additions & 0 deletions package/delve/delve.hash
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Locally calculated
sha256 6d9da41a18905c9819e33f475bf911facba1297674d2312ab5d7e2488fac685a delve-1.4.1.tar.gz
sha256 778864b990007e8cef6633f8c372dd05bac1fada6cf67b008afb1483f83b38f5 LICENSE
Loading