Skip to content

Commit

Permalink
LTS update for Buildroot and Linux Kernel
Browse files Browse the repository at this point in the history
This pull request updates:
  Buildroot2 to the 2019.02.6 (latest LTS) target
  Linux Kernel to the 4.14.146 (latest version in 4.14.x LTS tree) version
  Other incidental updates along the way (binutils 2.30.x, GCC 8.3.x)

A longer explanation of why this update and how to do further updates is
in README_LTS.txt.

This update addresses several issues with USB input handling in linuxpba,
support for AMD Ryzen 2xxx and 3xxx chips, and other minor items.

This pull request is explicitly under the GPL 3.0 license, as is implicitly
required by Github's latest "inbound = outbound" license updates as discussed:
  https://ben.balter.com/2018/01/02/why-you-probably-shouldnt-add-a-cla-to-your-open-source-project/
  https://help.github.com/articles/github-terms-of-service/#6-contributions-under-repository-license
As always, differing opinions are encouraged; c.f.
  https://writing.kemitchell.com/2018/01/06/CLAs-Are-Not-a-Sham.html

This pull request should apply as-is for most current "unofficial" source
trees as it only affects certain files, which should not conflict with most
other known patch sets:

	new file:   README_LTS.txt
	modified:   images/buildpbaroot
	modified:   images/buildroot/32bit/.config
	modified:   images/buildroot/32bit/kernel.config
	new file:   images/buildroot/32bit/local.mk
	modified:   images/buildroot/64bit/.config
	modified:   images/buildroot/64bit/kernel.config
	new file:   images/buildroot/64bit/local.mk
	modified:   images/conf
  • Loading branch information
oom-is committed Oct 14, 2019
1 parent 358cc75 commit 504f878
Show file tree
Hide file tree
Showing 9 changed files with 1,706 additions and 481 deletions.
74 changes: 74 additions & 0 deletions README_LTS.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
This patch to Drive-Trust-Alliance/sedutil provides the following updates:
- Update Buildroot2 to 2019.02.6 (latest LTS version as of 14 October).
- Update linux kernel version to 4.14.146 (4.14.x and 4.17.x are current LTS
release streams.)

The primary driving requirements for this were:
1. Move to an LTS kernel version with the expectation that this could
fix some issues with USB support in the linuxpba utility, as well as
providing better support for newer Intel and AMD chips (particularly
Ryzen 2xxx and 3xxx chips). ==> Yes, this update fixes those issues.
2. Move to a Linux kernel version that allows compilation with Gnu GCC 8
and supports the full set of Spectre/Meltdown fixes. For some of us
who might want to use SEDutil in an enterprise environment, it's
easier to be able to clearly state that Spectre fixes are present,
than to explain why there's really no attack surface from the older
Linux kernel
3. Move incrementally to the "next" Linux LTS kernel, rather than the
absolute newest, given that the 4.11.8 kernel was a much older vintage.

Along the way with Linux kernel updates, there were two other discoveries
that affected the final upgrade path:
A. It turns out Buildroot2 also has LTS versions, specifically the 20xx.02
releases are the LTS ones. My original selection was 2018.08 but that
turned into 2019.02 in order to get to an LTS buildroot.
B. As of 2018.11-rc1 SEDutil became an "official" part of Buildroot2 -
which means that when building newer Buildroot2 versions/targets, it
becomes necessary to override the Buildroot2 "official" source for
SEDutil with our own updated/customized tarball. (Otherwise we end
up with DTA SEDutil plus Buildroot2 patches but no other local
patches that might be intentional/needed...)

For anyone who wants to experiment with a newer Buildroot2 version or Linux
kernel version:
- Buildroot2 target version is determined by images/conf
Any changes to the Buildroot2 target version may require a new buildroot
.config file to be created. The actual files from the source tarball are
kept in images/buildroot/{32,64}bit/.config but making changes to them
should properly be done by:
execute "./buildpbaroot" the normal way from the images directory
cd scratch/buildroot/32bit
make menuconfig
[Make any changes as needed]
cd ../64bit
make menuconfig
[Again, make any changes as needed]
cd ..
make O=32bit
make O=64bit
[Now do whatever testing you believe is needed for the resulting
output]
[Once you're happy, make sure you save those new 32bit/.config
and 64bit/.config files somewhere, so you can use them again
in the future.]
- Linux kernel version is determined by a config line in the buildroot
.config files above; however updating to a newer Linux kernel may
require new kernel.config files. Changes of that sort can be
accomplished similar to what's shown above:
execute "./buildpbaroot" the normal way from the images directory
cd scratch/buildroot/32bit/build/linux-4.14.146
make menuconfig
[Make any changes as needed]
cd ../../../64bit/build/linux-4.14.146
make menuconfig
[Again, make any changes as needed]
cd ../../..
make O=32bit
make O=64bit
[Now do whatever testing you believe is needed for the resulting
output kernels]
[Once you're happy, make sure you save those new .config files
for 32bit and 64bit kernels somewhere as 32bit/kernel.config
and 64bit/kernel.config, so you can use them again
in the future.]

11 changes: 10 additions & 1 deletion images/buildpbaroot
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,16 @@ make dist
mkdir images/scratch/buildroot/dl/
cp sedutil-*.tar.gz images/scratch/buildroot/dl/
make distclean
cd images/scratch/buildroot

# Expand the distribution tarball so we can use it as the Buildroot override.
# Override location is specified in the 'local.mk' file in buildroot/{32,64}bit
# directories.
# See also section 8.12.6 "Using Buildroot during development" in the
# Buildroot user manual.
cd images/scratch/buildroot/dl
tar xvfz sedutil-*.tar.gz
cd ..

# build the rootfs for 64 and 32 bit systems
echo Building bootable systems for the PBA, this is going to take a while ..... Press enter to continue
read INOUT
Expand Down
Loading

0 comments on commit 504f878

Please sign in to comment.