mirror of
https://github.com/godotengine/buildroot.git
synced 2026-01-14 02:09:48 +03:00
Compare commits
6 Commits
2020.08
...
yem/docker
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3d4b21dac1 | ||
|
|
0813d8a324 | ||
|
|
bcf890301f | ||
|
|
c15a40e128 | ||
|
|
5e264875e0 | ||
|
|
14fc4fe1ed |
544
.gitlab-ci.yml
544
.gitlab-ci.yml
@@ -1,23 +1,533 @@
|
||||
# Configuration for Gitlab-CI.
|
||||
# Builds appear on https://gitlab.com/buildroot.org/buildroot/pipelines
|
||||
# The .gitlab-ci.yml file is generated from .gitlab-ci.yml.in.
|
||||
# It needs to be regenerated every time a defconfig is added, using
|
||||
# "make .gitlab-ci.yml".
|
||||
|
||||
image: buildroot/base:20200814.2228
|
||||
image: buildroot/base:20191027.2027
|
||||
|
||||
stages:
|
||||
- generate-gitlab-ci
|
||||
- build
|
||||
.check_base:
|
||||
except:
|
||||
- /^.*-.*_defconfig$/
|
||||
- /^.*-tests\..*$/
|
||||
|
||||
generate-gitlab-ci-yml:
|
||||
stage: generate-gitlab-ci
|
||||
script: ./support/scripts/generate-gitlab-ci-yml support/misc/gitlab-ci.yml.in > generated-gitlab-ci.yml
|
||||
artifacts:
|
||||
paths:
|
||||
- generated-gitlab-ci.yml
|
||||
check-DEVELOPERS:
|
||||
extends: .check_base
|
||||
# get-developers should print just "No action specified"; if it prints
|
||||
# anything else, it's a parse error.
|
||||
# The initial ! is removed by YAML so we need to quote it.
|
||||
script:
|
||||
- "! utils/get-developers | grep -v 'No action specified'"
|
||||
|
||||
buildroot-pipeline:
|
||||
stage: build
|
||||
trigger:
|
||||
include:
|
||||
- artifact: generated-gitlab-ci.yml
|
||||
job: generate-gitlab-ci-yml
|
||||
strategy: depend
|
||||
check-flake8:
|
||||
extends: .check_base
|
||||
before_script:
|
||||
# Help flake8 to find the Python files without .py extension.
|
||||
- find * -type f -name '*.py' > files.txt
|
||||
- find * -type f -print0 | xargs -0 file | grep 'Python script' | cut -d':' -f1 >> files.txt
|
||||
- sort -u files.txt | tee files.processed
|
||||
script:
|
||||
- python -m flake8 --statistics --count --max-line-length=132 $(cat files.processed)
|
||||
after_script:
|
||||
- wc -l files.processed
|
||||
|
||||
check-gitlab-ci.yml:
|
||||
extends: .check_base
|
||||
script:
|
||||
- mv .gitlab-ci.yml .gitlab-ci.yml.orig
|
||||
- make .gitlab-ci.yml
|
||||
- diff -u .gitlab-ci.yml.orig .gitlab-ci.yml
|
||||
|
||||
check-package:
|
||||
extends: .check_base
|
||||
script:
|
||||
- make check-package
|
||||
|
||||
.defconfig_base:
|
||||
script:
|
||||
- echo "Configure Buildroot for ${DEFCONFIG_NAME}"
|
||||
- make ${DEFCONFIG_NAME}
|
||||
- echo 'Build buildroot'
|
||||
- |
|
||||
make > >(tee build.log |grep '>>>') 2>&1 || {
|
||||
echo 'Failed build last output'
|
||||
tail -200 build.log
|
||||
exit 1
|
||||
}
|
||||
- |
|
||||
./support/scripts/boot-qemu-image.py "${DEFCONFIG_NAME}" > >(tee runtime-test.log) 2>&1 || {
|
||||
echo 'Failed runtime test last output'
|
||||
tail -200 runtime-test.log
|
||||
exit 1
|
||||
}
|
||||
artifacts:
|
||||
when: always
|
||||
expire_in: 2 weeks
|
||||
paths:
|
||||
- .config
|
||||
- build.log
|
||||
- output/images/
|
||||
- output/build/build-time.log
|
||||
- output/build/packages-file-list.txt
|
||||
- output/build/*/.config
|
||||
- runtime-test.log
|
||||
|
||||
.defconfig:
|
||||
extends: .defconfig_base
|
||||
# Running the defconfigs for every push is too much, so limit to
|
||||
# explicit triggers through the API.
|
||||
only:
|
||||
- triggers
|
||||
- tags
|
||||
- /-defconfigs$/
|
||||
before_script:
|
||||
- DEFCONFIG_NAME=${CI_JOB_NAME}
|
||||
|
||||
one-defconfig:
|
||||
extends: .defconfig_base
|
||||
only:
|
||||
- /^.*-.*_defconfig$/
|
||||
before_script:
|
||||
- DEFCONFIG_NAME=$(echo ${CI_COMMIT_REF_NAME} | sed -e 's,^.*-,,g')
|
||||
|
||||
.runtime_test_base:
|
||||
# Keep build directories so the rootfs can be an artifact of the job. The
|
||||
# runner will clean up those files for us.
|
||||
# Multiply every emulator timeout by 10 to avoid sporadic failures in
|
||||
# elastic runners.
|
||||
script:
|
||||
- echo "Starting runtime test ${TEST_CASE_NAME}"
|
||||
- ./support/testing/run-tests -o test-output/ -d test-dl/ -k --timeout-multiplier 10 ${TEST_CASE_NAME}
|
||||
artifacts:
|
||||
when: always
|
||||
expire_in: 2 weeks
|
||||
paths:
|
||||
- test-output/*.log
|
||||
- test-output/*/.config
|
||||
- test-output/*/images/*
|
||||
|
||||
.runtime_test:
|
||||
extends: .runtime_test_base
|
||||
# Running the runtime tests for every push is too much, so limit to
|
||||
# explicit triggers through the API.
|
||||
only:
|
||||
- triggers
|
||||
- tags
|
||||
- /-runtime-tests$/
|
||||
before_script:
|
||||
- TEST_CASE_NAME=${CI_JOB_NAME}
|
||||
|
||||
one-runtime_test:
|
||||
extends: .runtime_test_base
|
||||
only:
|
||||
- /^.*-tests\..*$/
|
||||
before_script:
|
||||
- TEST_CASE_NAME=$(echo ${CI_COMMIT_REF_NAME} | sed -e 's,^.*-,,g')
|
||||
aarch64_efi_defconfig: { extends: .defconfig }
|
||||
acmesystems_aria_g25_128mb_defconfig: { extends: .defconfig }
|
||||
acmesystems_aria_g25_256mb_defconfig: { extends: .defconfig }
|
||||
acmesystems_arietta_g25_128mb_defconfig: { extends: .defconfig }
|
||||
acmesystems_arietta_g25_256mb_defconfig: { extends: .defconfig }
|
||||
amarula_a64_relic_defconfig: { extends: .defconfig }
|
||||
amarula_vyasa_rk3288_defconfig: { extends: .defconfig }
|
||||
andes_ae3xx_defconfig: { extends: .defconfig }
|
||||
arcturus_ucls1012a_defconfig: { extends: .defconfig }
|
||||
arcturus_ucp1020_defconfig: { extends: .defconfig }
|
||||
arm_foundationv8_defconfig: { extends: .defconfig }
|
||||
arm_juno_defconfig: { extends: .defconfig }
|
||||
armadeus_apf27_defconfig: { extends: .defconfig }
|
||||
armadeus_apf28_defconfig: { extends: .defconfig }
|
||||
armadeus_apf51_defconfig: { extends: .defconfig }
|
||||
asus_tinker_rk3288_defconfig: { extends: .defconfig }
|
||||
at91sam9260eknf_defconfig: { extends: .defconfig }
|
||||
at91sam9g20dfc_defconfig: { extends: .defconfig }
|
||||
at91sam9g45m10ek_defconfig: { extends: .defconfig }
|
||||
at91sam9rlek_defconfig: { extends: .defconfig }
|
||||
at91sam9x5ek_defconfig: { extends: .defconfig }
|
||||
at91sam9x5ek_dev_defconfig: { extends: .defconfig }
|
||||
at91sam9x5ek_mmc_defconfig: { extends: .defconfig }
|
||||
at91sam9x5ek_mmc_dev_defconfig: { extends: .defconfig }
|
||||
atmel_sama5d27_som1_ek_mmc_dev_defconfig: { extends: .defconfig }
|
||||
atmel_sama5d2_xplained_mmc_defconfig: { extends: .defconfig }
|
||||
atmel_sama5d2_xplained_mmc_dev_defconfig: { extends: .defconfig }
|
||||
atmel_sama5d3_xplained_defconfig: { extends: .defconfig }
|
||||
atmel_sama5d3_xplained_dev_defconfig: { extends: .defconfig }
|
||||
atmel_sama5d3_xplained_mmc_defconfig: { extends: .defconfig }
|
||||
atmel_sama5d3_xplained_mmc_dev_defconfig: { extends: .defconfig }
|
||||
atmel_sama5d3xek_defconfig: { extends: .defconfig }
|
||||
atmel_sama5d4_xplained_defconfig: { extends: .defconfig }
|
||||
atmel_sama5d4_xplained_dev_defconfig: { extends: .defconfig }
|
||||
atmel_sama5d4_xplained_mmc_defconfig: { extends: .defconfig }
|
||||
atmel_sama5d4_xplained_mmc_dev_defconfig: { extends: .defconfig }
|
||||
bananapi_m1_defconfig: { extends: .defconfig }
|
||||
bananapi_m2_plus_defconfig: { extends: .defconfig }
|
||||
bananapi_m2_ultra_defconfig: { extends: .defconfig }
|
||||
bananapi_m64_defconfig: { extends: .defconfig }
|
||||
bananapro_defconfig: { extends: .defconfig }
|
||||
beagleboardx15_defconfig: { extends: .defconfig }
|
||||
beaglebone_defconfig: { extends: .defconfig }
|
||||
beaglebone_qt5_defconfig: { extends: .defconfig }
|
||||
beagleboneai_defconfig: { extends: .defconfig }
|
||||
beelink_gs1_defconfig: { extends: .defconfig }
|
||||
chromebook_snow_defconfig: { extends: .defconfig }
|
||||
ci20_defconfig: { extends: .defconfig }
|
||||
csky_gx6605s_defconfig: { extends: .defconfig }
|
||||
cubieboard2_defconfig: { extends: .defconfig }
|
||||
engicam_imx6qdl_icore_defconfig: { extends: .defconfig }
|
||||
engicam_imx6qdl_icore_qt5_defconfig: { extends: .defconfig }
|
||||
engicam_imx6qdl_icore_rqs_defconfig: { extends: .defconfig }
|
||||
engicam_imx6ul_geam_defconfig: { extends: .defconfig }
|
||||
engicam_imx6ul_isiot_defconfig: { extends: .defconfig }
|
||||
freescale_imx28evk_defconfig: { extends: .defconfig }
|
||||
freescale_imx6dlsabreauto_defconfig: { extends: .defconfig }
|
||||
freescale_imx6dlsabresd_defconfig: { extends: .defconfig }
|
||||
freescale_imx6qsabreauto_defconfig: { extends: .defconfig }
|
||||
freescale_imx6qsabresd_defconfig: { extends: .defconfig }
|
||||
freescale_imx6sxsabresd_defconfig: { extends: .defconfig }
|
||||
freescale_imx6ullevk_defconfig: { extends: .defconfig }
|
||||
freescale_imx7dsabresd_defconfig: { extends: .defconfig }
|
||||
freescale_imx8mmevk_defconfig: { extends: .defconfig }
|
||||
freescale_imx8mnevk_defconfig: { extends: .defconfig }
|
||||
freescale_imx8mqevk_defconfig: { extends: .defconfig }
|
||||
freescale_imx8qmmek_defconfig: { extends: .defconfig }
|
||||
freescale_imx8qxpmek_defconfig: { extends: .defconfig }
|
||||
freescale_p1025twr_defconfig: { extends: .defconfig }
|
||||
freescale_t1040d4rdb_defconfig: { extends: .defconfig }
|
||||
freescale_t2080_qds_rdb_defconfig: { extends: .defconfig }
|
||||
friendlyarm_nanopi_a64_defconfig: { extends: .defconfig }
|
||||
friendlyarm_nanopi_neo2_defconfig: { extends: .defconfig }
|
||||
friendlyarm_nanopi_neo_plus2_defconfig: { extends: .defconfig }
|
||||
galileo_defconfig: { extends: .defconfig }
|
||||
grinn_chiliboard_defconfig: { extends: .defconfig }
|
||||
grinn_liteboard_defconfig: { extends: .defconfig }
|
||||
hifive_unleashed_defconfig: { extends: .defconfig }
|
||||
imx23evk_defconfig: { extends: .defconfig }
|
||||
imx6-sabreauto_defconfig: { extends: .defconfig }
|
||||
imx6-sabresd_defconfig: { extends: .defconfig }
|
||||
imx6-sabresd_qt5_defconfig: { extends: .defconfig }
|
||||
imx6slevk_defconfig: { extends: .defconfig }
|
||||
imx6sx-sdb_defconfig: { extends: .defconfig }
|
||||
imx6ulevk_defconfig: { extends: .defconfig }
|
||||
imx6ulpico_defconfig: { extends: .defconfig }
|
||||
imx7d-sdb_defconfig: { extends: .defconfig }
|
||||
imx7dpico_defconfig: { extends: .defconfig }
|
||||
imx8mmpico_defconfig: { extends: .defconfig }
|
||||
imx8mpico_defconfig: { extends: .defconfig }
|
||||
lafrite_defconfig: { extends: .defconfig }
|
||||
lego_ev3_defconfig: { extends: .defconfig }
|
||||
licheepi_zero_defconfig: { extends: .defconfig }
|
||||
linksprite_pcduino_defconfig: { extends: .defconfig }
|
||||
minnowboard_max-graphical_defconfig: { extends: .defconfig }
|
||||
minnowboard_max_defconfig: { extends: .defconfig }
|
||||
mx25pdk_defconfig: { extends: .defconfig }
|
||||
mx51evk_defconfig: { extends: .defconfig }
|
||||
mx53loco_defconfig: { extends: .defconfig }
|
||||
mx6cubox_defconfig: { extends: .defconfig }
|
||||
mx6sx_udoo_neo_defconfig: { extends: .defconfig }
|
||||
mx6udoo_defconfig: { extends: .defconfig }
|
||||
nanopi_m1_defconfig: { extends: .defconfig }
|
||||
nanopi_m1_plus_defconfig: { extends: .defconfig }
|
||||
nanopi_neo4_defconfig: { extends: .defconfig }
|
||||
nanopi_neo_defconfig: { extends: .defconfig }
|
||||
nanopi_r1_defconfig: { extends: .defconfig }
|
||||
nexbox_a95x_defconfig: { extends: .defconfig }
|
||||
nitrogen6sx_defconfig: { extends: .defconfig }
|
||||
nitrogen6x_defconfig: { extends: .defconfig }
|
||||
nitrogen7_defconfig: { extends: .defconfig }
|
||||
nitrogen8m_defconfig: { extends: .defconfig }
|
||||
nitrogen8mm_defconfig: { extends: .defconfig }
|
||||
nitrogen8mn_defconfig: { extends: .defconfig }
|
||||
odroidxu4_defconfig: { extends: .defconfig }
|
||||
olimex_a10_olinuxino_lime_defconfig: { extends: .defconfig }
|
||||
olimex_a13_olinuxino_defconfig: { extends: .defconfig }
|
||||
olimex_a20_olinuxino_lime2_defconfig: { extends: .defconfig }
|
||||
olimex_a20_olinuxino_lime_defconfig: { extends: .defconfig }
|
||||
olimex_a20_olinuxino_micro_defconfig: { extends: .defconfig }
|
||||
olimex_a33_olinuxino_defconfig: { extends: .defconfig }
|
||||
olimex_a64_olinuxino_defconfig: { extends: .defconfig }
|
||||
olimex_imx233_olinuxino_defconfig: { extends: .defconfig }
|
||||
olpc_xo175_defconfig: { extends: .defconfig }
|
||||
olpc_xo1_defconfig: { extends: .defconfig }
|
||||
openblocks_a6_defconfig: { extends: .defconfig }
|
||||
orangepi_lite2_defconfig: { extends: .defconfig }
|
||||
orangepi_lite_defconfig: { extends: .defconfig }
|
||||
orangepi_one_defconfig: { extends: .defconfig }
|
||||
orangepi_one_plus_defconfig: { extends: .defconfig }
|
||||
orangepi_pc2_defconfig: { extends: .defconfig }
|
||||
orangepi_pc_defconfig: { extends: .defconfig }
|
||||
orangepi_pc_plus_defconfig: { extends: .defconfig }
|
||||
orangepi_plus_defconfig: { extends: .defconfig }
|
||||
orangepi_prime_defconfig: { extends: .defconfig }
|
||||
orangepi_r1_defconfig: { extends: .defconfig }
|
||||
orangepi_win_defconfig: { extends: .defconfig }
|
||||
orangepi_zero_defconfig: { extends: .defconfig }
|
||||
orangepi_zero_plus2_defconfig: { extends: .defconfig }
|
||||
pandaboard_defconfig: { extends: .defconfig }
|
||||
pc_x86_64_bios_defconfig: { extends: .defconfig }
|
||||
pc_x86_64_efi_defconfig: { extends: .defconfig }
|
||||
pine64_defconfig: { extends: .defconfig }
|
||||
pine64_sopine_defconfig: { extends: .defconfig }
|
||||
qemu_aarch64_virt_defconfig: { extends: .defconfig }
|
||||
qemu_arm_versatile_defconfig: { extends: .defconfig }
|
||||
qemu_arm_versatile_nommu_defconfig: { extends: .defconfig }
|
||||
qemu_arm_vexpress_defconfig: { extends: .defconfig }
|
||||
qemu_arm_vexpress_tz_defconfig: { extends: .defconfig }
|
||||
qemu_csky610_virt_defconfig: { extends: .defconfig }
|
||||
qemu_csky807_virt_defconfig: { extends: .defconfig }
|
||||
qemu_csky810_virt_defconfig: { extends: .defconfig }
|
||||
qemu_csky860_virt_defconfig: { extends: .defconfig }
|
||||
qemu_m68k_mcf5208_defconfig: { extends: .defconfig }
|
||||
qemu_m68k_q800_defconfig: { extends: .defconfig }
|
||||
qemu_microblazebe_mmu_defconfig: { extends: .defconfig }
|
||||
qemu_microblazeel_mmu_defconfig: { extends: .defconfig }
|
||||
qemu_mips32r2_malta_defconfig: { extends: .defconfig }
|
||||
qemu_mips32r2el_malta_defconfig: { extends: .defconfig }
|
||||
qemu_mips32r6_malta_defconfig: { extends: .defconfig }
|
||||
qemu_mips32r6el_malta_defconfig: { extends: .defconfig }
|
||||
qemu_mips64_malta_defconfig: { extends: .defconfig }
|
||||
qemu_mips64el_malta_defconfig: { extends: .defconfig }
|
||||
qemu_mips64r6_malta_defconfig: { extends: .defconfig }
|
||||
qemu_mips64r6el_malta_defconfig: { extends: .defconfig }
|
||||
qemu_nios2_10m50_defconfig: { extends: .defconfig }
|
||||
qemu_or1k_defconfig: { extends: .defconfig }
|
||||
qemu_ppc64_e5500_defconfig: { extends: .defconfig }
|
||||
qemu_ppc64_pseries_defconfig: { extends: .defconfig }
|
||||
qemu_ppc64le_pseries_defconfig: { extends: .defconfig }
|
||||
qemu_ppc_g3beige_defconfig: { extends: .defconfig }
|
||||
qemu_ppc_mac99_defconfig: { extends: .defconfig }
|
||||
qemu_ppc_mpc8544ds_defconfig: { extends: .defconfig }
|
||||
qemu_ppc_virtex_ml507_defconfig: { extends: .defconfig }
|
||||
qemu_riscv32_virt_defconfig: { extends: .defconfig }
|
||||
qemu_riscv64_virt_defconfig: { extends: .defconfig }
|
||||
qemu_sh4_r2d_defconfig: { extends: .defconfig }
|
||||
qemu_sh4eb_r2d_defconfig: { extends: .defconfig }
|
||||
qemu_sparc64_sun4u_defconfig: { extends: .defconfig }
|
||||
qemu_sparc_ss10_defconfig: { extends: .defconfig }
|
||||
qemu_x86_64_defconfig: { extends: .defconfig }
|
||||
qemu_x86_defconfig: { extends: .defconfig }
|
||||
qemu_xtensa_lx60_defconfig: { extends: .defconfig }
|
||||
qemu_xtensa_lx60_nommu_defconfig: { extends: .defconfig }
|
||||
raspberrypi0_defconfig: { extends: .defconfig }
|
||||
raspberrypi0w_defconfig: { extends: .defconfig }
|
||||
raspberrypi2_defconfig: { extends: .defconfig }
|
||||
raspberrypi3_64_defconfig: { extends: .defconfig }
|
||||
raspberrypi3_defconfig: { extends: .defconfig }
|
||||
raspberrypi3_qt5we_defconfig: { extends: .defconfig }
|
||||
raspberrypi4_64_defconfig: { extends: .defconfig }
|
||||
raspberrypi4_defconfig: { extends: .defconfig }
|
||||
raspberrypi_defconfig: { extends: .defconfig }
|
||||
riotboard_defconfig: { extends: .defconfig }
|
||||
roc_pc_rk3399_defconfig: { extends: .defconfig }
|
||||
rock64_defconfig: { extends: .defconfig }
|
||||
roseapplepi_defconfig: { extends: .defconfig }
|
||||
s6lx9_microboard_defconfig: { extends: .defconfig }
|
||||
sheevaplug_defconfig: { extends: .defconfig }
|
||||
snps_aarch64_vdk_defconfig: { extends: .defconfig }
|
||||
snps_arc700_axs101_defconfig: { extends: .defconfig }
|
||||
snps_archs38_axs103_defconfig: { extends: .defconfig }
|
||||
snps_archs38_haps_defconfig: { extends: .defconfig }
|
||||
snps_archs38_hsdk_defconfig: { extends: .defconfig }
|
||||
snps_archs38_vdk_defconfig: { extends: .defconfig }
|
||||
socrates_cyclone5_defconfig: { extends: .defconfig }
|
||||
solidrun_clearfog_defconfig: { extends: .defconfig }
|
||||
solidrun_clearfog_gt_8k_defconfig: { extends: .defconfig }
|
||||
solidrun_macchiatobin_defconfig: { extends: .defconfig }
|
||||
stm32f429_disco_defconfig: { extends: .defconfig }
|
||||
stm32f469_disco_defconfig: { extends: .defconfig }
|
||||
stm32mp157a_dk1_defconfig: { extends: .defconfig }
|
||||
stm32mp157c_dk2_defconfig: { extends: .defconfig }
|
||||
toradex_apalis_imx6_defconfig: { extends: .defconfig }
|
||||
ts4900_defconfig: { extends: .defconfig }
|
||||
ts5500_defconfig: { extends: .defconfig }
|
||||
ts7680_defconfig: { extends: .defconfig }
|
||||
wandboard_defconfig: { extends: .defconfig }
|
||||
warp7_defconfig: { extends: .defconfig }
|
||||
warpboard_defconfig: { extends: .defconfig }
|
||||
zynq_microzed_defconfig: { extends: .defconfig }
|
||||
zynq_qmtech_defconfig: { extends: .defconfig }
|
||||
zynq_zc706_defconfig: { extends: .defconfig }
|
||||
zynq_zed_defconfig: { extends: .defconfig }
|
||||
zynqmp_zcu106_defconfig: { extends: .defconfig }
|
||||
tests.boot.test_atf.TestATFAllwinner: { extends: .runtime_test }
|
||||
tests.boot.test_atf.TestATFMarvell: { extends: .runtime_test }
|
||||
tests.boot.test_atf.TestATFVexpress: { extends: .runtime_test }
|
||||
tests.boot.test_syslinux.TestSysLinuxX86EFI: { extends: .runtime_test }
|
||||
tests.boot.test_syslinux.TestSysLinuxX86LegacyBios: { extends: .runtime_test }
|
||||
tests.boot.test_syslinux.TestSysLinuxX86_64EFI: { extends: .runtime_test }
|
||||
tests.boot.test_syslinux.TestSysLinuxX86_64LegacyBios: { extends: .runtime_test }
|
||||
tests.core.test_file_capabilities.TestFileCapabilities: { extends: .runtime_test }
|
||||
tests.core.test_hardening.TestFortifyConserv: { extends: .runtime_test }
|
||||
tests.core.test_hardening.TestFortifyNone: { extends: .runtime_test }
|
||||
tests.core.test_hardening.TestRelro: { extends: .runtime_test }
|
||||
tests.core.test_hardening.TestRelroPartial: { extends: .runtime_test }
|
||||
tests.core.test_hardening.TestSspNone: { extends: .runtime_test }
|
||||
tests.core.test_hardening.TestSspStrong: { extends: .runtime_test }
|
||||
tests.core.test_post_scripts.TestPostScripts: { extends: .runtime_test }
|
||||
tests.core.test_root_password.TestRootPassword: { extends: .runtime_test }
|
||||
tests.core.test_rootfs_overlay.TestRootfsOverlay: { extends: .runtime_test }
|
||||
tests.core.test_timezone.TestGlibcAllTimezone: { extends: .runtime_test }
|
||||
tests.core.test_timezone.TestGlibcNonDefaultLimitedTimezone: { extends: .runtime_test }
|
||||
tests.core.test_timezone.TestNoTimezone: { extends: .runtime_test }
|
||||
tests.download.test_git.TestGitHash: { extends: .runtime_test }
|
||||
tests.download.test_git.TestGitRefs: { extends: .runtime_test }
|
||||
tests.fs.test_ext.TestExt2: { extends: .runtime_test }
|
||||
tests.fs.test_ext.TestExt2r1: { extends: .runtime_test }
|
||||
tests.fs.test_ext.TestExt3: { extends: .runtime_test }
|
||||
tests.fs.test_ext.TestExt4: { extends: .runtime_test }
|
||||
tests.fs.test_f2fs.TestF2FS: { extends: .runtime_test }
|
||||
tests.fs.test_iso9660.TestIso9660Grub2External: { extends: .runtime_test }
|
||||
tests.fs.test_iso9660.TestIso9660Grub2ExternalCompress: { extends: .runtime_test }
|
||||
tests.fs.test_iso9660.TestIso9660Grub2Internal: { extends: .runtime_test }
|
||||
tests.fs.test_iso9660.TestIso9660SyslinuxExternal: { extends: .runtime_test }
|
||||
tests.fs.test_iso9660.TestIso9660SyslinuxExternalCompress: { extends: .runtime_test }
|
||||
tests.fs.test_iso9660.TestIso9660SyslinuxInternal: { extends: .runtime_test }
|
||||
tests.fs.test_jffs2.TestJffs2: { extends: .runtime_test }
|
||||
tests.fs.test_squashfs.TestSquashfs: { extends: .runtime_test }
|
||||
tests.fs.test_ubi.TestUbi: { extends: .runtime_test }
|
||||
tests.fs.test_yaffs2.TestYaffs2: { extends: .runtime_test }
|
||||
tests.init.test_busybox.TestInitSystemBusyboxRo: { extends: .runtime_test }
|
||||
tests.init.test_busybox.TestInitSystemBusyboxRoNet: { extends: .runtime_test }
|
||||
tests.init.test_busybox.TestInitSystemBusyboxRw: { extends: .runtime_test }
|
||||
tests.init.test_busybox.TestInitSystemBusyboxRwNet: { extends: .runtime_test }
|
||||
tests.init.test_none.TestInitSystemNone: { extends: .runtime_test }
|
||||
tests.init.test_openrc.TestInitSystemOpenrcRoFull: { extends: .runtime_test }
|
||||
tests.init.test_openrc.TestInitSystemOpenrcRwFull: { extends: .runtime_test }
|
||||
tests.init.test_systemd.TestInitSystemSystemdRoFull: { extends: .runtime_test }
|
||||
tests.init.test_systemd.TestInitSystemSystemdRoIfupdown: { extends: .runtime_test }
|
||||
tests.init.test_systemd.TestInitSystemSystemdRoNetworkd: { extends: .runtime_test }
|
||||
tests.init.test_systemd.TestInitSystemSystemdRwFull: { extends: .runtime_test }
|
||||
tests.init.test_systemd.TestInitSystemSystemdRwIfupdown: { extends: .runtime_test }
|
||||
tests.init.test_systemd.TestInitSystemSystemdRwNetworkd: { extends: .runtime_test }
|
||||
tests.package.test_atop.TestAtop: { extends: .runtime_test }
|
||||
tests.package.test_crudini.TestCrudiniPy2: { extends: .runtime_test }
|
||||
tests.package.test_crudini.TestCrudiniPy3: { extends: .runtime_test }
|
||||
tests.package.test_docker_compose.TestDockerCompose: { extends: .runtime_test }
|
||||
tests.package.test_dropbear.TestDropbear: { extends: .runtime_test }
|
||||
tests.package.test_glxinfo.TestGlxinfo: { extends: .runtime_test }
|
||||
tests.package.test_gst1_python.TestGst1Python: { extends: .runtime_test }
|
||||
tests.package.test_ipython.TestIPythonPy3: { extends: .runtime_test }
|
||||
tests.package.test_libftdi1.TestPythonPy2Libftdi1: { extends: .runtime_test }
|
||||
tests.package.test_libftdi1.TestPythonPy3Libftdi1: { extends: .runtime_test }
|
||||
tests.package.test_lpeg.TestLuaLPeg: { extends: .runtime_test }
|
||||
tests.package.test_lpeg.TestLuajitLPeg: { extends: .runtime_test }
|
||||
tests.package.test_lsqlite3.TestLuaLsqlite3: { extends: .runtime_test }
|
||||
tests.package.test_lsqlite3.TestLuajitLsqlite3: { extends: .runtime_test }
|
||||
tests.package.test_lua.TestLua: { extends: .runtime_test }
|
||||
tests.package.test_lua.TestLuajit: { extends: .runtime_test }
|
||||
tests.package.test_lua_cqueues.TestLuaLuaCqueues: { extends: .runtime_test }
|
||||
tests.package.test_lua_cqueues.TestLuajitLuaCqueues: { extends: .runtime_test }
|
||||
tests.package.test_lua_curl.TestLuaLuacURL: { extends: .runtime_test }
|
||||
tests.package.test_lua_curl.TestLuajitLuacURL: { extends: .runtime_test }
|
||||
tests.package.test_lua_gd.TestLuaLuaGD: { extends: .runtime_test }
|
||||
tests.package.test_lua_gd.TestLuajitLuaGD: { extends: .runtime_test }
|
||||
tests.package.test_lua_http.TestLuaHttp: { extends: .runtime_test }
|
||||
tests.package.test_lua_http.TestLuajitHttp: { extends: .runtime_test }
|
||||
tests.package.test_lua_lyaml.TestLuaLuaLyaml: { extends: .runtime_test }
|
||||
tests.package.test_lua_lyaml.TestLuajitLuaLyaml: { extends: .runtime_test }
|
||||
tests.package.test_lua_sdl2.TestLuaLuaSDL2: { extends: .runtime_test }
|
||||
tests.package.test_lua_sdl2.TestLuajitLuaSDL2: { extends: .runtime_test }
|
||||
tests.package.test_lua_utf8.TestLuaUtf8: { extends: .runtime_test }
|
||||
tests.package.test_lua_utf8.TestLuajitUtf8: { extends: .runtime_test }
|
||||
tests.package.test_luaexpat.TestLuaLuaExpat: { extends: .runtime_test }
|
||||
tests.package.test_luaexpat.TestLuajitLuaExpat: { extends: .runtime_test }
|
||||
tests.package.test_luafilesystem.TestLuaLuaFileSystem: { extends: .runtime_test }
|
||||
tests.package.test_luafilesystem.TestLuajitLuaFileSystem: { extends: .runtime_test }
|
||||
tests.package.test_luaossl.TestLuaLuaossl: { extends: .runtime_test }
|
||||
tests.package.test_luaossl.TestLuajitLuaossl: { extends: .runtime_test }
|
||||
tests.package.test_luaposix.TestLuaLuaPosix: { extends: .runtime_test }
|
||||
tests.package.test_luaposix.TestLuajitLuaPosix: { extends: .runtime_test }
|
||||
tests.package.test_luasec.TestLuaLuaSec: { extends: .runtime_test }
|
||||
tests.package.test_luasec.TestLuajitLuaSec: { extends: .runtime_test }
|
||||
tests.package.test_luasocket.TestLuaLuaSocket: { extends: .runtime_test }
|
||||
tests.package.test_luasocket.TestLuajitLuaSocket: { extends: .runtime_test }
|
||||
tests.package.test_luasyslog.TestLuaLuasyslog: { extends: .runtime_test }
|
||||
tests.package.test_luasyslog.TestLuajitLuasyslog: { extends: .runtime_test }
|
||||
tests.package.test_luvi.TestLuvi: { extends: .runtime_test }
|
||||
tests.package.test_lxc.TestLxc: { extends: .runtime_test }
|
||||
tests.package.test_lzlib.TestLuaLzlib: { extends: .runtime_test }
|
||||
tests.package.test_netdata.TestNetdata: { extends: .runtime_test }
|
||||
tests.package.test_openjdk.TestOpenJdk: { extends: .runtime_test }
|
||||
tests.package.test_opkg.TestOpkg: { extends: .runtime_test }
|
||||
tests.package.test_perl.TestPerl: { extends: .runtime_test }
|
||||
tests.package.test_perl_class_load.TestPerlClassLoad: { extends: .runtime_test }
|
||||
tests.package.test_perl_dbd_mysql.TestPerlDBDmysql: { extends: .runtime_test }
|
||||
tests.package.test_perl_encode_detect.TestPerlEncodeDetect: { extends: .runtime_test }
|
||||
tests.package.test_perl_gdgraph.TestPerlGDGraph: { extends: .runtime_test }
|
||||
tests.package.test_perl_html_parser.TestPerlHTMLParser: { extends: .runtime_test }
|
||||
tests.package.test_perl_io_socket_multicast.TestPerlIOSocketMulticast: { extends: .runtime_test }
|
||||
tests.package.test_perl_io_socket_ssl.TestPerlIOSocketSSL: { extends: .runtime_test }
|
||||
tests.package.test_perl_libwww_perl.TestPerllibwwwperl: { extends: .runtime_test }
|
||||
tests.package.test_perl_lwp_protocol_https.TestPerlLWPProtocolhttps: { extends: .runtime_test }
|
||||
tests.package.test_perl_mail_dkim.TestPerlMailDKIM: { extends: .runtime_test }
|
||||
tests.package.test_perl_x10.TestPerlX10: { extends: .runtime_test }
|
||||
tests.package.test_perl_xml_libxml.TestPerlXMLLibXML: { extends: .runtime_test }
|
||||
tests.package.test_prosody.TestProsodyLua51: { extends: .runtime_test }
|
||||
tests.package.test_prosody.TestProsodyLuajit: { extends: .runtime_test }
|
||||
tests.package.test_python.TestPython2: { extends: .runtime_test }
|
||||
tests.package.test_python.TestPython3: { extends: .runtime_test }
|
||||
tests.package.test_python_argh.TestPythonPy2Argh: { extends: .runtime_test }
|
||||
tests.package.test_python_argh.TestPythonPy3Argh: { extends: .runtime_test }
|
||||
tests.package.test_python_attrs.TestPythonPy2Attrs: { extends: .runtime_test }
|
||||
tests.package.test_python_attrs.TestPythonPy3Attrs: { extends: .runtime_test }
|
||||
tests.package.test_python_autobahn.TestPythonPy3Autobahn: { extends: .runtime_test }
|
||||
tests.package.test_python_automat.TestPythonPy2Automat: { extends: .runtime_test }
|
||||
tests.package.test_python_automat.TestPythonPy3Automat: { extends: .runtime_test }
|
||||
tests.package.test_python_avro.TestPythonAvro: { extends: .runtime_test }
|
||||
tests.package.test_python_bitstring.TestPythonPy2Bitstring: { extends: .runtime_test }
|
||||
tests.package.test_python_bitstring.TestPythonPy3Bitstring: { extends: .runtime_test }
|
||||
tests.package.test_python_can.TestPythonPy2Can: { extends: .runtime_test }
|
||||
tests.package.test_python_can.TestPythonPy3Can: { extends: .runtime_test }
|
||||
tests.package.test_python_cbor.TestPythonPy2Cbor: { extends: .runtime_test }
|
||||
tests.package.test_python_cbor.TestPythonPy3Cbor: { extends: .runtime_test }
|
||||
tests.package.test_python_click.TestPythonPy2Click: { extends: .runtime_test }
|
||||
tests.package.test_python_click.TestPythonPy3Click: { extends: .runtime_test }
|
||||
tests.package.test_python_constantly.TestPythonPy2Constantly: { extends: .runtime_test }
|
||||
tests.package.test_python_constantly.TestPythonPy3Constantly: { extends: .runtime_test }
|
||||
tests.package.test_python_crossbar.TestPythonPy3Crossbar: { extends: .runtime_test }
|
||||
tests.package.test_python_cryptography.TestPythonPy2Cryptography: { extends: .runtime_test }
|
||||
tests.package.test_python_cryptography.TestPythonPy3Cryptography: { extends: .runtime_test }
|
||||
tests.package.test_python_django.TestPythonPy3Django: { extends: .runtime_test }
|
||||
tests.package.test_python_gitdb2.TestPythonPy2Gitdb2: { extends: .runtime_test }
|
||||
tests.package.test_python_gitdb2.TestPythonPy3Gitdb2: { extends: .runtime_test }
|
||||
tests.package.test_python_gobject.TestPythonPy3Gobject: { extends: .runtime_test }
|
||||
tests.package.test_python_incremental.TestPythonPy2Incremental: { extends: .runtime_test }
|
||||
tests.package.test_python_incremental.TestPythonPy3Incremental: { extends: .runtime_test }
|
||||
tests.package.test_python_passlib.TestPythonPy2Passlib: { extends: .runtime_test }
|
||||
tests.package.test_python_passlib.TestPythonPy3Passlib: { extends: .runtime_test }
|
||||
tests.package.test_python_pexpect.TestPythonPy2Pexpect: { extends: .runtime_test }
|
||||
tests.package.test_python_pexpect.TestPythonPy3Pexpect: { extends: .runtime_test }
|
||||
tests.package.test_python_pynacl.TestPythonPy2Pynacl: { extends: .runtime_test }
|
||||
tests.package.test_python_pynacl.TestPythonPy3Pynacl: { extends: .runtime_test }
|
||||
tests.package.test_python_pyyaml.TestPythonPy2Pyyaml: { extends: .runtime_test }
|
||||
tests.package.test_python_pyyaml.TestPythonPy3Pyyaml: { extends: .runtime_test }
|
||||
tests.package.test_python_service_identity.TestPythonPy2ServiceIdentity: { extends: .runtime_test }
|
||||
tests.package.test_python_service_identity.TestPythonPy3ServiceIdentity: { extends: .runtime_test }
|
||||
tests.package.test_python_smmap2.TestPythonPy2Smmap2: { extends: .runtime_test }
|
||||
tests.package.test_python_smmap2.TestPythonPy3Smmap2: { extends: .runtime_test }
|
||||
tests.package.test_python_subprocess32.TestPythonPy2Subprocess32: { extends: .runtime_test }
|
||||
tests.package.test_python_treq.TestPythonPy2Treq: { extends: .runtime_test }
|
||||
tests.package.test_python_treq.TestPythonPy3Treq: { extends: .runtime_test }
|
||||
tests.package.test_python_twisted.TestPythonPy2Twisted: { extends: .runtime_test }
|
||||
tests.package.test_python_twisted.TestPythonPy3Twisted: { extends: .runtime_test }
|
||||
tests.package.test_python_txaio.TestPythonPy3Txaio: { extends: .runtime_test }
|
||||
tests.package.test_python_txtorcon.TestPythonPy2Txtorcon: { extends: .runtime_test }
|
||||
tests.package.test_python_txtorcon.TestPythonPy3Txtorcon: { extends: .runtime_test }
|
||||
tests.package.test_python_ubjson.TestPythonPy2Ubjson: { extends: .runtime_test }
|
||||
tests.package.test_python_ubjson.TestPythonPy3Ubjson: { extends: .runtime_test }
|
||||
tests.package.test_redis.TestRedis: { extends: .runtime_test }
|
||||
tests.package.test_rings.TestLuaRings: { extends: .runtime_test }
|
||||
tests.package.test_rings.TestLuajitRings: { extends: .runtime_test }
|
||||
tests.package.test_rust.TestRust: { extends: .runtime_test }
|
||||
tests.package.test_rust.TestRustBin: { extends: .runtime_test }
|
||||
tests.package.test_syslog_ng.TestSyslogNg: { extends: .runtime_test }
|
||||
tests.package.test_tmux.TestTmux: { extends: .runtime_test }
|
||||
tests.package.test_turbolua.TestLuajitTurbolua: { extends: .runtime_test }
|
||||
tests.toolchain.test_external.TestExternalToolchainBuildrootMusl: { extends: .runtime_test }
|
||||
tests.toolchain.test_external.TestExternalToolchainBuildrootuClibc: { extends: .runtime_test }
|
||||
tests.toolchain.test_external.TestExternalToolchainCCache: { extends: .runtime_test }
|
||||
tests.toolchain.test_external.TestExternalToolchainCtngMusl: { extends: .runtime_test }
|
||||
tests.toolchain.test_external.TestExternalToolchainLinaroArm: { extends: .runtime_test }
|
||||
tests.toolchain.test_external.TestExternalToolchainSourceryArmv4: { extends: .runtime_test }
|
||||
tests.toolchain.test_external.TestExternalToolchainSourceryArmv5: { extends: .runtime_test }
|
||||
tests.toolchain.test_external.TestExternalToolchainSourceryArmv7: { extends: .runtime_test }
|
||||
tests.utils.test_check_package.TestCheckPackage: { extends: .runtime_test }
|
||||
|
||||
@@ -1,13 +1,15 @@
|
||||
# Configuration for Gitlab-CI.
|
||||
# Builds appear on https://gitlab.com/buildroot.org/buildroot/pipelines
|
||||
# The .gitlab-ci.yml file is generated from .gitlab-ci.yml.in.
|
||||
# It needs to be regenerated every time a defconfig is added, using
|
||||
# "make .gitlab-ci.yml".
|
||||
|
||||
image: buildroot/base:20200814.2228
|
||||
image: buildroot/base:20191027.2027
|
||||
|
||||
.check_base:
|
||||
rules:
|
||||
- if: '$CI_COMMIT_REF_NAME =~ /^.*-.*_defconfig$/ || $CI_COMMIT_REF_NAME =~ /^.*-tests\..*$/'
|
||||
when: never
|
||||
- when: always
|
||||
except:
|
||||
- /^.*-.*_defconfig$/
|
||||
- /^.*-tests\..*$/
|
||||
|
||||
check-DEVELOPERS:
|
||||
extends: .check_base
|
||||
@@ -25,33 +27,26 @@ check-flake8:
|
||||
- find * -type f -print0 | xargs -0 file | grep 'Python script' | cut -d':' -f1 >> files.txt
|
||||
- sort -u files.txt | tee files.processed
|
||||
script:
|
||||
- python3 -m flake8 --statistics --count --max-line-length=132 $(cat files.processed)
|
||||
- python -m flake8 --statistics --count --max-line-length=132 $(cat files.processed)
|
||||
after_script:
|
||||
- wc -l files.processed
|
||||
|
||||
check-gitlab-ci.yml:
|
||||
extends: .check_base
|
||||
script:
|
||||
- mv .gitlab-ci.yml .gitlab-ci.yml.orig
|
||||
- make .gitlab-ci.yml
|
||||
- diff -u .gitlab-ci.yml.orig .gitlab-ci.yml
|
||||
|
||||
check-package:
|
||||
extends: .check_base
|
||||
script:
|
||||
- make check-package
|
||||
|
||||
.defconfig_check:
|
||||
script:
|
||||
- echo "Configure Buildroot for ${DEFCONFIG_NAME}"
|
||||
- make ${DEFCONFIG_NAME}
|
||||
- support/scripts/check-dotconfig.py .config configs/${DEFCONFIG_NAME}
|
||||
artifacts:
|
||||
when: on_failure
|
||||
expire_in: 2 weeks
|
||||
paths:
|
||||
- .config
|
||||
before_script:
|
||||
- DEFCONFIG_NAME=$(echo ${CI_JOB_NAME} | sed -e 's,_check$,,g')
|
||||
|
||||
.defconfig_base:
|
||||
script:
|
||||
- echo "Configure Buildroot for ${DEFCONFIG_NAME}"
|
||||
- make ${DEFCONFIG_NAME}
|
||||
- ./support/scripts/check-dotconfig.py .config ./configs/${DEFCONFIG_NAME}
|
||||
- echo 'Build buildroot'
|
||||
- |
|
||||
make > >(tee build.log |grep '>>>') 2>&1 || {
|
||||
@@ -81,21 +76,17 @@ check-package:
|
||||
extends: .defconfig_base
|
||||
# Running the defconfigs for every push is too much, so limit to
|
||||
# explicit triggers through the API.
|
||||
rules:
|
||||
# For tags, create a pipeline.
|
||||
- if: '$CI_COMMIT_TAG'
|
||||
# For pipeline created by using a trigger token.
|
||||
- if: '$CI_PIPELINE_TRIGGERED'
|
||||
# For the branch or tag name named *-defconfigs, create a pipeline.
|
||||
- if: '$CI_COMMIT_REF_NAME =~ /^.*-defconfigs$/'
|
||||
only:
|
||||
- triggers
|
||||
- tags
|
||||
- /-defconfigs$/
|
||||
before_script:
|
||||
- DEFCONFIG_NAME=${CI_JOB_NAME}
|
||||
|
||||
one-defconfig:
|
||||
extends: .defconfig_base
|
||||
rules:
|
||||
# For the branch or tag name named *-*_defconfigs, create a pipeline.
|
||||
- if: '$CI_COMMIT_REF_NAME =~ /^.*-.*_defconfig$/'
|
||||
only:
|
||||
- /^.*-.*_defconfig$/
|
||||
before_script:
|
||||
- DEFCONFIG_NAME=$(echo ${CI_COMMIT_REF_NAME} | sed -e 's,^.*-,,g')
|
||||
|
||||
@@ -119,19 +110,16 @@ one-defconfig:
|
||||
extends: .runtime_test_base
|
||||
# Running the runtime tests for every push is too much, so limit to
|
||||
# explicit triggers through the API.
|
||||
rules:
|
||||
# For tags, create a pipeline.
|
||||
- if: '$CI_COMMIT_TAG'
|
||||
# For pipeline created by using a trigger token.
|
||||
- if: '$CI_PIPELINE_TRIGGERED'
|
||||
# For the branch or tag name named *-runtime-tests, create a pipeline.
|
||||
- if: '$CI_COMMIT_REF_NAME =~ /^.*-runtime-tests$/'
|
||||
only:
|
||||
- triggers
|
||||
- tags
|
||||
- /-runtime-tests$/
|
||||
before_script:
|
||||
- TEST_CASE_NAME=${CI_JOB_NAME}
|
||||
|
||||
one-runtime_test:
|
||||
extends: .runtime_test_base
|
||||
rules:
|
||||
- if: '$CI_COMMIT_REF_NAME =~ /^.*-tests\..*$/'
|
||||
only:
|
||||
- /^.*-tests\..*$/
|
||||
before_script:
|
||||
- TEST_CASE_NAME=$(echo ${CI_COMMIT_REF_NAME} | sed -e 's,^.*-,,g')
|
||||
318
CHANGES
318
CHANGES
@@ -1,230 +1,3 @@
|
||||
2020.08, released September 1st, 2020
|
||||
|
||||
Various fixes.
|
||||
|
||||
Updated/fixed packages: am33x-cm3, avahi, bluez-tools,
|
||||
busybox, chocolate-doom, collectd, dhcp, docker-cli, domoticz,
|
||||
gobject-introspection, graphite2, haproxy, ibm-sw-tpm2,
|
||||
imagemagick, libeXosip2, libressl, lxc, mbedtls, menu-cache,
|
||||
mongodb, mosquitto, nvidia-driver, paho-mqtt-c, pixz,
|
||||
postgresql, python-django, rtty, squid, stress-ng, systemd,
|
||||
trousers, uclibc, wireshark, wolfssl, zbar
|
||||
|
||||
2020.08-rc3, released August 28th, 2020
|
||||
|
||||
Fixes all over the tree.
|
||||
|
||||
Infrastructure: Ensure RPATH entries that may be needed for
|
||||
dlopen() are not dropped by patchelf.
|
||||
|
||||
Toolchain: Drop old GCC 6 based external Sourcery AMD64
|
||||
toolchain.
|
||||
|
||||
Updated/fixed packages: assimp, davfs2, dillo, glibc,
|
||||
gnuradio, hostapd, ibm-sw-tpm2, ipmitool, json-c, libroxml,
|
||||
linux, mender, netopeer2, openal, openjpeg, python-matplotlib,
|
||||
ripgrep, shadowsocks-libev, trousers, xlib_libX11,
|
||||
xserver_xorg-server
|
||||
|
||||
Issues resolved (http://bugs.uclibc.org):
|
||||
|
||||
#13141: Target-finalize fail with "depmod: ERROR: Bad version passed"
|
||||
|
||||
2020.08-rc2, released August 24th, 2020
|
||||
|
||||
Fixes all over the tree, including a number of fixes for
|
||||
compilation with GCC-10.
|
||||
|
||||
Toolchain: Disallow building uClibc-ng for RISC-V 64-bit,
|
||||
because of issues with a missing __riscv_flush_icache()
|
||||
implementation.
|
||||
|
||||
Defconfigs: CI20: Use mainline Linux and U-boot. Update
|
||||
Microchip sama5d27_wlsom1_ek_mmc_dev to use bluez5-utils
|
||||
instead of (the removed) legacy bluez-utils
|
||||
|
||||
Updated/fixed packages: 18xx-ti-utils, aircrack-ng, apache,
|
||||
atest, bandwidthd, bellagio, bind, bird, bluez-alsa, boost,
|
||||
c-periphery, capnproto, chrony, collectd, cpio, cvs,
|
||||
dieharder, domoticz, dovecot, dovecot-pigeonhole, drbd-utils,
|
||||
dump1090, efl, elixir, f2fs-tools, feh, fluidsynth, fping,
|
||||
gdbm, gdk-pixbuf, ghostscript, gst1-plugins-bad,
|
||||
gstreamer1-editing-services, htop, ibm-sw-tpm2, ifplugd,
|
||||
iftop, igd2-for-linux, ima-evm-utils, iprutils, iputils,
|
||||
keepalived, kmsxx, libabseil-cpp, libcamera, libcurl,
|
||||
libfuse3, libnss, librtlsdr, libubox, libunwind, live555,
|
||||
lttng-tools, luabitop, mender-artifact, minizip,
|
||||
mjpg-streamer, mpd, mpv, mtd, ncftp, open-lldp, openal,
|
||||
opencv, opencv3, openfpgaloader, optee-os, owfs, php,
|
||||
pistache, prosody, pulseview, python-decorator,
|
||||
python-gunicorn, python-rpi-gpio, python-spidev,
|
||||
python3-decorator, python3-mako, python3-pyselftools, qt5,
|
||||
qt5webengine, rauc, redis, ripgrep, rtl8188eu, rtl8821au,
|
||||
setools, smstools3, supertux, tftpd, tpm2-abrmd,
|
||||
wpa_supplicant, xen, xlib_libX11, xserver_xorg-server
|
||||
|
||||
New packages: python3-cython, python3-pycryptodomex
|
||||
|
||||
Issues resolved (http://bugs.uclibc.org):
|
||||
|
||||
#12876: nodejs fails to build when host-icu has been built before
|
||||
#13111: python-gunicorn: missing dependency on python-setuptools
|
||||
#13121: wpa_supplicant fails to build without libopenssl enabled
|
||||
#13146: raspberrypi3_defconfig: "Inappropriate ioctl for device"..
|
||||
#13156: package live555 new license
|
||||
#13166: python-rpi-gpio: does not work against aarch64, unint..
|
||||
|
||||
2020.08-rc1, released August 6th, 2020
|
||||
|
||||
Toolchain:
|
||||
|
||||
- GCC 10.x added, GCC 9.x is the default
|
||||
- binutils 2.34 added, binutils 2.33 is the default, binutils
|
||||
2.31 removed
|
||||
- glibc updated to 2.31
|
||||
- ARC toolchain components updated to 2020.03-release.
|
||||
- Enable uClibc-ng usage for RISC-V 64-bit
|
||||
|
||||
Infrastructure:
|
||||
|
||||
- qmake-package was fixed to be compatible with
|
||||
BR2_PER_PACKAGE_DIRECTORIES
|
||||
- complete rewrite of the Gitlab CI Yaml configuration file,
|
||||
now generated directly by the Gitlab CI pipeline itselfs
|
||||
|
||||
Misc:
|
||||
|
||||
- cargo and cargo-bin packages removed, as cargo is now part
|
||||
of Rust itself
|
||||
|
||||
Filesystem: ubinize configuration files can now use
|
||||
BINARIES_DIR to refer to the $(O)/images directory.
|
||||
|
||||
New packages: bitwise, earlyoom, fuse-overlayfs, gloox,
|
||||
kodi-pvr-octonet, kodi-pvr-zattoo, libabseil-cpp, libcutl,
|
||||
libnids, libnpupnp, libodb, libodb-boost, libodb-mysql,
|
||||
libodb-pgsql, mbpfan, netopeer2, odb, parprouted,
|
||||
python-colorzero, python-gpiozero, python-pybind, python-yatl,
|
||||
python3-decorator, qt5quicktimeline, resiprocate, ttyd,
|
||||
unclutter-xfixes, urandom-scripts,
|
||||
|
||||
New defconfigs: bananapi_m2_zero, freescale_imx8mnevk,
|
||||
globalscale_espressobin, imx6ullevk,
|
||||
microchip_sama5d27_wlsom1_ek, rock_pi_4, rock_pi_n10
|
||||
|
||||
Removed packages: cargo, cargo-bin,
|
||||
kodi-peripheral-steamcontroller
|
||||
|
||||
Issues resolved (http://bugs.uclibc.org):
|
||||
|
||||
#12941: Python GObject fails to build when using BR2_PER_PACKAGE_DIRECTORIES
|
||||
#12946: Grub: Decompressor is too big.
|
||||
#12986: Mtools: Error converting to codepage 850
|
||||
#13001: openjdk-bin replaces libfreetype.so from host-freetype
|
||||
#13011: Incorrect selection of gcc version
|
||||
#13021: Minor code error when building granite-0.4.1
|
||||
#13026: rpi-firmware: must not rename start files
|
||||
#13046: Optimize for fast -Ofast is not compliant
|
||||
#13081: host-e2fsprogs attempts to create udev rules.d on build host if not exists
|
||||
#13101: BR audit2allow support
|
||||
|
||||
2020.05.2, released August 29th, 2020
|
||||
|
||||
Important / security related fixes.
|
||||
|
||||
Infrastructure: Ensure RPATH entries that may be needed for
|
||||
dlopen() are not dropped by patchelf.
|
||||
|
||||
BR_VERSION_FULL/setlocalversion (used by make print-version
|
||||
and /etc/os-release): Properly handle local git tags
|
||||
|
||||
Updated/fixed packages: apache, assimp, at91bootstrap3, bind,
|
||||
boost, busybox, capnproto, cegui, chrony, collectd, cpio,
|
||||
cryptsetup, cups, cvs, dbus, docker-engine, domoticz, dovecot,
|
||||
dovecot-pigeonhole, dropbear, efl, elixir, f2fs-tools, ffmpeg,
|
||||
gd, gdk-pixbuf, ghostscript, glibc, gnuradio, grub2,
|
||||
gst1-plugins-bad, gstreamer1-editing-services, hostapd,
|
||||
ibm-sw-tpm2, iputils, jasper, json-c, libcurl, libressl,
|
||||
libwebsockets, linux, live555, mesa3d, mongodb, mosquitto,
|
||||
mpv, nodejs, opencv, opencv3, openfpgaloader, openjpeg,
|
||||
patchelf, perl, php, postgresql, prosody, python-django,
|
||||
python-gunicorn, python-matplotlib, ripgrep, rtl8188eu,
|
||||
rtl8821au, ruby, shadowsocks-libev, squid, systemd,
|
||||
tpm2-abrmd, tpm2-tools, trousers, uboot, webkitgtk, wireshark,
|
||||
wolfssl, wpa_supplicant, wpewebkit, xen, xlib_libX11,
|
||||
xserver_xorg-server
|
||||
|
||||
Issues resolved (http://bugs.uclibc.org):
|
||||
|
||||
#12876: nodejs fails to build when host-icu has been built before
|
||||
#13111: python-gunicorn: missing dependency on python-setuptools
|
||||
#13121: wpa_supplicant fails to build without libopenssl enabled
|
||||
#13141: Target-finalize fail with "depmod: ERROR: Bad version passed"
|
||||
#13156: package live555 new license
|
||||
|
||||
2020.05.1, released July 25th, 2020
|
||||
|
||||
Important / security related fixes.
|
||||
|
||||
Toolchain:
|
||||
- Make external toolchain version check also work for
|
||||
toolchains configured with --with-gcc-major-version-only
|
||||
|
||||
- Do not handle SOURCE_DATE_EPOCH in toolchain wrapper if the
|
||||
compiler supports it, fixing an issue with precompiled
|
||||
headers
|
||||
|
||||
- Ensure debug libs from external toolchains are not installed
|
||||
into target if debugging is disabled
|
||||
|
||||
Download:
|
||||
- Correct reproducibility issue in handling of git submodules
|
||||
for older git versions.
|
||||
|
||||
- Fix file locking over NFS
|
||||
|
||||
fs: Ensure cpio archive element order is reproducible
|
||||
|
||||
Br2-external: Fix error reporting for invalid br2-external trees
|
||||
|
||||
Per-package:
|
||||
- Fix an issue with python3 sysconfig data not getting
|
||||
correctly expanded
|
||||
|
||||
- Fix per-package building for packages using the qmake
|
||||
infrastructure
|
||||
|
||||
Updated/fixed packages: a10disp, asterisk, bind, brltty,
|
||||
cdrkit, clamav, cryptodev-linux, dbus, docker-cli,
|
||||
docker-engine, dvb-apps, e2fsprogs, exim, exiv2, freerdp, gdb,
|
||||
gdk-pixbuf, gerbera, gnutls, go, granite, grub2, gssdp,
|
||||
gst1-plugins-good, gst1-plugins-ugly, gupnp, intel-microcode,
|
||||
iproute2, irrlicht, iwd, jq, kodi, libcamera, libcec,
|
||||
libconfuse, libcurl, libevdev, libhttpserver, libmicrohttpd,
|
||||
libnss, libressl, libvncserver, libxml2, libxmlrpc, lxc,
|
||||
mbedtls, mediastreamer, mesa3d, meson, minizip, mongodb,
|
||||
mtools, mutt, nano, network-manager, nghttp2, ngircd, nodejs,
|
||||
ntp, open-plc-utils, open2300, openjdk-bin, openssh,
|
||||
oracle-mysql, paho-mqtt-c, pango, php, poco, prosody, putty,
|
||||
python-greenlet, python-urllib3, python-validators, python3,
|
||||
readline, redis, rpi-firmware, rtl8821au, samba4, sdl2,
|
||||
sqlite, squid, strace, sunxi-mali-mainline-driver, syslog-ng,
|
||||
systemd, tcpreplay, tinydtls, upmpdcli, upx, vlc, webkitgtk,
|
||||
wireguard-linux-compat, wireshark, wpebackend-fdo, wpewebkit,
|
||||
x11vnc, znc, zstd
|
||||
|
||||
Issues resolved (http://bugs.uclibc.org):
|
||||
|
||||
#12941: Python GObject fails to build when using BR2_PER_PACKAGE_..
|
||||
#12946: Grub: Decompressor is too big.
|
||||
#12986: Mtools: Error converting to codepage 850
|
||||
#13001: openjdk-bin replaces libfreetype.so from host-freetype
|
||||
#13011: Incorrect selection of gcc version
|
||||
#13021: Minor code error when building granite-0.4.1
|
||||
#13026: rpi-firmware: must not rename start files
|
||||
#13031: nodejs: RangeError at new ArrayBuffer()
|
||||
#13046: Optimize for fast -Ofast is not compliant
|
||||
|
||||
2020.05, released June 1st, 2020
|
||||
|
||||
Various fixes.
|
||||
@@ -393,97 +166,6 @@
|
||||
#12796: Update OpenSSL to Version 1.1.1g to patch CVE-2020-1967
|
||||
#12811: bootstrap stuck and no login prompt
|
||||
|
||||
2020.02.5, released August 29th, 2020
|
||||
|
||||
Important / security related fixes.
|
||||
|
||||
Infrastructure: Ensure RPATH entries that may be needed for
|
||||
dlopen() are not dropped by patchelf.
|
||||
|
||||
BR_VERSION_FULL/setlocalversion (used by make print-version
|
||||
and /etc/os-release): Properly handle local git tags
|
||||
|
||||
Updated/fixed packages: apache, at91bootstrap3, bind, boost,
|
||||
busybox, capnproto, chrony, collectd, cpio, cryptsetup, cups,
|
||||
cvs, dbus, docker-engine, domoticz, dovecot,
|
||||
dovecot-pigeonhole, dropbear, efl, elixir, f2fs-tools, ffmpeg,
|
||||
gd, gdk-pixbuf, ghostscript, glibc, grub2, gst1-plugins-bad,
|
||||
hostapd, iputils, jasper, json-c, libcurl, libwebsockets,
|
||||
linux, live555, mesa3d, mosquitto, mpv, nodejs, opencv,
|
||||
opencv3, openjpeg, patchelf, perl, php, postgresql,
|
||||
python-django, python-gunicorn, python-matplotlib, ripgrep,
|
||||
rtl8188eu, rtl8821au, ruby, shadowsocks-libev, squid,
|
||||
tpm2-abrmd, tpm2-tools, trousers, uacme, webkitgtk, wireshark,
|
||||
wolfssl, wpa_supplicant, wpewebkit, xen, xlib_libX11,
|
||||
xserver_xorg-server
|
||||
|
||||
Issues resolved (http://bugs.uclibc.org):
|
||||
|
||||
#12876: nodejs fails to build when host-icu has been built before
|
||||
#13111: python-gunicorn: missing dependency on python-setuptools
|
||||
#13121: wpa_supplicant fails to build without libopenssl enabled
|
||||
#13141: Target-finalize fail with "depmod: ERROR: Bad version passed"
|
||||
#13156: package live555 new license
|
||||
|
||||
2020.02.4, released July 26th, 2020
|
||||
|
||||
Important / security related fixes.
|
||||
|
||||
Toolchain:
|
||||
- Make external toolchain version check also work for
|
||||
toolchains configured with --with-gcc-major-version-only
|
||||
|
||||
- Do not handle SOURCE_DATE_EPOCH in toolchain wrapper if the
|
||||
compiler supports it, fixing an issue with precompiled
|
||||
headers
|
||||
|
||||
- Ensure debug libs from external toolchains are not installed
|
||||
into target if debugging is disabled
|
||||
|
||||
Download:
|
||||
- Correct reproducibility issue in handling of git submodules
|
||||
for older git versions.
|
||||
|
||||
- Fix file locking over NFS
|
||||
|
||||
fs: Ensure cpio archive element order is reproducible
|
||||
|
||||
Br2-external: Fix error reporting for invalid br2-external trees
|
||||
|
||||
Per-package:
|
||||
- Fix an issue with python3 sysconfig data not getting
|
||||
correctly expanded
|
||||
|
||||
- Fix per-package building for packages using the qmake
|
||||
infrastructure
|
||||
|
||||
Updated/fixed packages: a10disp, asterisk, bind, cdrkit,
|
||||
checkpolicy, clamav, dbus, docker-cli, docker-engine,
|
||||
dvb-apps, e2fsprogs, exim, exiv2, freerdp, gnutls, go, grub2,
|
||||
gssdp, gst1-plugins-good, gst1-plugins-ugly, gupnp,
|
||||
intel-microcode, iproute2, irrlicht, iwd, jq, kodi, libcamera,
|
||||
libconfuse, libcurl, libglib2, libhttpserver, libmicrohttpd,
|
||||
libopenssl, libvncserver, libxml2, libxmlrpc, lxc, mbedtls,
|
||||
mesa3d, meson, mongodb, mtools, mutt, nghttp2, ngircd, nodejs,
|
||||
ntp, open-plc-utils, open2300, openjdk-bin, openssh,
|
||||
oracle-mysql, paho-mqtt-c, pcre, php, poco, prosody, putty,
|
||||
python-twisted, python-urllib3, python-validators, python3,
|
||||
qt5xmlpatterns, redis, rpi-firmware, rtl8821au, samba4, sdl2,
|
||||
sqlite, squid, syslog-ng, systemd, tcpreplay, tinydtls,
|
||||
upmpdcli, upx, vlc, webkitgtk, wireguard-linux-compat,
|
||||
wireshark, wpebackend-fdo, wpewebkit, zstd
|
||||
|
||||
Issues resolved (http://bugs.uclibc.org):
|
||||
|
||||
#12941: Python GObject fails to build when using BR2_PER_PACKAGE_..
|
||||
#12946: Grub: Decompressor is too big.
|
||||
#12986: Mtools: Error converting to codepage 850
|
||||
#13001: openjdk-bin replaces libfreetype.so from host-freetype
|
||||
#13011: Incorrect selection of gcc version
|
||||
#13026: rpi-firmware: must not rename start files
|
||||
#13031: nodejs: RangeError at new ArrayBuffer()
|
||||
#13046: Optimize for fast -Ofast is not compliant
|
||||
|
||||
2020.02.3, released June 3rd, 2020
|
||||
|
||||
Important / security related fixes.
|
||||
|
||||
10
Config.in
10
Config.in
@@ -80,11 +80,6 @@ config BR2_HOSTARCH_NEEDS_IA32_COMPILER
|
||||
config BR2_NEEDS_HOST_UTF8_LOCALE
|
||||
bool
|
||||
|
||||
# Hidden boolean selected by packages that need the host to have
|
||||
# support for building gcc plugins
|
||||
config BR2_NEEDS_HOST_GCC_PLUGIN_SUPPORT
|
||||
bool
|
||||
|
||||
source "arch/Config.in"
|
||||
|
||||
menu "Build options"
|
||||
@@ -521,14 +516,13 @@ config BR2_OPTIMIZE_S
|
||||
This is the default.
|
||||
|
||||
config BR2_OPTIMIZE_FAST
|
||||
bool "optimize for fast (may break packages!)"
|
||||
bool "optimize for fast"
|
||||
depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_6
|
||||
help
|
||||
Optimize for fast. Disregard strict standards
|
||||
compliance. -Ofast enables all -O3 optimizations. It also
|
||||
enables optimizations that are not valid for all
|
||||
standard-compliant programs, so be careful, as it may break
|
||||
some packages. It turns on -ffast-math and the
|
||||
standard-compliant programs. It turns on -ffast-math and the
|
||||
Fortran-specific -fstack-arrays, unless -fmax-stack-var-size
|
||||
is specified, and -fno-protect-parens.
|
||||
|
||||
|
||||
1161
Config.in.legacy
1161
Config.in.legacy
File diff suppressed because it is too large
Load Diff
57
DEVELOPERS
57
DEVELOPERS
@@ -43,11 +43,7 @@ F: package/gstreamer1/gst1-vaapi/
|
||||
F: package/imx-usb-loader/
|
||||
F: package/janus-gateway/
|
||||
F: package/json-for-modern-cpp/
|
||||
F: package/libabseil-cpp/
|
||||
F: package/libcpprestsdk/
|
||||
F: package/libcutl/
|
||||
F: package/libodb/
|
||||
F: package/libodb-pgsql/
|
||||
F: package/libressl/
|
||||
F: package/libselinux/
|
||||
F: package/libsemanage/
|
||||
@@ -56,7 +52,6 @@ F: package/libtextstyle/
|
||||
F: package/libwebsockets/
|
||||
F: package/mender-grubenv/
|
||||
F: package/nginx-naxsi/
|
||||
F: package/odb/
|
||||
F: package/openjdk/
|
||||
F: package/openjdk-bin/
|
||||
F: package/php/
|
||||
@@ -204,26 +199,19 @@ F: package/rauc/
|
||||
N: Angelo Compagnucci <angelo.compagnucci@gmail.com>
|
||||
F: package/apparmor/
|
||||
F: package/corkscrew/
|
||||
F: package/cups/
|
||||
F: package/cups-filters/
|
||||
F: package/fail2ban/
|
||||
F: package/grep/
|
||||
F: package/i2c-tools/
|
||||
F: package/jq/
|
||||
F: package/libapparmor/
|
||||
F: package/libb64/
|
||||
F: package/mender/
|
||||
F: package/mender-artifact/
|
||||
F: package/mono/
|
||||
F: package/mono-gtksharp3/
|
||||
F: package/monolite/
|
||||
F: package/openjpeg/
|
||||
F: package/python-can/
|
||||
F: package/python-pillow/
|
||||
F: package/python-pydal/
|
||||
F: package/python-spidev/
|
||||
F: package/python-web2py/
|
||||
F: package/sam-ba/
|
||||
F: package/sshguard/
|
||||
F: package/sunwait/
|
||||
F: package/sysdig/
|
||||
@@ -306,7 +294,6 @@ F: board/stmicroelectronics/stm32mp157a-dk1/
|
||||
F: configs/stm32mp157a_dk1_defconfig
|
||||
F: package/python-esptool/
|
||||
F: package/python-pyaes/
|
||||
F: package/ttyd/
|
||||
F: package/qt5/qt5scxml/
|
||||
F: package/qt5/qt5webview/
|
||||
|
||||
@@ -551,9 +538,7 @@ F: package/docker-cli/
|
||||
F: package/docker-containerd/
|
||||
F: package/docker-engine/
|
||||
F: package/docker-proxy/
|
||||
F: package/fuse-overlayfs/
|
||||
F: package/go/
|
||||
F: package/mbpfan/
|
||||
F: package/mosh/
|
||||
F: package/pkg-golang.mk
|
||||
F: package/rtl8821au/
|
||||
@@ -713,6 +698,8 @@ F: package/gstreamer1/gst1-plugins-bayer2rgb-neon/
|
||||
N: Eric Le Bihan <eric.le.bihan.dev@free.fr>
|
||||
F: docs/manual/adding-packages-meson.txt
|
||||
F: package/adwaita-icon-theme/
|
||||
F: package/cargo-bin/
|
||||
F: package/cargo/
|
||||
F: package/darkhttpd/
|
||||
F: package/eudev/
|
||||
F: package/execline/
|
||||
@@ -799,7 +786,6 @@ F: configs/imx6-sabre*
|
||||
F: configs/imx6slevk_defconfig
|
||||
F: configs/imx6sx-sdb_defconfig
|
||||
F: configs/imx6ulevk_defconfig
|
||||
F: configs/imx6ullevk_defconfig
|
||||
F: configs/imx6ulpico_defconfig
|
||||
F: configs/imx7d-sdb_defconfig
|
||||
F: configs/imx7dpico_defconfig
|
||||
@@ -868,7 +854,6 @@ F: package/libmatroska/
|
||||
F: package/libmpdclient/
|
||||
F: package/libnetfilter_conntrack/
|
||||
F: package/libnetfilter_queue/
|
||||
F: package/libnpupnp/
|
||||
F: package/liboping/
|
||||
F: package/libpfm4/
|
||||
F: package/libraw/
|
||||
@@ -895,7 +880,6 @@ F: package/pcmanfm/
|
||||
F: package/python-backcall/
|
||||
F: package/python-jedi/
|
||||
F: package/python-parso/
|
||||
F: package/python-yatl/
|
||||
F: package/rocksdb/
|
||||
F: package/rygel/
|
||||
F: package/safeclib/
|
||||
@@ -1066,7 +1050,6 @@ F: package/c-icap-modules/
|
||||
F: package/sdl2/
|
||||
|
||||
N: Guillaume William Brs <guillaume.bressaix@gmail.com>
|
||||
F: package/libnids/
|
||||
F: package/liquid-dsp/
|
||||
F: package/pixiewps/
|
||||
F: package/python-pybind/
|
||||
@@ -1087,7 +1070,6 @@ N: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>
|
||||
F: package/gnuradio/
|
||||
F: package/gqrx/
|
||||
F: package/gr-osmosdr/
|
||||
F: package/librtlsdr/
|
||||
F: package/libusbgx/
|
||||
F: package/matio/
|
||||
F: package/python-cheetah/
|
||||
@@ -1096,11 +1078,8 @@ F: package/python-remi/
|
||||
F: package/python-sip/
|
||||
|
||||
N: Heiko Thiery <heiko.thiery@gmail.com>
|
||||
F: package/ipmitool/
|
||||
F: package/libnetconf2/
|
||||
F: package/libyang/
|
||||
F: package/linuxptp/
|
||||
F: package/netopeer2/
|
||||
F: package/sysrepo/
|
||||
|
||||
N: Henrique Camargo <henrique@henriquecamargo.com>
|
||||
@@ -1280,10 +1259,6 @@ F: package/libuhttpd/
|
||||
F: package/libuwsc/
|
||||
F: package/rtty/
|
||||
|
||||
N: Joachim Nilsson <troglobit@gmail.com>
|
||||
F: configs/globalscale_espressobin_defconfig
|
||||
F: board/globalscale/espressobin/
|
||||
|
||||
N: Joao Pinto <jpinto@synopsys.com>
|
||||
F: board/synopsys/vdk/
|
||||
F: configs/snps_aarch64_vdk_defconfig
|
||||
@@ -1392,7 +1367,6 @@ F: package/python-schedule/
|
||||
F: package/python-sentry-sdk/
|
||||
F: package/python-websockets/
|
||||
F: package/python-xlib/
|
||||
F: package/unclutter-xfixes/
|
||||
|
||||
N: Joshua Henderson <joshua.henderson@microchip.com>
|
||||
F: package/qt5/qt5wayland/
|
||||
@@ -1451,10 +1425,6 @@ F: package/easy-rsa/
|
||||
N: Justin Maggard <jmaggard@netgear.com>
|
||||
F: package/dtach/
|
||||
|
||||
N: Kamel Bouhara <kamel.bouhara@gmail.com>
|
||||
F: package/libodb-boost/
|
||||
F: package/libodb-mysql/
|
||||
|
||||
N: Karoly Kasza <kaszak@gmail.com>
|
||||
F: package/irqbalance/
|
||||
F: package/openvmtools/
|
||||
@@ -1556,7 +1526,6 @@ N: Ludovic Desroches <ludovic.desroches@microchip.com>
|
||||
F: board/atmel/
|
||||
F: configs/at91*
|
||||
F: configs/atmel_*
|
||||
F: configs/microchip_*
|
||||
F: package/fb-test-app/
|
||||
F: package/python-json-schema-validator/
|
||||
F: package/python-keyring/
|
||||
@@ -1815,6 +1784,9 @@ F: package/systemd-bootchart/
|
||||
F: package/tinyalsa/
|
||||
F: package/tinyxml/
|
||||
|
||||
N: Maxime Ripard <maxime.ripard@bootlin.com>
|
||||
F: package/kmsxx/
|
||||
|
||||
N: Michael Durrant <mdurrant@arcturusnetworks.com>
|
||||
F: board/arcturus/
|
||||
F: configs/arcturus_ucp1020_defconfig
|
||||
@@ -1873,7 +1845,7 @@ N: Murat Demirten <mdemirten@yh.com.tr>
|
||||
F: package/jpeg-turbo/
|
||||
F: package/libgeotiff/
|
||||
|
||||
N: Mylène Josserand <mylene.josserand@collabora.com>
|
||||
N: Mylène Josserand <mylene.josserand@bootlin.com>
|
||||
F: package/rtl8723bu/
|
||||
|
||||
N: Nathaniel Roach <nroach44@gmail.com>
|
||||
@@ -1947,9 +1919,6 @@ F: package/openjpeg/
|
||||
N: Olivier Singla <olivier.singla@gmail.com>
|
||||
F: package/shellinabox/
|
||||
|
||||
N: Owen Walpole <owen@walpole.dev>
|
||||
F: package/parprouted/
|
||||
|
||||
N: Parnell Springmeyer <parnell@digitalmentat.com>
|
||||
F: package/scrypt/
|
||||
|
||||
@@ -2055,8 +2024,6 @@ F: package/iwd/
|
||||
F: package/libevdev/
|
||||
F: package/log4cplus/
|
||||
F: package/postgresql/
|
||||
F: package/python-colorzero/
|
||||
F: package/python-gpiozero/
|
||||
F: package/qt5/
|
||||
F: package/quotatool/
|
||||
F: package/racehound/
|
||||
@@ -2158,9 +2125,6 @@ N: Refik Tuzakli <tuzakli.refik@gmail.com>
|
||||
F: package/freescale-imx/
|
||||
F: package/paho-mqtt-cpp/
|
||||
|
||||
N: Ramon Fried <rfried.dev@gmail.com>
|
||||
F: package/bitwise/
|
||||
|
||||
N: Raphaël Mélotte <raphael.melotte@essensium.com>
|
||||
F: package/jbig2dec/
|
||||
|
||||
@@ -2246,7 +2210,6 @@ F: package/waffle/
|
||||
F: package/xenomai/
|
||||
F: package/zziplib/
|
||||
F: support/testing/tests/package/test_glxinfo.py
|
||||
F: support/testing/tests/package/test_openssh.py
|
||||
F: toolchain/
|
||||
|
||||
N: Roman Gorbenkov <roman.gorbenkov@ens2m.org>
|
||||
@@ -2258,7 +2221,6 @@ F: package/miraclecast/
|
||||
F: package/python-pysnmp/
|
||||
F: package/python-pysnmp-mibs/
|
||||
F: package/python-tornado/
|
||||
F: package/resiprocate/
|
||||
F: package/websocketpp/
|
||||
|
||||
N: Ryan Coe <bluemrp9@gmail.com>
|
||||
@@ -2335,7 +2297,6 @@ N: Sergio Prado <sergio.prado@e-labworks.com>
|
||||
F: board/toradex/apalis-imx6/
|
||||
F: configs/toradex_apalis_imx6_defconfig
|
||||
F: package/aoetools/
|
||||
F: package/azure-iot-sdk-c/
|
||||
F: package/curlpp/
|
||||
F: package/daq/
|
||||
F: package/libgdiplus/
|
||||
@@ -2432,11 +2393,7 @@ F: package/powertop/
|
||||
|
||||
N: Suniel Mahesh <sunil@amarulasolutions.com>
|
||||
F: board/firefly/
|
||||
F: board/radxa/rockpi-4
|
||||
F: board/radxa/rockpi-n10
|
||||
F: configs/roc_pc_rk3399_defconfig
|
||||
F: configs/rock_pi_4_defconfig
|
||||
F: configs/rock_pi_n10_defconfig
|
||||
F: package/arm-gnu-a-toolchain/
|
||||
|
||||
N: Sven Haardiek <sven.haardiek@iotec-gmbh.de>
|
||||
@@ -2604,8 +2561,6 @@ F: package/nss-myhostname/
|
||||
F: package/utp_com/
|
||||
|
||||
N: Vincent Stehlé <vincent.stehle@laposte.net>
|
||||
F: board/bananapi/bananapi-m2-zero/
|
||||
F: configs/bananapi_m2_zero_defconfig
|
||||
F: package/i7z/
|
||||
F: package/msr-tools/
|
||||
F: package/pixz/
|
||||
|
||||
51
Makefile
51
Makefile
@@ -92,9 +92,9 @@ all:
|
||||
.PHONY: all
|
||||
|
||||
# Set and export the version string
|
||||
export BR2_VERSION := 2020.08
|
||||
export BR2_VERSION := 2020.08-git
|
||||
# Actual time the release is cut (for reproducible builds)
|
||||
BR2_VERSION_EPOCH = 1598992000
|
||||
BR2_VERSION_EPOCH = 1591045000
|
||||
|
||||
# Save running make version since it's clobbered by the make package
|
||||
RUNNING_MAKE_VERSION := $(MAKE_VERSION)
|
||||
@@ -113,13 +113,7 @@ DATE := $(shell date +%Y%m%d)
|
||||
|
||||
# Compute the full local version string so packages can use it as-is
|
||||
# Need to export it, so it can be got from environment in children (eg. mconf)
|
||||
|
||||
BR2_LOCALVERSION := $(shell $(TOPDIR)/support/scripts/setlocalversion)
|
||||
ifeq ($(BR2_LOCALVERSION),)
|
||||
export BR2_VERSION_FULL := $(BR2_VERSION)
|
||||
else
|
||||
export BR2_VERSION_FULL := $(BR2_LOCALVERSION)
|
||||
endif
|
||||
export BR2_VERSION_FULL := $(BR2_VERSION)$(shell $(TOPDIR)/support/scripts/setlocalversion)
|
||||
|
||||
# List of targets and target patterns for which .config doesn't need to be read in
|
||||
noconfig_targets := menuconfig nconfig gconfig xconfig config oldconfig randconfig \
|
||||
@@ -463,12 +457,12 @@ endif
|
||||
|
||||
ifneq ($(HOST_DIR),$(BASE_DIR)/host)
|
||||
HOST_DIR_SYMLINK = $(BASE_DIR)/host
|
||||
$(HOST_DIR_SYMLINK): | $(BASE_DIR)
|
||||
$(HOST_DIR_SYMLINK): $(BASE_DIR)
|
||||
ln -snf $(HOST_DIR) $(HOST_DIR_SYMLINK)
|
||||
endif
|
||||
|
||||
STAGING_DIR_SYMLINK = $(BASE_DIR)/staging
|
||||
$(STAGING_DIR_SYMLINK): | $(BASE_DIR)
|
||||
$(STAGING_DIR_SYMLINK): $(BASE_DIR)
|
||||
ln -snf $(STAGING_DIR) $(STAGING_DIR_SYMLINK)
|
||||
|
||||
# Quotes are needed for spaces and all in the original PATH content.
|
||||
@@ -701,7 +695,8 @@ LOCALE_NOPURGE = $(call qstrip,$(BR2_ENABLE_LOCALE_WHITELIST))
|
||||
# in the whitelist file. If it doesn't, kill it.
|
||||
# Finally, specifically for X11, regenerate locale.dir from the whitelist.
|
||||
define PURGE_LOCALES
|
||||
printf '%s\n' $(LOCALE_NOPURGE) locale-archive > $(LOCALE_WHITELIST)
|
||||
rm -f $(LOCALE_WHITELIST)
|
||||
for i in $(LOCALE_NOPURGE) locale-archive; do echo $$i >> $(LOCALE_WHITELIST); done
|
||||
|
||||
for dir in $(addprefix $(TARGET_DIR),/usr/share/locale /usr/share/X11/locale /usr/lib/locale); \
|
||||
do \
|
||||
@@ -762,7 +757,6 @@ ifneq ($(BR2_PACKAGE_GDB),y)
|
||||
endif
|
||||
ifneq ($(BR2_PACKAGE_BASH),y)
|
||||
rm -rf $(TARGET_DIR)/usr/share/bash-completion
|
||||
rm -rf $(TARGET_DIR)/etc/bash_completion.d
|
||||
endif
|
||||
ifneq ($(BR2_PACKAGE_ZSH),y)
|
||||
rm -rf $(TARGET_DIR)/usr/share/zsh
|
||||
@@ -772,9 +766,6 @@ endif
|
||||
rm -rf $(TARGET_DIR)/usr/doc $(TARGET_DIR)/usr/share/doc
|
||||
rm -rf $(TARGET_DIR)/usr/share/gtk-doc
|
||||
rmdir $(TARGET_DIR)/usr/share 2>/dev/null || true
|
||||
ifneq ($(BR2_ENABLE_DEBUG):$(BR2_STRIP_strip),y:)
|
||||
rm -rf $(TARGET_DIR)/lib/debug $(TARGET_DIR)/usr/lib/debug
|
||||
endif
|
||||
$(STRIP_FIND_CMD) | xargs -0 $(STRIPCMD) 2>/dev/null || true
|
||||
$(STRIP_FIND_SPECIAL_LIBS_CMD) | xargs -0 -r $(STRIPCMD) $(STRIP_STRIP_DEBUG) 2>/dev/null || true
|
||||
|
||||
@@ -799,9 +790,9 @@ endif
|
||||
# counterparts are appropriately setup as symlinks ones to the others.
|
||||
ifeq ($(BR2_ROOTFS_MERGED_USR),y)
|
||||
|
||||
$(foreach d, $(call qstrip,$(BR2_ROOTFS_OVERLAY)), \
|
||||
@$(call MESSAGE,"Sanity check in overlay $(d)")$(sep) \
|
||||
$(Q)not_merged_dirs="$$(support/scripts/check-merged-usr.sh $(d))"; \
|
||||
@$(foreach d, $(call qstrip,$(BR2_ROOTFS_OVERLAY)), \
|
||||
$(call MESSAGE,"Sanity check in overlay $(d)"); \
|
||||
not_merged_dirs="$$(support/scripts/check-merged-usr.sh $(d))"; \
|
||||
test -n "$$not_merged_dirs" && { \
|
||||
echo "ERROR: The overlay in $(d) is not" \
|
||||
"using a merged /usr for the following directories:" \
|
||||
@@ -811,20 +802,20 @@ ifeq ($(BR2_ROOTFS_MERGED_USR),y)
|
||||
|
||||
endif # merged /usr
|
||||
|
||||
$(foreach d, $(call qstrip,$(BR2_ROOTFS_OVERLAY)), \
|
||||
@$(call MESSAGE,"Copying overlay $(d)")$(sep) \
|
||||
$(Q)$(call SYSTEM_RSYNC,$(d),$(TARGET_DIR))$(sep))
|
||||
@$(foreach d, $(call qstrip,$(BR2_ROOTFS_OVERLAY)), \
|
||||
$(call MESSAGE,"Copying overlay $(d)"); \
|
||||
$(call SYSTEM_RSYNC,$(d),$(TARGET_DIR))$(sep))
|
||||
|
||||
$(Q)$(if $(TARGET_DIR_FILES_LISTS), \
|
||||
$(if $(TARGET_DIR_FILES_LISTS), \
|
||||
cat $(TARGET_DIR_FILES_LISTS)) > $(BUILD_DIR)/packages-file-list.txt
|
||||
$(Q)$(if $(HOST_DIR_FILES_LISTS), \
|
||||
$(if $(HOST_DIR_FILES_LISTS), \
|
||||
cat $(HOST_DIR_FILES_LISTS)) > $(BUILD_DIR)/packages-file-list-host.txt
|
||||
$(Q)$(if $(STAGING_DIR_FILES_LISTS), \
|
||||
$(if $(STAGING_DIR_FILES_LISTS), \
|
||||
cat $(STAGING_DIR_FILES_LISTS)) > $(BUILD_DIR)/packages-file-list-staging.txt
|
||||
|
||||
$(foreach s, $(call qstrip,$(BR2_ROOTFS_POST_BUILD_SCRIPT)), \
|
||||
@$(call MESSAGE,"Executing post-build script $(s)")$(sep) \
|
||||
$(Q)$(EXTRA_ENV) $(s) $(TARGET_DIR) $(call qstrip,$(BR2_ROOTFS_POST_SCRIPT_ARGS))$(sep))
|
||||
@$(foreach s, $(call qstrip,$(BR2_ROOTFS_POST_BUILD_SCRIPT)), \
|
||||
$(call MESSAGE,"Executing post-build script $(s)"); \
|
||||
$(EXTRA_ENV) $(s) $(TARGET_DIR) $(call qstrip,$(BR2_ROOTFS_POST_SCRIPT_ARGS))$(sep))
|
||||
|
||||
touch $(TARGET_DIR)/usr
|
||||
|
||||
@@ -1212,6 +1203,10 @@ check-package:
|
||||
find $(TOPDIR) -type f \( -name '*.mk' -o -name '*.hash' -o -name 'Config.*' \) \
|
||||
-exec ./utils/check-package {} +
|
||||
|
||||
.PHONY: .gitlab-ci.yml
|
||||
.gitlab-ci.yml: .gitlab-ci.yml.in
|
||||
./support/scripts/generate-gitlab-ci-yml $< > $@
|
||||
|
||||
include docs/manual/manual.mk
|
||||
-include $(foreach dir,$(BR2_EXTERNAL_DIRS),$(sort $(wildcard $(dir)/docs/*/*.mk)))
|
||||
|
||||
|
||||
@@ -308,10 +308,6 @@ config BR2_ARCH_NEEDS_GCC_AT_LEAST_9
|
||||
bool
|
||||
select BR2_ARCH_NEEDS_GCC_AT_LEAST_8
|
||||
|
||||
config BR2_ARCH_NEEDS_GCC_AT_LEAST_10
|
||||
bool
|
||||
select BR2_ARCH_NEEDS_GCC_AT_LEAST_9
|
||||
|
||||
# The following string values are defined by the individual
|
||||
# Config.in.$ARCH files
|
||||
config BR2_ARCH
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
mkdir -p ${TARGET_DIR}/lib/firmware
|
||||
cp -f ${BUILD_DIR}/linux-custom/firmware/ppfe/* ${TARGET_DIR}/lib/firmware/
|
||||
cp -f ${BUILD_DIR}/linux-custom/br2-ucls1012a.its ${BINARIES_DIR}/
|
||||
@@ -1,6 +1,6 @@
|
||||
This document explains how to set up a basic Buildroot system on
|
||||
various Atmel/Microchip boards. Additional details can also be found
|
||||
on the Linux4SAM website: http://www.linux4sam.org
|
||||
This document explains how to set up a basic Buildroot system on various
|
||||
Atmel boards. Additional details can also be found on the Linux4SAM website:
|
||||
http://www.at91.com/linux4sam/bin/view/Linux4SAM/
|
||||
|
||||
This guide covers the following configurations:
|
||||
- at91sam9g45m10ek_defconfig
|
||||
@@ -19,8 +19,6 @@ This guide covers the following configurations:
|
||||
- atmel_sama5d4_xplained_mmc_dev_defconfig
|
||||
- atmel_sama5d2_xplained_mmc_defconfig
|
||||
- atmel_sama5d2_xplained_mmc_dev_defconfig
|
||||
- microchip_sama5d27_wlsom1_ek_mmc_defconfig
|
||||
- microchip_sama5d27_wlsom1_ek_mmc_dev_defconfig
|
||||
|
||||
These configurations will use AT91Bootstrap, u-boot and a linux kernel from
|
||||
the git trees maintained by Atmel.
|
||||
@@ -31,23 +29,23 @@ tests the features of the SoC:
|
||||
- FFMPEG to record video from the ISI/ISC
|
||||
- I2C, SPI, CAN, etc. tools
|
||||
- modetest for LCD screens, HDMI
|
||||
- Wilc1000/Wilc3000 firmware for the Atmel Wireless sdio module
|
||||
- Wilc1000 firmware for the Atmel Wireless sdio module
|
||||
- SSH for convenience
|
||||
- GDB/GDB server for debug
|
||||
|
||||
Configuring and building Buildroot
|
||||
==================================
|
||||
|
||||
For the Xplained/Evaluation Kit boards, the Buildroot configuration is
|
||||
provided to boot from an SD card. Those configurations are labeled as
|
||||
'mmc'. In this case, after building Buildroot, follow the instructions
|
||||
in the "Preparing the SD card" section.
|
||||
|
||||
For the other configurations listed above, the Buildroot configuration
|
||||
For most configurations listed above, the Buildroot configuration
|
||||
assumes the system will be flashed on NAND. In this case, after
|
||||
building Buildroot, follow the instructions in the "Flashing the NAND
|
||||
using SAM-BA" section below.
|
||||
|
||||
For the Xplained boards, an alternative Buildroot configuration is
|
||||
provided to boot from an SD card. Those configurations are labeled as
|
||||
'mmc'. In this case, after building Buildroot, follow the instructions
|
||||
in the "Preparing the SD card" section.
|
||||
|
||||
To configure and build Buildroot, run:
|
||||
|
||||
make <board>_defconfig
|
||||
@@ -146,10 +144,10 @@ lost. To copy the image on the SD card:
|
||||
|
||||
dd if=output/images/sdcard.img of=/dev/mmcblk0
|
||||
|
||||
Insert your SD card in your Xplained/Evaluation Kit board, and
|
||||
enjoy. The default U-Boot environment will load properly the kernel
|
||||
and Device Tree blob from the first partition of the SD card, so
|
||||
everything works automatically.
|
||||
Insert your SD card in your Xplained board, and enjoy. The default
|
||||
U-Boot environment will load properly the kernel and Device Tree blob
|
||||
from the first partition of the SD card, so everything works
|
||||
automatically.
|
||||
|
||||
By default a 16MB FAT partition is created. It contains at91bootstrap,
|
||||
u-boot, the kernel image and all dtb variants for your board. The dtb
|
||||
|
||||
@@ -1,31 +0,0 @@
|
||||
# Image for SD card boot on Microchip SAMA5D27 WLSOM1 EK
|
||||
#
|
||||
image boot.vfat {
|
||||
vfat {
|
||||
files = {
|
||||
"zImage",
|
||||
"at91-sama5d27_wlsom1_ek.dtb",
|
||||
"boot.bin",
|
||||
"u-boot.bin"
|
||||
}
|
||||
}
|
||||
size = 16M
|
||||
}
|
||||
|
||||
image sdcard.img {
|
||||
hdimage {
|
||||
}
|
||||
|
||||
partition boot {
|
||||
partition-type = 0xC
|
||||
bootable = "true"
|
||||
image = "boot.vfat"
|
||||
offset = 1M
|
||||
}
|
||||
|
||||
partition rootfs {
|
||||
partition-type = 0x83
|
||||
image = "rootfs.ext4"
|
||||
size = 512M
|
||||
}
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
setenv bootargs console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p2 rootwait
|
||||
|
||||
mmc dev 0
|
||||
fatload mmc 0 $kernel_addr_r zImage
|
||||
fatload mmc 0 $fdt_addr_r sun8i-h2-plus-bananapi-m2-zero.dtb
|
||||
|
||||
bootz $kernel_addr_r - $fdt_addr_r
|
||||
@@ -1,33 +0,0 @@
|
||||
image boot.vfat {
|
||||
vfat {
|
||||
files = {
|
||||
"zImage",
|
||||
"sun8i-h2-plus-bananapi-m2-zero.dtb",
|
||||
"boot.scr"
|
||||
}
|
||||
}
|
||||
size = 64M
|
||||
}
|
||||
|
||||
image sdcard.img {
|
||||
hdimage {
|
||||
}
|
||||
|
||||
partition u-boot {
|
||||
in-partition-table = "no"
|
||||
image = "u-boot-sunxi-with-spl.bin"
|
||||
offset = 8192
|
||||
size = 1040384 # 1MB - 8192
|
||||
}
|
||||
|
||||
partition boot {
|
||||
partition-type = 0xC
|
||||
bootable = "true"
|
||||
image = "boot.vfat"
|
||||
}
|
||||
|
||||
partition rootfs {
|
||||
partition-type = 0x83
|
||||
image = "rootfs.ext4"
|
||||
}
|
||||
}
|
||||
@@ -1,34 +0,0 @@
|
||||
Intro
|
||||
=====
|
||||
|
||||
This default configuration will allow you to start experimenting with the
|
||||
Buildroot environment for the Bananapi M2 Zero. With the current configuration
|
||||
it will bring-up the board, and allow access through the serial console.
|
||||
|
||||
Bananapi M2 Zero link:
|
||||
http://www.banana-pi.org/m2z.html
|
||||
|
||||
This configuration uses U-Boot mainline and kernel mainline.
|
||||
|
||||
How to build
|
||||
============
|
||||
|
||||
$ make bananapi_m2_zero_defconfig
|
||||
$ make
|
||||
|
||||
Note: you will need access to the internet to download the required
|
||||
sources.
|
||||
|
||||
How to write the SD card
|
||||
========================
|
||||
|
||||
Once the build process is finished you will have an image called "sdcard.img"
|
||||
in the output/images/ directory.
|
||||
|
||||
Copy the bootable "sdcard.img" onto an SD card with "dd":
|
||||
|
||||
$ sudo dd if=output/images/sdcard.img of=/dev/sdX
|
||||
$ sync
|
||||
|
||||
Insert the micro SDcard in your Bananapi M2 Zero and power it up. The console
|
||||
is on the Debug UART on the CON3 header, with serial settings 115200 8N1.
|
||||
@@ -1,4 +1,4 @@
|
||||
From e9a88fddc149fc52cdc5a8997f9fd3a29416c643 Mon Sep 17 00:00:00 2001
|
||||
From e9b507b695331ef6fa941b471be0a7f284ec6980 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Vincent=20Stehl=C3=A9?= <vincent.stehle@freescale.com>
|
||||
Date: Tue, 12 Aug 2014 10:17:31 +0200
|
||||
Subject: [PATCH] mx6qsabre_common: boot Linux to /init in mfgtools mode
|
||||
@@ -20,10 +20,10 @@ Signed-off-by: Julien Olivain <julien.olivain@oss.nxp.com>
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/include/configs/imx_env.h b/include/configs/imx_env.h
|
||||
index c03748d93f..aa1a8bf488 100644
|
||||
index 234af33e55..7e31d208dc 100644
|
||||
--- a/include/configs/imx_env.h
|
||||
+++ b/include/configs/imx_env.h
|
||||
@@ -29,7 +29,7 @@
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
#define CONFIG_MFG_ENV_SETTINGS_DEFAULT \
|
||||
"mfgtool_args=setenv bootargs console=${console},${baudrate} " \
|
||||
@@ -33,5 +33,5 @@ index c03748d93f..aa1a8bf488 100644
|
||||
"\0" \
|
||||
"kboot="MFG_BOOT_CMD"\0"\
|
||||
--
|
||||
2.26.2
|
||||
2.25.1
|
||||
|
||||
@@ -9,18 +9,8 @@ Build
|
||||
|
||||
First, configure Buildroot for your i.MX6ULL EVK board:
|
||||
|
||||
In order to to do so there are two supported options:
|
||||
|
||||
make freescale_imx6ullevk_defconfig
|
||||
|
||||
if you plan to use NXP provided U-Boot and kernel.
|
||||
|
||||
or
|
||||
|
||||
make imx6ullevk_defconfig
|
||||
|
||||
if you plan to use mainline U-Boot and mainline kernel.
|
||||
|
||||
Build all components:
|
||||
|
||||
make
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
# Minimal image, no U-boot since v3/v5 cannot boot from sdcard, see
|
||||
# readme.txt for details on configuring the on-board u-boot.
|
||||
image sdcard.img {
|
||||
hdimage {
|
||||
}
|
||||
|
||||
partition rootfs {
|
||||
partition-type = 0x83
|
||||
image = "rootfs.ext4"
|
||||
}
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
#
|
||||
# The Espressobin has a switchcore with full support in the kernel.
|
||||
# This fragment enables DSA and its drivers, inclding VLAN aware bridge
|
||||
# support to allow users to easily set up a LAN switch + WAN interface.
|
||||
#
|
||||
CONFIG_NET_DSA=m
|
||||
CONFIG_VLAN_8021Q=y
|
||||
|
||||
CONFIG_BRIDGE=m
|
||||
CONFIG_BRIDGE_IGMP_SNOOPING=y
|
||||
CONFIG_BRIDGE_VLAN_FILTERING=y
|
||||
|
||||
CONFIG_NET_DSA_MV88E6XXX=m
|
||||
CONFIG_NET_DSA_MV88E6XXX_PTP=y
|
||||
@@ -1,90 +0,0 @@
|
||||
Marvell ESPRESSObin
|
||||
===================
|
||||
|
||||
This default configuration allows you to quickly get up and running with
|
||||
the Marvell ESPRESSObin board by Globalscale Technologies Inc.
|
||||
|
||||
The ESPRESSObin is based on the Marvell Armada 88F3720 SoC, coupled with
|
||||
a Marvell 88E6341 switch core "Topaz", with three exposed gigabit ports.
|
||||
|
||||
_________________________
|
||||
|# U W L L U #|
|
||||
|# S A A A S #|
|
||||
|# B N N N B #|
|
||||
|# 0 1 #|
|
||||
|# Mini #|
|
||||
|# -PCI #|
|
||||
|# #|
|
||||
|# 5 #|
|
||||
|#__V___usb_PWR_SATA__SW_#|
|
||||
|
||||
Fig 1: Overview of board
|
||||
|
||||
Notice difference in Ethernet port layout compared to the Globalscale
|
||||
docs. They order the ports; LAN2, LAN1, WAN (left to right in figure
|
||||
above). For more information, see http://espressobin.net
|
||||
|
||||
|
||||
Building
|
||||
--------
|
||||
|
||||
$ make globalscale_espressobin_defconfig
|
||||
$ make
|
||||
|
||||
This generates the kernel image, the devicetree binary, the rootfs as a
|
||||
tar.gz, and a filesystem image containing everything.
|
||||
|
||||
All build artifacts are located in `output/images/`
|
||||
|
||||
|
||||
Booting
|
||||
-------
|
||||
|
||||
To boot, you need a UART connection, using the on-board micro USB port
|
||||
set to 115200 8N1.
|
||||
|
||||
By default, the ESPRESSObin comes with a pre-flashed U-Boot set up to
|
||||
load the kernel, device-tree and rootfs from SPI NOR flash. The board
|
||||
jumpers can be changed to boot from different sources, see the quick
|
||||
start guide for each board revision for details:
|
||||
|
||||
- ftp://downloads.globalscaletechnologies.com/Downloads/Espressobin/ESPRESSObin%20V5/
|
||||
- ftp://downloads.globalscaletechnologies.com/Downloads/Espressobin/ESPRESSObin%20V7/
|
||||
|
||||
Note: the v5, and earlier, cannot boot from sdcard, so you have to set
|
||||
up the factory U-Boot to boot into Buildroot:
|
||||
|
||||
1. Flash rootfs image to sdcard drive, your `of=` device may differ:
|
||||
|
||||
$ sudo dd if=output/images/sdcard.img of=/dev/mmcblk0 bs=1M
|
||||
$ sync
|
||||
|
||||
2. Boot board from SPI NOR, interrupt boot by pressing any key ...
|
||||
3. Check with `printenv` that the default setup is OK, otherwise ensure
|
||||
the following are set, and define `bootcmd` for automatic boot:
|
||||
|
||||
> setenv kernel_addr 0x5000000
|
||||
> setenv fdt_addr 0x1800000
|
||||
> setenv fdt_name boot/armada-3720-espressobin.dtb
|
||||
> setenv console console=ttyMV0,115200 earlycon=ar3700_uart,0xd0012000
|
||||
> setenv bootcmd 'mmc dev 0; ext4load mmc 0:1 $kernel_addr $image_name;ext4load mmc 0:1 $fdt_addr $fdt_name;setenv bootargs $console root=/dev/mmcblk0p1 rw rootwait; booti $kernel_addr - $fdt_addr'
|
||||
|
||||
4. Call the boot command, or `reset` the board to start:
|
||||
|
||||
> run bootcmd
|
||||
|
||||
|
||||
Networking
|
||||
----------
|
||||
|
||||
To enable Ethernet networking, load the `mv88e6xxx` kernel module, and
|
||||
bring up each respective interface needed:
|
||||
|
||||
# modprobe mv88e6xxx
|
||||
# ifconfig wan up
|
||||
|
||||
A more advanced scenario is setting up switching between the ports using
|
||||
the Linux bridge. The kernel switchdev layer, and DSA driver, ensure
|
||||
switch functions are "offloaded" to the HW switch, i.e., all traffic
|
||||
between LAN ports never reach the CPU. For this you need the iproute2
|
||||
suite of tools.
|
||||
@@ -19,9 +19,6 @@ CONFIG_SCSI=y
|
||||
CONFIG_BLK_DEV_SD=y
|
||||
CONFIG_BLK_DEV_SR=y
|
||||
CONFIG_CHR_DEV_SG=y
|
||||
CONFIG_MTD=y
|
||||
CONFIG_MTD_BLOCK=y
|
||||
CONFIG_GPIO_SYSFS=y
|
||||
CONFIG_NETDEVICES=y
|
||||
CONFIG_LIBERTAS=m
|
||||
CONFIG_INPUT_MOUSEDEV=y
|
||||
@@ -30,9 +27,9 @@ CONFIG_INPUT_MOUSEDEV_SCREEN_X=1200
|
||||
CONFIG_INPUT_MOUSEDEV_SCREEN_Y=900
|
||||
CONFIG_INPUT_EVDEV=y
|
||||
CONFIG_INPUT_TABLET=y
|
||||
CONFIG_SERIO_OLPC_APSP=y
|
||||
CONFIG_SERIAL_8250=y
|
||||
CONFIG_SERIAL_8250_CONSOLE=y
|
||||
CONFIG_POWER_SUPPLY=y
|
||||
CONFIG_BATTERY_OLPC=y
|
||||
CONFIG_REGULATOR_FIXED_VOLTAGE=y
|
||||
CONFIG_MEDIA_SUPPORT=y
|
||||
@@ -47,7 +44,6 @@ CONFIG_DRM_PANEL_SIMPLE=m
|
||||
CONFIG_FRAMEBUFFER_CONSOLE=y
|
||||
CONFIG_FB_SIMPLE=y
|
||||
CONFIG_LCD_CLASS_DEVICE=y
|
||||
CONFIG_BACKLIGHT_CLASS_DEVICE=y
|
||||
CONFIG_SOUND=y
|
||||
CONFIG_SND=y
|
||||
CONFIG_USB=y
|
||||
@@ -55,17 +51,16 @@ CONFIG_USB_EHCI_HCD=y
|
||||
CONFIG_USB_STORAGE=y
|
||||
CONFIG_MMC=y
|
||||
CONFIG_MMC_SDHCI=y
|
||||
CONFIG_NEW_LEDS=y
|
||||
CONFIG_MMC_SDHCI_PCI=y
|
||||
CONFIG_MMC_SDHCI_PLTFM=y
|
||||
CONFIG_LEDS_CLASS=y
|
||||
CONFIG_LEDS_GPIO=y
|
||||
CONFIG_LEDS_TRIGGERS=y
|
||||
CONFIG_LEDS_TRIGGER_HEARTBEAT=y
|
||||
CONFIG_LEDS_TRIGGER_DEFAULT_ON=y
|
||||
CONFIG_RTC_CLASS=y
|
||||
CONFIG_EXT4_FS=y
|
||||
CONFIG_MSDOS_FS=y
|
||||
CONFIG_VFAT_FS=y
|
||||
CONFIG_TMPFS=y
|
||||
CONFIG_TMPFS_POSIX_ACL=y
|
||||
CONFIG_FONTS=y
|
||||
CONFIG_FONT_TER16x32=y
|
||||
|
||||
@@ -5,11 +5,10 @@
|
||||
|
||||
" /aliases" find-device " last" get-property
|
||||
abort" No last alias"
|
||||
" /pci/sd@c" 2over substring? if " root=/dev/mmcblk0p1 " to boot-file then
|
||||
" /sd/sdhci@d4280000" 2over substring? if " root=/dev/mmcblk1p1 " to boot-file then
|
||||
" /pci/usb@" 2over substring? if " root=/dev/sda1 " to boot-file then
|
||||
" /usb@" 2over substring? if " root=/dev/sda1 " to boot-file then
|
||||
" /pci/nandflash@c" 2over substring? if " root=/dev/mtdblock0 rootfstype=jffs2 " to boot-file then
|
||||
" /pci/sd@c" 2over substring? if " root=/dev/mmcblk0p1 " to boot-file then
|
||||
" /sd/sdhci@d4280000" 2over substring? if " root=/dev/mmcblk1p1 " to boot-file then
|
||||
" /pci/usb@" 2over substring? if " root=/dev/sda1 " to boot-file then
|
||||
" /usb@" 2over substring? if " root=/dev/sda1 " to boot-file then
|
||||
2drop
|
||||
|
||||
root-device " compatible" get-property dend if 0 0 then ( compatible$ )
|
||||
|
||||
@@ -9,13 +9,10 @@ Supported models
|
||||
|
||||
* OLPC XO-1
|
||||
The original NS Geode based OLPC laptop, uses the x86 architecture.
|
||||
Can be booted either from an internal MTD device formatted with JFFS2
|
||||
or from a FAT or EXT4 partition on a SD card or a USB flash stick.
|
||||
|
||||
* OLPC XO-7.5
|
||||
The ARM-based laptop. Needs a recent enough firmware to provide a good
|
||||
enough flattened device tree to the kernel. Can be from a FAT or EXT4
|
||||
partition on a internal eMMC, a SD card or a USB flash stick.
|
||||
enough flattened device tree to the kernel.
|
||||
|
||||
Configure and build
|
||||
===================
|
||||
@@ -31,6 +28,18 @@ Then:
|
||||
$ make menuconfig # Customize the build configuration
|
||||
$ make # Build
|
||||
|
||||
Create the bootable media
|
||||
=========================
|
||||
|
||||
When the build is finished, the resulting image file will be called
|
||||
"sdcard.img". It can be written directly to a SD-card or and USB flash stick.
|
||||
|
||||
Please double check that you're using the right device (e.g. with "lsblk"
|
||||
command). Doing the following will DESTROY ALL DATA that's currently on the
|
||||
media.
|
||||
|
||||
# cat output/images/sdcard.img >/dev/<device>
|
||||
|
||||
Preparing the machine
|
||||
=====================
|
||||
|
||||
@@ -62,37 +71,8 @@ to update the firmware:
|
||||
ok flash ext:\q4e00ja.rom \ Flash the "q4e00ja.rom" from the SD card
|
||||
ok flash u:\q4e00ja.rom \ Flash the "q4e00ja.rom" from USB stick
|
||||
|
||||
Create the bootable SD card or USB flash stick
|
||||
==============================================
|
||||
|
||||
When the build is finished, an image file called "sdcard.img" will be created.
|
||||
It is suitable for writing directly to a SD card, USB flash stick or (on a
|
||||
XO-1.75) the internal eMMC flash.
|
||||
|
||||
Before writing the image, please double check that you're using the right
|
||||
device (e.g. with "lsblk" command). Doing the following will DESTROY ALL DATA
|
||||
that's currently on the media.
|
||||
|
||||
# cat output/images/sdcard.img >/dev/<device>
|
||||
|
||||
Flashing the JFFS2 image (XO-1 only)
|
||||
====================================
|
||||
|
||||
Unlike XO-1.75, the internal NAND flash on XO-1 is accessed without a
|
||||
FTL and needs a flash-friendly filesystem. A build configured for XO-1
|
||||
creates a file named "root.jffs2" that can be written to it.
|
||||
|
||||
One way to write it is from the Open Firmware prompt. First, partition
|
||||
and format a USB flash disk with a FAT file system and place the
|
||||
"root.jffs2" file onto it. Then power on the machine, enter the
|
||||
Open Firmware port by pressing the ESC key and run the following:
|
||||
|
||||
ok patch noop ?open-crcs copy-nand \ Disable CRC check
|
||||
ok copy-nand u:\root.jffs2
|
||||
|
||||
Booting the machine
|
||||
===================
|
||||
|
||||
Once your machine is unlocked, it will automatically boot from your media
|
||||
wherever it will detect it attached to the USB bus or the SD card slot,
|
||||
otherwise it will proceed booting from the internal flash.
|
||||
wherever it will detect it attached to the USB bus or the SD card slot.
|
||||
|
||||
@@ -12,16 +12,14 @@ CONFIG_ARM_APPENDED_DTB=y
|
||||
CONFIG_ARM_ATAG_DTB_COMPAT=y
|
||||
CONFIG_VFP=y
|
||||
CONFIG_NEON=y
|
||||
CONFIG_SENSORS_LIS3_SPI=y
|
||||
CONFIG_SERIO_OLPC_APSP=y
|
||||
CONFIG_REGULATOR_88PG86X=m
|
||||
CONFIG_VIDEO_MMP_CAMERA=y
|
||||
CONFIG_DRM_ARMADA=y
|
||||
CONFIG_DRM_DISPLAY_CONNECTOR=m
|
||||
CONFIG_DRM_SIMPLE_BRIDGE=m
|
||||
CONFIG_DRM_ETNAVIV=m
|
||||
CONFIG_BACKLIGHT_CLASS_DEVICE=y
|
||||
CONFIG_USB_EHCI_MV=y
|
||||
CONFIG_MMC_SDHCI_PLTFM=y
|
||||
CONFIG_MMC_SDHCI_PXAV3=y
|
||||
CONFIG_OLPC_XO175=y
|
||||
CONFIG_OLPC_XO175_EC=y
|
||||
@@ -33,6 +31,9 @@ CONFIG_LIBERTAS_THINFIRM=m
|
||||
CONFIG_MWIFIEX=m
|
||||
CONFIG_MWIFIEX_SDIO=m
|
||||
CONFIG_MTD_SPI_NOR=m
|
||||
CONFIG_MTD=y
|
||||
CONFIG_MTD_BLOCK=y
|
||||
CONFIG_MTD_SPI_NOR=m
|
||||
CONFIG_I2C_PXA=y
|
||||
CONFIG_SERIAL_OF_PLATFORM=y
|
||||
CONFIG_SPI=y
|
||||
|
||||
@@ -4,27 +4,30 @@ CONFIG_MGEODE_LX=y
|
||||
CONFIG_X86_MSR=y
|
||||
CONFIG_HZ_100=y
|
||||
CONFIG_KEXEC=y
|
||||
CONFIG_PHYSICAL_START=0x400000
|
||||
CONFIG_CMDLINE_BOOL=y
|
||||
CONFIG_ACPI=y
|
||||
# CONFIG_ACPI is not set
|
||||
CONFIG_CPU_IDLE=y
|
||||
CONFIG_CPU_IDLE_GOV_LADDER=y
|
||||
CONFIG_OLPC=y
|
||||
CONFIG_OLPC_XO1_PM=y
|
||||
CONFIG_OLPC_XO1_RTC=y
|
||||
CONFIG_OLPC_XO1_SCI=y
|
||||
# CONFIG_FIRMWARE_MEMMAP is not set
|
||||
# CONFIG_VIRTUALIZATION is not set
|
||||
CONFIG_ARCH_MMAP_RND_BITS=16
|
||||
CONFIG_REFCOUNT_FULL=y
|
||||
CONFIG_SPARSEMEM_MANUAL=y
|
||||
CONFIG_CMA=y
|
||||
CONFIG_MTD_CMDLINE_PARTS=y
|
||||
CONFIG_MTD_REDBOOT_PARTS=y
|
||||
CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=0
|
||||
CONFIG_MTD_ONENAND=y
|
||||
CONFIG_MTD_ONENAND_GENERIC=y
|
||||
CONFIG_MTD_RAW_NAND=y
|
||||
CONFIG_MTD_NAND_CAFE=y
|
||||
CONFIG_MTD_UBI=y
|
||||
CONFIG_CS5535_MFGPT=y
|
||||
CONFIG_CS5535_CLOCK_EVENT_SRC=y
|
||||
CONFIG_SENSORS_LIS3_SPI=y
|
||||
CONFIG_MOUSE_PS2_OLPC=y
|
||||
CONFIG_SERIAL_8250_NR_UARTS=1
|
||||
CONFIG_SERIAL_8250_RUNTIME_UARTS=1
|
||||
@@ -39,6 +42,7 @@ CONFIG_NVRAM=y
|
||||
CONFIG_SCx200_ACB=y
|
||||
CONFIG_PINCTRL=y
|
||||
CONFIG_PINCTRL_SINGLE=y
|
||||
CONFIG_GPIO_SYSFS=y
|
||||
CONFIG_GPIO_CS5535=y
|
||||
CONFIG_THERMAL=y
|
||||
CONFIG_WATCHDOG=y
|
||||
@@ -59,15 +63,12 @@ CONFIG_SND_AC97_POWER_SAVE=y
|
||||
CONFIG_SND_CS5535AUDIO=y
|
||||
CONFIG_USB_EHCI_ROOT_HUB_TT=y
|
||||
CONFIG_USB_OHCI_HCD=y
|
||||
CONFIG_MMC_SDHCI_PCI=y
|
||||
CONFIG_STAGING=y
|
||||
CONFIG_FB_OLPC_DCON=y
|
||||
CONFIG_XO1_RFKILL=y
|
||||
CONFIG_RESET_CONTROLLER=y
|
||||
CONFIG_GENERIC_PHY=y
|
||||
CONFIG_PROC_KCORE=y
|
||||
CONFIG_HUGETLBFS=y
|
||||
CONFIG_JFFS2_FS=y
|
||||
CONFIG_JFFS2_FS_WBUF_VERIFY=y
|
||||
CONFIG_JFFS2_SUMMARY=y
|
||||
CONFIG_JFFS2_FS_XATTR=y
|
||||
|
||||
@@ -5,15 +5,13 @@ CONFIG_HIGH_RES_TIMERS=y
|
||||
CONFIG_TASKSTATS=y
|
||||
CONFIG_SCHED_AUTOGROUP=y
|
||||
CONFIG_PROFILING=y
|
||||
CONFIG_ARCH_VEXPRESS=y
|
||||
CONFIG_COMPAT=y
|
||||
CONFIG_FW_CFG_SYSFS=y
|
||||
CONFIG_FW_CFG_SYSFS_CMDLINE=y
|
||||
CONFIG_MODULES=y
|
||||
CONFIG_MODULE_UNLOAD=y
|
||||
CONFIG_BLK_DEV_BSGLIB=y
|
||||
CONFIG_BINFMT_MISC=y
|
||||
CONFIG_ARCH_VEXPRESS=y
|
||||
CONFIG_TRANSPARENT_HUGEPAGE=y
|
||||
CONFIG_BINFMT_MISC=y
|
||||
CONFIG_COMPAT=y
|
||||
CONFIG_NET=y
|
||||
CONFIG_PACKET=y
|
||||
CONFIG_PACKET_DIAG=y
|
||||
@@ -25,8 +23,6 @@ CONFIG_IP_ADVANCED_ROUTER=y
|
||||
CONFIG_BRIDGE=m
|
||||
CONFIG_NET_SCHED=y
|
||||
CONFIG_VSOCKETS=y
|
||||
CONFIG_PCI=y
|
||||
CONFIG_PCI_HOST_GENERIC=y
|
||||
CONFIG_DEVTMPFS=y
|
||||
CONFIG_DEVTMPFS_MOUNT=y
|
||||
CONFIG_VIRTIO_BLK=y
|
||||
@@ -42,25 +38,17 @@ CONFIG_DUMMY=y
|
||||
CONFIG_MACVLAN=y
|
||||
CONFIG_VIRTIO_NET=y
|
||||
CONFIG_NLMON=y
|
||||
CONFIG_VT_HW_CONSOLE_BINDING=y
|
||||
CONFIG_SERIAL_AMBA_PL011=y
|
||||
CONFIG_SERIAL_AMBA_PL011_CONSOLE=y
|
||||
CONFIG_VIRTIO_CONSOLE=y
|
||||
CONFIG_HW_RANDOM=y
|
||||
CONFIG_HW_RANDOM_VIRTIO=y
|
||||
CONFIG_TCG_TPM=y
|
||||
CONFIG_TCG_TIS=y
|
||||
CONFIG_DRM=y
|
||||
CONFIG_DRM_VIRTIO_GPU=y
|
||||
CONFIG_RTC_CLASS=y
|
||||
CONFIG_RTC_DRV_PL031=y
|
||||
CONFIG_VIRTIO_PCI=y
|
||||
CONFIG_VIRTIO_MMIO=y
|
||||
CONFIG_VIRTIO_MMIO_CMDLINE_DEVICES=y
|
||||
CONFIG_MAILBOX=y
|
||||
CONFIG_PL320_MBOX=y
|
||||
CONFIG_ARM_SMMU_V3=y
|
||||
CONFIG_EXT4_FS=y
|
||||
CONFIG_FUSE_FS=y
|
||||
CONFIG_VIRTIO_FS=y
|
||||
CONFIG_TMPFS=y
|
||||
CONFIG_TMPFS_POSIX_ACL=y
|
||||
|
||||
@@ -1,149 +0,0 @@
|
||||
From bb04c220d82598066eeadf49defaec1157d4d206 Mon Sep 17 00:00:00 2001
|
||||
From: Romain Naour <romain.naour@gmail.com>
|
||||
Date: Sat, 25 Jul 2020 11:46:01 +0200
|
||||
Subject: [PATCH] mips: Do not include hi and lo in clobber list for R6
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
From [1]
|
||||
"GCC 10 (PR 91233) won't silently allow registers that are not architecturally
|
||||
available to be present in the clobber list anymore, resulting in build failure
|
||||
for mips*r6 targets in form of:
|
||||
...
|
||||
.../sysdep.h:146:2: error: the register ‘lo’ cannot be clobbered in ‘asm’ for the current target
|
||||
146 | __asm__ volatile ( \
|
||||
| ^~~~~~~
|
||||
|
||||
This is because base R6 ISA doesn't define hi and lo registers w/o DSP extension.
|
||||
This patch provides the alternative clobber list for r6 targets that won't include
|
||||
those registers."
|
||||
|
||||
Since kernel 5.4 and mips support for generic vDSO [2], the kernel fail to build
|
||||
for mips r6 cpus with gcc 10 for the same reason as glibc.
|
||||
|
||||
[1] https://sourceware.org/git/?p=glibc.git;a=commit;h=020b2a97bb15f807c0482f0faee2184ed05bcad8
|
||||
[2] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=24640f233b466051ad3a5d2786d2951e43026c9d
|
||||
|
||||
Signed-off-by: Romain Naour <romain.naour@gmail.com>
|
||||
---
|
||||
arch/mips/include/asm/vdso/gettimeofday.h | 45 +++++++++++++++++++++++
|
||||
1 file changed, 45 insertions(+)
|
||||
|
||||
diff --git a/arch/mips/include/asm/vdso/gettimeofday.h b/arch/mips/include/asm/vdso/gettimeofday.h
|
||||
index 0ae9b4cbc153..ea600e0ebfe7 100644
|
||||
--- a/arch/mips/include/asm/vdso/gettimeofday.h
|
||||
+++ b/arch/mips/include/asm/vdso/gettimeofday.h
|
||||
@@ -36,12 +36,21 @@ static __always_inline long gettimeofday_fallback(
|
||||
register long nr asm("v0") = __NR_gettimeofday;
|
||||
register long error asm("a3");
|
||||
|
||||
+#if MIPS_ISA_REV >= 6
|
||||
+ asm volatile(
|
||||
+ " syscall\n"
|
||||
+ : "=r" (ret), "=r" (error)
|
||||
+ : "r" (tv), "r" (tz), "r" (nr)
|
||||
+ : "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13",
|
||||
+ "$14", "$15", "$24", "$25", "memory");
|
||||
+#else
|
||||
asm volatile(
|
||||
" syscall\n"
|
||||
: "=r" (ret), "=r" (error)
|
||||
: "r" (tv), "r" (tz), "r" (nr)
|
||||
: "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13",
|
||||
"$14", "$15", "$24", "$25", "hi", "lo", "memory");
|
||||
+#endif
|
||||
|
||||
return error ? -ret : ret;
|
||||
}
|
||||
@@ -60,12 +69,21 @@ static __always_inline long clock_gettime_fallback(
|
||||
#endif
|
||||
register long error asm("a3");
|
||||
|
||||
+#if MIPS_ISA_REV >= 6
|
||||
+ asm volatile(
|
||||
+ " syscall\n"
|
||||
+ : "=r" (ret), "=r" (error)
|
||||
+ : "r" (clkid), "r" (ts), "r" (nr)
|
||||
+ : "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13",
|
||||
+ "$14", "$15", "$24", "$25", "memory");
|
||||
+#else
|
||||
asm volatile(
|
||||
" syscall\n"
|
||||
: "=r" (ret), "=r" (error)
|
||||
: "r" (clkid), "r" (ts), "r" (nr)
|
||||
: "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13",
|
||||
"$14", "$15", "$24", "$25", "hi", "lo", "memory");
|
||||
+#endif
|
||||
|
||||
return error ? -ret : ret;
|
||||
}
|
||||
@@ -84,12 +102,21 @@ static __always_inline int clock_getres_fallback(
|
||||
#endif
|
||||
register long error asm("a3");
|
||||
|
||||
+#if MIPS_ISA_REV >= 6
|
||||
+ asm volatile(
|
||||
+ " syscall\n"
|
||||
+ : "=r" (ret), "=r" (error)
|
||||
+ : "r" (clkid), "r" (ts), "r" (nr)
|
||||
+ : "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13",
|
||||
+ "$14", "$15", "$24", "$25", "memory");
|
||||
+#else
|
||||
asm volatile(
|
||||
" syscall\n"
|
||||
: "=r" (ret), "=r" (error)
|
||||
: "r" (clkid), "r" (ts), "r" (nr)
|
||||
: "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13",
|
||||
"$14", "$15", "$24", "$25", "hi", "lo", "memory");
|
||||
+#endif
|
||||
|
||||
return error ? -ret : ret;
|
||||
}
|
||||
@@ -108,12 +135,21 @@ static __always_inline long clock_gettime32_fallback(
|
||||
register long nr asm("v0") = __NR_clock_gettime;
|
||||
register long error asm("a3");
|
||||
|
||||
+#if MIPS_ISA_REV >= 6
|
||||
+ asm volatile(
|
||||
+ " syscall\n"
|
||||
+ : "=r" (ret), "=r" (error)
|
||||
+ : "r" (clkid), "r" (ts), "r" (nr)
|
||||
+ : "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13",
|
||||
+ "$14", "$15", "$24", "$25", "memory");
|
||||
+#else
|
||||
asm volatile(
|
||||
" syscall\n"
|
||||
: "=r" (ret), "=r" (error)
|
||||
: "r" (clkid), "r" (ts), "r" (nr)
|
||||
: "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13",
|
||||
"$14", "$15", "$24", "$25", "hi", "lo", "memory");
|
||||
+#endif
|
||||
|
||||
return error ? -ret : ret;
|
||||
}
|
||||
@@ -128,12 +164,21 @@ static __always_inline int clock_getres32_fallback(
|
||||
register long nr asm("v0") = __NR_clock_getres;
|
||||
register long error asm("a3");
|
||||
|
||||
+#if MIPS_ISA_REV >= 6
|
||||
+ asm volatile(
|
||||
+ " syscall\n"
|
||||
+ : "=r" (ret), "=r" (error)
|
||||
+ : "r" (clkid), "r" (ts), "r" (nr)
|
||||
+ : "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13",
|
||||
+ "$14", "$15", "$24", "$25", "memory");
|
||||
+#else
|
||||
asm volatile(
|
||||
" syscall\n"
|
||||
: "=r" (ret), "=r" (error)
|
||||
: "r" (clkid), "r" (ts), "r" (nr)
|
||||
: "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13",
|
||||
"$14", "$15", "$24", "$25", "hi", "lo", "memory");
|
||||
+#endif
|
||||
|
||||
return error ? -ret : ret;
|
||||
}
|
||||
--
|
||||
2.25.4
|
||||
|
||||
@@ -1,149 +0,0 @@
|
||||
From bb04c220d82598066eeadf49defaec1157d4d206 Mon Sep 17 00:00:00 2001
|
||||
From: Romain Naour <romain.naour@gmail.com>
|
||||
Date: Sat, 25 Jul 2020 11:46:01 +0200
|
||||
Subject: [PATCH] mips: Do not include hi and lo in clobber list for R6
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
From [1]
|
||||
"GCC 10 (PR 91233) won't silently allow registers that are not architecturally
|
||||
available to be present in the clobber list anymore, resulting in build failure
|
||||
for mips*r6 targets in form of:
|
||||
...
|
||||
.../sysdep.h:146:2: error: the register ‘lo’ cannot be clobbered in ‘asm’ for the current target
|
||||
146 | __asm__ volatile ( \
|
||||
| ^~~~~~~
|
||||
|
||||
This is because base R6 ISA doesn't define hi and lo registers w/o DSP extension.
|
||||
This patch provides the alternative clobber list for r6 targets that won't include
|
||||
those registers."
|
||||
|
||||
Since kernel 5.4 and mips support for generic vDSO [2], the kernel fail to build
|
||||
for mips r6 cpus with gcc 10 for the same reason as glibc.
|
||||
|
||||
[1] https://sourceware.org/git/?p=glibc.git;a=commit;h=020b2a97bb15f807c0482f0faee2184ed05bcad8
|
||||
[2] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=24640f233b466051ad3a5d2786d2951e43026c9d
|
||||
|
||||
Signed-off-by: Romain Naour <romain.naour@gmail.com>
|
||||
---
|
||||
arch/mips/include/asm/vdso/gettimeofday.h | 45 +++++++++++++++++++++++
|
||||
1 file changed, 45 insertions(+)
|
||||
|
||||
diff --git a/arch/mips/include/asm/vdso/gettimeofday.h b/arch/mips/include/asm/vdso/gettimeofday.h
|
||||
index 0ae9b4cbc153..ea600e0ebfe7 100644
|
||||
--- a/arch/mips/include/asm/vdso/gettimeofday.h
|
||||
+++ b/arch/mips/include/asm/vdso/gettimeofday.h
|
||||
@@ -36,12 +36,21 @@ static __always_inline long gettimeofday_fallback(
|
||||
register long nr asm("v0") = __NR_gettimeofday;
|
||||
register long error asm("a3");
|
||||
|
||||
+#if MIPS_ISA_REV >= 6
|
||||
+ asm volatile(
|
||||
+ " syscall\n"
|
||||
+ : "=r" (ret), "=r" (error)
|
||||
+ : "r" (tv), "r" (tz), "r" (nr)
|
||||
+ : "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13",
|
||||
+ "$14", "$15", "$24", "$25", "memory");
|
||||
+#else
|
||||
asm volatile(
|
||||
" syscall\n"
|
||||
: "=r" (ret), "=r" (error)
|
||||
: "r" (tv), "r" (tz), "r" (nr)
|
||||
: "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13",
|
||||
"$14", "$15", "$24", "$25", "hi", "lo", "memory");
|
||||
+#endif
|
||||
|
||||
return error ? -ret : ret;
|
||||
}
|
||||
@@ -60,12 +69,21 @@ static __always_inline long clock_gettime_fallback(
|
||||
#endif
|
||||
register long error asm("a3");
|
||||
|
||||
+#if MIPS_ISA_REV >= 6
|
||||
+ asm volatile(
|
||||
+ " syscall\n"
|
||||
+ : "=r" (ret), "=r" (error)
|
||||
+ : "r" (clkid), "r" (ts), "r" (nr)
|
||||
+ : "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13",
|
||||
+ "$14", "$15", "$24", "$25", "memory");
|
||||
+#else
|
||||
asm volatile(
|
||||
" syscall\n"
|
||||
: "=r" (ret), "=r" (error)
|
||||
: "r" (clkid), "r" (ts), "r" (nr)
|
||||
: "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13",
|
||||
"$14", "$15", "$24", "$25", "hi", "lo", "memory");
|
||||
+#endif
|
||||
|
||||
return error ? -ret : ret;
|
||||
}
|
||||
@@ -84,12 +102,21 @@ static __always_inline int clock_getres_fallback(
|
||||
#endif
|
||||
register long error asm("a3");
|
||||
|
||||
+#if MIPS_ISA_REV >= 6
|
||||
+ asm volatile(
|
||||
+ " syscall\n"
|
||||
+ : "=r" (ret), "=r" (error)
|
||||
+ : "r" (clkid), "r" (ts), "r" (nr)
|
||||
+ : "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13",
|
||||
+ "$14", "$15", "$24", "$25", "memory");
|
||||
+#else
|
||||
asm volatile(
|
||||
" syscall\n"
|
||||
: "=r" (ret), "=r" (error)
|
||||
: "r" (clkid), "r" (ts), "r" (nr)
|
||||
: "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13",
|
||||
"$14", "$15", "$24", "$25", "hi", "lo", "memory");
|
||||
+#endif
|
||||
|
||||
return error ? -ret : ret;
|
||||
}
|
||||
@@ -108,12 +135,21 @@ static __always_inline long clock_gettime32_fallback(
|
||||
register long nr asm("v0") = __NR_clock_gettime;
|
||||
register long error asm("a3");
|
||||
|
||||
+#if MIPS_ISA_REV >= 6
|
||||
+ asm volatile(
|
||||
+ " syscall\n"
|
||||
+ : "=r" (ret), "=r" (error)
|
||||
+ : "r" (clkid), "r" (ts), "r" (nr)
|
||||
+ : "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13",
|
||||
+ "$14", "$15", "$24", "$25", "memory");
|
||||
+#else
|
||||
asm volatile(
|
||||
" syscall\n"
|
||||
: "=r" (ret), "=r" (error)
|
||||
: "r" (clkid), "r" (ts), "r" (nr)
|
||||
: "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13",
|
||||
"$14", "$15", "$24", "$25", "hi", "lo", "memory");
|
||||
+#endif
|
||||
|
||||
return error ? -ret : ret;
|
||||
}
|
||||
@@ -128,12 +164,21 @@ static __always_inline int clock_getres32_fallback(
|
||||
register long nr asm("v0") = __NR_clock_getres;
|
||||
register long error asm("a3");
|
||||
|
||||
+#if MIPS_ISA_REV >= 6
|
||||
+ asm volatile(
|
||||
+ " syscall\n"
|
||||
+ : "=r" (ret), "=r" (error)
|
||||
+ : "r" (clkid), "r" (ts), "r" (nr)
|
||||
+ : "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13",
|
||||
+ "$14", "$15", "$24", "$25", "memory");
|
||||
+#else
|
||||
asm volatile(
|
||||
" syscall\n"
|
||||
: "=r" (ret), "=r" (error)
|
||||
: "r" (clkid), "r" (ts), "r" (nr)
|
||||
: "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13",
|
||||
"$14", "$15", "$24", "$25", "hi", "lo", "memory");
|
||||
+#endif
|
||||
|
||||
return error ? -ret : ret;
|
||||
}
|
||||
--
|
||||
2.25.4
|
||||
|
||||
@@ -1,149 +0,0 @@
|
||||
From cfb381d8f4b64f3752c95b4bdd787be63ef84fb2 Mon Sep 17 00:00:00 2001
|
||||
From: Romain Naour <romain.naour@gmail.com>
|
||||
Date: Sat, 25 Jul 2020 11:46:01 +0200
|
||||
Subject: [PATCH] mips: Do not include hi and lo in clobber list for R6
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
From [1]
|
||||
"GCC 10 (PR 91233) won't silently allow registers that are not architecturally
|
||||
available to be present in the clobber list anymore, resulting in build failure
|
||||
for mips*r6 targets in form of:
|
||||
...
|
||||
.../sysdep.h:146:2: error: the register ‘lo’ cannot be clobbered in ‘asm’ for the current target
|
||||
146 | __asm__ volatile ( \
|
||||
| ^~~~~~~
|
||||
|
||||
This is because base R6 ISA doesn't define hi and lo registers w/o DSP extension.
|
||||
This patch provides the alternative clobber list for r6 targets that won't include
|
||||
those registers."
|
||||
|
||||
Since kernel 5.4 and mips support for generic vDSO [2], the kernel fail to build
|
||||
for mips r6 cpus with gcc 10 for the same reason as glibc.
|
||||
|
||||
[1] https://sourceware.org/git/?p=glibc.git;a=commit;h=020b2a97bb15f807c0482f0faee2184ed05bcad8
|
||||
[2] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=24640f233b466051ad3a5d2786d2951e43026c9d
|
||||
|
||||
Signed-off-by: Romain Naour <romain.naour@gmail.com>
|
||||
---
|
||||
arch/mips/include/asm/vdso/gettimeofday.h | 45 +++++++++++++++++++++++
|
||||
1 file changed, 45 insertions(+)
|
||||
|
||||
diff --git a/arch/mips/include/asm/vdso/gettimeofday.h b/arch/mips/include/asm/vdso/gettimeofday.h
|
||||
index 0ae9b4cbc153..ea600e0ebfe7 100644
|
||||
--- a/arch/mips/include/asm/vdso/gettimeofday.h
|
||||
+++ b/arch/mips/include/asm/vdso/gettimeofday.h
|
||||
@@ -36,12 +36,21 @@ static __always_inline long gettimeofday_fallback(
|
||||
register long nr asm("v0") = __NR_gettimeofday;
|
||||
register long error asm("a3");
|
||||
|
||||
+#if MIPS_ISA_REV >= 6
|
||||
+ asm volatile(
|
||||
+ " syscall\n"
|
||||
+ : "=r" (ret), "=r" (error)
|
||||
+ : "r" (tv), "r" (tz), "r" (nr)
|
||||
+ : "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13",
|
||||
+ "$14", "$15", "$24", "$25", "memory");
|
||||
+#else
|
||||
asm volatile(
|
||||
" syscall\n"
|
||||
: "=r" (ret), "=r" (error)
|
||||
: "r" (tv), "r" (tz), "r" (nr)
|
||||
: "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13",
|
||||
"$14", "$15", "$24", "$25", "hi", "lo", "memory");
|
||||
+#endif
|
||||
|
||||
return error ? -ret : ret;
|
||||
}
|
||||
@@ -60,12 +69,21 @@ static __always_inline long clock_gettime_fallback(
|
||||
#endif
|
||||
register long error asm("a3");
|
||||
|
||||
+#if MIPS_ISA_REV >= 6
|
||||
+ asm volatile(
|
||||
+ " syscall\n"
|
||||
+ : "=r" (ret), "=r" (error)
|
||||
+ : "r" (clkid), "r" (ts), "r" (nr)
|
||||
+ : "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13",
|
||||
+ "$14", "$15", "$24", "$25", "memory");
|
||||
+#else
|
||||
asm volatile(
|
||||
" syscall\n"
|
||||
: "=r" (ret), "=r" (error)
|
||||
: "r" (clkid), "r" (ts), "r" (nr)
|
||||
: "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13",
|
||||
"$14", "$15", "$24", "$25", "hi", "lo", "memory");
|
||||
+#endif
|
||||
|
||||
return error ? -ret : ret;
|
||||
}
|
||||
@@ -84,12 +102,21 @@ static __always_inline int clock_getres_fallback(
|
||||
#endif
|
||||
register long error asm("a3");
|
||||
|
||||
+#if MIPS_ISA_REV >= 6
|
||||
+ asm volatile(
|
||||
+ " syscall\n"
|
||||
+ : "=r" (ret), "=r" (error)
|
||||
+ : "r" (clkid), "r" (ts), "r" (nr)
|
||||
+ : "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13",
|
||||
+ "$14", "$15", "$24", "$25", "memory");
|
||||
+#else
|
||||
asm volatile(
|
||||
" syscall\n"
|
||||
: "=r" (ret), "=r" (error)
|
||||
: "r" (clkid), "r" (ts), "r" (nr)
|
||||
: "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13",
|
||||
"$14", "$15", "$24", "$25", "hi", "lo", "memory");
|
||||
+#endif
|
||||
|
||||
return error ? -ret : ret;
|
||||
}
|
||||
@@ -108,12 +135,21 @@ static __always_inline long clock_gettime32_fallback(
|
||||
register long nr asm("v0") = __NR_clock_gettime;
|
||||
register long error asm("a3");
|
||||
|
||||
+#if MIPS_ISA_REV >= 6
|
||||
+ asm volatile(
|
||||
+ " syscall\n"
|
||||
+ : "=r" (ret), "=r" (error)
|
||||
+ : "r" (clkid), "r" (ts), "r" (nr)
|
||||
+ : "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13",
|
||||
+ "$14", "$15", "$24", "$25", "memory");
|
||||
+#else
|
||||
asm volatile(
|
||||
" syscall\n"
|
||||
: "=r" (ret), "=r" (error)
|
||||
: "r" (clkid), "r" (ts), "r" (nr)
|
||||
: "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13",
|
||||
"$14", "$15", "$24", "$25", "hi", "lo", "memory");
|
||||
+#endif
|
||||
|
||||
return error ? -ret : ret;
|
||||
}
|
||||
@@ -128,12 +164,21 @@ static __always_inline int clock_getres32_fallback(
|
||||
register long nr asm("v0") = __NR_clock_getres;
|
||||
register long error asm("a3");
|
||||
|
||||
+#if MIPS_ISA_REV >= 6
|
||||
+ asm volatile(
|
||||
+ " syscall\n"
|
||||
+ : "=r" (ret), "=r" (error)
|
||||
+ : "r" (clkid), "r" (ts), "r" (nr)
|
||||
+ : "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13",
|
||||
+ "$14", "$15", "$24", "$25", "memory");
|
||||
+#else
|
||||
asm volatile(
|
||||
" syscall\n"
|
||||
: "=r" (ret), "=r" (error)
|
||||
: "r" (clkid), "r" (ts), "r" (nr)
|
||||
: "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13",
|
||||
"$14", "$15", "$24", "$25", "hi", "lo", "memory");
|
||||
+#endif
|
||||
|
||||
return error ? -ret : ret;
|
||||
}
|
||||
--
|
||||
2.25.4
|
||||
|
||||
@@ -1,149 +0,0 @@
|
||||
From cfb381d8f4b64f3752c95b4bdd787be63ef84fb2 Mon Sep 17 00:00:00 2001
|
||||
From: Romain Naour <romain.naour@gmail.com>
|
||||
Date: Sat, 25 Jul 2020 11:46:01 +0200
|
||||
Subject: [PATCH] mips: Do not include hi and lo in clobber list for R6
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
From [1]
|
||||
"GCC 10 (PR 91233) won't silently allow registers that are not architecturally
|
||||
available to be present in the clobber list anymore, resulting in build failure
|
||||
for mips*r6 targets in form of:
|
||||
...
|
||||
.../sysdep.h:146:2: error: the register ‘lo’ cannot be clobbered in ‘asm’ for the current target
|
||||
146 | __asm__ volatile ( \
|
||||
| ^~~~~~~
|
||||
|
||||
This is because base R6 ISA doesn't define hi and lo registers w/o DSP extension.
|
||||
This patch provides the alternative clobber list for r6 targets that won't include
|
||||
those registers."
|
||||
|
||||
Since kernel 5.4 and mips support for generic vDSO [2], the kernel fail to build
|
||||
for mips r6 cpus with gcc 10 for the same reason as glibc.
|
||||
|
||||
[1] https://sourceware.org/git/?p=glibc.git;a=commit;h=020b2a97bb15f807c0482f0faee2184ed05bcad8
|
||||
[2] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=24640f233b466051ad3a5d2786d2951e43026c9d
|
||||
|
||||
Signed-off-by: Romain Naour <romain.naour@gmail.com>
|
||||
---
|
||||
arch/mips/include/asm/vdso/gettimeofday.h | 45 +++++++++++++++++++++++
|
||||
1 file changed, 45 insertions(+)
|
||||
|
||||
diff --git a/arch/mips/include/asm/vdso/gettimeofday.h b/arch/mips/include/asm/vdso/gettimeofday.h
|
||||
index 0ae9b4cbc153..ea600e0ebfe7 100644
|
||||
--- a/arch/mips/include/asm/vdso/gettimeofday.h
|
||||
+++ b/arch/mips/include/asm/vdso/gettimeofday.h
|
||||
@@ -36,12 +36,21 @@ static __always_inline long gettimeofday_fallback(
|
||||
register long nr asm("v0") = __NR_gettimeofday;
|
||||
register long error asm("a3");
|
||||
|
||||
+#if MIPS_ISA_REV >= 6
|
||||
+ asm volatile(
|
||||
+ " syscall\n"
|
||||
+ : "=r" (ret), "=r" (error)
|
||||
+ : "r" (tv), "r" (tz), "r" (nr)
|
||||
+ : "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13",
|
||||
+ "$14", "$15", "$24", "$25", "memory");
|
||||
+#else
|
||||
asm volatile(
|
||||
" syscall\n"
|
||||
: "=r" (ret), "=r" (error)
|
||||
: "r" (tv), "r" (tz), "r" (nr)
|
||||
: "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13",
|
||||
"$14", "$15", "$24", "$25", "hi", "lo", "memory");
|
||||
+#endif
|
||||
|
||||
return error ? -ret : ret;
|
||||
}
|
||||
@@ -60,12 +69,21 @@ static __always_inline long clock_gettime_fallback(
|
||||
#endif
|
||||
register long error asm("a3");
|
||||
|
||||
+#if MIPS_ISA_REV >= 6
|
||||
+ asm volatile(
|
||||
+ " syscall\n"
|
||||
+ : "=r" (ret), "=r" (error)
|
||||
+ : "r" (clkid), "r" (ts), "r" (nr)
|
||||
+ : "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13",
|
||||
+ "$14", "$15", "$24", "$25", "memory");
|
||||
+#else
|
||||
asm volatile(
|
||||
" syscall\n"
|
||||
: "=r" (ret), "=r" (error)
|
||||
: "r" (clkid), "r" (ts), "r" (nr)
|
||||
: "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13",
|
||||
"$14", "$15", "$24", "$25", "hi", "lo", "memory");
|
||||
+#endif
|
||||
|
||||
return error ? -ret : ret;
|
||||
}
|
||||
@@ -84,12 +102,21 @@ static __always_inline int clock_getres_fallback(
|
||||
#endif
|
||||
register long error asm("a3");
|
||||
|
||||
+#if MIPS_ISA_REV >= 6
|
||||
+ asm volatile(
|
||||
+ " syscall\n"
|
||||
+ : "=r" (ret), "=r" (error)
|
||||
+ : "r" (clkid), "r" (ts), "r" (nr)
|
||||
+ : "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13",
|
||||
+ "$14", "$15", "$24", "$25", "memory");
|
||||
+#else
|
||||
asm volatile(
|
||||
" syscall\n"
|
||||
: "=r" (ret), "=r" (error)
|
||||
: "r" (clkid), "r" (ts), "r" (nr)
|
||||
: "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13",
|
||||
"$14", "$15", "$24", "$25", "hi", "lo", "memory");
|
||||
+#endif
|
||||
|
||||
return error ? -ret : ret;
|
||||
}
|
||||
@@ -108,12 +135,21 @@ static __always_inline long clock_gettime32_fallback(
|
||||
register long nr asm("v0") = __NR_clock_gettime;
|
||||
register long error asm("a3");
|
||||
|
||||
+#if MIPS_ISA_REV >= 6
|
||||
+ asm volatile(
|
||||
+ " syscall\n"
|
||||
+ : "=r" (ret), "=r" (error)
|
||||
+ : "r" (clkid), "r" (ts), "r" (nr)
|
||||
+ : "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13",
|
||||
+ "$14", "$15", "$24", "$25", "memory");
|
||||
+#else
|
||||
asm volatile(
|
||||
" syscall\n"
|
||||
: "=r" (ret), "=r" (error)
|
||||
: "r" (clkid), "r" (ts), "r" (nr)
|
||||
: "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13",
|
||||
"$14", "$15", "$24", "$25", "hi", "lo", "memory");
|
||||
+#endif
|
||||
|
||||
return error ? -ret : ret;
|
||||
}
|
||||
@@ -128,12 +164,21 @@ static __always_inline int clock_getres32_fallback(
|
||||
register long nr asm("v0") = __NR_clock_getres;
|
||||
register long error asm("a3");
|
||||
|
||||
+#if MIPS_ISA_REV >= 6
|
||||
+ asm volatile(
|
||||
+ " syscall\n"
|
||||
+ : "=r" (ret), "=r" (error)
|
||||
+ : "r" (clkid), "r" (ts), "r" (nr)
|
||||
+ : "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13",
|
||||
+ "$14", "$15", "$24", "$25", "memory");
|
||||
+#else
|
||||
asm volatile(
|
||||
" syscall\n"
|
||||
: "=r" (ret), "=r" (error)
|
||||
: "r" (clkid), "r" (ts), "r" (nr)
|
||||
: "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13",
|
||||
"$14", "$15", "$24", "$25", "hi", "lo", "memory");
|
||||
+#endif
|
||||
|
||||
return error ? -ret : ret;
|
||||
}
|
||||
--
|
||||
2.25.4
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
From fe657afd48fc67841d32207ef9eeeb5f099764cd Mon Sep 17 00:00:00 2001
|
||||
From: Romain Naour <romain.naour@gmail.com>
|
||||
Date: Sat, 21 Dec 2019 11:52:04 +0100
|
||||
Subject: [PATCH] arch/sh: vmlinux.scr
|
||||
|
||||
Building the kernel using a toolchain built with Binutils 2.33.1 prevent
|
||||
booting a sh4 system under Qemu.
|
||||
Apply the patch provided by Alan Modra [2] that fix alignment of rodata.
|
||||
|
||||
[1] https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=ebd2263ba9a9124d93bbc0ece63d7e0fae89b40e
|
||||
[2] https://www.sourceware.org/ml/binutils/2019-12/msg00112.html
|
||||
|
||||
Signed-off-by: Romain Naour <romain.naour@gmail.com>
|
||||
---
|
||||
arch/sh/boot/compressed/vmlinux.scr | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/arch/sh/boot/compressed/vmlinux.scr b/arch/sh/boot/compressed/vmlinux.scr
|
||||
index 862d74808236..dd292b4b9082 100644
|
||||
--- a/arch/sh/boot/compressed/vmlinux.scr
|
||||
+++ b/arch/sh/boot/compressed/vmlinux.scr
|
||||
@@ -1,6 +1,6 @@
|
||||
SECTIONS
|
||||
{
|
||||
- .rodata..compressed : {
|
||||
+ .rodata..compressed : ALIGN(8) {
|
||||
input_len = .;
|
||||
LONG(input_data_end - input_data) input_data = .;
|
||||
*(.data)
|
||||
--
|
||||
2.24.1
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
From 7f92adbba385a4e512abfd6633ac0f9f0cdf91f8 Mon Sep 17 00:00:00 2001
|
||||
From: Romain Naour <romain.naour@gmail.com>
|
||||
Date: Sat, 21 Dec 2019 11:54:07 +0100
|
||||
Subject: [PATCH] include/asm-generic: vmlinux.lds.h
|
||||
|
||||
Building the kernel using a toolchain built with Binutils 2.33.1 prevent
|
||||
booting a sh4 system under Qemu.
|
||||
Apply the patch provided by Alan Modra [2] that fix alignment of rodata.
|
||||
|
||||
[1] https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=ebd2263ba9a9124d93bbc0ece63d7e0fae89b40e
|
||||
[2] https://www.sourceware.org/ml/binutils/2019-12/msg00112.html
|
||||
|
||||
Signed-off-by: Romain Naour <romain.naour@gmail.com>
|
||||
---
|
||||
include/asm-generic/vmlinux.lds.h | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
|
||||
index d7701d466b60..1aa33597e91e 100644
|
||||
--- a/include/asm-generic/vmlinux.lds.h
|
||||
+++ b/include/asm-generic/vmlinux.lds.h
|
||||
@@ -306,6 +306,7 @@
|
||||
*/
|
||||
#ifndef RO_AFTER_INIT_DATA
|
||||
#define RO_AFTER_INIT_DATA \
|
||||
+ . = ALIGN(8); \
|
||||
__start_ro_after_init = .; \
|
||||
*(.data..ro_after_init) \
|
||||
__end_ro_after_init = .;
|
||||
--
|
||||
2.24.1
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
From fe657afd48fc67841d32207ef9eeeb5f099764cd Mon Sep 17 00:00:00 2001
|
||||
From: Romain Naour <romain.naour@gmail.com>
|
||||
Date: Sat, 21 Dec 2019 11:52:04 +0100
|
||||
Subject: [PATCH] arch/sh: vmlinux.scr
|
||||
|
||||
Building the kernel using a toolchain built with Binutils 2.33.1 prevent
|
||||
booting a sh4 system under Qemu.
|
||||
Apply the patch provided by Alan Modra [2] that fix alignment of rodata.
|
||||
|
||||
[1] https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=ebd2263ba9a9124d93bbc0ece63d7e0fae89b40e
|
||||
[2] https://www.sourceware.org/ml/binutils/2019-12/msg00112.html
|
||||
|
||||
Signed-off-by: Romain Naour <romain.naour@gmail.com>
|
||||
---
|
||||
arch/sh/boot/compressed/vmlinux.scr | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/arch/sh/boot/compressed/vmlinux.scr b/arch/sh/boot/compressed/vmlinux.scr
|
||||
index 862d74808236..dd292b4b9082 100644
|
||||
--- a/arch/sh/boot/compressed/vmlinux.scr
|
||||
+++ b/arch/sh/boot/compressed/vmlinux.scr
|
||||
@@ -1,6 +1,6 @@
|
||||
SECTIONS
|
||||
{
|
||||
- .rodata..compressed : {
|
||||
+ .rodata..compressed : ALIGN(8) {
|
||||
input_len = .;
|
||||
LONG(input_data_end - input_data) input_data = .;
|
||||
*(.data)
|
||||
--
|
||||
2.24.1
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
From 7f92adbba385a4e512abfd6633ac0f9f0cdf91f8 Mon Sep 17 00:00:00 2001
|
||||
From: Romain Naour <romain.naour@gmail.com>
|
||||
Date: Sat, 21 Dec 2019 11:54:07 +0100
|
||||
Subject: [PATCH] include/asm-generic: vmlinux.lds.h
|
||||
|
||||
https://www.sourceware.org/ml/binutils/2019-12/msg00112.html
|
||||
|
||||
Signed-off-by: Romain Naour <romain.naour@gmail.com>
|
||||
---
|
||||
include/asm-generic/vmlinux.lds.h | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
|
||||
index d7701d466b60..1aa33597e91e 100644
|
||||
--- a/include/asm-generic/vmlinux.lds.h
|
||||
+++ b/include/asm-generic/vmlinux.lds.h
|
||||
@@ -306,6 +306,7 @@
|
||||
*/
|
||||
#ifndef RO_AFTER_INIT_DATA
|
||||
#define RO_AFTER_INIT_DATA \
|
||||
+ . = ALIGN(8); \
|
||||
__start_ro_after_init = .; \
|
||||
*(.data..ro_after_init) \
|
||||
__end_ro_after_init = .;
|
||||
--
|
||||
2.24.1
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
label RK3399_ROCK_PI_4 linux
|
||||
kernel /Image
|
||||
devicetree /rk3399-rock-pi-4.dtb
|
||||
append earlycon=uart8250,mmio32,0xff1a0000 root=/dev/mmcblk1p4 rw rootwait
|
||||
@@ -1,39 +0,0 @@
|
||||
image boot.vfat {
|
||||
vfat {
|
||||
files = {
|
||||
"Image",
|
||||
"rk3399-rock-pi-4.dtb",
|
||||
"extlinux"
|
||||
}
|
||||
}
|
||||
size = 112M
|
||||
}
|
||||
|
||||
image sdcard.img {
|
||||
|
||||
hdimage {
|
||||
gpt = true
|
||||
}
|
||||
|
||||
partition loader1 {
|
||||
image = "idbloader.img"
|
||||
offset = 32K
|
||||
}
|
||||
|
||||
partition loader2 {
|
||||
image = "u-boot.itb"
|
||||
offset = 8M
|
||||
}
|
||||
|
||||
partition boot {
|
||||
partition-type = 0xC
|
||||
bootable = "true"
|
||||
image = "boot.vfat"
|
||||
offset = 16M
|
||||
}
|
||||
|
||||
partition rootfs {
|
||||
partition-type = 0x83
|
||||
image = "rootfs.ext4"
|
||||
}
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
BOARD_DIR="$(dirname $0)"
|
||||
|
||||
install -m 0644 -D $BOARD_DIR/extlinux.conf $BINARIES_DIR/extlinux/extlinux.conf
|
||||
@@ -1,61 +0,0 @@
|
||||
RADXA ROCK_PI_4
|
||||
================
|
||||
https://rockpi.org/rockpi4
|
||||
|
||||
ROCK Pi 4 is a Single Board Computer (SBC) from radxa. This guide is valid
|
||||
for the below models:
|
||||
- ROCK PI 4 Model A
|
||||
- ROCK PI 4 Model B
|
||||
- ROCK PI 4 Model C
|
||||
|
||||
Build:
|
||||
======
|
||||
$ make rock_pi_4_defconfig
|
||||
$ make
|
||||
|
||||
Files created in output directory
|
||||
=================================
|
||||
|
||||
output/images
|
||||
|
||||
├── bl31.elf
|
||||
├── boot.vfat
|
||||
├── extlinux
|
||||
├── idbloader.img
|
||||
├── Image
|
||||
├── rk3399-rock-pi-4.dtb
|
||||
├── rootfs.ext2
|
||||
├── rootfs.ext4 -> rootfs.ext2
|
||||
├── rootfs.tar
|
||||
├── sdcard.img
|
||||
├── u-boot.bin
|
||||
└── u-boot.itb
|
||||
|
||||
Creating bootable SD card:
|
||||
==========================
|
||||
|
||||
Simply invoke (as root)
|
||||
|
||||
sudo dd if=output/images/sdcard.img of=/dev/sdX && sync
|
||||
|
||||
Where X is your SD card device.
|
||||
|
||||
Booting:
|
||||
========
|
||||
|
||||
Serial console:
|
||||
---------------
|
||||
RockPi4 has a 40-pin GPIO header. The pin layout is as follows:
|
||||
|
||||
pin 6: gnd
|
||||
pin 8: tx
|
||||
pin 10: rx
|
||||
|
||||
Baudrate for this board is 1500000.
|
||||
|
||||
Login:
|
||||
------
|
||||
Enter 'root' as login user, and the prompt is ready.
|
||||
|
||||
Wiki link:
|
||||
https://wiki.amarulasolutions.com/bsp/rockchip/rk3399/rock-pi-4.html
|
||||
@@ -1,4 +0,0 @@
|
||||
label RK3399_ROCK_PI_N10 linux
|
||||
kernel /Image
|
||||
devicetree /rk3399pro-rock-pi-n10.dtb
|
||||
append earlycon=uart8250,mmio32,0xff1a0000 root=/dev/mmcblk0p4 rw rootwait
|
||||
@@ -1,39 +0,0 @@
|
||||
image boot.vfat {
|
||||
vfat {
|
||||
files = {
|
||||
"Image",
|
||||
"rk3399pro-rock-pi-n10.dtb",
|
||||
"extlinux"
|
||||
}
|
||||
}
|
||||
size = 112M
|
||||
}
|
||||
|
||||
image sdcard.img {
|
||||
|
||||
hdimage {
|
||||
gpt = true
|
||||
}
|
||||
|
||||
partition loader1 {
|
||||
image = "idbloader.img"
|
||||
offset = 32K
|
||||
}
|
||||
|
||||
partition loader2 {
|
||||
image = "u-boot.itb"
|
||||
offset = 8M
|
||||
}
|
||||
|
||||
partition boot {
|
||||
partition-type = 0xC
|
||||
bootable = "true"
|
||||
image = "boot.vfat"
|
||||
offset = 16M
|
||||
}
|
||||
|
||||
partition rootfs {
|
||||
partition-type = 0x83
|
||||
image = "rootfs.ext4"
|
||||
}
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
BOARD_DIR="$(dirname $0)"
|
||||
|
||||
install -m 0644 -D $BOARD_DIR/extlinux.conf $BINARIES_DIR/extlinux/extlinux.conf
|
||||
@@ -1,61 +0,0 @@
|
||||
RADXA ROCKPI-N10
|
||||
================
|
||||
https://wiki.radxa.com/RockpiN10
|
||||
|
||||
Build:
|
||||
======
|
||||
$ make rock_pi_n10_defconfig
|
||||
$ make
|
||||
|
||||
Files created in output directory
|
||||
=================================
|
||||
|
||||
output/images
|
||||
.
|
||||
├── bl31.elf
|
||||
├── boot.vfat
|
||||
├── extlinux
|
||||
├── idbloader.img
|
||||
├── Image
|
||||
├── rk3399pro-rock-pi-n10.dtb
|
||||
├── rootfs.ext2
|
||||
├── rootfs.ext4 -> rootfs.ext2
|
||||
├── rootfs.tar
|
||||
├── sdcard.img
|
||||
├── u-boot.bin
|
||||
└── u-boot.itb
|
||||
|
||||
Creating bootable SD card:
|
||||
==========================
|
||||
|
||||
Simply invoke (as root)
|
||||
|
||||
sudo dd if=output/images/sdcard.img of=/dev/sdX && sync
|
||||
|
||||
Where X is your SD card device.
|
||||
|
||||
Booting:
|
||||
========
|
||||
|
||||
Serial console:
|
||||
---------------
|
||||
RockPi-N10 has a 40-pin GPIO header. The pin layout is as follows:
|
||||
|
||||
pin 6: gnd
|
||||
pin 8: tx
|
||||
pin 10: rx
|
||||
|
||||
Baudrate for this board is 1500000.
|
||||
|
||||
The boot order on rockpi-n10 is emmc, sd. If emmc contains a valid Image, the board
|
||||
always boots from emmc. To boot from SD, erase emmc as per the guide:
|
||||
|
||||
https://wiki.amarulasolutions.com/bsp/setup/rockchip/rk3399_emmc.html
|
||||
|
||||
Login:
|
||||
------
|
||||
Enter 'root' as login user, and the prompt is ready.
|
||||
|
||||
wiki link:
|
||||
----------
|
||||
https://wiki.amarulasolutions.com/bsp/rockchip/rk3399pro/rock-pi-n10.html
|
||||
@@ -4,8 +4,8 @@ image boot.vfat {
|
||||
"bcm2711-rpi-4-b.dtb",
|
||||
"rpi-firmware/cmdline.txt",
|
||||
"rpi-firmware/config.txt",
|
||||
"rpi-firmware/fixup.dat",
|
||||
"rpi-firmware/start.elf",
|
||||
"rpi-firmware/fixup4.dat",
|
||||
"rpi-firmware/start4.elf",
|
||||
"rpi-firmware/overlays",
|
||||
"Image"
|
||||
}
|
||||
|
||||
@@ -4,8 +4,8 @@ image boot.vfat {
|
||||
"bcm2711-rpi-4-b.dtb",
|
||||
"rpi-firmware/cmdline.txt",
|
||||
"rpi-firmware/config.txt",
|
||||
"rpi-firmware/fixup.dat",
|
||||
"rpi-firmware/start.elf",
|
||||
"rpi-firmware/fixup4.dat",
|
||||
"rpi-firmware/start4.elf",
|
||||
"rpi-firmware/overlays",
|
||||
"zImage"
|
||||
}
|
||||
|
||||
@@ -1,3 +1,2 @@
|
||||
CONFIG_INITRAMFS_SOURCE=""
|
||||
CONFIG_ARC_UBOOT_SUPPORT=y
|
||||
CONFIG_USB=y
|
||||
|
||||
@@ -15,7 +15,7 @@ choice
|
||||
Select the specific ATF version you want to use
|
||||
|
||||
config BR2_TARGET_ARM_TRUSTED_FIRMWARE_LATEST_VERSION
|
||||
bool "v2.2"
|
||||
bool "v1.4"
|
||||
|
||||
config BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION
|
||||
bool "Custom version"
|
||||
@@ -43,7 +43,7 @@ config BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION_VALUE
|
||||
|
||||
config BR2_TARGET_ARM_TRUSTED_FIRMWARE_VERSION
|
||||
string
|
||||
default "v2.2" if BR2_TARGET_ARM_TRUSTED_FIRMWARE_LATEST_VERSION
|
||||
default "v1.4" if BR2_TARGET_ARM_TRUSTED_FIRMWARE_LATEST_VERSION
|
||||
default "custom" if BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_TARBALL
|
||||
default BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_VERSION \
|
||||
if BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_GIT
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
# Locally calculated
|
||||
sha256 07e3c058ae2d95c7d516a46fc93565b797e912c3271ddbf29df523b1ab1ee911 arm-trusted-firmware-v2.2.tar.gz
|
||||
sha256 487795b8023df866259fa159bab94706b747fb0d623b7913f1c4955c0ab5f164 license.rst
|
||||
sha256 6dae02acd85278394bfad6e2683e186e5332a711e4491ac4632ad6480f6e5494 arm-trusted-firmware-v1.4.tar.gz
|
||||
sha256 487795b8023df866259fa159bab94706b747fb0d623b7913f1c4955c0ab5f164 license.rst
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
config BR2_TARGET_AT91BOOTSTRAP3
|
||||
bool "AT91 Bootstrap 3"
|
||||
depends on BR2_arm926t || BR2_cortex_a5 || BR2_cortex_a7
|
||||
depends on BR2_arm926t || BR2_cortex_a5
|
||||
help
|
||||
AT91Bootstrap is a first level bootloader for the Atmel AT91
|
||||
devices. It integrates algorithms for:
|
||||
|
||||
@@ -12,7 +12,7 @@ choice
|
||||
Select the specific Barebox version you want to use
|
||||
|
||||
config BR2_TARGET_BAREBOX_LATEST_VERSION
|
||||
bool "2020.07.0"
|
||||
bool "2020.05.0"
|
||||
|
||||
config BR2_TARGET_BAREBOX_CUSTOM_VERSION
|
||||
bool "Custom version"
|
||||
@@ -40,7 +40,7 @@ endif
|
||||
|
||||
config BR2_TARGET_BAREBOX_VERSION
|
||||
string
|
||||
default "2020.07.0" if BR2_TARGET_BAREBOX_LATEST_VERSION
|
||||
default "2020.05.0" if BR2_TARGET_BAREBOX_LATEST_VERSION
|
||||
default BR2_TARGET_BAREBOX_CUSTOM_VERSION_VALUE if BR2_TARGET_BAREBOX_CUSTOM_VERSION
|
||||
default "custom" if BR2_TARGET_BAREBOX_CUSTOM_TARBALL
|
||||
default BR2_TARGET_BAREBOX_CUSTOM_GIT_VERSION if BR2_TARGET_BAREBOX_CUSTOM_GIT
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
# From https://www.barebox.org/download/barebox-2020.07.0.tar.bz2.md5
|
||||
md5 49f3fba08743d44e84e8d68ed776f05d barebox-2020.07.0.tar.bz2
|
||||
# From https://www.barebox.org/download/barebox-2020.05.0.tar.bz2.md5
|
||||
md5 31dee7b5715967fab882cabe4e406896 barebox-2020.05.0.tar.bz2
|
||||
|
||||
# Locally calculated
|
||||
sha256 1956620acc39b5c9b035635ff0b1da2c1b72b791612ef55a72e6272a903fbc4c barebox-2020.07.0.tar.bz2
|
||||
sha256 03e29c2864c3220c676a0cf768ffe2b8f1064eddb60463281c9944625e649b65 barebox-2020.05.0.tar.bz2
|
||||
|
||||
# License files, locally computed
|
||||
sha256 ab1122aa9f9073ad1ec824edcd970b16a6a7881a34a18fd56c080debb2dca5d4 COPYING
|
||||
|
||||
@@ -1,73 +0,0 @@
|
||||
From a7ab0cc98fa89a3d5098c29cbe44bcd24b0a6454 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Jones <pjones@redhat.com>
|
||||
Date: Wed, 15 Apr 2020 15:45:02 -0400
|
||||
Subject: [PATCH] yylex: Make lexer fatal errors actually be fatal
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
When presented with a command that can't be tokenized to anything
|
||||
smaller than YYLMAX characters, the parser calls YY_FATAL_ERROR(errmsg),
|
||||
expecting that will stop further processing, as such:
|
||||
|
||||
#define YY_DO_BEFORE_ACTION \
|
||||
yyg->yytext_ptr = yy_bp; \
|
||||
yyleng = (int) (yy_cp - yy_bp); \
|
||||
yyg->yy_hold_char = *yy_cp; \
|
||||
*yy_cp = '\0'; \
|
||||
if ( yyleng >= YYLMAX ) \
|
||||
YY_FATAL_ERROR( "token too large, exceeds YYLMAX" ); \
|
||||
yy_flex_strncpy( yytext, yyg->yytext_ptr, yyleng + 1 , yyscanner); \
|
||||
yyg->yy_c_buf_p = yy_cp;
|
||||
|
||||
The code flex generates expects that YY_FATAL_ERROR() will either return
|
||||
for it or do some form of longjmp(), or handle the error in some way at
|
||||
least, and so the strncpy() call isn't in an "else" clause, and thus if
|
||||
YY_FATAL_ERROR() is *not* actually fatal, it does the call with the
|
||||
questionable limit, and predictable results ensue.
|
||||
|
||||
Unfortunately, our implementation of YY_FATAL_ERROR() is:
|
||||
|
||||
#define YY_FATAL_ERROR(msg) \
|
||||
do { \
|
||||
grub_printf (_("fatal error: %s\n"), _(msg)); \
|
||||
} while (0)
|
||||
|
||||
The same pattern exists in yyless(), and similar problems exist in users
|
||||
of YY_INPUT(), several places in the main parsing loop,
|
||||
yy_get_next_buffer(), yy_load_buffer_state(), yyensure_buffer_stack,
|
||||
yy_scan_buffer(), etc.
|
||||
|
||||
All of these callers expect YY_FATAL_ERROR() to actually be fatal, and
|
||||
the things they do if it returns after calling it are wildly unsafe.
|
||||
|
||||
Fixes: CVE-2020-10713
|
||||
|
||||
Signed-off-by: Peter Jones <pjones@redhat.com>
|
||||
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
|
||||
Signed-off-by: Stefan Sørensen <stefan.sorensen@spectralink.com>
|
||||
---
|
||||
grub-core/script/yylex.l | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/grub-core/script/yylex.l b/grub-core/script/yylex.l
|
||||
index 7b44c37b7..b7203c823 100644
|
||||
--- a/grub-core/script/yylex.l
|
||||
+++ b/grub-core/script/yylex.l
|
||||
@@ -37,11 +37,11 @@
|
||||
|
||||
/*
|
||||
* As we don't have access to yyscanner, we cannot do much except to
|
||||
- * print the fatal error.
|
||||
+ * print the fatal error and exit.
|
||||
*/
|
||||
#define YY_FATAL_ERROR(msg) \
|
||||
do { \
|
||||
- grub_printf (_("fatal error: %s\n"), _(msg)); \
|
||||
+ grub_fatal (_("fatal error: %s\n"), _(msg));\
|
||||
} while (0)
|
||||
|
||||
#define COPY(str, hint) \
|
||||
--
|
||||
2.26.2
|
||||
|
||||
@@ -1,128 +0,0 @@
|
||||
From 782a4580a5e347793443aa8e9152db1bf4a0fff8 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Jones <pjones@redhat.com>
|
||||
Date: Mon, 15 Jun 2020 10:58:42 -0400
|
||||
Subject: [PATCH] safemath: Add some arithmetic primitives that check for
|
||||
overflow
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
This adds a new header, include/grub/safemath.h, that includes easy to
|
||||
use wrappers for __builtin_{add,sub,mul}_overflow() declared like:
|
||||
|
||||
bool OP(a, b, res)
|
||||
|
||||
where OP is grub_add, grub_sub or grub_mul. OP() returns true in the
|
||||
case where the operation would overflow and res is not modified.
|
||||
Otherwise, false is returned and the operation is executed.
|
||||
|
||||
These arithmetic primitives require newer compiler versions. So, bump
|
||||
these requirements in the INSTALL file too.
|
||||
|
||||
Signed-off-by: Peter Jones <pjones@redhat.com>
|
||||
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
|
||||
Signed-off-by: Stefan Sørensen <stefan.sorensen@spectralink.com>
|
||||
---
|
||||
INSTALL | 22 ++--------------------
|
||||
include/grub/compiler.h | 8 ++++++++
|
||||
include/grub/safemath.h | 37 +++++++++++++++++++++++++++++++++++++
|
||||
3 files changed, 47 insertions(+), 20 deletions(-)
|
||||
create mode 100644 include/grub/safemath.h
|
||||
|
||||
diff --git a/INSTALL b/INSTALL
|
||||
index 8acb40902..dcb9b7d7b 100644
|
||||
--- a/INSTALL
|
||||
+++ b/INSTALL
|
||||
@@ -11,27 +11,9 @@ GRUB depends on some software packages installed into your system. If
|
||||
you don't have any of them, please obtain and install them before
|
||||
configuring the GRUB.
|
||||
|
||||
-* GCC 4.1.3 or later
|
||||
- Note: older versions may work but support is limited
|
||||
-
|
||||
- Experimental support for clang 3.3 or later (results in much bigger binaries)
|
||||
+* GCC 5.1.0 or later
|
||||
+ Experimental support for clang 3.8.0 or later (results in much bigger binaries)
|
||||
for i386, x86_64, arm (including thumb), arm64, mips(el), powerpc, sparc64
|
||||
- Note: clang 3.2 or later works for i386 and x86_64 targets but results in
|
||||
- much bigger binaries.
|
||||
- earlier versions not tested
|
||||
- Note: clang 3.2 or later works for arm
|
||||
- earlier versions not tested
|
||||
- Note: clang on arm64 is not supported due to
|
||||
- https://llvm.org/bugs/show_bug.cgi?id=26030
|
||||
- Note: clang 3.3 or later works for mips(el)
|
||||
- earlier versions fail to generate .reginfo and hence gprel relocations
|
||||
- fail.
|
||||
- Note: clang 3.2 or later works for powerpc
|
||||
- earlier versions not tested
|
||||
- Note: clang 3.5 or later works for sparc64
|
||||
- earlier versions return "error: unable to interface with target machine"
|
||||
- Note: clang has no support for ia64 and hence you can't compile GRUB
|
||||
- for ia64 with clang
|
||||
* GNU Make
|
||||
* GNU Bison 2.3 or later
|
||||
* GNU gettext 0.17 or later
|
||||
diff --git a/include/grub/compiler.h b/include/grub/compiler.h
|
||||
index c9e1d7a73..8f3be3ae7 100644
|
||||
--- a/include/grub/compiler.h
|
||||
+++ b/include/grub/compiler.h
|
||||
@@ -48,4 +48,12 @@
|
||||
# define WARN_UNUSED_RESULT
|
||||
#endif
|
||||
|
||||
+#if defined(__clang__) && defined(__clang_major__) && defined(__clang_minor__)
|
||||
+# define CLANG_PREREQ(maj,min) \
|
||||
+ ((__clang_major__ > (maj)) || \
|
||||
+ (__clang_major__ == (maj) && __clang_minor__ >= (min)))
|
||||
+#else
|
||||
+# define CLANG_PREREQ(maj,min) 0
|
||||
+#endif
|
||||
+
|
||||
#endif /* ! GRUB_COMPILER_HEADER */
|
||||
diff --git a/include/grub/safemath.h b/include/grub/safemath.h
|
||||
new file mode 100644
|
||||
index 000000000..c17b89bba
|
||||
--- /dev/null
|
||||
+++ b/include/grub/safemath.h
|
||||
@@ -0,0 +1,37 @@
|
||||
+/*
|
||||
+ * GRUB -- GRand Unified Bootloader
|
||||
+ * Copyright (C) 2020 Free Software Foundation, Inc.
|
||||
+ *
|
||||
+ * GRUB is free software: you can redistribute it and/or modify
|
||||
+ * it under the terms of the GNU General Public License as published by
|
||||
+ * the Free Software Foundation, either version 3 of the License, or
|
||||
+ * (at your option) any later version.
|
||||
+ *
|
||||
+ * GRUB is distributed in the hope that it will be useful,
|
||||
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ * GNU General Public License for more details.
|
||||
+ *
|
||||
+ * You should have received a copy of the GNU General Public License
|
||||
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
|
||||
+ *
|
||||
+ * Arithmetic operations that protect against overflow.
|
||||
+ */
|
||||
+
|
||||
+#ifndef GRUB_SAFEMATH_H
|
||||
+#define GRUB_SAFEMATH_H 1
|
||||
+
|
||||
+#include <grub/compiler.h>
|
||||
+
|
||||
+/* These appear in gcc 5.1 and clang 3.8. */
|
||||
+#if GNUC_PREREQ(5, 1) || CLANG_PREREQ(3, 8)
|
||||
+
|
||||
+#define grub_add(a, b, res) __builtin_add_overflow(a, b, res)
|
||||
+#define grub_sub(a, b, res) __builtin_sub_overflow(a, b, res)
|
||||
+#define grub_mul(a, b, res) __builtin_mul_overflow(a, b, res)
|
||||
+
|
||||
+#else
|
||||
+#error gcc 5.1 or newer or clang 3.8 or newer is required
|
||||
+#endif
|
||||
+
|
||||
+#endif /* GRUB_SAFEMATH_H */
|
||||
--
|
||||
2.26.2
|
||||
|
||||
@@ -1,246 +0,0 @@
|
||||
From 5775eb40862b67468ced816e6d7560dbe22a3670 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Jones <pjones@redhat.com>
|
||||
Date: Mon, 15 Jun 2020 12:15:29 -0400
|
||||
Subject: [PATCH] calloc: Make sure we always have an overflow-checking
|
||||
calloc() available
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
This tries to make sure that everywhere in this source tree, we always have
|
||||
an appropriate version of calloc() (i.e. grub_calloc(), xcalloc(), etc.)
|
||||
available, and that they all safely check for overflow and return NULL when
|
||||
it would occur.
|
||||
|
||||
Signed-off-by: Peter Jones <pjones@redhat.com>
|
||||
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
|
||||
Signed-off-by: Stefan Sørensen <stefan.sorensen@spectralink.com>
|
||||
---
|
||||
grub-core/kern/emu/misc.c | 12 +++++++++
|
||||
grub-core/kern/emu/mm.c | 10 ++++++++
|
||||
grub-core/kern/mm.c | 40 ++++++++++++++++++++++++++++++
|
||||
grub-core/lib/libgcrypt_wrap/mem.c | 11 ++++++--
|
||||
grub-core/lib/posix_wrap/stdlib.h | 8 +++++-
|
||||
include/grub/emu/misc.h | 1 +
|
||||
include/grub/mm.h | 6 +++++
|
||||
7 files changed, 85 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/grub-core/kern/emu/misc.c b/grub-core/kern/emu/misc.c
|
||||
index 65db79baa..dfd8a8ec4 100644
|
||||
--- a/grub-core/kern/emu/misc.c
|
||||
+++ b/grub-core/kern/emu/misc.c
|
||||
@@ -85,6 +85,18 @@ grub_util_error (const char *fmt, ...)
|
||||
exit (1);
|
||||
}
|
||||
|
||||
+void *
|
||||
+xcalloc (grub_size_t nmemb, grub_size_t size)
|
||||
+{
|
||||
+ void *p;
|
||||
+
|
||||
+ p = calloc (nmemb, size);
|
||||
+ if (!p)
|
||||
+ grub_util_error ("%s", _("out of memory"));
|
||||
+
|
||||
+ return p;
|
||||
+}
|
||||
+
|
||||
void *
|
||||
xmalloc (grub_size_t size)
|
||||
{
|
||||
diff --git a/grub-core/kern/emu/mm.c b/grub-core/kern/emu/mm.c
|
||||
index f262e95e3..145b01d37 100644
|
||||
--- a/grub-core/kern/emu/mm.c
|
||||
+++ b/grub-core/kern/emu/mm.c
|
||||
@@ -25,6 +25,16 @@
|
||||
#include <string.h>
|
||||
#include <grub/i18n.h>
|
||||
|
||||
+void *
|
||||
+grub_calloc (grub_size_t nmemb, grub_size_t size)
|
||||
+{
|
||||
+ void *ret;
|
||||
+ ret = calloc (nmemb, size);
|
||||
+ if (!ret)
|
||||
+ grub_error (GRUB_ERR_OUT_OF_MEMORY, N_("out of memory"));
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
void *
|
||||
grub_malloc (grub_size_t size)
|
||||
{
|
||||
diff --git a/grub-core/kern/mm.c b/grub-core/kern/mm.c
|
||||
index ee88ff611..f2822a836 100644
|
||||
--- a/grub-core/kern/mm.c
|
||||
+++ b/grub-core/kern/mm.c
|
||||
@@ -67,8 +67,10 @@
|
||||
#include <grub/dl.h>
|
||||
#include <grub/i18n.h>
|
||||
#include <grub/mm_private.h>
|
||||
+#include <grub/safemath.h>
|
||||
|
||||
#ifdef MM_DEBUG
|
||||
+# undef grub_calloc
|
||||
# undef grub_malloc
|
||||
# undef grub_zalloc
|
||||
# undef grub_realloc
|
||||
@@ -375,6 +377,30 @@ grub_memalign (grub_size_t align, grub_size_t size)
|
||||
return 0;
|
||||
}
|
||||
|
||||
+/*
|
||||
+ * Allocate NMEMB instances of SIZE bytes and return the pointer, or error on
|
||||
+ * integer overflow.
|
||||
+ */
|
||||
+void *
|
||||
+grub_calloc (grub_size_t nmemb, grub_size_t size)
|
||||
+{
|
||||
+ void *ret;
|
||||
+ grub_size_t sz = 0;
|
||||
+
|
||||
+ if (grub_mul (nmemb, size, &sz))
|
||||
+ {
|
||||
+ grub_error (GRUB_ERR_OUT_OF_RANGE, N_("overflow is detected"));
|
||||
+ return NULL;
|
||||
+ }
|
||||
+
|
||||
+ ret = grub_memalign (0, sz);
|
||||
+ if (!ret)
|
||||
+ return NULL;
|
||||
+
|
||||
+ grub_memset (ret, 0, sz);
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
/* Allocate SIZE bytes and return the pointer. */
|
||||
void *
|
||||
grub_malloc (grub_size_t size)
|
||||
@@ -561,6 +587,20 @@ grub_mm_dump (unsigned lineno)
|
||||
grub_printf ("\n");
|
||||
}
|
||||
|
||||
+void *
|
||||
+grub_debug_calloc (const char *file, int line, grub_size_t nmemb, grub_size_t size)
|
||||
+{
|
||||
+ void *ptr;
|
||||
+
|
||||
+ if (grub_mm_debug)
|
||||
+ grub_printf ("%s:%d: calloc (0x%" PRIxGRUB_SIZE ", 0x%" PRIxGRUB_SIZE ") = ",
|
||||
+ file, line, size);
|
||||
+ ptr = grub_calloc (nmemb, size);
|
||||
+ if (grub_mm_debug)
|
||||
+ grub_printf ("%p\n", ptr);
|
||||
+ return ptr;
|
||||
+}
|
||||
+
|
||||
void *
|
||||
grub_debug_malloc (const char *file, int line, grub_size_t size)
|
||||
{
|
||||
diff --git a/grub-core/lib/libgcrypt_wrap/mem.c b/grub-core/lib/libgcrypt_wrap/mem.c
|
||||
index beeb661a3..74c6eafe5 100644
|
||||
--- a/grub-core/lib/libgcrypt_wrap/mem.c
|
||||
+++ b/grub-core/lib/libgcrypt_wrap/mem.c
|
||||
@@ -4,6 +4,7 @@
|
||||
#include <grub/crypto.h>
|
||||
#include <grub/dl.h>
|
||||
#include <grub/env.h>
|
||||
+#include <grub/safemath.h>
|
||||
|
||||
GRUB_MOD_LICENSE ("GPLv3+");
|
||||
|
||||
@@ -36,7 +37,10 @@ void *
|
||||
gcry_xcalloc (size_t n, size_t m)
|
||||
{
|
||||
void *ret;
|
||||
- ret = grub_zalloc (n * m);
|
||||
+ size_t sz;
|
||||
+ if (grub_mul (n, m, &sz))
|
||||
+ grub_fatal ("gcry_xcalloc would overflow");
|
||||
+ ret = grub_zalloc (sz);
|
||||
if (!ret)
|
||||
grub_fatal ("gcry_xcalloc failed");
|
||||
return ret;
|
||||
@@ -56,7 +60,10 @@ void *
|
||||
gcry_xcalloc_secure (size_t n, size_t m)
|
||||
{
|
||||
void *ret;
|
||||
- ret = grub_zalloc (n * m);
|
||||
+ size_t sz;
|
||||
+ if (grub_mul (n, m, &sz))
|
||||
+ grub_fatal ("gcry_xcalloc would overflow");
|
||||
+ ret = grub_zalloc (sz);
|
||||
if (!ret)
|
||||
grub_fatal ("gcry_xcalloc failed");
|
||||
return ret;
|
||||
diff --git a/grub-core/lib/posix_wrap/stdlib.h b/grub-core/lib/posix_wrap/stdlib.h
|
||||
index 3b46f47ff..7a8d385e9 100644
|
||||
--- a/grub-core/lib/posix_wrap/stdlib.h
|
||||
+++ b/grub-core/lib/posix_wrap/stdlib.h
|
||||
@@ -21,6 +21,7 @@
|
||||
|
||||
#include <grub/mm.h>
|
||||
#include <grub/misc.h>
|
||||
+#include <grub/safemath.h>
|
||||
|
||||
static inline void
|
||||
free (void *ptr)
|
||||
@@ -37,7 +38,12 @@ malloc (grub_size_t size)
|
||||
static inline void *
|
||||
calloc (grub_size_t size, grub_size_t nelem)
|
||||
{
|
||||
- return grub_zalloc (size * nelem);
|
||||
+ grub_size_t sz;
|
||||
+
|
||||
+ if (grub_mul (size, nelem, &sz))
|
||||
+ return NULL;
|
||||
+
|
||||
+ return grub_zalloc (sz);
|
||||
}
|
||||
|
||||
static inline void *
|
||||
diff --git a/include/grub/emu/misc.h b/include/grub/emu/misc.h
|
||||
index ce464cfd0..ff9c48a64 100644
|
||||
--- a/include/grub/emu/misc.h
|
||||
+++ b/include/grub/emu/misc.h
|
||||
@@ -47,6 +47,7 @@ grub_util_device_is_mapped (const char *dev);
|
||||
#define GRUB_HOST_PRIuLONG_LONG "llu"
|
||||
#define GRUB_HOST_PRIxLONG_LONG "llx"
|
||||
|
||||
+void * EXPORT_FUNC(xcalloc) (grub_size_t nmemb, grub_size_t size) WARN_UNUSED_RESULT;
|
||||
void * EXPORT_FUNC(xmalloc) (grub_size_t size) WARN_UNUSED_RESULT;
|
||||
void * EXPORT_FUNC(xrealloc) (void *ptr, grub_size_t size) WARN_UNUSED_RESULT;
|
||||
char * EXPORT_FUNC(xstrdup) (const char *str) WARN_UNUSED_RESULT;
|
||||
diff --git a/include/grub/mm.h b/include/grub/mm.h
|
||||
index 28e2e53eb..9c38dd3ca 100644
|
||||
--- a/include/grub/mm.h
|
||||
+++ b/include/grub/mm.h
|
||||
@@ -29,6 +29,7 @@
|
||||
#endif
|
||||
|
||||
void grub_mm_init_region (void *addr, grub_size_t size);
|
||||
+void *EXPORT_FUNC(grub_calloc) (grub_size_t nmemb, grub_size_t size);
|
||||
void *EXPORT_FUNC(grub_malloc) (grub_size_t size);
|
||||
void *EXPORT_FUNC(grub_zalloc) (grub_size_t size);
|
||||
void EXPORT_FUNC(grub_free) (void *ptr);
|
||||
@@ -48,6 +49,9 @@ extern int EXPORT_VAR(grub_mm_debug);
|
||||
void grub_mm_dump_free (void);
|
||||
void grub_mm_dump (unsigned lineno);
|
||||
|
||||
+#define grub_calloc(nmemb, size) \
|
||||
+ grub_debug_calloc (GRUB_FILE, __LINE__, nmemb, size)
|
||||
+
|
||||
#define grub_malloc(size) \
|
||||
grub_debug_malloc (GRUB_FILE, __LINE__, size)
|
||||
|
||||
@@ -63,6 +67,8 @@ void grub_mm_dump (unsigned lineno);
|
||||
#define grub_free(ptr) \
|
||||
grub_debug_free (GRUB_FILE, __LINE__, ptr)
|
||||
|
||||
+void *EXPORT_FUNC(grub_debug_calloc) (const char *file, int line,
|
||||
+ grub_size_t nmemb, grub_size_t size);
|
||||
void *EXPORT_FUNC(grub_debug_malloc) (const char *file, int line,
|
||||
grub_size_t size);
|
||||
void *EXPORT_FUNC(grub_debug_zalloc) (const char *file, int line,
|
||||
--
|
||||
2.26.2
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,72 +0,0 @@
|
||||
From e0dd17a3ce79c6622dc78c96e1f2ef1b20e2bf7b Mon Sep 17 00:00:00 2001
|
||||
From: Peter Jones <pjones@redhat.com>
|
||||
Date: Sat, 4 Jul 2020 12:25:09 -0400
|
||||
Subject: [PATCH] iso9660: Don't leak memory on realloc() failures
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Signed-off-by: Peter Jones <pjones@redhat.com>
|
||||
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
|
||||
Signed-off-by: Stefan Sørensen <stefan.sorensen@spectralink.com>
|
||||
---
|
||||
grub-core/fs/iso9660.c | 24 ++++++++++++++++++++----
|
||||
1 file changed, 20 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/grub-core/fs/iso9660.c b/grub-core/fs/iso9660.c
|
||||
index 7ba5b300b..5ec4433b8 100644
|
||||
--- a/grub-core/fs/iso9660.c
|
||||
+++ b/grub-core/fs/iso9660.c
|
||||
@@ -533,14 +533,20 @@ add_part (struct iterate_dir_ctx *ctx,
|
||||
{
|
||||
int size = ctx->symlink ? grub_strlen (ctx->symlink) : 0;
|
||||
grub_size_t sz;
|
||||
+ char *new;
|
||||
|
||||
if (grub_add (size, len2, &sz) ||
|
||||
grub_add (sz, 1, &sz))
|
||||
return;
|
||||
|
||||
- ctx->symlink = grub_realloc (ctx->symlink, sz);
|
||||
- if (! ctx->symlink)
|
||||
- return;
|
||||
+ new = grub_realloc (ctx->symlink, sz);
|
||||
+ if (!new)
|
||||
+ {
|
||||
+ grub_free (ctx->symlink);
|
||||
+ ctx->symlink = NULL;
|
||||
+ return;
|
||||
+ }
|
||||
+ ctx->symlink = new;
|
||||
|
||||
grub_memcpy (ctx->symlink + size, part, len2);
|
||||
ctx->symlink[size + len2] = 0;
|
||||
@@ -634,7 +640,12 @@ susp_iterate_dir (struct grub_iso9660_susp_entry *entry,
|
||||
is the length. Both are part of the `Component
|
||||
Record'. */
|
||||
if (ctx->symlink && !ctx->was_continue)
|
||||
- add_part (ctx, "/", 1);
|
||||
+ {
|
||||
+ add_part (ctx, "/", 1);
|
||||
+ if (grub_errno)
|
||||
+ return grub_errno;
|
||||
+ }
|
||||
+
|
||||
add_part (ctx, (char *) &entry->data[pos + 2],
|
||||
entry->data[pos + 1]);
|
||||
ctx->was_continue = (entry->data[pos] & 1);
|
||||
@@ -653,6 +664,11 @@ susp_iterate_dir (struct grub_iso9660_susp_entry *entry,
|
||||
add_part (ctx, "/", 1);
|
||||
break;
|
||||
}
|
||||
+
|
||||
+ /* Check if grub_realloc() failed in add_part(). */
|
||||
+ if (grub_errno)
|
||||
+ return grub_errno;
|
||||
+
|
||||
/* In pos + 1 the length of the `Component Record' is
|
||||
stored. */
|
||||
pos += entry->data[pos + 1] + 2;
|
||||
--
|
||||
2.26.2
|
||||
|
||||
@@ -1,41 +0,0 @@
|
||||
From 73bc7a964c9496d5b0f00dbd69959dacf5adcebe Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Kiper <daniel.kiper@oracle.com>
|
||||
Date: Tue, 7 Jul 2020 15:36:26 +0200
|
||||
Subject: [PATCH] font: Do not load more than one NAME section
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
The GRUB font file can have one NAME section only. Though if somebody
|
||||
crafts a broken font file with many NAME sections and loads it then the
|
||||
GRUB leaks memory. So, prevent against that by loading first NAME
|
||||
section and failing in controlled way on following one.
|
||||
|
||||
Reported-by: Chris Coulson <chris.coulson@canonical.com>
|
||||
Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
|
||||
Reviewed-by: Jan Setje-Eilers <jan.setjeeilers@oracle.com>
|
||||
Signed-off-by: Stefan Sørensen <stefan.sorensen@spectralink.com>
|
||||
---
|
||||
grub-core/font/font.c | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
diff --git a/grub-core/font/font.c b/grub-core/font/font.c
|
||||
index 5edb477ac..d09bb38d8 100644
|
||||
--- a/grub-core/font/font.c
|
||||
+++ b/grub-core/font/font.c
|
||||
@@ -532,6 +532,12 @@ grub_font_load (const char *filename)
|
||||
if (grub_memcmp (section.name, FONT_FORMAT_SECTION_NAMES_FONT_NAME,
|
||||
sizeof (FONT_FORMAT_SECTION_NAMES_FONT_NAME) - 1) == 0)
|
||||
{
|
||||
+ if (font->name != NULL)
|
||||
+ {
|
||||
+ grub_error (GRUB_ERR_BAD_FONT, "invalid font file: too many NAME sections");
|
||||
+ goto fail;
|
||||
+ }
|
||||
+
|
||||
font->name = read_section_as_string (§ion);
|
||||
if (!font->name)
|
||||
goto fail;
|
||||
--
|
||||
2.26.2
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
From 9ff609f0e7798bc5fb04f791131c98e7693bdd9b Mon Sep 17 00:00:00 2001
|
||||
From: Alexey Makhalov <amakhalov@vmware.com>
|
||||
Date: Wed, 8 Jul 2020 20:41:56 +0000
|
||||
Subject: [PATCH] gfxmenu: Fix double free in load_image()
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
self->bitmap should be zeroed after free. Otherwise, there is a chance
|
||||
to double free (USE_AFTER_FREE) it later in rescale_image().
|
||||
|
||||
Fixes: CID 292472
|
||||
|
||||
Signed-off-by: Alexey Makhalov <amakhalov@vmware.com>
|
||||
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
|
||||
Signed-off-by: Stefan Sørensen <stefan.sorensen@spectralink.com>
|
||||
---
|
||||
grub-core/gfxmenu/gui_image.c | 5 ++++-
|
||||
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/grub-core/gfxmenu/gui_image.c b/grub-core/gfxmenu/gui_image.c
|
||||
index 29784ed2d..6b2e976f1 100644
|
||||
--- a/grub-core/gfxmenu/gui_image.c
|
||||
+++ b/grub-core/gfxmenu/gui_image.c
|
||||
@@ -195,7 +195,10 @@ load_image (grub_gui_image_t self, const char *path)
|
||||
return grub_errno;
|
||||
|
||||
if (self->bitmap && (self->bitmap != self->raw_bitmap))
|
||||
- grub_video_bitmap_destroy (self->bitmap);
|
||||
+ {
|
||||
+ grub_video_bitmap_destroy (self->bitmap);
|
||||
+ self->bitmap = 0;
|
||||
+ }
|
||||
if (self->raw_bitmap)
|
||||
grub_video_bitmap_destroy (self->raw_bitmap);
|
||||
|
||||
--
|
||||
2.26.2
|
||||
|
||||
@@ -1,58 +0,0 @@
|
||||
From dc9777dc17697b196c415c53187a55861d41fd2a Mon Sep 17 00:00:00 2001
|
||||
From: Alexey Makhalov <amakhalov@vmware.com>
|
||||
Date: Wed, 8 Jul 2020 21:30:43 +0000
|
||||
Subject: [PATCH] xnu: Fix double free in grub_xnu_devprop_add_property()
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
grub_xnu_devprop_add_property() should not free utf8 and utf16 as it get
|
||||
allocated and freed in the caller.
|
||||
|
||||
Minor improvement: do prop fields initialization after memory allocations.
|
||||
|
||||
Fixes: CID 292442, CID 292457, CID 292460, CID 292466
|
||||
|
||||
Signed-off-by: Alexey Makhalov <amakhalov@vmware.com>
|
||||
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
|
||||
Signed-off-by: Stefan Sørensen <stefan.sorensen@spectralink.com>
|
||||
---
|
||||
grub-core/loader/i386/xnu.c | 17 ++++++++---------
|
||||
1 file changed, 8 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/grub-core/loader/i386/xnu.c b/grub-core/loader/i386/xnu.c
|
||||
index b7d176b5d..e9e119259 100644
|
||||
--- a/grub-core/loader/i386/xnu.c
|
||||
+++ b/grub-core/loader/i386/xnu.c
|
||||
@@ -262,20 +262,19 @@ grub_xnu_devprop_add_property (struct grub_xnu_devprop_device_descriptor *dev,
|
||||
if (!prop)
|
||||
return grub_errno;
|
||||
|
||||
- prop->name = utf8;
|
||||
- prop->name16 = utf16;
|
||||
- prop->name16len = utf16len;
|
||||
-
|
||||
- prop->length = datalen;
|
||||
- prop->data = grub_malloc (prop->length);
|
||||
+ prop->data = grub_malloc (datalen);
|
||||
if (!prop->data)
|
||||
{
|
||||
- grub_free (prop->name);
|
||||
- grub_free (prop->name16);
|
||||
grub_free (prop);
|
||||
return grub_errno;
|
||||
}
|
||||
- grub_memcpy (prop->data, data, prop->length);
|
||||
+ grub_memcpy (prop->data, data, datalen);
|
||||
+
|
||||
+ prop->name = utf8;
|
||||
+ prop->name16 = utf16;
|
||||
+ prop->name16len = utf16len;
|
||||
+ prop->length = datalen;
|
||||
+
|
||||
grub_list_push (GRUB_AS_LIST_P (&dev->properties),
|
||||
GRUB_AS_LIST (prop));
|
||||
return GRUB_ERR_NONE;
|
||||
--
|
||||
2.26.2
|
||||
|
||||
@@ -1,55 +0,0 @@
|
||||
From 78829f0c230680e386fff9f420bb1631bc20f761 Mon Sep 17 00:00:00 2001
|
||||
From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
|
||||
Date: Thu, 9 Jul 2020 03:05:23 +0000
|
||||
Subject: [PATCH] lzma: Make sure we don't dereference past array
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
The two dimensional array p->posSlotEncoder[4][64] is being dereferenced
|
||||
using the GetLenToPosState() macro which checks if len is less than 5,
|
||||
and if so subtracts 2 from it. If len = 0, that is 0 - 2 = 4294967294.
|
||||
Obviously we don't want to dereference that far out so we check if the
|
||||
position found is greater or equal kNumLenToPosStates (4) and bail out.
|
||||
|
||||
N.B.: Upstream LZMA 18.05 and later has this function completely rewritten
|
||||
without any history.
|
||||
|
||||
Fixes: CID 51526
|
||||
|
||||
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
|
||||
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
|
||||
Signed-off-by: Stefan Sørensen <stefan.sorensen@spectralink.com>
|
||||
---
|
||||
grub-core/lib/LzmaEnc.c | 10 ++++++++--
|
||||
1 file changed, 8 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/grub-core/lib/LzmaEnc.c b/grub-core/lib/LzmaEnc.c
|
||||
index f2ec04a8c..753e56a95 100644
|
||||
--- a/grub-core/lib/LzmaEnc.c
|
||||
+++ b/grub-core/lib/LzmaEnc.c
|
||||
@@ -1877,13 +1877,19 @@ static SRes LzmaEnc_CodeOneBlock(CLzmaEnc *p, Bool useLimits, UInt32 maxPackSize
|
||||
}
|
||||
else
|
||||
{
|
||||
- UInt32 posSlot;
|
||||
+ UInt32 posSlot, lenToPosState;
|
||||
RangeEnc_EncodeBit(&p->rc, &p->isRep[p->state], 0);
|
||||
p->state = kMatchNextStates[p->state];
|
||||
LenEnc_Encode2(&p->lenEnc, &p->rc, len - LZMA_MATCH_LEN_MIN, posState, !p->fastMode, p->ProbPrices);
|
||||
pos -= LZMA_NUM_REPS;
|
||||
GetPosSlot(pos, posSlot);
|
||||
- RcTree_Encode(&p->rc, p->posSlotEncoder[GetLenToPosState(len)], kNumPosSlotBits, posSlot);
|
||||
+ lenToPosState = GetLenToPosState(len);
|
||||
+ if (lenToPosState >= kNumLenToPosStates)
|
||||
+ {
|
||||
+ p->result = SZ_ERROR_DATA;
|
||||
+ return CheckErrors(p);
|
||||
+ }
|
||||
+ RcTree_Encode(&p->rc, p->posSlotEncoder[lenToPosState], kNumPosSlotBits, posSlot);
|
||||
|
||||
if (posSlot >= kStartPosModelIndex)
|
||||
{
|
||||
--
|
||||
2.26.2
|
||||
|
||||
@@ -1,69 +0,0 @@
|
||||
From 8d3b6f9da468f666e3a7976657f2ab5c52762a21 Mon Sep 17 00:00:00 2001
|
||||
From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
|
||||
Date: Tue, 7 Jul 2020 15:12:25 -0400
|
||||
Subject: [PATCH] term: Fix overflow on user inputs
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
This requires a very weird input from the serial interface but can cause
|
||||
an overflow in input_buf (keys) overwriting the next variable (npending)
|
||||
with the user choice:
|
||||
|
||||
(pahole output)
|
||||
|
||||
struct grub_terminfo_input_state {
|
||||
int input_buf[6]; /* 0 24 */
|
||||
int npending; /* 24 4 */ <- CORRUPT
|
||||
...snip...
|
||||
|
||||
The magic string requires causing this is "ESC,O,],0,1,2,q" and we overflow
|
||||
npending with "q" (aka increase npending to 161). The simplest fix is to
|
||||
just to disallow overwrites input_buf, which exactly what this patch does.
|
||||
|
||||
Fixes: CID 292449
|
||||
|
||||
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
|
||||
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
|
||||
Signed-off-by: Stefan Sørensen <stefan.sorensen@spectralink.com>
|
||||
---
|
||||
grub-core/term/terminfo.c | 9 ++++++---
|
||||
1 file changed, 6 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/grub-core/term/terminfo.c b/grub-core/term/terminfo.c
|
||||
index d317efa36..5fa94c0c3 100644
|
||||
--- a/grub-core/term/terminfo.c
|
||||
+++ b/grub-core/term/terminfo.c
|
||||
@@ -398,7 +398,7 @@ grub_terminfo_getwh (struct grub_term_output *term)
|
||||
}
|
||||
|
||||
static void
|
||||
-grub_terminfo_readkey (struct grub_term_input *term, int *keys, int *len,
|
||||
+grub_terminfo_readkey (struct grub_term_input *term, int *keys, int *len, int max_len,
|
||||
int (*readkey) (struct grub_term_input *term))
|
||||
{
|
||||
int c;
|
||||
@@ -414,6 +414,9 @@ grub_terminfo_readkey (struct grub_term_input *term, int *keys, int *len,
|
||||
if (c == -1) \
|
||||
return; \
|
||||
\
|
||||
+ if (*len >= max_len) \
|
||||
+ return; \
|
||||
+ \
|
||||
keys[*len] = c; \
|
||||
(*len)++; \
|
||||
}
|
||||
@@ -602,8 +605,8 @@ grub_terminfo_getkey (struct grub_term_input *termi)
|
||||
return ret;
|
||||
}
|
||||
|
||||
- grub_terminfo_readkey (termi, data->input_buf,
|
||||
- &data->npending, data->readkey);
|
||||
+ grub_terminfo_readkey (termi, data->input_buf, &data->npending,
|
||||
+ GRUB_TERMINFO_READKEY_MAX_LEN, data->readkey);
|
||||
|
||||
#if defined(__powerpc__) && defined(GRUB_MACHINE_IEEE1275)
|
||||
if (data->npending == 1 && data->input_buf[0] == GRUB_TERM_ESC
|
||||
--
|
||||
2.26.2
|
||||
|
||||
@@ -1,59 +0,0 @@
|
||||
From 748b691761d31bfff7e9d0d210caa606294c2b52 Mon Sep 17 00:00:00 2001
|
||||
From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
|
||||
Date: Tue, 7 Jul 2020 22:02:31 -0400
|
||||
Subject: [PATCH] udf: Fix memory leak
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Fixes: CID 73796
|
||||
|
||||
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
|
||||
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
|
||||
Reviewed-by: Jan Setje-Eilers <jan.setjeeilers@oracle.com>
|
||||
Signed-off-by: Stefan Sørensen <stefan.sorensen@spectralink.com>
|
||||
---
|
||||
grub-core/fs/udf.c | 17 +++++++++++++----
|
||||
1 file changed, 13 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/grub-core/fs/udf.c b/grub-core/fs/udf.c
|
||||
index 21ac7f446..2ac5c1d00 100644
|
||||
--- a/grub-core/fs/udf.c
|
||||
+++ b/grub-core/fs/udf.c
|
||||
@@ -965,8 +965,10 @@ grub_udf_iterate_dir (grub_fshelp_node_t dir,
|
||||
return 0;
|
||||
|
||||
if (grub_udf_read_icb (dir->data, &dirent.icb, child))
|
||||
- return 0;
|
||||
-
|
||||
+ {
|
||||
+ grub_free (child);
|
||||
+ return 0;
|
||||
+ }
|
||||
if (dirent.characteristics & GRUB_UDF_FID_CHAR_PARENT)
|
||||
{
|
||||
/* This is the parent directory. */
|
||||
@@ -988,11 +990,18 @@ grub_udf_iterate_dir (grub_fshelp_node_t dir,
|
||||
dirent.file_ident_length,
|
||||
(char *) raw))
|
||||
!= dirent.file_ident_length)
|
||||
- return 0;
|
||||
+ {
|
||||
+ grub_free (child);
|
||||
+ return 0;
|
||||
+ }
|
||||
|
||||
filename = read_string (raw, dirent.file_ident_length, 0);
|
||||
if (!filename)
|
||||
- grub_print_error ();
|
||||
+ {
|
||||
+ /* As the hook won't get called. */
|
||||
+ grub_free (child);
|
||||
+ grub_print_error ();
|
||||
+ }
|
||||
|
||||
if (filename && hook (filename, type, child, hook_data))
|
||||
{
|
||||
--
|
||||
2.26.2
|
||||
|
||||
@@ -1,38 +0,0 @@
|
||||
From 49bf3faa106498e151306fc780c63194a14751e3 Mon Sep 17 00:00:00 2001
|
||||
From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
|
||||
Date: Fri, 26 Jun 2020 10:51:43 -0400
|
||||
Subject: [PATCH] multiboot2: Fix memory leak if
|
||||
grub_create_loader_cmdline() fails
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Fixes: CID 292468
|
||||
|
||||
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
|
||||
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
|
||||
Signed-off-by: Stefan Sørensen <stefan.sorensen@spectralink.com>
|
||||
---
|
||||
grub-core/loader/multiboot_mbi2.c | 6 +++++-
|
||||
1 file changed, 5 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/grub-core/loader/multiboot_mbi2.c b/grub-core/loader/multiboot_mbi2.c
|
||||
index 53da78615..0efc66062 100644
|
||||
--- a/grub-core/loader/multiboot_mbi2.c
|
||||
+++ b/grub-core/loader/multiboot_mbi2.c
|
||||
@@ -1070,7 +1070,11 @@ grub_multiboot2_add_module (grub_addr_t start, grub_size_t size,
|
||||
err = grub_create_loader_cmdline (argc, argv, newmod->cmdline,
|
||||
newmod->cmdline_size, GRUB_VERIFY_MODULE_CMDLINE);
|
||||
if (err)
|
||||
- return err;
|
||||
+ {
|
||||
+ grub_free (newmod->cmdline);
|
||||
+ grub_free (newmod);
|
||||
+ return err;
|
||||
+ }
|
||||
|
||||
if (modules_last)
|
||||
modules_last->next = newmod;
|
||||
--
|
||||
2.26.2
|
||||
|
||||
@@ -1,283 +0,0 @@
|
||||
From b6c4a1b204740fe52b32e7f530831a59f4038e20 Mon Sep 17 00:00:00 2001
|
||||
From: Alexey Makhalov <amakhalov@vmware.com>
|
||||
Date: Thu, 9 Jul 2020 08:10:40 +0000
|
||||
Subject: [PATCH] tftp: Do not use priority queue
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
There is not need to reassemble the order of blocks. Per RFC 1350,
|
||||
server must wait for the ACK, before sending next block. Data packets
|
||||
can be served immediately without putting them to priority queue.
|
||||
|
||||
Logic to handle incoming packet is this:
|
||||
- if packet block id equal to expected block id, then
|
||||
process the packet,
|
||||
- if packet block id is less than expected - this is retransmit
|
||||
of old packet, then ACK it and drop the packet,
|
||||
- if packet block id is more than expected - that shouldn't
|
||||
happen, just drop the packet.
|
||||
|
||||
It makes the tftp receive path code simpler, smaller and faster.
|
||||
As a benefit, this change fixes CID# 73624 and CID# 96690, caused
|
||||
by following while loop:
|
||||
|
||||
while (cmp_block (grub_be_to_cpu16 (tftph->u.data.block), data->block + 1) == 0)
|
||||
|
||||
where tftph pointer is not moving from one iteration to another, causing
|
||||
to serve same packet again. Luckily, double serving didn't happen due to
|
||||
data->block++ during the first iteration.
|
||||
|
||||
Fixes: CID 73624, CID 96690
|
||||
|
||||
Signed-off-by: Alexey Makhalov <amakhalov@vmware.com>
|
||||
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
|
||||
Signed-off-by: Stefan Sørensen <stefan.sorensen@spectralink.com>
|
||||
---
|
||||
grub-core/net/tftp.c | 168 ++++++++++++++-----------------------------
|
||||
1 file changed, 53 insertions(+), 115 deletions(-)
|
||||
|
||||
diff --git a/grub-core/net/tftp.c b/grub-core/net/tftp.c
|
||||
index 7d90bf66e..b4297bc8d 100644
|
||||
--- a/grub-core/net/tftp.c
|
||||
+++ b/grub-core/net/tftp.c
|
||||
@@ -25,7 +25,6 @@
|
||||
#include <grub/mm.h>
|
||||
#include <grub/dl.h>
|
||||
#include <grub/file.h>
|
||||
-#include <grub/priority_queue.h>
|
||||
#include <grub/i18n.h>
|
||||
|
||||
GRUB_MOD_LICENSE ("GPLv3+");
|
||||
@@ -106,31 +105,8 @@ typedef struct tftp_data
|
||||
int have_oack;
|
||||
struct grub_error_saved save_err;
|
||||
grub_net_udp_socket_t sock;
|
||||
- grub_priority_queue_t pq;
|
||||
} *tftp_data_t;
|
||||
|
||||
-static int
|
||||
-cmp_block (grub_uint16_t a, grub_uint16_t b)
|
||||
-{
|
||||
- grub_int16_t i = (grub_int16_t) (a - b);
|
||||
- if (i > 0)
|
||||
- return +1;
|
||||
- if (i < 0)
|
||||
- return -1;
|
||||
- return 0;
|
||||
-}
|
||||
-
|
||||
-static int
|
||||
-cmp (const void *a__, const void *b__)
|
||||
-{
|
||||
- struct grub_net_buff *a_ = *(struct grub_net_buff **) a__;
|
||||
- struct grub_net_buff *b_ = *(struct grub_net_buff **) b__;
|
||||
- struct tftphdr *a = (struct tftphdr *) a_->data;
|
||||
- struct tftphdr *b = (struct tftphdr *) b_->data;
|
||||
- /* We want the first elements to be on top. */
|
||||
- return -cmp_block (grub_be_to_cpu16 (a->u.data.block), grub_be_to_cpu16 (b->u.data.block));
|
||||
-}
|
||||
-
|
||||
static grub_err_t
|
||||
ack (tftp_data_t data, grub_uint64_t block)
|
||||
{
|
||||
@@ -207,73 +183,60 @@ tftp_receive (grub_net_udp_socket_t sock __attribute__ ((unused)),
|
||||
return GRUB_ERR_NONE;
|
||||
}
|
||||
|
||||
- err = grub_priority_queue_push (data->pq, &nb);
|
||||
- if (err)
|
||||
- return err;
|
||||
-
|
||||
- {
|
||||
- struct grub_net_buff **nb_top_p, *nb_top;
|
||||
- while (1)
|
||||
- {
|
||||
- nb_top_p = grub_priority_queue_top (data->pq);
|
||||
- if (!nb_top_p)
|
||||
- return GRUB_ERR_NONE;
|
||||
- nb_top = *nb_top_p;
|
||||
- tftph = (struct tftphdr *) nb_top->data;
|
||||
- if (cmp_block (grub_be_to_cpu16 (tftph->u.data.block), data->block + 1) >= 0)
|
||||
- break;
|
||||
- ack (data, grub_be_to_cpu16 (tftph->u.data.block));
|
||||
- grub_netbuff_free (nb_top);
|
||||
- grub_priority_queue_pop (data->pq);
|
||||
- }
|
||||
- while (cmp_block (grub_be_to_cpu16 (tftph->u.data.block), data->block + 1) == 0)
|
||||
- {
|
||||
- unsigned size;
|
||||
-
|
||||
- grub_priority_queue_pop (data->pq);
|
||||
-
|
||||
- if (file->device->net->packs.count < 50)
|
||||
+ /* Ack old/retransmitted block. */
|
||||
+ if (grub_be_to_cpu16 (tftph->u.data.block) < data->block + 1)
|
||||
+ ack (data, grub_be_to_cpu16 (tftph->u.data.block));
|
||||
+ /* Ignore unexpected block. */
|
||||
+ else if (grub_be_to_cpu16 (tftph->u.data.block) > data->block + 1)
|
||||
+ grub_dprintf ("tftp", "TFTP unexpected block # %d\n", tftph->u.data.block);
|
||||
+ else
|
||||
+ {
|
||||
+ unsigned size;
|
||||
+
|
||||
+ if (file->device->net->packs.count < 50)
|
||||
+ {
|
||||
err = ack (data, data->block + 1);
|
||||
- else
|
||||
- {
|
||||
- file->device->net->stall = 1;
|
||||
- err = 0;
|
||||
- }
|
||||
- if (err)
|
||||
- return err;
|
||||
-
|
||||
- err = grub_netbuff_pull (nb_top, sizeof (tftph->opcode) +
|
||||
- sizeof (tftph->u.data.block));
|
||||
- if (err)
|
||||
- return err;
|
||||
- size = nb_top->tail - nb_top->data;
|
||||
-
|
||||
- data->block++;
|
||||
- if (size < data->block_size)
|
||||
- {
|
||||
- if (data->ack_sent < data->block)
|
||||
- ack (data, data->block);
|
||||
- file->device->net->eof = 1;
|
||||
- file->device->net->stall = 1;
|
||||
- grub_net_udp_close (data->sock);
|
||||
- data->sock = NULL;
|
||||
- }
|
||||
- /* Prevent garbage in broken cards. Is it still necessary
|
||||
- given that IP implementation has been fixed?
|
||||
- */
|
||||
- if (size > data->block_size)
|
||||
- {
|
||||
- err = grub_netbuff_unput (nb_top, size - data->block_size);
|
||||
- if (err)
|
||||
- return err;
|
||||
- }
|
||||
- /* If there is data, puts packet in socket list. */
|
||||
- if ((nb_top->tail - nb_top->data) > 0)
|
||||
- grub_net_put_packet (&file->device->net->packs, nb_top);
|
||||
- else
|
||||
- grub_netbuff_free (nb_top);
|
||||
- }
|
||||
- }
|
||||
+ if (err)
|
||||
+ return err;
|
||||
+ }
|
||||
+ else
|
||||
+ file->device->net->stall = 1;
|
||||
+
|
||||
+ err = grub_netbuff_pull (nb, sizeof (tftph->opcode) +
|
||||
+ sizeof (tftph->u.data.block));
|
||||
+ if (err)
|
||||
+ return err;
|
||||
+ size = nb->tail - nb->data;
|
||||
+
|
||||
+ data->block++;
|
||||
+ if (size < data->block_size)
|
||||
+ {
|
||||
+ if (data->ack_sent < data->block)
|
||||
+ ack (data, data->block);
|
||||
+ file->device->net->eof = 1;
|
||||
+ file->device->net->stall = 1;
|
||||
+ grub_net_udp_close (data->sock);
|
||||
+ data->sock = NULL;
|
||||
+ }
|
||||
+ /*
|
||||
+ * Prevent garbage in broken cards. Is it still necessary
|
||||
+ * given that IP implementation has been fixed?
|
||||
+ */
|
||||
+ if (size > data->block_size)
|
||||
+ {
|
||||
+ err = grub_netbuff_unput (nb, size - data->block_size);
|
||||
+ if (err)
|
||||
+ return err;
|
||||
+ }
|
||||
+ /* If there is data, puts packet in socket list. */
|
||||
+ if ((nb->tail - nb->data) > 0)
|
||||
+ {
|
||||
+ grub_net_put_packet (&file->device->net->packs, nb);
|
||||
+ /* Do not free nb. */
|
||||
+ return GRUB_ERR_NONE;
|
||||
+ }
|
||||
+ }
|
||||
+ grub_netbuff_free (nb);
|
||||
return GRUB_ERR_NONE;
|
||||
case TFTP_ERROR:
|
||||
data->have_oack = 1;
|
||||
@@ -287,19 +250,6 @@ tftp_receive (grub_net_udp_socket_t sock __attribute__ ((unused)),
|
||||
}
|
||||
}
|
||||
|
||||
-static void
|
||||
-destroy_pq (tftp_data_t data)
|
||||
-{
|
||||
- struct grub_net_buff **nb_p;
|
||||
- while ((nb_p = grub_priority_queue_top (data->pq)))
|
||||
- {
|
||||
- grub_netbuff_free (*nb_p);
|
||||
- grub_priority_queue_pop (data->pq);
|
||||
- }
|
||||
-
|
||||
- grub_priority_queue_destroy (data->pq);
|
||||
-}
|
||||
-
|
||||
static grub_err_t
|
||||
tftp_open (struct grub_file *file, const char *filename)
|
||||
{
|
||||
@@ -372,17 +322,9 @@ tftp_open (struct grub_file *file, const char *filename)
|
||||
file->not_easily_seekable = 1;
|
||||
file->data = data;
|
||||
|
||||
- data->pq = grub_priority_queue_new (sizeof (struct grub_net_buff *), cmp);
|
||||
- if (!data->pq)
|
||||
- {
|
||||
- grub_free (data);
|
||||
- return grub_errno;
|
||||
- }
|
||||
-
|
||||
err = grub_net_resolve_address (file->device->net->server, &addr);
|
||||
if (err)
|
||||
{
|
||||
- destroy_pq (data);
|
||||
grub_free (data);
|
||||
return err;
|
||||
}
|
||||
@@ -392,7 +334,6 @@ tftp_open (struct grub_file *file, const char *filename)
|
||||
file);
|
||||
if (!data->sock)
|
||||
{
|
||||
- destroy_pq (data);
|
||||
grub_free (data);
|
||||
return grub_errno;
|
||||
}
|
||||
@@ -406,7 +347,6 @@ tftp_open (struct grub_file *file, const char *filename)
|
||||
if (err)
|
||||
{
|
||||
grub_net_udp_close (data->sock);
|
||||
- destroy_pq (data);
|
||||
grub_free (data);
|
||||
return err;
|
||||
}
|
||||
@@ -423,7 +363,6 @@ tftp_open (struct grub_file *file, const char *filename)
|
||||
if (grub_errno)
|
||||
{
|
||||
grub_net_udp_close (data->sock);
|
||||
- destroy_pq (data);
|
||||
grub_free (data);
|
||||
return grub_errno;
|
||||
}
|
||||
@@ -466,7 +405,6 @@ tftp_close (struct grub_file *file)
|
||||
grub_print_error ();
|
||||
grub_net_udp_close (data->sock);
|
||||
}
|
||||
- destroy_pq (data);
|
||||
grub_free (data);
|
||||
return GRUB_ERR_NONE;
|
||||
}
|
||||
--
|
||||
2.26.2
|
||||
|
||||
@@ -1,153 +0,0 @@
|
||||
From 1c7b619c84f229c1602c1958bcd054b6d9937562 Mon Sep 17 00:00:00 2001
|
||||
From: Alexey Makhalov <amakhalov@vmware.com>
|
||||
Date: Wed, 15 Jul 2020 06:42:37 +0000
|
||||
Subject: [PATCH] relocator: Protect grub_relocator_alloc_chunk_addr()
|
||||
input args against integer underflow/overflow
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Use arithmetic macros from safemath.h to accomplish it. In this commit,
|
||||
I didn't want to be too paranoid to check every possible math equation
|
||||
for overflow/underflow. Only obvious places (with non zero chance of
|
||||
overflow/underflow) were refactored.
|
||||
|
||||
Signed-off-by: Alexey Makhalov <amakhalov@vmware.com>
|
||||
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
|
||||
Signed-off-by: Stefan Sørensen <stefan.sorensen@spectralink.com>
|
||||
---
|
||||
grub-core/loader/i386/linux.c | 9 +++++++--
|
||||
grub-core/loader/i386/pc/linux.c | 9 +++++++--
|
||||
grub-core/loader/i386/xen.c | 12 ++++++++++--
|
||||
grub-core/loader/xnu.c | 11 +++++++----
|
||||
4 files changed, 31 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/grub-core/loader/i386/linux.c b/grub-core/loader/i386/linux.c
|
||||
index d0501e229..02a73463a 100644
|
||||
--- a/grub-core/loader/i386/linux.c
|
||||
+++ b/grub-core/loader/i386/linux.c
|
||||
@@ -36,6 +36,7 @@
|
||||
#include <grub/lib/cmdline.h>
|
||||
#include <grub/linux.h>
|
||||
#include <grub/machine/kernel.h>
|
||||
+#include <grub/safemath.h>
|
||||
|
||||
GRUB_MOD_LICENSE ("GPLv3+");
|
||||
|
||||
@@ -547,9 +548,13 @@ grub_linux_boot (void)
|
||||
|
||||
{
|
||||
grub_relocator_chunk_t ch;
|
||||
+ grub_size_t sz;
|
||||
+
|
||||
+ if (grub_add (ctx.real_size, efi_mmap_size, &sz))
|
||||
+ return GRUB_ERR_OUT_OF_RANGE;
|
||||
+
|
||||
err = grub_relocator_alloc_chunk_addr (relocator, &ch,
|
||||
- ctx.real_mode_target,
|
||||
- (ctx.real_size + efi_mmap_size));
|
||||
+ ctx.real_mode_target, sz);
|
||||
if (err)
|
||||
return err;
|
||||
real_mode_mem = get_virtual_current_address (ch);
|
||||
diff --git a/grub-core/loader/i386/pc/linux.c b/grub-core/loader/i386/pc/linux.c
|
||||
index 47ea2945e..31f09922b 100644
|
||||
--- a/grub-core/loader/i386/pc/linux.c
|
||||
+++ b/grub-core/loader/i386/pc/linux.c
|
||||
@@ -35,6 +35,7 @@
|
||||
#include <grub/i386/floppy.h>
|
||||
#include <grub/lib/cmdline.h>
|
||||
#include <grub/linux.h>
|
||||
+#include <grub/safemath.h>
|
||||
|
||||
GRUB_MOD_LICENSE ("GPLv3+");
|
||||
|
||||
@@ -218,8 +219,12 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
|
||||
setup_sects = GRUB_LINUX_DEFAULT_SETUP_SECTS;
|
||||
|
||||
real_size = setup_sects << GRUB_DISK_SECTOR_BITS;
|
||||
- grub_linux16_prot_size = grub_file_size (file)
|
||||
- - real_size - GRUB_DISK_SECTOR_SIZE;
|
||||
+ if (grub_sub (grub_file_size (file), real_size, &grub_linux16_prot_size) ||
|
||||
+ grub_sub (grub_linux16_prot_size, GRUB_DISK_SECTOR_SIZE, &grub_linux16_prot_size))
|
||||
+ {
|
||||
+ grub_error (GRUB_ERR_OUT_OF_RANGE, N_("overflow is detected"));
|
||||
+ goto fail;
|
||||
+ }
|
||||
|
||||
if (! grub_linux_is_bzimage
|
||||
&& GRUB_LINUX_ZIMAGE_ADDR + grub_linux16_prot_size
|
||||
diff --git a/grub-core/loader/i386/xen.c b/grub-core/loader/i386/xen.c
|
||||
index 8f662c8ac..cd24874ca 100644
|
||||
--- a/grub-core/loader/i386/xen.c
|
||||
+++ b/grub-core/loader/i386/xen.c
|
||||
@@ -41,6 +41,7 @@
|
||||
#include <grub/linux.h>
|
||||
#include <grub/i386/memory.h>
|
||||
#include <grub/verify.h>
|
||||
+#include <grub/safemath.h>
|
||||
|
||||
GRUB_MOD_LICENSE ("GPLv3+");
|
||||
|
||||
@@ -636,6 +637,7 @@ grub_cmd_xen (grub_command_t cmd __attribute__ ((unused)),
|
||||
grub_relocator_chunk_t ch;
|
||||
grub_addr_t kern_start;
|
||||
grub_addr_t kern_end;
|
||||
+ grub_size_t sz;
|
||||
|
||||
if (argc == 0)
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT, N_("filename expected"));
|
||||
@@ -703,8 +705,14 @@ grub_cmd_xen (grub_command_t cmd __attribute__ ((unused)),
|
||||
|
||||
xen_state.max_addr = ALIGN_UP (kern_end, PAGE_SIZE);
|
||||
|
||||
- err = grub_relocator_alloc_chunk_addr (xen_state.relocator, &ch, kern_start,
|
||||
- kern_end - kern_start);
|
||||
+
|
||||
+ if (grub_sub (kern_end, kern_start, &sz))
|
||||
+ {
|
||||
+ err = GRUB_ERR_OUT_OF_RANGE;
|
||||
+ goto fail;
|
||||
+ }
|
||||
+
|
||||
+ err = grub_relocator_alloc_chunk_addr (xen_state.relocator, &ch, kern_start, sz);
|
||||
if (err)
|
||||
goto fail;
|
||||
kern_chunk_src = get_virtual_current_address (ch);
|
||||
diff --git a/grub-core/loader/xnu.c b/grub-core/loader/xnu.c
|
||||
index 77d7060e1..9ae4ceb35 100644
|
||||
--- a/grub-core/loader/xnu.c
|
||||
+++ b/grub-core/loader/xnu.c
|
||||
@@ -34,6 +34,7 @@
|
||||
#include <grub/env.h>
|
||||
#include <grub/i18n.h>
|
||||
#include <grub/verify.h>
|
||||
+#include <grub/safemath.h>
|
||||
|
||||
GRUB_MOD_LICENSE ("GPLv3+");
|
||||
|
||||
@@ -59,15 +60,17 @@ grub_xnu_heap_malloc (int size, void **src, grub_addr_t *target)
|
||||
{
|
||||
grub_err_t err;
|
||||
grub_relocator_chunk_t ch;
|
||||
+ grub_addr_t tgt;
|
||||
+
|
||||
+ if (grub_add (grub_xnu_heap_target_start, grub_xnu_heap_size, &tgt))
|
||||
+ return GRUB_ERR_OUT_OF_RANGE;
|
||||
|
||||
- err = grub_relocator_alloc_chunk_addr (grub_xnu_relocator, &ch,
|
||||
- grub_xnu_heap_target_start
|
||||
- + grub_xnu_heap_size, size);
|
||||
+ err = grub_relocator_alloc_chunk_addr (grub_xnu_relocator, &ch, tgt, size);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
*src = get_virtual_current_address (ch);
|
||||
- *target = grub_xnu_heap_target_start + grub_xnu_heap_size;
|
||||
+ *target = tgt;
|
||||
grub_xnu_heap_size += size;
|
||||
grub_dprintf ("xnu", "val=%p\n", *src);
|
||||
return GRUB_ERR_NONE;
|
||||
--
|
||||
2.26.2
|
||||
|
||||
@@ -1,341 +0,0 @@
|
||||
From 0cfbbca3ccd84d36ffb1bcd6644ada7c73b19fc0 Mon Sep 17 00:00:00 2001
|
||||
From: Alexey Makhalov <amakhalov@vmware.com>
|
||||
Date: Wed, 8 Jul 2020 01:44:38 +0000
|
||||
Subject: [PATCH] relocator: Protect grub_relocator_alloc_chunk_align()
|
||||
max_addr against integer underflow
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
This commit introduces integer underflow mitigation in max_addr calculation
|
||||
in grub_relocator_alloc_chunk_align() invocation.
|
||||
|
||||
It consists of 2 fixes:
|
||||
1. Introduced grub_relocator_alloc_chunk_align_safe() wrapper function to perform
|
||||
sanity check for min/max and size values, and to make safe invocation of
|
||||
grub_relocator_alloc_chunk_align() with validated max_addr value. Replace all
|
||||
invocations such as grub_relocator_alloc_chunk_align(..., min_addr, max_addr - size, size, ...)
|
||||
by grub_relocator_alloc_chunk_align_safe(..., min_addr, max_addr, size, ...).
|
||||
2. Introduced UP_TO_TOP32(s) macro for the cases where max_addr is 32-bit top
|
||||
address (0xffffffff - size + 1) or similar.
|
||||
|
||||
Signed-off-by: Alexey Makhalov <amakhalov@vmware.com>
|
||||
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
|
||||
Signed-off-by: Stefan Sørensen <stefan.sorensen@spectralink.com>
|
||||
---
|
||||
grub-core/lib/i386/relocator.c | 28 ++++++++++----------------
|
||||
grub-core/lib/mips/relocator.c | 6 ++----
|
||||
grub-core/lib/powerpc/relocator.c | 6 ++----
|
||||
grub-core/lib/x86_64/efi/relocator.c | 7 +++----
|
||||
grub-core/loader/i386/linux.c | 5 ++---
|
||||
grub-core/loader/i386/multiboot_mbi.c | 7 +++----
|
||||
grub-core/loader/i386/pc/linux.c | 6 ++----
|
||||
grub-core/loader/mips/linux.c | 9 +++------
|
||||
grub-core/loader/multiboot.c | 2 +-
|
||||
grub-core/loader/multiboot_elfxx.c | 10 ++++-----
|
||||
grub-core/loader/multiboot_mbi2.c | 10 ++++-----
|
||||
grub-core/loader/xnu_resume.c | 2 +-
|
||||
include/grub/relocator.h | 29 +++++++++++++++++++++++++++
|
||||
13 files changed, 69 insertions(+), 58 deletions(-)
|
||||
|
||||
diff --git a/grub-core/lib/i386/relocator.c b/grub-core/lib/i386/relocator.c
|
||||
index 71dd4f0ab..34cbe834f 100644
|
||||
--- a/grub-core/lib/i386/relocator.c
|
||||
+++ b/grub-core/lib/i386/relocator.c
|
||||
@@ -83,11 +83,10 @@ grub_relocator32_boot (struct grub_relocator *rel,
|
||||
/* Specific memory range due to Global Descriptor Table for use by payload
|
||||
that we will store in returned chunk. The address range and preference
|
||||
are based on "THE LINUX/x86 BOOT PROTOCOL" specification. */
|
||||
- err = grub_relocator_alloc_chunk_align (rel, &ch, 0x1000,
|
||||
- 0x9a000 - RELOCATOR_SIZEOF (32),
|
||||
- RELOCATOR_SIZEOF (32), 16,
|
||||
- GRUB_RELOCATOR_PREFERENCE_LOW,
|
||||
- avoid_efi_bootservices);
|
||||
+ err = grub_relocator_alloc_chunk_align_safe (rel, &ch, 0x1000, 0x9a000,
|
||||
+ RELOCATOR_SIZEOF (32), 16,
|
||||
+ GRUB_RELOCATOR_PREFERENCE_LOW,
|
||||
+ avoid_efi_bootservices);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
@@ -125,13 +124,10 @@ grub_relocator16_boot (struct grub_relocator *rel,
|
||||
grub_relocator_chunk_t ch;
|
||||
|
||||
/* Put it higher than the byte it checks for A20 check. */
|
||||
- err = grub_relocator_alloc_chunk_align (rel, &ch, 0x8010,
|
||||
- 0xa0000 - RELOCATOR_SIZEOF (16)
|
||||
- - GRUB_RELOCATOR16_STACK_SIZE,
|
||||
- RELOCATOR_SIZEOF (16)
|
||||
- + GRUB_RELOCATOR16_STACK_SIZE, 16,
|
||||
- GRUB_RELOCATOR_PREFERENCE_NONE,
|
||||
- 0);
|
||||
+ err = grub_relocator_alloc_chunk_align_safe (rel, &ch, 0x8010, 0xa0000,
|
||||
+ RELOCATOR_SIZEOF (16) +
|
||||
+ GRUB_RELOCATOR16_STACK_SIZE, 16,
|
||||
+ GRUB_RELOCATOR_PREFERENCE_NONE, 0);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
@@ -183,11 +179,9 @@ grub_relocator64_boot (struct grub_relocator *rel,
|
||||
void *relst;
|
||||
grub_relocator_chunk_t ch;
|
||||
|
||||
- err = grub_relocator_alloc_chunk_align (rel, &ch, min_addr,
|
||||
- max_addr - RELOCATOR_SIZEOF (64),
|
||||
- RELOCATOR_SIZEOF (64), 16,
|
||||
- GRUB_RELOCATOR_PREFERENCE_NONE,
|
||||
- 0);
|
||||
+ err = grub_relocator_alloc_chunk_align_safe (rel, &ch, min_addr, max_addr,
|
||||
+ RELOCATOR_SIZEOF (64), 16,
|
||||
+ GRUB_RELOCATOR_PREFERENCE_NONE, 0);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
diff --git a/grub-core/lib/mips/relocator.c b/grub-core/lib/mips/relocator.c
|
||||
index 9d5f49cb9..743b213e6 100644
|
||||
--- a/grub-core/lib/mips/relocator.c
|
||||
+++ b/grub-core/lib/mips/relocator.c
|
||||
@@ -120,10 +120,8 @@ grub_relocator32_boot (struct grub_relocator *rel,
|
||||
unsigned i;
|
||||
grub_addr_t vtarget;
|
||||
|
||||
- err = grub_relocator_alloc_chunk_align (rel, &ch, 0,
|
||||
- (0xffffffff - stateset_size)
|
||||
- + 1, stateset_size,
|
||||
- sizeof (grub_uint32_t),
|
||||
+ err = grub_relocator_alloc_chunk_align (rel, &ch, 0, UP_TO_TOP32 (stateset_size),
|
||||
+ stateset_size, sizeof (grub_uint32_t),
|
||||
GRUB_RELOCATOR_PREFERENCE_NONE, 0);
|
||||
if (err)
|
||||
return err;
|
||||
diff --git a/grub-core/lib/powerpc/relocator.c b/grub-core/lib/powerpc/relocator.c
|
||||
index bdf2b111b..8ffb8b686 100644
|
||||
--- a/grub-core/lib/powerpc/relocator.c
|
||||
+++ b/grub-core/lib/powerpc/relocator.c
|
||||
@@ -115,10 +115,8 @@ grub_relocator32_boot (struct grub_relocator *rel,
|
||||
unsigned i;
|
||||
grub_relocator_chunk_t ch;
|
||||
|
||||
- err = grub_relocator_alloc_chunk_align (rel, &ch, 0,
|
||||
- (0xffffffff - stateset_size)
|
||||
- + 1, stateset_size,
|
||||
- sizeof (grub_uint32_t),
|
||||
+ err = grub_relocator_alloc_chunk_align (rel, &ch, 0, UP_TO_TOP32 (stateset_size),
|
||||
+ stateset_size, sizeof (grub_uint32_t),
|
||||
GRUB_RELOCATOR_PREFERENCE_NONE, 0);
|
||||
if (err)
|
||||
return err;
|
||||
diff --git a/grub-core/lib/x86_64/efi/relocator.c b/grub-core/lib/x86_64/efi/relocator.c
|
||||
index 3caef7a40..7d200a125 100644
|
||||
--- a/grub-core/lib/x86_64/efi/relocator.c
|
||||
+++ b/grub-core/lib/x86_64/efi/relocator.c
|
||||
@@ -50,10 +50,9 @@ grub_relocator64_efi_boot (struct grub_relocator *rel,
|
||||
* 64-bit relocator code may live above 4 GiB quite well.
|
||||
* However, I do not want ask for problems. Just in case.
|
||||
*/
|
||||
- err = grub_relocator_alloc_chunk_align (rel, &ch, 0,
|
||||
- 0x100000000 - RELOCATOR_SIZEOF (64_efi),
|
||||
- RELOCATOR_SIZEOF (64_efi), 16,
|
||||
- GRUB_RELOCATOR_PREFERENCE_NONE, 1);
|
||||
+ err = grub_relocator_alloc_chunk_align_safe (rel, &ch, 0, 0x100000000,
|
||||
+ RELOCATOR_SIZEOF (64_efi), 16,
|
||||
+ GRUB_RELOCATOR_PREFERENCE_NONE, 1);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
diff --git a/grub-core/loader/i386/linux.c b/grub-core/loader/i386/linux.c
|
||||
index 02a73463a..efbb99307 100644
|
||||
--- a/grub-core/loader/i386/linux.c
|
||||
+++ b/grub-core/loader/i386/linux.c
|
||||
@@ -181,9 +181,8 @@ allocate_pages (grub_size_t prot_size, grub_size_t *align,
|
||||
for (; err && *align + 1 > min_align; (*align)--)
|
||||
{
|
||||
grub_errno = GRUB_ERR_NONE;
|
||||
- err = grub_relocator_alloc_chunk_align (relocator, &ch,
|
||||
- 0x1000000,
|
||||
- 0xffffffff & ~prot_size,
|
||||
+ err = grub_relocator_alloc_chunk_align (relocator, &ch, 0x1000000,
|
||||
+ UP_TO_TOP32 (prot_size),
|
||||
prot_size, 1 << *align,
|
||||
GRUB_RELOCATOR_PREFERENCE_LOW,
|
||||
1);
|
||||
diff --git a/grub-core/loader/i386/multiboot_mbi.c b/grub-core/loader/i386/multiboot_mbi.c
|
||||
index ad3cc292f..a67d9d0a8 100644
|
||||
--- a/grub-core/loader/i386/multiboot_mbi.c
|
||||
+++ b/grub-core/loader/i386/multiboot_mbi.c
|
||||
@@ -466,10 +466,9 @@ grub_multiboot_make_mbi (grub_uint32_t *target)
|
||||
|
||||
bufsize = grub_multiboot_get_mbi_size ();
|
||||
|
||||
- err = grub_relocator_alloc_chunk_align (grub_multiboot_relocator, &ch,
|
||||
- 0x10000, 0xa0000 - bufsize,
|
||||
- bufsize, 4,
|
||||
- GRUB_RELOCATOR_PREFERENCE_NONE, 0);
|
||||
+ err = grub_relocator_alloc_chunk_align_safe (grub_multiboot_relocator, &ch,
|
||||
+ 0x10000, 0xa0000, bufsize, 4,
|
||||
+ GRUB_RELOCATOR_PREFERENCE_NONE, 0);
|
||||
if (err)
|
||||
return err;
|
||||
ptrorig = get_virtual_current_address (ch);
|
||||
diff --git a/grub-core/loader/i386/pc/linux.c b/grub-core/loader/i386/pc/linux.c
|
||||
index 31f09922b..5fed5ffdf 100644
|
||||
--- a/grub-core/loader/i386/pc/linux.c
|
||||
+++ b/grub-core/loader/i386/pc/linux.c
|
||||
@@ -453,10 +453,8 @@ grub_cmd_initrd (grub_command_t cmd __attribute__ ((unused)),
|
||||
|
||||
{
|
||||
grub_relocator_chunk_t ch;
|
||||
- err = grub_relocator_alloc_chunk_align (relocator, &ch,
|
||||
- addr_min, addr_max - size,
|
||||
- size, 0x1000,
|
||||
- GRUB_RELOCATOR_PREFERENCE_HIGH, 0);
|
||||
+ err = grub_relocator_alloc_chunk_align_safe (relocator, &ch, addr_min, addr_max, size,
|
||||
+ 0x1000, GRUB_RELOCATOR_PREFERENCE_HIGH, 0);
|
||||
if (err)
|
||||
return err;
|
||||
initrd_chunk = get_virtual_current_address (ch);
|
||||
diff --git a/grub-core/loader/mips/linux.c b/grub-core/loader/mips/linux.c
|
||||
index 7b723bf18..e4ed95921 100644
|
||||
--- a/grub-core/loader/mips/linux.c
|
||||
+++ b/grub-core/loader/mips/linux.c
|
||||
@@ -442,12 +442,9 @@ grub_cmd_initrd (grub_command_t cmd __attribute__ ((unused)),
|
||||
{
|
||||
grub_relocator_chunk_t ch;
|
||||
|
||||
- err = grub_relocator_alloc_chunk_align (relocator, &ch,
|
||||
- (target_addr & 0x1fffffff)
|
||||
- + linux_size + 0x10000,
|
||||
- (0x10000000 - size),
|
||||
- size, 0x10000,
|
||||
- GRUB_RELOCATOR_PREFERENCE_NONE, 0);
|
||||
+ err = grub_relocator_alloc_chunk_align_safe (relocator, &ch, (target_addr & 0x1fffffff) +
|
||||
+ linux_size + 0x10000, 0x10000000, size,
|
||||
+ 0x10000, GRUB_RELOCATOR_PREFERENCE_NONE, 0);
|
||||
|
||||
if (err)
|
||||
goto fail;
|
||||
diff --git a/grub-core/loader/multiboot.c b/grub-core/loader/multiboot.c
|
||||
index 4a98d7082..facb13f3d 100644
|
||||
--- a/grub-core/loader/multiboot.c
|
||||
+++ b/grub-core/loader/multiboot.c
|
||||
@@ -403,7 +403,7 @@ grub_cmd_module (grub_command_t cmd __attribute__ ((unused)),
|
||||
{
|
||||
grub_relocator_chunk_t ch;
|
||||
err = grub_relocator_alloc_chunk_align (GRUB_MULTIBOOT (relocator), &ch,
|
||||
- lowest_addr, (0xffffffff - size) + 1,
|
||||
+ lowest_addr, UP_TO_TOP32 (size),
|
||||
size, MULTIBOOT_MOD_ALIGN,
|
||||
GRUB_RELOCATOR_PREFERENCE_NONE, 1);
|
||||
if (err)
|
||||
diff --git a/grub-core/loader/multiboot_elfxx.c b/grub-core/loader/multiboot_elfxx.c
|
||||
index cc6853692..f2318e0d1 100644
|
||||
--- a/grub-core/loader/multiboot_elfxx.c
|
||||
+++ b/grub-core/loader/multiboot_elfxx.c
|
||||
@@ -109,10 +109,10 @@ CONCAT(grub_multiboot_load_elf, XX) (mbi_load_data_t *mld)
|
||||
if (load_size > mld->max_addr || mld->min_addr > mld->max_addr - load_size)
|
||||
return grub_error (GRUB_ERR_BAD_OS, "invalid min/max address and/or load size");
|
||||
|
||||
- err = grub_relocator_alloc_chunk_align (GRUB_MULTIBOOT (relocator), &ch,
|
||||
- mld->min_addr, mld->max_addr - load_size,
|
||||
- load_size, mld->align ? mld->align : 1,
|
||||
- mld->preference, mld->avoid_efi_boot_services);
|
||||
+ err = grub_relocator_alloc_chunk_align_safe (GRUB_MULTIBOOT (relocator), &ch,
|
||||
+ mld->min_addr, mld->max_addr,
|
||||
+ load_size, mld->align ? mld->align : 1,
|
||||
+ mld->preference, mld->avoid_efi_boot_services);
|
||||
|
||||
if (err)
|
||||
{
|
||||
@@ -256,7 +256,7 @@ CONCAT(grub_multiboot_load_elf, XX) (mbi_load_data_t *mld)
|
||||
continue;
|
||||
|
||||
err = grub_relocator_alloc_chunk_align (GRUB_MULTIBOOT (relocator), &ch, 0,
|
||||
- (0xffffffff - sh->sh_size) + 1,
|
||||
+ UP_TO_TOP32 (sh->sh_size),
|
||||
sh->sh_size, sh->sh_addralign,
|
||||
GRUB_RELOCATOR_PREFERENCE_NONE,
|
||||
mld->avoid_efi_boot_services);
|
||||
diff --git a/grub-core/loader/multiboot_mbi2.c b/grub-core/loader/multiboot_mbi2.c
|
||||
index 0efc66062..03967839c 100644
|
||||
--- a/grub-core/loader/multiboot_mbi2.c
|
||||
+++ b/grub-core/loader/multiboot_mbi2.c
|
||||
@@ -295,10 +295,10 @@ grub_multiboot2_load (grub_file_t file, const char *filename)
|
||||
return grub_error (GRUB_ERR_BAD_OS, "invalid min/max address and/or load size");
|
||||
}
|
||||
|
||||
- err = grub_relocator_alloc_chunk_align (grub_multiboot2_relocator, &ch,
|
||||
- mld.min_addr, mld.max_addr - code_size,
|
||||
- code_size, mld.align ? mld.align : 1,
|
||||
- mld.preference, keep_bs);
|
||||
+ err = grub_relocator_alloc_chunk_align_safe (grub_multiboot2_relocator, &ch,
|
||||
+ mld.min_addr, mld.max_addr,
|
||||
+ code_size, mld.align ? mld.align : 1,
|
||||
+ mld.preference, keep_bs);
|
||||
}
|
||||
else
|
||||
err = grub_relocator_alloc_chunk_addr (grub_multiboot2_relocator,
|
||||
@@ -708,7 +708,7 @@ grub_multiboot2_make_mbi (grub_uint32_t *target)
|
||||
COMPILE_TIME_ASSERT (MULTIBOOT_TAG_ALIGN % sizeof (grub_properly_aligned_t) == 0);
|
||||
|
||||
err = grub_relocator_alloc_chunk_align (grub_multiboot2_relocator, &ch,
|
||||
- 0, 0xffffffff - bufsize,
|
||||
+ 0, UP_TO_TOP32 (bufsize),
|
||||
bufsize, MULTIBOOT_TAG_ALIGN,
|
||||
GRUB_RELOCATOR_PREFERENCE_NONE, 1);
|
||||
if (err)
|
||||
diff --git a/grub-core/loader/xnu_resume.c b/grub-core/loader/xnu_resume.c
|
||||
index 8089804d4..d648ef0cd 100644
|
||||
--- a/grub-core/loader/xnu_resume.c
|
||||
+++ b/grub-core/loader/xnu_resume.c
|
||||
@@ -129,7 +129,7 @@ grub_xnu_resume (char *imagename)
|
||||
{
|
||||
grub_relocator_chunk_t ch;
|
||||
err = grub_relocator_alloc_chunk_align (grub_xnu_relocator, &ch, 0,
|
||||
- (0xffffffff - hibhead.image_size) + 1,
|
||||
+ UP_TO_TOP32 (hibhead.image_size),
|
||||
hibhead.image_size,
|
||||
GRUB_XNU_PAGESIZE,
|
||||
GRUB_RELOCATOR_PREFERENCE_NONE, 0);
|
||||
diff --git a/include/grub/relocator.h b/include/grub/relocator.h
|
||||
index 24d8672d2..1b3bdd92a 100644
|
||||
--- a/include/grub/relocator.h
|
||||
+++ b/include/grub/relocator.h
|
||||
@@ -49,6 +49,35 @@ grub_relocator_alloc_chunk_align (struct grub_relocator *rel,
|
||||
int preference,
|
||||
int avoid_efi_boot_services);
|
||||
|
||||
+/*
|
||||
+ * Wrapper for grub_relocator_alloc_chunk_align() with purpose of
|
||||
+ * protecting against integer underflow.
|
||||
+ *
|
||||
+ * Compare to its callee, max_addr has different meaning here.
|
||||
+ * It covers entire chunk and not just start address of the chunk.
|
||||
+ */
|
||||
+static inline grub_err_t
|
||||
+grub_relocator_alloc_chunk_align_safe (struct grub_relocator *rel,
|
||||
+ grub_relocator_chunk_t *out,
|
||||
+ grub_phys_addr_t min_addr,
|
||||
+ grub_phys_addr_t max_addr,
|
||||
+ grub_size_t size, grub_size_t align,
|
||||
+ int preference,
|
||||
+ int avoid_efi_boot_services)
|
||||
+{
|
||||
+ /* Sanity check and ensure following equation (max_addr - size) is safe. */
|
||||
+ if (max_addr < size || (max_addr - size) < min_addr)
|
||||
+ return GRUB_ERR_OUT_OF_RANGE;
|
||||
+
|
||||
+ return grub_relocator_alloc_chunk_align (rel, out, min_addr,
|
||||
+ max_addr - size,
|
||||
+ size, align, preference,
|
||||
+ avoid_efi_boot_services);
|
||||
+}
|
||||
+
|
||||
+/* Top 32-bit address minus s bytes and plus 1 byte. */
|
||||
+#define UP_TO_TOP32(s) ((~(s) & 0xffffffff) + 1)
|
||||
+
|
||||
#define GRUB_RELOCATOR_PREFERENCE_NONE 0
|
||||
#define GRUB_RELOCATOR_PREFERENCE_LOW 1
|
||||
#define GRUB_RELOCATOR_PREFERENCE_HIGH 2
|
||||
--
|
||||
2.26.2
|
||||
|
||||
@@ -1,37 +0,0 @@
|
||||
From 73aa0776457066ee6ebc93486c3cf0e6b755d1b8 Mon Sep 17 00:00:00 2001
|
||||
From: Chris Coulson <chris.coulson@canonical.com>
|
||||
Date: Fri, 10 Jul 2020 11:21:14 +0100
|
||||
Subject: [PATCH] script: Remove unused fields from grub_script_function
|
||||
struct
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Signed-off-by: Chris Coulson <chris.coulson@canonical.com>
|
||||
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
|
||||
Signed-off-by: Stefan Sørensen <stefan.sorensen@spectralink.com>
|
||||
---
|
||||
include/grub/script_sh.h | 5 -----
|
||||
1 file changed, 5 deletions(-)
|
||||
|
||||
diff --git a/include/grub/script_sh.h b/include/grub/script_sh.h
|
||||
index 360c2be1f..b382bcf09 100644
|
||||
--- a/include/grub/script_sh.h
|
||||
+++ b/include/grub/script_sh.h
|
||||
@@ -359,13 +359,8 @@ struct grub_script_function
|
||||
/* The script function. */
|
||||
struct grub_script *func;
|
||||
|
||||
- /* The flags. */
|
||||
- unsigned flags;
|
||||
-
|
||||
/* The next element. */
|
||||
struct grub_script_function *next;
|
||||
-
|
||||
- int references;
|
||||
};
|
||||
typedef struct grub_script_function *grub_script_function_t;
|
||||
|
||||
--
|
||||
2.26.2
|
||||
|
||||
@@ -1,113 +0,0 @@
|
||||
From 26349fcf80982b4d0120b73b2836e88bcf16853c Mon Sep 17 00:00:00 2001
|
||||
From: Chris Coulson <chris.coulson@canonical.com>
|
||||
Date: Fri, 10 Jul 2020 14:41:45 +0100
|
||||
Subject: [PATCH] script: Avoid a use-after-free when redefining a
|
||||
function during execution
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Defining a new function with the same name as a previously defined
|
||||
function causes the grub_script and associated resources for the
|
||||
previous function to be freed. If the previous function is currently
|
||||
executing when a function with the same name is defined, this results
|
||||
in use-after-frees when processing subsequent commands in the original
|
||||
function.
|
||||
|
||||
Instead, reject a new function definition if it has the same name as
|
||||
a previously defined function, and that function is currently being
|
||||
executed. Although a behavioural change, this should be backwards
|
||||
compatible with existing configurations because they can't be
|
||||
dependent on the current behaviour without being broken.
|
||||
|
||||
Fixes: CVE-2020-15706
|
||||
|
||||
Signed-off-by: Chris Coulson <chris.coulson@canonical.com>
|
||||
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
|
||||
Signed-off-by: Stefan Sørensen <stefan.sorensen@spectralink.com>
|
||||
---
|
||||
grub-core/script/execute.c | 2 ++
|
||||
grub-core/script/function.c | 16 +++++++++++++---
|
||||
grub-core/script/parser.y | 3 ++-
|
||||
include/grub/script_sh.h | 2 ++
|
||||
4 files changed, 19 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/grub-core/script/execute.c b/grub-core/script/execute.c
|
||||
index c8d6806fe..7e028e135 100644
|
||||
--- a/grub-core/script/execute.c
|
||||
+++ b/grub-core/script/execute.c
|
||||
@@ -838,7 +838,9 @@ grub_script_function_call (grub_script_function_t func, int argc, char **args)
|
||||
old_scope = scope;
|
||||
scope = &new_scope;
|
||||
|
||||
+ func->executing++;
|
||||
ret = grub_script_execute (func->func);
|
||||
+ func->executing--;
|
||||
|
||||
function_return = 0;
|
||||
active_loops = loops;
|
||||
diff --git a/grub-core/script/function.c b/grub-core/script/function.c
|
||||
index d36655e51..3aad04bf9 100644
|
||||
--- a/grub-core/script/function.c
|
||||
+++ b/grub-core/script/function.c
|
||||
@@ -34,6 +34,7 @@ grub_script_function_create (struct grub_script_arg *functionname_arg,
|
||||
func = (grub_script_function_t) grub_malloc (sizeof (*func));
|
||||
if (! func)
|
||||
return 0;
|
||||
+ func->executing = 0;
|
||||
|
||||
func->name = grub_strdup (functionname_arg->str);
|
||||
if (! func->name)
|
||||
@@ -60,10 +61,19 @@ grub_script_function_create (struct grub_script_arg *functionname_arg,
|
||||
grub_script_function_t q;
|
||||
|
||||
q = *p;
|
||||
- grub_script_free (q->func);
|
||||
- q->func = cmd;
|
||||
grub_free (func);
|
||||
- func = q;
|
||||
+ if (q->executing > 0)
|
||||
+ {
|
||||
+ grub_error (GRUB_ERR_BAD_ARGUMENT,
|
||||
+ N_("attempt to redefine a function being executed"));
|
||||
+ func = NULL;
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ grub_script_free (q->func);
|
||||
+ q->func = cmd;
|
||||
+ func = q;
|
||||
+ }
|
||||
}
|
||||
else
|
||||
{
|
||||
diff --git a/grub-core/script/parser.y b/grub-core/script/parser.y
|
||||
index 4f0ab8319..f80b86b6f 100644
|
||||
--- a/grub-core/script/parser.y
|
||||
+++ b/grub-core/script/parser.y
|
||||
@@ -289,7 +289,8 @@ function: "function" "name"
|
||||
grub_script_mem_free (state->func_mem);
|
||||
else {
|
||||
script->children = state->scripts;
|
||||
- grub_script_function_create ($2, script);
|
||||
+ if (!grub_script_function_create ($2, script))
|
||||
+ grub_script_free (script);
|
||||
}
|
||||
|
||||
state->scripts = $<scripts>3;
|
||||
diff --git a/include/grub/script_sh.h b/include/grub/script_sh.h
|
||||
index b382bcf09..6c48e0751 100644
|
||||
--- a/include/grub/script_sh.h
|
||||
+++ b/include/grub/script_sh.h
|
||||
@@ -361,6 +361,8 @@ struct grub_script_function
|
||||
|
||||
/* The next element. */
|
||||
struct grub_script_function *next;
|
||||
+
|
||||
+ unsigned executing;
|
||||
};
|
||||
typedef struct grub_script_function *grub_script_function_t;
|
||||
|
||||
--
|
||||
2.26.2
|
||||
|
||||
@@ -1,49 +0,0 @@
|
||||
From 06aa91f79f902752cb7e5d22ac0ea8e13bffd056 Mon Sep 17 00:00:00 2001
|
||||
From: Alexey Makhalov <amakhalov@vmware.com>
|
||||
Date: Fri, 17 Jul 2020 05:17:26 +0000
|
||||
Subject: [PATCH] relocator: Fix grub_relocator_alloc_chunk_align() top
|
||||
memory allocation
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Current implementation of grub_relocator_alloc_chunk_align()
|
||||
does not allow allocation of the top byte.
|
||||
|
||||
Assuming input args are:
|
||||
max_addr = 0xfffff000;
|
||||
size = 0x1000;
|
||||
|
||||
And this is valid. But following overflow protection will
|
||||
unnecessarily move max_addr one byte down (to 0xffffefff):
|
||||
if (max_addr > ~size)
|
||||
max_addr = ~size;
|
||||
|
||||
~size + 1 will fix the situation. In addition, check size
|
||||
for non zero to do not zero max_addr.
|
||||
|
||||
Signed-off-by: Alexey Makhalov <amakhalov@vmware.com>
|
||||
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
|
||||
Signed-off-by: Stefan Sørensen <stefan.sorensen@spectralink.com>
|
||||
---
|
||||
grub-core/lib/relocator.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/grub-core/lib/relocator.c b/grub-core/lib/relocator.c
|
||||
index 5847aac36..f2c1944c2 100644
|
||||
--- a/grub-core/lib/relocator.c
|
||||
+++ b/grub-core/lib/relocator.c
|
||||
@@ -1386,8 +1386,8 @@ grub_relocator_alloc_chunk_align (struct grub_relocator *rel,
|
||||
};
|
||||
grub_addr_t min_addr2 = 0, max_addr2;
|
||||
|
||||
- if (max_addr > ~size)
|
||||
- max_addr = ~size;
|
||||
+ if (size && (max_addr > ~size))
|
||||
+ max_addr = ~size + 1;
|
||||
|
||||
#ifdef GRUB_MACHINE_PCBIOS
|
||||
if (min_addr < 0x1000)
|
||||
--
|
||||
2.26.2
|
||||
|
||||
@@ -1,61 +0,0 @@
|
||||
From feec993673d8e13fcf22fe2389ac29222b6daebd Mon Sep 17 00:00:00 2001
|
||||
From: Peter Jones <pjones@redhat.com>
|
||||
Date: Sun, 19 Jul 2020 14:43:31 -0400
|
||||
Subject: [PATCH] hfsplus: Fix two more overflows
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Both node->size and node->namelen come from the supplied filesystem,
|
||||
which may be user-supplied. We can't trust them for the math unless we
|
||||
know they don't overflow. Making sure they go through grub_add() or
|
||||
grub_calloc() first will give us that.
|
||||
|
||||
Signed-off-by: Peter Jones <pjones@redhat.com>
|
||||
Reviewed-by: Darren Kenny <darren.kenny@oracle.com>
|
||||
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
|
||||
Signed-off-by: Stefan Sørensen <stefan.sorensen@spectralink.com>
|
||||
---
|
||||
grub-core/fs/hfsplus.c | 11 ++++++++---
|
||||
1 file changed, 8 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/grub-core/fs/hfsplus.c b/grub-core/fs/hfsplus.c
|
||||
index dae43becc..9c4e4c88c 100644
|
||||
--- a/grub-core/fs/hfsplus.c
|
||||
+++ b/grub-core/fs/hfsplus.c
|
||||
@@ -31,6 +31,7 @@
|
||||
#include <grub/hfs.h>
|
||||
#include <grub/charset.h>
|
||||
#include <grub/hfsplus.h>
|
||||
+#include <grub/safemath.h>
|
||||
|
||||
GRUB_MOD_LICENSE ("GPLv3+");
|
||||
|
||||
@@ -475,8 +476,12 @@ grub_hfsplus_read_symlink (grub_fshelp_node_t node)
|
||||
{
|
||||
char *symlink;
|
||||
grub_ssize_t numread;
|
||||
+ grub_size_t sz = node->size;
|
||||
|
||||
- symlink = grub_malloc (node->size + 1);
|
||||
+ if (grub_add (sz, 1, &sz))
|
||||
+ return NULL;
|
||||
+
|
||||
+ symlink = grub_malloc (sz);
|
||||
if (!symlink)
|
||||
return 0;
|
||||
|
||||
@@ -715,8 +720,8 @@ list_nodes (void *record, void *hook_arg)
|
||||
if (type == GRUB_FSHELP_UNKNOWN)
|
||||
return 0;
|
||||
|
||||
- filename = grub_malloc (grub_be_to_cpu16 (catkey->namelen)
|
||||
- * GRUB_MAX_UTF8_PER_UTF16 + 1);
|
||||
+ filename = grub_calloc (grub_be_to_cpu16 (catkey->namelen),
|
||||
+ GRUB_MAX_UTF8_PER_UTF16 + 1);
|
||||
if (! filename)
|
||||
return 0;
|
||||
|
||||
--
|
||||
2.26.2
|
||||
|
||||
@@ -1,116 +0,0 @@
|
||||
From a1845e90fc19fb5e904091bad8a378f458798e4a Mon Sep 17 00:00:00 2001
|
||||
From: Peter Jones <pjones@redhat.com>
|
||||
Date: Sun, 19 Jul 2020 15:48:20 -0400
|
||||
Subject: [PATCH] lvm: Fix two more potential data-dependent alloc
|
||||
overflows
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
It appears to be possible to make a (possibly invalid) lvm PV with
|
||||
a metadata size field that overflows our type when adding it to the
|
||||
address we've allocated. Even if it doesn't, it may be possible to do so
|
||||
with the math using the outcome of that as an operand. Check them both.
|
||||
|
||||
Signed-off-by: Peter Jones <pjones@redhat.com>
|
||||
Signed-off-by: Darren Kenny <darren.kenny@oracle.com>
|
||||
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
|
||||
Signed-off-by: Stefan Sørensen <stefan.sorensen@spectralink.com>
|
||||
---
|
||||
grub-core/disk/lvm.c | 48 ++++++++++++++++++++++++++++++++++++--------
|
||||
1 file changed, 40 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/grub-core/disk/lvm.c b/grub-core/disk/lvm.c
|
||||
index d1df640b3..139fafd47 100644
|
||||
--- a/grub-core/disk/lvm.c
|
||||
+++ b/grub-core/disk/lvm.c
|
||||
@@ -25,6 +25,7 @@
|
||||
#include <grub/lvm.h>
|
||||
#include <grub/partition.h>
|
||||
#include <grub/i18n.h>
|
||||
+#include <grub/safemath.h>
|
||||
|
||||
#ifdef GRUB_UTIL
|
||||
#include <grub/emu/misc.h>
|
||||
@@ -102,10 +103,11 @@ grub_lvm_detect (grub_disk_t disk,
|
||||
{
|
||||
grub_err_t err;
|
||||
grub_uint64_t mda_offset, mda_size;
|
||||
+ grub_size_t ptr;
|
||||
char buf[GRUB_LVM_LABEL_SIZE];
|
||||
char vg_id[GRUB_LVM_ID_STRLEN+1];
|
||||
char pv_id[GRUB_LVM_ID_STRLEN+1];
|
||||
- char *metadatabuf, *p, *q, *vgname;
|
||||
+ char *metadatabuf, *p, *q, *mda_end, *vgname;
|
||||
struct grub_lvm_label_header *lh = (struct grub_lvm_label_header *) buf;
|
||||
struct grub_lvm_pv_header *pvh;
|
||||
struct grub_lvm_disk_locn *dlocn;
|
||||
@@ -205,19 +207,31 @@ grub_lvm_detect (grub_disk_t disk,
|
||||
grub_le_to_cpu64 (rlocn->size) -
|
||||
grub_le_to_cpu64 (mdah->size));
|
||||
}
|
||||
- p = q = metadatabuf + grub_le_to_cpu64 (rlocn->offset);
|
||||
|
||||
- while (*q != ' ' && q < metadatabuf + mda_size)
|
||||
- q++;
|
||||
-
|
||||
- if (q == metadatabuf + mda_size)
|
||||
+ if (grub_add ((grub_size_t)metadatabuf,
|
||||
+ (grub_size_t)grub_le_to_cpu64 (rlocn->offset),
|
||||
+ &ptr))
|
||||
{
|
||||
+ error_parsing_metadata:
|
||||
#ifdef GRUB_UTIL
|
||||
grub_util_info ("error parsing metadata");
|
||||
#endif
|
||||
goto fail2;
|
||||
}
|
||||
|
||||
+ p = q = (char *)ptr;
|
||||
+
|
||||
+ if (grub_add ((grub_size_t)metadatabuf, (grub_size_t)mda_size, &ptr))
|
||||
+ goto error_parsing_metadata;
|
||||
+
|
||||
+ mda_end = (char *)ptr;
|
||||
+
|
||||
+ while (*q != ' ' && q < mda_end)
|
||||
+ q++;
|
||||
+
|
||||
+ if (q == mda_end)
|
||||
+ goto error_parsing_metadata;
|
||||
+
|
||||
vgname_len = q - p;
|
||||
vgname = grub_malloc (vgname_len + 1);
|
||||
if (!vgname)
|
||||
@@ -367,8 +381,26 @@ grub_lvm_detect (grub_disk_t disk,
|
||||
{
|
||||
const char *iptr;
|
||||
char *optr;
|
||||
- lv->fullname = grub_malloc (sizeof ("lvm/") - 1 + 2 * vgname_len
|
||||
- + 1 + 2 * s + 1);
|
||||
+
|
||||
+ /*
|
||||
+ * This is kind of hard to read with our safe (but rather
|
||||
+ * baroque) math primatives, but it boils down to:
|
||||
+ *
|
||||
+ * sz0 = vgname_len * 2 + 1 +
|
||||
+ * s * 2 + 1 +
|
||||
+ * sizeof ("lvm/") - 1;
|
||||
+ */
|
||||
+ grub_size_t sz0 = vgname_len, sz1 = s;
|
||||
+
|
||||
+ if (grub_mul (sz0, 2, &sz0) ||
|
||||
+ grub_add (sz0, 1, &sz0) ||
|
||||
+ grub_mul (sz1, 2, &sz1) ||
|
||||
+ grub_add (sz1, 1, &sz1) ||
|
||||
+ grub_add (sz0, sz1, &sz0) ||
|
||||
+ grub_add (sz0, sizeof ("lvm/") - 1, &sz0))
|
||||
+ goto lvs_fail;
|
||||
+
|
||||
+ lv->fullname = grub_malloc (sz0);
|
||||
if (!lv->fullname)
|
||||
goto lvs_fail;
|
||||
|
||||
--
|
||||
2.26.2
|
||||
|
||||
@@ -1,38 +0,0 @@
|
||||
From 320e86747a32e4d46d24ee4b64493741c161da50 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Jones <pjones@redhat.com>
|
||||
Date: Sun, 19 Jul 2020 16:08:08 -0400
|
||||
Subject: [PATCH] emu: Make grub_free(NULL) safe
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
The grub_free() implementation in grub-core/kern/mm.c safely handles
|
||||
NULL pointers, and code at many places depends on this. We don't know
|
||||
that the same is true on all host OSes, so we need to handle the same
|
||||
behavior in grub-emu's implementation.
|
||||
|
||||
Signed-off-by: Peter Jones <pjones@redhat.com>
|
||||
Reviewed-by: Darren Kenny <darren.kenny@oracle.com>
|
||||
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
|
||||
Signed-off-by: Stefan Sørensen <stefan.sorensen@spectralink.com>
|
||||
---
|
||||
grub-core/kern/emu/mm.c | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/grub-core/kern/emu/mm.c b/grub-core/kern/emu/mm.c
|
||||
index 145b01d37..4d1046a21 100644
|
||||
--- a/grub-core/kern/emu/mm.c
|
||||
+++ b/grub-core/kern/emu/mm.c
|
||||
@@ -60,7 +60,8 @@ grub_zalloc (grub_size_t size)
|
||||
void
|
||||
grub_free (void *ptr)
|
||||
{
|
||||
- free (ptr);
|
||||
+ if (ptr)
|
||||
+ free (ptr);
|
||||
}
|
||||
|
||||
void *
|
||||
--
|
||||
2.26.2
|
||||
|
||||
@@ -1,239 +0,0 @@
|
||||
From c330aa099a38bc5c4d3066954fe35767cc06adb1 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Jones <pjones@redhat.com>
|
||||
Date: Sun, 19 Jul 2020 16:53:27 -0400
|
||||
Subject: [PATCH] efi: Fix some malformed device path arithmetic errors
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Several places we take the length of a device path and subtract 4 from
|
||||
it, without ever checking that it's >= 4. There are also cases where
|
||||
this kind of malformation will result in unpredictable iteration,
|
||||
including treating the length from one dp node as the type in the next
|
||||
node. These are all errors, no matter where the data comes from.
|
||||
|
||||
This patch adds a checking macro, GRUB_EFI_DEVICE_PATH_VALID(), which
|
||||
can be used in several places, and makes GRUB_EFI_NEXT_DEVICE_PATH()
|
||||
return NULL and GRUB_EFI_END_ENTIRE_DEVICE_PATH() evaluate as true when
|
||||
the length is too small. Additionally, it makes several places in the
|
||||
code check for and return errors in these cases.
|
||||
|
||||
Signed-off-by: Peter Jones <pjones@redhat.com>
|
||||
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
|
||||
Signed-off-by: Stefan Sørensen <stefan.sorensen@spectralink.com>
|
||||
---
|
||||
grub-core/kern/efi/efi.c | 64 +++++++++++++++++++++++++-----
|
||||
grub-core/loader/efi/chainloader.c | 13 +++++-
|
||||
grub-core/loader/i386/xnu.c | 9 +++--
|
||||
include/grub/efi/api.h | 14 ++++---
|
||||
4 files changed, 79 insertions(+), 21 deletions(-)
|
||||
|
||||
diff --git a/grub-core/kern/efi/efi.c b/grub-core/kern/efi/efi.c
|
||||
index dc31caa21..c97969a65 100644
|
||||
--- a/grub-core/kern/efi/efi.c
|
||||
+++ b/grub-core/kern/efi/efi.c
|
||||
@@ -332,7 +332,7 @@ grub_efi_get_filename (grub_efi_device_path_t *dp0)
|
||||
|
||||
dp = dp0;
|
||||
|
||||
- while (1)
|
||||
+ while (dp)
|
||||
{
|
||||
grub_efi_uint8_t type = GRUB_EFI_DEVICE_PATH_TYPE (dp);
|
||||
grub_efi_uint8_t subtype = GRUB_EFI_DEVICE_PATH_SUBTYPE (dp);
|
||||
@@ -342,9 +342,15 @@ grub_efi_get_filename (grub_efi_device_path_t *dp0)
|
||||
if (type == GRUB_EFI_MEDIA_DEVICE_PATH_TYPE
|
||||
&& subtype == GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE)
|
||||
{
|
||||
- grub_efi_uint16_t len;
|
||||
- len = ((GRUB_EFI_DEVICE_PATH_LENGTH (dp) - 4)
|
||||
- / sizeof (grub_efi_char16_t));
|
||||
+ grub_efi_uint16_t len = GRUB_EFI_DEVICE_PATH_LENGTH (dp);
|
||||
+
|
||||
+ if (len < 4)
|
||||
+ {
|
||||
+ grub_error (GRUB_ERR_OUT_OF_RANGE,
|
||||
+ "malformed EFI Device Path node has length=%d", len);
|
||||
+ return NULL;
|
||||
+ }
|
||||
+ len = (len - 4) / sizeof (grub_efi_char16_t);
|
||||
filesize += GRUB_MAX_UTF8_PER_UTF16 * len + 2;
|
||||
}
|
||||
|
||||
@@ -360,7 +366,7 @@ grub_efi_get_filename (grub_efi_device_path_t *dp0)
|
||||
if (!name)
|
||||
return NULL;
|
||||
|
||||
- while (1)
|
||||
+ while (dp)
|
||||
{
|
||||
grub_efi_uint8_t type = GRUB_EFI_DEVICE_PATH_TYPE (dp);
|
||||
grub_efi_uint8_t subtype = GRUB_EFI_DEVICE_PATH_SUBTYPE (dp);
|
||||
@@ -376,8 +382,15 @@ grub_efi_get_filename (grub_efi_device_path_t *dp0)
|
||||
|
||||
*p++ = '/';
|
||||
|
||||
- len = ((GRUB_EFI_DEVICE_PATH_LENGTH (dp) - 4)
|
||||
- / sizeof (grub_efi_char16_t));
|
||||
+ len = GRUB_EFI_DEVICE_PATH_LENGTH (dp);
|
||||
+ if (len < 4)
|
||||
+ {
|
||||
+ grub_error (GRUB_ERR_OUT_OF_RANGE,
|
||||
+ "malformed EFI Device Path node has length=%d", len);
|
||||
+ return NULL;
|
||||
+ }
|
||||
+
|
||||
+ len = (len - 4) / sizeof (grub_efi_char16_t);
|
||||
fp = (grub_efi_file_path_device_path_t *) dp;
|
||||
/* According to EFI spec Path Name is NULL terminated */
|
||||
while (len > 0 && fp->path_name[len - 1] == 0)
|
||||
@@ -452,7 +465,26 @@ grub_efi_duplicate_device_path (const grub_efi_device_path_t *dp)
|
||||
;
|
||||
p = GRUB_EFI_NEXT_DEVICE_PATH (p))
|
||||
{
|
||||
- total_size += GRUB_EFI_DEVICE_PATH_LENGTH (p);
|
||||
+ grub_size_t len = GRUB_EFI_DEVICE_PATH_LENGTH (p);
|
||||
+
|
||||
+ /*
|
||||
+ * In the event that we find a node that's completely garbage, for
|
||||
+ * example if we get to 0x7f 0x01 0x02 0x00 ... (EndInstance with a size
|
||||
+ * of 2), GRUB_EFI_END_ENTIRE_DEVICE_PATH() will be true and
|
||||
+ * GRUB_EFI_NEXT_DEVICE_PATH() will return NULL, so we won't continue,
|
||||
+ * and neither should our consumers, but there won't be any error raised
|
||||
+ * even though the device path is junk.
|
||||
+ *
|
||||
+ * This keeps us from passing junk down back to our caller.
|
||||
+ */
|
||||
+ if (len < 4)
|
||||
+ {
|
||||
+ grub_error (GRUB_ERR_OUT_OF_RANGE,
|
||||
+ "malformed EFI Device Path node has length=%d", len);
|
||||
+ return NULL;
|
||||
+ }
|
||||
+
|
||||
+ total_size += len;
|
||||
if (GRUB_EFI_END_ENTIRE_DEVICE_PATH (p))
|
||||
break;
|
||||
}
|
||||
@@ -497,7 +529,7 @@ dump_vendor_path (const char *type, grub_efi_vendor_device_path_t *vendor)
|
||||
void
|
||||
grub_efi_print_device_path (grub_efi_device_path_t *dp)
|
||||
{
|
||||
- while (1)
|
||||
+ while (GRUB_EFI_DEVICE_PATH_VALID (dp))
|
||||
{
|
||||
grub_efi_uint8_t type = GRUB_EFI_DEVICE_PATH_TYPE (dp);
|
||||
grub_efi_uint8_t subtype = GRUB_EFI_DEVICE_PATH_SUBTYPE (dp);
|
||||
@@ -909,7 +941,10 @@ grub_efi_compare_device_paths (const grub_efi_device_path_t *dp1,
|
||||
/* Return non-zero. */
|
||||
return 1;
|
||||
|
||||
- while (1)
|
||||
+ if (dp1 == dp2)
|
||||
+ return 0;
|
||||
+
|
||||
+ while (GRUB_EFI_DEVICE_PATH_VALID (dp1) && GRUB_EFI_DEVICE_PATH_VALID (dp2))
|
||||
{
|
||||
grub_efi_uint8_t type1, type2;
|
||||
grub_efi_uint8_t subtype1, subtype2;
|
||||
@@ -945,5 +980,14 @@ grub_efi_compare_device_paths (const grub_efi_device_path_t *dp1,
|
||||
dp2 = (grub_efi_device_path_t *) ((char *) dp2 + len2);
|
||||
}
|
||||
|
||||
+ /*
|
||||
+ * There's no "right" answer here, but we probably don't want to call a valid
|
||||
+ * dp and an invalid dp equal, so pick one way or the other.
|
||||
+ */
|
||||
+ if (GRUB_EFI_DEVICE_PATH_VALID (dp1) && !GRUB_EFI_DEVICE_PATH_VALID (dp2))
|
||||
+ return 1;
|
||||
+ else if (!GRUB_EFI_DEVICE_PATH_VALID (dp1) && GRUB_EFI_DEVICE_PATH_VALID (dp2))
|
||||
+ return -1;
|
||||
+
|
||||
return 0;
|
||||
}
|
||||
diff --git a/grub-core/loader/efi/chainloader.c b/grub-core/loader/efi/chainloader.c
|
||||
index daf8c6b54..a8d7b9155 100644
|
||||
--- a/grub-core/loader/efi/chainloader.c
|
||||
+++ b/grub-core/loader/efi/chainloader.c
|
||||
@@ -156,9 +156,18 @@ make_file_path (grub_efi_device_path_t *dp, const char *filename)
|
||||
|
||||
size = 0;
|
||||
d = dp;
|
||||
- while (1)
|
||||
+ while (d)
|
||||
{
|
||||
- size += GRUB_EFI_DEVICE_PATH_LENGTH (d);
|
||||
+ grub_size_t len = GRUB_EFI_DEVICE_PATH_LENGTH (d);
|
||||
+
|
||||
+ if (len < 4)
|
||||
+ {
|
||||
+ grub_error (GRUB_ERR_OUT_OF_RANGE,
|
||||
+ "malformed EFI Device Path node has length=%d", len);
|
||||
+ return NULL;
|
||||
+ }
|
||||
+
|
||||
+ size += len;
|
||||
if ((GRUB_EFI_END_ENTIRE_DEVICE_PATH (d)))
|
||||
break;
|
||||
d = GRUB_EFI_NEXT_DEVICE_PATH (d);
|
||||
diff --git a/grub-core/loader/i386/xnu.c b/grub-core/loader/i386/xnu.c
|
||||
index e9e119259..a70093607 100644
|
||||
--- a/grub-core/loader/i386/xnu.c
|
||||
+++ b/grub-core/loader/i386/xnu.c
|
||||
@@ -515,14 +515,15 @@ grub_cmd_devprop_load (grub_command_t cmd __attribute__ ((unused)),
|
||||
|
||||
devhead = buf;
|
||||
buf = devhead + 1;
|
||||
- dpstart = buf;
|
||||
+ dp = dpstart = buf;
|
||||
|
||||
- do
|
||||
+ while (GRUB_EFI_DEVICE_PATH_VALID (dp) && buf < bufend)
|
||||
{
|
||||
- dp = buf;
|
||||
buf = (char *) buf + GRUB_EFI_DEVICE_PATH_LENGTH (dp);
|
||||
+ if (GRUB_EFI_END_ENTIRE_DEVICE_PATH (dp))
|
||||
+ break;
|
||||
+ dp = buf;
|
||||
}
|
||||
- while (!GRUB_EFI_END_ENTIRE_DEVICE_PATH (dp) && buf < bufend);
|
||||
|
||||
dev = grub_xnu_devprop_add_device (dpstart, (char *) buf
|
||||
- (char *) dpstart);
|
||||
diff --git a/include/grub/efi/api.h b/include/grub/efi/api.h
|
||||
index addcbfa8f..cf1355a8c 100644
|
||||
--- a/include/grub/efi/api.h
|
||||
+++ b/include/grub/efi/api.h
|
||||
@@ -625,6 +625,7 @@ typedef struct grub_efi_device_path grub_efi_device_path_protocol_t;
|
||||
#define GRUB_EFI_DEVICE_PATH_TYPE(dp) ((dp)->type & 0x7f)
|
||||
#define GRUB_EFI_DEVICE_PATH_SUBTYPE(dp) ((dp)->subtype)
|
||||
#define GRUB_EFI_DEVICE_PATH_LENGTH(dp) ((dp)->length)
|
||||
+#define GRUB_EFI_DEVICE_PATH_VALID(dp) ((dp) != NULL && GRUB_EFI_DEVICE_PATH_LENGTH (dp) >= 4)
|
||||
|
||||
/* The End of Device Path nodes. */
|
||||
#define GRUB_EFI_END_DEVICE_PATH_TYPE (0xff & 0x7f)
|
||||
@@ -633,13 +634,16 @@ typedef struct grub_efi_device_path grub_efi_device_path_protocol_t;
|
||||
#define GRUB_EFI_END_THIS_DEVICE_PATH_SUBTYPE 0x01
|
||||
|
||||
#define GRUB_EFI_END_ENTIRE_DEVICE_PATH(dp) \
|
||||
- (GRUB_EFI_DEVICE_PATH_TYPE (dp) == GRUB_EFI_END_DEVICE_PATH_TYPE \
|
||||
- && (GRUB_EFI_DEVICE_PATH_SUBTYPE (dp) \
|
||||
- == GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE))
|
||||
+ (!GRUB_EFI_DEVICE_PATH_VALID (dp) || \
|
||||
+ (GRUB_EFI_DEVICE_PATH_TYPE (dp) == GRUB_EFI_END_DEVICE_PATH_TYPE \
|
||||
+ && (GRUB_EFI_DEVICE_PATH_SUBTYPE (dp) \
|
||||
+ == GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE)))
|
||||
|
||||
#define GRUB_EFI_NEXT_DEVICE_PATH(dp) \
|
||||
- ((grub_efi_device_path_t *) ((char *) (dp) \
|
||||
- + GRUB_EFI_DEVICE_PATH_LENGTH (dp)))
|
||||
+ (GRUB_EFI_DEVICE_PATH_VALID (dp) \
|
||||
+ ? ((grub_efi_device_path_t *) \
|
||||
+ ((char *) (dp) + GRUB_EFI_DEVICE_PATH_LENGTH (dp))) \
|
||||
+ : NULL)
|
||||
|
||||
/* Hardware Device Path. */
|
||||
#define GRUB_EFI_HARDWARE_DEVICE_PATH_TYPE 1
|
||||
--
|
||||
2.26.2
|
||||
|
||||
@@ -1,78 +0,0 @@
|
||||
From fb55bc37dd510911df4eaf649da939f5fafdc7ce Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Kiper <daniel.kiper@oracle.com>
|
||||
Date: Wed, 29 Jul 2020 13:38:31 +0200
|
||||
Subject: [PATCH] efi/chainloader: Propagate errors from copy_file_path()
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Without any error propagated to the caller, make_file_path()
|
||||
would then try to advance the invalid device path node with
|
||||
GRUB_EFI_NEXT_DEVICE_PATH(), which would fail, returning a NULL
|
||||
pointer that would subsequently be dereferenced. Hence, propagate
|
||||
errors from copy_file_path().
|
||||
|
||||
Signed-off-by: Chris Coulson <chris.coulson@canonical.com>
|
||||
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
|
||||
Signed-off-by: Stefan Sørensen <stefan.sorensen@spectralink.com>
|
||||
---
|
||||
grub-core/loader/efi/chainloader.c | 19 +++++++++++++------
|
||||
1 file changed, 13 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/grub-core/loader/efi/chainloader.c b/grub-core/loader/efi/chainloader.c
|
||||
index a8d7b9155..7b31c3fb9 100644
|
||||
--- a/grub-core/loader/efi/chainloader.c
|
||||
+++ b/grub-core/loader/efi/chainloader.c
|
||||
@@ -106,7 +106,7 @@ grub_chainloader_boot (void)
|
||||
return grub_errno;
|
||||
}
|
||||
|
||||
-static void
|
||||
+static grub_err_t
|
||||
copy_file_path (grub_efi_file_path_device_path_t *fp,
|
||||
const char *str, grub_efi_uint16_t len)
|
||||
{
|
||||
@@ -118,7 +118,7 @@ copy_file_path (grub_efi_file_path_device_path_t *fp,
|
||||
|
||||
path_name = grub_calloc (len, GRUB_MAX_UTF16_PER_UTF8 * sizeof (*path_name));
|
||||
if (!path_name)
|
||||
- return;
|
||||
+ return grub_error (GRUB_ERR_OUT_OF_MEMORY, "failed to allocate path buffer");
|
||||
|
||||
size = grub_utf8_to_utf16 (path_name, len * GRUB_MAX_UTF16_PER_UTF8,
|
||||
(const grub_uint8_t *) str, len, 0);
|
||||
@@ -131,6 +131,7 @@ copy_file_path (grub_efi_file_path_device_path_t *fp,
|
||||
fp->path_name[size++] = '\0';
|
||||
fp->header.length = size * sizeof (grub_efi_char16_t) + sizeof (*fp);
|
||||
grub_free (path_name);
|
||||
+ return GRUB_ERR_NONE;
|
||||
}
|
||||
|
||||
static grub_efi_device_path_t *
|
||||
@@ -189,13 +190,19 @@ make_file_path (grub_efi_device_path_t *dp, const char *filename)
|
||||
d = (grub_efi_device_path_t *) ((char *) file_path
|
||||
+ ((char *) d - (char *) dp));
|
||||
grub_efi_print_device_path (d);
|
||||
- copy_file_path ((grub_efi_file_path_device_path_t *) d,
|
||||
- dir_start, dir_end - dir_start);
|
||||
+ if (copy_file_path ((grub_efi_file_path_device_path_t *) d,
|
||||
+ dir_start, dir_end - dir_start) != GRUB_ERR_NONE)
|
||||
+ {
|
||||
+ fail:
|
||||
+ grub_free (file_path);
|
||||
+ return 0;
|
||||
+ }
|
||||
|
||||
/* Fill the file path for the file. */
|
||||
d = GRUB_EFI_NEXT_DEVICE_PATH (d);
|
||||
- copy_file_path ((grub_efi_file_path_device_path_t *) d,
|
||||
- dir_end + 1, grub_strlen (dir_end + 1));
|
||||
+ if (copy_file_path ((grub_efi_file_path_device_path_t *) d,
|
||||
+ dir_end + 1, grub_strlen (dir_end + 1)) != GRUB_ERR_NONE)
|
||||
+ goto fail;
|
||||
|
||||
/* Fill the end of device path nodes. */
|
||||
d = GRUB_EFI_NEXT_DEVICE_PATH (d);
|
||||
--
|
||||
2.26.2
|
||||
|
||||
@@ -1,183 +0,0 @@
|
||||
From 8a6d6299efcffd14c1130942195e6c0d9b50cacd Mon Sep 17 00:00:00 2001
|
||||
From: Alexey Makhalov <amakhalov@vmware.com>
|
||||
Date: Mon, 20 Jul 2020 23:03:05 +0000
|
||||
Subject: [PATCH] efi: Fix use-after-free in halt/reboot path
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
commit 92bfc33db984 ("efi: Free malloc regions on exit")
|
||||
introduced memory freeing in grub_efi_fini(), which is
|
||||
used not only by exit path but by halt/reboot one as well.
|
||||
As result of memory freeing, code and data regions used by
|
||||
modules, such as halt, reboot, acpi (used by halt) also got
|
||||
freed. After return to module code, CPU executes, filled
|
||||
by UEFI firmware (tested with edk2), 0xAFAFAFAF pattern as
|
||||
a code. Which leads to #UD exception later.
|
||||
|
||||
grub> halt
|
||||
!!!! X64 Exception Type - 06(#UD - Invalid Opcode) CPU Apic ID - 00000000 !!!!
|
||||
RIP - 0000000003F4EC28, CS - 0000000000000038, RFLAGS - 0000000000200246
|
||||
RAX - 0000000000000000, RCX - 00000000061DA188, RDX - 0A74C0854DC35D41
|
||||
RBX - 0000000003E10E08, RSP - 0000000007F0F860, RBP - 0000000000000000
|
||||
RSI - 00000000064DB768, RDI - 000000000832C5C3
|
||||
R8 - 0000000000000002, R9 - 0000000000000000, R10 - 00000000061E2E52
|
||||
R11 - 0000000000000020, R12 - 0000000003EE5C1F, R13 - 00000000061E0FF4
|
||||
R14 - 0000000003E10D80, R15 - 00000000061E2F60
|
||||
DS - 0000000000000030, ES - 0000000000000030, FS - 0000000000000030
|
||||
GS - 0000000000000030, SS - 0000000000000030
|
||||
CR0 - 0000000080010033, CR2 - 0000000000000000, CR3 - 0000000007C01000
|
||||
CR4 - 0000000000000668, CR8 - 0000000000000000
|
||||
DR0 - 0000000000000000, DR1 - 0000000000000000, DR2 - 0000000000000000
|
||||
DR3 - 0000000000000000, DR6 - 00000000FFFF0FF0, DR7 - 0000000000000400
|
||||
GDTR - 00000000079EEA98 0000000000000047, LDTR - 0000000000000000
|
||||
IDTR - 0000000007598018 0000000000000FFF, TR - 0000000000000000
|
||||
FXSAVE_STATE - 0000000007F0F4C0
|
||||
|
||||
Proposal here is to continue to free allocated memory for
|
||||
exit boot services path but keep it for halt/reboot path
|
||||
as it won't be much security concern here.
|
||||
Introduced GRUB_LOADER_FLAG_EFI_KEEP_ALLOCATED_MEMORY
|
||||
loader flag to be used by efi halt/reboot path.
|
||||
|
||||
Signed-off-by: Alexey Makhalov <amakhalov@vmware.com>
|
||||
Reviewed-by: Darren Kenny <darren.kenny@oracle.com>
|
||||
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
|
||||
Signed-off-by: Stefan Sørensen <stefan.sorensen@spectralink.com>
|
||||
---
|
||||
grub-core/kern/arm/efi/init.c | 3 +++
|
||||
grub-core/kern/arm64/efi/init.c | 3 +++
|
||||
grub-core/kern/efi/efi.c | 3 ++-
|
||||
grub-core/kern/efi/init.c | 1 -
|
||||
grub-core/kern/i386/efi/init.c | 9 +++++++--
|
||||
grub-core/kern/ia64/efi/init.c | 9 +++++++--
|
||||
grub-core/kern/riscv/efi/init.c | 3 +++
|
||||
grub-core/lib/efi/halt.c | 3 ++-
|
||||
include/grub/loader.h | 1 +
|
||||
9 files changed, 28 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/grub-core/kern/arm/efi/init.c b/grub-core/kern/arm/efi/init.c
|
||||
index 06df60e2f..40c3b467f 100644
|
||||
--- a/grub-core/kern/arm/efi/init.c
|
||||
+++ b/grub-core/kern/arm/efi/init.c
|
||||
@@ -71,4 +71,7 @@ grub_machine_fini (int flags)
|
||||
efi_call_1 (b->close_event, tmr_evt);
|
||||
|
||||
grub_efi_fini ();
|
||||
+
|
||||
+ if (!(flags & GRUB_LOADER_FLAG_EFI_KEEP_ALLOCATED_MEMORY))
|
||||
+ grub_efi_memory_fini ();
|
||||
}
|
||||
diff --git a/grub-core/kern/arm64/efi/init.c b/grub-core/kern/arm64/efi/init.c
|
||||
index 6224999ec..5010caefd 100644
|
||||
--- a/grub-core/kern/arm64/efi/init.c
|
||||
+++ b/grub-core/kern/arm64/efi/init.c
|
||||
@@ -57,4 +57,7 @@ grub_machine_fini (int flags)
|
||||
return;
|
||||
|
||||
grub_efi_fini ();
|
||||
+
|
||||
+ if (!(flags & GRUB_LOADER_FLAG_EFI_KEEP_ALLOCATED_MEMORY))
|
||||
+ grub_efi_memory_fini ();
|
||||
}
|
||||
diff --git a/grub-core/kern/efi/efi.c b/grub-core/kern/efi/efi.c
|
||||
index c97969a65..9cfd88d77 100644
|
||||
--- a/grub-core/kern/efi/efi.c
|
||||
+++ b/grub-core/kern/efi/efi.c
|
||||
@@ -157,7 +157,8 @@ grub_efi_get_loaded_image (grub_efi_handle_t image_handle)
|
||||
void
|
||||
grub_reboot (void)
|
||||
{
|
||||
- grub_machine_fini (GRUB_LOADER_FLAG_NORETURN);
|
||||
+ grub_machine_fini (GRUB_LOADER_FLAG_NORETURN |
|
||||
+ GRUB_LOADER_FLAG_EFI_KEEP_ALLOCATED_MEMORY);
|
||||
efi_call_4 (grub_efi_system_table->runtime_services->reset_system,
|
||||
GRUB_EFI_RESET_COLD, GRUB_EFI_SUCCESS, 0, NULL);
|
||||
for (;;) ;
|
||||
diff --git a/grub-core/kern/efi/init.c b/grub-core/kern/efi/init.c
|
||||
index 3dfdf2d22..2c31847bf 100644
|
||||
--- a/grub-core/kern/efi/init.c
|
||||
+++ b/grub-core/kern/efi/init.c
|
||||
@@ -80,5 +80,4 @@ grub_efi_fini (void)
|
||||
{
|
||||
grub_efidisk_fini ();
|
||||
grub_console_fini ();
|
||||
- grub_efi_memory_fini ();
|
||||
}
|
||||
diff --git a/grub-core/kern/i386/efi/init.c b/grub-core/kern/i386/efi/init.c
|
||||
index da499aba0..deb2eacd8 100644
|
||||
--- a/grub-core/kern/i386/efi/init.c
|
||||
+++ b/grub-core/kern/i386/efi/init.c
|
||||
@@ -39,6 +39,11 @@ grub_machine_init (void)
|
||||
void
|
||||
grub_machine_fini (int flags)
|
||||
{
|
||||
- if (flags & GRUB_LOADER_FLAG_NORETURN)
|
||||
- grub_efi_fini ();
|
||||
+ if (!(flags & GRUB_LOADER_FLAG_NORETURN))
|
||||
+ return;
|
||||
+
|
||||
+ grub_efi_fini ();
|
||||
+
|
||||
+ if (!(flags & GRUB_LOADER_FLAG_EFI_KEEP_ALLOCATED_MEMORY))
|
||||
+ grub_efi_memory_fini ();
|
||||
}
|
||||
diff --git a/grub-core/kern/ia64/efi/init.c b/grub-core/kern/ia64/efi/init.c
|
||||
index b5ecbd091..f1965571b 100644
|
||||
--- a/grub-core/kern/ia64/efi/init.c
|
||||
+++ b/grub-core/kern/ia64/efi/init.c
|
||||
@@ -70,6 +70,11 @@ grub_machine_init (void)
|
||||
void
|
||||
grub_machine_fini (int flags)
|
||||
{
|
||||
- if (flags & GRUB_LOADER_FLAG_NORETURN)
|
||||
- grub_efi_fini ();
|
||||
+ if (!(flags & GRUB_LOADER_FLAG_NORETURN))
|
||||
+ return;
|
||||
+
|
||||
+ grub_efi_fini ();
|
||||
+
|
||||
+ if (!(flags & GRUB_LOADER_FLAG_EFI_KEEP_ALLOCATED_MEMORY))
|
||||
+ grub_efi_memory_fini ();
|
||||
}
|
||||
diff --git a/grub-core/kern/riscv/efi/init.c b/grub-core/kern/riscv/efi/init.c
|
||||
index 7eb1969d0..38795fe67 100644
|
||||
--- a/grub-core/kern/riscv/efi/init.c
|
||||
+++ b/grub-core/kern/riscv/efi/init.c
|
||||
@@ -73,4 +73,7 @@ grub_machine_fini (int flags)
|
||||
return;
|
||||
|
||||
grub_efi_fini ();
|
||||
+
|
||||
+ if (!(flags & GRUB_LOADER_FLAG_EFI_KEEP_ALLOCATED_MEMORY))
|
||||
+ grub_efi_memory_fini ();
|
||||
}
|
||||
diff --git a/grub-core/lib/efi/halt.c b/grub-core/lib/efi/halt.c
|
||||
index 5859f0498..29d413641 100644
|
||||
--- a/grub-core/lib/efi/halt.c
|
||||
+++ b/grub-core/lib/efi/halt.c
|
||||
@@ -28,7 +28,8 @@
|
||||
void
|
||||
grub_halt (void)
|
||||
{
|
||||
- grub_machine_fini (GRUB_LOADER_FLAG_NORETURN);
|
||||
+ grub_machine_fini (GRUB_LOADER_FLAG_NORETURN |
|
||||
+ GRUB_LOADER_FLAG_EFI_KEEP_ALLOCATED_MEMORY);
|
||||
#if !defined(__ia64__) && !defined(__arm__) && !defined(__aarch64__) && \
|
||||
!defined(__riscv)
|
||||
grub_acpi_halt ();
|
||||
diff --git a/include/grub/loader.h b/include/grub/loader.h
|
||||
index 7f82a499f..b20864282 100644
|
||||
--- a/include/grub/loader.h
|
||||
+++ b/include/grub/loader.h
|
||||
@@ -33,6 +33,7 @@ enum
|
||||
{
|
||||
GRUB_LOADER_FLAG_NORETURN = 1,
|
||||
GRUB_LOADER_FLAG_PXE_NOT_UNLOAD = 2,
|
||||
+ GRUB_LOADER_FLAG_EFI_KEEP_ALLOCATED_MEMORY = 4,
|
||||
};
|
||||
|
||||
void EXPORT_FUNC (grub_loader_set) (grub_err_t (*boot) (void),
|
||||
--
|
||||
2.26.2
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
From a2a7464e9f10a677d6f91e1c4fa527d084c22e7c Mon Sep 17 00:00:00 2001
|
||||
From: Peter Jones <pjones@redhat.com>
|
||||
Date: Fri, 24 Jul 2020 13:57:27 -0400
|
||||
Subject: [PATCH] loader/linux: Avoid overflow on initrd size calculation
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Signed-off-by: Peter Jones <pjones@redhat.com>
|
||||
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
|
||||
Signed-off-by: Stefan Sørensen <stefan.sorensen@spectralink.com>
|
||||
---
|
||||
grub-core/loader/linux.c | 3 +--
|
||||
1 file changed, 1 insertion(+), 2 deletions(-)
|
||||
|
||||
diff --git a/grub-core/loader/linux.c b/grub-core/loader/linux.c
|
||||
index 471b214d6..4cd8c20c7 100644
|
||||
--- a/grub-core/loader/linux.c
|
||||
+++ b/grub-core/loader/linux.c
|
||||
@@ -151,8 +151,7 @@ grub_initrd_init (int argc, char *argv[],
|
||||
initrd_ctx->nfiles = 0;
|
||||
initrd_ctx->components = 0;
|
||||
|
||||
- initrd_ctx->components = grub_zalloc (argc
|
||||
- * sizeof (initrd_ctx->components[0]));
|
||||
+ initrd_ctx->components = grub_calloc (argc, sizeof (initrd_ctx->components[0]));
|
||||
if (!initrd_ctx->components)
|
||||
return grub_errno;
|
||||
|
||||
--
|
||||
2.26.2
|
||||
|
||||
@@ -1,173 +0,0 @@
|
||||
From 0367e7d1b9bac3a78608a672bf6e4ace6a28b964 Mon Sep 17 00:00:00 2001
|
||||
From: Colin Watson <cjwatson@debian.org>
|
||||
Date: Sat, 25 Jul 2020 12:15:37 +0100
|
||||
Subject: [PATCH] linux: Fix integer overflows in initrd size handling
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
These could be triggered by a crafted filesystem with very large files.
|
||||
|
||||
Fixes: CVE-2020-15707
|
||||
|
||||
Signed-off-by: Colin Watson <cjwatson@debian.org>
|
||||
Reviewed-by: Jan Setje-Eilers <jan.setjeeilers@oracle.com>
|
||||
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
|
||||
Signed-off-by: Stefan Sørensen <stefan.sorensen@spectralink.com>
|
||||
---
|
||||
grub-core/loader/linux.c | 74 +++++++++++++++++++++++++++++-----------
|
||||
1 file changed, 54 insertions(+), 20 deletions(-)
|
||||
|
||||
diff --git a/grub-core/loader/linux.c b/grub-core/loader/linux.c
|
||||
index 4cd8c20c7..3fe390f17 100644
|
||||
--- a/grub-core/loader/linux.c
|
||||
+++ b/grub-core/loader/linux.c
|
||||
@@ -4,6 +4,7 @@
|
||||
#include <grub/misc.h>
|
||||
#include <grub/file.h>
|
||||
#include <grub/mm.h>
|
||||
+#include <grub/safemath.h>
|
||||
|
||||
struct newc_head
|
||||
{
|
||||
@@ -98,13 +99,13 @@ free_dir (struct dir *root)
|
||||
grub_free (root);
|
||||
}
|
||||
|
||||
-static grub_size_t
|
||||
+static grub_err_t
|
||||
insert_dir (const char *name, struct dir **root,
|
||||
- grub_uint8_t *ptr)
|
||||
+ grub_uint8_t *ptr, grub_size_t *size)
|
||||
{
|
||||
struct dir *cur, **head = root;
|
||||
const char *cb, *ce = name;
|
||||
- grub_size_t size = 0;
|
||||
+ *size = 0;
|
||||
while (1)
|
||||
{
|
||||
for (cb = ce; *cb == '/'; cb++);
|
||||
@@ -130,14 +131,22 @@ insert_dir (const char *name, struct dir **root,
|
||||
ptr = make_header (ptr, name, ce - name,
|
||||
040777, 0);
|
||||
}
|
||||
- size += ALIGN_UP ((ce - (char *) name)
|
||||
- + sizeof (struct newc_head), 4);
|
||||
+ if (grub_add (*size,
|
||||
+ ALIGN_UP ((ce - (char *) name)
|
||||
+ + sizeof (struct newc_head), 4),
|
||||
+ size))
|
||||
+ {
|
||||
+ grub_error (GRUB_ERR_OUT_OF_RANGE, N_("overflow is detected"));
|
||||
+ grub_free (n->name);
|
||||
+ grub_free (n);
|
||||
+ return grub_errno;
|
||||
+ }
|
||||
*head = n;
|
||||
cur = n;
|
||||
}
|
||||
root = &cur->next;
|
||||
}
|
||||
- return size;
|
||||
+ return GRUB_ERR_NONE;
|
||||
}
|
||||
|
||||
grub_err_t
|
||||
@@ -172,26 +181,33 @@ grub_initrd_init (int argc, char *argv[],
|
||||
eptr = grub_strchr (ptr, ':');
|
||||
if (eptr)
|
||||
{
|
||||
+ grub_size_t dir_size, name_len;
|
||||
+
|
||||
initrd_ctx->components[i].newc_name = grub_strndup (ptr, eptr - ptr);
|
||||
- if (!initrd_ctx->components[i].newc_name)
|
||||
+ if (!initrd_ctx->components[i].newc_name ||
|
||||
+ insert_dir (initrd_ctx->components[i].newc_name, &root, 0,
|
||||
+ &dir_size))
|
||||
{
|
||||
grub_initrd_close (initrd_ctx);
|
||||
return grub_errno;
|
||||
}
|
||||
- initrd_ctx->size
|
||||
- += ALIGN_UP (sizeof (struct newc_head)
|
||||
- + grub_strlen (initrd_ctx->components[i].newc_name),
|
||||
- 4);
|
||||
- initrd_ctx->size += insert_dir (initrd_ctx->components[i].newc_name,
|
||||
- &root, 0);
|
||||
+ name_len = grub_strlen (initrd_ctx->components[i].newc_name);
|
||||
+ if (grub_add (initrd_ctx->size,
|
||||
+ ALIGN_UP (sizeof (struct newc_head) + name_len, 4),
|
||||
+ &initrd_ctx->size) ||
|
||||
+ grub_add (initrd_ctx->size, dir_size, &initrd_ctx->size))
|
||||
+ goto overflow;
|
||||
newc = 1;
|
||||
fname = eptr + 1;
|
||||
}
|
||||
}
|
||||
else if (newc)
|
||||
{
|
||||
- initrd_ctx->size += ALIGN_UP (sizeof (struct newc_head)
|
||||
- + sizeof ("TRAILER!!!") - 1, 4);
|
||||
+ if (grub_add (initrd_ctx->size,
|
||||
+ ALIGN_UP (sizeof (struct newc_head)
|
||||
+ + sizeof ("TRAILER!!!") - 1, 4),
|
||||
+ &initrd_ctx->size))
|
||||
+ goto overflow;
|
||||
free_dir (root);
|
||||
root = 0;
|
||||
newc = 0;
|
||||
@@ -207,19 +223,29 @@ grub_initrd_init (int argc, char *argv[],
|
||||
initrd_ctx->nfiles++;
|
||||
initrd_ctx->components[i].size
|
||||
= grub_file_size (initrd_ctx->components[i].file);
|
||||
- initrd_ctx->size += initrd_ctx->components[i].size;
|
||||
+ if (grub_add (initrd_ctx->size, initrd_ctx->components[i].size,
|
||||
+ &initrd_ctx->size))
|
||||
+ goto overflow;
|
||||
}
|
||||
|
||||
if (newc)
|
||||
{
|
||||
initrd_ctx->size = ALIGN_UP (initrd_ctx->size, 4);
|
||||
- initrd_ctx->size += ALIGN_UP (sizeof (struct newc_head)
|
||||
- + sizeof ("TRAILER!!!") - 1, 4);
|
||||
+ if (grub_add (initrd_ctx->size,
|
||||
+ ALIGN_UP (sizeof (struct newc_head)
|
||||
+ + sizeof ("TRAILER!!!") - 1, 4),
|
||||
+ &initrd_ctx->size))
|
||||
+ goto overflow;
|
||||
free_dir (root);
|
||||
root = 0;
|
||||
}
|
||||
|
||||
return GRUB_ERR_NONE;
|
||||
+
|
||||
+ overflow:
|
||||
+ free_dir (root);
|
||||
+ grub_initrd_close (initrd_ctx);
|
||||
+ return grub_error (GRUB_ERR_OUT_OF_RANGE, N_("overflow is detected"));
|
||||
}
|
||||
|
||||
grub_size_t
|
||||
@@ -260,8 +286,16 @@ grub_initrd_load (struct grub_linux_initrd_context *initrd_ctx,
|
||||
|
||||
if (initrd_ctx->components[i].newc_name)
|
||||
{
|
||||
- ptr += insert_dir (initrd_ctx->components[i].newc_name,
|
||||
- &root, ptr);
|
||||
+ grub_size_t dir_size;
|
||||
+
|
||||
+ if (insert_dir (initrd_ctx->components[i].newc_name, &root, ptr,
|
||||
+ &dir_size))
|
||||
+ {
|
||||
+ free_dir (root);
|
||||
+ grub_initrd_close (initrd_ctx);
|
||||
+ return grub_errno;
|
||||
+ }
|
||||
+ ptr += dir_size;
|
||||
ptr = make_header (ptr, initrd_ctx->components[i].newc_name,
|
||||
grub_strlen (initrd_ctx->components[i].newc_name),
|
||||
0100777,
|
||||
--
|
||||
2.26.2
|
||||
|
||||
@@ -21,17 +21,6 @@ endef
|
||||
GRUB2_POST_PATCH_HOOKS += GRUB2_AVOID_AUTORECONF
|
||||
HOST_GRUB2_POST_PATCH_HOOKS += GRUB2_AVOID_AUTORECONF
|
||||
|
||||
# 0002-yylex-Make-lexer-fatal-errors-actually-be-fatal.patch
|
||||
GRUB2_IGNORE_CVES += CVE-2020-10713
|
||||
# 0005-calloc-Use-calloc-at-most-places.patch
|
||||
GRUB2_IGNORE_CVES += CVE-2020-14308
|
||||
# 0006-malloc-Use-overflow-checking-primitives-where-we-do-.patch
|
||||
GRUB2_IGNORE_CVES += CVE-2020-14309 CVE-2020-14310 CVE-2020-14311
|
||||
# 0019-script-Avoid-a-use-after-free-when-redefining-a-func.patch
|
||||
GRUB2_IGNORE_CVES += CVE-2020-15706
|
||||
# 0028-linux-Fix-integer-overflows-in-initrd-size-handling.patch
|
||||
GRUB2_IGNORE_CVES += CVE-2020-15707
|
||||
|
||||
ifeq ($(BR2_TARGET_GRUB2_INSTALL_TOOLS),y)
|
||||
GRUB2_INSTALL_TARGET = YES
|
||||
else
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
# locally computed
|
||||
sha256 17e048ac765e92e15f7436b604452614cf88dc2bcbbaab18cdc024f3fdd4c575 opensbi-0.8.tar.gz
|
||||
sha256 82d13fb1bf6bb162629deeea9eb9c117e74548d3b707e478967691fe79a68e21 COPYING.BSD
|
||||
sha256 46a93afd5465eba094ddba40015e754bf09f9e80e0702c00013d6bdb3ecd0a72 opensbi-0.6.tar.gz
|
||||
sha256 82d13fb1bf6bb162629deeea9eb9c117e74548d3b707e478967691fe79a68e21 COPYING.BSD
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#
|
||||
################################################################################
|
||||
|
||||
OPENSBI_VERSION = 0.8
|
||||
OPENSBI_VERSION = 0.6
|
||||
OPENSBI_SITE = $(call github,riscv,opensbi,v$(OPENSBI_VERSION))
|
||||
OPENSBI_LICENSE = BSD-2-Clause
|
||||
OPENSBI_LICENSE_FILES = COPYING.BSD
|
||||
|
||||
@@ -1,34 +0,0 @@
|
||||
From 04a8def18caccad27292ba97dc8ea8b3eb3a6afd Mon Sep 17 00:00:00 2001
|
||||
From: Etienne Carriere <etienne.carriere@linaro.org>
|
||||
Date: Tue, 26 May 2020 11:10:45 +0200
|
||||
Subject: [PATCH] scripts/pem_to_pub.py: use Cryptodome module instead of
|
||||
Crypto
|
||||
|
||||
Upgrade scripts/pem_to_pub.py to use module Cryptodome instead of
|
||||
module Crypto for consistency with the other helper Python scripts
|
||||
of OP-TEE OS package.
|
||||
|
||||
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
|
||||
Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
|
||||
---
|
||||
scripts/pem_to_pub_c.py | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/scripts/pem_to_pub_c.py b/scripts/pem_to_pub_c.py
|
||||
index 3a896a393..d3f0e5006 100755
|
||||
--- a/scripts/pem_to_pub_c.py
|
||||
+++ b/scripts/pem_to_pub_c.py
|
||||
@@ -21,8 +21,8 @@ def get_args():
|
||||
|
||||
def main():
|
||||
import array
|
||||
- from Crypto.PublicKey import RSA
|
||||
- from Crypto.Util.number import long_to_bytes
|
||||
+ from Cryptodome.PublicKey import RSA
|
||||
+ from Cryptodome.Util.number import long_to_bytes
|
||||
|
||||
args = get_args()
|
||||
|
||||
--
|
||||
2.17.1
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
From 06e71feaeb08349abe56b50c3dfb08a8341cf55f Mon Sep 17 00:00:00 2001
|
||||
From: Romain Naour <romain.naour@gmail.com>
|
||||
Date: Sun, 26 Apr 2020 21:55:55 +0200
|
||||
Subject: [PATCH] scripts/pem_to_pub_c.py/sign.py: use pycryptodomex
|
||||
|
||||
These scripts still use pycrypto.
|
||||
|
||||
From [1]:
|
||||
"PyCryptodome is a fork of PyCrypto, which is not maintained any more
|
||||
(the last release dates back to 2013 [2]). It exposes almost the same
|
||||
API, but there are a few incompatibilities [3]."
|
||||
|
||||
Don't use upstream commit since it also switches from the algorithm
|
||||
TEE_ALG_RSASSA_PKCS1_V1_5_SHA256 to TEE_ALG_RSASSA_PKCS1_PSS_MGF1_SHA256
|
||||
when replacing pycrypto to pycryptodomex [4].
|
||||
|
||||
[1] https://github.com/OP-TEE/optee_os/commit/90ad2450436fdd9fc0d28a3f92f3fbcfd89a38f0
|
||||
[2] https://pypi.org/project/pycrypto/#history
|
||||
[3] https://pycryptodome.readthedocs.io/en/latest/src/vs_pycrypto.html
|
||||
[4] https://github.com/OP-TEE/optee_os/commit/ababd72d2fd76cb2ded8e202b49db28d6545f6eb
|
||||
|
||||
Signed-off-by: Romain Naour <romain.naour@gmail.com>
|
||||
---
|
||||
scripts/pem_to_pub_c.py | 4 ++--
|
||||
scripts/sign.py | 8 ++++----
|
||||
2 files changed, 6 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/scripts/pem_to_pub_c.py b/scripts/pem_to_pub_c.py
|
||||
index 3a896a39..d3f0e500 100755
|
||||
--- a/scripts/pem_to_pub_c.py
|
||||
+++ b/scripts/pem_to_pub_c.py
|
||||
@@ -21,8 +21,8 @@ def get_args():
|
||||
|
||||
def main():
|
||||
import array
|
||||
- from Crypto.PublicKey import RSA
|
||||
- from Crypto.Util.number import long_to_bytes
|
||||
+ from Cryptodome.PublicKey import RSA
|
||||
+ from Cryptodome.Util.number import long_to_bytes
|
||||
|
||||
args = get_args()
|
||||
|
||||
diff --git a/scripts/sign.py b/scripts/sign.py
|
||||
index 2939c591..80ce2e9f 100755
|
||||
--- a/scripts/sign.py
|
||||
+++ b/scripts/sign.py
|
||||
@@ -121,10 +121,10 @@ def get_args(logger):
|
||||
|
||||
|
||||
def main():
|
||||
- from Crypto.Signature import PKCS1_v1_5
|
||||
- from Crypto.Hash import SHA256
|
||||
- from Crypto.PublicKey import RSA
|
||||
- from Crypto.Util.number import ceil_div
|
||||
+ from Cryptodome.Signature import PKCS1_v1_5
|
||||
+ from Cryptodome.Hash import SHA256
|
||||
+ from Cryptodome.PublicKey import RSA
|
||||
+ from Cryptodome.Util.number import ceil_div
|
||||
import base64
|
||||
import logging
|
||||
import os
|
||||
--
|
||||
2.25.3
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
From c5f5e6bf6644a536a0d53bfb9f5c5419150035dd Mon Sep 17 00:00:00 2001
|
||||
From: Jens Wiklander <jens.wiklander@linaro.org>
|
||||
Date: Mon, 25 May 2020 12:20:08 +0200
|
||||
Subject: [PATCH] config.mk: fix CFG_OPTEE_REVISION_MINOR
|
||||
|
||||
The current release is 3.9.0, change the revision to match.
|
||||
|
||||
Fixes: af141c61fe7a ("Update CHANGELOG for 3.9.0")
|
||||
Reviewed-by: Joakim Bech <joakim.bech@linaro.org>
|
||||
Reported-by: Etienne Carriere <etienne.carriere@linaro.org>
|
||||
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
|
||||
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
|
||||
---
|
||||
mk/config.mk | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/mk/config.mk b/mk/config.mk
|
||||
index c00a14618..bc49f83d8 100644
|
||||
--- a/mk/config.mk
|
||||
+++ b/mk/config.mk
|
||||
@@ -116,7 +116,7 @@ endif
|
||||
# with limited depth not including any tag, so there is really no guarantee
|
||||
# that TEE_IMPL_VERSION contains the major and minor revision numbers.
|
||||
CFG_OPTEE_REVISION_MAJOR ?= 3
|
||||
-CFG_OPTEE_REVISION_MINOR ?= 8
|
||||
+CFG_OPTEE_REVISION_MINOR ?= 9
|
||||
|
||||
# Trusted OS implementation manufacturer name
|
||||
CFG_TEE_MANUFACTURER ?= LINARO
|
||||
--
|
||||
2.17.1
|
||||
|
||||
@@ -1,249 +0,0 @@
|
||||
From 49c7d2557d92993a1e09e50c961b9d4f7ab1091b Mon Sep 17 00:00:00 2001
|
||||
From: Dick Olsson <hi@senzilla.io>
|
||||
Date: Wed, 22 Jul 2020 08:49:12 +0200
|
||||
Subject: [PATCH] mk: core: ta: Configurable Python interpreter
|
||||
|
||||
Build systems that manage multiple different python interpreters need
|
||||
explicit control over which version of the interpreter to use.
|
||||
This patch enables one to override the default interpreter with the path
|
||||
to a specific one.
|
||||
|
||||
Signed-off-by: Dick Olsson <hi@senzilla.io>
|
||||
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
|
||||
Reviewed-by: Jerome Forissier <jerome@forissier.org>
|
||||
---
|
||||
core/arch/arm/arm.mk | 2 ++
|
||||
core/arch/arm/kernel/link.mk | 22 +++++++++++-----------
|
||||
core/sub.mk | 10 +++++-----
|
||||
mk/config.mk | 6 ++++++
|
||||
mk/lib.mk | 2 +-
|
||||
ta/arch/arm/link.mk | 2 +-
|
||||
ta/arch/arm/link_shlib.mk | 2 +-
|
||||
ta/ta.mk | 2 +-
|
||||
8 files changed, 28 insertions(+), 20 deletions(-)
|
||||
|
||||
diff --git a/core/arch/arm/arm.mk b/core/arch/arm/arm.mk
|
||||
index 5c9f16ef..878035c5 100644
|
||||
--- a/core/arch/arm/arm.mk
|
||||
+++ b/core/arch/arm/arm.mk
|
||||
@@ -245,6 +245,7 @@ ta-mk-file-export-add-ta_arm32 += CROSS_COMPILE32 ?= $$(CROSS_COMPILE)_nl_
|
||||
ta-mk-file-export-add-ta_arm32 += CROSS_COMPILE_ta_arm32 ?= $$(CROSS_COMPILE32)_nl_
|
||||
ta-mk-file-export-add-ta_arm32 += COMPILER ?= gcc_nl_
|
||||
ta-mk-file-export-add-ta_arm32 += COMPILER_ta_arm32 ?= $$(COMPILER)_nl_
|
||||
+ta-mk-file-export-add-ta_arm32 += PYTHON3 ?= python3_nl_
|
||||
endif
|
||||
|
||||
ifneq ($(filter ta_arm64,$(ta-targets)),)
|
||||
@@ -275,6 +276,7 @@ ta-mk-file-export-add-ta_arm64 += CROSS_COMPILE64 ?= $$(CROSS_COMPILE)_nl_
|
||||
ta-mk-file-export-add-ta_arm64 += CROSS_COMPILE_ta_arm64 ?= $$(CROSS_COMPILE64)_nl_
|
||||
ta-mk-file-export-add-ta_arm64 += COMPILER ?= gcc_nl_
|
||||
ta-mk-file-export-add-ta_arm64 += COMPILER_ta_arm64 ?= $$(COMPILER)_nl_
|
||||
+ta-mk-file-export-add-ta_arm64 += PYTHON3 ?= python3_nl_
|
||||
endif
|
||||
|
||||
# Set cross compiler prefix for each TA target
|
||||
diff --git a/core/arch/arm/kernel/link.mk b/core/arch/arm/kernel/link.mk
|
||||
index 1b89b895..69375ad6 100644
|
||||
--- a/core/arch/arm/kernel/link.mk
|
||||
+++ b/core/arch/arm/kernel/link.mk
|
||||
@@ -62,13 +62,13 @@ cleanfiles += $(link-out-dir)/text_unpaged.ld.S
|
||||
$(link-out-dir)/text_unpaged.ld.S: $(link-out-dir)/unpaged.o
|
||||
@$(cmd-echo-silent) ' GEN $@'
|
||||
$(q)$(READELFcore) -S -W $< | \
|
||||
- ./scripts/gen_ld_sects.py .text. > $@
|
||||
+ $(PYTHON3) ./scripts/gen_ld_sects.py .text. > $@
|
||||
|
||||
cleanfiles += $(link-out-dir)/rodata_unpaged.ld.S
|
||||
$(link-out-dir)/rodata_unpaged.ld.S: $(link-out-dir)/unpaged.o
|
||||
@$(cmd-echo-silent) ' GEN $@'
|
||||
$(q)$(READELFcore) -S -W $< | \
|
||||
- ./scripts/gen_ld_sects.py .rodata. > $@
|
||||
+ $(PYTHON3) ./scripts/gen_ld_sects.py .rodata. > $@
|
||||
|
||||
|
||||
cleanfiles += $(link-out-dir)/init_entries.txt
|
||||
@@ -92,12 +92,12 @@ cleanfiles += $(link-out-dir)/text_init.ld.S
|
||||
$(link-out-dir)/text_init.ld.S: $(link-out-dir)/init.o
|
||||
@$(cmd-echo-silent) ' GEN $@'
|
||||
$(q)$(READELFcore) -S -W $< | \
|
||||
- ./scripts/gen_ld_sects.py .text. > $@
|
||||
+ $(PYTHON3) ./scripts/gen_ld_sects.py .text. > $@
|
||||
|
||||
cleanfiles += $(link-out-dir)/rodata_init.ld.S
|
||||
$(link-out-dir)/rodata_init.ld.S: $(link-out-dir)/init.o
|
||||
@$(cmd-echo-silent) ' GEN $@'
|
||||
- $(q)$(READELFcore) -S -W $< | ./scripts/gen_ld_sects.py .rodata. > $@
|
||||
+ $(q)$(READELFcore) -S -W $< | $(PYTHON3) ./scripts/gen_ld_sects.py .rodata. > $@
|
||||
|
||||
-include $(link-script-dep)
|
||||
|
||||
@@ -176,39 +176,39 @@ cleanfiles += $(link-out-dir)/tee-pager.bin
|
||||
$(link-out-dir)/tee-pager.bin: $(link-out-dir)/tee.elf scripts/gen_tee_bin.py
|
||||
@echo Warning: $@ is deprecated
|
||||
@$(cmd-echo-silent) ' GEN $@'
|
||||
- $(q)scripts/gen_tee_bin.py --input $< --out_tee_pager_bin $@
|
||||
+ $(q)$(PYTHON3) scripts/gen_tee_bin.py --input $< --out_tee_pager_bin $@
|
||||
|
||||
cleanfiles += $(link-out-dir)/tee-pageable.bin
|
||||
$(link-out-dir)/tee-pageable.bin: $(link-out-dir)/tee.elf scripts/gen_tee_bin.py
|
||||
@echo Warning: $@ is deprecated
|
||||
@$(cmd-echo-silent) ' GEN $@'
|
||||
- $(q)scripts/gen_tee_bin.py --input $< --out_tee_pageable_bin $@
|
||||
+ $(q)$(PYTHON3) scripts/gen_tee_bin.py --input $< --out_tee_pageable_bin $@
|
||||
|
||||
all: $(link-out-dir)/tee.bin
|
||||
cleanfiles += $(link-out-dir)/tee.bin
|
||||
$(link-out-dir)/tee.bin: $(link-out-dir)/tee.elf scripts/gen_tee_bin.py
|
||||
@$(cmd-echo-silent) ' GEN $@'
|
||||
- $(q)scripts/gen_tee_bin.py --input $< --out_tee_bin $@
|
||||
+ $(q)$(PYTHON3) scripts/gen_tee_bin.py --input $< --out_tee_bin $@
|
||||
|
||||
all: $(link-out-dir)/tee-header_v2.bin
|
||||
cleanfiles += $(link-out-dir)/tee-header_v2.bin
|
||||
$(link-out-dir)/tee-header_v2.bin: $(link-out-dir)/tee.elf \
|
||||
scripts/gen_tee_bin.py
|
||||
@$(cmd-echo-silent) ' GEN $@'
|
||||
- $(q)scripts/gen_tee_bin.py --input $< --out_header_v2 $@
|
||||
+ $(q)$(PYTHON3) scripts/gen_tee_bin.py --input $< --out_header_v2 $@
|
||||
|
||||
all: $(link-out-dir)/tee-pager_v2.bin
|
||||
cleanfiles += $(link-out-dir)/tee-pager_v2.bin
|
||||
$(link-out-dir)/tee-pager_v2.bin: $(link-out-dir)/tee.elf scripts/gen_tee_bin.py
|
||||
@$(cmd-echo-silent) ' GEN $@'
|
||||
- $(q)scripts/gen_tee_bin.py --input $< --out_pager_v2 $@
|
||||
+ $(q)$(PYTHON3) scripts/gen_tee_bin.py --input $< --out_pager_v2 $@
|
||||
|
||||
all: $(link-out-dir)/tee-pageable_v2.bin
|
||||
cleanfiles += $(link-out-dir)/tee-pageable_v2.bin
|
||||
$(link-out-dir)/tee-pageable_v2.bin: $(link-out-dir)/tee.elf \
|
||||
scripts/gen_tee_bin.py
|
||||
@$(cmd-echo-silent) ' GEN $@'
|
||||
- $(q)scripts/gen_tee_bin.py --input $< --out_pageable_v2 $@
|
||||
+ $(q)$(PYTHON3) scripts/gen_tee_bin.py --input $< --out_pageable_v2 $@
|
||||
|
||||
all: $(link-out-dir)/tee.symb_sizes
|
||||
cleanfiles += $(link-out-dir)/tee.symb_sizes
|
||||
@@ -222,5 +222,5 @@ mem_usage: $(link-out-dir)/tee.mem_usage
|
||||
|
||||
$(link-out-dir)/tee.mem_usage: $(link-out-dir)/tee.elf
|
||||
@$(cmd-echo-silent) ' GEN $@'
|
||||
- $(q)./scripts/mem_usage.py $< > $@
|
||||
+ $(q)$(PYTHON3) ./scripts/mem_usage.py $< > $@
|
||||
endif
|
||||
diff --git a/core/sub.mk b/core/sub.mk
|
||||
index 03cc6bc7..0959c9a9 100644
|
||||
--- a/core/sub.mk
|
||||
+++ b/core/sub.mk
|
||||
@@ -9,13 +9,13 @@ ifeq ($(CFG_WITH_USER_TA),y)
|
||||
gensrcs-y += ta_pub_key
|
||||
produce-ta_pub_key = ta_pub_key.c
|
||||
depends-ta_pub_key = $(TA_SIGN_KEY) scripts/pem_to_pub_c.py
|
||||
-recipe-ta_pub_key = scripts/pem_to_pub_c.py --prefix ta_pub_key \
|
||||
+recipe-ta_pub_key = $(PYTHON3) scripts/pem_to_pub_c.py --prefix ta_pub_key \
|
||||
--key $(TA_SIGN_KEY) --out $(sub-dir-out)/ta_pub_key.c
|
||||
|
||||
gensrcs-y += ldelf
|
||||
produce-ldelf = ldelf_hex.c
|
||||
depends-ldelf = scripts/gen_ldelf_hex.py $(out-dir)/ldelf/ldelf.elf
|
||||
-recipe-ldelf = scripts/gen_ldelf_hex.py --input $(out-dir)/ldelf/ldelf.elf \
|
||||
+recipe-ldelf = $(PYTHON3) scripts/gen_ldelf_hex.py --input $(out-dir)/ldelf/ldelf.elf \
|
||||
--output $(sub-dir-out)/ldelf_hex.c
|
||||
endif
|
||||
|
||||
@@ -25,7 +25,7 @@ early-ta-$1-uuid := $(firstword $(subst ., ,$(notdir $1)))
|
||||
gensrcs-y += early-ta-$1
|
||||
produce-early-ta-$1 = early_ta_$$(early-ta-$1-uuid).c
|
||||
depends-early-ta-$1 = $1 scripts/ta_bin_to_c.py
|
||||
-recipe-early-ta-$1 = scripts/ta_bin_to_c.py --compress --ta $1 \
|
||||
+recipe-early-ta-$1 = $(PYTHON3) scripts/ta_bin_to_c.py --compress --ta $1 \
|
||||
--out $(sub-dir-out)/early_ta_$$(early-ta-$1-uuid).c
|
||||
endef
|
||||
$(foreach f, $(EARLY_TA_PATHS), $(eval $(call process_early_ta,$(f))))
|
||||
@@ -40,7 +40,7 @@ core-embed-fdt-c = $(out-dir)/$(arch-dir)/dts/$(CFG_EMBED_DTB_SOURCE_FILE:.dts=.
|
||||
gensrcs-y += embedded_secure_dtb
|
||||
produce-embedded_secure_dtb = arch/$(ARCH)/dts/$(CFG_EMBED_DTB_SOURCE_FILE:.dts=.c)
|
||||
depends-embedded_secure_dtb = $(core-embed-fdt-dtb) scripts/bin_to_c.py
|
||||
-recipe-embedded_secure_dtb = scripts/bin_to_c.py \
|
||||
+recipe-embedded_secure_dtb = $(PYTHON3) scripts/bin_to_c.py \
|
||||
--bin $(core-embed-fdt-dtb) \
|
||||
--vname embedded_secure_dtb \
|
||||
--out $(core-embed-fdt-c)
|
||||
@@ -58,7 +58,7 @@ $(conf-mk-xz-base64): $(conf-mk-file)
|
||||
gensrcs-y += conf_str
|
||||
produce-conf_str = conf.mk.xz.base64.c
|
||||
depends-conf_str = $(conf-mk-xz-base64)
|
||||
-recipe-conf_str = scripts/bin_to_c.py --text --bin $(conf-mk-xz-base64) \
|
||||
+recipe-conf_str = $(PYTHON3) scripts/bin_to_c.py --text --bin $(conf-mk-xz-base64) \
|
||||
--out $(sub-dir-out)/conf.mk.xz.base64.c \
|
||||
--vname conf_str
|
||||
endif
|
||||
diff --git a/mk/config.mk b/mk/config.mk
|
||||
index 70732c4d..1fe65576 100644
|
||||
--- a/mk/config.mk
|
||||
+++ b/mk/config.mk
|
||||
@@ -32,6 +32,12 @@ endif
|
||||
# Supported values: undefined, 1, 2 and 3. 3 gives more warnings.
|
||||
WARNS ?= 3
|
||||
|
||||
+# Path to the Python interpreter used by the build system.
|
||||
+# This variable is set to the default python3 interpreter in the user's
|
||||
+# path. But build environments that require more explicit control can
|
||||
+# set the path to a specific interpreter through this variable.
|
||||
+PYTHON3 ?= python3
|
||||
+
|
||||
# Define DEBUG=1 to compile without optimization (forces -O0)
|
||||
# DEBUG=1
|
||||
|
||||
diff --git a/mk/lib.mk b/mk/lib.mk
|
||||
index 6e890893..3bd422d6 100644
|
||||
--- a/mk/lib.mk
|
||||
+++ b/mk/lib.mk
|
||||
@@ -72,7 +72,7 @@ $(lib-shlibstrippedfile): $(lib-shlibfile)
|
||||
|
||||
$(lib-shlibtafile): $(lib-shlibstrippedfile) $(TA_SIGN_KEY)
|
||||
@$(cmd-echo-silent) ' SIGN $$@'
|
||||
- $$(q)$$(SIGN) --key $(TA_SIGN_KEY) --uuid $(libuuid) --in $$< --out $$@
|
||||
+ $$(q)$$(PYTHON3) $$(SIGN) --key $(TA_SIGN_KEY) --uuid $(libuuid) --in $$< --out $$@
|
||||
|
||||
$(lib-libuuidln): $(lib-shlibfile)
|
||||
@$(cmd-echo-silent) ' LN $$@'
|
||||
diff --git a/ta/arch/arm/link.mk b/ta/arch/arm/link.mk
|
||||
index db7d0b9a..b95c0cba 100644
|
||||
--- a/ta/arch/arm/link.mk
|
||||
+++ b/ta/arch/arm/link.mk
|
||||
@@ -2,7 +2,7 @@ link-script$(sm) = $(ta-dev-kit-dir$(sm))/src/ta.ld.S
|
||||
link-script-pp$(sm) = $(link-out-dir$(sm))/ta.lds
|
||||
link-script-dep$(sm) = $(link-out-dir$(sm))/.ta.ld.d
|
||||
|
||||
-SIGN_ENC ?= $(ta-dev-kit-dir$(sm))/scripts/sign_encrypt.py
|
||||
+SIGN_ENC ?= $(PYTHON3) $(ta-dev-kit-dir$(sm))/scripts/sign_encrypt.py
|
||||
TA_SIGN_KEY ?= $(ta-dev-kit-dir$(sm))/keys/default_ta.pem
|
||||
|
||||
ifeq ($(CFG_ENCRYPT_TA),y)
|
||||
diff --git a/ta/arch/arm/link_shlib.mk b/ta/arch/arm/link_shlib.mk
|
||||
index ed81e59a..cc177ef0 100644
|
||||
--- a/ta/arch/arm/link_shlib.mk
|
||||
+++ b/ta/arch/arm/link_shlib.mk
|
||||
@@ -47,5 +47,5 @@ $(link-out-dir)/$(shlibuuid).elf: $(link-out-dir)/$(shlibname).so
|
||||
$(link-out-dir)/$(shlibuuid).ta: $(link-out-dir)/$(shlibname).stripped.so \
|
||||
$(TA_SIGN_KEY)
|
||||
@$(cmd-echo-silent) ' SIGN $@'
|
||||
- $(q)$(SIGN) --key $(TA_SIGN_KEY) --uuid $(shlibuuid) \
|
||||
+ $(q)$(PYTHON3) $(SIGN) --key $(TA_SIGN_KEY) --uuid $(shlibuuid) \
|
||||
--in $< --out $@
|
||||
diff --git a/ta/ta.mk b/ta/ta.mk
|
||||
index 918880f4..59ed87f7 100644
|
||||
--- a/ta/ta.mk
|
||||
+++ b/ta/ta.mk
|
||||
@@ -67,7 +67,7 @@ $$(arm32-user-sysregs-out)/$$(arm32-user-sysregs-$(1)-h): \
|
||||
$(1) scripts/arm32_sysreg.py
|
||||
@$(cmd-echo-silent) ' GEN $$@'
|
||||
$(q)mkdir -p $$(dir $$@)
|
||||
- $(q)scripts/arm32_sysreg.py --guard __$$(arm32-user-sysregs-$(1)-h) \
|
||||
+ $(q)$(PYTHON3) scripts/arm32_sysreg.py --guard __$$(arm32-user-sysregs-$(1)-h) \
|
||||
< $$< > $$@
|
||||
|
||||
endef #process-arm32-user-sysreg
|
||||
--
|
||||
2.20.1
|
||||
|
||||
@@ -18,7 +18,7 @@ choice
|
||||
Select the version of OP-TEE OS you want to use
|
||||
|
||||
config BR2_TARGET_OPTEE_OS_LATEST
|
||||
bool "3.9.0"
|
||||
bool "3.7.0"
|
||||
help
|
||||
Use the latest release tag from the OP-TEE OS official Git
|
||||
repository.
|
||||
@@ -50,7 +50,7 @@ endif
|
||||
|
||||
config BR2_TARGET_OPTEE_OS_VERSION
|
||||
string
|
||||
default "3.9.0" if BR2_TARGET_OPTEE_OS_LATEST
|
||||
default "3.7.0" if BR2_TARGET_OPTEE_OS_LATEST
|
||||
default BR2_TARGET_OPTEE_OS_CUSTOM_REPO_VERSION \
|
||||
if BR2_TARGET_OPTEE_OS_CUSTOM_GIT
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# From https://github.com/OP-TEE/optee_os/archive/3.9.0.tar.gz
|
||||
sha256 ac6f145ebde715d4d7a1d5277f4e08a06b660e1c0237c926a274d86cd90ef4c5 optee-os-3.9.0.tar.gz
|
||||
# From https://github.com/OP-TEE/optee_os/archive/3.7.0.tar.gz
|
||||
sha256 ff378f22b8e7dacf933a2d34eb5c1bdcafe74bdda692e4dbc2969301f6a81d43 optee-os-3.7.0.tar.gz
|
||||
# Locally computed
|
||||
sha256 1247ee90858f4037b6cac63cbffddfed435d0d73c631b37d78c1e6e6ab3e5d1a LICENSE
|
||||
|
||||
@@ -21,7 +21,7 @@ else
|
||||
OPTEE_OS_SITE = $(call github,OP-TEE,optee_os,$(OPTEE_OS_VERSION))
|
||||
endif
|
||||
|
||||
OPTEE_OS_DEPENDENCIES = host-openssl host-python3 host-python3-pycryptodomex host-python3-pyelftools
|
||||
OPTEE_OS_DEPENDENCIES = host-openssl host-python-pycryptodomex host-python-pyelftools
|
||||
|
||||
# On 64bit targets, OP-TEE OS can be built in 32bit mode, or
|
||||
# can be built in 64bit mode and support 32bit and 64bit
|
||||
@@ -32,8 +32,7 @@ OPTEE_OS_MAKE_OPTS = \
|
||||
CROSS_COMPILE="$(TARGET_CROSS)" \
|
||||
CROSS_COMPILE_core="$(TARGET_CROSS)" \
|
||||
CROSS_COMPILE_ta_arm64="$(TARGET_CROSS)" \
|
||||
CROSS_COMPILE_ta_arm32="$(TARGET_CROSS)" \
|
||||
PYTHON3="$(HOST_DIR)/bin/python3"
|
||||
CROSS_COMPILE_ta_arm32="$(TARGET_CROSS)"
|
||||
|
||||
ifeq ($(BR2_aarch64),y)
|
||||
OPTEE_OS_MAKE_OPTS += \
|
||||
|
||||
@@ -41,7 +41,7 @@ choice
|
||||
Select the specific U-Boot version you want to use
|
||||
|
||||
config BR2_TARGET_UBOOT_LATEST_VERSION
|
||||
bool "2020.07"
|
||||
bool "2020.04"
|
||||
|
||||
config BR2_TARGET_UBOOT_CUSTOM_VERSION
|
||||
bool "Custom version"
|
||||
@@ -74,9 +74,13 @@ if BR2_TARGET_UBOOT_CUSTOM_GIT || BR2_TARGET_UBOOT_CUSTOM_HG || BR2_TARGET_UBOOT
|
||||
|
||||
config BR2_TARGET_UBOOT_CUSTOM_REPO_URL
|
||||
string "URL of custom repository"
|
||||
default BR2_TARGET_UBOOT_CUSTOM_GIT_REPO_URL \
|
||||
if BR2_TARGET_UBOOT_CUSTOM_GIT_REPO_URL != "" # legacy
|
||||
|
||||
config BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION
|
||||
string "Custom repository version"
|
||||
default BR2_TARGET_UBOOT_CUSTOM_GIT_VERSION \
|
||||
if BR2_TARGET_UBOOT_CUSTOM_GIT_VERSION != "" # legacy
|
||||
help
|
||||
Revision to use in the typical format used by
|
||||
Git/Mercurial/Subversion E.G. a sha id, a tag, branch, ..
|
||||
@@ -85,7 +89,7 @@ endif
|
||||
|
||||
config BR2_TARGET_UBOOT_VERSION
|
||||
string
|
||||
default "2020.07" if BR2_TARGET_UBOOT_LATEST_VERSION
|
||||
default "2020.04" if BR2_TARGET_UBOOT_LATEST_VERSION
|
||||
default BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE \
|
||||
if BR2_TARGET_UBOOT_CUSTOM_VERSION
|
||||
default "custom" if BR2_TARGET_UBOOT_CUSTOM_TARBALL
|
||||
@@ -458,28 +462,6 @@ config BR2_TARGET_UBOOT_ZYNQMP_PMUFW
|
||||
|
||||
This feature requires U-Boot >= 2018.07.
|
||||
|
||||
config BR2_TARGET_UBOOT_ZYNQMP_PM_CFG
|
||||
string "PMU configuration location"
|
||||
depends on BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG
|
||||
help
|
||||
Location of a PMU configuration file.
|
||||
|
||||
If not empty, Buildroot will convert the PMU configuration
|
||||
file into a loadable blob and pass it to U-Boot. The blob gets
|
||||
embedded into the U-Boot SPL and is used to configure the PMU
|
||||
during board initialization.
|
||||
|
||||
Unlike the PMU firmware, the PMU configuration file is unique
|
||||
to each board configuration. A PMU configuration file can be
|
||||
generated by building your Xilinx SDK BSP. It can be found in
|
||||
the BSP source, for example at
|
||||
./psu_cortexa53_0/libsrc/xilpm_v2_4/src/pm_cfg_obj.c
|
||||
|
||||
Leave this option empty if your PMU firmware has a hard-coded
|
||||
configuration object or you are loading it by any other means.
|
||||
|
||||
This feature requires U-Boot >= v2019.10.
|
||||
|
||||
config BR2_TARGET_UBOOT_ZYNQMP_PSU_INIT_FILE
|
||||
string "Custom psu_init_gpl file"
|
||||
depends on BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
# Locally computed:
|
||||
sha256 c1f5bf9ee6bb6e648edbf19ce2ca9452f614b08a9f886f1a566aa42e8cf05f6a u-boot-2020.07.tar.bz2
|
||||
sha256 fe732aaf037d9cc3c0909bad8362af366ae964bbdac6913a34081ff4ad565372 u-boot-2020.04.tar.bz2
|
||||
sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 Licenses/gpl-2.0.txt
|
||||
|
||||
@@ -16,7 +16,6 @@ UBOOT_INSTALL_IMAGES = YES
|
||||
|
||||
# u-boot 2020.01+ needs make 4.0+
|
||||
UBOOT_DEPENDENCIES = $(BR2_MAKE_HOST_DEPENDENCY)
|
||||
UBOOT_MAKE = $(BR2_MAKE)
|
||||
|
||||
ifeq ($(UBOOT_VERSION),custom)
|
||||
# Handle custom U-Boot tarballs as specified by the configuration
|
||||
@@ -258,7 +257,7 @@ UBOOT_POST_PATCH_HOOKS += UBOOT_FIXUP_LIBFDT_INCLUDE
|
||||
ifeq ($(BR2_TARGET_UBOOT_BUILD_SYSTEM_LEGACY),y)
|
||||
define UBOOT_CONFIGURE_CMDS
|
||||
$(TARGET_CONFIGURE_OPTS) \
|
||||
$(UBOOT_MAKE) -C $(@D) $(UBOOT_MAKE_OPTS) \
|
||||
$(BR2_MAKE) -C $(@D) $(UBOOT_MAKE_OPTS) \
|
||||
$(UBOOT_BOARD_NAME)_config
|
||||
endef
|
||||
else ifeq ($(BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG),y)
|
||||
@@ -295,7 +294,7 @@ define UBOOT_BUILD_CMDS
|
||||
cp -f $(UBOOT_CUSTOM_DTS_PATH) $(@D)/arch/$(UBOOT_ARCH)/dts/
|
||||
)
|
||||
$(TARGET_CONFIGURE_OPTS) \
|
||||
$(UBOOT_MAKE) -C $(@D) $(UBOOT_MAKE_OPTS) \
|
||||
$(BR2_MAKE) -C $(@D) $(UBOOT_MAKE_OPTS) \
|
||||
$(UBOOT_MAKE_TARGET)
|
||||
$(if $(BR2_TARGET_UBOOT_FORMAT_SD),
|
||||
$(@D)/tools/mxsboot sd $(@D)/u-boot.sb $(@D)/u-boot.sd)
|
||||
@@ -361,22 +360,6 @@ define UBOOT_ZYNQMP_KCONFIG_PMUFW
|
||||
$(call KCONFIG_SET_OPT,CONFIG_PMUFW_INIT_FILE,"$(UBOOT_ZYNQMP_PMUFW_PATH)")
|
||||
endef
|
||||
|
||||
UBOOT_ZYNQMP_PM_CFG = $(call qstrip,$(BR2_TARGET_UBOOT_ZYNQMP_PM_CFG))
|
||||
ifneq ($(UBOOT_ZYNQMP_PM_CFG),)
|
||||
UBOOT_ZYNQMP_PM_CFG_BIN = $(UBOOT_DIR)/pm_cfg_obj.bin
|
||||
define UBOOT_ZYNQMP_KCONFIG_PM_CFG
|
||||
$(call KCONFIG_SET_OPT,CONFIG_ZYNQMP_SPL_PM_CFG_OBJ_FILE,"$(UBOOT_ZYNQMP_PM_CFG_BIN)", \
|
||||
$(@D)/.config)
|
||||
endef
|
||||
|
||||
define UBOOT_ZYNQMP_PM_CFG_CONVERT
|
||||
$(UBOOT_DIR)/tools/zynqmp_pm_cfg_obj_convert.py \
|
||||
"$(UBOOT_ZYNQMP_PM_CFG)" \
|
||||
"$(UBOOT_ZYNQMP_PM_CFG_BIN)"
|
||||
endef
|
||||
UBOOT_PRE_BUILD_HOOKS += UBOOT_ZYNQMP_PM_CFG_CONVERT
|
||||
endif
|
||||
|
||||
UBOOT_ZYNQMP_PSU_INIT = $(call qstrip,$(BR2_TARGET_UBOOT_ZYNQMP_PSU_INIT_FILE))
|
||||
UBOOT_ZYNQMP_PSU_INIT_PATH = $(shell readlink -f $(UBOOT_ZYNQMP_PSU_INIT))
|
||||
|
||||
@@ -439,7 +422,6 @@ endif
|
||||
|
||||
define UBOOT_KCONFIG_FIXUP_CMDS
|
||||
$(UBOOT_ZYNQMP_KCONFIG_PMUFW)
|
||||
$(UBOOT_ZYNQMP_KCONFIG_PM_CFG)
|
||||
$(UBOOT_ZYNQMP_KCONFIG_PSU_INIT)
|
||||
endef
|
||||
|
||||
|
||||
@@ -1,21 +1,20 @@
|
||||
# Architecture
|
||||
BR2_aarch64=y
|
||||
|
||||
# Linux headers same as kernel, a 4.14 series
|
||||
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_14=y
|
||||
# Linux headers same as kernel, a 4.1 series
|
||||
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_1=y
|
||||
|
||||
# System settings
|
||||
BR2_TARGET_GENERIC_HOSTNAME="ucls1012a"
|
||||
BR2_TARGET_GENERIC_ISSUE="Welcome to uCLS1012A-SOM"
|
||||
BR2_SYSTEM_DHCP="eth0"
|
||||
BR2_ROOTFS_OVERLAY="board/arcturus/aarch64-ucls1012a/rootfs_overlay"
|
||||
BR2_ROOTFS_POST_BUILD_SCRIPT="board/arcturus/aarch64-ucls1012a/post-build.sh"
|
||||
BR2_ROOTFS_POST_IMAGE_SCRIPT="board/arcturus/aarch64-ucls1012a/post-image.sh"
|
||||
|
||||
# Kernel
|
||||
BR2_LINUX_KERNEL=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_TARBALL=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="$(call github,ArcturusNetworks,uCLS1012A-kernel,v.20.31)/linux-v.20.31.tar.gz"
|
||||
BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="$(call github,ArcturusNetworks,uCLS1012A-kernel,v0.2.1935)/linux-v0.2.1935.tar.gz"
|
||||
BR2_LINUX_KERNEL_DEFCONFIG="ucls1012a"
|
||||
BR2_LINUX_KERNEL_DTS_SUPPORT=y
|
||||
BR2_LINUX_KERNEL_INTREE_DTS_NAME="arcturus/arc-ucls1012a"
|
||||
@@ -28,7 +27,7 @@ BR2_TARGET_ROOTFS_CPIO_GZIP=y
|
||||
BR2_TARGET_UBOOT=y
|
||||
BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
|
||||
BR2_TARGET_UBOOT_CUSTOM_TARBALL=y
|
||||
BR2_TARGET_UBOOT_CUSTOM_TARBALL_LOCATION="$(call github,ArcturusNetworks,uCLS1012A-uboot,v.20.31)/uboot-v.20.31.tar.gz"
|
||||
BR2_TARGET_UBOOT_CUSTOM_TARBALL_LOCATION="$(call github,ArcturusNetworks,uCLS1012A-uboot,v0.2.1935)/uboot-v0.2.1935.tar.gz"
|
||||
BR2_TARGET_UBOOT_BOARD_DEFCONFIG="UCLS1012A_QSPI128"
|
||||
|
||||
# Tools
|
||||
|
||||
@@ -5,7 +5,8 @@ BR2_TARGET_GENERIC_GETTY_PORT="ttyAMA0"
|
||||
BR2_LINUX_KERNEL=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.4.3"
|
||||
BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y
|
||||
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(LINUX_DIR)/arch/arm64/configs/defconfig"
|
||||
BR2_LINUX_KERNEL_DTS_SUPPORT=y
|
||||
BR2_LINUX_KERNEL_INTREE_DTS_NAME="arm/foundation-v8"
|
||||
BR2_TARGET_ROOTFS_EXT2=y
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
BR2_arm=y
|
||||
BR2_cortex_a7=y
|
||||
BR2_ARM_FPU_NEON_VFPV4=y
|
||||
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_6=y
|
||||
BR2_TARGET_GENERIC_ISSUE="Welcome to Buildroot for the Bananapi M2 Zero"
|
||||
BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh"
|
||||
BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/bananapi/bananapi-m2-zero/genimage.cfg"
|
||||
BR2_LINUX_KERNEL=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.6.7"
|
||||
BR2_LINUX_KERNEL_DEFCONFIG="sunxi"
|
||||
BR2_LINUX_KERNEL_DTS_SUPPORT=y
|
||||
BR2_LINUX_KERNEL_INTREE_DTS_NAME="sun8i-h2-plus-bananapi-m2-zero"
|
||||
BR2_TARGET_ROOTFS_EXT2=y
|
||||
BR2_TARGET_ROOTFS_EXT2_4=y
|
||||
# BR2_TARGET_ROOTFS_TAR is not set
|
||||
BR2_TARGET_UBOOT=y
|
||||
BR2_TARGET_UBOOT_BOARDNAME="bananapi_m2_zero"
|
||||
BR2_TARGET_UBOOT_CUSTOM_VERSION=y
|
||||
BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2020.04"
|
||||
BR2_TARGET_UBOOT_NEEDS_DTC=y
|
||||
BR2_TARGET_UBOOT_NEEDS_PYTHON3=y
|
||||
BR2_TARGET_UBOOT_NEEDS_PYLIBFDT=y
|
||||
BR2_TARGET_UBOOT_FORMAT_CUSTOM=y
|
||||
BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="u-boot-sunxi-with-spl.bin"
|
||||
BR2_TARGET_UBOOT_BOOT_SCRIPT=y
|
||||
BR2_TARGET_UBOOT_BOOT_SCRIPT_SOURCE="board/bananapi/bananapi-m2-zero/boot.cmd"
|
||||
BR2_PACKAGE_HOST_DOSFSTOOLS=y
|
||||
BR2_PACKAGE_HOST_GENIMAGE=y
|
||||
BR2_PACKAGE_HOST_MTOOLS=y
|
||||
@@ -17,7 +17,7 @@ BR2_TARGET_ROOTFS_EXT2_4=y
|
||||
BR2_TARGET_UBOOT=y
|
||||
BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
|
||||
BR2_TARGET_UBOOT_CUSTOM_VERSION=y
|
||||
BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2020.04"
|
||||
BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2019.07"
|
||||
BR2_TARGET_UBOOT_BOARD_DEFCONFIG="am335x_evm"
|
||||
BR2_TARGET_UBOOT_NEEDS_DTC=y
|
||||
# BR2_TARGET_UBOOT_FORMAT_BIN is not set
|
||||
|
||||
@@ -34,7 +34,7 @@ BR2_TARGET_ROOTFS_EXT2_SIZE="250M"
|
||||
BR2_TARGET_UBOOT=y
|
||||
BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
|
||||
BR2_TARGET_UBOOT_CUSTOM_VERSION=y
|
||||
BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2020.04"
|
||||
BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2019.07"
|
||||
BR2_TARGET_UBOOT_BOARD_DEFCONFIG="am335x_evm"
|
||||
BR2_TARGET_UBOOT_NEEDS_DTC=y
|
||||
# BR2_TARGET_UBOOT_FORMAT_BIN is not set
|
||||
|
||||
@@ -2,8 +2,9 @@
|
||||
BR2_mipsel=y
|
||||
BR2_mips_xburst=y
|
||||
# BR2_MIPS_SOFT_FLOAT is not set
|
||||
BR2_KERNEL_HEADERS_AS_KERNEL=y
|
||||
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y
|
||||
|
||||
# Linux headers same as kernel, a 3.18 series
|
||||
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_18=y
|
||||
|
||||
# system
|
||||
BR2_TARGET_GENERIC_GETTY_PORT="ttyS4"
|
||||
@@ -14,17 +15,19 @@ BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/ci20/genimage.cfg"
|
||||
|
||||
# kernel
|
||||
BR2_LINUX_KERNEL=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.4.58"
|
||||
BR2_LINUX_KERNEL_CUSTOM_TARBALL=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="$(call github,MIPS,CI20_linux,7dff33297116643485ca37141d804eddd793e834)/linux-7dff33297116643485ca37141d804eddd793e834.tar.gz"
|
||||
BR2_LINUX_KERNEL_DEFCONFIG="ci20"
|
||||
BR2_LINUX_KERNEL_INSTALL_TARGET=y
|
||||
|
||||
# u-boot
|
||||
BR2_TARGET_UBOOT=y
|
||||
BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
|
||||
BR2_TARGET_UBOOT_CUSTOM_VERSION=y
|
||||
BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2020.07"
|
||||
BR2_TARGET_UBOOT_BOARD_DEFCONFIG="ci20_mmc"
|
||||
BR2_TARGET_UBOOT_BUILD_SYSTEM_LEGACY=y
|
||||
BR2_TARGET_UBOOT_BOARDNAME="ci20_mmc"
|
||||
BR2_TARGET_UBOOT_CUSTOM_GIT=y
|
||||
BR2_TARGET_UBOOT_CUSTOM_REPO_URL="https://github.com/MIPS/CI20_u-boot"
|
||||
BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="dd3c1b95dac7d10b2ca5806f65e5c1050d7dd0fa"
|
||||
BR2_TARGET_UBOOT_PATCH="board/ci20/patches/uboot"
|
||||
BR2_TARGET_UBOOT_FORMAT_IMG=y
|
||||
BR2_TARGET_UBOOT_SPL=y
|
||||
BR2_TARGET_UBOOT_SPL_NAME="spl/u-boot-spl.bin"
|
||||
|
||||
@@ -8,8 +8,8 @@ BR2_ARM_FPU_VFPV3=y
|
||||
# patches
|
||||
BR2_GLOBAL_PATCH_DIR="board/freescale/imx6sabre/patches"
|
||||
|
||||
# Linux headers same as kernel, a 5.4 series
|
||||
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y
|
||||
# Linux headers same as kernel, a 4.19 series
|
||||
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_19=y
|
||||
|
||||
# system
|
||||
BR2_TARGET_GENERIC_GETTY_PORT="ttymxc3"
|
||||
@@ -18,7 +18,7 @@ BR2_TARGET_GENERIC_GETTY_PORT="ttymxc3"
|
||||
BR2_LINUX_KERNEL=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_GIT=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_REPO_URL="https://source.codeaurora.org/external/imx/linux-imx.git"
|
||||
BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="rel_imx_5.4.24_2.1.0"
|
||||
BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="rel_imx_4.19.35_1.1.0"
|
||||
BR2_LINUX_KERNEL_DEFCONFIG="imx_v7"
|
||||
BR2_LINUX_KERNEL_DTS_SUPPORT=y
|
||||
BR2_LINUX_KERNEL_INTREE_DTS_NAME="imx6dl-sabreauto"
|
||||
@@ -40,5 +40,5 @@ BR2_TARGET_UBOOT_BOARDNAME="mx6dlsabreauto"
|
||||
BR2_TARGET_UBOOT_FORMAT_IMX=y
|
||||
BR2_TARGET_UBOOT_CUSTOM_GIT=y
|
||||
BR2_TARGET_UBOOT_CUSTOM_REPO_URL="https://source.codeaurora.org/external/imx/uboot-imx.git"
|
||||
BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="rel_imx_5.4.24_2.1.0"
|
||||
BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="rel_imx_4.19.35_1.1.0"
|
||||
BR2_TARGET_UBOOT_NEEDS_DTC=y
|
||||
|
||||
@@ -8,8 +8,8 @@ BR2_ARM_FPU_VFPV3=y
|
||||
# patches
|
||||
BR2_GLOBAL_PATCH_DIR="board/freescale/imx6sabre/patches"
|
||||
|
||||
# Linux headers same as kernel, a 5.4 series
|
||||
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y
|
||||
# Linux headers same as kernel, a 4.19 series
|
||||
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_19=y
|
||||
|
||||
# system
|
||||
BR2_TARGET_GENERIC_GETTY_PORT="ttymxc0"
|
||||
@@ -18,7 +18,7 @@ BR2_TARGET_GENERIC_GETTY_PORT="ttymxc0"
|
||||
BR2_LINUX_KERNEL=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_GIT=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_REPO_URL="https://source.codeaurora.org/external/imx/linux-imx.git"
|
||||
BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="rel_imx_5.4.24_2.1.0"
|
||||
BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="rel_imx_4.19.35_1.1.0"
|
||||
BR2_LINUX_KERNEL_DEFCONFIG="imx_v7"
|
||||
BR2_LINUX_KERNEL_DTS_SUPPORT=y
|
||||
BR2_LINUX_KERNEL_INTREE_DTS_NAME="imx6dl-sabresd"
|
||||
@@ -39,5 +39,5 @@ BR2_TARGET_UBOOT_BOARDNAME="mx6dlsabresd"
|
||||
BR2_TARGET_UBOOT_FORMAT_IMX=y
|
||||
BR2_TARGET_UBOOT_CUSTOM_GIT=y
|
||||
BR2_TARGET_UBOOT_CUSTOM_REPO_URL="https://source.codeaurora.org/external/imx/uboot-imx.git"
|
||||
BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="rel_imx_5.4.24_2.1.0"
|
||||
BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="rel_imx_4.19.35_1.1.0"
|
||||
BR2_TARGET_UBOOT_NEEDS_DTC=y
|
||||
|
||||
@@ -8,8 +8,8 @@ BR2_ARM_FPU_VFPV3=y
|
||||
# patches
|
||||
BR2_GLOBAL_PATCH_DIR="board/freescale/imx6sabre/patches"
|
||||
|
||||
# Linux headers same as kernel, a 5.4 series
|
||||
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y
|
||||
# Linux headers same as kernel, a 4.19 series
|
||||
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_19=y
|
||||
|
||||
# system
|
||||
BR2_TARGET_GENERIC_GETTY_PORT="ttymxc3"
|
||||
@@ -18,7 +18,7 @@ BR2_TARGET_GENERIC_GETTY_PORT="ttymxc3"
|
||||
BR2_LINUX_KERNEL=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_GIT=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_REPO_URL="https://source.codeaurora.org/external/imx/linux-imx.git"
|
||||
BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="rel_imx_5.4.24_2.1.0"
|
||||
BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="rel_imx_4.19.35_1.1.0"
|
||||
BR2_LINUX_KERNEL_DEFCONFIG="imx_v7"
|
||||
BR2_LINUX_KERNEL_DTS_SUPPORT=y
|
||||
BR2_LINUX_KERNEL_INTREE_DTS_NAME="imx6q-sabreauto"
|
||||
@@ -40,5 +40,5 @@ BR2_TARGET_UBOOT_BOARDNAME="mx6qsabreauto"
|
||||
BR2_TARGET_UBOOT_FORMAT_IMX=y
|
||||
BR2_TARGET_UBOOT_CUSTOM_GIT=y
|
||||
BR2_TARGET_UBOOT_CUSTOM_REPO_URL="https://source.codeaurora.org/external/imx/uboot-imx.git"
|
||||
BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="rel_imx_5.4.24_2.1.0"
|
||||
BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="rel_imx_4.19.35_1.1.0"
|
||||
BR2_TARGET_UBOOT_NEEDS_DTC=y
|
||||
|
||||
@@ -8,8 +8,8 @@ BR2_ARM_FPU_VFPV3=y
|
||||
# patches
|
||||
BR2_GLOBAL_PATCH_DIR="board/freescale/imx6sabre/patches"
|
||||
|
||||
# Linux headers same as kernel, a 5.4 series
|
||||
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y
|
||||
# Linux headers same as kernel, a 4.19 series
|
||||
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_19=y
|
||||
|
||||
# system
|
||||
BR2_TARGET_GENERIC_GETTY_PORT="ttymxc0"
|
||||
@@ -18,7 +18,7 @@ BR2_TARGET_GENERIC_GETTY_PORT="ttymxc0"
|
||||
BR2_LINUX_KERNEL=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_GIT=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_REPO_URL="https://source.codeaurora.org/external/imx/linux-imx.git"
|
||||
BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="rel_imx_5.4.24_2.1.0"
|
||||
BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="rel_imx_4.19.35_1.1.0"
|
||||
BR2_LINUX_KERNEL_DEFCONFIG="imx_v7"
|
||||
BR2_LINUX_KERNEL_DTS_SUPPORT=y
|
||||
BR2_LINUX_KERNEL_INTREE_DTS_NAME="imx6q-sabresd"
|
||||
@@ -40,5 +40,5 @@ BR2_TARGET_UBOOT_BOARDNAME="mx6qsabresd"
|
||||
BR2_TARGET_UBOOT_FORMAT_IMX=y
|
||||
BR2_TARGET_UBOOT_CUSTOM_GIT=y
|
||||
BR2_TARGET_UBOOT_CUSTOM_REPO_URL="https://source.codeaurora.org/external/imx/uboot-imx.git"
|
||||
BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="rel_imx_5.4.24_2.1.0"
|
||||
BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="rel_imx_4.19.35_1.1.0"
|
||||
BR2_TARGET_UBOOT_NEEDS_DTC=y
|
||||
|
||||
@@ -8,8 +8,8 @@ BR2_ARM_FPU_VFPV3=y
|
||||
# patches
|
||||
BR2_GLOBAL_PATCH_DIR="board/freescale/imx6sabre/patches"
|
||||
|
||||
# Linux headers same as kernel, a 5.4 series
|
||||
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y
|
||||
# Linux headers same as kernel, a 4.19 series
|
||||
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_19=y
|
||||
|
||||
# system
|
||||
BR2_TARGET_GENERIC_GETTY_PORT="ttymxc0"
|
||||
@@ -18,7 +18,7 @@ BR2_TARGET_GENERIC_GETTY_PORT="ttymxc0"
|
||||
BR2_LINUX_KERNEL=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_GIT=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_REPO_URL="https://source.codeaurora.org/external/imx/linux-imx.git"
|
||||
BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="rel_imx_5.4.24_2.1.0"
|
||||
BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="rel_imx_4.19.35_1.1.0"
|
||||
BR2_LINUX_KERNEL_DEFCONFIG="imx_v7"
|
||||
BR2_LINUX_KERNEL_DTS_SUPPORT=y
|
||||
BR2_LINUX_KERNEL_INTREE_DTS_NAME="imx6sx-sdb"
|
||||
@@ -38,6 +38,6 @@ BR2_TARGET_UBOOT=y
|
||||
BR2_TARGET_UBOOT_BOARDNAME="mx6sxsabresd"
|
||||
BR2_TARGET_UBOOT_CUSTOM_GIT=y
|
||||
BR2_TARGET_UBOOT_CUSTOM_REPO_URL="https://source.codeaurora.org/external/imx/uboot-imx.git"
|
||||
BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="rel_imx_5.4.24_2.1.0"
|
||||
BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="rel_imx_4.19.35_1.1.0"
|
||||
BR2_TARGET_UBOOT_FORMAT_IMX=y
|
||||
BR2_TARGET_UBOOT_NEEDS_DTC=y
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user