working multi-boot
Signed-off-by: Michel Stempin <michel.stempin@wanadoo.fr>
This commit is contained in:
parent
3efeeffc43
commit
706c8e3cec
|
@ -9,6 +9,17 @@ image boot.vfat {
|
||||||
size = 8M
|
size = 8M
|
||||||
}
|
}
|
||||||
|
|
||||||
|
image boot_alt.vfat {
|
||||||
|
vfat {
|
||||||
|
files = {
|
||||||
|
"uImage",
|
||||||
|
"sun8i-v3s-funkey.dtb",
|
||||||
|
"boot_alt.scr"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
size = 8M
|
||||||
|
}
|
||||||
|
|
||||||
image sdcard.img {
|
image sdcard.img {
|
||||||
hdimage {
|
hdimage {
|
||||||
gpt = true
|
gpt = true
|
||||||
|
@ -28,13 +39,13 @@ image sdcard.img {
|
||||||
size = 536K # 544KB - 8KB
|
size = 536K # 544KB - 8KB
|
||||||
}
|
}
|
||||||
|
|
||||||
# partition u-boot-env0 {
|
# partition u-boot-env {
|
||||||
# in-partition-table = "no"
|
# in-partition-table = "no"
|
||||||
# offset = 544K
|
# offset = 544K
|
||||||
# size = 128K
|
# size = 128K
|
||||||
# }
|
# }
|
||||||
|
|
||||||
# partition u-boot-env1 {
|
# partition u-boot_alt-env {
|
||||||
# in-partition-table = "no"
|
# in-partition-table = "no"
|
||||||
# offset = 672K
|
# offset = 672K
|
||||||
# size = 128K
|
# size = 128K
|
||||||
|
@ -46,31 +57,38 @@ image sdcard.img {
|
||||||
# size = 16K
|
# size = 16K
|
||||||
# }
|
# }
|
||||||
|
|
||||||
partition boot0 {
|
partition boot {
|
||||||
offset = 1M
|
offset = 1M
|
||||||
partition-type = 0xC
|
partition-type = 0xC
|
||||||
bootable = "true"
|
bootable = "true"
|
||||||
image = "boot.vfat"
|
image = "boot.vfat"
|
||||||
}
|
}
|
||||||
|
|
||||||
partition boot1 {
|
partition boot_alt {
|
||||||
offset = 9M
|
offset = 9M
|
||||||
partition-type = 0xC
|
partition-type = 0xC
|
||||||
bootable = "true"
|
bootable = "true"
|
||||||
image = "boot.vfat"
|
image = "boot_alt.vfat"
|
||||||
}
|
}
|
||||||
|
|
||||||
partition rootfs0 {
|
partition rootfs {
|
||||||
offset = 17M
|
offset = 17M
|
||||||
partition-type = 0x83
|
partition-type = 0x83
|
||||||
image = "rootfs.ext4"
|
image = "rootfs.ext4"
|
||||||
size = 111M
|
size = 111M
|
||||||
}
|
}
|
||||||
|
|
||||||
partition rootfs1 {
|
partition rootfs_alt {
|
||||||
offset = 128M
|
offset = 128M
|
||||||
partition-type = 0x83
|
partition-type = 0x83
|
||||||
image = "rootfs.ext4"
|
image = "rootfs.ext4"
|
||||||
size = 128M
|
size = 128M
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# partition share {
|
||||||
|
# offset = 256M
|
||||||
|
# partition-type = 0xC
|
||||||
|
# bootable = "false"
|
||||||
|
# size = 0
|
||||||
|
# }
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,3 +13,6 @@ rm -f ${TARGET_DIR}/etc/init.d/S01syslogd ${TARGET_DIR}/etc/init.d/S02klogd
|
||||||
|
|
||||||
# Change dropbear init sequence
|
# Change dropbear init sequence
|
||||||
mv ${TARGET_DIR}/etc/init.d/S50dropbear ${TARGET_DIR}/etc/init.d/S42dropbear
|
mv ${TARGET_DIR}/etc/init.d/S50dropbear ${TARGET_DIR}/etc/init.d/S42dropbear
|
||||||
|
|
||||||
|
# Generate alternate U-Boot boot script
|
||||||
|
${HOST_DIR}/bin/mkimage -C none -A arm -T script -d ${BR2_EXTERNAL_FUNKEY_PATH}/board/funkey/boot_alt.cmd ${BINARIES_DIR}/boot_alt.scr
|
||||||
|
|
|
@ -1,19 +1,17 @@
|
||||||
arch=arm
|
alt_args_mmc=setenv bootargs console=ttyS0,115200 panic=5 rootwait fbcon=map:10 fbcon=font:VGA8x8 vt.global_cursor_default=0 root=/dev/mmcblk0p4 rootfstype=ext4 rootflags=commit=120,data=writeback,barrier=0,journal_async_commit rw quiet
|
||||||
args_mmc=setenv bootargs console=ttyS0,115200 panic=5 rootwait fbcon=map:10 fbcon=font:VGA8x8 vt.global_cursor_default=0 root=/dev/mmcblk0p2 rootfstype=ext4 rootflags=commit=120,data=writeback,barrier=0,journal_async_commit rw quiet
|
alt_bootcmd=run alt_args_mmc; run alt_loadfdt; run alt_loadimage; bootm ${loadaddr} - ${fdtaddr}
|
||||||
|
alt_loadfdt=load mmc 0:2 ${fdtaddr} sun8i-v3s-funkey.dtb
|
||||||
|
alt_loadimage=load mmc 0:2 ${loadaddr} uImage
|
||||||
|
args_mmc=setenv bootargs console=ttyS0,115200 panic=5 rootwait fbcon=map:10 fbcon=font:VGA8x8 vt.global_cursor_default=0 root=/dev/mmcblk0p3 rootfstype=ext4 rootflags=commit=120,data=writeback,barrier=0,journal_async_commit rw quiet
|
||||||
baudrate=115200
|
baudrate=115200
|
||||||
board=sunxi
|
|
||||||
board_name=sunxi
|
|
||||||
bootcmd=run args_mmc; run loadfdt; run loadimage; bootm ${loadaddr} - ${fdtaddr}
|
bootcmd=run args_mmc; run loadfdt; run loadimage; bootm ${loadaddr} - ${fdtaddr}
|
||||||
bootdelay=0
|
bootdelay=0
|
||||||
console=ttyS0,115200
|
console=ttyS0,115200
|
||||||
cpu=armv7
|
|
||||||
fdt_high=0xffffffff
|
fdt_high=0xffffffff
|
||||||
fdtaddr=0x41800000
|
fdtaddr=0x41800000
|
||||||
loadaddr=0x41000000
|
loadaddr=0x41000000
|
||||||
loadfdt=load mmc 0:1 ${fdtaddr} sun8i-v3s-funkey.dtb
|
loadfdt=load mmc 0:1 ${fdtaddr} sun8i-v3s-funkey.dtb
|
||||||
loadimage=load mmc 0:1 ${loadaddr} uImage
|
loadimage=load mmc 0:1 ${loadaddr} uImage
|
||||||
serial#=12c000026a14b94a
|
|
||||||
soc=sunxi
|
|
||||||
stderr=serial@01c28000
|
stderr=serial@01c28000
|
||||||
stdin=serial@01c28000
|
stdin=serial@01c28000
|
||||||
stdout=serial@01c28000
|
stdout=serial@01c28000
|
||||||
|
|
|
@ -24,4 +24,6 @@ CONFIG_CMD_FAT=y
|
||||||
CONFIG_CMD_FS_GENERIC=y
|
CONFIG_CMD_FS_GENERIC=y
|
||||||
# CONFIG_ENV_IS_IN_FAT is not set
|
# CONFIG_ENV_IS_IN_FAT is not set
|
||||||
CONFIG_ENV_IS_IN_MMC=y
|
CONFIG_ENV_IS_IN_MMC=y
|
||||||
|
CONFIG_USE_DEFAULT_ENV_FILE=y
|
||||||
|
CONFIG_DEFAULT_ENV_FILE="$(BR2_EXTERNAL_FUNKEY_PATH)/board/funkey/rootfs-overlay/etc/u-boot.env"
|
||||||
# CONFIG_NET is not set
|
# CONFIG_NET is not set
|
||||||
|
|
Loading…
Reference in New Issue