board/ti/am62x-sk: generalize post-build.sh

Removing any explicit reference to the ti_am62x_sk_defconfig
configuration, the script can also be used by other configurations or at
least by ti_am64x_sk_defconfig.

Reviewed-by: Arnout Vandecappelle <arnout@mind.be>
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Signed-off-by: Romain Naour <romain.naour@smile.fr>
This commit is contained in:
Dario Binacchi 2024-03-01 14:36:15 +01:00 committed by Romain Naour
parent 2915879c15
commit c8b33d22d8
2 changed files with 8 additions and 4 deletions

View File

@ -12,8 +12,8 @@ EOF
exit 1
}
o='c:d:r:x:'
O='console:,devicetree:,root:,extra-args:'
o='c:d:l:r:x:'
O='console:,devicetree:,label:,root:,extra-args:'
opts="$(getopt -n "${0##*/}" -o "${o}" -l "${O}" -- "${@}")"
eval set -- "${opts}"
while [ ${#} -gt 0 ]; do
@ -24,6 +24,9 @@ while [ ${#} -gt 0 ]; do
(-d|--devicetree)
DEVICETREE="${2}"; shift 2
;;
(-l|--label)
LABEL="${2}"; shift 2
;;
(-r|--root)
ROOT="${2}"; shift 2
;;
@ -38,6 +41,7 @@ done
[ -n "${CONSOLE}" ] || die "Missing \`console' argument"
[ -n "${DEVICETREE}" ] || die "Missing \`devicetree' argument"
[ -n "${LABEL}" ] || die "Missing \`label' argument"
[ -n "${ROOT}" ] || die "Missing \`root' argument"
append="console=${CONSOLE} root=${ROOT} rw rootfstype=ext4 rootwait"
if [ -n "${EXTRA_ARGS}" ]; then
@ -46,7 +50,7 @@ fi
mkdir -p "${BINARIES_DIR}"
cat <<-__HEADER_EOF > "${BINARIES_DIR}/extlinux.conf"
label am62x-sk-buildroot
label ${LABEL}
kernel /Image
fdtdir /
devicetree /${DEVICETREE}

View File

@ -3,7 +3,7 @@ BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_6_6=y
BR2_GLOBAL_PATCH_DIR="board/ti/am62x-sk/patches"
BR2_DOWNLOAD_FORCE_CHECK_HASHES=y
BR2_ROOTFS_POST_BUILD_SCRIPT="board/ti/am62x-sk/post-build.sh"
BR2_ROOTFS_POST_BUILD_SCRIPT_ARGS="-c ttyS2,115200n8 -d k3-am625-sk.dtb -r /dev/mmcblk1p2 -x earlycon=ns16550a,mmio32,0x02800000"
BR2_ROOTFS_POST_BUILD_SCRIPT_ARGS="-c ttyS2,115200n8 -d k3-am625-sk.dtb -l am62x-sk-buildroot -r /dev/mmcblk1p2 -x earlycon=ns16550a,mmio32,0x02800000"
BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh"
BR2_ROOTFS_POST_IMAGE_SCRIPT_ARGS="-c board/ti/am62x-sk/genimage.cfg"
BR2_LINUX_KERNEL=y