Skip to content

envkernel.sh: Change prompt, add deactivate, create /tmp/mainline

OK, so the existing envkernel.sh script has a few drawbacks:

  • it modifies somewhat heavily the shell environment, but there is no indication in the shell
  • you can't undo it (you have to close the shell)
  • the "after make" scripts needed do need some TLC

So with this change:

  • I modify the PS1 to add [envkernel] and make it more obvious that the shell environment is modified in some way
  • add deactivate alias, that remove all added aliases (and returns PS1 to normal)[1]
  • prepare /tmp/mainline directory inside the chroot to be accessible by chroot user pmos, so the run-script post-make script could use it for dtbTool and mkbootimg-osm0sis without further gymnastics. I'll update the mainlining wiki page to reflect a this, and hopefully add a full autonomous version.

[1] pmbootstrap is also possibly an alias, so unaliasing that will remove the original pmbootstrap alias, which might not be a great idea. All "overwriten" aliases should be saved and then restored, not just unaliased.

Merge request reports