-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathreadme.cbt
48 lines (43 loc) · 2.97 KB
/
readme.cbt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# u-boot its-file padding from https://github.com/reey/PKGBUILDs - alarm/uboot-nyan-big/uboot.patch
# looks like this padding and the other fixes from above patch are already in v2020.01
# v2020.01 version somehow did not work, so lets try to exactly rebuild the reey version:
# u-boot v2018.11, u-boot.patch from reey - works :)
# add lpae-and-spectre-mitigation.patch and it works with 4gb :)
# to be retried: why it did not work with v2020.01? TODO: will it maybe work with v2020.04? no - see below
#
# from: https://archlinuxarm.org/forum/viewtopic.php?f=49&t=12185&start=90#p60232
# in u-boot I would recommend to execute "setenv stdin cros-ec-keyb" and "saveenv" so we no
# longer get the inputs from the serial console. Otherwise autoboot would later on not work
# since it is always interrupted by serial.
#
# UPDATE: this setenv is no longer required as i patched that variable into the built u-boot already
#
# interesting too maybe: https://archlinuxarm.org/forum/viewtopic.php?f=49&t=12185&start=100#p60273
#
# looks like the sprectre mitigation does not work with chainloaded u-boot (not low level enough any more?)
# CPU1: Spectre v2: firmware did not set auxiliary control register IBE bit, system vulnerable
# u-boot: u-boot-mainline-cb
# v2020.04 did not work - so lets try a version which once worked for cbt ... TODO: bisect :)
git checkout v2018.11
#export ARCH=arm
patch -p1 < ../../doc/u-boot-mainline-cb/misc.cbt/lpae-and-spectre-mitigation.patch
patch -p1 < ../../doc/u-boot-mainline-cb/misc.cbt/extend-spi-deactivate-delay.patch
patch -p1 < ../../doc/u-boot-mainline-cb/misc.cbt/fix-stdin.patch
# not needed as we use or own its file later - but here for reference
#patch -p1 < ../../doc/u-boot-mainline-cb/misc.cbt/nyan-big-its-fix-for-reference.patch
# the following worked for the 2gb ram model with the lower res 1366x768 display
# it looks a bit like the lpae options should not be used on this model maybe
# required: apt-get install swig
git checkout v2021.10
patch -p1 < ../../doc/u-boot-mainline-cb/misc.cbt/fix-stdin.patch
# if building for the 2g nyan big this patch reduces screen flickr on boot - the
# display still does not work ... for nyan blaze this patch should not be used
patch -p1 < ../../doc/u-boot-mainline-cb/misc.cbt/avoid-screen-flickr-on-2g-big.patch
make nyan-big_defconfig
make u-boot.bin u-boot.dtb
mkimage -f /compile/doc/u-boot-mainline-cb/misc.cbt/nyan-big.its /compile/result/u-boot-mainline-cb/cbt/uboot.img.cbt
cd /compile/result/u-boot-mainline-cb/cbt
echo 'Dummy configuration' > /tmp/config
echo 'Dummy bootloader' > /tmp/dummy-bootloader
env LD_LIBRARY_PATH=/compile/doc/u-boot-mainline-cb/cb-tools /compile/doc/u-boot-mainline-cb/cb-tools/vbutil_kernel --pack uboot.kpart.cbt --keyblock /compile/doc/u-boot-mainline-cb/cb-tools/kernel.keyblock --signprivate /compile/doc/u-boot-mainline-cb/cb-tools/kernel_data_key.vbprivk --version 1 --arch arm --config /tmp/config --bootloader /tmp/dummy-bootloader --vmlinuz uboot.img.cbt
rm -f /tmp/config /tmp/dummy-bootloader