sys_rebrand.sh 816 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. #!/bin/sh
  2. #########################
  3. # Name: sys_rebrand.sh
  4. # Main: jadedctrl
  5. # Lisc: ISC
  6. # Desc: Rebranding OBSD kernel
  7. # sources for use in
  8. # LBSD.
  9. #########################
  10. # Usage: sys_deblob.sh $SRC_DIR
  11. . ./libdeblob.sh
  12. PATCH_DIR=/tmp/sys_rebrand
  13. if [ -e $PATCH_DIR ]
  14. then
  15. self_destruct_sequence $PATCH_DIR
  16. else
  17. mkdir $PATCH_DIR
  18. fi
  19. if test -z $1
  20. then
  21. SRC_DIR=/usr/src/sys
  22. else
  23. SRC_DIR=$1
  24. fi
  25. #arch_list="alpha amd64 armish armv7 hppa i386 landisk loongson luna88k macppc miniroot octeon sgi socppc sparc sparc64 vax zaurus"
  26. arch_list="amd64 i386"
  27. for arch in $arch_list
  28. do
  29. rep "no OpenBSD" "no LibertyBSD" arch/${arch}/stand/libsa/biosdev.c
  30. done
  31. rep "ost=\"OpenBSD\"" "ost=\"LibertyBSD\"" conf/newvers.sh
  32. rep ">> OpenBSD/\" MACHINE" ">> LibertyBSD/\" MACHINE" stand/boot/boot.c
  33. apply