$ cd /opt/petalinux-v1.3-final-full/software/petalinux-dist $ petalinux-config-apps
Scroll to PetaLogix Demo Applications and enter. Uncheck uWeb and exit. Scroll to BusyBox->Networking Utilities and make sure httpd is checked. Exit and make the Petalinux image. The server files is now located in '/home/httpd'. CGI scripts should go in cgi-bin directory and chmoded to +x.
Here is a simple script used to read and write to memory using 'devmem'.
First I tried to modify the default page source files (i.e. petalinux.page) but found out that the whole page is some binary, so the uWeb API is needed.
Then I set out to install php.
- Attempt 1
- Attempt 2
- Downloaded the latest php-5.3.6.
- Extracted to '/opt/petalinux-v1.3-final-full/software/petalinux-dist/user' to a folder 'php'.
- Edit /opt/petalinux-v1.3-final-full/software/petalinux-dist/user/Makefile:
dir_$(CONFIG_USER_PHP_PHP) += php
- Edit /opt/petalinux-v1.3-final-full/software/petalinux-dist/config/Kconfig
config USER_PHP_PHP bool "php" help Testing php support
This adds the php application to the petalinux-config-apps ui where we can select it to be compiled to the petalinux image.
- Enter php directory in user catalog
- Edit /opt/petalinux-v1.3-final-full/software/petalinux-dist/user/php/Makefile
CC = /opt/petalinux-v1.3-final-full/tools/linux-i386/microblaze-unknown-linux-gnu/microblaze-unknown-linux-gnu/bin/gcc
When compiling the petalinux image, I get no errors in the compile step of php, but get a romfs error during the install step. I believe it has something to do with the large filesize of the php binary or some problem with the Makefile.
- uClinux - Adding user applications
- BOA + PHP for uClinux
- CGI html form example 1
- CGI security, to be read
- Bourne shell reference