mirror of
https://github.com/linux-sunxi/meta-sunxi.git
synced 2024-11-07 22:08:22 +01:00
Merge pull request #295 from macpijan/add_wks_file
conf: sunxi.inc: add wks file for arm
This commit is contained in:
commit
151ac47fda
@ -22,7 +22,7 @@ PREFERRED_PROVIDER_virtual/bootloader ?= "u-boot"
|
||||
KERNEL_IMAGETYPE ?= "uImage"
|
||||
|
||||
IMAGE_CLASSES += "sdcard_image-sunxi"
|
||||
IMAGE_FSTYPES += "ext3 tar.gz sunxi-sdimg"
|
||||
IMAGE_FSTYPES += "ext3 tar.gz sunxi-sdimg wic.gz wic.bmap"
|
||||
|
||||
MACHINE_EXTRA_RRECOMMENDS = "kernel-modules"
|
||||
|
||||
@ -34,3 +34,16 @@ SPL_BINARY ?= "u-boot-sunxi-with-spl.bin"
|
||||
|
||||
SERIAL_CONSOLE ?= "115200 ttyS0"
|
||||
MACHINE_FEATURES ?= "alsa apm keyboard rtc serial screen usbgadget usbhost vfat"
|
||||
|
||||
# Mimic the sdcard_image-sunxi.bbclass
|
||||
# image-version-info file was also generated and installed to boot partition,
|
||||
# but it is missing here - can be added somehow (how?) if required
|
||||
SUNXI_FEX_FILE ?= " "
|
||||
SUNXI_BOOT_SPACE ?= "40"
|
||||
IMAGE_BOOT_FILES ?= "${KERNEL_IMAGETYPE} boot.scr"
|
||||
# ship fex file for sunxi kernel, devicetree file for mainline kernel
|
||||
IMAGE_BOOT_FILES += "${@bb.utils.contains('PREFERRED_PROVIDER_virtual/kernel', 'linux-sunxi', '${SUNXI_FEX_FILE}', '${KERNEL_DEVICETREE}', d)}"
|
||||
WKS_FILES ?= "sunxi-sdcard-image.wks.in"
|
||||
WKS_FILE_DEPENDS ?= "virtual/kernel u-boot"
|
||||
# in case of sunxi kernel, sunxi-board-fex must be built prior wic image assembly
|
||||
WKS_FILE_DEPENDS += " ${@bb.utils.contains('PREFERRED_PROVIDER_virtual/kernel', 'linux-sunxi', 'sunxi-board-fex', '', d)}"
|
||||
|
18
wic/sunxi-sdcard-image.wks.in
Normal file
18
wic/sunxi-sdcard-image.wks.in
Normal file
@ -0,0 +1,18 @@
|
||||
# short-description: Create SD card image with a boot partition
|
||||
# long-description:
|
||||
# Create an image that can be written onto a SD card using dd for use
|
||||
# with Allwinner arm (32-bit) SoC family
|
||||
#
|
||||
# The disk layout used is:
|
||||
# - --------------------------- -------------- --------------
|
||||
# | | u-boot-sunxi-with-spl.bin | boot | rootfs |
|
||||
# - --------------------------- -------------- --------------
|
||||
# ^ ^ ^ ^ ^
|
||||
# | | | | |
|
||||
# 0 | 2MiB ${SUNXI_BOOT_SPACE}MiB ${SUNXI_BOOT_SPACE}MiB + rootfs + IMAGE_EXTRA_SPACE
|
||||
# 8KiB
|
||||
#
|
||||
|
||||
part u-boot --source rawcopy --sourceparams="file=${SPL_BINARY}" --ondisk mmcblk0 --no-table --align 8
|
||||
part /boot --source bootimg-partition --ondisk mmcblk0 --fstype=vfat --label boot --active --align 2048 --fixed-size ${SUNXI_BOOT_SPACE}
|
||||
part / --source rootfs --ondisk mmcblk0 --fstype=ext4 --align 2048
|
Loading…
Reference in New Issue
Block a user