build_kernel.sh 809 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. #!/bin/bash
  2. set -e
  3. set -u
  4. set -x
  5. export BASE_DIR="$(pwd)"
  6. export CARCH='armv7h'
  7. export KARCH='arm'
  8. export CROSS_COMPILE=arm-none-eabi-
  9. export ARCH=arm
  10. function msg2 {
  11. echo "$@"
  12. }
  13. function vbutil_kernel {
  14. "$BASE_DIR"/vboot_reference/build/futility/futility --debug vbutil_kernel $@
  15. }
  16. function modify_config {
  17. for i in $(egrep 'ROCKCHIP|CROS_|PEGASUS|MOUSE_SYNAPTICS_I2C|RK3288|^CONFIG_SND_SOC=|CONFIG_SND_SOC is not' .config | sed -e "s/^# //g" -e "s/=.*//g" -e "s/ is not set//g"); do
  18. echo "$i=y"
  19. ./scripts/config --file .config --enable $i
  20. done
  21. }
  22. cd linux-libre
  23. source PKGBUILD
  24. export pkgdir='.'
  25. bsdtar -xf linux-libre-$_srcbasever.tar.xz
  26. xz --decompress --keep patch-$_srcbasever-$_srcver.xz
  27. prepare
  28. modify_config
  29. cd ..
  30. make zImage dtbs
  31. cd ..
  32. _package-chromebook