This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Tool/software: Linux
Dear Sir:
I want to build a minial rootfs for AM4377 with a QSPI flash 64MB, which branch should I fetch from TI web server? I want to remove some files from the pre-build rootfs,
And I am not sure which need to remove or which need to keep. If some important files removed, the system maybe can not work. So I want to keep the most important which related boot up.
Could u please help to tell me which branch should be build?
Looking forward to your replying.
Thanks
Hello rance,
Please, refer to this post.
$ sudo apt-get install git build-essential python diffstat texinfo gawk chrpath dos2unix wget unzip socat doxygen libc6:i386 libncurses5:i386 libstdc++6:i386 libz1:i386
$ sudo dpkg-reconfigure dash
#Select "No" when prompted.
$ wget https://releases.linaro.org/components/toolchain/binaries/6.2-2016.11/arm-linux-gnueabihf/gcc-linaro-6.2.1-2016.11-x86_64_arm-linux-gnueabihf.tar.xz
$ tar -Jxvf gcc-linaro-6.2.1-2016.11-x86_64_arm-linux-gnueabihf.tar.xz -C $HOME
$ git clone git://arago-project.org/git/projects/oe-layersetup.git tisdk
$ cd tisdk
$ ./oe-layertool-setup.sh -f configs/processor-sdk/processor-sdk-04.03.00.05-config.txt
Modify <tisdk>/sources/meta-arago/meta-arago-distro/recipes-core/images/arago-base-tisdk-image.bb file like below.
----------------------------------------------------------------------------------------
# Arago TI SDK base image with test tools
# Suitable for initramfs
require arago-image.inc
IMAGE_FSTYPES += "cpio.xz"
IMAGE_INSTALL += "\
packagegroup-arago-base-tisdk \
${VIRTUAL-RUNTIME_initramfs} \
"
export IMAGE_BASENAME = "arago-base-tisdk-image"
----------------------------------------------------------------------------------------
$ cd build
$ cat >> ./conf/local.conf << 'EOF'
TI_MIRROR = "http://software-dl.ti.com/processor-sdk-mirror/sources/"
MIRRORS += " \
bzr://.*/.* ${TI_MIRROR} \n \
cvs://.*/.* ${TI_MIRROR} \n \
git://.*/.* ${TI_MIRROR} \n \
gitsm://.*/.* ${TI_MIRROR} \n \
hg://.*/.* ${TI_MIRROR} \n \
osc://.*/.* ${TI_MIRROR} \n \
p4://.*/.* ${TI_MIRROR} \n \
npm://.*/.* ${TI_MIRROR} \n \
ftp://.*/.* ${TI_MIRROR} \n \
https?$://.*/.* ${TI_MIRROR} \n \
svn://.*/.* ${TI_MIRROR} \n \
"
EOF
$ . conf/setenv
$ export PATH=$HOME/gcc-linaro-6.2.1-2016.11-x86_64_arm-linux-gnueabihf/bin:$PATH
$ MACHINE=am437x-evm bitbake arago-base-tisdk-image
Check the size, flash it to your board and boot.
Customize the image by adding IMAGE_INSTALL_append = " package1 package2 package3" to <tisdk>/build/conf/local.conf file.
Please, check this page out for more details.
Best regards,
Kemal
Beside <tisdk>/sources/meta-arago/meta-arago-distro/recipes-core/images/arago-base-tisdk-image.bb, If you also modify <tisdk>/sources/meta-arago/meta-arago-distro/recipes-core/packagegroups/packagegroup-arago-base-tisdk.bb like below and fall back to the SystemV service manager by adding ARAGO_SYSVINIT = "1" in <tisdk>/build/conf/local.conf file, you will get 13.9Mb arago-base-tisdk-image-am437x-evm-<date-time>.rootfs.ubi image.
----------------------------------------------------------------------------------------
DESCRIPTION = "Additional packages beyond console packages shared by TI SDKs"
LICENSE = "MIT"
PR = "r19"
PACKAGE_ARCH = "${MACHINE_ARCH}"
inherit packagegroup
OPTEE_PKGS = " \
optee-os \
optee-client \
optee-test \
"
RDEPENDS_${PN} = "\
cifs-utils \
${@base_conditional('OPTEEMACHINE', 'ti', "${OPTEE_PKGS}", "", d)} \
"
----------------------------------------------------------------------------------------
Hi kemal:
Thanks for your help, the arago-base-tisdk-image.tar.xz is about 16M after compressed, but after it write to flash, the total size will more than 64M after decompressed, And I will try the way which you mentioned this this item. And try to optimize it again for the rootfs.
Hi kemal:
After I recompile the project, I got a 7.5M arago-base-tisdk-image-am437x-evm.tar.xz, But this arago-base-tisdk-image-am437x-evm.tar.xz put it in SDcard, it seems that it can not boot up fully.
Please check the log file, I think that there maybe some config files missing lead to it can not boot up successfully.
U-Boot SPL 2017.01-00458-gfd06b46-dirty (May 10 2018 - 15:30:44) Trying to boot from MMC1 SPL: Please implement spl_start_uboot() for your board SPL: Direct Linux boot not active! reading u-boot.img reading u-boot.img reading u-boot.img reading u-boot.img U-Boot 2017.01-00458-gfd06b46-dirty (May 10 2018 - 15:30:44 +0800) CPU : AM437X-GP rev 1.2 Model: TI AM437x SK EVM DRAM: 1 GiB PMIC: TPS65218 NAND: 0 MiB MMC: OMAP SD/MMC: 0 reading uboot.env ** Unable to read "uboot.env" from mmc0:1 ** Using default environment Net: <ethaddr> not set. Validating first E-fuse MAC cpsw, usb_ether Hit any key to stop autoboot: 0 switch to partitions #0, OK mmc0 is current device SD/MMC found on device 0 reading boot.scr ** Unable to read file boot.scr ** reading uEnv.txt ** Unable to read file uEnv.txt ** switch to partitions #0, OK mmc0 is current device SD/MMC found on device 0 3639552 bytes read in 937 ms (3.7 MiB/s) 51067 bytes read in 44 ms (1.1 MiB/s) ## Flattened Device Tree blob at 88000000 Booting using the fdt blob at 0x88000000 Loading Device Tree to 8fff0000, end 8ffff77a ... OK Starting kernel ... [ 0.000000] Booting Linux on physical CPU 0x0 [ 0.000000] Linux version 4.9.69-g9ce43c71ae (shang@ubuntu) (gcc version 6.2.1 20161016 (Linaro GCC 6.2-2016.11) ) #11 PREEMPT Mon May 28 15:32:22 CST 2018 [ 0.000000] CPU: ARMv7 Processor [412fc09a] revision 10 (ARMv7), cr=10c53c7d [ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache [ 0.000000] OF: fdt:Machine model: TI AM437x SK EVM [ 0.000000] efi: Getting EFI parameters from FDT: [ 0.000000] efi: UEFI not found. [ 0.000000] cma: Reserved 48 MiB at 0xbd000000 [ 0.000000] Memory policy: Data cache writeback [ 0.000000] CPU: All CPU(s) started in SVC mode. [ 0.000000] AM437x ES1.2 (neon) [ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 260416 [ 0.000000] Kernel command line: console=ttyO3,115200n8 root=PARTUUID=dd75ad75-02 rw rootfstype=ext4 rootwait [ 0.000000] PID hash table entries: 4096 (order: 2, 16384 bytes) [ 0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes) [ 0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes) [ 0.000000] Memory: 977292K/1048576K available (7168K kernel code, 292K rwdata, 2384K rodata, 1024K init, 281K bss, 22132K reserved, 49152K cma-reserved, 212992K highmem) [ 0.000000] Virtual kernel memory layout: [ 0.000000] vector : 0xffff0000 - 0xffff1000 ( 4 kB) [ 0.000000] fixmap : 0xffc00000 - 0xfff00000 (3072 kB) [ 0.000000] vmalloc : 0xf0800000 - 0xff800000 ( 240 MB) [ 0.000000] lowmem : 0xc0000000 - 0xf0000000 ( 768 MB) [ 0.000000] pkmap : 0xbfe00000 - 0xc0000000 ( 2 MB) [ 0.000000] modules : 0xbf000000 - 0xbfe00000 ( 14 MB) [ 0.000000] .text : 0xc0008000 - 0xc0800000 (8160 kB) [ 0.000000] .init : 0xc0b00000 - 0xc0c00000 (1024 kB) [ 0.000000] .data : 0xc0c00000 - 0xc0c49048 ( 293 kB) [ 0.000000] .bss : 0xc0c49048 - 0xc0c8f774 ( 282 kB) [ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1 [ 0.000000] Preemptible hierarchical RCU implementation. [ 0.000000] Build-time adjustment of leaf fanout to 32. [ 0.000000] NR_IRQS:16 nr_irqs:16 16 [ 0.000000] L2C: platform modifies aux control register: 0x0e030000 -> 0x3e430000 [ 0.000000] L2C: DT/platform modifies aux control register: 0x0e030000 -> 0x3e430000 [ 0.000000] L2C-310 enabling early BRESP for Cortex-A9 [ 0.000000] OMAP L2C310: ROM does not support power control setting [ 0.000000] L2C-310 dynamic clock gating disabled, standby mode disabled [ 0.000000] L2C-310 cache controller enabled, 16 ways, 256 kB [ 0.000000] L2C-310: CACHE_ID 0x410000c9, AUX_CTRL 0x4e430000 [ 0.000000] OMAP clockevent source: timer2 at 24000000 Hz [ 0.000011] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns [ 0.000029] clocksource: timer1: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns [ 0.000037] OMAP clocksource: timer1 at 24000000 Hz [ 0.000401] clocksource: 32k_counter: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 58327039986419 ns [ 0.000411] OMAP clocksource: 32k_counter at 32768 Hz [ 0.000763] Console: colour dummy device 80x30 [ 0.000787] WARNING: Your 'console=ttyO3' has been replaced by 'ttyS3' [ 0.000793] This ensures that you still see kernel messages. Please [ 0.000797] update your kernel commandline. [ 0.000815] Calibrating delay loop... 1987.37 BogoMIPS (lpj=9936896) [ 0.060169] pid_max: default: 32768 minimum: 301 [ 0.060290] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes) [ 0.060303] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes) [ 0.061051] CPU: Testing write buffer coherency: ok [ 0.061393] Setting up static identity map for 0x80100000 - 0x80100060 [ 0.062166] EFI services will not be available. [ 0.062952] devtmpfs: initialized [ 0.073780] VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4 [ 0.074087] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns [ 0.074109] futex hash table entries: 256 (order: -1, 3072 bytes) [ 0.077323] pinctrl core: initialized pinctrl subsystem [ 0.078392] NET: Registered protocol family 16 [ 0.079639] DMA: preallocated 256 KiB pool for atomic coherent allocations [ 0.180179] cpuidle: using governor ladder [ 0.210167] cpuidle: using governor menu [ 0.217546] OMAP GPIO hardware version 0.1 [ 0.229595] No ATAGs? [ 0.229623] hw-breakpoint: found 5 (+1 reserved) breakpoint and 1 watchpoint registers. [ 0.229635] hw-breakpoint: maximum watchpoint size is 4 bytes. [ 0.266674] edma 49000000.edma: TI EDMA DMA engine driver [ 0.269685] omap_i2c 44e0b000.i2c: could not find pctldev for node /ocp@44000000/l4_wkup@44c00000/scm@210000/pinmux@800/i2c0_pins, deferring probe [ 0.269742] omap_i2c 4802a000.i2c: could not find pctldev for node /ocp@44000000/l4_wkup@44c00000/scm@210000/pinmux@800/i2c1_pins, deferring probe [ 0.269858] media: Linux media interface: v0.10 [ 0.269902] Linux video capture interface: v2.00 [ 0.269939] pps_core: LinuxPPS API ver. 1 registered [ 0.269945] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it> [ 0.269966] PTP clock support registered [ 0.270000] EDAC MC: Ver: 3.0.0 [ 0.270980] omap-mailbox 480c8000.mailbox: omap mailbox rev 0x400 [ 0.271311] Advanced Linux Sound Architecture Driver Initialized. [ 0.272329] clocksource: Switched to clocksource timer1 [ 0.280463] NET: Registered protocol family 2 [ 0.281115] TCP established hash table entries: 8192 (order: 3, 32768 bytes) [ 0.281180] TCP bind hash table entries: 8192 (order: 3, 32768 bytes) [ 0.281254] TCP: Hash tables configured (established 8192 bind 8192) [ 0.281391] UDP hash table entries: 512 (order: 1, 8192 bytes) [ 0.281412] UDP-Lite hash table entries: 512 (order: 1, 8192 bytes) [ 0.281536] NET: Registered protocol family 1 [ 0.281913] RPC: Registered named UNIX socket transport module. [ 0.281926] RPC: Registered udp transport module. [ 0.281931] RPC: Registered tcp transport module. [ 0.281937] RPC: Registered tcp NFSv4.1 backchannel transport module. [ 0.284296] workingset: timestamp_bits=14 max_order=18 bucket_order=4 [ 0.289434] squashfs: version 4.0 (2009/01/31) Phillip Lougher [ 0.290199] NFS: Registering the id_resolver key type [ 0.290233] Key type id_resolver registered [ 0.290240] Key type id_legacy registered [ 0.290279] ntfs: driver 2.1.32 [Flags: R/O]. [ 0.291771] bounce: pool size: 64 pages [ 0.291970] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 246) [ 0.291984] io scheduler noop registered [ 0.291990] io scheduler deadline registered [ 0.292115] io scheduler cfq registered (default) [ 0.295101] pinctrl-single 44e10800.pinmux: 199 pins at pa f9e10800 size 796 [ 0.297790] backlight supply power not found, using dummy regulator [ 0.344357] Serial: 8250/16550 driver, 10 ports, IRQ sharing disabled [ 0.346700] omap8250 44e09000.serial: No clock speed specified: using default: 48000000 [ 0.347479] 44e09000.serial: ttyS0 at MMIO 0x44e09000 (irq = 30, base_baud = 3000000) is a 8250 [ 0.347908] omap8250 481a6000.serial: No clock speed specified: using default: 48000000 [ 0.348469] 481a6000.serial: ttyS3 at MMIO 0x481a6000 (irq = 31, base_baud = 3000000) is a 8250 [ 1.014567] console [ttyS3] enabled [ 1.018454] omap8250 481a8000.serial: No clock speed specified: using default: 48000000 [ 1.027076] 481a8000.serial: ttyS4 at MMIO 0x481a8000 (irq = 32, base_baud = 3000000) is a 8250 [ 1.036213] omap8250 481aa000.serial: No clock speed specified: using default: 48000000 [ 1.044837] 481aa000.serial: ttyS5 at MMIO 0x481aa000 (irq = 33, base_baud = 3000000) is a 8250 [ 1.055173] omap_rng 48310000.rng: OMAP Random Number Generator ver. 20 [ 1.061910] [drm] Initialized [ 1.078235] brd: module loaded [ 1.087199] loop: module loaded [ 1.092610] spi spi1.0: not using DMA for McSPI (-19) [ 1.098393] spi spi2.0: not using DMA for McSPI (-19) [ 1.105250] m25p80 spi0.0: mx66l51235l (65536 Kbytes) [ 1.110334] 4 ofpart partitions found on MTD device spi0.0 [ 1.115885] Creating 4 MTD partitions on "spi0.0": [ 1.120671] 0x000000000000-0x000000080000 : "QSPI.u-boot" [ 1.127153] 0x000000080000-0x000000090000 : "QSPI.fdt" [ 1.133243] 0x000000090000-0x000000490000 : "QSPI.kernel" [ 1.139485] 0x000000490000-0x000004000000 : "QSPI.filesystem" [ 1.146843] libphy: Fixed MDIO Bus: probed [ 1.222397] davinci_mdio 4a101000.mdio: davinci mdio revision 1.6 [ 1.228492] davinci_mdio 4a101000.mdio: detected phy mask ffffffec [ 1.236519] libphy: 4a101000.mdio: probed [ 1.240539] davinci_mdio 4a101000.mdio: phy[0]: device 4a101000.mdio:00, driver RTL8211F Gigabit Ethernet [ 1.250177] davinci_mdio 4a101000.mdio: phy[1]: device 4a101000.mdio:01, driver unknown [ 1.258202] davinci_mdio 4a101000.mdio: phy[4]: device 4a101000.mdio:04, driver RTL8211F Gigabit Ethernet [ 1.268559] cpsw 4a100000.ethernet: Detected MACID = 60:64:05:5e:3c:df [ 1.275262] cpsw 4a100000.ethernet: device node lookup for pps timer failed [ 1.282235] cpsw 4a100000.ethernet: cpts: overflow check period 500 (jiffies) [ 1.290251] cpsw 4a100000.ethernet: cpsw: Detected MACID = 60:64:05:5e:3c:e1 [ 1.298663] mousedev: PS/2 mouse device common for all mice [ 1.304616] i2c /dev entries driver [ 1.309816] cpuidle: enable-method property 'ti,am4372' found operations [ 1.317578] omap_hsmmc 48060000.mmc: Got CD GPIO [ 1.323967] ledtrig-cpu: registered to indicate activity on CPUs [ 1.331326] pinctrl-single 44e10800.pinmux: pin PIN67 already requested by 4a100000.ethernet; cannot claim for 4803c000.mcasp [ 1.342832] pinctrl-single 44e10800.pinmux: pin-67 (4803c000.mcasp) status -22 [ 1.350048] pinctrl-single 44e10800.pinmux: could not request pin 67 (PIN67) from group mcasp1_pins on device pinctrl-single [ 1.361374] davinci-mcasp 4803c000.mcasp: Error applying setting, reverse things back [ 1.369240] davinci-mcasp: probe of 4803c000.mcasp failed with error -22 [ 1.376620] NET: Registered protocol family 10 [ 1.382278] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver [ 1.388902] NET: Registered protocol family 17 [ 1.393677] Key type dns_resolver registered [ 1.398143] omap_voltage_late_init: Voltage driver support not added [ 1.473989] omap_i2c 44e0b000.i2c: bus 0 rev0.12 at 100 kHz [ 1.479812] pinctrl-single 44e10800.pinmux: pin PIN87 already requested by 48030000.spi; cannot claim for 4802a000.i2c [ 1.490540] pinctrl-single 44e10800.pinmux: pin-87 (4802a000.i2c) status -22 [ 1.497591] pinctrl-single 44e10800.pinmux: could not request pin 87 (PIN87) from group i2c1_pins on device pinctrl-single [ 1.508711] omap_i2c 4802a000.i2c: Error applying setting, reverse things back [ 1.515943] omap_i2c: probe of 4802a000.i2c failed with error -22 [ 1.523888] omap_hsmmc 48060000.mmc: Got CD GPIO [ 1.583321] hctosys: unable to open rtc device (rtc0) [ 1.589097] ALSA device list: [ 1.592068] No soundcards found. [ 1.599583] Waiting for root device PARTUUID=dd75ad75-02... [ 1.912487] mmc0: host does not support reading read-only switch, assuming write-enable [ 1.923130] mmc0: new high speed SDHC card at address 0003 [ 1.929856] mmcblk0: mmc0:0003 SB08G 7.21 GiB [ 1.938100] mmcblk0: p1 p2 [ 1.964583] random: fast init done [ 2.350687] EXT4-fs (mmcblk0p2): recovery complete [ 2.359493] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null) [ 2.367673] VFS: Mounted root (ext4 filesystem) on device 179:2. [ 2.379161] devtmpfs: mounted [ 2.384053] Freeing unused kernel memory: 1024K INIT: version 2.88 booting Error opening /dev/fb0: No such file or directory Starting udev [ 3.141377] udevd[111]: starting version 3.2 [ 3.207506] udevd[112]: starting eudev-3.2 [ 3.524536] EXT4-fs (mmcblk0p2): re-mounted. Opts: data=ordered [ 4.164939] udevd[214]: failed to execute '/etc/udev/scripts/mount.sh' '/etc/udev/scripts/mount.sh': No such file or directory [ 4.186448] udevd[215]: failed to execute '/etc/udev/scripts/mount.sh' '/etc/udev/scripts/mount.sh': No such file or directory hwclock: can't open '/dev/misc/rtc': No such file or directory Mon May 28 01:25:17 UTC 2018 INIT: Entering runlevel: 5misc/rtc': No such file or directory Configuring network interfaces... [ 4.993230] net eth0: initializing cpsw version 1.15 (0) [ 4.998555] cpsw 4a100000.ethernet: initialized cpsw ale version 1.4 [ 5.019713] cpsw 4a100000.ethernet: ALE Table size 1024 [ 5.027266] Generic PHY 4a101000.mdio:01: attached PHY driver [Generic PHY] (mii_bus:phy_addr=4a101000.mdio:01, irq=-1) [ 5.041941] cpts ptp bc clkid 0 [ 5.048132] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready udhcpc (v1.24.1) started Sending discover... Sending discover... Sending discover... No lease, forking to background done. Starting system message bus: dbus. hwclock: can't open '/dev/misc/rtc': No such file or directory Starting syslogd/klogd: done [ 184.962440] random: crng init done
Move back the removed lines from the recipes and see which config will make your board bootable.