-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Expand file tree
/
Copy pathboot-meson-s4t7.cmd
More file actions
95 lines (80 loc) · 3.43 KB
/
boot-meson-s4t7.cmd
File metadata and controls
95 lines (80 loc) · 3.43 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
# DO NOT EDIT THIS FILE
#
# Please edit /boot/armbianEnv.txt to set supported parameters
#
setenv overlay_error "false"
setenv console "both"
setenv verbosity "1"
setenv earlycon "off"
setenv bootlogo "false"
setenv displaymode "1080p60hz"
setenv force_16x9_display "false"
# Show what uboot default fdtfile is
echo "U-boot default fdtfile: ${fdtfile}"
if test -e ${devtype} ${devnum} ${prefix}armbianEnv.txt; then
load ${devtype} ${devnum} ${loadaddr} ${prefix}armbianEnv.txt
env import -t ${loadaddr} ${filesize}
fi
if test "${console}" = "both"; then setenv console_serial "true"; setenv console_display "true"; fi
if test "${console}" = "serial"; then setenv console_serial "true"; fi
if test "${console}" = "display"; then setenv console_display "true"; fi
if test "${console_display}" = "true"; then setenv consoleargs "console=tty0"; fi
if test "${console_serial}" = "true"; then setenv consoleargs "console=ttyS0,921600 ${consoleargs}"; fi
if test "${earlycon}" != "on"; then
setexpr bootargs sub " earlycon=\\S* " " " "${bootargs}"
fi
if test "${bootlogo}" = "true"; then
setenv plymouthargs "splash plymouth.ignore-serial-consoles"
else
setenv plymouthargs ""
fi
setenv bootargs "${bootargs} root=${rootdev} rootfstype=${rootfstype} rw fsck.repair=yes rootwait ${consoleargs} partition_type=generic loglevel=${verbosity} ${plymouthargs} ${extraargs} ${extraboardargs}"
load ${devtype} ${devnum} ${fdt_addr_r} ${prefix}dtb/${fdtfile}
fdt addr ${fdt_addr_r}
fdt resize 65536
if test "${mipi_lcd_exist}" = "0"; then
fdt set /lcd status disabled
fdt set /lcd1 status disabled
fdt set /lcd2 status disabled
fdt set /soc/apb4@fe000000/i2c@6c000/gt9xx@14 status disabled
fdt set /soc/apb4@fe000000/i2c@6c000/ft5336@38 status disabled
else
if test "${panel_type}" = "mipi_1"; then
fdt set /drm-subsystem fbdev_sizes <1920 1200 1920 2400 32>
else
fdt set /drm-subsystem fbdev_sizes <1080 1920 1080 3840 32>
fi
fi
for overlay_file in ${overlays}; do
if load ${devtype} ${devnum} ${scriptaddr} ${prefix}dtb/amlogic/overlay/${overlay_prefix}-${overlay_file}.dtbo; then
echo "Applying kernel provided DT overlay ${overlay_prefix}-${overlay_file}.dtbo"
fdt apply ${scriptaddr} || setenv overlay_error "true"
fi
done
for overlay_file in ${user_overlays}; do
if load ${devtype} ${devnum} ${scriptaddr} ${prefix}overlay-user/${overlay_file}.dtbo; then
echo "Applying user provided DT overlay ${overlay_file}.dtbo"
fdt apply ${scriptaddr} || setenv overlay_error "true"
fi
done
if test "${overlay_error}" = "true"; then
echo "Error applying DT overlays, restoring original DT"
load ${devtype} ${devnum} ${fdt_addr_r} ${prefix}dtb/${fdtfile}
else
if load ${devtype} ${devnum} ${scriptaddr} ${prefix}dtb/amlogic/overlay/${overlay_prefix}-fixup.scr; then
echo "Applying kernel provided DT fixup script (${overlay_prefix}-fixup.scr)"
source ${scriptaddr}
fi
if test -e ${devtype} ${devnum} ${prefix}fixup.scr; then
load ${devtype} ${devnum} ${scriptaddr} ${prefix}fixup.scr
echo "Applying user provided fixup script (fixup.scr)"
source ${scriptaddr}
fi
fi
# The symlinks for kernel and initrd.img are at different locations in debian and ubuntu
# Check and load from a location that exists
load ${devtype} ${devnum} ${kernel_addr_r} ${prefix}Image
load ${devtype} ${devnum} ${ramdisk_addr_r} ${prefix}Initrd
booti ${kernel_addr_r} ${ramdisk_addr_r}:${filesize} ${fdt_addr_r}
# Recompile with:
# mkimage -C none -A arm -T script -d /boot/boot.cmd /boot/boot.scr