Skip to content

Commit a57a95a

Browse files
committed
bootable: u-boot rk vendor: fixes for uinitrd; pass tink params; add blade3 board
- actually enables vendor/boot.scr-based bootables to work Signed-off-by: Ricardo Pardini <[email protected]>
1 parent 0c91988 commit a57a95a

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

bash/bootable/armbian-u-boot.sh

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ function build_bootable_armbian_uboot_rockchip() {
4141
function list_bootable_armbian_uboot_rockchip_vendor() {
4242
declare -g -A bootable_boards=()
4343
bootable_boards["r58x"]="BOARD=mekotronics-r58x-pro BRANCH=vendor"
44+
bootable_boards["blade3"]="BOARD=mixtile-blade3 BRANCH=vendor"
4445
}
4546

4647
function build_bootable_armbian_uboot_rockchip_vendor() {
@@ -195,6 +196,10 @@ function write_uboot_script() {
195196
exit 2
196197
fi
197198

199+
declare -g -a bootable_tinkerbell_kernel_params=()
200+
fill_array_bootable_tinkerbell_kernel_parameters "${BOARD}"
201+
declare tinkerbell_args="${bootable_tinkerbell_kernel_params[*]}"
202+
198203
declare console_extra_args="${bootable_info['CONSOLE_EXTRA_ARGS']:-""}"
199204
cat <<- BOOT_CMD > "${boot_cmd_file}"
200205
# Hook u-boot bootscript; mkimage -C none -A arm -T script -d /boot.cmd /boot.scr
@@ -204,7 +209,7 @@ function write_uboot_script() {
204209
setenv ramdisk_addr_r "0x40000000"
205210
test -n "\${distro_bootpart}" || distro_bootpart=1
206211
echo "Boot script loaded from \${devtype} \${devnum}:\${distro_bootpart}"
207-
setenv bootargs "${UBOOT_EXTLINUX_CMDLINE} console=tty0 console=${UBOOT_KERNEL_SERIALCON}${console_extra_args}"
212+
setenv bootargs "${UBOOT_EXTLINUX_CMDLINE} console=tty0 console=${UBOOT_KERNEL_SERIALCON}${console_extra_args} ${tinkerbell_args}"
208213
echo "Booting with: \${bootargs}"
209214
210215
echo "Loading initramfs... \${ramdisk_addr_r} /uinitrd"
@@ -221,6 +226,9 @@ function write_uboot_script() {
221226
booti \${kernel_addr_r} \${ramdisk_addr_r} \${fdt_addr_r}
222227
BOOT_CMD
223228

229+
log info "Marking uinitrd.wanted..."
230+
touch "${fat32_root_dir}/uinitrd.wanted" # marker file for utility run during fat32 image creation; see create_image_fat32_root_from_dir()
231+
224232
log_file_bat "${boot_cmd_file}" "info" "Produced Armbian u-boot boot.cmd/boot.scr"
225233

226234
return 0

bash/bootable/fat32-image.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,10 @@ function create_image_fat32_root_from_dir() {
2222
set -x
2323
2424
# Hack: transform the initramfs using mkimage to a u-boot image # @TODO refactor this out of here
25-
if [ -f /work/input/initramfs ]]; then
25+
ls -lah /work/input
26+
if [[ -f /work/input/uinitrd.wanted ]]; then
2627
mkimage -A arm64 -O linux -T ramdisk -C gzip -n uInitrd -d /work/input/initramfs /work/input/uinitrd
27-
#rm -f /work/input/initramfs
28+
rm -f /work/input/initramfs /work/input/uinitrd.wanted
2829
ls -lah /work/input/uinitrd
2930
fi
3031

0 commit comments

Comments
 (0)