| @@ -1,23 +1,23 @@ | | | @@ -1,23 +1,23 @@ |
1 | # $NetBSD: armv7.conf,v 1.26 2018/11/01 11:05:24 skrll Exp $ | | 1 | # $NetBSD: armv7.conf,v 1.27 2018/11/22 21:11:37 aymeric Exp $ |
2 | # ARMv7 customization script used by mkimage | | 2 | # ARMv7 customization script used by mkimage |
3 | # | | 3 | # |
4 | board=armv7 | | 4 | board=armv7 |
5 | console=fb | | 5 | console=fb |
6 | resize=true | | 6 | resize=true |
7 | | | 7 | |
8 | . ${DIR}/conf/evbarm.conf | | 8 | . ${DIR}/conf/evbarm.conf |
9 | | | 9 | |
10 | # exynos, sunxi, tegra | | 10 | # altera, exynos, sunxi, tegra |
11 | kernels_generic="GENERIC" | | 11 | kernels_generic="GENERIC" |
12 | # non-FDTised / special kernels | | 12 | # non-FDTised / special kernels |
13 | kernels_amlogic="ODROID-C1" | | 13 | kernels_amlogic="ODROID-C1" |
14 | kernels_beagle="BEAGLEBOARD BEAGLEBONE" | | 14 | kernels_beagle="BEAGLEBOARD BEAGLEBONE" |
15 | kernels_rpi="RPI2" | | 15 | kernels_rpi="RPI2" |
16 | | | 16 | |
17 | make_label() { | | 17 | make_label() { |
18 | make_label_evbarm | | 18 | make_label_evbarm |
19 | } | | 19 | } |
20 | | | 20 | |
21 | make_fstab() { | | 21 | make_fstab() { |
22 | make_fstab_evbarm | | 22 | make_fstab_evbarm |
23 | } | | 23 | } |
| @@ -80,26 +80,30 @@ EOF | | | @@ -80,26 +80,30 @@ EOF |
80 | cat >> ${mnt}/etc/rc.local << EOF | | 80 | cat >> ${mnt}/etc/rc.local << EOF |
81 | if /sbin/sysctl -q machdep.cpu.frequency.max; then | | 81 | if /sbin/sysctl -q machdep.cpu.frequency.max; then |
82 | cpufreq_max=\$(/sbin/sysctl -n machdep.cpu.frequency.max) | | 82 | cpufreq_max=\$(/sbin/sysctl -n machdep.cpu.frequency.max) |
83 | cpufreq_cur=\$(/sbin/sysctl -n machdep.cpu.frequency.current) | | 83 | cpufreq_cur=\$(/sbin/sysctl -n machdep.cpu.frequency.current) |
84 | if [ ! "\$cpufreq_max" = "\$cpufreq_cur" ]; then | | 84 | if [ ! "\$cpufreq_max" = "\$cpufreq_cur" ]; then |
85 | /sbin/sysctl -w machdep.cpu.frequency.target=\$cpufreq_max | | 85 | /sbin/sysctl -w machdep.cpu.frequency.target=\$cpufreq_max |
86 | fi | | 86 | fi |
87 | fi | | 87 | fi |
88 | EOF | | 88 | EOF |
89 | echo "./etc/rc.local type=file uname=root gname=wheel mode=0644" \ | | 89 | echo "./etc/rc.local type=file uname=root gname=wheel mode=0644" \ |
90 | >> "$tmp/selected_sets" | | 90 | >> "$tmp/selected_sets" |
91 | } | | 91 | } |
92 | | | 92 | |
| | | 93 | populate_altera() { |
| | | 94 | : |
| | | 95 | } |
| | | 96 | |
93 | populate_amlogic() { | | 97 | populate_amlogic() { |
94 | odroidc1_kernelimg=netbsd-ODROID-C1.ub | | 98 | odroidc1_kernelimg=netbsd-ODROID-C1.ub |
95 | | | 99 | |
96 | # Create a boot.ini for Amlogic U-Boot | | 100 | # Create a boot.ini for Amlogic U-Boot |
97 | cat >> "${mnt}/boot/boot.ini" << EOF | | 101 | cat >> "${mnt}/boot/boot.ini" << EOF |
98 | ODROIDC-UBOOT-CONFIG | | 102 | ODROIDC-UBOOT-CONFIG |
99 | | | 103 | |
100 | setenv bootargs "root=ld0a awge0.mac-address=\${ethaddr} console=${console}" | | 104 | setenv bootargs "root=ld0a awge0.mac-address=\${ethaddr} console=${console}" |
101 | setenv bootcmd "fatload mmc 0:1 0x21000000 ${odroidc1_kernelimg}; fatload mmc 0:1 0x20000000 meson8b-odroidc1.dtb; bootm 0x21000000 - 0x20000000" | | 105 | setenv bootcmd "fatload mmc 0:1 0x21000000 ${odroidc1_kernelimg}; fatload mmc 0:1 0x20000000 meson8b-odroidc1.dtb; bootm 0x21000000 - 0x20000000" |
102 | run bootcmd | | 106 | run bootcmd |
103 | EOF | | 107 | EOF |
104 | } | | 108 | } |
105 | | | 109 | |
| @@ -143,22 +147,23 @@ populate() { | | | @@ -143,22 +147,23 @@ populate() { |
143 | echo "${bar} installing ${k} to /boot/${tgt} ${bar}" | | 147 | echo "${bar} installing ${k} to /boot/${tgt} ${bar}" |
144 | case "${k}" in | | 148 | case "${k}" in |
145 | *.gz) | | 149 | *.gz) |
146 | ${GZIP_CMD} -dc "${k}" > "${mnt}/boot/${tgt}" | | 150 | ${GZIP_CMD} -dc "${k}" > "${mnt}/boot/${tgt}" |
147 | ;; | | 151 | ;; |
148 | *) | | 152 | *) |
149 | cp "${k}" "${mnt}/boot/${tgt}" | | 153 | cp "${k}" "${mnt}/boot/${tgt}" |
150 | ;; | | 154 | ;; |
151 | esac || | | 155 | esac || |
152 | fail "Copy of ${k} to ${mnt}/boot/${tgt} failed" | | 156 | fail "Copy of ${k} to ${mnt}/boot/${tgt} failed" |
153 | done | | 157 | done |
154 | | | 158 | |
155 | # board specific configuration | | 159 | # board specific configuration |
| | | 160 | populate_altera |
156 | populate_amlogic | | 161 | populate_amlogic |
157 | populate_beagle | | 162 | populate_beagle |
158 | populate_rpi | | 163 | populate_rpi |
159 | populate_sunxi | | 164 | populate_sunxi |
160 | populate_tegra | | 165 | populate_tegra |
161 | | | 166 | |
162 | # common configuration | | 167 | # common configuration |
163 | populate_common | | 168 | populate_common |
164 | } | | 169 | } |