|
Edited by ccwufu at 2015-10-11 22:24
u-boot & uImage:
support eEnv.txt & uInitrd(external, not embedded in uImage) for OPI-PC H3
can be used to support mulit-boot easily.
(another way is : cmdline.txt in embedded/external initramfs(initrd ))
files at boot partition
uEnv.txt
script.bin
uImage (without embedded initrd : rootfs.cpio.gz)
uInitrd (mkimage -A arm -T ramdisk -C none -n uInitrd -d /path/to/rootfs.cpio.gz /path/to/uInitrd)
cat uEnv.txt
scriptf=script.bin
uimagef=uImage
uinitrdf=uInitrd
mmc_root=/dev/mmcblk0p2
(mmc_root=/dev/mmcblk0p3 : if another OS in mmcblk0p3)
1)nano ./u-boot-2011.09/include/configs/sun8iw7p1.h
#define CONFIG_EXTRA_ENV_SETTINGS \
"bootdelay=3\0" \
"scriptaddr=0x44000000\0" \
"loadbootenv=" \
"fatload mmc 0:1 $scriptaddr uEnv.txt\0" \
"loaduenv=if run loadbootenv; then " \
"env import -t ${scriptaddr} ${filesize};" \
"fi\0" \
"bootcmd=run setargs_mmc loaduenv boot_normal\0" \
"console=ttyS0,115200\0" \
"nand_root=/dev/nandd\0" \
"mmc_root=/dev/mmcblk0p2\0" \
"scriptf=script.bin\0" \
"uimagef=uImage\0" \
"uinitrdf=uInitrd\0" \
"init=/init\0" \
"loglevel=8\0" \
"setargs_nand=setenv bootargs console=${console} root=${nand_root}" \
"init=${init} loglevel=${loglevel} partitions=${partitions}\0" \
"setargs_mmc=setenv bootargs console=${console} root=${mmc_root}" \
"init=${init} loglevel=${loglevel} partitions=${partitions}\0" \
"boot_normal=fatload mmc 0:1 0x43000000 ${scriptf};fatload mmc 0:1 40007800 ${uimagef};" \
"fatload mmc 0:1 50000000 ${uinitrdf};bootm 40007800 50000000\0" \
"boot_recovery=sunxi_flash read 40007800 recovery;boota 40007800\0" \
"boot_fastboot=fastboot\0"
2)nano ./github-lobo/OrangePI-Kernel/build/sun8iw7p1smp_lobo_defconfig.opi2
- CONFIG_INITRAMFS_SOURCE="output/rootfs.cpio.gz"
+ CONFIG_INITRAMFS_SOURCE=""
|
|