2
1

post-image.sh 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #!/bin/sh
  2. # $1: images directory path
  3. # $2: device dts filename
  4. # $3: board id
  5. build_lxl() {
  6. local images="$1"
  7. local device="$2"
  8. local board="$3"
  9. $HOST_DIR/bin/lzma_alone e $images/zImage.$device $images/zImage.$device.lzma -d16
  10. rm -f $images/zImage.$device
  11. $HOST_DIR/bin/otrx create $images/$device.trx -f $images/zImage.$device.lzma -a 0x20000 -f $images/rootfs.ubi
  12. rm -f $images/zImage.$device.lzma
  13. $HOST_DIR/bin/lxlfw create $images/$device.lxl -i $images/$device.trx -b "$board"
  14. }
  15. # $1: images directory path
  16. # $2: device dts filename
  17. build_trx() {
  18. local images="$1"
  19. local device="$2"
  20. $HOST_DIR/bin/lzma_alone e $images/zImage.$device $images/zImage.$device.lzma -d16
  21. rm -f $images/zImage.$device
  22. $HOST_DIR/bin/otrx create $images/$device.trx -f $images/zImage.$device.lzma -a 0x20000 -f $images/rootfs.ubi
  23. rm -f $images/zImage.$device.lzma
  24. }
  25. devices="$(sed -n 's/^BR2_LINUX_KERNEL_INTREE_DTS_NAME="\([^"]*\)"$/\1/p' ${BR2_CONFIG})"
  26. for device in $devices; do
  27. device="${device#broadcom/}"
  28. case "$device" in
  29. "bcm4708-smartrg-sr400ac")
  30. build_trx "$1" "$device"
  31. ;;
  32. "bcm47094-luxul-xwr-3150-v1")
  33. build_lxl "$1" "$device" "XWR-3150"
  34. ;;
  35. esac
  36. done