Skip to content
Snippets Groups Projects
Commit ed7c82aa authored by Jonas Höppner's avatar Jonas Höppner
Browse files

u-boot-imx: Rename generated fw_env.config to the correct name

The file was called fw_env.conf which is not read by fw_printenv

BCS 746-000600
parent 6c93ccfe
No related branches found
No related tags found
1 merge request!164u-boot-imx: Rename generated fw_env.config to the correct name
Pipeline #17256 passed with stage
in 24 seconds
Subproject commit 1aa51f580fdb33acf07dd460334f1cdd1b98fc4f
Subproject commit 77ada04ca6e1517ef1cca903a804880f5aea8843
......@@ -34,9 +34,9 @@ compile_mx8m() {
do_compile_append() {
# Integrate fw_env.conf and u-boot-initial-env
# Integrate fw_env.config and u-boot-initial-env
cp "${DEPLOY_DIR_IMAGE}/u-boot-initial-env-${MACHINE}-${UBOOT_CONFIG}.bin" "${S}"
cp "${DEPLOY_DIR_IMAGE}/fw_env-${MACHINE}-${UBOOT_CONFIG}.conf" "${S}"
cp "${DEPLOY_DIR_IMAGE}/fw_env-${MACHINE}-${UBOOT_CONFIG}.config" "${S}"
cd ${S}
......@@ -44,7 +44,7 @@ do_compile_append() {
# Store an md5sum to check the files on target before installation
md5sum ${BOOT_CONFIG_MACHINE}-${target} \
u-boot-initial-env-${MACHINE}-${UBOOT_CONFIG}.bin \
fw_env-${MACHINE}-${UBOOT_CONFIG}.conf \
fw_env-${MACHINE}-${UBOOT_CONFIG}.config \
> ${BOOT_CONFIG_MACHINE}-${target}.md5
done
cd -
......@@ -58,7 +58,7 @@ do_deploy_append() {
${BOOT_CONFIG_MACHINE}-${target} \
${BOOT_CONFIG_MACHINE}-${target}.md5 \
u-boot-initial-env-${MACHINE}-${UBOOT_CONFIG}.bin \
fw_env-${MACHINE}-${UBOOT_CONFIG}.conf
fw_env-${MACHINE}-${UBOOT_CONFIG}.config
cd -
cd ${DEPLOYDIR}
......
......@@ -26,7 +26,8 @@ SRC_URI_remove_imx8mpguf = " \
# but fw_printenv expects then name u-boot-initial-env
UBOOT_INITIAL_ENV = "u-boot-initial-env"
PACKAGES += "${PN}-fw-env"
FILES_${PN}-fw-env = "/etc/fw_env*conf"
FILES_${PN}-env_remove = "/etc/fw_env.config"
FILES_${PN}-fw-env = "/etc/fw_env*config"
# Create an uboot-initial-env.bin that can be dd'd to the env offset
# and then correctly read by u-boot and the libuboot-tools
......@@ -43,17 +44,17 @@ do_compile_append () {
then
# Generate the uboot-initial-env.bin
if [ -n "${UBOOT_INITIAL_ENV}" ]; then
# Generate u-boot-initial-conf.bin and fw_env.conf snippet
# Generate u-boot-initial-conf.bin and fw_env.config snippet
eval $( sed -n "/^CONFIG_ENV/p" ${B}/${config}/include/config/auto.conf )
# Set defaults if not found in auto.conf, needed for Tanaro 2019 u-boot
[ -n "$CONFIG_ENV_SIZE" ] || CONFIG_ENV_SIZE=0x2000
[ -n "$CONFIG_ENV_OFFSET" ] || CONFIG_ENV_OFFSET=0x400000
mkenvimage -s $CONFIG_ENV_SIZE -o ${B}/${config}/u-boot-initial-env.bin ${B}/${config}/u-boot-initial-env
echo "/dev/mmcblk0 $CONFIG_ENV_OFFSET $CONFIG_ENV_SIZE" > ${B}/${config}/fw_env.conf
echo "/dev/mmcblk0 $CONFIG_ENV_OFFSET $CONFIG_ENV_SIZE" > ${B}/${config}/fw_env.config
cp ${B}/${config}/u-boot-initial-env.bin ${B}/${config}/u-boot-initial-env-${type}.bin
cp ${B}/${config}/fw_env.conf ${B}/${config}/fw_env-${type}.conf
cp ${B}/${config}/fw_env.config ${B}/${config}/fw_env-${type}.config
fi
unset k
fi
......@@ -64,10 +65,10 @@ do_compile_append () {
else
# Generate the uboot-initial-env.bin
if [ -n "${UBOOT_INITIAL_ENV}" ]; then
# Generate u-boot-initial-conf.bin and fw_env.conf snippet
# Generate u-boot-initial-conf.bin and fw_env.config snippet
eval $( sed -n "/^CONFIG_ENV/p" ${B}/${config}/include/config/auto.conf )
mkenvimage -s $CONFIG_ENV_SIZE -o ${B}/${config}/u-boot-initial-env.bin
echo "/dev/mmcblk0 $CONFIG_ENV_OFFSET $CONFIG_ENV_SIZE" > ${B}/${config}/fw_env.conf
echo "/dev/mmcblk0 $CONFIG_ENV_OFFSET $CONFIG_ENV_SIZE" > ${B}/${config}/fw_env.config
fi
fi
}
......@@ -81,17 +82,17 @@ do_install_append () {
j=$(expr $j + 1);
if [ $j -eq $i ]
then
# Install the uboot-initial-env.bin and fw_env.conf
# Install the uboot-initial-env.bin and fw_env.config
if [ -n "${UBOOT_INITIAL_ENV}" ]; then
install -D -m 644 ${B}/${config}/u-boot-initial-env-${type}.bin ${D}/${sysconfdir}/${UBOOT_INITIAL_ENV}-${MACHINE}-${type}-${PV}-${PR}.bin
ln -sf ${UBOOT_INITIAL_ENV}-${MACHINE}-${type}-${PV}-${PR}.bin ${D}/${sysconfdir}/${UBOOT_INITIAL_ENV}-${MACHINE}-${type}.bin
ln -sf ${UBOOT_INITIAL_ENV}-${MACHINE}-${type}-${PV}-${PR}.bin ${D}/${sysconfdir}/${UBOOT_INITIAL_ENV}-${type}.bin
ln -sf ${UBOOT_INITIAL_ENV}-${MACHINE}-${type}-${PV}-${PR}.bin ${D}/${sysconfdir}/${UBOOT_INITIAL_ENV}.bin
install -D -m 644 ${B}/${config}/fw_env-${type}.conf ${D}/${sysconfdir}/fw_env-${MACHINE}-${type}-${PV}-${PR}.conf
ln -sf fw_env-${MACHINE}-${type}-${PV}-${PR}.conf ${D}/${sysconfdir}/fw_env-${MACHINE}-${type}.conf
ln -sf fw_env-${MACHINE}-${type}-${PV}-${PR}.conf ${D}/${sysconfdir}/fw_env-${type}.conf
ln -sf fw_env-${MACHINE}-${type}-${PV}-${PR}.conf ${D}/${sysconfdir}/fw_env.conf
install -D -m 644 ${B}/${config}/fw_env-${type}.config ${D}/${sysconfdir}/fw_env-${MACHINE}-${type}-${PV}-${PR}.config
ln -sf fw_env-${MACHINE}-${type}-${PV}-${PR}.config ${D}/${sysconfdir}/fw_env-${MACHINE}-${type}.config
ln -sf fw_env-${MACHINE}-${type}-${PV}-${PR}.config ${D}/${sysconfdir}/fw_env-${type}.config
ln -sf fw_env-${MACHINE}-${type}-${PV}-${PR}.config ${D}/${sysconfdir}/fw_env.config
fi
fi
done
......@@ -99,15 +100,15 @@ do_install_append () {
done
unset i
else
# Install the uboot-initial-env.bin and fw_env.conf
# Install the uboot-initial-env.bin and fw_env.config
if [ -n "${UBOOT_INITIAL_ENV}" ]; then
install -D -m 644 ${B}/u-boot-initial-env.bin ${D}/${sysconfdir}/${UBOOT_INITIAL_ENV}-${MACHINE}-${PV}-${PR}.bin
ln -sf ${UBOOT_INITIAL_ENV}-${MACHINE}-${PV}-${PR}.bin ${D}/${sysconfdir}/${UBOOT_INITIAL_ENV}-${MACHINE}.bin
ln -sf ${UBOOT_INITIAL_ENV}-${MACHINE}-${PV}-${PR}.bin ${D}/${sysconfdir}/${UBOOT_INITIAL_ENV}.bin
install -D -m 644 ${B}/fw_env.conf ${D}/${sysconfdir}/fw_env-${MACHINE}-${PV}-${PR}.conf
ln -sf fw_env-${MACHINE}-${PV}-${PR}.conf ${D}/${sysconfdir}/fw_env-${MACHINE}.conf
ln -sf fw_env-${MACHINE}-${PV}-${PR}.conf ${D}/${sysconfdir}/fw_env.conf
install -D -m 644 ${B}/fw_env.config ${D}/${sysconfdir}/fw_env-${MACHINE}-${PV}-${PR}.config
ln -sf fw_env-${MACHINE}-${PV}-${PR}.config ${D}/${sysconfdir}/fw_env-${MACHINE}.config
ln -sf fw_env-${MACHINE}-${PV}-${PR}.config ${D}/${sysconfdir}/fw_env.config
fi
fi
}
......@@ -121,17 +122,17 @@ do_deploy_append () {
j=$(expr $j + 1);
if [ $j -eq $i ]
then
# Deploy the uboot-initial-env.bin and fw_env.conf
# Deploy the uboot-initial-env.bin and fw_env.config
if [ -n "${UBOOT_INITIAL_ENV}" ]; then
install -D -m 644 "${B}/${config}/u-boot-initial-env-${type}.bin" ${DEPLOYDIR}/${UBOOT_INITIAL_ENV}-${MACHINE}-${type}-${PV}-${PR}.bin
cd ${DEPLOYDIR}
ln -sf ${UBOOT_INITIAL_ENV}-${MACHINE}-${type}-${PV}-${PR}.bin ${UBOOT_INITIAL_ENV}-${MACHINE}-${type}.bin
ln -sf ${UBOOT_INITIAL_ENV}-${MACHINE}-${type}-${PV}-${PR}.bin ${UBOOT_INITIAL_ENV}-${type}.bin
install -D -m 644 "${B}/${config}/fw_env-${type}.conf" ${DEPLOYDIR}/fw_env-${MACHINE}-${type}-${PV}-${PR}.conf
install -D -m 644 "${B}/${config}/fw_env-${type}.config" ${DEPLOYDIR}/fw_env-${MACHINE}-${type}-${PV}-${PR}.config
cd ${DEPLOYDIR}
ln -sf fw_env-${MACHINE}-${type}-${PV}-${PR}.conf fw_env-${MACHINE}-${type}.conf
ln -sf fw_env-${MACHINE}-${type}-${PV}-${PR}.conf fw_env-${type}.conf
ln -sf fw_env-${MACHINE}-${type}-${PV}-${PR}.config fw_env-${MACHINE}-${type}.config
ln -sf fw_env-${MACHINE}-${type}-${PV}-${PR}.config fw_env-${type}.config
fi
fi
done
......@@ -139,17 +140,17 @@ do_deploy_append () {
done
unset i
else
# Deploy the uboot-initial-env and fw_env.conf
# Deploy the uboot-initial-env and fw_env.config
if [ -n "${UBOOT_INITIAL_ENV}" ]; then
install -D -m 644 ${B}/${config}/u-boot-initial-env.bin ${DEPLOYDIR}/${UBOOT_INITIAL_ENV}-${MACHINE}-${PV}-${PR}.bin
cd ${DEPLOYDIR}
ln -sf ${UBOOT_INITIAL_ENV}-${MACHINE}-${PV}-${PR}.bin ${UBOOT_INITIAL_ENV}-${MACHINE}.bin
ln -sf ${UBOOT_INITIAL_ENV}-${MACHINE}-${PV}-${PR}.bin ${UBOOT_INITIAL_ENV}.bin
install -D -m 644 ${B}/${config}/fw_env.conf ${DEPLOYDIR}/fw_env-${MACHINE}-${PV}-${PR}.conf
install -D -m 644 ${B}/${config}/fw_env.config ${DEPLOYDIR}/fw_env-${MACHINE}-${PV}-${PR}.config
cd ${DEPLOYDIR}
ln -sf fw_env-${MACHINE}-${PV}-${PR}.conf fw_env-${MACHINE}.conf
ln -sf fw_env-${MACHINE}-${PV}-${PR}.conf fw_env.conf
ln -sf fw_env-${MACHINE}-${PV}-${PR}.config fw_env-${MACHINE}.config
ln -sf fw_env-${MACHINE}-${PV}-${PR}.config fw_env.config
fi
fi
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment