1 # This file is part of the OpenADK project. OpenADK is copyrighted
2 # material, please see the LICENCE file in the top-level directory.
4 ifeq ($(ADK_RUNTIME_FIX_PERMISSION
),y
)
5 FAKEROOT
:=$(STAGING_HOST_DIR
)/usr
/bin
/fakeroot
--
10 ifeq ($(ADK_TARGET_OS_LINUX
),y
)
11 # relative paths, like 'mksh' or '../usr/bin/foosh'
12 ifeq (${ADK_BINSH_ASH},y
)
14 else ifeq (${ADK_BINSH_BASH},y
)
16 else ifeq (${ADK_BINSH_SASH},y
)
18 else ifeq (${ADK_BINSH_HUSH},y
)
20 else ifeq (${ADK_BINSH_MKSH},y
)
22 else ifeq (${ADK_BINSH_ZSH},y
)
25 $(error No
/bin
/sh configured
!)
29 ifeq (${ADK_ROOTSH_ASH},y
)
31 else ifeq (${ADK_ROOTSH_BASH},y
)
33 else ifeq (${ADK_ROOTSH_SASH},y
)
35 else ifeq (${ADK_ROOTSH_HUSH},y
)
37 else ifeq (${ADK_ROOTSH_MKSH},y
)
39 else ifeq (${ADK_ROOTSH_TCSH},y
)
41 else ifeq (${ADK_ROOTSH_ZSH},y
)
44 $(error No login
shell configured
!)
48 imageprepare
: image-prepare-post extra-install prelink
50 # if an extra directory exist in ADK_TOPDIR, copy all content over the
51 # root directory, do the same if make extra=/dir/to/extra is used
53 @
-if
[ -h
${TARGET_DIR}/etc
/resolv.conf
-a
-f
$(ADK_TOPDIR
)/extra
/etc
/resolv.conf
];then \
54 rm ${TARGET_DIR}/etc
/resolv.conf
;\
56 @if
[ -d
$(ADK_TOPDIR
)/extra
];then
$(CP
) $(ADK_TOPDIR
)/extra
/* ${TARGET_DIR};fi
57 @if
[ ! -z
$(extra
) ];then
$(CP
) $(extra
)/* ${TARGET_DIR};fi
60 $(BASH
) $(ADK_TOPDIR
)/scripts
/update-rcconf
61 rng
=/dev
/arandom
; test -e
$$rng || rng
=/dev
/urandom
; \
62 dd if
=$$rng bs
=512 count
=1 >>${TARGET_DIR}/etc
/.rnd
2>/dev
/null
; \
63 chmod
600 ${TARGET_DIR}/etc
/.rnd
64 -for
dir in X11 truetype
; do \
65 if
[ -d
${TARGET_DIR}/usr
/share
/fonts
/$${dir} ];then \
66 for i in
$$(ls
${TARGET_DIR}/usr
/share
/fonts
/$${dir}/);do \
67 mkfontdir
${TARGET_DIR}/usr
/share
/fonts
/$${dir}/$${i}; \
68 mkfontscale
${TARGET_DIR}/usr
/share
/fonts
/$${dir}/$${i}; \
72 $(SED
) '/^root:/s!:/bin/sh$$!:${ROOTSH}!' ${TARGET_DIR}/etc
/passwd
73 -rm -f
${TARGET_DIR}/bin
/sh
74 ln
-sf
${BINSH} ${TARGET_DIR}/bin
/sh
76 ifeq ($(ADK_RUNTIME_INIT_SYSTEMD
),y
)
77 ln
-fs ..
/usr
/${ADK_TARGET_LIBC_PATH}/systemd
/systemd
$(TARGET_DIR
)/sbin
/init
78 ln
-fs ..
/usr
/bin
/systemctl
$(TARGET_DIR
)/sbin
/halt
79 ln
-fs ..
/usr
/bin
/systemctl
$(TARGET_DIR
)/sbin
/poweroff
80 ln
-fs ..
/usr
/bin
/systemctl
$(TARGET_DIR
)/sbin
/reboot
83 $(GIT
) log
-1|head
-1|sed
-e
's#commit ##' \
84 > $(TARGET_DIR
)/etc
/.adkgithash
85 echo
$(ADK_APPLIANCE_VERSION
) > $(TARGET_DIR
)/etc
/.adkversion
86 echo
$(ADK_TARGET_SYSTEM
) > $(TARGET_DIR
)/etc
/.adktarget
87 $(TARGET_CC
) -v
2> $(TARGET_DIR
)/etc
/.adkcompiler
88 $(TARGET_LD
) -v
> $(TARGET_DIR
)/etc
/.adklinker
89 ifneq (${ADK_PACKAGE_CONFIG_IN_ETC},)
90 gzip
-9c
${ADK_TOPDIR}/.config
> $(TARGET_DIR
)/etc
/adkconfig.gz
91 chmod
600 $(TARGET_DIR
)/etc
/adkconfig.gz
93 ifneq ($(ADK_TARGET_ARCH_AARCH64
)$(ADK_TARGET_ARCH_X86_64
)$(ADK_TARGET_ARCH_PPC64
)$(ADK_TARGET_ARCH_SPARC64
)$(ADK_TARGET_ABI_N32
)$(ADK_TARGET_ABI_N64
),)
94 test ! -d
${TARGET_DIR}/lib || mv
${TARGET_DIR}/lib
/* ${TARGET_DIR}/${ADK_TARGET_LIBC_PATH}
95 test ! -d
${TARGET_DIR}/lib ||
rm -rf
${TARGET_DIR}/lib
96 ln
-sf
/${ADK_TARGET_LIBC_PATH} ${TARGET_DIR}/lib
97 mkdir
-p
${TARGET_DIR}/usr
/${ADK_TARGET_LIBC_PATH} 2>/dev
/null
98 -test ! -d
${TARGET_DIR}/usr
/lib || mv
${TARGET_DIR}/usr
/lib
/* ${TARGET_DIR}/usr
/${ADK_TARGET_LIBC_PATH} 2>/dev
/null
99 test ! -d
${TARGET_DIR}/usr
/lib ||
rm -rf
${TARGET_DIR}/usr
/lib
/
100 (cd
${TARGET_DIR}/usr
; ln
-sf
${ADK_TARGET_LIBC_PATH} lib
)
102 ifeq ($(ADK_TARGET_ARCH_S390
),y
)
103 (cd
${TARGET_DIR}/; ln
-sf lib lib64
)
106 ifeq (${ADK_PRELINK},)
109 ${TARGET_DIR}/etc
/prelink.conf
:
112 prelink
: ${TARGET_DIR}/etc
/prelink.conf
113 $(TRACE
) target
/prelink
114 ${TARGET_CROSS}prelink
${ADK_PRELINK_OPTS} \
115 --ld-library-path
=${STAGING_TARGET_DIR}/usr
/lib
:${STAGING_TARGET_DIR}/lib \
116 --root
=${TARGET_DIR} -a
$(MAKE_TRACE
)
119 KERNEL_PKGDIR
:=$(LINUX_BUILD_DIR
)/kernel-pkg
120 KERNEL_PKG
:=$(PACKAGE_DIR
)/kernel_
$(KERNEL_VERSION
)_
$(ADK_TARGET_CPU_ARCH
).
$(PKG_SUFFIX
)
121 TARGET_KERNEL
= ${ADK_TARGET_SYSTEM}-${ADK_TARGET_FS}-kernel
122 INITRAMFS
= ${ADK_TARGET_SYSTEM}-${ADK_TARGET_LIBC}-${ADK_TARGET_FS}
123 ROOTFSSQUASHFS
= ${ADK_TARGET_SYSTEM}-${ADK_TARGET_LIBC}-${ADK_TARGET_FS}.img
124 ROOTFSJFFS2
= ${ADK_TARGET_SYSTEM}-${ADK_TARGET_LIBC}-jffs2.img
125 ROOTFSUBIFS
= ${ADK_TARGET_SYSTEM}-${ADK_TARGET_LIBC}-ubifs.img
126 ROOTFSTARBALL
= ${ADK_TARGET_SYSTEM}-${ADK_TARGET_LIBC}-${ADK_TARGET_FS}+kernel.
tar.xz
127 ROOTFSUSERTARBALL
= ${ADK_TARGET_SYSTEM}-${ADK_TARGET_LIBC}-${ADK_TARGET_FS}.
tar.xz
128 ROOTFSISO
= ${ADK_TARGET_SYSTEM}-${ADK_TARGET_LIBC}.iso
130 kernel-package
: kernel-strip
131 $(START_TRACE
) "target/$(ADK_TARGET_ARCH)-create-kernel-package.. "
132 rm -rf
$(KERNEL_PKGDIR
)
133 ifeq ($(ADK_TARGET_DUAL_BOOT
),y
)
134 @mkdir
-p
$(KERNEL_PKGDIR
)
135 cp
$(BUILD_DIR
)/$(TARGET_KERNEL
) $(KERNEL_PKGDIR
)/kernel
137 @mkdir
-p
$(KERNEL_PKGDIR
)/boot
138 cp
$(BUILD_DIR
)/$(TARGET_KERNEL
) $(KERNEL_PKGDIR
)/boot
/kernel
140 @
${BASH} ${SCRIPT_DIR}/make-ipkg-dir.sh
${KERNEL_PKGDIR} \
141 ..
/linux
/kernel.control
${KERNEL_VERSION} ${ADK_TARGET_CPU_ARCH}
142 $(PKG_BUILD
) $(KERNEL_PKGDIR
) $(PACKAGE_DIR
) $(MAKE_TRACE
)
143 $(PKG_INSTALL
) $(KERNEL_PKG
) $(MAKE_TRACE
)
147 ${FW_DIR}/${ROOTFSTARBALL}: ${TARGET_DIR}/.adk kernel-package
148 cd
${TARGET_DIR}; find . | sed
-n
'/^\.\//s///p' |
sort | \
149 $(CPIO
) -o
-Hustar
--owner
=0:0 |
$(XZ
) -c
>$@
150 ifeq ($(ADK_TARGET_QEMU
),y
)
151 @cp
$(KERNEL
) $(FW_DIR
)/$(TARGET_KERNEL
)
154 ${FW_DIR}/${ROOTFSUSERTARBALL}: ${TARGET_DIR}/.adk
155 cd
${TARGET_DIR}; find . | grep
-v .
/boot
/ | sed
-n
'/^\.\//s///p' |
sort | \
156 $(CPIO
) -o
-Hustar
--owner
=0:0 |
$(XZ
) -c
>$@
158 ${STAGING_TARGET_DIR}/${INITRAMFS}_list
: ${TARGET_DIR}/.adk
159 env PATH
='${HOST_PATH}' $(BASH
) ${LINUX_DIR}/scripts
/gen_initramfs_list.sh
-u squash
-g squash \
162 echo
"nod /dev/console 0644 0 0 c 5 1"; \
163 echo
"nod /dev/tty 0644 0 0 c 5 0"; \
164 for i in
0 1 2 3 4; do \
165 echo
"nod /dev/tty$$i 0644 0 0 c 4 $$$$i"; \
167 echo
"nod /dev/null 0644 0 0 c 1 3"; \
168 echo
"nod /dev/ram 0655 0 0 b 1 1"; \
169 echo
"nod /dev/ttyS0 0660 0 0 c 4 64"; \
170 echo
"nod /dev/ttyS1 0660 0 0 c 4 65"; \
171 echo
"nod /dev/ttyAMA0 0660 0 0 c 204 64"; \
172 echo
"nod /dev/ttyAMA1 0660 0 0 c 204 65"; \
173 echo
"nod /dev/ttySC0 0660 0 0 c 204 8"; \
174 echo
"nod /dev/ttySC1 0660 0 0 c 204 9"; \
175 echo
"nod /dev/ttyBF0 0660 0 0 c 204 64"; \
176 echo
"nod /dev/ttyBF1 0660 0 0 c 204 65"; \
177 echo
"nod /dev/ttyUL0 0660 0 0 c 204 187"; \
178 echo
"nod /dev/ttyUL1 0660 0 0 c 204 188"; \
182 ${FW_DIR}/${INITRAMFS}: ${STAGING_TARGET_DIR}/${INITRAMFS}_list
183 ${LINUX_DIR}/usr
/gen_init_cpio
${STAGING_TARGET_DIR}/${INITRAMFS}_list | \
184 ${ADK_COMPRESSION_TOOL} -c
>$@
186 ${BUILD_DIR}/root.squashfs
: ${TARGET_DIR}/.adk
187 ${STAGING_HOST_DIR}/usr
/bin
/mksquashfs
${TARGET_DIR} \
188 ${BUILD_DIR}/root.squashfs
-comp xz \
189 -nopad
-noappend
-root-owned
$(MAKE_TRACE
)
191 ${FW_DIR}/${ROOTFSJFFS2}: ${TARGET_DIR}
192 PATH
='${HOST_PATH}' mkfs.jffs2
$(ADK_JFFS2_OPTS
) -q
-r
${TARGET_DIR} \
193 --pad
=$(ADK_TARGET_MTD_SIZE
) -o
${FW_DIR}/${ROOTFSJFFS2} $(MAKE_TRACE
)
195 ${FW_DIR}/${ROOTFSUBIFS}: ${TARGET_DIR}
197 PATH
='${HOST_PATH}'; \
198 SP_SIZE
='${ADK_TARGET_FLASH_SUBPAGE_SIZE}'; \
199 PG_SZIE
='${ADK_TARGET_FLASH_PAGE_SIZE}'; \
200 LEB_SIZE
=$$(((($$SP_SIZE + $$PG_SIZE) / $$PG_SIZE) * $$PG_SIZE)); \
201 mkfs.ubifs
-r
${TARGET_DIR} \
203 -e
$$((${ADK_TARGET_FLASH_PEB_SIZE} - $$LEB_SIZE)) \
204 -c
$$(((${ADK_TARGET_MTD_SIZE} / $$LEB_SIZE))) \
205 -o
${FW_DIR}/rootfs.ubifs
; \
206 cd
${FW_DIR} && ubinize
-o
$@ \
207 -p
${ADK_TARGET_FLASH_PEB_SIZE} \
208 -m
${ADK_TARGET_FLASH_PAGE_SIZE} \
209 -s
${ADK_TARGET_FLASH_SUBPAGE_SIZE} \
210 "${ADK_TOPDIR}/target/${ADK_TARGET_ARCH}/${ADK_TARGET_SYSTEM}/ubinize.cfg"; \
213 createinitramfs
: ${STAGING_TARGET_DIR}/${INITRAMFS}_list
214 ${SED} 's/.*CONFIG_\(RD_\|BLK_DEV_INITRD\|INITRAMFS_\).*//' \
217 echo
"CONFIG_BLK_DEV_INITRD=y"; \
218 echo
"CONFIG_ACPI_INITRD_TABLE_OVERRIDE=n"; \
219 echo
'CONFIG_INITRAMFS_SOURCE="${STAGING_TARGET_DIR}/${INITRAMFS}_list"'; \
220 echo
'# CONFIG_INITRAMFS_COMPRESSION_NONE is not set'; \
221 echo
'CONFIG_CRC32_BIT=y'; \
222 echo
'# CONFIG_CRC32_SELFTEST is not set'; \
223 echo
'# CONFIG_CRC32_SLICEBY8 is not set'; \
224 echo
'# CONFIG_CRC32_SLICEBY4 is not set'; \
225 echo
'# CONFIG_CRC32_SARWATE is not set'; \
226 echo
'CONFIG_INITRAMFS_ROOT_UID=0'; \
227 echo
'CONFIG_INITRAMFS_ROOT_GID=0'; \
228 echo
'CONFIG_INITRAMFS_IS_LARGE=n'; \
229 ) >> ${LINUX_DIR}/.config
230 ifeq ($(ADK_KERNEL_COMP_XZ
),y
)
231 echo
"CONFIG_RD_BZIP2=n" >> ${LINUX_DIR}/.config
232 echo
"CONFIG_RD_GZIP=n" >> ${LINUX_DIR}/.config
233 echo
"CONFIG_RD_LZMA=n" >> ${LINUX_DIR}/.config
234 echo
"CONFIG_RD_LZ4=n" >> ${LINUX_DIR}/.config
235 echo
"CONFIG_RD_LZO=n" >> ${LINUX_DIR}/.config
236 echo
"CONFIG_RD_XZ=y" >> ${LINUX_DIR}/.config
237 echo
"CONFIG_INITRAMFS_COMPRESSION_XZ=y" >> ${LINUX_DIR}/.config
238 echo
"CONFIG_XZ_DEC_X86=n" >> ${LINUX_DIR}/.config
239 echo
"CONFIG_XZ_DEC_POWERPC=n" >> ${LINUX_DIR}/.config
240 echo
"CONFIG_XZ_DEC_IA64=n" >> ${LINUX_DIR}/.config
241 echo
"CONFIG_XZ_DEC_ARM=n" >> ${LINUX_DIR}/.config
242 echo
"CONFIG_XZ_DEC_ARMTHUMB=n" >> ${LINUX_DIR}/.config
243 echo
"CONFIG_XZ_DEC_SPARC=n" >> ${LINUX_DIR}/.config
244 echo
"CONFIG_XZ_DEC_TEST=n" >> ${LINUX_DIR}/.config
246 ifeq ($(ADK_KERNEL_COMP_LZ4
),y
)
247 echo
"CONFIG_RD_XZ=n" >> ${LINUX_DIR}/.config
248 echo
"CONFIG_RD_BZIP2=n" >> ${LINUX_DIR}/.config
249 echo
"CONFIG_RD_GZIP=n" >> ${LINUX_DIR}/.config
250 echo
"CONFIG_RD_LZO=n" >> ${LINUX_DIR}/.config
251 echo
"CONFIG_RD_LZ4=y" >> ${LINUX_DIR}/.config
252 echo
"CONFIG_RD_LZMA=n" >> ${LINUX_DIR}/.config
253 echo
"CONFIG_INITRAMFS_COMPRESSION_LZ4=y" >> ${LINUX_DIR}/.config
255 ifeq ($(ADK_KERNEL_COMP_LZMA
),y
)
256 echo
"CONFIG_RD_XZ=n" >> ${LINUX_DIR}/.config
257 echo
"CONFIG_RD_BZIP2=n" >> ${LINUX_DIR}/.config
258 echo
"CONFIG_RD_GZIP=n" >> ${LINUX_DIR}/.config
259 echo
"CONFIG_RD_LZO=n" >> ${LINUX_DIR}/.config
260 echo
"CONFIG_RD_LZ4=n" >> ${LINUX_DIR}/.config
261 echo
"CONFIG_RD_LZMA=y" >> ${LINUX_DIR}/.config
262 echo
"CONFIG_INITRAMFS_COMPRESSION_LZMA=y" >> ${LINUX_DIR}/.config
264 ifeq ($(ADK_KERNEL_COMP_LZO
),y
)
265 echo
"CONFIG_RD_XZ=n" >> ${LINUX_DIR}/.config
266 echo
"CONFIG_RD_BZIP2=n" >> ${LINUX_DIR}/.config
267 echo
"CONFIG_RD_GZIP=n" >> ${LINUX_DIR}/.config
268 echo
"CONFIG_RD_LZMA=n" >> ${LINUX_DIR}/.config
269 echo
"CONFIG_RD_LZ4=n" >> ${LINUX_DIR}/.config
270 echo
"CONFIG_RD_LZO=y" >> ${LINUX_DIR}/.config
271 echo
"CONFIG_INITRAMFS_COMPRESSION_LZO=y" >> ${LINUX_DIR}/.config
273 ifeq ($(ADK_KERNEL_COMP_GZIP
),y
)
274 echo
"CONFIG_RD_XZ=n" >> ${LINUX_DIR}/.config
275 echo
"CONFIG_RD_BZIP2=n" >> ${LINUX_DIR}/.config
276 echo
"CONFIG_RD_LZO=n" >> ${LINUX_DIR}/.config
277 echo
"CONFIG_RD_LZMA=n" >> ${LINUX_DIR}/.config
278 echo
"CONFIG_RD_LZ4=n" >> ${LINUX_DIR}/.config
279 echo
"CONFIG_RD_GZIP=y" >> ${LINUX_DIR}/.config
280 echo
"CONFIG_INITRAMFS_COMPRESSION_GZIP=y" >> ${LINUX_DIR}/.config
282 ifeq ($(ADK_KERNEL_COMP_BZIP2
),y
)
283 echo
"CONFIG_RD_XZ=n" >> ${LINUX_DIR}/.config
284 echo
"CONFIG_RD_GZIP=n" >> ${LINUX_DIR}/.config
285 echo
"CONFIG_RD_LZMA=n" >> ${LINUX_DIR}/.config
286 echo
"CONFIG_RD_LZO=n" >> ${LINUX_DIR}/.config
287 echo
"CONFIG_RD_LZ4=n" >> ${LINUX_DIR}/.config
288 echo
"CONFIG_RD_BZIP2=y" >> ${LINUX_DIR}/.config
289 echo
"CONFIG_INITRAMFS_COMPRESSION_BZIP2=y" >> ${LINUX_DIR}/.config
291 ifeq ($(ADK_KERNEL_COMPRESS_NONE
),y
)
292 echo
"CONFIG_RD_XZ=n" >> ${LINUX_DIR}/.config
293 echo
"CONFIG_RD_BZIP2=n" >> ${LINUX_DIR}/.config
294 echo
"CONFIG_RD_LZO=n" >> ${LINUX_DIR}/.config
295 echo
"CONFIG_RD_LZMA=n" >> ${LINUX_DIR}/.config
296 echo
"CONFIG_RD_LZ4=n" >> ${LINUX_DIR}/.config
297 echo
"CONFIG_RD_GZIP=n" >> ${LINUX_DIR}/.config
299 @
-rm $(LINUX_DIR
)/usr
/initramfs_data.cpio
* 2>/dev
/null
300 env
$(KERNEL_MAKE_ENV
) $(MAKE
) -C
"${LINUX_DIR}" $(KERNEL_MAKE_OPTS
) \
301 -j
${ADK_MAKE_JOBS} $(ADK_TARGET_KERNEL
) $(MAKE_TRACE
)
302 @cp
$(KERNEL
) $(FW_DIR
)/$(TARGET_KERNEL
)
304 ${FW_DIR}/${ROOTFSISO}: ${TARGET_DIR} kernel-package
305 mkdir
-p
${TARGET_DIR}/boot
/syslinux
306 cp
${STAGING_HOST_DIR}/usr
/share
/syslinux
/{isolinux.bin
,ldlinux.c32
} \
307 ${TARGET_DIR}/boot
/syslinux
308 echo
'DEFAULT /boot/kernel root=/dev/sr0' > \
309 ${TARGET_DIR}/boot
/syslinux
/isolinux.cfg
310 PATH
='${HOST_PATH}' mkisofs
-R
-uid
0 -gid
0 -o
$@ \
311 -b boot
/syslinux
/isolinux.bin \
312 -c boot
/syslinux
/boot.cat
-no-emul-boot \
313 -boot-load-size
4 -boot-info-table
${TARGET_DIR}
315 ifeq (,$(wildcard $(ADK_TOPDIR
)/target
/$(ADK_TARGET_ARCH
)/$(ADK_TARGET_SYSTEM
)/$(ADK_TARGET_GENIMAGE_FILENAME
)))
316 GENCFG
:=$(ADK_TOPDIR
)/adk
/genimage
/$(ADK_TARGET_GENIMAGE_FILENAME
)
318 GENCFG
:=$(ADK_TOPDIR
)/target
/$(ADK_TARGET_ARCH
)/$(ADK_TARGET_SYSTEM
)/$(ADK_TARGET_GENIMAGE_FILENAME
)
321 ${FW_DIR}/${GENIMAGE}: ${TARGET_DIR} kernel-package
322 @
rm -rf
${FW_DIR}/temp
323 @mkdir
-p
${FW_DIR}/temp
324 @
$(CP
) $(KERNEL
) $(FW_DIR
)/kernel
325 @dd if
=/dev
/zero of
=${FW_DIR}/cfgfs.img bs
=16384 count
=1 $(MAKE_TRACE
)
326 ifeq ($(ADK_RUNTIME_FIX_PERMISSION
),y
)
327 echo
'#!/bin/sh' > $(ADK_TOPDIR
)/scripts
/fakeroot.sh
328 echo
"chown -R 0:0 $(TARGET_DIR)" >> $(ADK_TOPDIR
)/scripts
/fakeroot.sh
329 echo
'cd $(TARGET_DIR)' >> $(ADK_TOPDIR
)/scripts
/fakeroot.sh
330 -@cat
$(STAGING_TARGET_DIR
)/scripts
/permissions.sh
>> $(ADK_TOPDIR
)/scripts
/fakeroot.sh
2>/dev
/null
331 chmod
755 $(ADK_TOPDIR
)/scripts
/fakeroot.sh
332 PATH
='$(HOST_PATH)' $(FAKEROOT
) $(ADK_TOPDIR
)/scripts
/fakeroot.sh
333 rm $(ADK_TOPDIR
)/scripts
/fakeroot.sh
$(STAGING_TARGET_DIR
)/scripts
/permissions.sh
335 PATH
='${HOST_PATH}' $(FAKEROOT
) mke2img \
338 -o
$(FW_DIR
)/rootfs.ext
$(MAKE_TRACE
)
339 PATH
='${HOST_PATH}' genimage \
340 --config
"$(GENCFG)" \
341 --tmppath
"${FW_DIR}/temp" \
342 --rootpath
"$(TARGET_DIR)" \
343 --inputpath
"$(FW_DIR)" \
344 --outputpath
"$(FW_DIR)" $(MAKE_TRACE
)
345 ifeq ($(ADK_TARGET_DUAL_BOOT
),y
)
346 (cd
${TARGET_DIR}; find . | grep
-v .
/boot
/ | sed
-n
'/^\.\//s///p' |
sort | \
347 PATH
='${HOST_PATH}' $(CPIO
) -o
--quiet
-Hustar
--owner
=0:0 | \
348 ${XZ} -c
> ${FW_DIR}/openadk.
tar.xz
)
349 (cd
${FW_DIR}; PATH
='${HOST_PATH}' sha256sum openadk.
tar.xz \
350 | cut
-d\
-f1
> sha256.txt
)
351 (cd
${FW_DIR}; PATH
='${HOST_PATH}' tar -cf
${ADK_TARGET_SYSTEM}-update.
tar openadk.
tar.xz sha256.txt
)
352 @
rm -rf
${FW_DIR}/temp
354 ifeq ($(ADK_PACKAGE_GRUB_EFI_X86
)$(ADK_PACKAGE_GRUB_EFI_X86_64
),y
)
355 @if
[ ! -f
$(ADK_TOPDIR
)/bios-
$(ADK_TARGET_ARCH
).bin
]; then \
356 cd
$(ADK_TOPDIR
); wget http
://distfiles.openadk.org
/bios-
$(ADK_TARGET_ARCH
).bin
;\
361 rm -f
$(FW_DIR
)/$(ADK_TARGET_SYSTEM
)-* ${BUILD_DIR}/$(ADK_TARGET_SYSTEM
)-*