Skip to content

Commit

Permalink
shellfmt: config/sources; no changes
Browse files Browse the repository at this point in the history
  • Loading branch information
rpardini authored and igorpecovnik committed Nov 25, 2024
1 parent 6d9a06b commit 2f63a9c
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 15 deletions.
12 changes: 6 additions & 6 deletions config/sources/amd64.conf
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ declare -g QEMU_BINARY='qemu-x86_64-static' # Hopefully you have this installed.
# See https://uapi-group.org/specifications/specs/discoverable_partitions_specification/
declare -g PARTITION_TYPE_UUID_ROOT="4F68BCE3-E8CD-4DB1-96E7-FBCAF984B709" # "Linux root (x86-64)"

declare -g MAIN_CMDLINE='' # we set it in common, it was not set before
declare -g KERNEL_COMPILER=' ' # hack: use single space for host gcc. won't work on arm64 hosts
declare -g KERNEL_USE_GCC=' ' # more hacks.
declare -g KERNEL_EXTRA_TARGETS='modules' # default is "modules dtb" but x86_64 has no DTB
declare -g KERNEL_BUILD_DTBS="no" # amd64 has no DTBs. that I know of.
declare -g UBOOT_USE_GCC='none' # required by configuration.sh
declare -g MAIN_CMDLINE='' # we set it in common, it was not set before
declare -g KERNEL_COMPILER=' ' # hack: use single space for host gcc. won't work on arm64 hosts
declare -g KERNEL_USE_GCC=' ' # more hacks.
declare -g KERNEL_EXTRA_TARGETS='modules' # default is "modules dtb" but x86_64 has no DTB
declare -g KERNEL_BUILD_DTBS="no" # amd64 has no DTBs. that I know of.
declare -g UBOOT_USE_GCC='none' # required by configuration.sh
#declare -g INITRD_ARCH=amd64 # Used by u-boot for mkimage in initramfs. No u-boot for x86 yet.

# Defaults, if not set by board or family.
Expand Down
4 changes: 2 additions & 2 deletions config/sources/families/rockchip-rk3588.conf
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,15 @@ case $BRANCH in
current)
# Branch based on a stable kernel release (will stay on the next LTS kernel release once released, 6.12? LTS)
LINUXFAMILY=rockchip-rk3588
KERNEL_MAJOR_MINOR="6.12" # Major and minor versions of this kernel.
KERNEL_MAJOR_MINOR="6.12" # Major and minor versions of this kernel.
LINUXCONFIG="linux-rockchip-rk3588-${BRANCH}"
# No need to set KERNELPATCHDIR, since default is: KERNELPATCHDIR='archive/rockchip-rk3588-${KERNEL_MAJOR_MINOR}'
;;

edge)
# Branch based on the latest kernel release including RC releases, to benefit from the latest RK3588 mainline advancements. Might be unstable!
LINUXFAMILY=rockchip-rk3588
KERNEL_MAJOR_MINOR="6.12" # Major and minor versions of this kernel.
KERNEL_MAJOR_MINOR="6.12" # Major and minor versions of this kernel.
LINUXCONFIG="linux-rockchip-rk3588-${BRANCH}"
# No need to set KERNELPATCHDIR, since default is: KERNELPATCHDIR='archive/rockchip-rk3588-${KERNEL_MAJOR_MINOR}'
;;
Expand Down
2 changes: 1 addition & 1 deletion config/sources/families/rockchip.conf
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ if [[ "$BOOT_SOC" == "rk3288" ]]; then
# fi
#
# run_host_command_logged cat spl/u-boot-spl-dtb.bin >> u-boot-rockchip-with-spl.bin

run_host_command_logged cat idbloader.img > u-boot-rockchip-with-spl.bin
run_host_command_logged dd if=u-boot-dtb.img of=u-boot-rockchip-with-spl.bin seek=$((0x200 - 0x40)) conv=notrunc

Expand Down
10 changes: 4 additions & 6 deletions config/sources/families/spacemit.conf
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ write_uboot_platform() {

declare -A d
d=(
[${1}/bootinfo_emmc.bin]="0:$(du -b ${1}/bootinfo_emmc.bin | awk '{print $1}')"
[${1}/FSBL.bin]="512:$(du -b ${1}/FSBL.bin | awk '{print $1}')"
[${1} / bootinfo_emmc.bin]="0:$(du -b ${1}/bootinfo_emmc.bin | awk '{print $1}')"
[${1} / FSBL.bin]="512:$(du -b ${1}/FSBL.bin | awk '{print $1}')"

This comment has been minimized.

Copy link
@The-going

The-going Nov 29, 2024

Contributor

@rpardini
[${1} / bootinfo_emmc.bin]
[${1} / FSBL.bin]
This is the path to the file!!! It should not contain spaces.

Have you checked the operation of this script after these changes?

This comment has been minimized.

Copy link
@rpardini

rpardini Nov 30, 2024

Author Member

No. I've run a batch shellfmt -- everyone should run shellfmt before/after commiting their changes to ensure consistency.
If shellfmt is messing up the syntax, it means the original code is incorrect -- in this case it seems one needs to properly quote the string?

Either way thanks for catching this, I'll try to fix.

)

if [ -b ${2}boot0 ]; then
Expand All @@ -86,11 +86,9 @@ write_uboot_platform() {
sync
fi

for f in "${!d[@]}"
do
for f in "${!d[@]}"; do
if $(dd if=${device} bs=1 skip="${d[$f]%:*}" count="${d[$f]#*:}" \
conv=notrunc status=noxfer 2>/dev/null | cmp --quiet "${f}")
then
conv=notrunc status=noxfer 2> /dev/null | cmp --quiet "${f}"); then
echo "Skip $(basename $f), it is equal to the existing one"
else
echo "# Write =: $(basename $f) to ${device}"
Expand Down

0 comments on commit 2f63a9c

Please sign in to comment.