forked from PX4/PX4-Autopilot
-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix build script to enable building on Podman #378
Open
JoonasOnatsu
wants to merge
485
commits into
main
Choose a base branch
from
podman_build_patch
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…errupt when jumping out of the bootloader Leaving interrupt on here will break the USB in random ways after booting Signed-off-by: Jukka Laitinen <[email protected]>
This allows signinig the protected mode binary, by encapsulating the firmware between a header (the ToC) and the signature, instead of placing the ToC inside of the firmware itself. The problem was that the ToC went to the kernel binary, while the signature is appended to the user binary. The ToC needs the location of the signature which cannot be known at the time when the kernel is linked. For ToC integrity protection, the ToC itself is also signed and verified.
Removed, as it is not needed
We'll do this for now, until some better solution is found. Currently disabling mag #0 by parameters doesn't seem to work, it kills the magnetometer usage completely. Signed-off-by: Jukka Laitinen <[email protected]>
Signed-off-by: Jukka Laitinen <[email protected]>
- The vector table needs to be aligned correctly, depends on the amount of interrupts. 4K should be enough for this target. - Padd the firmware to the correct size, the signature must start at a 4B alignment. - The firmware end address needs to be aligned as well, because the calculated signature size is the firmware size + the additional padding
Use the old code to verity ToC (the fist entry must contain it though)
Also simplify the previous implementation. The first TOC entry must contain the TOC; but it doesn't matter whether it contains only the TOC or also something else Signed-off-by: Jukka Laitinen <[email protected]>
Re-build did not re-create the ToC, which results in a bad ToC for the px4 firmware.
The syscall lookup table contains poisoned xxenv() procedures and causes a build error. The file is included via a massive header that includes almost everything in /arch/risc-v/ etc (riscv_internal.h). This was already fixed once, and, tbh, suppressing the poison error is the only way to get this to work reliably.
Add recv_port into cmd line option
task_delete() API is not always available, so forward the call to px4_task_delete() which knows what to do.
…th old master branch Signed-off-by: Jukka Laitinen <[email protected]>
Signed-off-by: Jukka Laitinen <[email protected]>
Signed-off-by: Jukka Laitinen <[email protected]>
Signed-off-by: Jukka Laitinen <[email protected]>
Signed-off-by: Jukka Laitinen <[email protected]>
The reason for this is that log.h includes drv_hrt.h which sucks in half the project's include files with it, which causes strange build issues
User space code cannot use critical sections, use a semaphore in that case. The kernel side still uses critical sections. Note: This cannot be done by ifdef-flagging, as the user-/kernel side use the same work_queue.a library.
Use IRQ locking only when the atomic access is performed from IRQs
Makes it a bit simpler to select correct linker script(s) for each build type.
Streams have been moved to user space, so do not need to link nuttx_sched into nuttx_c any longer.
- New memory map - .secmem section
The uploader script calculates the crc over the maximum image size. With 32MB images it takes longer than 0.5s, so just wait for longer Signed-off-by: Jukka Laitinen <[email protected]>
Signed-off-by: Jukka Laitinen <[email protected]>
Centralized set of ip addresses in beginning of rcS
…rnal magnetometer for fmu-v5x
Signed-off-by: Jukka Laitinen <[email protected]>
Signed-off-by: Jukka Laitinen <[email protected]>
Signed-off-by: Jukka Laitinen <[email protected]>
… from NuttX This also fixes the issue that only 6 first bytes of the serial number are used Signed-off-by: Jukka Laitinen <[email protected]>
Signed-off-by: Jukka Laitinen <[email protected]>
…ices This is more or less hardcoded module, which can be used as basis for more advanced functionality later. Signed-off-by: Jukka Laitinen <[email protected]>
The PX4 IP address in ethernet network is 192.168.201.100+MAV_SYS_ID Default MAV_SYS_ID is 1, so in normal configurations the IP is 192.168.201.101 This makes it possible to have several PX4-only devices in same switched network, and controlled with a single mavlink-based GCS; just set different MAV_SYS_ID to every drone. Signed-off-by: Jukka Laitinen <[email protected]>
Setting duty cycle as 0 on initialization phase in not allowed. The value has to be something from 1 to 65535. With 0 CorePWM FPGA block generates square wave until the real pwm values are set after the system init has been done. Signed-off-by: Jani Paalijarvi <[email protected]>
permissions properly when using unprivileged/non-root container for building. Signed-off-by: Joonas Onatsu <[email protected]>
Signed-off-by: Joonas Onatsu <[email protected]>
Maybe squash the commits together; let's merge this then |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Podman needs the '--usens=keep-id' argument to properly map
the directory permissions of the '/px4-firmware/sources' mount
when building with unprivileged/non-root Podman containers.
Without this, the '/px4-firmware' directory in the container has the
proper owner 'builder:builder', but the '/px4-firmware/sources'
mounted by '-v' argument will not, it will be owned by root and
the build script crashes & burns with permission errors.
NOTE: I haven't yet checked if there are other permission issues
hidden somewhere else when building the image with Podman.
At least this enables building in the first place.