post-build.sh 1.3 KB

1234567891011121314151617181920212223242526272829303132
  1. #!/bin/sh
  2. # Add local path to init scripts
  3. sed -i '3iexport PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/sbin:/usr/local/bin' ${TARGET_DIR}/etc/init.d/rcK
  4. sed -i '3iexport PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/sbin:/usr/local/bin' ${TARGET_DIR}/etc/init.d/rcS
  5. # Remove log daemon init scripts since they are loaded from inittab
  6. rm -f ${TARGET_DIR}/etc/init.d/S01syslogd ${TARGET_DIR}/etc/init.d/S02klogd
  7. # Remove dhcp lib dir and link to /tmp
  8. rm -rf ${TARGET_DIR}/var/lib/dhcp/
  9. ln -s /tmp ${TARGET_DIR}/var/lib/dhcp
  10. # Remove dhcpcd dir and link to /tmp
  11. rm -rf ${TARGET_DIR}/var/db/dhcpcd/
  12. ln -s /tmp ${TARGET_DIR}/var/db/dhcpcd
  13. # Change dropbear init sequence
  14. mv ${TARGET_DIR}/etc/init.d/S50dropbear ${TARGET_DIR}/etc/init.d/S42dropbear
  15. # Redirect drobear keys to /tmp
  16. rm -rf ${TARGET_DIR}/etc/dropbear
  17. ln -s /tmp ${TARGET_DIR}/etc/dropbear
  18. # Generate U-Boot environment for app
  19. ${HOST_DIR}/bin/mkenvimage -p 0x0 -s 0x20000 -o ${BINARIES_DIR}/u-boot-env.img ${TARGET_DIR}/etc/u-boot.env
  20. # Generate U-Boot environment for production
  21. cp ${TARGET_DIR}/etc/u-boot.env ${TARGET_DIR}/etc/u-boot-prod.env
  22. echo "assembly_tests=1" >> ${TARGET_DIR}/etc/u-boot-prod.env
  23. ${HOST_DIR}/bin/mkenvimage -p 0x0 -s 0x20000 -o ${BINARIES_DIR}/u-boot-env-prod.img ${TARGET_DIR}/etc/u-boot-prod.env
  24. rm ${TARGET_DIR}/etc/u-boot-prod.env